:root {
  --ink: #0d2a4c;
  --ink-2: #183b61;
  --cyan: #0797b9;
  --cyan-dark: #057591;
  --sky: #e7f7fb;
  --paper: #ffffff;
  --wash: #f4f8fb;
  --line: #cddbe6;
  --muted: #526170;
  --soft: #72808d;
  --max: 1180px;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(13, 42, 76, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; }
a { color: var(--cyan-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
button { font: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  background: var(--ink);
  color: white;
  padding: .7rem 1rem;
  border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(205,219,230,.8);
  backdrop-filter: blur(14px);
}
.nav-shell {
  width: min(calc(100% - 2rem), var(--max));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 780;
  letter-spacing: -.02em;
}
.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}
.brand small {
  display: block;
  color: var(--soft);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .09em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 650;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--cyan-dark); }
.menu-button {
  display: none;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: .45rem .7rem;
}

.container { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; }
.narrow { width: min(calc(100% - 2rem), 820px); margin-inline: auto; }
.section { padding: 5.5rem 0; }
.section.compact { padding: 3.6rem 0; }
.section-tint { background: var(--wash); border-block: 1px solid #e4edf3; }
.eyebrow {
  margin: 0 0 .8rem;
  color: var(--cyan-dark);
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; letter-spacing: -.035em; }
h1 { margin: 0; font-size: clamp(2.7rem, 6.7vw, 5.8rem); font-weight: 790; }
h2 { margin: 0 0 1rem; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 760; }
h3 { margin: 0 0 .65rem; font-size: 1.35rem; font-weight: 750; }
h4 { margin: 1.7rem 0 .45rem; font-size: 1.02rem; }
p { margin: 0 0 1rem; }
.lead { color: var(--ink-2); font-size: clamp(1.12rem, 1.7vw, 1.35rem); line-height: 1.55; }
.muted { color: var(--muted); }
.section-intro { max-width: 760px; margin-bottom: 2.4rem; }

.hero {
  min-height: 78vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 87% 18%, rgba(7,151,185,.16), transparent 26rem),
    linear-gradient(135deg, #fff 0%, #fff 58%, #f0f9fb 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: 5rem 0;
}
.hero h1 span { display: block; color: var(--cyan-dark); }
.hero .lead { max-width: 760px; margin-top: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 46px;
  padding: .65rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: white;
  background: var(--ink);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
}
.button:hover { background: var(--cyan-dark); border-color: var(--cyan-dark); color: white; }
.button.secondary { color: var(--ink); background: white; border-color: var(--line); }
.button.secondary:hover { border-color: var(--cyan-dark); color: var(--cyan-dark); }

.architecture {
  min-height: 360px;
  display: grid;
  align-content: center;
  gap: 0;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.82);
  box-shadow: 0 16px 42px rgba(13,42,76,.06);
}
.architecture-title {
  margin: 0 0 1.1rem;
  color: var(--soft);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.architecture-flow { display: grid; gap: 0; }
.layer {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(125px,.7fr) 1fr;
  align-items: baseline;
  gap: 1rem;
  margin: 0;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}
.layer strong, .layer span { display: block; }
.layer strong { font-size: 1rem; }
.layer span { color: var(--muted); font-size: .82rem; }
.layer.one { border-left: 4px solid var(--cyan); }
.layer.two { border-left: 4px solid #1a668e; }
.layer.three { border-left: 4px solid var(--ink); }
.flow-arrow {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding-left: 1rem;
  color: var(--soft);
}
.flow-arrow span { color: var(--cyan-dark); font-size: 1.05rem; line-height: 1; }
.flow-arrow small { font-size: .72rem; font-weight: 700; letter-spacing: .04em; }

.meta-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.meta-item { padding: 1.25rem 1.5rem; border-right: 1px solid var(--line); }
.meta-item:last-child { border-right: 0; }
.meta-item strong { display: block; color: var(--ink); font-size: 1.05rem; }
.meta-item span { color: var(--muted); font-size: .83rem; }

.grid { display: grid; gap: 1.2rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card:hover { border-color: #9fc6d3; box-shadow: 0 14px 35px rgba(13,42,76,.07); }
.card p:last-child { margin-bottom: 0; }
.card-index { color: var(--cyan-dark); font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.card-link { color: var(--ink); text-decoration: none; }
.card-link::after { content: " →"; color: var(--cyan-dark); }
.tag-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.tag {
  display: inline-flex;
  padding: .23rem .58rem;
  border-radius: 999px;
  background: var(--sky);
  color: #075f74;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .02em;
}
.tag.neutral { color: var(--muted); background: #eef3f6; }

.toolkit-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.toolkit-card { grid-column: span 4; display: flex; flex-direction: column; min-height: 255px; }
.toolkit-card.wide { grid-column: span 6; }
.toolkit-card .card-link { margin-top: auto; font-weight: 750; }
.toolkit-name { font-size: 1.7rem; }

.spotlight {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.poster-frame {
  padding: .7rem;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.poster-frame img { width: 100%; height: auto; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; margin: 1.4rem 0; }
.metric { border-top: 2px solid var(--cyan); padding-top: .65rem; }
.metric strong { display: block; font-size: 1.25rem; }
.metric span { color: var(--muted); font-size: .78rem; }

.page-hero {
  padding: 5rem 0 3.5rem;
  background: linear-gradient(135deg, #fff, #eff9fb);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
.page-hero .lead { max-width: 850px; margin-top: 1.1rem; }
.page-meta { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.5rem; }
.crumbs { margin-bottom: 1.2rem; color: var(--muted); font-size: .85rem; }
.crumbs a { color: inherit; }

.content-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 3.5rem; }
.toc { position: sticky; top: 98px; align-self: start; }
.toc strong { display: block; margin-bottom: .7rem; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.toc a { display: block; padding: .38rem 0 .38rem .65rem; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .88rem; }
.toc a:hover { color: var(--cyan-dark); }
.toc a.active { border-left-color: var(--cyan); color: var(--cyan-dark); font-weight: 750; }
.prose { min-width: 0; }
.prose section { scroll-margin-top: 100px; margin-bottom: 4rem; }
.prose h2 { font-size: 2rem; border-bottom: 1px solid var(--line); padding-bottom: .65rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .55rem; }
.prose code {
  padding: .12rem .35rem;
  border-radius: 5px;
  background: #eef3f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .9em;
}
.fact-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.fact { padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--wash); }
.fact dt { color: var(--soft); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.fact dd { margin: .22rem 0 0; color: var(--ink); font-weight: 650; }
.callout { padding: 1.2rem 1.35rem; border-left: 4px solid var(--cyan); background: var(--sky); border-radius: 0 12px 12px 0; }
.citation { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.citation:last-child { border-bottom: 0; }

.funding-lockup {
  margin-top: 1.5rem;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
.funding-lockup p { margin: 0 0 1.35rem; color: var(--ink-2); }
.funding-lockup img { display: block; width: min(100%, 610px); height: auto; margin-inline: auto; }

.doi-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.doi-badge {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #badbe2;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-size: .875rem;
  line-height: 1;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.doi-badge span { padding: .55rem .65rem; background: var(--cyan-dark); color: white; font-weight: 750; }
.doi-badge strong { padding: .55rem .7rem; font-weight: 650; }
.doi-badge.neutral { border-color: var(--line); }
.doi-badge.neutral span { background: #e7edf1; color: var(--ink-2); }
.doi-badge:hover { border-color: var(--cyan-dark); box-shadow: 0 5px 16px rgba(13, 42, 76, .09); transform: translateY(-1px); }
.prose a[href^="https://doi.org/"]:not(.button):not(.doi-badge) {
  display: inline-block;
  padding: .13rem .42rem;
  border-radius: 5px;
  background: #edf3f5;
  color: var(--cyan-dark);
  text-decoration: none;
  font-size: .9em;
  font-weight: 650;
}
.prose a[href^="https://doi.org/"]:not(.button):not(.doi-badge):hover { background: #dcecef; }

.media-block { margin: 2rem 0 3.2rem; }
.media-block figure { margin: 0; }
.media-block figcaption { margin-top: .8rem; color: var(--muted); font-size: .9rem; }
.media-block img, .media-block video { width: 100%; border: 1px solid var(--line); background: white; }
.portrait-media { width: min(100%, 650px); margin-inline: auto; }
.video-media { width: min(100%, 600px); margin-inline: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { padding: .75rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { width: 42%; color: var(--muted); font-weight: 650; }

.identity-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.4rem; }
.identity-card { padding: clamp(1.3rem,3vw,2.4rem); border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.identity-grid.compare-three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.identity-card.recommended { border-color: #85bdcb; box-shadow: 0 18px 45px rgba(13,42,76,.07); }
.identity-label { display: flex; align-items: center; gap: .65rem; color: var(--ink); }
.identity-label span { color: var(--cyan-dark); font-size: .76rem; font-weight: 800; letter-spacing: .1em; }
.identity-stage { min-height: 285px; display: grid; place-items: center; margin: 1.3rem 0; background: var(--wash); border-radius: 14px; }
.identity-stage img { width: 180px; height: 180px; }
.identity-wordmark { min-height: 76px; display: flex; align-items: center; gap: .8rem; padding: 1rem; border-block: 1px solid var(--line); font-weight: 780; letter-spacing: -.02em; }
.identity-wordmark img { width: 42px; height: 42px; }
.identity-wordmark.refined { gap: .95rem; }
.identity-wordmark.refined img { width: 46px; height: 46px; }
.identity-wordmark small { display: block; color: var(--soft); font-size: .68rem; font-weight: 600; letter-spacing: .09em; line-height: 1.1; text-transform: uppercase; white-space: nowrap; }
.scale-row { min-height: 82px; display: flex; align-items: center; gap: 1.4rem; margin-bottom: 1rem; }
.scale-row img { flex: 0 0 auto; }
.scale-row .s48 { width: 48px; height: 48px; }
.scale-row .s32 { width: 32px; height: 32px; }
.scale-row .s20 { width: 20px; height: 20px; }

.site-footer { padding: 3rem 0; background: var(--ink); color: #dce8f1; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(160px, 190px); gap: 2rem; align-items: center; }
.site-footer strong { color: white; }
.site-footer a { color: #9ee7f4; }
.footer-small { color: #9fb2c2; font-size: .82rem; }
.footer-upct {
  display: block;
  padding-left: 1.6rem;
  border-left: 1px solid rgba(255, 255, 255, .2);
  text-decoration: none;
}
.footer-upct img { display: block; width: 168px; max-width: 100%; height: auto; }

@media (max-width: 900px) {
  .hero-grid, .spotlight, .content-layout { grid-template-columns: 1fr; }
  .identity-grid, .identity-grid.compare-three { grid-template-columns: 1fr; }
  .architecture { max-width: 580px; width: 100%; margin: 0 auto; min-height: 360px; }
  .toolkit-card, .toolkit-card.wide { grid-column: span 6; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: .2rem 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
  .toc strong { width: 100%; }
  .toc a { display: inline; }
}

@media (max-width: 700px) {
  .menu-button { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .6rem 1rem 1rem;
    background: white;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7rem; }
  .meta-strip { grid-template-columns: 1fr; }
  .meta-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .meta-item:last-child { border-bottom: 0; }
  .grid.two, .grid.three, .grid.four, .fact-list { grid-template-columns: 1fr; }
  .toolkit-card, .toolkit-card.wide { grid-column: 1 / -1; min-height: auto; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 4rem 0; }
  .hero { min-height: auto; }
  .hero-grid { padding: 4rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-upct { width: min(190px, 100%); padding: 1.4rem 0 0; border-top: 1px solid rgba(255, 255, 255, .2); border-left: 0; }
  .page-hero { padding-top: 3.5rem; }
}

@media (max-width: 480px) {
  .architecture { padding: 1.35rem; }
  .layer { grid-template-columns: 1fr; gap: .15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
