/* Speculative Forcing project page.
   Layout: centred single column (72rem) with a quiet left table of contents.
   Look: white ground, cool greys with a hint of green, NAVER green reserved for "ours" and the current section,
   the NAVER AI Lab gradient as a thin accent under headings. One deliberate light theme. */
:root {
  color-scheme: light;
  --font: 'Wanted Sans Variable', 'Wanted Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ink: #111417;
  --bg: #ffffff;
  --surface: #f5f7f6;
  --surface-2: #eef2f0;
  --text: #2a2f33;
  --muted: #6d757b;
  --light: #9ba3a8;
  --border: #e3e8e6;
  --green: #03c75a;
  --green-ink: #008a3e;
  --green-soft: #e4f8ec;
  --green-line: #b9ecce;
  --base: #8d9499;
  --t1: #220868; --t2: #9c179e; --t3: #ed7953; --t4: #f0f921;
  --grad: linear-gradient(90deg, #29f13f, #06ecbf 38%, #31b2d6 68%, #6860fd);
  --container: 72rem;
  --sidebar: 176px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 15px; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; padding-left: var(--sidebar); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0.8rem 0 1.4rem; font-size: 1.12rem; line-height: 1.65; }
sup { font-size: 0.68em; line-height: 0; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.section { width: 100%; padding: 3.5rem 0; }
.section + .section { border-top: 1px solid var(--border); }
.eyebrow { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-ink); margin-bottom: 0.7rem; }
.eyebrow::before { content: ""; width: 1.4rem; height: 3px; border-radius: 2px; background: var(--grad); }
.section-title { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.9rem; }
.subsection-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em; margin: 2.6rem 0 0.4rem; }
.lead { max-width: 56rem; color: var(--text); }

/* ---------- table of contents ---------- */
.sidebar { position: fixed; top: 50%; left: 2rem; transform: translateY(-50%); z-index: 100; display: flex; flex-direction: column; gap: 0.35rem; }
.sidebar-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0.65rem 0.3rem 0.5rem; border-radius: 999px; transition: background-color 0.2s; }
.sidebar-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: background-color 0.2s, transform 0.2s; }
.sidebar-label { font-size: 0.82rem; font-weight: 500; color: var(--light); letter-spacing: 0.005em; transition: color 0.2s; white-space: nowrap; }
.sidebar-item:hover { background: var(--surface); }
.sidebar-item:hover .sidebar-label { color: var(--text); }
.sidebar-item.active { background: var(--green-soft); }
.sidebar-item.active .sidebar-dot { background: var(--green); transform: scale(1.25); }
.sidebar-item.active .sidebar-label { color: var(--green-ink); font-weight: 700; }
.sidebar-item:focus-visible, .btn:focus-visible, .copy-btn:focus-visible, .stage-video:focus-visible, .thumb:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 3px; }
@media (max-width: 1280px) {
  body { padding-left: 0; }
  .sidebar { position: sticky; top: env(safe-area-inset-top, 0px); left: 0; transform: none; width: 100%; flex-direction: row; justify-content: center; gap: 0.1rem; padding: 0.55rem 1rem;
    background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; z-index: 1000; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar-dot { display: none; }
  .sidebar-item { padding: 0.35rem 0.7rem; }
  .sidebar-label { font-size: 0.86rem; }
}
@media (max-width: 760px) { .sidebar { justify-content: flex-start; } }

/* ---------- hero ---------- */
.hero { padding-top: 3.2rem; text-align: center; margin-bottom: 2rem; }
.hero-inner { max-width: 64rem; margin: 0 auto 2.5rem; padding: 0 1.25rem; }
.hero-rule { width: 4.5rem; height: 4px; margin: 0 auto 1.6rem; border-radius: 2px; background: var(--grad); }
.hero-title { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.035em; line-height: 1.15; margin-bottom: 1.1rem; }
.hero-title .nm { display: inline-flex; align-items: center; gap: 0.2em; color: var(--ink); }
.hero-title .grad-text { color: var(--green); padding-right: 0.06em; }
.hero-title .mark { width: 1.12em; height: 1.12em; flex: none; margin-right: 0.06em; filter: drop-shadow(0 4px 10px rgba(3, 199, 90, 0.16)); }
.hero-title .mark rect { transition: fill 0.3s ease, stroke 0.3s ease; }
.hero-title .mark .sym, .hero-title .mark text { transition: opacity 0.3s ease; }
.hero-title .sub { display: block; font-weight: 400; font-size: 0.58em; letter-spacing: -0.02em; color: var(--text); margin-top: 0.4em; }
@media (min-width: 768px) { .hero-title { font-size: 3.6rem; } }
.hero-authors { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 1.5rem; row-gap: 0.2rem; font-size: 1.15rem; font-weight: 500; margin-bottom: 0.35rem; }
.hero-authors span { white-space: nowrap; }
.hero-authors a { text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 4px; }
.hero-authors a:hover { color: var(--green-ink); text-decoration-color: currentColor; }
.hero-authors sup, .hero-aff sup, .hero-notes sup { color: var(--green-ink); font-weight: 600; margin-left: 1px; }
.hero-aff { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; color: var(--muted); font-size: 1.08rem; margin-bottom: 0.2rem; }
.hero-notes { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 1.4rem; row-gap: 0.1rem; color: var(--light); font-size: 0.88rem; margin-bottom: 0.75rem; }
.hero-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2.2rem; margin-bottom: 2rem; }
.hero-logos img { height: 2.2rem; width: auto; }
.hero-logos img.kaist { height: 2.05rem; }
.hero-venue { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.9rem; }
.hero-buttons { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1.3rem; border-radius: 999px; background: var(--green); color: #052d16; font-weight: 600; transition: background-color 0.2s, transform 0.2s; }
.btn:hover { background: #12d868; }
.btn svg { width: 1.05em; height: 1.05em; fill: currentColor; }
.btn.outline { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn.outline:hover { background: var(--surface); }
.btn.soon { opacity: 0.55; pointer-events: none; }
.wide { width: 100%; max-width: 88rem; margin: 0 auto; padding: 0 1.25rem; }

.reel { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 1rem; overflow: hidden; background: #0b0c0e; box-shadow: 0 20px 50px -30px rgba(17, 20, 23, 0.45); }
.reel video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.reel-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 0.65rem; padding: 2rem 1rem 0.75rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); color: #fff; opacity: 0; transition: opacity 0.2s; }
.reel:hover .reel-bar, .reel-bar:focus-within { opacity: 1; }
@media (hover: none) { .reel-bar { opacity: 1; } }
.reel-btn { flex: none; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border: 0; padding: 0; background: none; color: rgba(255, 255, 255, 0.9); cursor: pointer; border-radius: 999px; }
.reel-btn svg { width: 1.15rem; height: 1.15rem; }
.reel-btn:focus-visible, .reel-seek:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.reel-seek { flex: 1; min-width: 0; padding: 0.45rem 0; cursor: pointer; border-radius: 4px; }
.reel-track { position: relative; height: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.28); overflow: hidden; }
.reel-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--green); }
.reel-time { flex: none; font-size: 0.78rem; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.9); }
.video-caption { display: block; text-align: center; font-size: 0.85rem; color: var(--light); margin-top: 0.6rem; }

