/* Layout: report column (max 72ch) with sticky section index on wide screens; tools pages use full width.
   Color: cool slate neutrals, one cobalt accent; chart series = dataviz reference slots 1 (blue) and 2 (orange). */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --fg: #151a22;
  --fg-2: #444d5b;
  --muted: #697383;
  --line: #dde2e9;
  --line-strong: #c4cbd6;
  --accent: #1d58b8;
  --accent-soft: #e3ecfa;
  --code-bg: #f0f2f6;
  --good: #0b7a3b;
  --good-soft: #e1f3e8;
  --bad: #b42323;
  --bad-soft: #fbe6e4;
  --warn: #8a5a00;
  --warn-soft: #fbf0d9;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-same: #98a1ae;
  --series-split: #ccd2db;
  --grid: #e1e4ea;
  --axis: #c3c8d1;
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "D2Coding", Menlo, Consolas, monospace;
  --radius: 6px;
  --measure: 46rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116;
    --surface: #161a21;
    --surface-2: #1d222b;
    --fg: #e7eaef;
    --fg-2: #b8bfca;
    --muted: #8d96a4;
    --line: #2a303b;
    --line-strong: #3a4250;
    --accent: #79a9ff;
    --accent-soft: #1b2a44;
    --code-bg: #1b2029;
    --good: #4cc27c;
    --good-soft: #15301f;
    --bad: #ff8a80;
    --bad-soft: #3a1d1c;
    --warn: #e0b45a;
    --warn-soft: #352a12;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-same: #959ca6;
    --series-split: #3a414d;
    --grid: #262b34;
    --axis: #3a414d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116;
  --surface: #161a21;
  --surface-2: #1d222b;
  --fg: #e7eaef;
  --fg-2: #b8bfca;
  --muted: #8d96a4;
  --line: #2a303b;
  --line-strong: #3a4250;
  --accent: #79a9ff;
  --accent-soft: #1b2a44;
  --code-bg: #1b2029;
  --good: #4cc27c;
  --good-soft: #15301f;
  --bad: #ff8a80;
  --bad-soft: #3a1d1c;
  --warn: #e0b45a;
  --warn-soft: #352a12;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-same: #959ca6;
  --series-split: #3a414d;
  --grid: #262b34;
  --axis: #3a414d;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (max-width: 620px) { html { scroll-padding-top: 12px; } }
a, button, summary, select, input, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
code, pre, kbd { font-family: var(--font-mono); font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.08em 0.35em; border-radius: 4px; }
pre code { background: none; padding: 0; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 8px; z-index: 30; background: var(--surface); padding: 6px 10px; }

