/* ==========================================================================
   BiCAT project page
   Palette follows the paper: teal = left arm, orange = right arm.
   ========================================================================== */
:root {
  --teal: #1F6676;
  --teal-2: #2B8597;
  --teal-light: #6FC3D2;      /* teal for dark surfaces */
  --orange: #C96A2B;
  --orange-light: #F0A06A;    /* orange for dark surfaces */
  --bi: #4a9aab;              /* wordmark "Bi" */
  --cat: #E0874A;             /* wordmark "CAT" */
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --line: #d2d2d7;
  --context: #8E8E93;         /* baselines in charts */
  --context-2: #C7C7CC;
  --dark: #000000;
  --dark-2: #161617;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.25,.1,.25,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 17px; line-height: 1.5; letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--teal-2); text-decoration: none; }
a:hover { text-decoration: underline; }
sup { font-size: .62em; line-height: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--teal-2); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--maxw), calc(100% - 44px)); margin: 0 auto; }
.wrap.narrow { width: min(820px, calc(100% - 44px)); }
.section { padding: 120px 0; }
.section.soft { background: var(--bg-soft); }
.section.dark { background: var(--dark); color: #f5f5f7; }

/* ---------- type ---------- */
.eyebrow { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--orange); margin: 0 0 12px; }
.dark .eyebrow { color: var(--orange-light); }
.headline { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.06; font-weight: 700; letter-spacing: -0.028em; margin: 0 0 20px; }
.headline .muted { color: var(--ink-3); }
.dark .headline .muted { color: #86868b; }
.lede { font-size: clamp(19px, 1.9vw, 24px); line-height: 1.42; color: var(--ink-2); font-weight: 500; max-width: 760px; margin: 0; letter-spacing: -0.016em; }
.dark .lede { color: #a1a1a6; }
.lede strong { color: var(--ink); font-weight: 600; }
.dark .lede strong { color: #f5f5f7; }
.sub-h { font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -0.022em; line-height: 1.12; margin: 0 0 10px; }
.section-head { margin-bottom: 56px; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.l { color: var(--teal-2); font-weight: 600; }
.r { color: var(--orange); font-weight: 600; }
.dark .l { color: var(--teal-light); }
.dark .r { color: var(--orange-light); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: 52px;
  background: rgba(251,251,253,.78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.nav-inner { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.nav-brand { justify-self: start; display: inline-flex; align-items: center; height: 100%; font-weight: 800; font-size: 21px; line-height: 1; letter-spacing: -0.03em; }
.nav-brand:hover { text-decoration: none; }
.nav-brand .bi { color: var(--teal); } .nav-brand .cat { color: var(--orange); }
.nav-links { display: flex; align-items: center; gap: 30px; height: 100%; }
.nav-links a { display: inline-flex; align-items: center; height: 100%; color: var(--ink); font-size: 13px; line-height: 1; opacity: .78; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-cta { justify-self: end; display: inline-flex; align-items: center; height: 30px; font-size: 13px; font-weight: 600; line-height: 1; padding: 0 15px; border-radius: 999px; background: rgba(0,0,0,.06); color: var(--ink); }
.nav-cta:hover { background: rgba(0,0,0,.1); text-decoration: none; }
.nav-lab { justify-self: end; display: inline-flex; align-items: center; height: 100%; }
.nav-lab:hover { opacity: .8; }
.nav-lab img { height: 17px; width: auto; display: block; }
@media (max-width: 780px) { .nav-links { display: none; } .nav-inner { grid-template-columns: 1fr auto; } .nav-lab img { height: 14px; } }

/* ---------- hero ---------- */
.hero { padding: 40px 0 76px; text-align: center; background: radial-gradient(1200px 520px at 50% -10%, rgba(43,133,151,.10), transparent 60%), radial-gradient(900px 420px at 85% 10%, rgba(201,106,43,.08), transparent 60%), #fbfbfd; }
.hero-eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.045); margin-bottom: 26px; }
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-2); box-shadow: 10px 0 0 var(--orange); margin-right: 10px; }
.title-stage { --fs: clamp(76px, 15vw, 188px); position: relative; margin: calc(var(--fs) * .42) auto 0; width: max-content; max-width: 100%; }
.hero-title {
  font-size: var(--fs); line-height: .92; font-weight: 800; letter-spacing: -0.055em; margin: 0; padding-right: .04em;
  background: linear-gradient(92deg, var(--teal) 0%, var(--teal-2) 34%, #7c8a7c 52%, var(--orange) 72%, #b85a1f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-sub { font-size: clamp(24px, 3.2vw, 40px); font-weight: 650; letter-spacing: -0.025em; margin: 18px 0 30px; line-height: 1.15; }
.hero-tag { font-size: clamp(18px, 1.8vw, 22px); color: var(--ink-2); margin: 0 auto 34px; max-width: 680px; line-height: 1.45; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; font-size: 18px; font-weight: 500; }
.authors a { color: var(--ink); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; text-decoration-thickness: 1.5px; transition: color .2s var(--ease), text-decoration-color .2s var(--ease); }
.authors a:hover, .authors a:focus-visible { color: #3d9cf0; text-decoration-color: currentColor; }
.affil { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 14px 0 6px; color: var(--ink-2); font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.affil img { height: 46px; width: auto; }
.affil-note { font-size: 13px; color: var(--ink-3); margin: 0; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; border: 0; cursor: pointer; transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-light { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px #d2d2d7, 0 1px 2px rgba(0,0,0,.04); }
.btn-light:hover { background: #f5f5f7; box-shadow: inset 0 0 0 1px #c2c2c7, 0 6px 16px rgba(0,0,0,.06); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.btn-ghost { background: rgba(0,0,0,.06); color: var(--ink); }
.btn-ghost:hover { background: rgba(0,0,0,.1); }
.btn-disabled { background: transparent; color: var(--ink-3); border: 1px dashed var(--line); cursor: default; }
.btn-disabled:hover { transform: none; }

/* ---------- reel (dark) ---------- */
.reel-section { background: #fff; color: var(--ink); padding: 104px 0 40px; }
.reel { display: grid; grid-template-columns: 1.3333fr .75fr 1.3333fr; gap: 14px; margin-top: 44px; }
.reel figure { margin: 0; position: relative; }
.media { position: relative; border-radius: var(--radius-md); overflow: hidden; background: #1c1c1e; }
.media video, .media img { width: 100%; height: 100%; object-fit: cover; }
.reel .media.land { aspect-ratio: 4 / 3; }
.reel .media.port { aspect-ratio: 3 / 4; }
.chip {
  position: absolute; left: 12px; top: 12px; z-index: 2; font-size: 12.5px; font-weight: 600; letter-spacing: 0;
  padding: 5px 11px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.chip b { font-weight: 700; }
.speed-badge { position: absolute; right: 12px; top: 12px; z-index: 2; font: 600 11.5px var(--font); padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.reel-caption { color: var(--ink-3); font-size: 14px; margin-top: 16px; text-align: center; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 88px 0 0; border-top: 1px solid #e5e5ea; }
.stat { padding: 36px 26px 8px 0; }
.stat + .stat { padding-left: 26px; border-left: 1px solid #e5e5ea; }
.stat-num { font-size: clamp(40px, 5vw, 64px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-num small { font-size: .45em; letter-spacing: -0.01em; font-weight: 600; margin-left: 2px; }
.stat-num.grad { background: linear-gradient(92deg, var(--teal-2), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--ink-2); font-size: 15px; margin-top: 12px; line-height: 1.4; }
.stat-label strong { color: var(--ink); font-weight: 600; }

.teaser-block { padding: 72px 0 110px; }
.teaser-block img { width: 100%; border-radius: var(--radius-md); }
.fig-cap { font-size: 15px; color: var(--ink-2); line-height: 1.55; margin: 18px auto 0; max-width: 900px; text-align: center; }
.dark .fig-cap { color: #a1a1a6; }
.fig-cap strong { color: var(--ink); }
.dark .fig-cap strong { color: #f5f5f7; }
.fig-cap a { white-space: nowrap; }
.dark a { color: var(--teal-light); }

/* ---------- abstract ---------- */
.abstract p { font-size: 19px; line-height: 1.68; color: #333336; margin: 0; letter-spacing: -0.01em; text-align: justify; hyphens: auto; }
.abstract p strong { color: var(--ink); }

/* ---------- idea: tokenization comparison ---------- */
.idea-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.idea-card { background: #fff; border-radius: var(--radius-lg); padding: 32px 30px 30px; display: flex; flex-direction: column; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.idea-card.ours { background: linear-gradient(180deg, #ffffff, #ffffff), #fff; box-shadow: 0 0 0 2px var(--teal-2), 0 20px 50px rgba(31,102,118,.14); }
.idea-kicker { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.idea-card.ours .idea-kicker { color: var(--teal-2); }
.idea-card h3 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 22px; line-height: 1.15; }
.idea-card p { margin: 22px 0 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.idea-card p strong { color: var(--ink); }
.tokviz { position: relative; height: 128px; border-radius: var(--radius-sm); background: var(--bg-soft); padding: 18px 16px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.tokrow { display: flex; gap: 6px; align-items: center; }
.tokrow .lab { width: 18px; font: 700 11px var(--font); color: var(--ink-3); flex: none; text-align: center; }
.tok { flex: 1; height: 26px; border-radius: 6px; opacity: 0; transform: translateY(6px) scale(.9); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.in-view .tok { opacity: 1; transform: none; }
.tok.mix { background: linear-gradient(135deg, var(--teal-2) 0 50%, var(--orange) 50% 100%); }
.tok.tl { background: var(--teal-2); } .tok.tr { background: var(--orange); }
.tok.tl.s1 { background: #8cc5d0; } .tok.tl.s2 { background: #1F6676; } .tok.tl.s3 { background: #4ea3b3; }
.tok.tr.s1 { background: #efb48b; } .tok.tr.s2 { background: #a9541d; } .tok.tr.s3 { background: #dc8a52; }
.tokviz .links { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tokviz .links line { stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 3 3; opacity: 0; transition: opacity .6s .5s; }
.in-view .tokviz .links line { opacity: .75; }
.tokviz .wall { position: absolute; left: 40px; right: 16px; top: 50%; border-top: 1.5px dashed #c9c9ce; }
.wall-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: var(--bg-soft); padding: 0 6px; font: 700 13px var(--font); color: #b0b0b5; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pill { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); }
.pill.good { background: rgba(43,133,151,.1); color: var(--teal); }
.pill.bad { background: rgba(0,0,0,.04); color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }

/* ---------- method ---------- */
.figure-card { background: #fff; border-radius: var(--radius-lg); padding: 26px; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 24px 60px rgba(0,0,0,.06); }
.figure-card img { width: 100%; border-radius: 10px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.step { background: #fff; border-radius: var(--radius-lg); padding: 30px 28px; }
.step-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; background: var(--ink); margin-bottom: 18px; }
.step:nth-child(1) .step-num { background: var(--teal); }
.step:nth-child(2) .step-num { background: linear-gradient(135deg, var(--teal-2) 50%, var(--orange) 50%); }
.step:nth-child(3) .step-num { background: var(--orange); }
.step h3 { font-size: 21px; letter-spacing: -0.018em; margin: 0 0 10px; line-height: 1.2; }
.step p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.52; }
.step p em { font-style: normal; font-family: var(--mono); font-size: 13.5px; background: var(--bg-soft); padding: 1px 6px; border-radius: 5px; color: var(--ink); }

/* ---------- gallery (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.bento figure { margin: 0; }
.bento .b-wide { grid-column: span 6; }
.bento .b-tall { grid-column: span 3; }
.bento .b-third { grid-column: span 4; }
.bento .row1 .media { height: 100%; }
.bento .r1 { aspect-ratio: auto; height: clamp(260px, 32vw, 400px); }
.bento .r2 { aspect-ratio: 4 / 3; }
.bento figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.bento figcaption b { color: var(--ink); font-weight: 600; }
.dark .bento figcaption { color: #a1a1a6; }
.dark .bento figcaption b { color: #f5f5f7; }

/* ---------- comparison player ---------- */
.seg-wrap { display: flex; justify-content: center; margin-bottom: 34px; }
.seg { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; background: #e8e8ed; border-radius: 999px; }
.seg button {
  font: 600 14px var(--font); letter-spacing: -0.01em; color: var(--ink); background: transparent; border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), box-shadow .25s;
}
.seg button .robot { color: var(--ink-3); font-weight: 500; margin-right: 5px; }
.seg button[aria-selected="true"] { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.seg button:hover:not([aria-selected="true"]) { background: rgba(255,255,255,.55); }
.seg button.extra { color: var(--ink-2); }

.cmp { background: #fff; border-radius: var(--radius-lg); padding: 34px; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 24px 60px rgba(0,0,0,.06); }
.cmp-head { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: end; margin-bottom: 28px; }
.cmp-robot { font-size: 13.5px; font-weight: 600; color: var(--orange); margin-bottom: 6px; }
.cmp-title { font-size: clamp(28px, 3vw, 40px); font-weight: 700; letter-spacing: -0.026em; margin: 0 0 8px; line-height: 1.08; }
.cmp-desc { color: var(--ink-2); font-size: 17px; margin: 0; }
.cmp-note { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.sr-bars { display: grid; gap: 9px; }
.sr-row { display: grid; grid-template-columns: 92px 1fr 52px; align-items: center; gap: 12px; font-size: 14px; }
.sr-row .name { font-weight: 600; color: var(--ink-2); }
.sr-row.ours .name { color: var(--teal); }
.sr-track { height: 10px; border-radius: 0 4px 4px 0; background: transparent; position: relative; }
.sr-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--context); width: 0; transition: width .8s var(--ease); }
.sr-row.ours .sr-fill { background: var(--teal-2); }
.sr-row.fast .sr-fill { background: var(--context-2); }
.sr-row .val { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; color: var(--ink); }
.sr-axis { font-size: 12px; color: var(--ink-3); text-align: right; margin-top: 2px; }

.cmp-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin: 0 auto; }
.cmp-grid.port { max-width: 820px; }
.cmp-grid.two { grid-template-columns: repeat(2, 1fr); }
.vcard { margin: 0; }
.vcard .media { aspect-ratio: 4 / 3; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.cmp-grid.port .vcard .media { aspect-ratio: 3 / 4; }
.cmp-grid.wide .vcard .media { aspect-ratio: 16 / 9; }
.vcard.ours .media { box-shadow: 0 0 0 3px var(--teal-2); }
.vcard .media video { object-fit: contain; background: #000; }
.vlabel { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; font-size: 15px; }
.vlabel .m { font-weight: 700; letter-spacing: -0.01em; }
.vcard.ours .vlabel .m { color: var(--teal); }
.vlabel .s { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 14px; }
.vprog { height: 3px; background: rgba(255,255,255,.25); position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; }
.vprog i { display: block; height: 100%; width: 0; background: #fff; }
.vcard.ours .vprog i { background: var(--teal-light); }
.done-badge { position: absolute; right: 12px; bottom: 14px; z-index: 2; font: 600 12px var(--font); color: #fff; background: rgba(0,0,0,.55); padding: 4px 10px; border-radius: 999px; opacity: 0; transition: opacity .3s; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ended .done-badge { opacity: 1; }

.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 26px; padding-top: 22px; border-top: 1px solid #ececf0; }
.ctl-group { display: flex; align-items: center; gap: 8px; }
.ctl { white-space: nowrap; font: 600 14px var(--font); height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--bg-soft); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background .2s; }
.ctl:hover { background: #e8e8ed; }
.ctl.primary { background: var(--ink); color: #fff; }
.ctl.primary:hover { background: #000; }
.ctl svg { width: 14px; height: 14px; }
.speed { display: inline-flex; background: var(--bg-soft); border-radius: 999px; padding: 3px; }
.speed button { font: 600 13px var(--font); border: 0; background: transparent; border-radius: 999px; padding: 7px 12px; cursor: pointer; color: var(--ink-2); }
.speed button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.ctl-hint { font-size: 13px; color: var(--ink-3); max-width: 520px; line-height: 1.45; }

.rw-summary { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-top: 20px; }
.panel { background: #fff; border-radius: var(--radius-lg); padding: 30px 32px; }
.panel h3 { font-size: 21px; margin: 0 0 4px; letter-spacing: -0.018em; }
.panel .panel-sub { font-size: 14px; color: var(--ink-2); margin: 0 0 22px; }
.big-row { display: grid; grid-template-columns: 110px 1fr 86px; gap: 14px; align-items: center; margin: 14px 0; font-size: 15px; }
.big-row .name { font-weight: 600; color: var(--ink-2); }
.big-row.ours .name { color: var(--teal); }
.big-row .track { height: 14px; position: relative; }
.big-row .fill { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; background: var(--context); width: 0; transition: width 1s var(--ease); }
.big-row.ours .fill { background: var(--teal-2); }
.big-row.fast .fill { background: var(--context-2); }
.big-row .val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.big-row .val small { font-weight: 500; color: var(--ink-3); }
.panel-foot { font-size: 12.5px; color: var(--ink-3); margin: 18px 0 0; line-height: 1.45; }

/* ---------- charts ---------- */
.chart-card { background: #fff; border-radius: var(--radius-lg); padding: 32px; position: relative; }
.chart-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.chart-top h3 { font-size: 21px; margin: 0; letter-spacing: -0.018em; }
.chart-top p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.seg.small { background: var(--bg-soft); }
.seg.small button { font-size: 13px; padding: 7px 13px; }
.hbar { display: grid; grid-template-columns: 116px 1fr; gap: 6px 16px; align-items: center; }
.hbar .n { font-size: 14px; font-weight: 600; color: var(--ink-2); text-align: right; white-space: nowrap; }
.hbar .n.ours { color: var(--teal); }
.hbar .t { position: relative; height: 22px; }
.hbar .f { position: absolute; left: 0; top: 4px; bottom: 4px; border-radius: 0 4px 4px 0; background: var(--context); transition: width .7s var(--ease); }
.hbar .f.ours { background: var(--teal-2); }
.hbar .v { position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; transition: left .7s var(--ease); padding-left: 8px; }
.hbar .v .d { color: var(--teal-2); margin-left: 6px; }
.hbar .v .d.neg { color: var(--ink-3); }
.hbar-axis { display: grid; grid-template-columns: 116px 1fr; gap: 16px; margin-top: 6px; }
.hbar-axis .ticks { position: relative; height: 18px; border-top: 1px solid #e5e5ea; }
.hbar-axis .ticks span { position: absolute; top: 4px; transform: translateX(-50%); font-size: 11.5px; color: var(--ink-3); }
.chart-note { font-size: 13px; color: var(--ink-3); margin: 16px 0 0; line-height: 1.5; }
.tooltip { position: fixed; z-index: 80; pointer-events: none; background: rgba(29,29,31,.94); color: #fff; font-size: 13px; line-height: 1.45; padding: 8px 11px; border-radius: 10px; opacity: 0; transition: opacity .12s; max-width: 260px; }
.tooltip b { font-weight: 700; }
.tooltip.show { opacity: 1; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.scatter svg { width: 100%; height: auto; overflow: visible; }
.scatter .grid line { stroke: #ececf0; }
.scatter .axis text { font: 11.5px var(--font); fill: var(--ink-3); }
.scatter .axis-title { font: 600 12px var(--font); fill: var(--ink-2); }
.scatter .pt { fill: var(--context); stroke: #fff; stroke-width: 2; cursor: default; }
.scatter .pt.ours { fill: var(--teal-2); }
.scatter .pl { font: 600 12px var(--font); fill: var(--ink-2); }
.scatter .pl.ours { fill: var(--teal); font-size: 13.5px; font-weight: 700; }
.scatter .hit { fill: transparent; cursor: default; }

.table-toggle { margin-top: 22px; }
.table-toggle summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--teal-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.table-toggle summary::-webkit-details-marker { display: none; }
.table-toggle summary::after { content: "›"; transform: rotate(90deg); transition: transform .2s; display: inline-block; font-size: 18px; }
.table-toggle[open] summary::after { transform: rotate(-90deg); }
.table-scroll { overflow-x: auto; margin-top: 16px; -webkit-overflow-scrolling: touch; }
table.data { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; min-width: 860px; }
table.data th, table.data td { padding: 9px 8px; text-align: center; border-bottom: 1px solid #ececf0; }
table.data thead th { font-weight: 600; color: var(--ink-2); font-size: 12px; vertical-align: bottom; line-height: 1.3; }
table.data thead tr:first-child th { color: var(--ink); font-size: 12.5px; }
table.data tbody th { text-align: left; font-weight: 600; white-space: nowrap; }
table.data tr.ours { background: rgba(43,133,151,.07); }
table.data tr.ours th { color: var(--teal); }
table.data td.best { font-weight: 700; color: var(--ink); }
table.data td.second { text-decoration: underline; text-underline-offset: 3px; }
table.data td.mean { font-weight: 700; }

.analysis img { width: 100%; }

/* ---------- limitation / bibtex / resources ---------- */
.note-card { background: #fff; border-radius: var(--radius-lg); padding: 30px 32px; }
.note-card h3 { margin: 0 0 10px; font-size: 19px; }
.note-card p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.bib { position: relative; background: #1d1d1f; color: #f5f5f7; border-radius: var(--radius-md); padding: 26px 28px; font: 14px/1.65 var(--mono); overflow-x: auto; white-space: pre; margin: 0; }
.copy-btn { position: absolute; z-index: 2; top: 14px; right: 14px; font: 600 13px var(--font); border: 0; border-radius: 999px; padding: 7px 14px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.copy-btn:hover { background: rgba(255,255,255,.2); }
.bib-wrap { position: relative; }
.bib-note { font-size: 13px; color: var(--ink-3); margin: 12px 0 0; }
.res-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.res-list a { font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.res-list a:hover { text-decoration: none; box-shadow: inset 0 0 0 1px var(--ink-3); }

.footer { padding: 40px 0 56px; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid #e5e5ea; background: var(--bg-soft); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.footer a { color: var(--ink-2); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .idea-grid, .steps { grid-template-columns: 1fr; }
  .cmp-head { grid-template-columns: 1fr; gap: 22px; }
  .rw-summary, .two-col { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid #e5e5ea; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 84px 0; }
  .hero { padding: 64px 0 56px; }
  .reel { grid-template-columns: 1fr 1fr; }
  .reel figure:nth-child(2) { grid-row: span 2; }
  .reel figure:nth-child(2) .media { aspect-ratio: auto; height: 100%; }
  .bento .b-wide, .bento .b-third { grid-column: span 12; }
  .bento .b-tall { grid-column: span 6; }
  .bento .r1.port-crop { height: auto; aspect-ratio: 3 / 4; }
  .cmp { padding: 22px 16px; border-radius: 22px; }
  .cmp-grid, .cmp-grid.two { grid-template-columns: 1fr; }
  .cmp-grid.port { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cmp-grid.port .vlabel { flex-direction: column; font-size: 13px; }
  .hbar, .hbar-axis { grid-template-columns: 88px 1fr; gap: 6px 10px; }
  .hbar .n { font-size: 12.5px; }
  .chart-card, .panel, .note-card { padding: 24px 18px; }
  .abstract p { text-align: left; font-size: 17.5px; }
  .stat { padding-right: 12px; }
  .stat + .stat { padding-left: 14px; }
  .stat:nth-child(3) { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .tok { opacity: 1; transform: none; transition: none; }
}

/* leave room for value labels at the end of bars */
.hbar .t, .hbar-axis .ticks { margin-right: 92px; }
.idea-card p em { font-style: normal; font-family: var(--mono); font-size: 13px; background: var(--bg-soft); padding: 1px 6px; border-radius: 5px; color: var(--ink); white-space: nowrap; }

.hbar.wide-l, .hbar-axis.wide-l { grid-template-columns: 168px 1fr; }
@media (max-width: 760px) { .hbar.wide-l, .hbar-axis.wide-l { grid-template-columns: 128px 1fr; } .hbar.wide-l .n { white-space: normal; line-height: 1.15; } }

/* ---------- dark comparison section ---------- */
.dark .seg { background: #1d1d1f; }
.dark .seg button { color: #f5f5f7; }
.dark .seg button .robot { color: #8e8e93; }
.dark .seg button[aria-selected="true"] { background: #48484a; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.dark .seg button:hover:not([aria-selected="true"]) { background: #2c2c2e; }
.dark .cmp, .dark .panel { background: #161617; box-shadow: none; border: 1px solid #262628; }
.dark .cmp-robot { color: var(--orange-light); }
.dark .cmp-title, .dark .panel h3 { color: #f5f5f7; }
.dark .cmp-desc, .dark .panel .panel-sub { color: #a1a1a6; }
.dark .sr-row .name, .dark .big-row .name { color: #a1a1a6; }
.dark .sr-row.ours .name, .dark .big-row.ours .name, .dark .vcard.ours .vlabel .m { color: var(--teal-light); }
.dark .sr-row .val, .dark .big-row .val, .dark .vlabel .m { color: #f5f5f7; }
.dark .sr-row.ours .sr-fill, .dark .big-row.ours .fill { background: var(--bi); }
.dark .sr-row.fast .sr-fill, .dark .big-row.fast .fill { background: #5a5a5e; }
.dark .sr-axis, .dark .panel-foot, .dark .ctl-hint, .dark .big-row .val small { color: #86868b; }
.dark .vlabel .s { color: #a1a1a6; }
.dark .vcard .media { box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.dark .vcard.ours .media { box-shadow: 0 0 0 3px var(--bi); }
.dark .controls { border-top-color: #2c2c2e; }
.dark .ctl { background: #2c2c2e; color: #f5f5f7; }
.dark .ctl:hover { background: #3a3a3c; }
.dark .ctl.primary { background: #f5f5f7; color: #1d1d1f; }
.dark .ctl.primary:hover { background: #fff; }
.dark .speed { background: #2c2c2e; }
.dark .speed button { color: #a1a1a6; }
.dark .speed button[aria-pressed="true"] { background: #636366; color: #fff; }

@media (prefers-reduced-motion: reduce) {
}

/* ================= all-white theme ================= */
.section.soft, .section.dark { background: #fff; color: var(--ink); }
.footer { background: #fff; }
.idea-card, .figure-card, .step, .cmp, .panel, .chart-card, .note-card {
  background: #fff; border: 1px solid #e8e8ed; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 14px 36px rgba(0,0,0,.05);
}
.idea-card.ours { border-color: transparent; box-shadow: 0 0 0 2px var(--teal-2), 0 20px 50px rgba(31,102,118,.12); }
.media { background: #f5f5f7; }
.vcard .media video { background: #f5f5f7; }
.bib { background: #f5f5f7; color: var(--ink); border: 1px solid #e8e8ed; }
.copy-btn { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px #d2d2d7; }
.copy-btn:hover { background: #f0f0f3; }
.ctl.primary { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px #d2d2d7; }
.ctl.primary:hover { background: #f5f5f7; }

/* ---------- hero teaser video ---------- */
.hero-video { margin: 56px auto 0; max-width: 1180px; }
.hv-frame { position: relative; border-radius: 22px; overflow: hidden; background: #0b0b0c; aspect-ratio: 16 / 9; box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 30px 70px rgba(0,0,0,.14); }
.hv-frame video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.hv-controls { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 8px; z-index: 2; }
.hv-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(30,30,32,.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .2s, transform .2s; }
.hv-btn:hover { background: rgba(30,30,32,.75); transform: scale(1.05); }
.hv-btn svg { width: 18px; height: 18px; }
.hv-btn .i-play, .hv-btn .i-sound { display: none; }
.hv-paused #hv-play .i-play { display: block; } .hv-paused #hv-play .i-pause { display: none; }
#hv-sound[aria-pressed="true"] .i-sound { display: block; } #hv-sound[aria-pressed="true"] .i-muted { display: none; }
.reel-section { padding: 72px 0 40px; }
.reel-section .stats { margin-top: 0; }
@media (max-width: 760px) { .hero-video { margin-top: 36px; } .hv-frame { border-radius: 14px; } .hv-controls { right: 10px; bottom: 10px; } .hv-btn { width: 34px; height: 34px; } }

/* teaser film sits on its own black band */
.film { background: #000; padding: 80px 0; }
.film .hero-video { margin: 0 auto; }
.film .hv-frame { box-shadow: none; background: #000; }
@media (max-width: 760px) { .film { padding: 40px 0; } }

/* rollout outcome shown when a comparison clip ends */
.done-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; padding: 5px 11px 5px 9px; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.ended .done-badge { transform: none; }
.done-badge svg { width: 13px; height: 13px; }
.done-badge.success { background: rgba(36, 161, 72, .94); }
.done-badge.failed { background: rgba(224, 49, 49, .94); }

/* ---------- cartoon kittens resting on the wordmark (positions refined in main.js) ---------- */
.kit { position: absolute; z-index: 2; top: calc(var(--fs) * .125); pointer-events: none; }
.kit-svg { display: block; width: 100%; height: auto; overflow: visible; }
.kit-l { width: calc(var(--fs) * .5); min-width: 48px; left: 0; transform: translateY(-96%); }
.kit-r { width: calc(var(--fs) * .3); min-width: 30px; right: calc(var(--fs) * .1); transform: translateY(-96.3%); }
.kit .kit-breath, .kit .kit-head, .kit .kit-tail, .kit .ear-r { transform-box: view-box; }
.kit .eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: kit-blink 5.2s infinite; }
.kit-r .eyes { animation-delay: -2.4s; }
.kit-l .kit-breath { transform-origin: 100px 140px; animation: kit-breathe 3.6s ease-in-out infinite; }
.kit-r .kit-breath { transform-origin: 76px 180px; animation: kit-breathe 3.1s ease-in-out infinite; }
.kit-l .kit-head { transform-origin: 142px 104px; animation: kit-tilt-l 7s ease-in-out infinite; }
.kit-r .kit-head { transform-origin: 76px 110px; animation: kit-tilt-r 6s ease-in-out infinite; }
.kit-l .ear-r { transform-origin: 172px 44px; animation: kit-ear 6.5s infinite; }
.kit-r .ear-r { transform-origin: 104px 46px; animation: kit-ear 5.4s infinite 1.8s; }
.kit-r .kit-tail { transform-origin: 58px 170px; animation: kit-tail 2.6s ease-in-out infinite alternate; }
@keyframes kit-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes kit-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.008, 1.025); } }
@keyframes kit-tilt-l { 0%, 100% { transform: rotate(0deg); } 45%, 60% { transform: rotate(-5deg); } }
@keyframes kit-tilt-r { 0%, 100% { transform: rotate(0deg); } 40%, 55% { transform: rotate(6deg); } }
@keyframes kit-ear { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-12deg); } 95% { transform: rotate(4deg); } }
@keyframes kit-tail { from { transform: rotate(-6deg); } to { transform: rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .kit .eyes, .kit .kit-breath, .kit .kit-head, .kit .ear-r, .kit .kit-tail { animation: none !important; } }

/* ---------- teaser progress bar: thin while idle, scrubbable on hover ---------- */
.hv-scrub { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; z-index: 3; cursor: pointer; touch-action: none; display: flex; align-items: flex-end; }
.hv-track { position: relative; width: 100%; height: 3px; background: rgba(255,255,255,.28); transition: height .18s var(--ease); }
.hv-buffer, .hv-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.hv-buffer { background: rgba(255,255,255,.28); }
.hv-fill { background: linear-gradient(90deg, var(--teal-light), #fff 70%); }
.hv-thumb { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); transform: scale(0); transition: transform .18s var(--ease); }
.hv-hover-time { position: absolute; bottom: 20px; left: 0; transform: translateX(-50%); font: 600 12px var(--font); font-variant-numeric: tabular-nums; color: #fff; background: rgba(20,20,22,.78); padding: 3px 7px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .15s; white-space: nowrap; }
.hv-time { position: absolute; left: 16px; bottom: 20px; z-index: 2; font: 600 12.5px var(--font); font-variant-numeric: tabular-nums; color: #fff; background: rgba(30,30,32,.55); padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; pointer-events: none; }
.hv-controls { bottom: 20px; }
.hv-frame:hover .hv-track, .hv-frame.scrubbing .hv-track, .hv-scrub:focus-visible .hv-track { height: 6px; }
.hv-frame:hover .hv-thumb, .hv-frame.scrubbing .hv-thumb, .hv-scrub:focus-visible .hv-thumb { transform: scale(1); }
.hv-frame:hover .hv-time, .hv-frame.scrubbing .hv-time { opacity: 1; transform: none; }
.hv-scrub:hover .hv-hover-time, .hv-frame.scrubbing .hv-hover-time { opacity: 1; }
.hv-scrub:focus-visible { outline: none; }
.hv-scrub:focus-visible .hv-track { box-shadow: 0 0 0 2px var(--teal-light); }
@media (max-width: 760px) { .hv-time { left: 10px; bottom: 14px; font-size: 11px; } .hv-controls { bottom: 14px; } .hv-track { height: 4px; } }
@media (hover: none) { .hv-thumb { transform: scale(1); } .hv-track { height: 5px; } }

/* ---------- mirror canonicalization demo (Method) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.md { display: grid; grid-template-columns: 1.35fr 1fr; gap: 0; margin-top: 28px; background: #fff; border: 1px solid #e8e8ed; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 14px 36px rgba(0,0,0,.05); }
.md-view { background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #f3f5f8 70%); }
.md-stage { position: relative; width: 100%; height: 100%; min-height: 460px; }
.md-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.md-stage canvas:active { cursor: grabbing; }
.md-tag { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; font: 600 12.5px var(--font); padding: 4px 10px; border-radius: 999px; color: #fff; white-space: nowrap; opacity: 0; transition: opacity .4s; }
.md.is-ready .md-tag { opacity: 1; }
.md-tag-l { background: var(--teal-2); } .md-tag-r { background: var(--orange); }
.md-tag-p { background: rgba(255,255,255,.85); color: #3f7fa3; border: 1px dashed #7fb6d6; font-weight: 600; }
.md-status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--ink-3); font-size: 14px; pointer-events: none; }
.md-hint { position: absolute; right: 14px; bottom: 12px; font-size: 12px; color: var(--ink-3); pointer-events: none; }
.md-panel { padding: 34px 32px 28px; border-left: 1px solid #ececf0; display: flex; flex-direction: column; }
.md-kicker { font-size: 13px; font-weight: 600; color: var(--orange); margin: 0 0 8px; }
.md-panel h3 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 10px; }
.md-text { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0 0 18px; }
.md-text b { color: var(--ink); font-weight: 600; }
.md-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.md-seg { display: inline-flex; background: var(--bg-soft); border-radius: 999px; padding: 3px; }
.md-seg button { font: 600 12.5px var(--font); border: 0; background: transparent; color: var(--ink-2); padding: 7px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.md-seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.md-play { font: 600 12.5px var(--font); border: 0; border-radius: 999px; padding: 8px 14px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px #d2d2d7; cursor: pointer; }
.md-play:hover { background: var(--bg-soft); }
.md-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.md-table th, .md-table td { padding: 6px 6px; text-align: right; border-bottom: 1px solid #f0f0f3; white-space: nowrap; }
.md-table thead th { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.md-table tbody th { text-align: left; font-weight: 600; color: var(--ink-2); }
.md-table td.ql { color: var(--teal); } .md-table td.qr { color: var(--orange); }
.md-table td.c { font-weight: 700; color: var(--ink); }
.md-table td.ok { font-size: 11.5px; font-weight: 600; color: #1f9d55; text-align: left; padding-left: 8px; }
.md-table tr.flip { background: linear-gradient(90deg, rgba(201,106,43,.07), rgba(201,106,43,0)); }
.md-table tr.mismatch td.c { color: #d93025; }
.md-table tr.mismatch td.ok { color: #d93025; }
.md-table .sgn { display: inline-block; min-width: 30px; text-align: center; font-size: 11.5px; font-weight: 700; padding: 2px 6px; border-radius: 999px; }
.md-table .sgn.neg { background: rgba(201,106,43,.14); color: #a9541d; }
.md-table .sgn.pos { background: var(--bg-soft); color: var(--ink-3); }
.md-note { font-size: 12px; color: var(--ink-3); line-height: 1.5; margin: 14px 0 0; }
.md-ring { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--orange); box-shadow: 0 0 0 0 transparent; vertical-align: -1px; margin-right: 6px; }
@media (max-width: 1000px) { .md { grid-template-columns: 1fr; } .md-stage { min-height: 380px; aspect-ratio: 4 / 3; } .md-panel { border-left: 0; border-top: 1px solid #ececf0; } }
@media (max-width: 760px) { .md-panel { padding: 24px 18px; } .md-stage { min-height: 300px; } .md-table th, .md-table td { padding: 5px 3px; font-size: 12px; } }
.md-panel, .md-view { min-width: 0; }
@media (max-width: 1000px) { .md { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .md-table td.ok, .md-table thead th:last-child { display: none; }
  .md-seg { flex-wrap: wrap; }
  .md-seg button { padding: 7px 9px; font-size: 12px; }
  .md-text { font-size: 14px; }
  .md-hint { display: none; }
  .md-tag { font-size: 11px; padding: 3px 8px; }
}

/* ---------- method step cards: hover lift + highlight; card 1 opens the YAM demo ---------- */
.steps .step { --hl: 43,133,151; position: relative; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease); will-change: transform; }
.steps .step:nth-child(2) { --hl: 124,138,124; }
.steps .step:nth-child(3) { --hl: 201,106,43; }
.steps .step.in-view:hover, .steps .step:focus-visible {
  transform: translateY(-6px) scale(1.03); border-color: rgba(var(--hl), .55);
  box-shadow: 0 0 0 3px rgba(var(--hl), .14), 0 22px 48px rgba(var(--hl), .16), 0 2px 6px rgba(0,0,0,.04);
}
.steps .step:focus-visible { outline: none; }
.step.is-expandable { cursor: pointer; }
.step-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--teal-2); }
.step-more svg { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.step-more-close { display: none; }
.step.is-expandable:hover .step-more svg { transform: translateY(2px); }
.step.is-expandable[aria-expanded="true"] { border-color: rgba(var(--hl), .7); box-shadow: 0 0 0 3px rgba(var(--hl), .18), 0 18px 40px rgba(var(--hl), .14); }
.step.is-expandable[aria-expanded="true"] .step-more svg { transform: rotate(180deg); }
.step.is-expandable[aria-expanded="true"] .step-more-open { display: none; }
.step.is-expandable[aria-expanded="true"] .step-more-close { display: inline; }

.step-panel { height: 0; overflow: hidden; visibility: hidden; transition: height .55s var(--ease), visibility 0s linear .55s; }
.step-panel.is-open { visibility: visible; transition: height .55s var(--ease), visibility 0s; }
.step-panel-inner { position: relative; padding-top: 4px; opacity: 0; transform: translateY(-12px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.step-panel.is-open .step-panel-inner { opacity: 1; transform: none; transition-delay: .1s; }
.step-panel .md { margin-top: 20px; }
.step-panel-close { position: absolute; z-index: 5; right: 14px; top: 38px; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.9); color: var(--ink-2); box-shadow: inset 0 0 0 1px #d2d2d7; }
.step-panel-close:hover { background: var(--bg-soft); color: var(--ink); }
.step-panel-close svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) { .steps .step, .step-panel, .step-panel-inner { transition: none !important; } .steps .step.in-view:hover { transform: none; } }
