/* ===========================================================================
   dataseries.org — design system (ported from Claude Design handoff)
   Brand reuse: blockr.marketing. Inter everywhere, weight-based hierarchy.
   The selected/active series carries the brand colour (red shoe metaphor);
   the series palette is the original dataseries.org grey-first rotation.
   =========================================================================== */

:root {
  --brand:     #0072B2;  /* logo blue */
  --accent:    #3451b2;  /* indigo — links, buttons, active UI */
  --highlight: #c0392b;  /* red */
  --highlight-soft: #f7e4e1;
  --fg:        #3c3c43;  /* soft near-black */
  --muted:     #67676c;
  --faint:     #9a9aa0;
  --bg:        #ffffff;
  --bg-alt:    #f6f6f7;
  --bg-tint:   #fafafb;
  --card:      #ffffff;
  --line:      #e2e8f0;
  --line-soft: #eef1f5;

  --r-card: 14px;
  --r-input: 8px;
  --r-chip: 999px;
  --shadow: 0 2px 10px rgba(15,23,42,.06);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.12);
  --shadow-pop: 0 6px 24px rgba(15,23,42,.10);

  --maxw: 1160px;
  --ease: cubic-bezier(.22,.61,.36,1);

  /* same-origin assets (plumber2 serves www/) */
  --hero-img: url("assets/hero.jpg");
  --logo-img: url("assets/logo.png");
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.45px; line-height: 1.08; margin: 0; color: var(--fg); text-wrap: balance; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--highlight-soft); color: var(--highlight); }

.hidden { display: none !important; }
#app { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; width: 100%; }
.grow { flex: 1; }

