:root {
  color-scheme: light;
  --bg: #f7f8f6;
  --bg-soft: #eef2ef;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --text: #17211e;
  --muted: #57645f;
  --faint: #7b8883;
  --line: rgba(23, 33, 30, 0.12);
  --line-strong: rgba(23, 33, 30, 0.2);
  --mint: #0b7f65;
  --mint-soft: #e4f2ed;
  --cyan: #397fa5;
  --orange: #b96a2d;
  --orange-soft: #f8ecdf;
  --max: 1220px;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(35, 54, 47, 0.1);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 0%, rgba(11, 127, 101, 0.07), transparent 28rem),
    radial-gradient(circle at 90% 18%, rgba(57, 127, 165, 0.05), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(23,33,30,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,33,30,.022) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  content: "";
  pointer-events: none;
}

button,
a {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

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

.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;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: .65rem 1rem;
  transform: translateY(-150%);
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
}

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

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 clamp(1.2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 246, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.brand-accent {
  color: var(--mint);
}

.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  width: 1.55rem;
  height: 1.55rem;
  padding: 5px;
  border: 1px solid rgba(18, 214, 160, .55);
  border-radius: 7px;
  background: rgba(18, 214, 160, .06);
}

.brand-mark i {
  display: block;
  flex: 1;
  border-radius: 1px;
  background: var(--mint);
}

.brand-mark i:nth-child(1) { height: 45%; }
.brand-mark i:nth-child(2) { height: 100%; }
.brand-mark i:nth-child(3) { height: 70%; background: var(--cyan); }

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.5vw, 2.3rem);
}

.site-header nav a {
  position: relative;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: 0;
}

.site-header nav a::after {
  position: absolute;
  right: 0;
  bottom: -.55rem;
  left: 0;
  height: 1px;
  transform: scaleX(0);
  background: var(--mint);
  content: "";
  transition: transform .2s ease;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--text);
}

.site-header nav a:hover::after,
.site-header nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
}

.nav-toggle > span:not(.sr-only) {
  display: block;
  height: 1px;
  margin: 6px 0;
  background: var(--text);
}

.hero,
.section {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(480px, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6.5rem);
  align-items: center;
  min-height: calc(100svh - 70px);
  padding: clamp(5rem, 9vw, 8.5rem) 0 3rem;
}

.hero-copy,
.hero-visual,
.hero-metrics {
  position: relative;
  z-index: 1;
}

.hero-glow {
  position: absolute;
  filter: blur(10px);
  border-radius: 50%;
  pointer-events: none;
}

.hero-glow-one {
  top: 4%;
  right: 9%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(18, 214, 160, .12), transparent 68%);
}

.hero-glow-two {
  right: 34%;
  bottom: 12%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 180, 92, .08), transparent 68%);
}

.eyebrow,
.section-index,
.card-kicker {
  margin: 0 0 1.2rem;
  color: var(--mint);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.eyebrow span {
  width: 26px;
  height: 1px;
  background: var(--mint);
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-size: clamp(3.6rem, 7.4vw, 7rem);
  font-weight: 760;
  letter-spacing: -.075em;
  line-height: .86;
}

h1 > span {
  display: block;
  color: var(--text);
}

h1 small {
  display: block;
  max-width: 680px;
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  font-weight: 480;
  letter-spacing: -.02em;
  line-height: 1.32;
}

.hero-lede {
  max-width: 650px;
  margin: 1.6rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
}

.authors {
  margin: 1.35rem 0 0;
  color: var(--faint);
  font-family: inherit;
  font-size: .78rem;
  letter-spacing: .04em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 46px;
  padding: .65rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  font-size: .78rem;
  font-weight: 720;
}

.button-primary {
  border-color: rgba(18, 214, 160, .36);
  background: var(--mint-soft);
  color: var(--mint);
}

.button-icon {
  color: var(--mint);
  font-size: 1rem;
}

.github-icon {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.arxiv-icon {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.button:not(.is-disabled) {
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.button:not(.is-disabled):hover,
.button:not(.is-disabled):focus-visible {
  border-color: rgba(11, 127, 101, .42);
  background: var(--mint-soft);
  transform: translateY(-1px);
}

.arxiv-button {
  border-color: rgba(179, 27, 27, .26);
  background: rgba(179, 27, 27, .055);
  color: #971b1b;
}

.arxiv-button:hover,
.arxiv-button:focus-visible {
  border-color: rgba(179, 27, 27, .42);
  background: rgba(179, 27, 27, .09);
}

.huggingface-icon {
  color: inherit;
  font-size: 1.12rem;
  line-height: 1;
}

.is-disabled {
  cursor: not-allowed;
  opacity: .78;
}

.hero-visual {
  overflow: hidden;
  min-height: 0;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, #ffffff, #edf4f0);
  box-shadow: var(--shadow);
}

.hero-visual::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 44%, rgba(11,127,101,.08), transparent 42%);
  content: "";
  pointer-events: none;
}

.visual-topline,
.visual-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-family: inherit;
  font-size: .62rem;
  letter-spacing: .13em;
}

.hero-photo-example {
  margin: 1.1rem 0 0;
}

.hero-photo-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ece9e3;
}

