:root {
  --navy: #0B2F5B;
  --blue: #1E88C8;
  --gold: #F2C94C;
  --green: #3E7B32;
  --ink: #1C2530;
  --muted: #64748B;
  --line: #D8E4EF;
  --surface: #F7FAFC;
  --white: #FFFFFF;
}

html { scroll-behavior: smooth; }
body {
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
}
h1, h2, h3, h4, h5, h6, .navbar-brand, .brand-lockup {
  font-family: Manrope, Arial, sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
.site-prose a, .site-block a, .site-category-meta a, .content-tile a, .site-paragraph a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(30, 136, 200, .35);
  text-underline-offset: .18em;
}
.site-prose a:hover, .site-block a:hover, .content-tile a:hover { color: var(--green); }

.site-header { position: sticky; top: 0; z-index: 1030; box-shadow: 0 10px 30px rgba(11, 47, 91, .10); }
.masthead {
  background: linear-gradient(135deg, var(--navy), #123f73);
  color: #fff;
  padding: .8rem 0;
}
.brand-lockup { display: flex; align-items: center; gap: .75rem; color: #fff; font-weight: 800; line-height: 1.15; max-width: 840px; }
.brand-lockup img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); }
.masthead-domain { color: rgba(255,255,255,.78); font-weight: 600; }
.site-navbar { min-height: 54px; border-bottom: 1px solid var(--line); }
.navbar-toggler { border-color: var(--blue); }
.navbar-nav { flex-wrap: nowrap; gap: .15rem; align-items: center; }
.nav-link {
  font-weight: 700;
  color: #253449;
  font-size: .88rem;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-link:hover, .dropdown-item:hover { color: var(--blue); }
.site-overflow-menu { max-height: 70vh; overflow: auto; min-width: 320px; }

.portal-shell, .article-shell { padding: 24px 0 64px; }
.portal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.portal-main { min-width: 0; }
.portal-rail { position: sticky; top: 132px; }
.sidebar-panel {
  background: var(--navy);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(11,47,91,.16);
}
.sidebar-panel .list-group-item {
  background: transparent;
  color: rgba(255,255,255,.86);
  border-color: rgba(255,255,255,.10);
  font-weight: 700;
  font-size: .9rem;
}
.sidebar-panel .list-group-item:hover { background: rgba(255,255,255,.10); color: #fff; }

.portal-hero {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 22px 54px rgba(11,47,91,.18);
}
.portal-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.portal-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,47,91,.96), rgba(11,47,91,.74)); }
.portal-hero-body { position: relative; z-index: 1; max-width: 780px; padding: clamp(1.5rem, 4vw, 3rem); }
.portal-hero h1 { font-size: clamp(2rem, 4vw, 3.7rem); font-weight: 800; line-height: 1.05; margin: 0 0 1rem; }
.portal-hero p { max-width: 760px; color: rgba(255,255,255,.84); margin: 0; }

.quick-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.quick-strip a {
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  font-weight: 800;
  color: var(--navy);
  box-shadow: 0 10px 30px rgba(28,37,48,.06);
}
.quick-strip a:hover { border-left-color: var(--blue); transform: translateY(-1px); }

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.content-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 12px 32px rgba(28,37,48,.06);
  min-width: 0;
}
.content-tile-table { grid-column: span 1; }
.content-tile-gallery { grid-column: span 2; }
.content-tile-list_item { grid-column: span 1; }
.content-tile:hover { border-color: rgba(30,136,200,.45); }

.page-title-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.35rem;
  margin-bottom: 18px;
  box-shadow: 0 12px 32px rgba(28,37,48,.06);
}
.page-title-card h1, .site-prose h1 {
  font-weight: 800;
  color: var(--navy);
  line-height: 1.14;
}
.page-title-card h1 { font-size: clamp(1.8rem, 3vw, 2.7rem); margin: 0; }
.page-title-card p { color: var(--muted); margin: .6rem 0 0; }

.site-prose {
  max-width: 980px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.25rem, 3vw, 2.4rem);
  box-shadow: 0 16px 42px rgba(28,37,48,.08);
}
.site-prose h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  border-bottom: 5px solid var(--gold);
  padding-bottom: .75rem;
  margin-bottom: 1.4rem;
}
.site-heading, .site-prose h2, .site-prose h3 { color: var(--blue); font-weight: 800; margin-top: 1.7rem; }
.site-block { margin-bottom: 1.15rem; }
.site-paragraph { color: #304155; }
.site-date, .site-breadcrumbs { color: var(--muted); font-size: .92rem; }
.breadcrumb { margin-bottom: 1rem; }

.site-image img, .site-gallery img, .site-card img, .site-main-image, .legacy-table img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.site-image img { display: block; margin: 0 auto; }
.site-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: .8rem;
}
.site-gallery figure { margin: 0; }
.site-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.site-card {
  display: grid;
  grid-template-columns: minmax(0, 170px) 1fr;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.site-card h3 { font-size: 1.05rem; font-weight: 800; color: var(--navy); }
.legacy-table { overflow: auto; }
.legacy-table .table { margin-bottom: 0; }
.legacy-table td, .legacy-table th { vertical-align: top; min-width: 120px; }
.legacy-table td:has(img) { width: 1%; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: rgba(216,228,239,.22); }

.site-list li { margin-bottom: .45rem; }
.site-toc { border: 1px solid var(--line); background: #fff; padding: 1rem; border-radius: 8px; }
.site-toc ul { margin: 0; padding-left: 1.1rem; }
.feature-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 12px 32px rgba(28,37,48,.06);
}

.site-footer { background: var(--navy) !important; color: #edf5fb; }
.footer-brand { font-family: Manrope, Arial, sans-serif; font-weight: 800; font-size: 1.25rem; color: #fff; }
.footer-rule { width: 68px; height: 4px; background: var(--gold); margin: 1rem 0; border-radius: 4px; }
.footer-note { color: rgba(255,255,255,.72); }
.footer-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem 1rem; }
.footer-link-grid a, .footer-social a { color: rgba(255,255,255,.82); font-size: .92rem; }
.footer-link-grid a:hover, .footer-social a:hover { color: #fff; text-decoration: underline; }
.footer-social { display: flex; flex-direction: column; gap: .45rem; }

@media (max-width: 1199.98px) {
  .portal-layout { display: block; }
  .content-grid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .brand-lockup span { font-size: .95rem; }
  .navbar-nav { align-items: stretch; }
  .nav-link { max-width: none; white-space: normal; }
  .portal-shell, .article-shell { padding-top: 16px; }
  .portal-hero { min-height: 220px; }
  .quick-strip, .content-grid, .content-grid-home, .content-grid-wide { grid-template-columns: 1fr; }
  .content-tile-gallery { grid-column: span 1; }
  .site-card { grid-template-columns: 1fr; }
  .footer-link-grid { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .portal-rail { display: none !important; }
  body { background: #fff; }
  .site-prose, .content-tile { box-shadow: none; border-color: #bbb; }
}
