:root {
  color-scheme: light;
  --ink: #111318;
  --muted: #5a606b;
  --quiet: #858b96;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --panel-strong: #f0f2ee;
  --line: rgba(17, 19, 24, 0.12);
  --line-strong: rgba(17, 19, 24, 0.22);
  --accent: #008f8b;
  --accent-deep: #006c69;
  --accent-soft: rgba(0, 143, 139, 0.12);
  --graphite: #15181d;
  --shadow: 0 24px 70px rgba(28, 33, 38, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(17, 19, 24, 0.045) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(0deg, rgba(17, 19, 24, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 248, 245, 0.62) 42%, rgba(225, 232, 229, 0.78) 100%),
    repeating-linear-gradient(135deg, rgba(0, 143, 139, 0.06) 0 1px, transparent 1px 34px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.55) 62%, rgba(255, 255, 255, 0.9) 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

code,
pre {
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--graphite);
  color: #fff;
  padding: 10px 14px;
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 14px clamp(18px, 3vw, 40px);
  border-bottom: 1px solid transparent;
  background: rgba(247, 248, 245, 0.72);
  backdrop-filter: blur(18px) saturate(130%);
  transition: border-color 160ms ease, background 160ms ease;
}

.site-header.is-elevated {
  border-color: var(--line);
  background: rgba(247, 248, 245, 0.9);
}

.brand,
.top-nav,
.nav-cta {
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-weight: 720;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 8px 18px rgba(17, 19, 24, 0.11);
  object-fit: contain;
}

.top-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  padding: 4px;
}

.top-nav a,
.nav-cta {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 620;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: rgba(17, 19, 24, 0.07);
  color: var(--ink);
}

.nav-cta {
  justify-self: end;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: clamp(24px, 4vw, 44px);
  width: min(var(--max), calc(100% - 40px));
  min-height: calc(92dvh - 72px);
  margin: 0 auto;
  padding: clamp(36px, 7vw, 74px) 0 clamp(24px, 4vw, 44px);
}

.hero-headline {
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(430px, 1.18fr);
  align-items: center;
  gap: clamp(30px, 5vw, 70px);
}

.hero-copy {
  max-width: 620px;
}

.eyebrow,
.section-kicker,
.metric-label {
  margin: 0;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 1180px;
  margin: 18px auto 22px;
  font-size: clamp(34px, 3.3vw, 46px);
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: keep-all;
  text-wrap: balance;
}

.title-brand {
  color: var(--accent-deep);
  background: linear-gradient(100deg, #006c69 0%, #00a79f 42%, #253a76 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title-line {
  display: block;
  white-space: nowrap;
}

h2 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: 0;
  text-wrap: balance;
}

h3 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-subtitle,
.paper-authors,
.paper-affiliations,
.section-header p,
.resource-card p {
  margin: 0;
  max-width: 66ch;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
}

.paper-authors {
  max-width: 92ch;
  margin: -8px auto 10px;
  color: var(--ink);
  font-size: clamp(15px, 1.32vw, 19px);
  font-weight: 720;
  line-height: 1.45;
}

.paper-affiliations {
  max-width: 92ch;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: clamp(14px, 1.16vw, 16px);
  font-weight: 680;
  line-height: 1.45;
}

.paper-authors sup,
.paper-affiliations sup {
  font-size: 0.68em;
  line-height: 0;
}

.hero-actions,
.resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.button,
.small-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible,
.small-button:hover,
.small-button:focus-visible {
  transform: translateY(-1px);
}

.button:focus-visible,
.small-button:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(0, 143, 139, 0.32);
  outline-offset: 3px;
}

.button-primary {
  background: var(--graphite);
  color: #fff;
  box-shadow: 0 18px 38px rgba(17, 19, 24, 0.18);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #000;
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus-visible,
.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.button-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 620px;
  margin: 34px 0 0;
}

.hero-metrics div,
.result-card,
.method-card,
.faq-item,
.resource-card,
.citation-block,
.framework-panel,
.wide-figure,
.demo-phone,
.artifact-stack figure {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--shadow);
}