/* Header + nav */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-head-inner {
  max-width: 82rem; margin: 0 auto;
  padding-block: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px;
}
.brand { font-weight: 700; color: var(--fg); text-decoration: none; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 500; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: inline-block; padding: 4px 9px; border-radius: 5px;
  color: var(--fg-2); text-decoration: none; font-size: 14px; line-height: 1.5;
}
.nav a:hover { background: var(--surface-2); color: var(--fg); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Page frame */
.wrap {
  max-width: 82rem; margin: 0 auto;
  padding-block: 28px 64px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 1100px) {
  .doc-grid { grid-template-columns: 15rem minmax(0, var(--measure)); justify-content: center; }
  .doc-grid.wide { grid-template-columns: 13rem minmax(0, 66rem); }
}
.toc { display: none; }
@media (min-width: 1100px) {
  .toc { display: block; position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; font-size: 13.5px; line-height: 1.5; }
  .toc p { margin: 0 0 8px; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
  .toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .toc li.l3 { padding-left: 12px; }
  .toc a { display: block; padding: 3px 8px; border-radius: 4px; color: var(--fg-2); text-decoration: none; border-left: 2px solid transparent; }
  .toc a:hover { color: var(--fg); background: var(--surface-2); }
}
.prose { min-width: 0; max-width: var(--measure); }
.prose.wide { max-width: none; }

/* Type scale */
h1, h2, h3, h4 { text-wrap: balance; letter-spacing: -0.015em; line-height: 1.35; color: var(--fg); }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.15rem); font-weight: 750; margin: 0 0 0.6em; }
h2 { font-size: 1.4rem; font-weight: 700; margin: 2.4em 0 0.7em; padding-top: 0.6em; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
h3 { font-size: 1.12rem; font-weight: 680; margin: 2em 0 0.6em; scroll-margin-top: 80px; }
h4 { font-size: 1rem; font-weight: 650; margin: 1.6em 0 0.5em; scroll-margin-top: 80px; }
h1 + h2, .lede + h2 { border-top: 0; }
p, ul, ol, blockquote, dl { margin: 0 0 1em; }
ul, ol { padding-left: 1.35em; }
li { margin: 0.2em 0; }
li > ul, li > ol { margin: 0.25em 0 0.35em; }
strong { font-weight: 680; }
.lede { color: var(--fg-2); font-size: 1.02rem; }
.meta-line { color: var(--muted); font-size: 13.5px; margin: -0.4em 0 1.4em; }
.small { font-size: 13.5px; color: var(--muted); }
blockquote { margin-left: 0; padding: 0.4em 1em; border-left: 3px solid var(--line-strong); color: var(--fg-2); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
blockquote h3 { margin-top: 0.6em; font-size: 1rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* Conclusion block on index */
.conclusion { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px 6px; margin: 0 0 1.5em; }
.conclusion h2 { margin-top: 0; border-top: 0; padding-top: 0; font-size: 1.15rem; }
.conclusion ol { padding-left: 1.4em; }
.conclusion li { margin: 0.45em 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 0; }
table { overflow-wrap: normal; border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.55; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-weight: 650; color: var(--fg); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td { min-width: 4.5em; }
td:first-child { font-weight: 560; }
.table-wrap.wide-cells td { min-width: 9em; }
table.compact th, table.compact td { padding: 5px 8px; font-size: 13px; }
caption { caption-side: top; text-align: left; padding: 8px 10px; color: var(--muted); font-size: 13px; }

/* Code */
.code-wrap { position: relative; margin: 0 0 1.2em; }
pre { margin: 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; line-height: 1.55; font-size: 12.8px; tab-size: 2; }
pre.wrap-text { white-space: pre-wrap; word-break: break-word; }
.copy-btn {
  position: absolute; top: 6px; right: 6px;
  font: 500 12px/1 var(--font-sans); padding: 6px 9px; border-radius: 5px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg-2); cursor: pointer;
}
.copy-btn:hover { color: var(--fg); border-color: var(--muted); }
.raw { max-height: 32rem; overflow: auto; }

/* Details */
details { margin: 0 0 0.8em; }
details > summary { cursor: pointer; color: var(--fg); font-weight: 600; padding: 4px 0; list-style-position: inside; }
details > summary:hover { color: var(--accent); }
details[open] > summary { margin-bottom: 0.5em; }
details.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; }
details.box > summary { font-weight: 600; }

/* Chips + badges */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12.5px; line-height: 1.6; border: 1px solid var(--line-strong); color: var(--fg-2); background: var(--surface); white-space: normal; max-width: 100%; font-variant-numeric: tabular-nums; }
.chip.accent { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.chip.good { border-color: transparent; background: var(--good-soft); color: var(--good); }
.chip.bad { border-color: transparent; background: var(--bad-soft); color: var(--bad); }
.chip.warn { border-color: transparent; background: var(--warn-soft); color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* Charts (HTML-positioned so text stays readable at phone width) */
.fig { margin: 0.4em 0 1.6em; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 16px 12px; }
.fig-title { font-weight: 650; margin: 0 0 2px; font-size: 15px; }
.fig-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.fig-note { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--fg-2); margin: 0 0 10px; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.sw.line { height: 2px; width: 14px; border-radius: 1px; }
.sw.dot { border-radius: 50%; }

.forest { display: grid; grid-template-columns: minmax(5.5rem, 9rem) minmax(0, 1fr) auto; gap: 0 10px; align-items: center; font-size: 13px; }
.forest .lab { color: var(--fg); font-weight: 560; padding: 7px 0; line-height: 1.35; }
.forest .val { color: var(--fg-2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.track { position: relative; height: 30px; }
.track .zero { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--axis); }
.track .grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.track .ci { position: absolute; top: 14px; height: 2px; background: var(--series-1); border-radius: 1px; }
.track .ci::before, .track .ci::after { content: ""; position: absolute; top: -4px; width: 2px; height: 10px; background: var(--series-1); border-radius: 1px; }
.track .ci::before { left: 0; }
.track .ci::after { right: 0; }
.track .pt { position: absolute; top: 9px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--series-1); box-shadow: 0 0 0 2px var(--surface); cursor: default; }
.track .pt.hollow { background: var(--surface); border: 2px solid var(--series-1); }
.track .pt.flat { background: var(--series-same); }
.axis-row { position: relative; height: 18px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.axis-row span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.axis-cap { font-size: 11.5px; color: var(--muted); text-align: center; }
@media (max-width: 620px) {
  .forest { grid-template-columns: minmax(0, 1fr) auto; grid-auto-flow: row dense; }
  .forest .lab { padding: 6px 0 0; }
  .forest .val { padding-top: 6px; }
  .forest .track, .forest .axis-row, .forest .axis-cap { grid-column: 1 / -1; }
  .forest .track { order: 0; }
  .forest .sp { display: none; }
  .stack-row, .bar-group { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .site-head { position: static; }
}

.stack-rows { display: grid; gap: 10px; }
.stack-row { display: grid; grid-template-columns: minmax(5.5rem, 9rem) minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13px; }
.stack { display: flex; gap: 2px; height: 26px; }
.stack .seg { height: 100%; border-radius: 4px; display: flex; align-items: center; padding-left: 6px; font-size: 12px; font-weight: 600; color: #fff; min-width: 0; overflow: visible; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stack .seg.light { color: #151a22; }
.stack .seg.x { background: var(--series-1); }
.stack .seg.y { background: var(--series-2); }
.stack .seg.same { background: var(--series-same); color: #151a22; }
.stack .seg.split { background: var(--series-split); color: var(--fg); }

.bars { display: grid; gap: 4px; font-size: 13px; }
.bar-group { display: grid; grid-template-columns: minmax(5.5rem, 10rem) minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--grid); }
.bar-group:last-child { border-bottom: 0; }
.bar-group .lab { font-weight: 560; line-height: 1.35; }
.bar-lines { display: grid; gap: 4px; }
.bar-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar { height: 14px; border-radius: 0 4px 4px 0; flex: none; }
.bar.s1 { background: var(--series-1); }
.bar.s2 { background: var(--series-2); }
.bar.zero { width: 0; }
.bar-val { color: var(--fg-2); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.funnels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 760px) { .funnels { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.funnel h4 { margin: 0 0 8px; font-size: 14px; }
.f-step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin-bottom: 8px; font-size: 13px; }
.f-step .f-lab { display: flex; justify-content: space-between; gap: 8px; color: var(--fg-2); }
.f-step .f-lab b { color: var(--fg); font-variant-numeric: tabular-nums; font-weight: 650; }
.f-bar { height: 12px; background: var(--series-2); border-radius: 0 4px 4px 0; min-width: 0; }
.f-bar.base { background: var(--series-same); }
.f-bar.none { height: 12px; background: none; }
.f-bar:not(.none) { min-width: 3px; }

.tip { position: fixed; z-index: 40; pointer-events: none; background: var(--fg); color: var(--bg); font-size: 12.5px; line-height: 1.45; padding: 6px 9px; border-radius: 5px; max-width: 18rem; box-shadow: 0 4px 14px rgba(0,0,0,0.18); }

/* Cards (decisions) */
.acard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 18px 8px; margin: 0 0 18px; scroll-margin-top: 80px; }
.acard > h3 { margin: 14px 0 8px; }
.acard > ul { list-style: none; padding-left: 0; }
.acard > ul > li { padding: 8px 0; border-top: 1px solid var(--line); margin: 0; }
.acard > ul > li:first-child { border-top: 0; }
.acard > ul > li > ul { padding-left: 1.2em; list-style: disc; }
.a-index { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1.4em; padding: 0; list-style: none; }
.a-index a { display: inline-block; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 6px; text-decoration: none; color: var(--fg-2); font-size: 13.5px; background: var(--surface); }
.a-index a:hover { border-color: var(--accent); color: var(--accent); }
.a-index b { color: var(--fg); margin-right: 4px; }

/* Tool pages */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
.field { display: grid; gap: 3px; font-size: 13px; color: var(--fg-2); min-width: 0; }
.field input[type="search"], .field select { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--fg); min-width: 0; max-width: 100%; }
.field input[type="search"] { width: 16rem; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--fg); padding-bottom: 6px; }
.count { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.btn { font: inherit; font-size: 13.5px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); cursor: pointer; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--surface); }

.explore-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1100px) { .explore-grid { grid-template-columns: 24rem minmax(0, 1fr); align-items: start; } .list-pane { position: sticky; top: 70px; max-height: calc(100vh - 86px); overflow-y: auto; } }
.list-pane { min-width: 0; }
.rlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rlist > li { content-visibility: auto; contain-intrinsic-size: auto 96px; }
.rlist button { all: unset; box-sizing: border-box; display: grid; gap: 3px; width: 100%; padding: 8px 10px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; line-height: 1.45; }
.rlist button:hover { border-color: var(--line-strong); }
.rlist button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rlist button[aria-current="true"] { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.rlist .rn { font-weight: 650; color: var(--fg); font-variant-numeric: tabular-nums; }
.rlist .pv { color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.detail-pane { min-width: 0; }
.empty-state { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 24px; color: var(--fg-2); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0 0 14px; min-width: 0; }
.panel > h2, .panel > h3 { margin-top: 0; border-top: 0; padding-top: 0; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 14px; font-size: 13.5px; margin: 0 0 0.8em; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; }
.input-text { white-space: pre-wrap; font-size: 14px; line-height: 1.65; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; max-height: 22rem; overflow: auto; margin: 0; font-family: var(--font-sans); }

/* Result image rows */
.place-row { margin: 0 0 18px; }
.place-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 6px; font-size: 13.5px; }
.place-head b { font-weight: 650; }
.img-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.cell { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-width: 0; font-size: 12.8px; line-height: 1.5; display: grid; gap: 6px; align-content: start; }
.cell-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.cell-head .cond { font-weight: 700; font-size: 14px; }
.shot { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); object-fit: contain; cursor: zoom-in; }
button.shot-btn { all: unset; display: block; cursor: zoom-in; border-radius: 4px; }
button.shot-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.noimg { display: grid; place-items: center; aspect-ratio: 16 / 9; border: 1px dashed var(--line-strong); border-radius: 4px; color: var(--muted); font-size: 12px; text-align: center; padding: 8px; }
.cell ul { margin: 0; padding-left: 1.1em; }
.cell details { margin: 0; }
.cell details > summary { font-weight: 560; font-size: 12.8px; }
.same-note { font-size: 13px; color: var(--fg-2); background: var(--surface-2); border-radius: 6px; padding: 8px 10px; margin: 0 0 12px; }

.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 700px) { .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pair figure { margin: 0; min-width: 0; }
.pair figcaption { font-size: 12.8px; color: var(--fg-2); margin-top: 4px; }

dialog.lightbox { overscroll-behavior: contain; border: 0; padding: 0; background: transparent; max-width: min(96vw, 1400px); }
dialog.lightbox::backdrop { background: rgba(8, 10, 14, 0.82); }
dialog.lightbox img { display: block; max-width: 100%; max-height: 86vh; width: auto; height: auto; border-radius: 6px; background: #fff; }
dialog.lightbox .lb-bar { display: flex; justify-content: space-between; gap: 10px; color: #e7eaef; font-size: 13px; padding: 6px 2px; }
dialog.lightbox button { font: inherit; font-size: 13px; background: #222833; color: #e7eaef; border: 1px solid #3a4250; border-radius: 5px; padding: 4px 10px; cursor: pointer; }

/* L3 cards */
.fav { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; scroll-margin-top: 80px; }
.fav > summary { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; font-weight: 400; list-style: none; }
.fav > summary::-webkit-details-marker { display: none; }
.fav > summary .thumb { width: 96px; height: 60px; object-fit: contain; background: var(--surface-2); border-radius: 4px; border: 1px solid var(--line); }
.fav > summary .t1 { font-weight: 650; color: var(--fg); }
.fav > summary .t2 { font-size: 13px; color: var(--fg-2); }
.fav[open] > summary { padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.steps > * { min-width: 0; }
.step > h4 { margin: 0 0 6px; font-size: 14px; color: var(--fg); }
.step > h4 .arrow { color: var(--muted); font-weight: 500; }
.do-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.do-grid figure { margin: 0; font-size: 12.5px; color: var(--fg-2); }
.do-grid img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; }
.split2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.split2 > * { min-width: 0; }
@media (min-width: 860px) { .split2 { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.do-hero img { width: 100%; height: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; }

.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-foot .wrap { padding-block: 18px 28px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .track .pt, .stack .seg, .bar, .f-bar { forced-color-adjust: none; }
}
