@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(fonts/archivo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/jbmono.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/jbmono.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* =========================================================
   Holo Index — design tokens (dark-first, light override)
   accents: --hl (acid lime, primary highlight) + --ac (violet, secondary)
   ========================================================= */
:root {
  --bg: #0a0c10;
  --bg-2: #0e1117;
  --surface: #12151c;
  --surface-2: #181c25;
  --ink: #f1f2f5;
  --ink-2: #c5c9d3;
  --muted: #858c9b;
  --line: #222632;
  --line-2: #2e3341;
  --hl: #d4ff3a;        /* lime: set value, active state, No.1 */
  --hl-ink: #0a0c10;
  --hl-text: #d4ff3a;
  --ac: #9d8cff;        /* violet: links, focus, secondary emphasis */
  --ac-soft: rgba(157, 140, 255, .14);
  --grid-line: rgba(255, 255, 255, .045);
  --glow-1: rgba(157, 140, 255, .28);
  --glow-2: rgba(212, 255, 58, .10);
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -12px rgba(0,0,0,.7);
  --shadow-card: 0 18px 40px -14px rgba(0,0,0,.85);
  --holo: linear-gradient(115deg, #ff8ac6 0%, #ffe36e 24%, #7dffcf 46%, #6fd3ff 66%, #a48bff 86%, #ff8ac6 100%);
  /* rarity tiers: text / fill */
  --t0: #9aa1b0; --t0-bg: #1b1f28;
  --t1: #86b9ff; --t1-bg: #13233d;
  --t2: #c4a9ff; --t2-bg: #241a3e;
  --t3: #ffcd5e; --t3-bg: #33270b;
  --r: 6px;              /* surfaces */
  --r-s: 3px;            /* controls, tags */
  --card-r: 4.6%;        /* real TCG card corner */
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f4ef; --bg-2: #ecece5; --surface: #ffffff; --surface-2: #f6f6f1;
  --ink: #0b0d12; --ink-2: #2b2f3a; --muted: #636978; --line: #e1e1d9; --line-2: #cfd0c6;
  --hl: #d4ff3a; --hl-ink: #0a0c10; --hl-text: #4d7a00;
  --ac: #5b45f0; --ac-soft: rgba(91, 69, 240, .10);
  --grid-line: rgba(10, 12, 16, .05);
  --glow-1: rgba(91, 69, 240, .16); --glow-2: rgba(170, 220, 0, .16);
  --shadow: 0 1px 2px rgba(16,20,40,.05), 0 8px 24px -12px rgba(16,20,40,.18);
  --shadow-card: 0 18px 36px -14px rgba(20,20,60,.45);
  --t0: #5d6373; --t0-bg: #ececE6; --t1: #1f55c9; --t1-bg: #e1ebff;
  --t2: #6a2fd0; --t2-bg: #efe6ff; --t3: #8a5300; --t3-bg: #fff0c9;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--sans); font-variation-settings: "wdth" 100; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
abbr { text-decoration: none; }
.wrap { max-width: 1260px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
::selection { background: var(--hl); color: var(--hl-ink); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 28px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.logo-mark { width: 24px; height: 28px; color: var(--ink); }
.logo-word { font: 800 17px/1 var(--sans); font-variation-settings: "wdth" 125; text-transform: uppercase; letter-spacing: .01em; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav a { font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: var(--r-s); white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.theme { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: var(--r-s); cursor: pointer; }
.theme:hover { color: var(--ink); border-color: var(--line-2); }
.theme svg { width: 18px; height: 18px; }
:root[data-theme="dark"] .i-moon, :root[data-theme="light"] .i-sun { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.hero-bg { position: absolute; inset: 0;
  background:
    radial-gradient(38% 70% at 78% 45%, var(--glow-1), transparent 70%),
    radial-gradient(30% 50% at 62% 90%, var(--glow-2), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 30px 48px; }
.crumbs { display: flex; gap: 10px; flex-wrap: wrap; font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 26px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--ink); }
.eyebrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.eyebrow span { font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); border: 1px solid var(--line-2); padding: 6px 8px; border-radius: var(--r-s); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.eyebrow span:first-child { color: var(--ac); border-color: color-mix(in srgb, var(--ac) 45%, transparent); }
h1 { line-height: .92; }
.h1-set { display: block; font-size: clamp(44px, 6.4vw, 88px); font-weight: 900; font-variation-settings: "wdth" 118; text-transform: uppercase; letter-spacing: -.015em; }
.h1-set.is-long { font-size: clamp(38px, 4.9vw, 68px); }
.h1-set.is-xlong { font-size: clamp(32px, 3.9vw, 54px); }
.h1-sub { display: block; margin-top: 12px; font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; font-variation-settings: "wdth" 100; color: var(--ink-2); letter-spacing: 0; line-height: 1.2; }
.lede { font-size: 17px; color: var(--ink-2); margin: 18px 0 26px; max-width: 34em; }

/* ledger strip: one ruled row instead of floating tiles */
.ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.lg { padding: 13px 14px 12px; border-left: 1px solid var(--line-2); min-width: 0; }
.lg:first-child { border-left: 0; }
.lg dt { font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lg dd { margin: 8px 0 4px; font: 800 28px/1 var(--sans); font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.lg > span { display: block; font-size: 12px; color: var(--muted); }
.lg-hl { background: var(--hl); color: var(--hl-ink); border-color: var(--hl); }
.lg-hl dt, .lg-hl > span { color: rgba(10, 12, 16, .62); }
.src { margin: 0; font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* fanned top-3 */
.fan { position: relative; height: 440px; }
.fan-card { position: absolute; top: 46%; left: 50%; width: 236px; margin: 0; border-radius: 12px; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.fan-card img { width: 100%; height: auto; border-radius: 12px; box-shadow: var(--shadow-card); }
.fan-1 { z-index: 3; transform: translate(-50%, -50%); }
.fan-2 { z-index: 2; transform: translate(-108%, -45%) rotate(-10deg); }
.fan-3 { z-index: 1; transform: translate(8%, -45%) rotate(10deg); }
.fan:hover .fan-1 { transform: translate(-50%, -53%); }
.fan:hover .fan-2 { transform: translate(-122%, -45%) rotate(-14deg); }
.fan:hover .fan-3 { transform: translate(22%, -45%) rotate(14deg); }
.fan-tag { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 4; margin: 0; display: flex; align-items: stretch; white-space: nowrap;
  border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); box-shadow: var(--shadow); font-size: 14px; overflow: hidden; }
.fan-tag > span { padding: 8px 10px; display: flex; align-items: center; }
.fan-no { background: var(--hl); color: var(--hl-ink); font: 700 12px var(--mono); }
.fan-name { font-weight: 600; }
.fan-price { font: 800 15px var(--sans); font-variation-settings: "wdth" 112; border-left: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }

/* holo foil sheen — only on foil-tier cards; follows the pointer */
.holo { position: relative; --mx: 50%; --my: 50%; }
.fan-card.holo { position: absolute; }
.holo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0;
  background: radial-gradient(farthest-corner circle at var(--mx) var(--my), rgba(255,255,255,.6), transparent 42%), var(--holo);
  background-size: 100% 100%, 260% 260%; background-position: center, var(--mx) var(--my); transition: opacity .3s; }
.holo:hover::after { opacity: .5; }

/* ---------- section heads ---------- */
.block { padding-block: 52px 0; }
.bh { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.bh h2 { font-size: clamp(22px, 2.6vw, 30px); font-variation-settings: "wdth" 112; }
.bh-meta { margin: 0; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.intro { margin: -4px 0 24px; color: var(--ink-2); max-width: 64em; }

/* ---------- rarity code tag (collector shorthand) ---------- */
.rc { display: inline-block; font: 700 10.5px/1 var(--mono); letter-spacing: .04em; padding: 4px 5px 3px; border-radius: var(--r-s); vertical-align: 1px; cursor: default; }
.rc.t0 { color: var(--t0); background: var(--t0-bg); }
.rc.t1 { color: var(--t1); background: var(--t1-bg); }
.rc.t2 { color: var(--t2); background: var(--t2-bg); }
.rc.t3 { color: var(--t3); background: var(--t3-bg); }
.rc.t4 { color: #0a0c10; background: var(--holo); background-size: 160% 100%; }

/* ---------- chase strip ---------- */
.chase { list-style: none; margin: 0; padding: 0 0 14px; display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.chase-item { scroll-snap-align: start; }
.chase-img { border-radius: 9px; transition: transform .25s; }
.chase-img:has(.noimg) { aspect-ratio: 245/342; display: grid; place-items: center; background: var(--surface); border: 1px dashed var(--line-2); }
.chase-img img { width: 100%; height: auto; border-radius: 9px; box-shadow: var(--shadow-card); }
.chase-item:hover .chase-img { transform: translateY(-4px); }
.chase-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 3px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.chase-rank { grid-row: span 3; font: 700 13px/1 var(--mono); color: var(--muted); padding-top: 3px; }
.is-first .chase-rank { color: var(--hl-ink); background: var(--hl); padding: 4px 5px 3px; border-radius: var(--r-s); align-self: start; }
.chase-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chase-line { font: 500 12px var(--mono); color: var(--muted); display: flex; gap: 8px; align-items: center; }
.chase-price { font: 800 22px/1.15 var(--sans); font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; }
.is-first .chase-price { color: var(--hl-text); }

/* ---------- value map (rarity filter) ---------- */
.vmap { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px 14px 12px; margin-bottom: 14px; }
.vmap-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.vmap-hint { color: var(--muted); font-weight: 500; }
.vbar { display: flex; gap: 2px; height: 10px; margin-bottom: 12px; }
.vbar i { display: block; flex-basis: 0; min-width: 3px; border-radius: 1px; }
.vbar .t0 { background: var(--t0); opacity: .55; } .vbar .t1 { background: var(--t1); }
.vbar .t2 { background: var(--t2); } .vbar .t3 { background: var(--t3); } .vbar .t4 { background: var(--holo); }
.rf-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.rf { flex: none; display: grid; gap: 3px; text-align: left; min-width: 98px; padding: 9px 11px 8px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--bg-2); color: var(--ink); cursor: pointer; font: inherit; }
.rf b { display: flex; align-items: center; gap: 6px; font: 700 13px/1 var(--mono); }
.rf span { font-size: 12px; color: var(--ink-2); line-height: 1.2; }
.rf em { font: 500 11px/1.2 var(--mono); font-style: normal; color: var(--muted); }
.rf:hover { border-color: var(--line-2); }
.rf[aria-pressed="true"] { background: var(--hl); border-color: var(--hl); color: var(--hl-ink); }
.rf[aria-pressed="true"] span, .rf[aria-pressed="true"] em { color: rgba(10,12,16,.7); }
.sw { width: 8px; height: 8px; border-radius: 1px; }
.sw.t0 { background: var(--t0); } .sw.t1 { background: var(--t1); } .sw.t2 { background: var(--t2); } .sw.t3 { background: var(--t3); } .sw.t4 { background: var(--holo); }

/* ---------- toolbar ---------- */
.toolbar { position: sticky; top: 60px; z-index: 20; display: flex; gap: 8px; align-items: center; padding: 10px 0; margin-bottom: 8px; background: var(--bg); flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 0 12px; height: 42px; }
.search svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.search input { border: 0; outline: 0; background: transparent; font: inherit; color: inherit; width: 100%; height: 100%; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
.sortbox { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 0 6px 0 12px; height: 42px; }
.sortbox > label { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sortbox select { border: 0; background: transparent; font: 600 14px var(--sans); color: var(--ink); height: 100%; cursor: pointer; }
.sortbox select option { background: var(--surface); color: var(--ink); }
.sortbox:has(.dd) { padding-right: 0; }
.sortbox:has(.dd.is-open) { border-color: var(--ac); }

/* ---------- custom dropdown (enhanced <select data-dd>) ---------- */
.dd-native { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.dd { position: relative; height: 100%; }
.dd-btn { height: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink); font: 600 14px var(--sans); padding: 0 12px 0 4px; cursor: pointer; white-space: nowrap; }
.dd-btn svg { width: 11px; height: 8px; color: var(--muted); transition: transform .15s; }
.dd.is-open .dd-btn svg { transform: rotate(180deg); color: var(--ink); }
.dd-list { position: absolute; right: -1px; top: calc(100% + 6px); z-index: 40; min-width: 200px; margin: 0; padding: 4px; list-style: none; display: none;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 16px 40px -12px rgba(0,0,0,.55); outline: 0; max-height: 320px; overflow: auto; }
.dd.is-open .dd-list { display: block; animation: ddIn .14s ease-out; }
.dd-list li { position: relative; padding: 9px 12px 9px 30px; border-radius: var(--r-s); font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.dd-list li.is-active { background: var(--surface-2); color: var(--ink); }
.dd-list li[aria-selected="true"] { color: var(--ink); font-weight: 700; }
.dd-list li[aria-selected="true"]::before { content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; background: var(--hl); border-radius: 1px; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- tooltip ---------- */
.tip { position: fixed; left: 0; top: 0; z-index: 100; max-width: 260px; padding: 6px 9px; border-radius: var(--r-s); pointer-events: none;
  background: var(--ink); color: var(--bg); font: 600 12px/1.35 var(--sans); box-shadow: 0 8px 24px -8px rgba(0,0,0,.5); }

/* ---------- native bits ---------- */
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; width: 16px; height: 16px; cursor: pointer; opacity: .55;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / 12px no-repeat; }
input[type="search"]::-webkit-search-cancel-button:hover { opacity: 1; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 2px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.rc[data-tip]:focus-visible { outline-offset: 1px; }
.views { display: flex; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; height: 42px; }
.views button { display: flex; align-items: center; gap: 7px; border: 0; background: var(--surface); font: 600 14px var(--sans); color: var(--muted); padding: 0 13px; cursor: pointer; }
.views button + button { border-left: 1px solid var(--line); }
.views svg { width: 13px; height: 13px; }
.views button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.count { margin: 0 0 0 auto; font: 500 12px var(--mono); color: var(--muted); }

/* ---------- card grid ---------- */
.cards { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 9px; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card-img { aspect-ratio: 245 / 342; border-radius: var(--card-r) / calc(var(--card-r) * 245 / 342); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { font: 500 11px var(--mono); color: var(--muted); text-transform: uppercase; }
.card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; padding: 10px 2px 2px; align-items: center; }
.card-name { grid-column: 1 / -1; font-weight: 700; font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-no { font: 500 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.card-no small { font-size: inherit; opacity: .65; }
.card-rc { justify-self: end; }
.card-rl { display: none; }
.card-price { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 7px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line);
  font: 800 19px/1.1 var(--sans); font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; }
.card-price small { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.card-alt { grid-column: 1 / -1; font: 500 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .02em; min-height: 1.4em; }
.card-alt b { color: var(--ink-2); font-weight: 700; letter-spacing: 0; }
.na { font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; }
.empty { padding: 48px; text-align: center; color: var(--muted); }

/* ---------- list view ---------- */
.list-head { display: none; }
.cards[data-view="list"] { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.cards[data-view="list"] .card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: center; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 7px 14px; }
.cards[data-view="list"] .card:hover { transform: none; background: var(--surface-2); }
.cards[data-view="list"] .card-body { grid-template-columns: 72px minmax(0, 1fr) 220px 120px 170px; gap: 12px; padding: 0; }
.cards[data-view="list"] .card-no { grid-column: 1; grid-row: 1; }
.cards[data-view="list"] .card-name { grid-column: 2; grid-row: 1; }
.cards[data-view="list"] .card-rc { grid-column: 3; grid-row: 1; justify-self: start; display: flex; gap: 8px; align-items: center; }
.cards[data-view="list"] .card-rl { display: inline; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cards[data-view="list"] .card-price { grid-column: 4; grid-row: 1; margin: 0; padding: 0; border: 0; justify-content: flex-end; font-size: 16px; }
.cards[data-view="list"] .card-price small { display: none; }
.cards[data-view="list"] .card-alt { grid-column: 5; grid-row: 1; text-align: right; }
#cards:has(.cards[data-view="list"]) .list-head { display: grid; grid-template-columns: 40px 72px minmax(0, 1fr) 220px 120px 170px; column-gap: 12px;
  padding: 0 15px 8px 15px; margin-top: 14px; font: 700 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.list-head span:nth-child(5), .list-head span:nth-child(6) { text-align: right; }
#cards:has(.cards[data-view="list"]) .cards { margin-top: 0; }

/* ---------- rarity table + faq ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.rtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.rtable th, .rtable td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.rtable thead th { font: 700 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.rtable th.num, .rtable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rtable tbody th { font-weight: 600; }
.rtable tbody th .rc { margin-right: 6px; min-width: 34px; text-align: center; }
.rtable tbody tr:last-child > * { border-bottom: 0; }
.rtable tbody tr:hover { background: var(--surface-2); }
.faq { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 15px 16px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 18px/1 var(--mono); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--hl-text); }
.faq p { margin: 0; padding: 0 16px 16px; color: var(--ink-2); }

/* ---------- more sets ---------- */
.sets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.set-tile { display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 14px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 12px; min-height: 108px; transition: border-color .2s; }
.set-tile:hover { border-color: var(--ac); }
.set-tile img, .set-ph { grid-row: span 3; width: 58px; height: auto; border-radius: 3px; transform: rotate(-4deg); box-shadow: var(--shadow-card); }
.set-ph { aspect-ratio: 245/342; background: var(--holo); opacity: .3; }
.set-name { font-weight: 800; font-size: 16px; line-height: 1.2; font-variation-settings: "wdth" 108; }
.set-meta { font: 500 11.5px var(--mono); color: var(--muted); margin-top: 3px; text-transform: uppercase; }
.set-val { align-self: end; display: flex; align-items: baseline; gap: 7px; font: 800 17px var(--sans); font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; }
.set-val small { font: 500 10.5px var(--mono); text-transform: uppercase; color: var(--muted); }

/* ---------- footer ---------- */
.foot { margin-top: 72px; border-top: 1px solid var(--line); background: var(--bg-2); }
.foot-in { padding-block: 34px 44px; display: grid; gap: 12px; }
.foot-brand { font: 800 15px var(--sans); font-variation-settings: "wdth" 125; text-transform: uppercase; }
.foot-note { margin: 0; font-size: 13px; color: var(--muted); max-width: 72em; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-block: 22px 36px; }
  .fan { height: 340px; margin-top: 14px; }
  .fan-card { width: 180px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .cards[data-view="list"] .card-body { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name price" "meta alt"; gap: 3px 12px; }
  .cards[data-view="list"] .card-name { grid-area: name; white-space: normal; }
  .cards[data-view="list"] .card-no { grid-area: meta; }
  .cards[data-view="list"] .card-rc { grid-area: meta; justify-self: start; margin-left: 64px; }
  .cards[data-view="list"] .card-rl { display: none; }
  .cards[data-view="list"] .card-price { grid-area: price; }
  .cards[data-view="list"] .card-alt { grid-area: alt; }
  #cards:has(.cards[data-view="list"]) .list-head { display: none; }
  #cards:has(.cards[data-view="list"]) .cards { margin-top: 14px; }
}
@media (max-width: 640px) {
  .top-in { gap: 0 10px; height: auto; flex-wrap: wrap; padding-top: 10px; }
  .logo { flex: 1; }
  .nav { order: 3; flex-basis: 100%; margin: 6px -8px 0; padding-bottom: 6px; }
  .toolbar { top: 98px; }
  .logo-word { font-size: 15px; }
  .nav a { padding: 8px 7px; font-size: 14px; }
  .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg:nth-child(3) { border-left: 0; }
  .lg:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .lg dd { font-size: 24px; }
  .lede { font-size: 16px; }
  .fan { height: 270px; }
  .fan-card { width: 140px; }
  .fan-tag { font-size: 13px; bottom: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card { padding: 7px; }
  .card-name { font-size: 14px; }
  .card-price { font-size: 17px; }
  .chase { grid-auto-columns: 150px; gap: 14px; }
  .chase-price { font-size: 19px; }
  .search { flex-basis: 100%; }
  .sortbox { flex: 1; } .sortbox .dd, .sortbox .dd-btn { flex: 1; width: 100%; justify-content: space-between; }
  .count { flex-basis: 100%; margin: 2px 0 0; }
  .views span { display: none; }
  .vmap-hint { display: none; }
}

/* =========================================================
   Step 2 components
   ========================================================= */
.stretch { text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card, .chase-item, .mini, .rk, .sg, .tl-i { position: relative; }
.card .rc, .rk .rc, .mini .rc, .chase-item .rc, .rk-sub a { position: relative; z-index: 2; }
.card-name:hover, .chase-name:hover, .mini-n:hover, .rk-name:hover, .sg-name:hover, .tl-n:hover { color: var(--hl-text); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 13px; }
.b { font-weight: 700; }
a.fan-tag { text-decoration: none; color: inherit; }
a.fan-tag:hover .fan-name { color: var(--hl-text); }
.eyebrow a { font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ac); border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent); padding: 6px 8px; border-radius: var(--r-s); text-decoration: none; }
.eyebrow .eb-r { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; }
.eyebrow span:first-child:not(.eb-r) { color: var(--ac); }
.empty-box { padding: 22px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); margin: 0; }

/* buttons */
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: var(--r-s);
  background: var(--surface); color: var(--ink); font: 700 14px var(--sans); text-decoration: none; transition: border-color .15s, background .15s, transform .15s; }
.btn:hover { border-color: var(--ink-2); transform: translateY(-1px); }
.btn svg { width: 11px; height: 11px; }
.btn-hl { background: var(--hl); color: var(--hl-ink); border-color: var(--hl); }
.btn-hl:hover { border-color: var(--hl); filter: brightness(1.06); }

/* ---------- card page ---------- */
.cp-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.cp-in { position: relative; display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); gap: 56px; align-items: center; padding-block: 34px 48px; }
.cp-art { perspective: 1100px; }
.tilt { border-radius: 4.6% / 3.3%; transition: transform .5s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; will-change: transform; }
.tilt img { width: 100%; height: auto; border-radius: inherit; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06); }
.tilt .noimg { display: grid; place-items: center; aspect-ratio: 245/342; border: 1px dashed var(--line-2); border-radius: inherit; }
.cp-h1 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 900; font-variation-settings: "wdth" 115; line-height: .98; letter-spacing: -.015em; }
.cp-h1 .h1-sub { font-size: clamp(17px, 1.7vw, 22px); margin-top: 10px; }
.cp-ledger { grid-template-columns: 1.3fr 1fr 1fr; margin-top: 24px; }
.cp-ledger .lg > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-intro { margin: 18px 0 0; color: var(--ink-2); max-width: 40em; }
.cp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 44px; align-items: start; }
.tlink { color: var(--ac); text-decoration: none; font: 600 12px var(--mono); }
.tlink:hover { text-decoration: underline; }

/* chart */
.chart { margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px 14px 10px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .ax { font: 500 11px var(--mono); fill: var(--muted); }
.chart-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.chart-now { font: 800 26px var(--sans); font-variation-settings: "wdth" 112; }
.chg { font: 700 12px var(--mono); padding: 3px 6px; border-radius: var(--r-s); }
.chg.up { color: var(--hl-ink); background: var(--hl); } .chg.down { color: #fff; background: #e5484d; }
.hist-empty { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 18px; }
.hist-empty p { margin: 14px 0 0; color: var(--ink-2); }
.hist-line { position: relative; height: 90px; background:
  linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% 22.5px; border-bottom: 1px solid var(--line-2); }
.hist-line i { position: absolute; left: 0; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -1px; background: var(--hl); border-radius: 50%; box-shadow: 0 0 0 6px color-mix(in srgb, var(--hl) 20%, transparent); }
.hist-line::after { content: ""; position: absolute; left: 10px; right: 0; top: 50%; border-top: 2px dashed var(--line-2); }

/* specs + moves */
.specs { margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.specs div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.specs div:last-child { border-bottom: 0; }
.specs dt { font: 700 11px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.specs dd { margin: 0; }
.specs a { color: var(--ac); text-decoration: none; }
.moves { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.moves li { padding: 13px 14px; border-bottom: 1px solid var(--line); }
.moves li:last-child { border-bottom: 0; }
.mv-head { display: flex; align-items: center; gap: 10px; }
.mv-head b { font-size: 15px; }
.mv-tag { font: 700 10.5px var(--mono); text-transform: uppercase; color: var(--t3); background: var(--t3-bg); padding: 4px 6px 3px; border-radius: var(--r-s); }
.dmg { margin-left: auto; font: 800 18px var(--sans); font-variation-settings: "wdth" 112; }
.moves p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.cost { display: inline-flex; gap: 3px; }
.en { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: 800 10px/1 var(--mono); color: #fff; vertical-align: -3px; }
.en-grass { background: #3f9b4a; } .en-fire { background: #e0472c; } .en-water { background: #2d86df; } .en-lightning { background: #f2c200; color: #1a1400; }
.en-psychic { background: #9a4fd0; } .en-fighting { background: #b8632a; } .en-darkness { background: #2e3a46; } .en-metal { background: #8995a0; }
.en-dragon { background: #a98d1f; } .en-fairy { background: #dc66a9; } .en-colorless { background: #d9d9d4; color: #222; }

/* prev / next */
.pn { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin-top: 52px; }
.pn-a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; }
.pn-a:hover { border-color: var(--ac); }
.pn-r { text-align: right; }
.pn-l { font: 700 11px var(--mono); color: var(--muted); text-transform: uppercase; }
.pn-n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-set { align-self: center; font: 600 13px var(--mono); color: var(--ac); text-decoration: none; text-transform: uppercase; }

/* mini tiles */
.minis { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mini { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 8px; transition: border-color .2s; }
.mini:hover { border-color: var(--line-2); }
.mini-img { aspect-ratio: 245/342; border-radius: 4.6% / 3.3%; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.mini-img img { width: 100%; height: 100%; object-fit: cover; }
.mini-b { display: grid; gap: 2px; padding: 8px 2px 2px; }
.mini-n { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-s { font: 500 11px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-p { font: 800 17px var(--sans); font-variation-settings: "wdth" 112; margin-top: 4px; }
.bh-meta a { color: var(--ac); text-decoration: none; }

/* ---------- most valuable ---------- */
.podium { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.pd { display: grid; gap: 0; }
.pd-1 { order: 2; } .pd-2 { order: 1; } .pd-3 { order: 3; }
.pd-img { border-radius: 4.6% / 3.3%; margin: 0 auto -18px; width: 82%; position: relative; z-index: 1; }
.pd-1 .pd-img { width: 100%; }
.pd-img img { width: 100%; height: auto; border-radius: inherit; box-shadow: var(--shadow-card); }
.pd-img .noimg, .feat-fan .noimg { display: grid; place-items: center; aspect-ratio: 245/342; border-radius: inherit; border: 1px solid var(--line-2);
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface-2) 70%, transparent), var(--surface)), var(--holo); background-blend-mode: normal; }
.rk-img:has(.noimg) { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, transparent 4px 8px); border: 1px solid var(--line); }
.pd-base { display: grid; gap: 2px; padding: 26px 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); text-align: center; }
.pd-1 .pd-base { padding-bottom: 26px; border-color: var(--hl); }
.pd-rank { font: 700 11px var(--mono); color: var(--muted); }
.pd-1 .pd-rank { color: var(--hl-text); }
.pd-name { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-price { font: 800 20px var(--sans); font-variation-settings: "wdth" 112; }
.tabs { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--r-s); overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; width: fit-content; max-width: 100%; }
.tabs button { flex: none; display: flex; gap: 8px; align-items: center; border: 0; background: var(--surface); color: var(--ink-2); font: 600 14px var(--sans); padding: 11px 15px; cursor: pointer; }
.tabs button + button { border-left: 1px solid var(--line); }
.tabs button span { font: 500 11px var(--mono); color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tabs button[aria-selected="true"] span { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.rank { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.rk { display: grid; grid-template-columns: 40px 40px minmax(0, 1fr) 56px 110px 110px; gap: 14px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.rk:last-child { border-bottom: 0; }
.rk:hover { background: var(--surface-2); }
.rk-no { font: 700 13px var(--mono); color: var(--muted); }
.rk.is-first .rk-no { color: var(--hl-ink); background: var(--hl); padding: 4px 5px 3px; border-radius: var(--r-s); justify-self: start; }
.rk-img { aspect-ratio: 245/342; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.rk-img img { width: 100%; height: 100%; object-fit: cover; }
.rk-img .noimg { font-size: 0; }
.rk-main { display: grid; min-width: 0; }
.rk-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-sub { font: 500 12px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-sub a { color: var(--ink-2); text-decoration: none; } .rk-sub a:hover { color: var(--ac); }
.rk-v { font: 500 11px var(--mono); color: var(--muted); text-transform: uppercase; }
.rk-p { text-align: right; font: 800 19px var(--sans); font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; }
.rk.is-first .rk-p { color: var(--hl-text); }
.rank-2 { display: grid; grid-template-columns: 1fr 1fr; }
.rank-2 .rk { grid-template-columns: 36px 36px minmax(0, 1fr) 46px 100px; }
.rank-2 .rk:nth-child(odd) { border-right: 1px solid var(--line); }
.rank-2 .rk:nth-last-child(2):nth-child(odd) { border-bottom: 0; }

/* ---------- sets hub ---------- */
.hero-sm .wrap { position: relative; padding-block: 30px 36px; }
.jump { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.jump a { font: 700 12px var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line-2); padding: 8px 10px; border-radius: var(--r-s); background: var(--surface); }
.jump a:hover { color: var(--ink); border-color: var(--ac); }
.setgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.sg { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px; transition: border-color .2s; overflow: hidden; }
.sg:hover { border-color: var(--ac); }
.sg-fan { position: relative; height: 120px; }
.sg-fan:empty { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, transparent 4px 8px); border-radius: var(--r-s); display: grid; place-items: center; }
.sg-fan:empty::after { content: "No card images yet"; font: 600 10px/1.3 var(--mono); text-transform: uppercase; color: var(--muted); text-align: center; padding: 0 10px; background: var(--surface); }
.sg-fan img { position: absolute; width: 66px; height: auto; border-radius: 3px; box-shadow: var(--shadow-card); top: 10px; left: 22px; transition: transform .3s; }
.sgf-1 { z-index: 3; } .sgf-2 { z-index: 2; transform: translateX(-22px) rotate(-9deg); } .sgf-3 { z-index: 1; transform: translateX(22px) rotate(9deg); }
.sg:hover .sgf-2 { transform: translateX(-28px) rotate(-13deg); } .sg:hover .sgf-3 { transform: translateX(28px) rotate(13deg); }
.sg-b { display: grid; align-content: start; gap: 2px; min-width: 0; }
.sg-name { font: 800 17px/1.2 var(--sans); font-variation-settings: "wdth" 108; }
.sg-meta { font: 500 11.5px var(--mono); color: var(--muted); text-transform: uppercase; }
.sg-dl { display: flex; gap: 22px; margin: 10px 0 4px; }
.sg-dl dt { white-space: nowrap; }
.sg-dl dt { font: 700 10px var(--mono); text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.sg-dl dd { margin: 2px 0 0; font: 800 17px var(--sans); font-variation-settings: "wdth" 112; }
.sg-top { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- calendar ---------- */
.next { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); padding: 20px; }
.next-k { margin: 0; font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ac); }
.next-n { margin: 6px 0 0; font: 900 36px/1 var(--sans); font-variation-settings: "wdth" 118; text-transform: uppercase; }
.next-s { margin: 6px 0 16px; color: var(--muted); font-size: 14px; }
.cd { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; background: var(--hl); color: var(--hl-ink); border-radius: var(--r-s); }
.cd-n { font: 900 48px/1 var(--sans); font-variation-settings: "wdth" 118; font-variant-numeric: tabular-nums; }
.cd-l { font: 700 12px var(--mono); text-transform: uppercase; }
.next-dl { margin: 14px 0 0; display: grid; gap: 0; }
.next-dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.next-dl div:last-child { border-bottom: 0; }
.next-dl dt { font: 700 11px/1.9 var(--mono); text-transform: uppercase; color: var(--muted); }
.next-dl dd { margin: 0; font-weight: 600; }
.tl { border-left: 1px solid var(--line-2); margin-left: 6px; }
.tl-y { position: relative; padding: 0 0 18px 26px; }
.tl-yr { position: relative; display: inline-block; font: 800 22px var(--sans); font-variation-settings: "wdth" 112; margin-bottom: 8px; }
.tl-yr::before { content: ""; position: absolute; left: -32px; top: 50%; width: 11px; height: 11px; margin-top: -6px; background: var(--hl); border-radius: 1px; }
.tl-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tl-i { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) 110px; gap: 14px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.tl-i:last-child { border-bottom: 0; }
.tl-i:hover { background: var(--surface-2); }
.tl-d { font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; }
.tl-n { font-weight: 700; }
.tl-m { font-size: 13px; color: var(--muted); }
.tl-v { text-align: right; font: 800 17px var(--sans); font-variation-settings: "wdth" 112; }

/* ---------- home ---------- */
.ledger-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ledger-3 .lg-hl > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feat { display: grid; justify-items: center; text-align: center; gap: 4px; border: 1px solid var(--line-2); border-radius: var(--r); background: color-mix(in srgb, var(--surface) 85%, transparent);
  padding: 18px 18px 20px; text-decoration: none; transition: border-color .2s; }
.feat:hover { border-color: var(--hl); }
.feat-k { justify-self: start; font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ac); }
.feat-fan { position: relative; width: 100%; height: 280px; margin: 6px 0 10px; }
.feat-fan img { position: absolute; left: 50%; top: 50%; width: 170px; height: auto; border-radius: 8px; box-shadow: var(--shadow-card); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.ff-1 { z-index: 3; transform: translate(-50%, -50%); } .ff-2 { z-index: 2; transform: translate(-105%, -46%) rotate(-10deg); } .ff-3 { z-index: 1; transform: translate(5%, -46%) rotate(10deg); }
.feat:hover .ff-2 { transform: translate(-118%, -46%) rotate(-14deg); } .feat:hover .ff-3 { transform: translate(18%, -46%) rotate(14deg); }
.feat-n { font: 900 30px/1 var(--sans); font-variation-settings: "wdth" 118; text-transform: uppercase; }
.feat-m { font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; }
.feat-go { margin-top: 10px; font: 700 13px var(--mono); color: var(--hl-text); text-transform: uppercase; }
.strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 28px; padding: 14px 18px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); text-decoration: none; }
.strip:hover { border-color: var(--ac); }
.strip-k { font: 700 11px var(--mono); text-transform: uppercase; color: var(--ac); letter-spacing: .06em; }
.strip-n { font: 800 19px var(--sans); font-variation-settings: "wdth" 115; text-transform: uppercase; }
.strip-d { color: var(--ink-2); }
.strip-c { font: 700 12px var(--mono); text-transform: uppercase; background: var(--hl); color: var(--hl-ink); padding: 5px 8px; border-radius: var(--r-s); }
.strip-c b { font-size: 14px; }
.strip-go { margin-left: auto; font: 600 12px var(--mono); color: var(--muted); text-transform: uppercase; }

@media (max-width: 980px) {
  .cp-in { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 22px 34px; }
  .cp-art { max-width: 300px; margin: 0 auto; order: 2; }
  .cp-grid { grid-template-columns: minmax(0, 1fr); }
  .podium { margin-top: 18px; }
  .rank-2 { grid-template-columns: 1fr; }
  .rank-2 .rk:nth-child(odd) { border-right: 0; }
  .rank-2 .rk:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line); }
  .feat { margin-top: 18px; }
}
@media (max-width: 640px) {
  .cp-ledger { grid-template-columns: 1fr 1fr; }
  .cp-ledger .lg-hl { grid-column: 1 / -1; }
  .cp-ledger .lg:nth-child(2) { border-left: 0; }
  .cp-ledger .lg:nth-child(n+2) { border-top: 1px solid var(--line-2); }
  .ledger-3 { grid-template-columns: 1fr 1fr; }
  .ledger-3 .lg-hl { grid-column: 1 / -1; grid-row: 1; }
  .ledger-3 .lg:nth-child(1) { border-left: 0; }
  .ledger-3 .lg:nth-child(-n+2) { border-top: 1px solid var(--line-2); }
  .specs div { grid-template-columns: 100px minmax(0, 1fr); }
  .pn { grid-template-columns: 1fr 1fr; }
  .pn-set { grid-column: 1 / -1; grid-row: 2; text-align: center; padding: 6px 0; }
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rk, .rank-2 .rk { grid-template-columns: 28px 34px minmax(0, 1fr) auto; gap: 10px; padding: 8px 12px; }
  .rk-r, .rk-v { display: none; }
  .rk-p { font-size: 16px; }
  .podium { gap: 8px; }
  .pd-name { font-size: 12px; } .pd-price { font-size: 16px; }
  .tl-i { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .tl-d { grid-column: 1; } .tl-n { grid-column: 1; } .tl-m { grid-column: 1; } .tl-v { grid-column: 2; grid-row: 1 / span 3; }
  .next-n { font-size: 28px; }
  .feat-fan { height: 220px; } .feat-fan img { width: 130px; }
  .strip-go { display: none; }
  .sg { grid-template-columns: 92px minmax(0, 1fr); }
  .sg-fan img { width: 56px; left: 18px; }
}

/* ---------- step 3: footer nav, prose pages, 404 ---------- */
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-nav a { font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.prose { max-width: 760px; padding-top: 36px; }
.prose section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.prose section:last-child { border-bottom: 0; }
.prose h2 { font-size: 22px; font-variation-settings: "wdth" 112; margin-bottom: 10px; }
.prose p { margin: 0 0 12px; color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--ac); }
.nf .wrap { padding-block: 56px 72px; }
.nf-code { margin: 0 0 8px; font: 700 14px var(--mono); color: var(--hl-text); letter-spacing: .1em; }

/* ---------- pack value (EV) ---------- */
.ev { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.ev-verdict { display: flex; align-items: baseline; gap: 12px; margin: 0 0 22px; font: 800 clamp(24px, 3vw, 34px)/1.05 var(--sans); font-variation-settings: "wdth" 115; letter-spacing: -.01em; }
.ev-vk { font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 5px 7px; border: 1px solid var(--line-2); border-radius: var(--r-s); transform: translateY(-4px); }
.ev-verdict.v-up { color: var(--hl-text); } .ev-verdict.v-mid { color: var(--t3); } .ev-verdict.v-down { color: #ff6b70; }
:root[data-theme="light"] .ev-verdict.v-down { color: #c62a2f; }
.ev-bars { display: grid; gap: 14px; margin-bottom: 20px; }
.ev-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 76px; align-items: center; gap: 14px; }
.ev-l { font: 600 13px var(--sans); color: var(--ink-2); }
.ev-n { font: 800 20px/1 var(--sans); font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; text-align: right; }
.ev-track { position: relative; height: 22px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10%); border-bottom: 1px solid var(--line-2); }
.ev-fill { position: absolute; left: 0; top: 4px; bottom: 4px; border-radius: 1px; }
.ev-price { background: var(--ink-2); }
.ev-val { background: var(--hl); }
.ev-range { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--hl) 22%, transparent); border-left: 1px dashed var(--hl-text); border-right: 1px dashed var(--hl-text); cursor: help; }
.ev-read { margin: 0 0 10px; color: var(--ink-2); line-height: 1.55; }
.ev-read b { color: var(--ink); }
.ev-h3 { margin: 0 0 12px; font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.ev-h3b { margin-top: 36px; }
.ev-t .is-best th, .ev-t .is-best td { background: color-mix(in srgb, var(--ac) 9%, transparent); }
.ev-t .best { display: block; margin-top: 3px; font: 600 11px var(--mono); color: var(--ac); letter-spacing: .02em; }
.ev-t th a, .ev-odds td a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.ev-t th a:hover, .ev-odds td a:hover { text-decoration-color: var(--ac); }
.ev-odds th[scope=row] { font-weight: 600; }
@media (max-width: 860px) {
  .ev { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .ev-row { grid-template-columns: minmax(0, 1fr) 70px; row-gap: 6px; }
  .ev-l { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .ev-odds thead { display: none; }
  .ev-odds, .ev-odds tbody { display: block; }
  .ev-odds tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .ev-odds th, .ev-odds td { padding: 0; border: 0; white-space: normal; }
  .ev-odds th[scope=row] { grid-column: 1 / -1; margin-bottom: 8px; }
  .ev-odds td.num { text-align: left; }
  .ev-odds td[data-l]::before { content: attr(data-l); display: block; margin-bottom: 3px; font: 600 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
  .ev-odds .ev-best { grid-column: 1 / -1; margin-top: 10px; }
}

/* ---------- header search ---------- */
.sx { position: relative; flex: none; }
.sx-open { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 12px; min-width: 230px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: var(--r-s); cursor: pointer; font: 500 14px var(--sans); }
.sx-open:hover, .sx.is-open .sx-open { border-color: var(--line-2); color: var(--ink-2); }
.sx-open svg { width: 16px; height: 16px; flex: none; }
.sx-lab { flex: 1; text-align: left; }
.sx-kbd { font: 600 11px/1 var(--mono); color: var(--muted); padding: 4px 7px; border: 1px solid var(--line-2); border-radius: var(--r-s); }
.sx-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(600px, calc(100vw - 32px)); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 24px 60px -18px rgba(0,0,0,.75); z-index: 40; overflow: hidden; }
:root[data-theme="light"] .sx-panel { box-shadow: 0 24px 60px -20px rgba(16,20,40,.35); }
.sx-field { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); }
.sx-field svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.sx-field input { flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; background: none; color: var(--ink); font: 500 17px var(--sans); }
.sx-field input::-webkit-search-cancel-button { display: none; }
.sx-x { font: 600 11px/1 var(--mono); color: var(--muted); padding: 5px 7px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: none; cursor: pointer; }
.sx-list { list-style: none; margin: 0; padding: 6px; max-height: min(62vh, 560px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.sx-list:empty { display: none; }
.sx-list a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 10px; border-radius: var(--r-s); text-decoration: none; color: inherit; }
.sx-list li[aria-selected="true"] a, .sx-list a:hover { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--hl); }
.sx-list img, .sx-noimg { width: 36px; height: 50px; border-radius: 2px; object-fit: cover; background: var(--surface); }
.sx-noimg { display: block; border: 1px dashed var(--line-2); }
.sx-t { min-width: 0; display: grid; gap: 3px; }
.sx-n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-m { font: 500 12px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-p { font: 800 15px var(--sans); font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; }
.sx-hint { margin: 0; padding: 12px 16px 14px; font-size: 13px; color: var(--muted); }
.sx-hint b { color: var(--ink-2); font-weight: 600; }
@media (max-width: 980px) {
  .sx-open { min-width: 0; }
  .sx-lab, .sx-kbd { display: none; }
  .sx-open { width: 38px; padding: 0; justify-content: center; }
  .sx { margin-left: auto; }
  .sx-panel { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; }
}

/* ---------- on-page jump links ---------- */
.jump { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; padding-block: 14px; border-bottom: 1px solid var(--line); }
.jump-k { font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-right: 4px; }
.jump a { font: 600 14px var(--sans); color: var(--ink-2); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.jump a:hover { color: var(--ink); border-bottom-color: var(--hl); }
html { scroll-padding-top: 76px; }
@media (max-width: 640px) {
  .jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  html { scroll-padding-top: 160px; }
}