/* ---- Header ------------------------------------------------------------- */
.hdr { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line-soft); }
.hdr-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.wordmark { display: flex; align-items: center; gap: 10px; font-size: 18px; letter-spacing: -0.5px; color: var(--fg); cursor: pointer; user-select: none; }
.logo-mark { width: 30px; height: 28px; flex: 0 0 auto; margin-right: 1px; background: var(--logo-img) center/contain no-repeat; filter: drop-shadow(0 1px 1px rgba(15,23,42,.18)); }
.wordmark b { font-weight: 700; }
.wordmark .wm-sub { font-weight: 500; color: var(--muted); }
.tag { font-size: 11px; font-weight: 600; letter-spacing: .3px; text-transform: lowercase; color: var(--accent); background: #eef0fb; border: 1px solid #dde1f7; padding: 2px 7px; border-radius: var(--r-chip); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav-link { background: none; border: none; padding: 0; font-family: inherit; font-size: 14px; font-weight: 500; letter-spacing: -0.2px; color: var(--muted); text-decoration: none; transition: color .14s var(--ease); cursor: pointer; }
.nav-link:hover { color: var(--fg); text-decoration: none; }

/* ---- Buttons / chips ---------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; font-size: 14px; font-weight: 600; letter-spacing: -0.2px; border-radius: var(--r-input); border: 1px solid transparent; padding: 9px 15px; transition: all .16s var(--ease); white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2c44a0; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 6px 12px; border-radius: var(--r-chip); transition: all .14s var(--ease); cursor: pointer; }
.chip:hover { border-color: #c9d2de; color: var(--fg); background: var(--bg-tint); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .4px; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; border: 1px solid transparent; white-space: nowrap; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace; }
.tnum { font-variant-numeric: tabular-nums; }
.fade-up { animation: fadeUp .5s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- Search input ------------------------------------------------------- */
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 8px 0 16px; box-shadow: var(--shadow); transition: border-color .14s var(--ease), box-shadow .14s var(--ease); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52,81,178,.13), var(--shadow); }
.search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: inherit; font-size: 15.5px; color: var(--fg); padding: 12px 0; }
.search input::placeholder { color: var(--faint); }
.search-ic { color: var(--faint); display: flex; flex: 0 0 auto; }
.search-clear { border: none; background: transparent; color: var(--faint); display: flex; padding: 6px; border-radius: 6px; flex: 0 0 auto; cursor: pointer; }
.search-clear:hover { color: var(--fg); background: var(--bg-alt); }
.search-go { margin-left: 4px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 11px; border: none; cursor: pointer; transition: background .16s var(--ease), color .16s var(--ease); }
.search-go-minimal { background: transparent; color: var(--muted); }
.search-go-minimal:hover { background: var(--bg-alt); color: var(--fg); }
.search-big { border-radius: 14px; padding: 7px 8px 7px 20px; box-shadow: var(--shadow-lg); }
.search-big input { font-size: 17px; padding: 15px 0; }
.search-big .search-ic { color: var(--muted); }

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; display: flex; align-items: center; overflow: visible; min-height: clamp(470px, 60vh, 640px); background: #59707a; }
.hero-media { position: absolute; inset: 0; background-image: var(--hero-img); background-size: cover; background-position: 58% 78%; background-repeat: no-repeat; background-color: #59707a; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(98deg, rgba(26,44,52,.62) 0%, rgba(26,44,52,.34) 34%, rgba(26,44,52,0) 60%), linear-gradient(0deg, rgba(26,44,52,.30) 0%, rgba(26,44,52,0) 22%); }
.hero-inner { position: relative; z-index: 2; width: 100%; padding: clamp(40px,6vh,80px) 32px; }
.hero-copy { max-width: 560px; }
.hero-eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: rgba(255,255,255,.82); margin-bottom: 18px; display: inline-flex; align-items: center; gap: 9px; }
.hero-eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--highlight); display: inline-block; }
.hero-h1 { color: #fff; font-size: clamp(33px, 4.6vw, 56px); letter-spacing: -1.2px; line-height: 1.03; text-shadow: 0 1px 24px rgba(20,36,44,.4); }
.hero-sub { color: rgba(255,255,255,.92); font-size: clamp(15px, 1.4vw, 17.5px); line-height: 1.55; max-width: 470px; margin-top: 18px; text-shadow: 0 1px 16px rgba(20,36,44,.35); }
.hero-search { margin-top: 30px; max-width: 560px; position: relative; }
.hero-drop { text-align: left; max-height: 420px; }
.hero-eg { margin-top: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-eg > span { font-size: 13px; color: rgba(255,255,255,.78); font-weight: 500; }
.hero-eg-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-eg { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.32); color: #fff; backdrop-filter: blur(6px); }
.chip-eg:hover { background: rgba(255,255,255,.26); color: #fff; border-color: rgba(255,255,255,.55); }

/* ---- Sources band ------------------------------------------------------- */
.band { border-top: 1px solid var(--line-soft); background: var(--bg-tint); }
.band-inner { padding-top: 28px; padding-bottom: 28px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.band-l { font-size: 14px; color: var(--muted); max-width: 360px; line-height: 1.55; }
.band-l b { color: var(--fg); font-weight: 700; }
.band-srcs { display: flex; gap: 30px; flex-wrap: wrap; }
.band-src { font-size: 12.5px; color: var(--muted); }
.band-src b { display: block; color: var(--fg); font-weight: 700; font-size: 14px; letter-spacing: -0.2px; margin-bottom: 1px; }

/* ---- Results ------------------------------------------------------------ */
.results-wrap { padding-top: 30px; padding-bottom: 80px; min-height: 72vh; }
.results-search { max-width: 760px; }
.results-count { color: var(--muted); font-size: 14px; margin: 24px 2px 14px; }
.results-count b { color: var(--fg); font-weight: 700; }
.rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--card); }
.row { display: flex; align-items: center; gap: 18px; width: 100%; text-align: left; background: var(--card); border: none; border-bottom: 1px solid var(--line-soft); padding: 15px 20px; transition: background .12s var(--ease); animation: fadeUp .4s var(--ease) both; }
.row:last-child { border-bottom: none; }
.row:hover { background: var(--bg-tint); }
.row-badge { width: 54px; flex: 0 0 auto; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; font-size: 15.5px; letter-spacing: -0.25px; color: var(--fg); }
.row-subtag { display: inline-flex; align-items: center; vertical-align: middle; margin-left: 8px; font-size: 11px; font-weight: 500; color: var(--accent); background: #eef0fb; border: 1px solid #dde1f7; padding: 1px 7px; border-radius: var(--r-chip); letter-spacing: 0; }
.row-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.row-dot { color: #cdd5e0; }
.row-chev { color: var(--faint); flex: 0 0 auto; transition: transform .14s var(--ease), color .14s; }
.row:hover .row-chev { color: var(--accent); transform: translateX(2px); }
.empty { text-align: center; color: var(--muted); padding: 64px 20px; font-size: 15px; }

/* concept tree (browse by topic) */
.ctree { display: flex; flex-direction: column; gap: 12px; }
.cgroup { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); overflow: hidden; }
.cgroup-h { display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: none; padding: 14px 18px; cursor: pointer; font-family: inherit; text-align: left; }
.cgroup-h:hover { background: var(--bg-tint); }
.cgroup-chev { color: var(--faint); display: flex; flex: 0 0 auto; transition: transform .2s var(--ease); }
.cgroup.open .cgroup-chev { transform: rotate(90deg); }
.cgroup-name { flex: 1; font-weight: 700; font-size: 15px; letter-spacing: -0.2px; color: var(--fg); }
.cgroup-n { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg-alt); border: 1px solid var(--line); padding: 1px 9px; border-radius: var(--r-chip); flex: 0 0 auto; }
.cgroup-body { display: none; border-top: 1px solid var(--line-soft); }
.cgroup.open .cgroup-body { display: block; }
.cgroup-body .row { border-bottom: 1px solid var(--line-soft); }
.cgroup-body .row:last-child { border-bottom: none; }
.leaf { border-bottom: 1px solid var(--line-soft); }
.leaf:last-child { border-bottom: none; }
.leaf-h { font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); padding: 11px 18px 3px; }
.row-alt .row-title { color: var(--muted); font-weight: 500; }
.alt-tag { display: inline-flex; vertical-align: middle; font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--faint); background: var(--bg-alt); border: 1px solid var(--line); padding: 1px 6px; border-radius: var(--r-chip); margin-left: 6px; }

