/* ReviewPulse v2. Style: true-black-flat (tasteskill), gaming identity: an amber "XP" hue on the data only,
   Chakra Petch for the wordmark, headings and figures, IBM Plex for reading. Dark by default, light on request.
   Grid: page padding 32, one gutter 20. */
:root, :root[data-theme="dark"] {
  --frame: #000; --sheet: #000; --card: #111; --raised: #1a1a1a; --active: #2a2a2a;
  --border: #232323; --rule: #1e1e1e; --control: #333;
  --text: #fff; --muted: #b4b4b4; --faint: #949494;
  --primary: #fff; --on-primary: #000; --on-accent: #000;
  --accent: #ffb547; --accent-soft: rgba(255, 181, 71, .12); --accent-ink: #ffcf85; --comp: #6e6e6e;
  --positive: #3fc07a; --negative: #e5566f;
  --pos-bg: rgba(63, 192, 122, .14); --pos-ink: #8be3b0; --neg-bg: rgba(229, 86, 111, .15); --neg-ink: #ffa3b3;
  --warn-bg: rgba(255, 181, 71, .1); --warn-line: rgba(255, 181, 71, .35); --warn-ink: #ffd699;
  --grid: #1f1f1f; --base: #3d3d3d; --dot-lead: #8a8a8a; --dot-peer: #111;
  --scrim: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .55) 55%, rgba(0, 0, 0, .25) 100%);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --frame: #f3f3f1; --sheet: #f3f3f1; --card: #fff; --raised: #f2f2ef; --active: #e6e6e2;
  --border: #e2e2de; --rule: #ececE8; --control: #cfcfca;
  --text: #0d0d0d; --muted: #55555a; --faint: #6b6b6b;
  --primary: #0d0d0d; --on-primary: #fff; --on-accent: #fff;
  --accent: #a85d00; --accent-soft: #fbefdc; --accent-ink: #7a4300; --comp: #a3a3a3;
  --positive: #1e7b4f; --negative: #c4242a;
  --pos-bg: #dcf6e6; --pos-ink: #0c3d22; --neg-bg: #ffe9e7; --neg-ink: #831c1e;
  --warn-bg: #fff6e6; --warn-line: #f2d39a; --warn-ink: #7a4300;
  --grid: #e8e8e4; --base: #c4c4bf; --dot-lead: #7d7d7d; --dot-peer: #fff;
  --scrim: linear-gradient(0deg, #f3f3f1 0%, rgba(243, 243, 241, .7) 50%, rgba(243, 243, 241, .2) 100%);
  color-scheme: light;
}
:root {
  --radius-card: 16px; --radius-control: 999px; --radius-sm: 8px;
  --gap: 20px; --pad: 20px; --control-h: 36px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Chakra Petch", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--frame); color: var(--text); font: 14px/20px var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hud { font-family: var(--mono); font-size: 11px; line-height: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: 60px minmax(0, 1fr); min-height: 100vh; }
.side { grid-row: 1 / 3; display: flex; flex-direction: column; padding: 16px 12px; gap: 18px; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--border); background: var(--frame); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; font: 600 18px/24px var(--display); letter-spacing: .01em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { flex: none; }
.scope { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: inherit; }
.scope:hover { text-decoration: none; border-color: var(--control); }
.scope img { width: 64px; height: 30px; object-fit: cover; border-radius: 4px; background: var(--raised); }
.scope b { display: block; font-weight: 600; font-size: 13px; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scope span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-size: 14px; }
.nav a:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--active); color: var(--text); font-weight: 500; }
.nav a[aria-current="page"] > svg:first-child { color: var(--accent); }
.nav svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav .lock { margin-left: auto; width: 14px; height: 14px; color: var(--faint); }
.nav-sep { margin: 6px 12px 2px; }

.plan { margin-top: auto; border: 1px solid var(--border); background: var(--card); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.plan .row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan b { font: 600 15px/20px var(--display); }
.plan p { margin: 0; font-size: 12px; line-height: 17px; color: var(--muted); }
.plan .links { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; font: 600 10px/20px var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: var(--on-accent); white-space: nowrap; }
.badge.ghost { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--control); }
.badge svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2.2; }

