:root {
  color-scheme: light;
  --ink: #18262c;
  --muted: #55666d;
  --faint: #8a979c;
  --accent: #075f62;
  --accent-2: #0b7f83;
  --accent-soft: #e5f2f1;
  --line: #dfe6e6;
  --panel: #f6f9f8;
  --bg: #fff;
  --code: #0f1d22;
  --s1: #2a78d6;
  --s2: #d4487a;
  --s3: #2f9e6d;
  --s4: #b7791f;
  --music: #7c5cc4;
  --sfx: #e0763a;
  --bgnd: #8696a0;
  --stress: #c2410c;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.68 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #e5a940; outline-offset: 2px; }
img { max-width: 100%; }
.wrap { width: min(1080px, calc(100% - 44px)); margin-inline: auto; }
.narrow { max-width: 780px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 58px; }
.brand { color: var(--ink); font-weight: 800; letter-spacing: -.03em; text-decoration: none; font-size: 1.08rem; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .86rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }

/* hero */
.hero { padding: 64px 0 48px; text-align: center; }
.venue { margin: 0 0 14px; color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { max-width: 900px; margin: 0 auto 22px; font-size: clamp(2.05rem, 4.6vw, 3.5rem); line-height: 1.14; letter-spacing: -.04em; }
h1 .model { color: var(--accent); }
.authors { max-width: 860px; margin: 0 auto; font-size: 1.04rem; line-height: 1.95; }
.authors span { display: inline-block; white-space: nowrap; margin: 0 9px; }
.authors a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.authors a:hover { color: var(--accent); border-bottom-color: currentColor; }
sup { font-size: .66em; margin-left: 1px; }
.affiliations { color: var(--muted); margin: 4px 0 0; font-size: .9rem; }
.affiliations span { margin: 0 8px; white-space: nowrap; }
.links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: 8px 17px; border-radius: 999px; font-weight: 650; font-size: .92rem; text-decoration: none; cursor: pointer; font-family: inherit; }
.btn:hover { background: #2c3d44; }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.ghost:hover { background: var(--panel); }
.btn[aria-disabled="true"] { cursor: default; }
.abstract { text-align: justify; hyphens: auto; color: #2c3e44; margin: 0; }
.tldr { max-width: 800px; margin: 34px auto 0; font-size: 1.15rem; color: #31454c; }
.tldr strong { color: var(--ink); }

/* story strip */
.strip { display: grid; grid-template-columns: 1fr auto 1.3fr auto 1fr; align-items: stretch; gap: 10px; max-width: 900px; margin: 34px auto 0; text-align: left; }
.strip .node { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); }
.strip .node b { display: block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.strip .node span { font-size: .88rem; color: var(--muted); line-height: 1.45; display: block; margin-top: 3px; }
.strip .node.mid { background: var(--accent-soft); border-color: #c4dfdc; }
.strip .arrow { align-self: center; color: var(--faint); font-size: 1.3rem; }
.strip .split { display: grid; gap: 8px; }

/* sections */
section.block { padding: 70px 0; border-top: 1px solid var(--line); }
.kicker { margin: 0 0 8px; color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h2 { margin: 0 0 14px; font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.22; letter-spacing: -.03em; }
h3 { margin: 0 0 8px; font-size: 1.14rem; letter-spacing: -.01em; }
.lede { max-width: 800px; color: var(--muted); font-size: 1.04rem; margin: 0 0 26px; }
.lede strong { color: var(--ink); }
p { margin: 0 0 14px; }
.note { color: var(--muted); font-size: .86rem; }
.small { font-size: .84rem; }
.sub-h { margin: 48px 0 10px; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.fn { font-family: var(--mono); font-size: .92rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: inline-block; color: var(--ink); }
.fn .f { color: var(--accent); font-weight: 700; }
.fn .a { color: #7a4fb3; }

figure { margin: 0; }
.paper-figure { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.paper-figure img { display: block; width: 100%; height: auto; }
figcaption { margin-top: 10px; color: var(--muted); font-size: .86rem; }

/* running example player */
.player { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(15,30,35,.04), 0 10px 30px rgba(15,30,35,.06); overflow: hidden; }
.player-top { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.play { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--accent); color: #fff; font-size: 1rem; cursor: pointer; flex: none; display: grid; place-items: center; }
.play:hover { background: #06494b; }
.player-title { font-weight: 700; }
.player-title small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
.clock { margin-left: auto; font-family: var(--mono); color: var(--muted); font-size: .9rem; }
.lanes { position: relative; padding: 14px 18px 6px; }
.lane { display: grid; grid-template-columns: 112px 1fr; align-items: center; min-height: 30px; }
.lane-label .l-short { display: none; }
.lane-label { font-size: .8rem; font-weight: 650; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-track { position: relative; height: 20px; background: linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat; cursor: pointer; }
.bar { position: absolute; top: 2px; height: 16px; border-radius: 4px; opacity: .85; border: none; padding: 0; cursor: pointer; }
.bar:hover, .bar.on { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor; }
.axis { display: grid; grid-template-columns: 112px 1fr; font-family: var(--mono); font-size: .72rem; color: var(--faint); }
.axis-ticks { position: relative; height: 18px; }
.axis-ticks span { position: absolute; transform: translateX(-50%); }
.playhead { position: absolute; top: 8px; bottom: 22px; width: 2px; background: var(--ink); pointer-events: none; left: 130px; }
.now-label { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.spk { display: inline-block; font-weight: 800; font-size: .78rem; color: #fff; padding: 1px 8px; border-radius: 999px; margin-right: 6px; vertical-align: 2px; }
.utt { font-size: 1.22rem; line-height: 1.6; }
.utt .w { position: relative; }
.utt .w.stress { font-weight: 800; color: var(--stress); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.utt .w.high::after, .utt .w.low::after { position: absolute; left: 50%; transform: translateX(-50%); font-size: .62rem; color: var(--faint); }
.utt .w.high::after { content: "\2197"; top: -12px; }
.utt .w.low::after { content: "\2198"; bottom: -14px; }
.attrs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { display: inline-flex; gap: 5px; align-items: baseline; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 10px; font-size: .8rem; }
.chip b { font-weight: 650; color: var(--faint); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.idle { color: var(--muted); font-size: .95rem; }
.evlist { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.evlist li { padding: 4px 0; display: flex; gap: 8px; align-items: baseline; }
.evlist .dot { width: 9px; height: 9px; border-radius: 2px; flex: none; transform: translateY(1px); }
.evlist .t { font-family: var(--mono); font-size: .76rem; color: var(--faint); margin-left: auto; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 18px 14px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
.legend .stressed { font-weight: 800; color: var(--stress); text-decoration: underline; }
.credit { font-size: .8rem; color: var(--muted); margin-top: 10px; }

/* details */
details.more { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
details.more > summary { cursor: pointer; padding: 11px 16px; font-weight: 650; font-size: .92rem; list-style: none; display: flex; gap: 8px; align-items: center; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
details.more[open] > summary::before { content: "\2212"; }
details.more > .inner { padding: 0 16px 16px; }

pre.out { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: .8rem; line-height: 1.6; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; max-height: 330px; overflow: auto; color: #2e3d43; }
pre.out .h { color: var(--accent); font-weight: 700; }
pre.out .t { color: #a15c00; }
pre.out .sp { color: var(--s1); font-weight: 700; }
pre.out .e { background: #fff1c2; color: #7a4a00; border-radius: 3px; padding: 0 2px; }
pre.out .k { color: var(--faint); }
pre.out .seg { color: var(--faint); font-weight: 700; }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.tab { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 15px; font: 600 .88rem/1.3 inherit; font-family: inherit; cursor: pointer; }
.tab:hover { border-color: var(--accent-2); }
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab small { font-weight: 500; opacity: .8; }

/* composition explorer */
.compose { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: #fff; }
.mode-intro { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 16px; }
.mode-intro p { margin: 0; color: var(--muted); flex: 1 1 360px; font-size: .95rem; }
.iio { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.iio-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.iio-head h4 { margin: 0; font-size: .98rem; }
.iio-head .fnsig { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.iio-row { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); align-items: start; }
.iio-row:last-child { border-bottom: none; }
.iio-row > b { font-size: .7rem; letter-spacing: .1em; color: var(--accent); padding-top: 3px; }
.iio-row .txt { font-family: var(--mono); font-size: .8rem; color: #2e3d43; white-space: pre-wrap; word-break: break-word; }
.iio-row .from { display: block; font-family: system-ui, sans-serif; font-size: .78rem; color: var(--faint); margin-top: 2px; }
.iio-row pre.out { max-height: 240px; }
.empty-in { color: var(--faint); }
.chain { display: grid; gap: 12px; }
.chain-link { text-align: center; color: var(--accent); font-size: .84rem; font-weight: 650; }
.chain-link::before { content: "\2193  "; }
.fan { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fan .iio-row { grid-template-columns: 1fr; gap: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pill { border: 1px dashed #b9c9c9; background: #fff; border-radius: 8px; padding: 5px 11px; font: 600 .84rem/1.3 inherit; font-family: inherit; cursor: pointer; color: var(--ink); }
.pill[aria-pressed="true"] { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.video-card { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: center; margin-top: 18px; padding: 16px; border-radius: 12px; background: #0e171b; color: #d8e3e4; }
.video-card video { width: 100%; border-radius: 8px; display: block; background: #000; }
.video-card h4 { margin: 0 0 6px; color: #fff; font-size: 1rem; }
.video-card p { margin: 0; font-size: .88rem; color: #a9babd; }
.select-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
select { font: inherit; font-size: .9rem; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; max-width: 100%; }

/* evidence bars */
.evidence { display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; margin-top: 26px; padding: 20px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); align-items: center; }
.evidence h3 { margin-bottom: 4px; }
.sp-mp { display: grid; gap: 9px; }
.sp-mp .row { display: grid; grid-template-columns: 150px 1fr 92px; gap: 10px; align-items: center; font-size: .86rem; }
.sp-mp .track { position: relative; height: 18px; background: #e8eeee; border-radius: 4px; }
.sp-mp .seg-sp { position: absolute; left: 0; top: 0; bottom: 0; background: #9fb3b6; border-radius: 4px; }
.sp-mp .seg-mp { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 0 4px 4px 0; }
.sp-mp .val { font-family: var(--mono); font-size: .8rem; color: var(--muted); white-space: nowrap; }
.sp-mp .val b { color: var(--accent); }
.key { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* method */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin: 0 0 30px; }
.two-col article { border-top: 3px solid var(--accent); padding-top: 14px; }
.two-col .step { color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .1em; }
.two-col p { color: var(--muted); font-size: .96rem; }
.fig-pair { display: grid; gap: 22px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); margin: 6px 0 26px; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stat { padding: 20px 18px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .v { display: block; color: var(--accent); font-size: 2.15rem; font-weight: 760; line-height: 1.1; letter-spacing: -.04em; }
.stat .v small { font-size: .5em; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.stat strong { display: block; margin: 8px 0 3px; font-size: .92rem; }
.stat p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }

table.res { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
table.res th, table.res td { padding: 7px 9px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.res th:first-child, table.res td:first-child { text-align: left; }
table.res thead th { font-size: .74rem; color: var(--muted); font-weight: 700; letter-spacing: .02em; }
table.res thead tr:first-child th { border-bottom: none; padding-bottom: 0; color: var(--ink); }
table.res tr.ours td { background: var(--accent-soft); font-weight: 650; }
table.res td.best { font-weight: 800; color: var(--accent); }
table.res .grp td { color: var(--faint); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; text-align: left; padding-top: 14px; border-bottom: none; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; background: #fff; }

/* QA cards */
.qa-running { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; margin-bottom: 30px; }
.q { font-weight: 700; margin-bottom: 8px; font-size: 1.02rem; }
.opt { padding: 6px 10px; border-radius: 8px; margin: 4px 0; font-size: .9rem; border: 1px solid transparent; }
.opt.chosen { background: var(--accent-soft); border-color: #bfe0dc; color: #0b5552; font-weight: 600; }
.opt.chosen::after { content: "  \2713"; font-weight: 700; }
.trace { font-size: .86rem; color: #3b4b51; white-space: pre-wrap; word-break: break-word; line-height: 1.6; }
.trace .t { color: #a15c00; font-weight: 600; }
.trace .fa { color: var(--accent); font-weight: 700; }
.trace code { background: var(--panel); border-radius: 4px; padding: 0 3px; font-size: .78rem; }

.gallery { display: grid; gap: 16px; }
.ex { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 16px; }
.ex-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.tag { font-size: .76rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; }
.cat { font-size: .8rem; color: var(--muted); }
.ex-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ex-body .lbl { font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin: 0 0 6px; }
.ex audio, .ex video { width: 100%; margin-bottom: 10px; }
.ex video { border-radius: 8px; background: #000; max-height: 340px; }
.show-more { margin-top: 4px; justify-self: start; }
.av-intro { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; }

/* reconstruction */
.recon { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; }
.recon-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.recon-pair .lbl { font-size: .74rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.recon-pair img { display: block; width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.recon-pair audio { width: 100%; margin-top: 8px; }
.recon .arrow-note { text-align: center; font-size: .82rem; color: var(--muted); margin: 0 0 8px; }

/* emphasis */
.emph { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; }
.sentence { font-size: 1.5rem; font-weight: 650; letter-spacing: -.01em; margin: 6px 0 4px; }
.sentence .e { background: #fff1c2; color: #7a4a00; border-radius: 4px; padding: 0 4px; }
.variant-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; align-items: center; }
.variant-row .lab { font-size: .8rem; color: var(--muted); margin-right: 4px; }
.caption-line { font-family: var(--mono); font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.caption-line .tagmark { color: #a15c00; }
.seeds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.seed { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--panel); }
.seed img { display: block; width: 100%; border-radius: 6px; }
.seed audio { width: 100%; height: 34px; margin-top: 6px; }
.seed .det { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.seed .det b { color: var(--accent); }

/* bibtex + footer */
.bib { position: relative; }
.bib pre { margin: 0; background: var(--code); color: #d9e5e6; border-radius: 12px; padding: 18px 20px; font-family: var(--mono); font-size: .84rem; overflow-x: auto; line-height: 1.6; }
.copy { position: absolute; top: 10px; right: 10px; border: 1px solid #36474d; background: #1b2b31; color: #d9e5e6; border-radius: 8px; padding: 4px 10px; font: 600 .78rem/1.4 inherit; font-family: inherit; cursor: pointer; }
.takeaway { font-size: 1.2rem; line-height: 1.6; color: #2c3e44; max-width: 860px; }
.takeaway em { color: var(--accent); font-style: normal; font-weight: 700; }
footer { padding: 34px 0 52px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
footer h4 { margin: 0 0 6px; color: var(--ink); font-size: .9rem; }
footer ul { margin: 0; padding-left: 18px; }
footer li { margin: 3px 0; }

@media (max-width: 860px) {
  .site-header nav { display: none; }
  .strip { grid-template-columns: 1fr; }
  .strip .arrow { transform: rotate(90deg); justify-self: center; }
  .now, .two-col, .evidence, .qa-running, .ex-body, .recon-pair, .video-card, .av-intro { grid-template-columns: 1fr; }
  .fan { grid-template-columns: 1fr; }
  .stats, .stats.three { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-left: none; }
  .seeds { grid-template-columns: 1fr 1fr; }
  .lane, .axis { grid-template-columns: 64px 1fr; }
  .lane-label .l-long { display: none; }
  .lane-label .l-short { display: inline; }
  .iio-row { grid-template-columns: 1fr; gap: 3px; }
  .sp-mp .row { grid-template-columns: 110px 1fr 80px; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 28px); }
  .stats, .stats.three { grid-template-columns: 1fr; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--line); }
  .authors span { margin: 0 5px; }
  .compose, .recon, .emph, .ex { padding: 12px; }
  .lanes { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* example carousel */
.carousel { outline: none; }
.carousel-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.viewport { overflow: hidden; transition: height .3s ease; }
.track { display: flex; align-items: flex-start; transition: transform .35s ease; }
.slide { flex: 0 0 100%; min-width: 0; }
.arrow-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 3px; box-shadow: 0 1px 3px rgba(15,30,35,.08); }
.arrow-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.arrow-btn:disabled { opacity: .3; cursor: default; }
.carousel-foot { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 12px; }
.dots { display: flex; gap: 7px; }
.dot-btn { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: none; background: #cdd8d8; cursor: pointer; }
.dot-btn[aria-current="true"] { background: var(--accent); }
.carousel-foot .arrow-btn { display: none; width: 36px; height: 36px; font-size: 1.3rem; }
.count { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.carousel:focus-visible .viewport { outline: 3px solid #e5a940; outline-offset: 2px; border-radius: 14px; }
@media (max-width: 860px) {
  .carousel-row { grid-template-columns: minmax(0, 1fr); }
  .carousel-row .arrow-btn { display: none; }
  .carousel-foot .arrow-btn { display: grid; }
}
@media (prefers-reduced-motion: reduce) { .track, .viewport { transition: none; } }

/* ---------- composer (Block A) ---------- */
:root { --p1: #0f7c73; --p2: #c2410c; --p3: #c0397a; --p4: #2a78d6; --p5: #7c5cc4; }
.composer { margin-top: 8px; }
.calls { display: grid; grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1.15fr); align-items: center; gap: 0; margin-bottom: 16px; }
.calls .first { display: flex; justify-content: flex-end; }
.calls .stack { display: grid; gap: 8px; }
.call { display: flex; align-items: center; gap: 9px; width: 100%; max-width: 340px; border: 1.5px dashed #c5d2d2; background: #fff; border-radius: 10px; padding: 7px 12px; cursor: pointer; text-align: left; font: inherit; color: var(--muted); transition: border-color .3s, background .3s, color .3s, box-shadow .3s; }
.call code { font-family: var(--mono); font-size: .86rem; }
.call .f { font-weight: 700; }
.call .slot { border-radius: 4px; padding: 0 2px; }
.call .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e3eaea; color: var(--muted); font-size: .75rem; font-weight: 800; flex: none; transition: background .3s, color .3s; }
.call.done, .call.active { border-style: solid; color: var(--ink); }
.call.done { border-color: #b9d3d0; }
.call.done .n { background: var(--accent); color: #fff; }
.call.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px rgba(7,95,98,.12); }
.call.active .n { background: var(--accent); color: #fff; }
.call.active .f, .call.done .f { color: var(--accent); }
.call:hover { border-color: var(--accent-2); }
.fan { position: relative; align-self: stretch; }
.fan-svg { position: absolute; inset: 4px 0; }
.fan-svg svg { width: 100%; height: 100%; overflow: visible; }
.fan path { fill: none; stroke: #cfdada; stroke-width: 2; stroke-dasharray: 5 5; transition: stroke .4s; }
.fan path.on { stroke: var(--accent); stroke-dasharray: none; }
.fan-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -135%); font-family: var(--mono); font-size: .76rem; font-weight: 700; color: var(--accent); background: #fff; padding: 0 5px; }
.stepper { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn.small { padding: 5px 13px; font-size: .84rem; }
.arrow-btn.sm { width: 32px; height: 32px; font-size: 1.25rem; }
.player-top .clock { margin-left: 14px; min-width: 52px; text-align: right; }

.lane.spec .lane-track { height: 46px; background: none; }
.lane.spec img { display: block; width: 100%; height: 46px; border-radius: 4px; object-fit: fill; }
.lane.spec { min-height: 52px; }
.composer .bar { transform-origin: left center; transition: transform .45s ease, opacity .3s; }
.composer[data-step="0"] .lane:not(.spec) .bar { transform: scaleX(0); opacity: 0; }
.sounds { min-height: 34px; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 4px 18px 8px; font-size: .82rem; color: var(--muted); }
.sounds .snd { display: inline-flex; align-items: center; gap: 6px; }
.sounds i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.record-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table.record { width: 100%; border-collapse: collapse; font-size: .88rem; }
.record th { text-align: left; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 800; padding: 10px 12px 6px; white-space: nowrap; }
.record td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; position: relative; }
.record td.mono { font-family: var(--mono); font-size: .76rem; color: var(--muted); width: 118px; }
.record tr.playing td { background: #f3faf9; }
.record td.hid > * { visibility: hidden; }
.record td.hid::before { content: ""; position: absolute; left: 12px; right: 25%; top: 50%; height: 8px; margin-top: -4px; border-radius: 4px; background: #eef3f3; }
.record .words .marked { display: none; }
.record .words.stressed .plain { display: none; }
.record .words.stressed .marked { display: inline; }
.record .w { position: relative; }
.record .w.stress { font-weight: 800; color: var(--stress); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.record .w.high::after, .record .w.low::after { position: absolute; left: 50%; transform: translateX(-50%); font-size: .6rem; color: var(--faint); }
.record .w.high::after { content: "\2197"; top: -10px; }
.record .w.low::after { content: "\2198"; bottom: -11px; }
.record .words { line-height: 1.9; min-width: 220px; }
.pb { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; color: #fff; font-size: .62rem; margin-right: 3px; vertical-align: 1px; transition: opacity .3s; background: var(--accent); }
.pb.off { opacity: .25; }
.emo { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: #eef1f2; color: #3b4b51; }
.emo-angry { background: #fde2e1; color: #a52a24; }
.emo-happy { background: #fff1c2; color: #7a5300; }
.emo-surprised { background: #ece4fb; color: #5b3fa1; }
.emo-sad { background: #e2ecfb; color: #2b5ca8; }
.emo-neutral { background: #eef1f2; color: #55666d; }
.flyer { position: fixed; z-index: 100; pointer-events: none; background: #fff6d6; border: 1px solid #f0d58a; color: #6b4e00; border-radius: 6px; padding: 2px 7px; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 4px 14px rgba(0,0,0,.12); transform-origin: center; }
#call-tabs .tab .mono { font-size: .8rem; }
#call-body .iio-head h4 { font-family: var(--mono); font-size: .86rem; color: var(--accent); }
pre.out.in { max-height: 160px; }

/* ---------- call graph (Block B) ---------- */
.graph { position: relative; padding: 6px 0 4px; }
.gsvg { position: absolute; inset: 0; pointer-events: none; }
.gsvg path { fill: none; stroke: #d5dfdf; stroke-width: 1.5; }
.gsvg path.e-src { stroke: #9cc7c3; stroke-width: 2; stroke-dasharray: 5 4; }
.gsvg path.on { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: none; }
.g-audio { display: flex; justify-content: center; margin-bottom: 34px; position: relative; }
.g-audio span { font-family: var(--mono); font-size: .82rem; font-weight: 700; background: var(--ink); color: #fff; border-radius: 999px; padding: 4px 16px; }
.g-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; position: relative; }
.g-r1 { margin-bottom: 46px; }
.g-r2 { gap: 14px; align-items: flex-start; }
.gnode { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 9px; font-family: var(--mono); font-size: .74rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.gnode .f { color: var(--ink); font-weight: 700; }
.gnode .slot { color: var(--accent); }
.gnode:hover { border-color: var(--accent-2); }
.gnode.src { border-color: var(--accent); border-width: 2px; }
.gnode.sel { background: var(--accent); border-color: var(--accent); color: #d9eeec; }
.gnode.sel .f, .gnode.sel .slot { color: #fff; }
.g-group { border: 1px dashed #c4d6d4; border-radius: 12px; padding: 8px 10px 10px; background: #fbfdfd; }
.g-lab { text-align: center; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.g-nodes { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
#graph-card { margin-top: 18px; }
#graph-card .iio-head h4 { font-family: var(--mono); font-weight: 500; font-size: .86rem; color: var(--muted); }
#graph-card .iio-head h4 .f { color: var(--accent); font-weight: 700; }

/* ---------- diff (Block D) ---------- */
.diff { display: grid; gap: 10px; margin-top: 10px; }
.drow { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: start; }
.dsig { font-family: var(--mono); font-size: .76rem; color: var(--muted); padding-top: 2px; }
.dsig .f { color: var(--accent); font-weight: 700; }
.dl { font-size: .88rem; }
.dl b { font-size: .72rem; color: var(--faint); margin-right: 6px; }
.drow.ref .dl span { color: var(--ink); }
.dl del { color: var(--faint); text-decoration: line-through; font-size: .92em; }
.dl mark { background: #fde2e1; color: #a52a24; border-radius: 3px; padding: 0 2px; }
.evidence h3 { font-size: 1rem; }

@media (max-width: 860px) {
  .calls { grid-template-columns: 1fr; gap: 6px; }
  .calls .first { justify-content: stretch; }
  .calls .first .call { max-width: none; }
  .fan { height: 30px; }
  .fan-svg { display: none; }
  .fan-label { position: static; transform: none; display: block; text-align: center; }
  .fan-label::before { content: "\2193  "; }
  .call { max-width: none; }
  .stepper { margin-left: 0; width: 100%; }
  .player-top { gap: 10px; }
  .gsvg { display: none; }
  .g-audio, .g-r1 { margin-bottom: 16px; }
  .g-r2 { flex-direction: column; align-items: stretch; }
  .gnode { white-space: normal; text-align: left; }
  .drow { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 860px) {
  .lane-label .g { display: none; }
  .player-top .clock { display: none; }
  .record-wrap { overflow: visible; }
  table.record, .record tbody { display: block; }
  .record thead { display: none; }
  .record tr { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
  .record td { border: none; padding: 0; }
  .record td.mono { order: 2; max-width: none; align-self: center; }
  .record td:nth-child(2) { order: 1; }
  .record td.words { order: 3; grid-column: 1 / -1; min-width: 0; }
  .record td.c3, .record td.c4, .record td.c5 { order: 4; grid-column: 1 / -1; font-size: .8rem; color: var(--muted); }
  .record td.hid::before { left: 0; right: 40%; }
  .record td.hid { min-height: 14px; }
}

/* running-example video beside the timeline */
.stage { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; }
.screen { position: relative; margin: 14px 0 14px 18px; }
.screen video { display: block; width: 100%; aspect-ratio: 960 / 400; border-radius: 8px; background: #000; cursor: pointer; }
.stage .lanes { padding-left: 14px; }
@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; }
  .screen { margin: 12px 12px 0; }
  .stage .lanes { padding-left: 10px; }
}

.play-overlay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 58px; height: 58px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); background: rgba(7,95,98,.82); color: #fff; font-size: 1.3rem; cursor: pointer; display: grid; place-items: center; padding-left: 3px; box-shadow: 0 4px 18px rgba(0,0,0,.35); transition: opacity .25s, background .2s; }
.play-overlay:hover { background: rgba(6,73,75,.95); }
.screen.is-playing .play-overlay { opacity: 0; padding-left: 0; }
.screen.is-playing .play-overlay:focus-visible { opacity: 1; }
@media (hover: hover) { .screen.is-playing:hover .play-overlay { opacity: 1; } }
.player-top { justify-content: flex-end; }
.source { margin: 12px 0 0; font-size: .82rem; color: var(--muted); }