/* ---- Detail ------------------------------------------------------------- */
.detail-wrap { padding-top: 26px; padding-bottom: 96px; }
.back { display: inline-flex; align-items: center; gap: 7px; background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 500; padding: 6px 0; margin-bottom: 16px; }
.back:hover { color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 322px; gap: 32px; align-items: start; }
.detail-title { font-size: clamp(26px, 3vw, 37px); letter-spacing: -0.7px; }
.detail-desc { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 660px; margin-top: 6px; }

.chart-card { background: transparent; border: none; padding: 0; margin-top: 18px; }
.chart-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.chart-stat-unit-lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
.chart-tools { display: flex; align-items: center; gap: 10px; }
.seg { display: flex; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--r-input); padding: 3px; gap: 2px; }
.seg-btn { border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 6px; transition: all .14s var(--ease); }
.seg-btn.on { background: var(--card); color: var(--accent); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.seg-btn:hover:not(.on) { color: var(--fg); }

#chart { width: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line-soft); }
.leg { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); background: var(--bg-alt); border: 1px solid var(--line); padding: 4px 6px 4px 11px; border-radius: var(--r-chip); }
.leg-swatch { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }
.leg-x { border: none; background: none; color: var(--faint); display: flex; padding: 2px; border-radius: 50%; cursor: pointer; }
.leg-x:hover { color: var(--highlight); background: rgba(192,57,43,.12); }

.detail-rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.rail-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; }
.rail-h { font-weight: 700; font-size: 14px; letter-spacing: -0.2px; color: var(--fg); }
.rail-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 6px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; margin: 4px 0 0; font-size: 13px; }
.meta dt { color: var(--faint); font-weight: 500; }
.meta dd { margin: 0; color: var(--fg); text-align: right; }