.hero-metrics div {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 112px;
  border-radius: var(--radius-sm);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at 50% 0%, rgba(0, 143, 139, 0.12), transparent 64%);
  box-shadow: 0 18px 48px rgba(28, 33, 38, 0.12);
}

.hero-metrics dt {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 780;
  line-height: 1;
}

.hero-metrics dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.hero-visual {
  min-width: 0;
}

.visual-frame {
  position: relative;
  min-height: clamp(430px, 42vw, 560px);
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.82), rgba(229, 235, 232, 0.82)),
    repeating-linear-gradient(90deg, rgba(17, 19, 24, 0.06) 0 1px, transparent 1px 30px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 36px 90px rgba(18, 24, 26, 0.2);
}

.visual-frame::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(17, 19, 24, 0.08);
  border-radius: 22px;
  pointer-events: none;
}

.phone {
  position: absolute;
  width: min(28vw, 220px);
  aspect-ratio: 1179 / 2400;
  overflow: hidden;
  border: 7px solid #191c20;
  border-radius: 32px;
  background: #191c20;
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.2);
  transform-origin: center;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-left {
  left: 7%;
  top: 21%;
  opacity: 0.82;
  transform: rotate(-8deg) scale(0.92);
}

.phone-front {
  left: 50%;
  top: 9%;
  z-index: 2;
  transform: translateX(-50%);
}

.phone-right {
  right: 7%;
  top: 24%;
  opacity: 0.9;
  transform: rotate(7deg) scale(0.95);
}

.loop-card {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: min(260px, calc(100% - 44px));
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  padding: 10px;
}

.loop-card span {
  min-height: 38px;
  border: 1px solid rgba(17, 19, 24, 0.09);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(64px, 10vw, 128px) 0;
}

.intro-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(42px, 6vw, 72px) 0;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.section-header {
  display: grid;
  gap: 18px;
  max-width: 880px;
  margin-bottom: clamp(28px, 5vw, 54px);
}

.section-header h2 {
  max-width: 20ch;
}

.section-header-centered {
  justify-items: center;
  max-width: 980px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-header-centered h2,
.section-header-centered p {
  margin-right: auto;
  margin-left: auto;
}

.framework-panel {
  border-radius: var(--radius);
  overflow: hidden;
  padding: clamp(16px, 3vw, 32px);
  margin-bottom: 18px;
}

.framework-panel img {
  width: 100%;
  border-radius: 12px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.method-card,
.result-card {
  min-height: 260px;
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
}

.method-card {
  display: grid;
  align-content: space-between;
  gap: 26px;
}

.card-index {
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 820;
}

.method-card p,
.result-card span,
.plain-list,
figcaption,
.site-footer {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.knowledge-section {
  border-top: 1px solid var(--line);
}

.abstract-section {
  border-bottom: 1px solid var(--line);
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(48px, 7vw, 88px);
}

.abstract-section .section-header {
  max-width: 1040px;
}

.abstract-section .section-header h2 {
  max-width: 24ch;
}

.abstract-section .section-header p {
  max-width: 82ch;
  text-align: left;
}

.knowledge-stats {
  display: grid;
  gap: 20px;
}

.knowledge-layout {
  grid-template-columns: 1fr;
  gap: 18px;
}

.knowledge-layout .plain-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.knowledge-layout .plain-list li {
  display: grid;
  min-height: 94px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62)),
    radial-gradient(circle at 50% 0%, rgba(0, 143, 139, 0.1), transparent 60%);
  box-shadow: 0 16px 42px rgba(28, 33, 38, 0.1);
  padding: 18px 16px;
  text-align: center;
}

.knowledge-layout .plain-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
}

.knowledge-layout .artifact-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.knowledge-layout .artifact-stack figure {
  display: grid;
  align-content: space-between;
}