.hero-photo-wrap::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, .72);
  content: "";
  pointer-events: none;
}

.hero-photo-wrap img {
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
}

.photo-badge {
  position: absolute;
  z-index: 1;
  top: .75rem;
  padding: .42rem .62rem;
  border: 1px solid rgba(23, 33, 30, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--muted);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  backdrop-filter: blur(8px);
}

.photo-badge-reference {
  left: .75rem;
}

.photo-badge-outcome {
  right: .75rem;
}

.hero-photo-instruction {
  position: absolute;
  z-index: 2;
  bottom: .7rem;
  left: 50%;
  width: min(230px, 44%);
  padding: .58rem .75rem;
  transform: translateX(-50%);
  border: 1px solid rgba(11, 127, 101, .2);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 24px rgba(35, 54, 47, .12);
  text-align: center;
  backdrop-filter: blur(10px);
}

.hero-photo-instruction small,
.hero-photo-instruction strong {
  display: block;
}

.hero-photo-instruction small {
  color: var(--mint);
  font-size: .54rem;
  font-weight: 700;
  letter-spacing: .05em;
}

.hero-photo-instruction strong {
  margin-top: .15rem;
  font-size: .7rem;
  line-height: 1.25;
}

.hero-photo-example figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem .15rem 0;
  color: var(--faint);
  font-size: .68rem;
}

.hero-photo-example figcaption strong {
  color: var(--text);
  text-align: right;
}

.frame-sequence {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 112px 1fr;
  gap: .85rem;
  align-items: center;
  min-height: 340px;
  padding: 1.5rem 0;
}

.concept-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: .82;
  padding: .85rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #edf2ef);
}

.outcome-frame {
  border-color: rgba(255, 180, 92, .42);
  background: linear-gradient(145deg, #fffaf3, #f5ede3);
  box-shadow: inset 0 0 32px rgba(255, 180, 92, .08);
}

.frame-label {
  color: var(--faint);
  font-family: inherit;
  font-size: .58rem;
  letter-spacing: .13em;
}

.concept-frame p {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
}

.banknote {
  position: relative;
  width: 88%;
  aspect-ratio: 1.8;
  margin: auto;
  border: 1px solid rgba(18, 214, 160, .66);
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 44%, rgba(18,214,160,.12) 45% 55%, transparent 56%),
    #dcefe8;
  box-shadow: 0 0 24px rgba(18, 214, 160, .12);
}

.banknote::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(11, 127, 101, .42);
  border-radius: 50%;
  content: "";
}

.banknote span {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(11, 127, 101, .3);
  border-radius: 50%;
}

.banknote span:nth-child(1) { top: 8px; left: 8px; }
.banknote span:nth-child(2) { top: 8px; right: 8px; }
.banknote span:nth-child(3) { right: 8px; bottom: 8px; }

.instruction-node {
  position: relative;
  padding: 1rem .65rem;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  text-align: center;
}

.instruction-node::before,
.instruction-node::after {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--mint), var(--orange));
  content: "";
}

.instruction-node::before { right: 100%; }
.instruction-node::after { left: 100%; }

.instruction-node span {
  display: block;
  color: var(--faint);
  font-size: .54rem;
  letter-spacing: .13em;
}

.instruction-node strong {
  display: block;
  margin-top: .45rem;
  font-size: .78rem;
  line-height: 1.3;
}

.instruction-node i {
  display: block;
  margin-top: .55rem;
  color: var(--orange);
  font-style: normal;
}

.origami {
  position: relative;
  width: 78%;
  aspect-ratio: 1.25;
  margin: auto;
  filter: drop-shadow(0 15px 18px rgba(0,0,0,.32));
}