/* collapsible rail cards */
.rail-card.collapsible { padding: 0; overflow: hidden; }
.rail-toggle { display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: none; padding: 14px 16px; cursor: pointer; font-family: inherit; text-align: left; }
.rail-toggle:hover { background: var(--bg-tint); }
.rail-toggle .rail-h { flex: 1; }
.rail-marker { width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.rail-chev { color: var(--faint); flex: 0 0 auto; transition: transform .25s var(--ease); }
.collapsible.open .rail-chev { transform: rotate(90deg); }
.rail-body { max-height: 0; overflow: hidden; opacity: 0; padding: 0 16px; transition: max-height .3s var(--ease), opacity .22s var(--ease), padding .22s var(--ease); }
.collapsible.open .rail-body { max-height: 1200px; opacity: 1; padding: 0 16px 16px; }
.rail-body > .rail-note:first-child { margin-top: 0; }

/* series switcher (detail header) + shared dropdown grammar (SEARCH_SPEC) */
.switcher { position: relative; margin: 2px 0 4px; max-width: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.switcher-title { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; background: none; border: none; padding: 4px 0; font-family: inherit; font-size: 21px; font-weight: 700; letter-spacing: -0.5px; color: var(--fg); cursor: pointer; text-align: left; }
.switcher-title-t { line-height: 1.2; }
.switcher-count { flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--accent); background: #eef0fb; border: 1px solid #dde1f7; padding: 2px 8px; border-radius: var(--r-chip); }
.switcher-edit { display: inline-flex; color: var(--faint); opacity: 0; transition: opacity .14s var(--ease); flex: 0 0 auto; }
.switcher-title:hover .switcher-edit { opacity: 1; }
.switcher-box { display: flex; flex: 1 1 100%; align-items: center; gap: 11px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 5px 4px 15px; box-shadow: var(--shadow); transition: border-color .14s var(--ease), box-shadow .14s var(--ease); }
.switcher-box.open, .switcher-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52,81,178,.13), var(--shadow); }
.switcher-ic { color: var(--faint); display: flex; flex: 0 0 auto; }
.switcher-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: inherit; font-size: 15px; font-weight: 500; letter-spacing: -0.2px; color: var(--fg); padding: 11px 4px; }
.switcher-input::placeholder { color: var(--faint); font-weight: 400; }
.switcher-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 30; max-height: 360px; overflow-y: auto; }
.switcher-hint { font-size: 12px; color: var(--muted); padding: 7px 10px 9px; }
.switcher-hint-key { color: var(--faint); font-size: 11.5px; margin-left: 8px; }
.switcher-hint-key b { color: var(--muted); font-weight: 700; }
.switcher-empty { font-size: 13.5px; color: var(--muted); padding: 18px 10px; text-align: center; }
.switcher-item { display: flex; align-items: center; width: 100%; border-radius: 8px; transition: background .12s; }
.switcher-item:hover { background: var(--bg-tint); }
/* selected rows: no fill by default (SEARCH_SPEC §6) — bold label + filled toggle signal it */
.switcher-item.core { background: var(--bg-tint); }
.switcher-item.core:hover { background: var(--bg-alt); }
.switcher-open { flex: 1; display: flex; align-items: center; gap: 11px; min-width: 0; text-align: left; background: none; border: none; padding: 9px 6px 9px 10px; cursor: pointer; font-family: inherit; }
.switcher-t { flex: 1; font-size: 14px; font-weight: 500; color: var(--fg); min-width: 0; }
.switcher-meta { font-size: 12px; color: var(--faint); flex: 0 0 auto; }
.switcher-pop { font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--accent); background: #eef0fb; border: 1px solid #dde1f7; padding: 2px 7px; border-radius: var(--r-chip); flex: 0 0 auto; }
.switcher-plus { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 0 7px 0 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; transition: all .12s var(--ease); }
.switcher-plus:hover { border-color: var(--accent); color: var(--accent); background: #eef0fb; }
.switcher-plus.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.switcher-sub { padding-left: 34px; position: relative; }
.switcher-sub::before { content: ""; position: absolute; left: 17px; top: 0; bottom: 0; border-left: 2px solid var(--line); }
.switcher-subtick { width: 12px; height: 2px; background: var(--line); border-radius: 2px; flex: 0 0 auto; }
.switcher-sub .switcher-t { font-weight: 400; color: var(--muted); }
.switcher-sub:hover .switcher-t { color: var(--fg); }
.leg-sub { color: var(--faint); font-weight: 400; }

/* flat low-cardinality dimension: chip row */
.dim-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.dim-chips-h { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); margin: 14px 0 7px; }