.plain-list {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.plain-list strong {
  color: var(--ink);
}

.artifact-stack {
  display: grid;
  gap: 14px;
}

.artifact-stack figure,
.wide-figure,
.demo-phone {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.artifact-stack figure,
.wide-figure {
  padding: clamp(14px, 2vw, 22px);
}

.artifact-stack figcaption,
.wide-figure figcaption,
.demo-phone figcaption {
  margin-top: 14px;
}

.results-section {
  border-top: 1px solid var(--line);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.result-card {
  min-height: 210px;
}

.result-card strong {
  display: block;
  margin: 26px 0 10px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 0.95;
  letter-spacing: 0;
}

.evidence-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.wide-figure img,
.artifact-stack img {
  width: 100%;
  border-radius: 12px;
  background: #fff;
}

.demo-section {
  width: min(1440px, calc(100% - 40px));
  border-top: 1px solid var(--line);
}

.demo-section .section-header {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.demo-section .section-header h2,
.demo-section .section-header p {
  margin-left: auto;
  margin-right: auto;
}

.demo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: clamp(12px, 2vw, 20px);
  align-items: end;
}

.demo-phone {
  padding: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.demo-phone img {
  width: 100%;
  aspect-ratio: 1179 / 2400;
  border: 6px solid #171a1f;
  border-radius: 26px;
  object-fit: cover;
}

.demo-phone figcaption {
  padding: 0 4px 4px;
  color: var(--ink);
  font-weight: 720;
}

.resources-section {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
}

.resource-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 42px);
}

.resource-card h2 {
  max-width: 13ch;
  margin: 12px 0 18px;
}

.resource-actions {
  justify-content: flex-end;
  margin: 0;
}

.citation-block {
  border-radius: var(--radius);
  overflow: hidden;
}

.citation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.small-button {
  min-height: 38px;
  border-color: var(--line-strong);
  background: var(--panel);
  padding: 0 14px;
  color: var(--ink);
}

pre {
  margin: 0;
  overflow: auto;
  padding: 20px;
  color: #f4f6f8;
  background: #111318;
  font-size: 13px;
  line-height: 1.65;
}

.faq-section {
  border-top: 1px solid var(--line);
  padding-top: clamp(48px, 8vw, 92px);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.faq-item {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 230px;
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
}

.faq-item h3 {
  max-width: 16ch;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 30px 0 42px;
}

.site-footer a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  transform: translateY(20px);
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--graphite);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.reveal {
  opacity: 1;
}

.js .reveal {
  transform: translateY(16px);
  opacity: 0;
  transition: opacity 600ms ease, transform 600ms ease;
}

.js .reveal.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    display: none;
  }

  .hero,
  .hero-body,
  .split-layout,
  .resource-card {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  .method-grid,
  .results-grid,
  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-layout .plain-list,
  .knowledge-layout .artifact-stack {
    grid-template-columns: 1fr;
  }

  .resource-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    padding: 10px 14px;
  }

  .brand span:last-child {
    display: none;
  }

  .top-nav {
    display: none;
  }

  .nav-cta {
    min-height: 40px;
  }

  .hero,
  .section,
  .demo-section,
  .site-footer {
    width: min(100% - 28px, var(--max));
  }

  .hero-body,
  .hero-copy,
  .hero-headline {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  h1 {
    max-width: none;
    font-size: 26px;
    line-height: 1.08;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .title-line {
    display: block;
    white-space: normal;
  }

  .paper-authors {
    font-size: 13px;
    line-height: 1.42;
  }

  .paper-affiliations {
    font-size: 12px;
    line-height: 1.42;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .hero-actions .button,
  .resource-actions .button {
    width: 100%;
  }

  .method-grid,
  .results-grid,
  .faq-grid,
  .demo-strip {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: none;
  }

  .hero-metrics div {
    min-height: 86px;
    padding: 12px 10px;
  }

  .hero-metrics dd {
    font-size: 11px;
  }

  .hero-visual {
    display: none;
  }

  .phone {
    width: min(58vw, 245px);
  }

  .phone-left {
    left: -1%;
    top: 24%;
  }

  .phone-front {
    top: 6%;
  }

  .phone-right {
    right: -1%;
    top: 27%;
  }

  .method-card,
  .result-card {
    min-height: auto;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 34px;
  }

  .visual-frame {
    min-height: 460px;
  }

  .loop-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    transform: none;
    opacity: 1;
  }
}
