:root {
  --navy-950: #08283b;
  --navy-900: #0b3854;
  --navy-800: #15526e;
  --teal-700: #147d83;
  --teal-600: #1d9295;
  --teal-100: #dff1ef;
  --lime-300: #cce77f;
  --sand-50: #fbfaf7;
  --sand-100: #f4f1e9;
  --sand-200: #e9e4d9;
  --paper: #ffffff;
  --ink: #17242d;
  --ink-soft: #4e5e66;
  --muted: #6d7a80;
  --line: #dce2df;
  --line-strong: #c8d2ce;
  --success: #166c4b;
  --success-bg: #e5f4ec;
  --warning: #8a5b08;
  --warning-bg: #fff4d8;
  --danger: #a6382f;
  --danger-bg: #fdeae7;
  --brand: var(--navy-900);
  --accent: var(--teal-700);
  --surface: var(--paper);
  --surface-2: var(--sand-100);
  --accent-soft: var(--teal-100);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --shadow-sm: 0 1px 2px rgba(8, 40, 59, .06);
  --shadow-md: 0 18px 48px -32px rgba(8, 40, 59, .38);
  --radius-sm: .55rem;
  --radius: .9rem;
  --radius-lg: 1.35rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--sand-50);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4.6rem 0 auto;
  height: 28rem;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 0, rgba(204, 231, 127, .25), transparent 38%),
    radial-gradient(circle at 12% 16%, rgba(29, 146, 149, .13), transparent 42%);
}
a { color: var(--navy-800); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--teal-700); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; color: var(--navy-950); line-height: 1.14; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 4.5vw, 4.35rem); }
h2 { font-size: clamp(1.45rem, 2.5vw, 2.15rem); }
h3 { font-size: 1.08rem; }
p { margin: .65rem 0; }
code, .mono { font-family: var(--font-mono); }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--lime-300);
  outline-offset: 3px;
  border-radius: .25rem;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: .5rem;
  left: .5rem;
  padding: .65rem .9rem;
  transform: translateY(-150%);
  color: white;
  background: var(--navy-950);
  border-radius: var(--radius-sm);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgba(251, 250, 247, .94);
  border-bottom: 1px solid rgba(200, 210, 206, .8);
  backdrop-filter: blur(16px);
}
.header-inner {
  width: min(1240px, calc(100% - 2rem));
  min-height: 4.75rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.35rem;
}
.brand-lockup {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  color: var(--navy-950);
  text-decoration: none;
}
.brand-lockup:hover { color: var(--navy-950); }
.brand-lockup > span:last-child { display: grid; line-height: 1.08; }
.brand-lockup strong { font-size: 1.03rem; letter-spacing: -.02em; }
.brand-lockup small { margin-top: .2rem; color: var(--muted); font-size: .67rem; letter-spacing: .01em; }
.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  padding: .45rem;
  display: flex;
  align-items: end;
  gap: .18rem;
  background: var(--navy-900);
  border-radius: .72rem;
  box-shadow: var(--shadow-sm);
}
.brand-mark i { width: 25%; min-height: 30%; background: white; border-radius: .12rem .12rem 0 0; }
.brand-mark i:nth-child(2) { min-height: 78%; background: var(--lime-300); }
.brand-mark i:nth-child(3) { min-height: 55%; background: #79d2ca; }
.primary-nav, .operator-nav { display: flex; align-items: center; gap: .15rem; }
.primary-nav { margin-left: auto; }
.primary-nav a, .operator-nav a, .logout-form button {
  padding: .5rem .68rem;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.primary-nav a:hover, .operator-nav a:hover, .logout-form button:hover { color: var(--navy-950); background: var(--sand-100); }
.primary-nav a.active, .primary-nav a[aria-current="page"] { color: var(--navy-950); background: var(--teal-100); }
.operator-nav { margin-left: .35rem; padding-left: .5rem; border-left: 1px solid var(--line); }
.operator-nav a { color: var(--teal-700); }
.logout-form { margin: 0; }
.nav-toggle {
  display: none;
  margin-left: auto;
  padding: .5rem .7rem;
  color: var(--navy-950);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-weight: 700;
}
html:not(.js) [data-share], html:not(.js) [data-fullscreen-target] { display: none; }

.site-main {
  width: min(1240px, calc(100% - 2rem));
  min-height: calc(100vh - 20rem);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5.25rem) 0 5rem;
}
.site-main.narrow { width: min(720px, calc(100% - 2rem)); }
.site-footer { color: #d6e5ea; background: var(--navy-950); }
.footer-inner {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.8rem 0;
  display: grid;
  grid-template-columns: 1.2fr .8fr 1fr;
  gap: 2rem;
  align-items: start;
}
.footer-brand { color: white; font-size: 1.15rem; font-weight: 760; text-decoration: none; }
.footer-inner p { max-width: 45ch; color: #aec2ca; font-size: .86rem; }
.footer-inner nav { display: grid; gap: .42rem; }
.footer-inner nav a { color: #d6e5ea; font-size: .88rem; text-decoration: none; }
.footer-inner nav a:hover { color: white; text-decoration: underline; }
.footer-note { margin: 0; }

.eyebrow, .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .8rem;
  color: var(--teal-700);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before, .section-kicker::before { content: ""; width: 1.6rem; height: 2px; background: var(--lime-300); }
.hero { max-width: 920px; margin-bottom: clamp(2.6rem, 6vw, 5rem); }
.hero h1 { max-width: 18ch; text-wrap: balance; }
.display { font-size: clamp(2.4rem, 6vw, 5rem); }
.lede { max-width: 68ch; margin-top: 1.15rem; color: var(--ink-soft); font-size: clamp(1.02rem, 1.5vw, 1.2rem); }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.55rem; }
.section { margin-top: clamp(3rem, 7vw, 5.6rem); }
.section:first-child { margin-top: 0; }
.section-header {
  margin-bottom: 1.35rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}
.section-header p { max-width: 60ch; margin: .35rem 0 0; color: var(--muted); }
.section-link { flex: none; font-size: .9rem; font-weight: 720; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.4rem; font-size: 1.55rem; }
.prose h3 { margin-top: 1.8rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose a { font-weight: 650; }
.muted { color: var(--muted); }
.error { color: var(--danger); }

.btn {
  width: auto;
  min-height: 2.75rem;
  padding: .68rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  color: white;
  background: var(--navy-900);
  border: 1px solid var(--navy-900);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { color: white; background: var(--navy-800); text-decoration: none; }
.btn.secondary, .btn.ghost { color: var(--navy-950); background: var(--paper); border-color: var(--line-strong); }
.btn.secondary:hover, .btn.ghost:hover { color: var(--navy-950); background: var(--sand-100); }
.btn.danger { color: var(--danger); background: var(--paper); border-color: #e8b8b2; }
.btn.danger:hover { background: var(--danger-bg); }
.btn.small { min-height: 2.2rem; padding: .4rem .7rem; font-size: .82rem; }

.card, .panel {
  padding: clamp(1.15rem, 2.5vw, 1.8rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.notice { padding: .85rem 1rem; border-left: 4px solid var(--teal-700); background: var(--teal-100); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.notice.warning { border-color: var(--warning); background: var(--warning-bg); }
.notice.error { border-color: var(--danger); background: var(--danger-bg); }
.empty-state { padding: clamp(2rem, 5vw, 4.5rem); text-align: center; background: var(--sand-100); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }
.empty-state h2 { font-size: 1.45rem; }
.empty-state p { max-width: 46ch; margin: .55rem auto 0; color: var(--muted); }
.empty { padding: 2.5rem; text-align: center; background: var(--sand-100); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }

.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.dashboard-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.dashboard-card:hover { transform: translateY(-3px); border-color: #a8c7c4; box-shadow: 0 22px 55px -30px rgba(8, 40, 59, .5); }
.dashboard-card__visual {
  position: relative;
  min-height: 11.5rem;
  padding: 1.3rem;
  overflow: hidden;
  display: flex;
  align-items: end;
  background: linear-gradient(145deg, var(--navy-900), #176873 68%, #3f9188);
}
.dashboard-card__visual::before {
  content: "";
  position: absolute;
  width: 12rem;
  height: 12rem;
  top: -6rem;
  right: -3rem;
  border: 2.5rem solid rgba(204, 231, 127, .2);
  border-radius: 50%;
}
.dashboard-card__visual::after {
  content: "";
  position: absolute;
  inset: auto 1.4rem 1.4rem 1.4rem;
  height: 4.5rem;
  opacity: .52;
  background: linear-gradient(135deg, transparent 0 18%, rgba(255,255,255,.7) 19% 21%, transparent 22% 38%, rgba(204,231,127,.9) 39% 42%, transparent 43% 57%, rgba(255,255,255,.6) 58% 61%, transparent 62%);
  clip-path: polygon(0 85%, 18% 61%, 37% 74%, 58% 24%, 78% 45%, 100% 4%, 100% 100%, 0 100%);
}
.dashboard-card__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dashboard-card__topic { position: relative; z-index: 2; padding: .27rem .62rem; color: var(--navy-950); background: var(--lime-300); border-radius: 999px; font-size: .71rem; font-weight: 800; letter-spacing: .035em; }
.dashboard-card__body { padding: 1.3rem 1.35rem 1.4rem; display: flex; flex: 1; flex-direction: column; }
.dashboard-card__body h3 { font-size: 1.22rem; }
.dashboard-card__title { color: var(--navy-950); text-decoration: none; }
.dashboard-card__title::after { content: ""; position: absolute; inset: 0; }
.dashboard-card__body p { color: var(--ink-soft); font-size: .91rem; }
.dashboard-card__meta { margin-top: auto; padding-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .75rem; }
.dashboard-card { position: relative; }
.dashboard-card__source { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-card__date { flex: none; font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.15rem; }

.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.topic-card {
  position: relative;
  min-height: 13rem;
  padding: 1.45rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: white;
  background: var(--navy-900);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  text-decoration: none;
}
.topic-card:nth-child(3n + 2) { background: #135c68; }
.topic-card:nth-child(3n + 3) { background: #214b5a; }
.topic-card::after { content: ""; position: absolute; right: -3rem; bottom: -4rem; width: 10rem; height: 10rem; border: 2rem solid rgba(204,231,127,.18); border-radius: 50%; }
.topic-card:hover { color: white; border-color: var(--lime-300); text-decoration: none; }
.topic-card small { color: #cae0e4; font-size: .74rem; font-weight: 700; }
.topic-card h3 { max-width: 16ch; margin-top: auto; color: white; font-size: 1.45rem; }
.topic-card p { max-width: 34ch; margin-bottom: 0; color: #cae0e4; font-size: .86rem; }

.search-box { position: relative; max-width: 38rem; margin: 1.5rem 0 2rem; }
.search-box label { display: block; margin-bottom: .4rem; color: var(--ink-soft); font-size: .82rem; font-weight: 750; }
input, select, textarea, input[type="file"] {
  width: 100%;
  padding: .72rem .8rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(204, 231, 127, .7); outline-offset: 1px; border-color: var(--teal-700); }
textarea { min-height: 8rem; resize: vertical; }
form label { display: block; margin: 1rem 0 .35rem; color: var(--ink-soft); font-size: .86rem; font-weight: 720; }
form .hint { color: var(--muted); font-weight: 450; }
fieldset { margin: 1.25rem 0; padding: 0; border: 0; }
legend { color: var(--navy-950); font-weight: 780; }

.breadcrumbs { margin: 0 0 1rem; color: var(--muted); font-size: .82rem; }
.breadcrumbs ol { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .35rem; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); }
.page-heading { max-width: 860px; margin-bottom: 2.5rem; }
.page-heading h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
.page-heading p { max-width: 65ch; color: var(--ink-soft); font-size: 1.08rem; }

.trust-strip { margin: 1.8rem 0; padding: 1rem 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.trust-item { padding: 0 1rem; border-left: 1px solid var(--line); }
.trust-item:first-child { padding-left: 0; border-left: 0; }
.trust-item span { display: block; color: var(--muted); font-size: .7rem; font-weight: 760; letter-spacing: .07em; text-transform: uppercase; }
.trust-item strong { display: block; margin-top: .18rem; color: var(--navy-950); font-size: .9rem; }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.3rem; align-items: start; }
.dashboard-stage { min-width: 0; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.dashboard-stage iframe { width: 100%; min-height: 680px; display: block; border: 0; background: white; }
.dashboard-stage__toolbar { padding: .72rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--muted); background: var(--sand-100); border-bottom: 1px solid var(--line); font-size: .8rem; }
.dashboard-sidebar { display: grid; gap: 1rem; }
.insight-list { margin: 0; padding: 0; display: grid; gap: .75rem; list-style: none; }
.insight-list li { padding-left: 1rem; color: var(--ink-soft); border-left: 3px solid var(--lime-300); }
.insight-list strong { display: block; color: var(--navy-950); }
.source-list { margin: .6rem 0 0; padding: 0; display: grid; gap: .65rem; list-style: none; }
.source-list li { color: var(--ink-soft); font-size: .86rem; }
.source-list a { font-weight: 700; }
.detail-sections { max-width: 900px; margin-top: 3rem; display: grid; gap: 2.5rem; }
.detail-section h2 { margin-bottom: .7rem; font-size: 1.4rem; }
.detail-section p { color: var(--ink-soft); }
.static-fallback { padding: 1rem; overflow: auto; }
.metric-grid { margin: 1rem 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.metric { padding: 1rem; background: var(--sand-100); border-radius: var(--radius); }
.metric span { display: block; color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; }
.metric strong { display: block; margin-top: .2rem; color: var(--navy-950); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.data-table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .72rem .8rem; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--ink-soft); background: var(--sand-100); font-size: .75rem; letter-spacing: .03em; }
td { font-variant-numeric: tabular-nums; }
.preview-banner { margin: -2rem 0 2rem; padding: .8rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #694809; background: var(--warning-bg); border: 1px solid #efd897; border-radius: var(--radius); }
.preview-banner strong { display: block; }

.status-chip, .badge, .chip, .tag {
  width: max-content;
  padding: .22rem .55rem;
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  color: var(--ink-soft);
  background: var(--sand-100);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 750;
}
.status-chip.published, .fresh-ok { color: var(--success); background: var(--success-bg); border-color: #b7dfca; }
.status-chip.draft, .fresh-stale { color: var(--warning); background: var(--warning-bg); border-color: #efd897; }
.status-chip.archived, .fresh-err { color: var(--danger); background: var(--danger-bg); border-color: #edc0ba; }
.admin-header { margin-bottom: 2rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.admin-header h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.admin-table { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table table { min-width: 720px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 1.25rem; align-items: start; }
.admin-stack { display: grid; gap: 1rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.insight-choice { padding: .8rem 0; display: grid; grid-template-columns: auto 1fr; gap: .7rem; border-bottom: 1px solid var(--line); }
.insight-choice input { width: auto; margin-top: .28rem; }
.insight-choice label { margin: 0 0 .3rem; }
.insight-choice label + label { margin-top: .65rem; color: var(--muted); font-size: .75rem; }
.release-list { margin: 0; padding: 0; display: grid; gap: .7rem; list-style: none; }
.release-item { padding: .8rem; background: var(--sand-100); border-radius: var(--radius-sm); }
.release-item small { display: block; color: var(--muted); }

.reveal { animation: reveal .35s ease-out both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; padding-block: .7rem; }
  .js .nav-toggle { display: inline-flex; }
  .primary-nav { order: 4; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: .5rem 0; border-top: 1px solid var(--line); }
  .js .primary-nav { display: none; }
  .js .primary-nav[data-open="true"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operator-nav { margin-left: 0; }
  .dashboard-grid, .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-layout, .admin-grid { grid-template-columns: 1fr; }
  .dashboard-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-note { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .header-inner, .site-main, .footer-inner { width: min(100% - 1.25rem, 1240px); }
  .brand-lockup small { display: none; }
  .operator-nav { width: 100%; order: 3; padding: .45rem 0 0; border: 0; border-top: 1px solid var(--line); }
  .primary-nav, .js .primary-nav[data-open="true"] { grid-template-columns: 1fr; }
  .site-main { padding-top: 2.4rem; }
  .hero { margin-bottom: 2.6rem; }
  .dashboard-grid, .topic-grid, .metric-grid, .field-grid, .dashboard-sidebar { grid-template-columns: 1fr; }
  .dashboard-card__visual { min-height: 9.5rem; }
  .section-header, .admin-header { align-items: start; flex-direction: column; }
  .trust-strip { grid-template-columns: 1fr; padding: .2rem 0; }
  .trust-item { padding: .75rem 0; border-left: 0; border-top: 1px solid var(--line); }
  .trust-item:first-child { border-top: 0; }
  .dashboard-stage iframe { min-height: 560px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-note { grid-column: auto; }
}

@media print {
  .site-header, .site-footer, .hero-actions, .button-row, .dashboard-stage__toolbar, .operator-nav { display: none !important; }
  body { background: white; }
  .site-main { width: 100%; padding: 0; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-stage { box-shadow: none; }
}