.tldr { max-width: 72rem; margin: 2.5rem auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: 1.75rem 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 1rem; }
@media (min-width: 768px) { .tldr { flex-direction: row; } }
.tldr-label { background: var(--green); color: #052d16; font-size: 0.9rem; font-weight: 800; letter-spacing: 0.05em; padding: 0.3rem 0.95rem; border-radius: 999px; flex: none; }
.tldr-text { margin: 0; font-size: 1.18rem; font-weight: 500; text-align: center; min-width: 0; }
.tldr-text b { color: var(--ink); font-weight: 800; }

/* ---------- method ---------- */
.points { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.points li { min-width: 0; font-size: 1.02rem; line-height: 1.55; background: var(--surface); border-radius: 0.9rem; padding: 1.2rem 1.3rem; }
.points h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.5rem; }
.points h3::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--green); }
@media (max-width: 860px) { .points { grid-template-columns: 1fr; gap: 0.8rem; } }
figure { margin: 0; }
.figure { border: 1px solid var(--border); border-radius: 0.9rem; padding: 1.25rem; background: #fff; }
.figure img { width: 100%; height: auto; }
figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 0.7rem; max-width: 56rem; }
figcaption b { color: var(--text); font-weight: 600; }
.fig-gap { margin-top: 2rem; }