.origami::before,
.origami::after,
.origami i::before,
.origami i::after {
  position: absolute;
  content: "";
}

.origami::before {
  inset: 22% 16% 12% 16%;
  clip-path: polygon(0 35%, 38% 0, 100% 26%, 77% 100%, 18% 88%);
  background: linear-gradient(135deg, #ffcc83, #ad6730);
}

.origami::after {
  top: 8%;
  right: 3%;
  width: 38%;
  height: 44%;
  clip-path: polygon(0 100%, 18% 18%, 100% 0, 70% 88%);
  background: linear-gradient(145deg, #ffd499, #b87239);
}

.origami i::before {
  bottom: 3%;
  left: 5%;
  width: 28%;
  height: 30%;
  clip-path: polygon(0 0, 100% 30%, 52% 100%);
  background: #c47739;
}

.origami i::after {
  right: 8%;
  bottom: 2%;
  width: 26%;
  height: 28%;
  clip-path: polygon(0 26%, 100% 0, 55% 100%);
  background: #8e552e;
}

.signal-track {
  position: absolute;
  right: 1.1rem;
  bottom: 2.55rem;
  left: 1.1rem;
  height: 1px;
  background: linear-gradient(90deg, var(--mint), rgba(23,33,30,.1), var(--orange));
}

.signal-track i {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 12px var(--mint);
  animation: signal 4s ease-in-out infinite;
}

@keyframes signal {
  0%, 8% { left: 0; box-shadow: 0 0 12px var(--mint); }
  92%, 100% { left: calc(100% - 7px); box-shadow: 0 0 12px var(--orange); }
}

.hero-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 1rem 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-metrics div {
  padding: 1.25rem 1.5rem;
  border-left: 1px solid var(--line);
}

.hero-metrics div:first-child { border-left: 0; }

.hero-metrics dt {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  font-weight: 720;
  letter-spacing: -.04em;
}

.hero-metrics dd {
  margin: .25rem 0 0;
  color: var(--faint);
  font-size: .72rem;
  letter-spacing: .04em;
}

.section {
  padding: clamp(5.5rem, 10vw, 9rem) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(180px, .38fr) minmax(0, 1fr);
  column-gap: clamp(2rem, 6vw, 7rem);
  align-items: start;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.section-heading .section-index {
  grid-row: span 2;
  margin-top: .55rem;
}

.section-heading h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 3.4rem);
  letter-spacing: -.04em;
  line-height: 1.04;
}

.section-heading > p:last-child {
  max-width: 720px;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.principle-card {
  position: relative;
  min-height: 220px;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.principle-card:nth-child(2) {
  background: linear-gradient(145deg, #fffaf4, #f7eee4);
}

.card-number {
  position: absolute;
  top: 1.1rem;
  right: 1.4rem;
  color: rgba(23,33,30,.07);
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
}

.principle-card h3,
.score-card h3,
.result-panel h3 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  letter-spacing: -.035em;
  line-height: 1.1;
}

.principle-card h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}

.principle-card > p:last-child {
  max-width: 480px;
  margin: .85rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.figure-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f1f1ef;
  box-shadow: var(--shadow);
  text-align: left;
}

.figure-card::after {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: inherit;
  content: "";
  transition: border-color .2s ease, background .2s ease;
  pointer-events: none;
}

.figure-card:hover::after,
.figure-card:focus-visible::after {
  border-color: rgba(18,214,160,.6);
  background: rgba(18,214,160,.025);
}

.figure-card img {
  width: 100%;
  height: auto;
}

.figure-card.wide {
  grid-column: 1 / -1;
  margin-top: 1rem;
}

.expand-label {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--text);
  font-size: .72rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.expand-label b {
  color: var(--mint);
}

.domain-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: 1.5rem;
}

.domain-strip span {
  padding: .6rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .04em;
}

.data-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.data-facts article {
  padding: 1.6rem;
  border-left: 1px solid var(--line);
}

.data-facts article:first-child { border-left: 0; }

.data-facts strong,
.result-highlights strong {
  display: block;
  color: var(--mint);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -.04em;
}

.data-facts span {
  display: block;
  margin-top: .35rem;
  color: var(--faint);
  font-size: .73rem;
  line-height: 1.4;
}

.pipeline-layout {
  display: grid;
  grid-template-columns: minmax(300px, .7fr) minmax(0, 1.3fr);
  gap: 1.25rem;
  align-items: start;
}

.pipeline-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline-steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.1rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.pipeline-steps li:first-child { border-top: 0; padding-top: .25rem; }

.pipeline-steps li > span {
  color: var(--mint);
  font-family: inherit;
  font-size: .75rem;
}

.pipeline-steps h3 {
  margin: -.15rem 0 .35rem;
  font-size: 1.05rem;
}

.pipeline-steps p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.pipeline-figure {
  border-color: var(--line);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.score-card {
  padding: clamp(1.6rem, 4vw, 2.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.score-oa {
  background: linear-gradient(145deg, #eef8f4, #ffffff);
}

.score-gr {
  background: linear-gradient(145deg, #fff7ee, #ffffff);
}

.score-card-head {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.75rem;
}

.score-card-head span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(18,214,160,.4);
  border-radius: 13px;
  color: var(--mint);
  font-weight: 850;
}

.score-gr .score-card-head span {
  border-color: rgba(255,180,92,.4);
  color: var(--orange);
}

.score-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .02em;
}

.score-card ul {
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.score-card li {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .75rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.score-card li i {
  color: var(--faint);
  font-family: inherit;
  font-size: .68rem;
  font-style: normal;
}

.formula {
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg-soft);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
  white-space: nowrap;
}

.summary-figure,
.result-figure {
  margin-top: 1.5rem;
}

.result-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.result-highlights article {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.result-highlights span {
  color: var(--faint);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.result-highlights article:nth-child(2) strong { color: var(--orange); }

.result-highlights p {
  margin: .3rem 0 0;
  color: var(--muted);
  font-size: .8rem;
}

.result-panel {
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.result-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.result-panel .card-kicker {
  margin-bottom: .5rem;
}

.metric-tabs {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.metric-tabs button {
  padding: .55rem .85rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .73rem;
  font-weight: 750;
}

.metric-tabs button[aria-selected="true"] {
  background: var(--mint-soft);
  color: var(--mint);
}

.bar-chart {
  display: grid;
  gap: .85rem;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(160px, 3fr) 64px;
  gap: 1rem;
  align-items: center;
}

.chart-row > span {
  overflow: hidden;
  color: var(--muted);
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-row > div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23,33,30,.08);
}

.chart-row i {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #078868, var(--mint));
  transition: width .55s cubic-bezier(.22,.7,.23,1), background .2s ease;
}

.chart-row.is-best i {
  box-shadow: 0 0 16px rgba(18,214,160,.32);
}

.chart-row b {
  font-family: inherit;
  font-size: .75rem;
  text-align: right;
}

.result-panel[data-active-metric="gr"] .chart-row i {
  background: linear-gradient(90deg, #a55f24, var(--orange));
}

.chart-note {
  margin: 1.5rem 0 0;
  color: var(--faint);
  font-size: .72rem;
}

.takeaway {
  width: 100%;
  max-width: none;
  padding-inline: max(1.25rem, calc((100% - var(--max)) / 2));
  background: linear-gradient(135deg, rgba(11,127,101,.08), rgba(57,127,165,.025) 50%, rgba(185,106,45,.07));
}

.takeaway-inner {
  max-width: 980px;
}

.takeaway blockquote {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5.8rem);
  font-weight: 650;
  letter-spacing: -.06em;
  line-height: .98;
}

.takeaway-inner > p:last-child {
  max-width: 680px;
  margin: 2rem 0 0;
  color: var(--muted);
}

.citation-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.citation-box pre {
  margin: 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  overflow-x: auto;
  color: #29443c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(.72rem, 1.4vw, .9rem);
  line-height: 1.8;
}

.copy-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: .55rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: .7rem;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: .7rem;
}

.site-footer p { margin: 0; text-align: center; }
.site-footer > a:last-child { justify-self: end; }

.figure-dialog {
  width: min(94vw, 1400px);
  max-height: 92vh;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #edf0ed;
  box-shadow: 0 30px 100px rgba(0,0,0,.7);
  color: #111;
}

.figure-dialog::backdrop {
  background: rgba(23,33,30,.68);
  backdrop-filter: blur(10px);
}

.figure-dialog img {
  width: 100%;
}

.figure-dialog p {
  margin: 0;
  padding: 1rem 1.25rem;
  border-top: 1px solid #ccd2cf;
  color: #42504c;
  font-size: .82rem;
}

.dialog-close {
  position: fixed;
  z-index: 3;
  top: max(1rem, 4vh);
  right: max(1rem, 4vw);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(23,33,30,.88);
  color: white;
  font-size: 1.4rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy { max-width: 760px; }
  .hero-visual { min-height: 0; }
  .section-heading { grid-template-columns: 1fr; }
  .section-heading .section-index { grid-row: auto; }
  .pipeline-layout { grid-template-columns: 1fr; }
  .pipeline-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1.5rem; }
  .result-highlights { grid-template-columns: 1fr 1fr; }
  .result-highlights article:last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .site-header { min-height: 64px; }
  .nav-toggle { display: block; }
  .site-header nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: .75rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--line);
    background: rgba(247, 248, 246, .98);
  }

  .site-header nav.is-open { display: flex; }
  .site-header nav a { width: 100%; padding: .8rem 0; }
  .hero, .section { width: min(100% - 1.5rem, var(--max)); }
  .hero { padding-top: 4rem; gap: 2.5rem; }
  h1 { font-size: clamp(3.1rem, 17vw, 5rem); }
  .hero-visual { min-height: 0; padding: .9rem; }
  .hero-photo-wrap img { aspect-ratio: 2.2 / 1; }
  .hero-photo-instruction { bottom: .45rem; width: 54%; padding: .45rem .55rem; }
  .photo-badge { top: .45rem; padding: .35rem .5rem; font-size: .56rem; }
  .photo-badge-reference { left: .45rem; }
  .photo-badge-outcome { right: .45rem; }
  .frame-sequence { grid-template-columns: 1fr 70px 1fr; min-height: 280px; gap: .45rem; }
  .instruction-node { padding: .7rem .25rem; }
  .instruction-node strong { font-size: .63rem; }
  .visual-footer { flex-direction: column; gap: .25rem; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  .hero-metrics div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .hero-metrics div:nth-child(4) { border-top: 1px solid var(--line); }
  .problem-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-grid { grid-template-columns: 1fr; }
  .principle-card { min-height: 205px; padding: 1.05rem; }
  .principle-card h3 { font-size: 1.18rem; }
  .principle-card > p:last-child { font-size: .8rem; line-height: 1.48; }
  .principle-card .card-number { font-size: 4.5rem; }
  .data-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .data-facts article { padding: 1.1rem .7rem; }
  .data-facts strong { font-size: clamp(1.35rem, 5vw, 2rem); }
  .data-facts span { font-size: .64rem; line-height: 1.35; }
  .pipeline-steps { grid-template-columns: 1fr; }
  .result-panel-head { align-items: stretch; flex-direction: column; }
  .metric-tabs { align-self: flex-start; }
  .chart-row { grid-template-columns: 118px minmax(80px, 1fr) 54px; gap: .7rem; }
  .chart-row > span { font-size: .67rem; }
  .result-highlights { grid-template-columns: 1fr; }
  .result-highlights article:last-child { grid-column: auto; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .site-footer .brand, .site-footer > a:last-child { justify-self: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .problem-grid { gap: .5rem; }
  .principle-card { min-height: 190px; padding: .8rem; }
  .principle-card h3 { font-size: 1.02rem; }
  .principle-card > p:last-child { margin-top: .65rem; font-size: .7rem; line-height: 1.45; }
  .principle-card .card-kicker { margin-bottom: .7rem; font-size: .58rem; letter-spacing: .03em; }
  .principle-card .card-number { top: .7rem; right: .75rem; font-size: 3.8rem; }
  .button { width: 100%; justify-content: center; }
  .frame-sequence { grid-template-columns: 1fr; }
  .hero-photo-wrap img { aspect-ratio: 1.72 / 1; }
  .photo-badge { font-size: .5rem; }
  .hero-photo-instruction { width: 62%; }
  .hero-photo-example figcaption { flex-direction: column; gap: .2rem; }
  .hero-photo-example figcaption strong { text-align: left; }
  .instruction-node { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
  .instruction-node strong br { display: none; }
  .instruction-node::before, .instruction-node::after { display: none; }
  .concept-frame { aspect-ratio: 1.5; }
  .banknote { width: 64%; }
  .origami { width: 54%; }
  .signal-track { display: none; }
  .visual-footer { margin-top: .5rem; }
  .copy-button { position: static; margin: 0 0 1rem 1rem; }
  .data-facts article { padding: .85rem .45rem; }
  .data-facts strong { font-size: 1.25rem; }
  .data-facts span { font-size: .58rem; line-height: 1.3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