/* ---- Hierarchical dimension selector (collapsible + filterable) -------- */
.dim-wrap { margin-top: 10px; }
.dim-filter { display: flex; align-items: center; gap: 8px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px; padding: 0 8px 0 11px; color: var(--faint); transition: border-color .14s var(--ease); }
.dim-filter:focus-within { border-color: var(--accent); }
.dim-filter input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: inherit; font-size: 13px; color: var(--fg); padding: 8px 0; }
.dim-filter input::placeholder { color: var(--faint); }
.dim-filter-x { border: none; background: none; color: var(--faint); display: flex; padding: 5px; border-radius: 5px; flex: 0 0 auto; cursor: pointer; }
.dim-filter-x:hover { color: var(--fg); background: var(--bg-tint); }
.dim-tree { display: flex; flex-direction: column; margin-top: 8px; max-height: 460px; overflow: auto; position: relative; }
.dim-tree:not(.flat) { border-left: 1px solid var(--line-soft); margin-left: 4px; padding-left: 2px; }
.dim-group { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; letter-spacing: -0.1px; color: var(--fg); padding: 10px 8px 4px; cursor: pointer; }
.dim-group:hover { color: var(--accent); }
.dim-tree > .dim-group:first-child { padding-top: 2px; }
.dim-row { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none; border: none; padding: 7px 8px; border-radius: 8px; transition: background .12s var(--ease); font-family: inherit; cursor: pointer; }
.dim-row:hover { background: var(--bg-tint); }
.dim-caret { width: 14px; flex: 0 0 auto; color: var(--faint); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; transition: transform .15s var(--ease); }
.dim-caret.open { transform: rotate(90deg); }
.dim-caret.leaf { visibility: hidden; cursor: default; }
.dim-tick { width: 12px; height: 2px; background: var(--line); border-radius: 2px; flex: 0 0 auto; }
.dim-label { flex: 1; font-size: 13px; color: var(--muted); min-width: 0; line-height: 1.35; font-weight: 400; }
.dim-row.on .dim-label { font-weight: 600; color: var(--fg); }
.dim-toggle { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--faint); transition: all .12s var(--ease); }
.dim-row:hover .dim-toggle { border-color: var(--accent); color: var(--accent); }
.dim-toggle.on { color: #fff; }
.dim-row.flat { align-items: flex-start; }
.dim-flat-text { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.dim-crumb { font-size: 11px; color: var(--faint); line-height: 1.2; }
.dim-empty { font-size: 12.5px; color: var(--muted); padding: 14px 8px; }

/* ---- Use this series / Download ----------------------------------------- */
.access-tabs { display: flex; gap: 2px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px; padding: 3px; margin-top: 12px; }
.access-tab { flex: 1; border: none; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 6px 4px; border-radius: 6px; transition: all .14s var(--ease); font-family: inherit; }
.access-tab.on { background: var(--card); color: var(--accent); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.access-tab:hover:not(.on) { color: var(--fg); }
.code-block { position: relative; margin-top: 10px; background: #1c2433; border-radius: 10px; padding: 13px 14px; }
.code-block pre { margin: 0; font-size: 12px; line-height: 1.65; color: #dbe3ef; white-space: pre-wrap; word-break: break-word; }
.copy { position: absolute; top: 9px; right: 9px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; transition: background .14s; }
.copy:hover { background: rgba(255,255,255,.22); }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.dl-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 9px; transition: all .14s var(--ease); font-family: inherit; }
.dl-btn:hover { border-color: var(--accent); background: var(--card); box-shadow: var(--shadow); }
.dl-fmt { font-size: 13px; font-weight: 700; color: var(--fg); letter-spacing: -0.2px; }
.dl-btn:hover .dl-fmt { color: var(--accent); }
.dl-ext { font-size: 10.5px; color: var(--faint); }

/* ---- Footer ------------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); background: var(--bg-alt); margin-top: 8px; }
.foot-inner { padding-top: 40px; padding-bottom: 30px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 34px; }
.foot-open { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 340px; margin-top: 12px; }
.foot-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--faint); font-weight: 700; margin-bottom: 12px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.foot-col li { font-size: 13px; color: var(--muted); line-height: 1.45; }
.foot-bar { border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: 18px; font-size: 12.5px; color: var(--faint); }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 940px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-rail { position: static; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .nav { gap: 16px; }
  .nav-link:nth-child(2), .nav-link:nth-child(3), .nav-link:nth-child(4) { display: none; }
  .foot-inner { grid-template-columns: 1fr; gap: 26px; }
}