/* ---------- results: chart + key numbers ---------- */
.result { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2rem; align-items: center; margin: 1rem 0 0.5rem; background: var(--surface); border-radius: 1rem; padding: 1.5rem 1.75rem; }
@media (max-width: 900px) { .result { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.25rem; } }
.chart-card { min-width: 0; }
.chart-title { font-size: 0.98rem; font-weight: 700; color: var(--ink); margin: 0 0 0.2rem; }
.chart-title-2 { margin-top: 1.1rem; }
.legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; }
.legend .k-base { background: var(--base); }
.legend .k-h { background: var(--green); }
.legend .k-tf { background: #fff; box-shadow: inset 0 0 0 2.5px var(--green); }
.legend .k-ref { width: 18px; height: 0; border-radius: 0; border-top: 2px dashed var(--base); }
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); font-variant-numeric: tabular-nums; }
.tip { position: absolute; pointer-events: none; z-index: 5; background: var(--ink); color: #fff; font-size: 0.8rem; line-height: 1.45; padding: 0.45rem 0.65rem; border-radius: 0.45rem; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); font-variant-numeric: tabular-nums; }
.tip b { font-weight: 600; }
.tip span { color: #cfd6d2; }
.chart-note { font-size: 0.82rem; color: var(--light); margin: 0.2rem 0 0; }
.stats { display: grid; gap: 1.1rem; min-width: 0; }
.stat { display: grid; grid-template-columns: 8.2rem minmax(0, 1fr); align-items: baseline; column-gap: 1rem; }
.stat-num { font-size: 2.3rem; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-num.ours { color: var(--green-ink); }
.stat-lab { font-size: 0.98rem; color: var(--muted); line-height: 1.4; }
.stat-lab b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .stat { grid-template-columns: 1fr; row-gap: 0.2rem; } }
details.table { margin: 0.9rem 0 0; }
details.table summary { cursor: pointer; font-size: 0.9rem; color: var(--muted); width: fit-content; }
details.table summary:hover { color: var(--green-ink); }
.table-scroll { overflow-x: auto; margin-top: 0.7rem; }
table { border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; min-width: 34rem; width: 100%; }
th, td { text-align: right; padding: 0.42rem 0.75rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-weight: 600; color: var(--muted); font-size: 0.85rem; border-bottom: 1px solid var(--light); }
tr.ours td { background: var(--green-soft); }
tr.ours td:first-child { font-weight: 600; color: var(--ink); }
tr.ref td { color: var(--muted); }
td.best { font-weight: 700; color: var(--ink); }

/* ---------- qualitative players ---------- */
.gallery { margin-top: 2.2rem; }
.grid-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.7rem; }
.grid-cols { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.grid-cols .ours { color: var(--green-ink); }
.steps-key { display: inline-flex; align-items: center; gap: 0.45rem; margin-left: 0.7rem; font-weight: 500; font-size: 0.82rem; color: var(--muted); }
.steps-key i { width: 0.8rem; height: 0.8rem; border-radius: 3px; display: inline-block; margin-right: 0.2rem; vertical-align: -1px; }
.speed { font-size: 0.82rem; font-weight: 700; color: var(--green-ink); border: 1.5px solid var(--green); border-radius: 999px; padding: 0.15rem 0.75rem; white-space: nowrap; }
.stage { position: relative; width: 100%; }
.stage-video { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0.6rem; background: var(--surface-2); cursor: pointer; display: block; object-fit: cover; }
/* the preloading player stays laid out (so it is ready to show) but invisible */
.stage-video[hidden] { display: block; visibility: hidden; }
.stage-bar { height: 3px; margin-top: 0.4rem; background: var(--border); border-radius: 2px; overflow: hidden; }
.stage-bar i { display: block; height: 100%; width: 0; background: var(--green); }
.tile-cap { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.6rem; font-size: 0.95rem; color: var(--muted); }
.tile-cap .nums { font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: baseline; }
.tile-cap .nums b { color: var(--green-ink); font-weight: 700; }
.tile-cap .count { margin-left: auto; font-size: 0.82rem; color: var(--light); }
.tile-cap .prompt { font-style: italic; color: var(--text); }
.keys { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.6rem; font-style: normal; white-space: nowrap; }
.keys kbd { font-family: var(--font); font-size: 0.74rem; min-width: 1.3rem; text-align: center; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.3rem; color: var(--muted); background: var(--surface); }
.strip { display: flex; gap: 0.6rem; margin-top: 0.9rem; overflow-x: auto; padding: 3px 3px 0.5rem; scrollbar-width: thin; }
.thumb { flex: none; width: 7.6rem; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; font-family: inherit; color: var(--muted); }
.thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0.5rem; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color 0.2s, opacity 0.2s; opacity: 0.7; }
.thumb:hover img { opacity: 1; }
.thumb.active img { opacity: 1; outline-color: var(--green); }
.thumb span { display: block; font-size: 0.76rem; margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
.thumb.active span { color: var(--green-ink); font-weight: 600; }
.method-video video { width: 100%; height: auto; border-radius: 0.9rem; background: #fff; border: 1px solid var(--border); aspect-ratio: 16 / 9; }

.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.2rem 0 1rem; }
.tab { font-family: inherit; font-size: 0.92rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0.45rem 1.1rem; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.tab:hover { color: var(--ink); border-color: var(--light); }
.tab[aria-selected="true"] { background: var(--green); border-color: var(--green); color: #052d16; }
.tab:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 3px; }
.caption { font-size: 0.92rem; color: var(--muted); margin: 0.7rem 0 0; max-width: 56rem; }

/* ---------- ablation ---------- */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-top: 0.6rem; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }

/* ---------- abstract, citation, footer ---------- */
.abstract { font-size: 1.12rem; max-width: 58rem; }
.cite { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1rem 1.1rem; overflow-x: auto; }
.cite pre { margin: 0; font-family: var(--mono); font-size: 0.92rem; line-height: 1.6; color: var(--text); }
.copy-btn { position: absolute; top: 0.6rem; right: 0.6rem; background: #fff; border: 1px solid var(--border); color: var(--muted); padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.78rem; cursor: pointer; font-family: inherit; }
.copy-btn:hover { color: var(--green-ink); border-color: var(--green-line); }
.footer { padding: 2rem 1rem; text-align: center; border-top: 1px solid var(--border); color: var(--light); font-size: 0.88rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