.top { display: flex; align-items: center; gap: 12px; padding: 0 20px 0 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; background: var(--frame); }
.top .menu-btn { display: none; }
.search { position: relative; flex: 1 1 auto; max-width: 520px; }
.search input { width: 100%; height: var(--control-h); padding: 0 14px 0 38px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--card); outline: none; }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search > svg { position: absolute; left: 14px; top: 10px; width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 1.6; }
.suggest { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; background: var(--card); border: 1px solid var(--control); border-radius: 14px; padding: 6px; display: none; }
.suggest.open { display: block; }
.suggest button { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: 10px; text-align: left; cursor: pointer; }
.suggest button:hover, .suggest button[aria-selected="true"] { background: var(--active); }
.suggest img { width: 80px; height: 30px; object-fit: cover; border-radius: 4px; background: var(--raised); }
.suggest .note { padding: 10px; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-h); padding: 0 16px; border-radius: var(--radius-control); border: 1px solid var(--control); background: transparent; cursor: pointer; font-weight: 500; white-space: nowrap; color: var(--text); }
.btn:hover { background: var(--raised); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { opacity: .88; }
.btn.xp { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.xp:hover { opacity: .9; }
.btn.small { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.big { height: 46px; padding: 0 22px; font-size: 15px; }
.btn.icon { width: var(--control-h); padding: 0; }
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
.link-btn.plain { color: var(--muted); font-weight: 400; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-theme="dark"] .theme-light-only, [data-theme="light"] .theme-dark-only { display: none; }

.sheet { padding: 28px 32px 56px; min-width: 0; }

/* ---------- title row ---------- */
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.title-row h1 { margin: 0; font: 600 28px/34px var(--display); letter-spacing: -0.005em; }
.title-row .sub { margin: 8px 0 0; font-size: 15px; line-height: 22px; color: var(--text); max-width: 760px; }
.title-row .meta { margin-top: 8px; font-size: 13px; color: var(--muted); }
.fresh { font-size: 12px; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 8px; padding-top: 6px; }

/* game hero banner */
.hero { position: relative; margin: -28px -32px 24px; padding: 72px 32px 24px; min-height: 260px; display: flex; align-items: flex-end; background: var(--card) center 30% / cover no-repeat; border-bottom: 1px solid var(--border); }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--scrim); }
.hero > * { position: relative; }
.hero .title-row { margin: 0; width: 100%; }
.hero h1 { font-size: 40px; line-height: 44px; }

/* ---------- grid + cards ---------- */
.grid { display: grid; gap: var(--gap); margin-top: var(--gap); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.start { align-items: start; }
.card { border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--pad); min-width: 0; background: var(--card); }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h2 { margin: 0; font: 600 17px/22px var(--display); letter-spacing: .005em; }
.card-h .aside { font-size: 12px; color: var(--muted); text-align: right; }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(var(--k, 6), minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); }
.kpi { padding: 14px 18px 16px; border-left: 1px solid var(--border); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi .l { font-family: var(--mono); font-size: 11px; line-height: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi .v { font: 600 28px/36px var(--display); margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .v small { font-size: 15px; color: var(--muted); margin-left: 2px; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.lead .v { font-size: 34px; color: var(--accent); }
.kpi .v.sm, .kpi.lead .v.sm { font-size: 22px; }
.good { color: var(--positive); }
.bad { color: var(--negative); }

/* tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 10px 10px; white-space: nowrap; }
.tbl td { padding: 10px; border-top: 1px solid var(--rule); vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child { padding-left: 0; }
.tbl th:last-child, .tbl td:last-child { padding-right: 0; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.you td { background: var(--accent-soft); }
.tbl tr.you td:first-child { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.tbl tr.more td { padding: 14px 0 2px; }
.tbl .sub2 { display: block; font-size: 12px; color: var(--muted); line-height: 16px; }
.game-cell { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: center; min-width: 220px; color: var(--text); }
.game-cell img { width: 92px; height: 43px; object-fit: cover; border-radius: 6px; background: var(--raised); }
.game-cell b { font-weight: 500; display: block; line-height: 18px; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; flex: none; }
.pill.pos { background: var(--pos-bg); color: var(--pos-ink); }
.pill.neg { background: var(--neg-bg); color: var(--neg-ink); }
.pill.neutral { background: var(--raised); color: var(--text); border: 1px solid var(--border); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.dash { color: var(--faint); }
.x-btn { border: 0; background: none; color: var(--muted); width: 28px; height: 28px; border-radius: 999px; cursor: pointer; }
.x-btn:hover { background: var(--active); color: var(--text); }

/* inline bars */
.bar { position: relative; height: 8px; background: var(--active); border-radius: 999px; overflow: hidden; min-width: 60px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 999px; }
.bar.neg i { background: var(--negative); }
.bar.grey i { background: var(--comp); }
.share { display: grid; grid-template-columns: 44px minmax(60px, 1fr); gap: 10px; align-items: center; }
.share span { text-align: right; font-variant-numeric: tabular-nums; }

/* findings */
.findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.findings li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-top: 1px solid var(--rule); }
.findings li:first-child { border-top: 0; padding-top: 0; }
.findings .dot { width: 8px; height: 8px; border-radius: 2px; margin-top: 6px; background: var(--comp); transform: rotate(45deg); }
.findings .dot.bad { background: var(--negative); }
.findings .dot.good { background: var(--positive); }
.findings a { font-size: 13px; }

/* theme lists */
.themes { display: flex; flex-direction: column; }
.theme { padding: 12px 0; border-top: 1px solid var(--rule); }
.theme:first-child { border-top: 0; padding-top: 0; }
.theme-top { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; align-items: center; }
.theme-top b { font-weight: 500; }
.theme q { display: block; margin-top: 6px; font-size: 13px; line-height: 19px; color: var(--muted); quotes: "\201C" "\201D"; }
.theme q + .src { font-size: 12px; color: var(--faint); }

details.row { border-top: 1px solid var(--rule); }
details.row summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(120px, 1fr) minmax(120px, 1fr) 70px 20px; gap: 16px; align-items: center; padding: 11px 6px; margin: 0 -6px; border-radius: 8px; }
details.row summary::-webkit-details-marker { display: none; }
details.row summary:hover { background: var(--raised); }
details.row .chev { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 1.6; transition: transform .15s; }
details.row[open] .chev { transform: rotate(90deg); }
.row-head { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(120px, 1fr) minmax(120px, 1fr) 70px 20px; gap: 16px; padding-bottom: 8px; }
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 4px 0 16px; }
.quote { background: var(--raised); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 19px; }
.quote .qmeta { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.quote p { margin: 0; overflow-wrap: anywhere; }
.qcol h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.qcol { display: flex; flex-direction: column; gap: 8px; }

/* segmented */
.seg { display: inline-flex; background: var(--raised); border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.seg button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--active); color: var(--text); font-weight: 500; }

/* charts */
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); font-size: 12px; fill: var(--muted); }
.chart .lbl { fill: var(--text); }
.chart .you-lbl { fill: var(--accent); font-weight: 600; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--base); stroke-width: 1; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

/* forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.field input { height: 40px; border: 1px solid var(--control); border-radius: 10px; padding: 0 12px; background: var(--frame); font-variant-numeric: tabular-nums; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .help { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.well { background: var(--raised); border-radius: 12px; padding: 4px 16px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border); }
.kv:first-child { border-top: 0; }
.kv b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* states */
.skel { display: inline-block; background: var(--active); border-radius: 4px; height: 12px; width: 60%; vertical-align: middle; }
.skel.big { height: 26px; width: 70%; }
.empty { border: 1px dashed var(--control); border-radius: 12px; padding: 14px 16px; color: var(--muted); font-size: 13px; }
.error { display: flex; gap: 12px; align-items: center; justify-content: space-between; border: 1px solid var(--negative); background: var(--neg-bg); border-radius: 12px; padding: 12px 16px; font-size: 13px; color: var(--neg-ink); }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.ok-box { background: var(--pos-bg); color: var(--pos-ink); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.working { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.spin { width: 14px; height: 14px; border: 2px solid var(--active); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

/* locked content */
.locked { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; border-radius: 12px; border: 1px dashed var(--control); background: var(--raised); }
.locked .lk { display: flex; align-items: center; gap: 10px; font: 600 15px/20px var(--display); }
.locked .lk svg { width: 18px; height: 18px; color: var(--accent); }
.locked p { margin: 0; color: var(--muted); font-size: 13px; line-height: 19px; max-width: 520px; }
.locked ul { margin: 0; padding: 0 0 0 18px; color: var(--text); font-size: 13px; line-height: 22px; }
.lock-page { max-width: 760px; }
.lock-page .locked { padding: 28px; gap: 16px; }
.lock-page .locked .lk { font-size: 20px; line-height: 26px; }

/* home */
.home { max-width: 1080px; }
.home-hero { padding: 24px 0 8px; max-width: 760px; }
.home h1 { font: 600 52px/56px var(--display); margin: 14px 0 14px; letter-spacing: -0.01em; }
.home h1 em { font-style: normal; color: var(--accent); }
.home .sub { font-size: 17px; line-height: 26px; color: var(--muted); margin: 0 0 28px; max-width: 620px; }
.home .search { max-width: 640px; }
.home .search input { height: 54px; font-size: 16px; padding-left: 46px; }
.home .search > svg { left: 18px; top: 18px; width: 18px; height: 18px; }
.home .stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 22px; }
.home .stats div { display: flex; flex-direction: column; }
.home .stats b { font: 600 22px/28px var(--display); }
.section-h { font: 600 20px/26px var(--display); margin: 44px 0 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-h .aside { font: 400 13px/18px var(--font); color: var(--muted); }
.capsules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.capsule { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--border); color: var(--text); transition: border-color .15s, transform .15s; }
.capsule:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.capsule .img { aspect-ratio: 460 / 215; background: var(--raised) center / cover no-repeat; }
.capsule .meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.capsule b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.capsule span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.covers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.covers > div { padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.covers b { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 600 16px/22px var(--display); }
.covers > div > span { color: var(--muted); font-size: 13px; line-height: 19px; }
.covers svg.i { color: var(--accent); width: 20px; height: 20px; margin-bottom: 4px; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); max-width: 920px; }
.plan-card { border: 1px solid var(--border); border-radius: 20px; background: var(--card); padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.plan-card.pro { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan-card h2 { margin: 0; font: 600 22px/28px var(--display); display: flex; align-items: center; gap: 10px; }
.price { display: flex; align-items: baseline; gap: 6px; }
.price b { font: 600 48px/52px var(--display); font-variant-numeric: tabular-nums; }
.price span { color: var(--muted); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 20px; }
.ticks svg { width: 16px; height: 16px; margin-top: 2px; stroke: var(--positive); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.plan-card.pro .ticks svg { stroke: var(--accent); }
.plan-card .fine { font-size: 12px; color: var(--muted); line-height: 17px; }
.cmp-tbl td:not(:first-child), .cmp-tbl th:not(:first-child) { text-align: center; width: 120px; }
.cmp-tbl .yes { color: var(--accent); }
.cmp-tbl .no { color: var(--faint); }
.faq { max-width: 920px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.faq div { padding: 16px 0; border-top: 1px solid var(--rule); }
.faq b { display: block; margin-bottom: 4px; }
.faq span { color: var(--muted); font-size: 13px; line-height: 19px; }
.restore { max-width: 920px; }
.restore form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.return-box { max-width: 560px; margin: 40px 0; }
.return-box h1 { font: 600 34px/40px var(--display); margin: 14px 0 10px; }

/* report / print */
.report-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 16px; border-bottom: 2px solid var(--text); margin-bottom: 8px; }
.report-head .who { text-align: right; font-size: 13px; line-height: 19px; }
.report-head h1 { font-family: var(--display); }
.report-section { margin-top: 32px; break-inside: auto; }
.report-section > h2 { font: 600 19px/24px var(--display); margin: 0 0 6px; }
.cta { margin-top: 32px; padding: 18px 20px; border-radius: var(--radius-card); background: var(--accent-soft); display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.cta b { display: block; font-size: 15px; }
.foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.foot a { color: var(--muted); }

/* ---------- tablet + phone ---------- */
@media (max-width: 1180px) {
  .g-21 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(3n + 1) { border-left: 0; }
  .kpi:nth-child(n + 4) { border-top: 1px solid var(--border); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capsules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: 60px minmax(0, 1fr); }
  .side { position: fixed; inset: 0; z-index: 50; height: auto; padding: 16px; display: none; border-right: 0; }
  .side.open { display: flex; }
  .side .close-nav { display: inline-flex; }
  .top { padding: 0 12px; }
  .top .menu-btn { display: inline-flex; width: 40px; padding: 0; }
  .sheet { padding: 20px 16px 40px; }
  .hero { margin: -20px -16px 20px; padding: 64px 16px 18px; min-height: 220px; }
  .hero h1 { font-size: 30px; line-height: 34px; }
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .top-actions .btn span { display: none; }
  .top-actions .btn:not(.keep) { width: 40px; padding: 0; }
  .plans, .faq { grid-template-columns: minmax(0, 1fr); }
  .covers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capsules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.close-nav { display: none; align-self: flex-end; }
@media (max-width: 640px) {
  .search { max-width: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-left: 0 !important; border-top: 1px solid var(--border); padding: 12px 14px; }
  .kpi:nth-child(1), .kpi:nth-child(2) { border-top: 0; }
  .kpi:nth-child(2n) { border-left: 1px solid var(--border) !important; }
  .kpi .v { font-size: 22px; line-height: 28px; }
  .kpi.lead .v { font-size: 26px; }
  .title-row { flex-direction: column; gap: 8px; }
  .title-row h1 { font-size: 24px; line-height: 30px; }
  .home h1 { font-size: 36px; line-height: 40px; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
  .tbl.stack td { border: 0; padding: 0 !important; background: none !important; box-shadow: none !important; }
  .tbl.stack td.hide-s { display: none; }
  .tbl.stack td[data-l]::before { content: attr(data-l) " "; color: var(--muted); font-size: 12px; }
  .tbl.stack td.full { grid-column: 1 / -1; }
  .tbl.stack tr.you { background: var(--accent-soft); padding: 12px 8px; border-radius: 8px; }
  .game-cell { min-width: 0; grid-template-columns: 72px minmax(0, 1fr); }
  .game-cell img { width: 72px; height: 34px; }
  details.row summary, .row-head { grid-template-columns: minmax(0, 1fr) 90px 20px; }
  details.row summary .hide-s, .row-head .hide-s { display: none; }
  .quotes { grid-template-columns: minmax(0, 1fr); }
  .covers { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .theme-top { grid-template-columns: minmax(0, 1fr) 110px; }
  .cta { flex-direction: column; align-items: flex-start; }
  .top-actions .btn.copy { display: none; }
  .restore form { grid-template-columns: minmax(0, 1fr); }
  .cmp-tbl td:not(:first-child), .cmp-tbl th:not(:first-child) { width: 64px; }
}

@media print {
  :root, :root[data-theme] {
    --frame: #fff; --sheet: #fff; --card: #fff; --raised: #f4f4f2; --active: #e6e6e2; --border: #dcdcd8; --rule: #ececE8; --control: #cfcfca;
    --text: #0d0d0d; --muted: #55555a; --faint: #6b6b6b; --accent: #a85d00; --accent-soft: #fbefdc; --accent-ink: #7a4300; --comp: #a3a3a3;
    --positive: #1e7b4f; --negative: #c4242a; --pos-bg: #dcf6e6; --pos-ink: #0c3d22; --neg-bg: #ffe9e7; --neg-ink: #831c1e;
    --grid: #e8e8e4; --base: #c4c4bf; --dot-lead: #7d7d7d; --dot-peer: #fff; color-scheme: light;
  }
  @page { size: A4; margin: 14mm 12mm; }
  html, body { background: #fff; font-size: 11.5px; line-height: 16px; }
  .side, .top, .no-print, .foot { display: none !important; }
  .shell { display: block; }
  .sheet { padding: 0; }
  .card, .kpis, details.row, .report-section .grid > * { break-inside: avoid; }
  .grid { gap: 14px; margin-top: 14px; }
  .g-21 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpi { border-top: 0 !important; border-left: 1px solid var(--border) !important; padding: 8px 10px; }
  .kpi:first-child { border-left: 0 !important; }
  .kpi .v { font-size: 18px; line-height: 24px; }
  .kpi.lead .v { font-size: 20px; }
  .card { padding: 12px; border-radius: 8px; }
  details.row summary { padding: 6px 0; }
  a { color: var(--text); }
  h2 { break-after: avoid; }
  .tbl { font-size: 10px; }
  .tbl td { padding: 5px 6px; }
  .tbl th { padding: 0 6px 5px; font-size: 8.5px; }
  .tbl .sub2 { font-size: 9px; line-height: 12px; }
  .game-cell { min-width: 0; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; }
  .game-cell img { width: 58px; height: 27px; }
  div[style*="overflow-x"] { overflow: visible !important; }
}
