/* =========================================================================
   Platform hub (pages/platform.php)
   C's hero + checker, B's size map, A's spec sheet, in one visual language.
   Uses only style.css tokens, so dark mode follows [data-theme="dark"].

   Brand: --brand is the platform colour (inline). --hb-l / --hb-d are tones of
   it that pass WCAG AA as small text on light / dark panels; --hb is the one
   for the current theme. --hb-fill is for shapes and fills, --hb-on the text
   colour that reads on it; --hb-badge / --hb-badge-on are the number badges
   (PHP picks the brand or --hb-l so the digits keep 4.5:1).

   Scale (shared by every part):
     radii   cards var(--radius) · feature cards var(--radius-lg) · inner boxes,
             controls, logo, thumbnails var(--radius-sm) · chips + badges 999px ·
             tags + map frames 6px · shapes drawn inside thumbnails 3px
     type    h1 clamp(28–40) · h2 clamp(22–28) · card titles 17–18 · body 14 ·
             labels 11.5 uppercase .06em · meta 12.5
     space   sections 56px apart (40 on phones) · head → content 16px
   ========================================================================= */
.hd {
  --hb: var(--hb-l, var(--brand));
  --hb-fill: var(--brand);
  --hb-on: var(--hb-on-l, #fff);
  --hb-badge: var(--hb-badge-l, var(--hb-fill));      /* number badges: crisp digits (PHP picks brand or --hb-l) */
  --hb-badge-on: var(--hb-badge-on-l, var(--hb-on));
  --hb-soft: color-mix(in srgb, var(--hb-fill) 10%, var(--panel));
  --hb-line: color-mix(in srgb, var(--hb) 32%, var(--line-strong));
  --shape-bg: linear-gradient(150deg, color-mix(in srgb, var(--hb-fill) 26%, var(--panel)), color-mix(in srgb, var(--hb-fill) 8%, var(--panel)));
  --shape-line: color-mix(in srgb, var(--hb) 62%, transparent);
  /* status colours as TEXT / FILLS that keep small labels readable in both themes */
  --ok-ink: color-mix(in srgb, var(--ok) 68%, var(--ink));
  --warn-ink: color-mix(in srgb, var(--warn) 62%, var(--ink));
  --low-ink: color-mix(in srgb, var(--low) 74%, var(--ink));
  --ok-fill: color-mix(in srgb, var(--ok) 76%, #000);
  --sticky: 64px;               /* site header */
  --nav-h: 49px;                /* section nav */
  padding-bottom: 72px;
}
[data-theme="dark"] .hd { --hb: var(--hb-d, var(--brand)); --hb-fill: var(--hb); --hb-on: var(--hb-on-d, #12131a); --hb-badge: var(--hb-fill); --hb-badge-on: var(--hb-on); --ok-fill: var(--ok); }
.hd [hidden] { display: none !important; }
.hd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hd-k {
  display: block; margin: 0 0 8px;
  font-size: 11.5px; font-weight: 700; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.hd-dash, .hd td.is-empty { color: var(--faint); }
/* shortened value: dotted underline, full wording in title + the row details */
.hd-trim { text-decoration: underline dotted color-mix(in srgb, var(--muted) 70%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: help; }

/* ---- number badge: one number per placement, everywhere ----------------- */
.hd-n {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  font: 800 11.5px/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: 0;
  background: var(--hb-badge); color: var(--hb-badge-on);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  transition: background .15s, color .15s, box-shadow .15s, transform .12s;
}
.hd-n.is-sm { min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; }
a.hd-n:hover, a.hd-n:focus-visible { transform: translateY(-1px); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb) 25%, transparent); outline: none; text-decoration: none; }
/* checker state on any badge (non-colour cue lives next to it: ✓ ! ✕ glyphs) */
[data-fit="pass"] .hd-n, .hd-n[data-fit="pass"] { background: var(--ok-fill); color: #fff; }
[data-fit="warn"] .hd-n, .hd-n[data-fit="warn"] { background: var(--warn); color: #12131a; }
[data-fit="fail"] .hd-n, .hd-n[data-fit="fail"] { background: var(--line-strong); color: var(--muted); }
[data-theme="dark"] [data-fit="pass"] .hd-n, [data-theme="dark"] .hd-n[data-fit="pass"] { color: #0b0b12; }

/* ======================================================================= hero */
.hd-hero {
  position: relative; padding: 26px 0 30px;
  background:
    radial-gradient(90% 70% at 0% 0%, color-mix(in srgb, var(--hb-fill) 12%, transparent), transparent 62%),
    radial-gradient(60% 55% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    var(--bg);
}
/* DOM order = phone order (title → checker → result → facts), so focus and
   reading order match what is seen; from 960px grid areas place the blocks */
.hd-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.hd-title-blk, .hd-facts { min-width: 0; }
.hd-crumbs { margin-bottom: 14px; }
.hd-title { display: flex; align-items: center; gap: 15px; }
.hd-logo {
  flex: none; width: 58px; height: 58px; border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, color-mix(in srgb, var(--hb-fill) 16%, var(--panel)), var(--panel));
  border: 1px solid var(--hb-line); box-shadow: var(--shadow-sm);
}
.hd-logo svg, .hd-logo img { display: block; }
.hd-title-tt { min-width: 0; }
.hd-title h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.033em; line-height: 1.08; text-wrap: balance; overflow-wrap: anywhere; }
.hd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.hd-cat { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hb); }
.hd-former { font-size: 12.5px; color: var(--muted); }
.hd-ver { display: inline-flex; align-items: center; gap: 7px; }

.hd-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 540px; }
.hd-stats a {
  display: flex; flex-direction: column; gap: 3px; height: 100%; min-width: 0; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  color: var(--ink); transition: border-color .15s, transform .12s;
}
.hd-stats a:hover { border-color: var(--hb-line); transform: translateY(-1px); text-decoration: none; }
.hd-stats b { font-size: 28px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hd-stats span { font-size: 12.5px; line-height: 1.3; font-weight: 600; color: var(--muted); }
.hd-stats li.is-accent a { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 12%, var(--panel)), var(--panel) 75%); border-color: color-mix(in srgb, var(--accent) 35%, var(--line-strong)); }
.hd-stats li.is-accent b { color: var(--accent-ink); }
.hd-mix { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--muted); }
.hd-mix:empty { display: none; }
.hd-mix span { display: inline-flex; align-items: center; gap: 6px; }
.hd-mix-n {
  font-size: 11.5px; font-weight: 700; line-height: 1.4; color: var(--ink); font-variant-numeric: tabular-nums;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 7px;
}
.hd-dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.hd-dot.is-image { background: var(--accent); }
.hd-dot.is-video { background: var(--hb-fill); border-radius: 50%; }
.hd-dot.is-other { background: var(--faint); }
.hd-docs { margin-top: 18px; }
.hd-docs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hd-docs-list a {
  position: relative; display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  padding: 5px 10px 5px 11px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-strong);
  transition: border-color .15s, color .15s;
}
.hd-docs-list a:hover { color: var(--accent-ink); border-color: var(--accent); text-decoration: none; }
.hd-docs-list .icon { opacity: .7; }

/* ---- checker card (C) ----------------------------------------------------- */
.hd-ck-card {
  position: relative; min-width: 0; padding: 18px; scroll-margin-top: calc(var(--sticky) + 16px);
  /* Accent strip = a background layer, so the card's own border-radius clips it
     (a 4px ::before with a 20px radius poked out past the rounded corners). */
  background: linear-gradient(90deg, var(--accent), var(--hb-fill)) top / 100% 4px no-repeat border-box, var(--panel);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line-strong));
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.hd-ck-card.is-flash { animation: hd-flash 1.6s ease-out 1; }
@keyframes hd-flash {
  0%, 35% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 30%, transparent), var(--shadow-lg); }
  100% { box-shadow: var(--shadow-lg); }
}
.hd-ck-h { font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.28; margin: 4px 0 14px; text-wrap: balance; }
.hd-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 150px; padding: 20px 16px; text-align: center; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--accent) 34%, var(--line-strong)); border-radius: var(--radius);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 6%, var(--panel)), var(--panel-2));
  color: var(--muted); transition: border-color .15s, background .15s, transform .15s;
}
.hd-drop:hover, .hd-drop:focus-visible, .hd-drop.drag {
  border-color: var(--accent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--accent-soft));
}
.hd-drop:focus { outline: none; }
.hd-drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hd-drop.drag { transform: scale(1.01); }
.hd-drop-ic {
  width: 48px; height: 48px; margin-bottom: 6px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; box-shadow: 0 10px 22px -10px var(--accent);
}
.hd-drop strong { font-size: 15.5px; color: var(--ink); }
.hd-drop-s { font-size: 13px; }
.hd-drop-n { margin-top: 6px; font-size: 12px; color: var(--muted); }
.hd-dims { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.hd-dims label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.hd-dims-field { position: relative; flex: 1 1 150px; min-width: 0; }
.hd-dims input {
  width: 100%; height: 44px; padding: 0 40px 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--ink);
  font: 600 16px/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.hd-dims input::placeholder { color: var(--faint); font-weight: 500; }
.hd-dims input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--panel); }
.hd-dims-px { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 600; color: var(--faint); pointer-events: none; }
.hd-try { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.hd-try button {
  font: 600 12.5px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--accent-ink); cursor: pointer;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 999px; padding: 6px 10px;
}
.hd-try button:hover { border-color: var(--accent); }
.hd-privacy { display: flex; align-items: flex-start; gap: 7px; margin-top: 12px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.hd-privacy .icon { color: var(--ok); flex: none; margin-top: 1px; }

/* ---- checker result (rendered by hub-checker.js) ------------------------- */
.hd-result { min-width: 0; padding: 14px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.hub-ck-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; padding: 12px 14px;
  border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line);
}
.hub-ck-head strong { font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; }
.hub-ck-head span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hub-ck-head.is-pass { background: color-mix(in srgb, var(--ok) 11%, var(--panel)); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.hub-ck-head.is-pass strong { color: var(--ok-ink); }
.hub-ck-head.is-warn { background: color-mix(in srgb, var(--warn) 12%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.hub-ck-head.is-warn strong { color: var(--warn-ink); }
.hub-ck-head.is-fail { background: color-mix(in srgb, var(--low) 10%, var(--panel)); border-color: color-mix(in srgb, var(--low) 28%, transparent); }
.hub-ck-head.is-fail strong { color: var(--low-ink); }
.hub-ck-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.hub-ck-row {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; align-items: center;
  padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--panel);
}
.hub-ck-ic { grid-row: span 2; align-self: start; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.hub-ck-ic svg { width: 14px; height: 14px; }
.hub-ck-name { min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.hub-ck-name:hover { color: var(--accent-ink); text-decoration: underline; }
.hub-ck-size { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hub-ck-why { grid-column: 2 / -1; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.hub-ck-row.is-pass { border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
.hub-ck-row.is-pass .hub-ck-ic { color: var(--ok-ink); background: color-mix(in srgb, var(--ok) 14%, var(--panel)); }
.hub-ck-row.is-warn { border-color: color-mix(in srgb, var(--warn) 32%, var(--line)); }
.hub-ck-row.is-warn .hub-ck-ic { color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 15%, var(--panel)); }
.hub-ck-row.is-fail { background: var(--panel-2); }
.hub-ck-row.is-fail .hub-ck-ic { color: var(--low-ink); background: color-mix(in srgb, var(--low) 11%, var(--panel)); }
.hub-ck-row.is-fail .hub-ck-name { color: var(--muted); font-weight: 600; }
/* failing rows folded behind a toggle when something fits (hub-d.js) */
.hd-result.is-folded .hub-ck-row.is-fail { display: none; }
.hd-ck-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.hd-ck-actions .hub-ck-reset { margin: 0; }
.hub-ck-reset, .hd-ck-more, .hd-btn {
  font: 600 13.5px/1 var(--font); color: var(--ink); cursor: pointer;
  padding: 9px 14px; border-radius: var(--radius-sm); background: var(--panel);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-sm); transition: border-color .15s, color .15s;
}
.hub-ck-reset { margin-top: 12px; }
.hub-ck-reset:hover, .hd-ck-more:hover, .hd-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.hd-ck-more { color: var(--muted); }

/* ---- size map (B) ---------------------------------------------------------- */
.hd-map {
  position: relative; margin-top: 26px; padding: 18px 22px 14px; overflow: hidden;
  scroll-margin-top: calc(var(--sticky) + 16px);
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.hd-map::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1.3px);
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 92%); mask-image: linear-gradient(to bottom, #000 30%, transparent 92%);
}
.hd-map > * { position: relative; z-index: 1; }
.hd-map-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 16px; }
.hd-map-h { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.hd-map-sub { font-size: 12.5px; color: var(--muted); }
.hd-map-stage { --k: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 22px; }
.hd-map-it { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; max-width: 100%; }
.hd-map-frame {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: calc(var(--fw) * var(--k) * 1px); max-width: 100%; min-width: 4px; aspect-ratio: var(--ar);
  container-type: size; border-radius: 6px;
  background: var(--shape-bg); border: 1.5px solid var(--shape-line);
  transition: transform .15s, box-shadow .15s, background .15s, opacity .2s, border-color .15s;
}
.hd-map-r { font-size: 11px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--hb) 70%, var(--ink)); }
@container (width < 40px) or (height < 18px) { .hd-map-r { display: none; } }
.hd-map-frame:hover, .hd-map-frame:focus-visible {
  outline: none; text-decoration: none; transform: translateY(-2px);
  background: color-mix(in srgb, var(--hb-fill) 34%, var(--panel)); border-color: var(--hb);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb) 16%, transparent), 0 14px 26px -16px color-mix(in srgb, var(--hb) 70%, transparent);
}
/* frames are mouse targets only (tabindex -1); keyboard focus lands on the badges */
.hd-map-it:has(a.hd-n:focus-visible) .hd-map-frame {
  transform: translateY(-2px); background: color-mix(in srgb, var(--hb-fill) 34%, var(--panel)); border-color: var(--hb);
}
.hd-map-stage:has(.hd-map-it:hover) .hd-map-it:not(:hover) .hd-map-frame,
.hd-map-stage:has(a.hd-n:focus-visible) .hd-map-it:not(:focus-within) .hd-map-frame { opacity: .38; }
.hd-map-cap { display: flex; flex-direction: column; gap: 5px; font-size: 12px; line-height: 1.15; }
.hd-map-cap b { font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* badge rows wrap at a fixed width; every caption reserves --cap-lines rows (PHP)
   so all frame bottoms share one baseline */
.hd-map-nums { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 3px; max-width: 124px; min-height: calc(var(--cap-lines, 1) * 25px - 3px); }
.hd-map-it:hover .hd-map-nums .hd-n { box-shadow: 0 0 0 2px color-mix(in srgb, var(--hb) 30%, transparent); }
.hd-map-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.hd-map-legend { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.hd-map-nosize { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.hd-map-nosize .hd-k { margin: 0 2px 0 0; }
.hd-pill {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding: 3px 11px 3px 3px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-strong);
}
.hd-pill .icon { color: var(--muted); }
.hd-pill > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hd-pill:hover { border-color: var(--hb); text-decoration: none; }
/* a frame mirrors the best result among its placements (+ a glyph on the caption) */
.hd-map-it[data-fit="pass"] .hd-map-frame { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 20%, var(--panel)); }
.hd-map-it[data-fit="warn"] .hd-map-frame { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 18%, var(--panel)); }
.hd-map-it[data-fit="fail"] .hd-map-frame { opacity: .32; }
.hd-map-it[data-fit] .hd-map-cap b::after { content: " ✓"; color: var(--ok-ink); }
.hd-map-it[data-fit="warn"] .hd-map-cap b::after { content: " !"; color: var(--warn-ink); }
.hd-map-it[data-fit="fail"] .hd-map-cap b::after { content: " ✕"; color: var(--low-ink); }
.hd-has-fit .hd-pill { opacity: .55; }   /* no pixel size: not checked */

/* ---- sticky section nav (A) -------------------------------------------------- */
.hd-nav {
  position: sticky; top: var(--sticky); z-index: 60;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.hd-nav-in { display: flex; align-items: center; gap: 12px; min-height: calc(var(--nav-h) - 2px); }
.hd-nav-links { flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.hd-nav-links::-webkit-scrollbar { display: none; }
.hd-nav-links a {
  flex: none; position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 12px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.hd-nav-links a:first-child { margin-inline-start: -12px; }
.hd-nav-links a:hover { color: var(--ink); text-decoration: none; }
.hd-nav-links a.is-active { color: var(--ink); }
.hd-nav-links a.is-active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: var(--hb); }
.hd-nav-n { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.hd-nav-ck {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: var(--accent-ink); white-space: nowrap;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  transition: border-color .15s, background .15s;
}
.hd-nav-ck:hover { border-color: var(--accent); text-decoration: none; }

/* ---- sections ------------------------------------------------------------------ */
.hd-sec { margin-top: 56px; scroll-margin-top: calc(var(--sticky) + var(--nav-h) + 12px); }
.hd-sec-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 16px; }
.hd-sec h2, .hd-h2s { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; letter-spacing: -.026em; }
.hd-sub { margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.hd-h2s { margin: 44px 0 16px; }
.hd-promo { margin-top: 28px; }
.hd-foot { margin-top: 12px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.hd-foot a { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-ink); }
.hd-btn { display: none; }
.hd-js .hd-btn { display: inline-flex; }

/* filter chips (JS only) */
.hd-filters { display: none; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.hd-js .hd-filters { display: flex; }
.hd-fchip {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 5px 11px; cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.hd-fchip span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hd-fchip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }
.hd-fchip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.hd-fchip[aria-pressed="true"] span { color: var(--accent-ink); }

/* ---- tables (shared) --------------------------------------------------------- */
.hd-tablewrap { position: relative; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow-x: auto; }
.hd-master, .hd-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.hd-master thead th, .hd-tbl thead th {
  text-align: start; vertical-align: bottom; padding: 12px 12px 10px;
  font-size: 11px; font-weight: 700; line-height: 1.3; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  background: var(--panel-2); border-bottom: 1px solid var(--line-strong);
  white-space: normal; -webkit-hyphens: manual; hyphens: manual; overflow-wrap: normal;
}
/* short-value columns: the header word sets the width ("Соотношение",
   "Seitenverhältnis") instead of breaking syllable by syllable */
.hd-master thead .hd-c-size, .hd-master thead .hd-c-ratio, .hd-master thead .hd-c-wt,
.hd-master thead .hd-c-fmt, .hd-master thead .hd-c-txt, .hd-kit thead th, .hd-vtbl thead th { white-space: nowrap; }
.hd-tbl tbody tr { border-top: 1px solid var(--line); }
.hd-tbl tbody tr:first-child { border-top: 0; }
.hd-tbl td, .hd-tbl tbody th { padding: 11px 14px; vertical-align: middle; text-align: start; }
.hd-tbl thead th { padding-inline: 14px; }
.hd-tbl tbody th { font-weight: 600; }
.hd-tbl tbody th a { display: inline-flex; align-items: flex-start; gap: 8px; color: var(--ink); }
.hd-tbl tbody th a .hd-n { margin-top: 1px; }
.hd-tbl tbody th a > .hd-n.is-sm { min-width: 24px; }   /* 1- and 2-digit badges keep the labels aligned */
.hd-tbl tbody th a:hover > span:last-child { color: var(--accent-ink); }
.hd-tbl .hd-num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hd-nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hd-master thead .hd-c-txt [aria-hidden] { text-transform: none; letter-spacing: 0; font-size: 12px; }

/* sort buttons injected by hub-d.js into th[data-sort] */
.hd-sortbtn { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: flex-end; gap: 4px; }
.hd-sortbtn:hover { color: var(--ink); }
.hd-sortbtn::after { content: ''; flex: none; width: 0; height: 0; margin-bottom: 4px; border-inline: 4px solid transparent; border-top: 5px solid currentColor; opacity: .35; }
th[aria-sort="ascending"] .hd-sortbtn, th[aria-sort="descending"] .hd-sortbtn { color: var(--accent-ink); }
th[aria-sort="ascending"] .hd-sortbtn::after { opacity: 1; transform: rotate(180deg); }
th[aria-sort="descending"] .hd-sortbtn::after { opacity: 1; }

/* ---- master table ---------------------------------------------------------- */
.hd-master td, .hd-master tbody th { padding: 12px; vertical-align: middle; text-align: start; font-weight: 400; }
.hd-pl { border-top: 1px solid var(--line); scroll-margin-top: calc(var(--sticky) + var(--nav-h) + 12px); }
.hd-pl:first-of-type { border-top: 0; }
.hd-row { transition: background .12s, opacity .15s; }
.hd-js .hd-row { cursor: pointer; }
.hd-js .hd-row:hover { background: color-mix(in srgb, var(--panel-2) 75%, transparent); }
.hd-pl.is-open > .hd-row { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }

.hd-c-pl { min-width: 250px; }
.hd-master thead .hd-c-size, .hd-master thead .hd-c-ratio, .hd-master thead .hd-c-wt,
.hd-master thead .hd-c-fmt, .hd-master thead .hd-c-txt { width: 1%; }
.hd-master thead .hd-c-vid { width: 150px; }
.hd-c-fmt .hd-fmts { flex-wrap: nowrap; }
.hd-pl-in { display: flex; align-items: center; gap: 10px; }
.hd-pl-in > .hd-n { min-width: 27px; }   /* 1- and 2-digit numbers keep the labels aligned */
.hd-pl-tt { min-width: 0; margin-inline-start: 2px; }
.hd-glyph {
  flex: none; position: relative; width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line);
}
.hd-glyph i { display: block; border-radius: 3px; background: var(--shape-bg); border: 1.5px solid var(--shape-line); }
.hd-glyph b {
  position: absolute; right: -5px; bottom: -5px; width: 17px; height: 17px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line-strong); color: var(--hb);
}
.hd-glyph.is-icon { color: var(--hb); background: var(--hb-soft); border-color: var(--hb-line); }
.hd-name { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.hd-name a { color: var(--ink); }
.hd-name a:hover { color: var(--accent-ink); text-decoration: none; }
.hd-grp { display: block; margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
/* reference rows (specs.json "role"): display sizes, minimums, legacy, not uploads */
.hd-pl.is-ref .hd-name a { color: color-mix(in srgb, var(--ink) 70%, var(--muted)); font-weight: 600; }
.hd-pl.is-ref .hd-glyph i, .hd-glyph.is-ref-k i { background: transparent; border-style: dashed; }
.hd-role { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.hd-role-of { display: inline-flex; align-items: center; gap: 5px; }
.hd-glyph.is-ref-k { width: 22px; height: 22px; }
.hd-glyph.is-ref-k i { width: 10px; height: 13px; }

.hd-size { font-size: 14.5px; white-space: nowrap; }
.hd-kindlbl { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.hd-c-ratio { white-space: nowrap; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.hd-c-wt { min-width: 76px; color: var(--ink); font-variant-numeric: tabular-nums; }   /* no max-width: a capped cell lets nowrap lines spill into Formats */
.hd-wl { display: block; line-height: 1.35; white-space: nowrap; }
.hd-wl + .hd-wl { margin-top: 3px; }
.hd-wl b { font-weight: 600; white-space: nowrap; }
.hd-wl small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.hd-capfor { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 500; line-height: 1.3; color: var(--muted); white-space: nowrap; }
.hd-fmts { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.hd-fmt {
  font-size: 11px; font-weight: 700; letter-spacing: .02em; line-height: 1.35; white-space: nowrap;
  color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px;
}
.hd-fmt.is-vid { color: var(--hb); background: var(--hb-soft); border-color: var(--hb-line); }
.hd-fmt.is-more { color: var(--muted); background: none; cursor: help; }
.hd-vid { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.hd-dur { display: inline-flex; align-items: flex-start; gap: 5px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.hd-dur .icon { color: var(--faint); flex: none; margin-top: 3px; }
.hd-limn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 7px;
  font-size: 12px; font-weight: 700; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; font-variant-numeric: tabular-nums; cursor: help;
}
.hd-limn.is-txt { color: var(--muted); }
.hd-master .hd-c-conf { width: 26px; padding-inline: 4px; text-align: center; }
.hd-master .hd-c-tg { width: 46px; padding-inline-start: 4px; text-align: end; }
.hd-tg {
  display: none; width: 30px; height: 30px; border-radius: var(--radius-sm); align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--muted); cursor: pointer;
  transition: transform .2s, color .15s, border-color .15s;
}
.hd-js .hd-tg { display: inline-flex; }
.hd-tg:hover { color: var(--accent-ink); border-color: var(--accent); }
.hd-pl.is-open .hd-tg { transform: rotate(180deg); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }

/* detail row: always in the DOM; collapsed only while JS runs */
.hd-master .hd-detail > td { padding: 0 12px 16px 99px; }
.hd-js .hd-pl:not(.is-open) > .hd-detail { display: none; }
.hd-dt {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px 22px;
  padding: 16px 18px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.hd-dt-side .hd-k:not(:first-child) { margin-top: 16px; }
.hd-notes p { position: relative; margin: 0 0 6px; padding-inline-start: 16px; font-size: 14px; line-height: 1.6; color: color-mix(in srgb, var(--ink) 80%, var(--muted)); overflow-wrap: anywhere; }
.hd-notes p::before { content: ''; position: absolute; inset-inline-start: 2px; top: .66em; width: 5px; height: 5px; border-radius: 50%; background: var(--hb-fill); opacity: .8; }
.hd-notes p:last-child { margin-bottom: 0; }
.hd-safe { margin-top: 14px; }
.hd-nosize { display: flex; align-items: flex-start; gap: 7px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.hd-nosize .icon { color: var(--warn); flex: none; margin-top: 2px; }
.hd-spec { margin: 0; display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.hd-spec > div { display: grid; grid-template-columns: minmax(92px, 36%) minmax(0, 1fr); gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.hd-spec > div:first-child { border-top: 0; }
.hd-spec dt { color: var(--muted); }
.hd-spec dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.hd-lchips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hd-lchips li { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 11px; font-size: 12.5px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 999px; }
.hd-lchips span { color: var(--muted); }
.hd-lchips b { color: var(--accent-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.hd-lchips small { color: var(--muted); font-size: 11px; }
.hd-ltext { font-size: 13px; line-height: 1.55; color: var(--muted); }
.hd-ltext.is-raw { margin-top: 8px; padding-inline-start: 10px; border-inline-start: 2px solid var(--line-strong); }
.hd-src { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; font-size: 12.5px; line-height: 1.45; }
.hd-conf { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.hd-src a { position: relative; display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); font-weight: 600; overflow-wrap: anywhere; }
.hd-src a:hover { text-decoration: underline; }

.hd-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.hd-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.hd-legend .hd-trim { font-weight: 600; color: var(--ink); cursor: default; }

/* deep link (#type from the old per-placement URLs) + in-page jumps; with JS the
   highlight is a class that follows replaceState (hub-d.js), without it :target */
html:not(.hd-js) .hd-pl:target > .hd-row, .hd-pl.is-target > .hd-row, .hd-pl.is-flash > .hd-row { background: var(--hb-soft); }
html:not(.hd-js) .hd-pl:target > .hd-row > :first-child, .hd-pl.is-target > .hd-row > :first-child, .hd-pl.is-flash > .hd-row > :first-child { box-shadow: inset 3px 0 0 var(--hb); }

/* ---- checker fit states (data-fit is set by hub-checker.js) ---------------- */
.hd-pl[data-fit="pass"] > .hd-row { background: color-mix(in srgb, var(--ok) 9%, var(--panel)); }
.hd-pl[data-fit="warn"] > .hd-row { background: color-mix(in srgb, var(--warn) 10%, var(--panel)); }
.hd-pl[data-fit="pass"] > .hd-row > :first-child { box-shadow: inset 3px 0 0 var(--ok); }
.hd-pl[data-fit="warn"] > .hd-row > :first-child { box-shadow: inset 3px 0 0 var(--warn); }
.hd-pl[data-fit="pass"] .hd-glyph { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.hd-pl[data-fit="warn"] .hd-glyph { border-color: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
.hd-pl[data-fit="fail"] > .hd-row, .hd-has-fit .hd-pl:not([data-fit]) > .hd-row { opacity: .45; }
.hd-pl[data-fit="fail"] > .hd-row:hover, .hd-has-fit .hd-pl:not([data-fit]) > .hd-row:hover { opacity: .8; }
/* non-colour cue: ✓ / ! / ✕ on the thumbnail's corner */
.hd-pl[data-fit] .hd-glyph::before {
  position: absolute; right: -6px; top: -6px; z-index: 1; width: 16px; height: 16px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; line-height: 1; color: #fff;
}
.hd-pl[data-fit="pass"] .hd-glyph::before { content: '✓'; background: var(--ok-fill); }
.hd-pl[data-fit="warn"] .hd-glyph::before { content: '!'; background: var(--warn); color: #12131a; }
.hd-pl[data-fit="fail"] .hd-glyph::before { content: '✕'; background: var(--low); }
/* mirrored onto secondary references (kit / limits / video) by hub-d.js */
tr[data-hd-ref][data-fit="pass"] > * { background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
tr[data-hd-ref][data-fit="warn"] > * { background: color-mix(in srgb, var(--warn) 9%, var(--panel)); }
tr[data-hd-ref][data-fit="fail"] { opacity: .5; }
.hd-covers a[data-fit="pass"] { color: var(--ok-ink); background: color-mix(in srgb, var(--ok) 13%, var(--panel)); }
.hd-covers a[data-fit="warn"] { color: var(--warn-ink); background: color-mix(in srgb, var(--warn) 14%, var(--panel)); }
.hd-covers a[data-fit="fail"] { opacity: .45; }
.hd-covers a[data-fit]::after { font-weight: 800; margin-inline-start: 2px; }
.hd-covers a[data-fit="pass"]::after { content: '✓'; }
.hd-covers a[data-fit="warn"]::after { content: '!'; }
.hd-covers a[data-fit="fail"]::after { content: '✕'; }
.hd-kitflat li[data-fit="pass"] { border-color: color-mix(in srgb, var(--ok) 55%, var(--line-strong)); }
.hd-kitflat li[data-fit="warn"] { border-color: color-mix(in srgb, var(--warn) 55%, var(--line-strong)); }
.hd-kitflat li[data-fit="fail"] { opacity: .55; }

/* ---- creative kit ------------------------------------------------------------ */
.hd-kit-l { white-space: nowrap; }
.hd-kshape {
  display: inline-flex; vertical-align: middle; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; margin-inline-end: 12px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--line);
}
.hd-kshape i { display: block; border-radius: 3px; background: var(--shape-bg); border: 1.5px solid var(--shape-line); }
.hd-kshape.is-sm { width: 38px; height: 38px; margin-inline-end: 0; }
.hd-kit-r { display: inline-flex; flex-direction: column; vertical-align: middle; line-height: 1.25; }
.hd-kit-r b, .hd-kf-r b, .hd-xk b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.hd-kit-r small, .hd-kf-r small { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.hd-kit .hd-size { font-size: 16px; }
.hd-exports { display: flex; flex-wrap: wrap; gap: 5px; }
.hd-exp { font-size: 12.5px; padding: 3px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.hd-exp:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); text-decoration: none; }
.hd-covers { display: flex; flex-wrap: wrap; gap: 5px; }
.hd-covers a {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 6px;
  font-size: 12.5px; line-height: 1.35; color: var(--accent-ink); background: var(--accent-soft);
  transition: background .15s, color .15s, opacity .15s;
}
.hd-covers a:hover { background: color-mix(in srgb, var(--accent) 18%, var(--panel)); text-decoration: none; }
.hd-kit thead th:nth-child(1), .hd-kit thead th:nth-child(2) { width: 1%; }
.hd-kit thead th:nth-child(3) { width: 20%; }
.hd-kit thead th:nth-child(5) { width: 14%; }
.hd-kit .hd-fmts { max-width: 170px; }

/* kit, flat form (no two sizes share a shape): compact cards, not a table copy */
.hd-kitflat { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.hd-kitflat li {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: border-color .15s, opacity .15s;
}
.hd-kf-top { display: flex; align-items: center; gap: 12px; width: 100%; }
.hd-kf-r { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.hd-kitflat .hd-size { margin-inline-start: auto; font-size: 15px; }
.hd-kf-meta { font-size: 12.5px; color: var(--muted); }

/* ---- text limits matrix -------------------------------------------------------- */
.hd-lim.is-wide thead th:first-child, .hd-lim.is-wide tbody th { position: sticky; left: 0; z-index: 1; }
.hd-lim tbody th { background: var(--panel); min-width: 200px; max-width: 340px; }
.hd-lim.is-wide tbody th { box-shadow: inset -1px 0 0 var(--line); }
.hd-lim.is-wide thead th:first-child { box-shadow: inset -1px 0 0 var(--line-strong); }
.hd-lim td.hd-num { font-weight: 700; color: var(--ink); }
.hd-lim td.hd-num.is-empty { font-weight: 400; }
.hd-lim .hd-num { text-align: center; width: 112px; }
.hd-lim-txt { color: var(--muted); font-size: 13px; line-height: 1.5; }
/* wording rows next to numeric ones: the label column stops hogging the width
   (table form only; the card forms below reset nothing of this) */
@media (min-width: 901px) {
  .hd-lim.is-mixed:not(.is-cards) tbody th, .hd-lim.is-txt:not(.is-cards) tbody th { width: 34%; }
  .hd-lim.is-mixed:not(.is-cards) .hd-lim-txt { min-width: 300px; }
  .hd-vtbl:not(.is-cards) td:nth-child(3) { min-width: 118px; }   /* "MP4, MOV" on one line */
}
.hd-vtbl tbody th { min-width: 200px; }
.hd-vtbl td { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.hd-vtbl td.hd-nowrap { color: var(--ink); font-weight: 600; }

/* text-limit / video tables as cards (.is-cards: 7+ fields, or set by hub-d.js
   whenever the matrix would scroll sideways); same rules as <=900px below */
.hd-scroll:has(> .is-cards) { overflow: hidden; }
.hd .is-cards, .hd .is-cards tbody, .hd .is-cards tr, .hd .is-cards td, .hd .is-cards tbody th { display: block; }
.hd .is-cards thead { display: none; }
.hd .is-cards tbody tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px 14px; padding: 13px 15px; }
.hd .hd-tbl.is-cards tbody th { grid-column: 1 / -1; position: static; min-width: 0; max-width: none; padding: 0; background: none; box-shadow: none; font-size: 14.5px; line-height: 1.35; }
.hd .is-cards td { padding: 0; min-width: 0; width: auto; text-align: start; white-space: normal; overflow-wrap: anywhere; }
.hd .is-cards td.is-empty { display: none; }
.hd .is-cards td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.hd .is-cards td.hd-num { font-size: 15px; }
.hd .is-cards .hd-lim-txt { grid-column: 1 / -1; }
.hd .hd-vtbl.is-cards td:nth-child(3), .hd .hd-vtbl.is-cards td:nth-child(4) { grid-column: 1 / -1; }
.hd .is-cards tr[data-hd-ref][data-fit] > * { background: none; }
.hd .is-cards tr[data-hd-ref][data-fit="pass"] { background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.hd .is-cards tr[data-hd-ref][data-fit="warn"] { background: color-mix(in srgb, var(--warn) 9%, var(--panel)); }
/* limits as cards: one line of "Field 64" pills per placement */
.hd .hd-lim.is-cards tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 15px; }
.hd .hd-tbl.hd-lim.is-cards tbody th { flex: 1 0 100%; margin-bottom: 3px; }
.hd .hd-lim.is-cards td.hd-num:not(.is-empty) { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; font-size: 13.5px; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 999px; overflow-wrap: normal; }
.hd .hd-lim.is-cards td.hd-num::before { display: inline; margin: 0; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.hd .hd-lim.is-cards .hd-lim-txt { flex: 1 0 100%; }

/* ---- same shape elsewhere ------------------------------------------------------ */
.hd-cross { display: grid; gap: 10px; }
.hd-xrow {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px 18px; align-items: center; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.hd-xk { display: flex; align-items: center; gap: 12px; }
.hd-xk b { display: block; }
.hd-xk small { display: block; font-size: 12px; color: var(--muted); }
.hd-xlist { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-xchip {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 5px 11px 5px 7px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line);
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.hd-xchip:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); text-decoration: none; }
.hd-xname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hd-xchip small { font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.hd-xmore { align-self: center; padding: 0 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.hd-cmp a { display: inline-flex; align-items: center; gap: 6px; }
.hd-cmp a .icon { color: var(--faint); }
.hd .platform-chips.hd-plats { justify-content: flex-start; margin: 0; }
.hd-cmp { margin: 0; }

/* ============================================================= responsive */
/* wide desktop: the PHP-computed scale that keeps the whole map on one row */
@media (min-width: 1180px) { .hd-map-stage { --k: var(--k-fit, 1); } }

@media (min-width: 640px) {
  .hd-ck-card { padding: 22px; }
  .hub-ck-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* tablet: hero is one column, so the card gets two (drop zone | size, try, privacy) */
@media (min-width: 640px) and (max-width: 959px) {
  .hd-ck-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 22px; align-items: start; }
  .hd-ck-h { grid-column: 1 / -1; }
  .hd-drop { grid-column: 1; grid-row: 2 / span 3; align-self: stretch; }
  .hd-dims, .hd-try, .hd-privacy { grid-column: 2; }
  .hd-dims { margin-top: 0; }
  .hd-dims label { width: 100%; }
}
/* medium widths: the map wraps anyway; a smaller common scale keeps it compact */
@media (min-width: 761px) and (max-width: 1179px) { .hd-map-stage { --k: .8; } }
@media (min-width: 960px) {
  .hd-hero { padding: 34px 0 36px; }
  .hd-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px); grid-template-rows: auto 1fr auto;
    grid-template-areas: "title card" "facts card" "res res"; column-gap: 44px; row-gap: 22px;
  }
  .hd-hero-grid.no-ck { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "facts"; }
  .hd-title-blk { grid-area: title; }
  .hd-facts { grid-area: facts; }
  .hd-ck-card { grid-area: card; align-self: start; }
  .hd-result { grid-area: res; }
  .hd-drop { min-height: 168px; }
  .hub-ck-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .hd-c-pl { min-width: 220px; }
}
@media (max-width: 1040px) {
  .hd-master .hd-c-txt, .hd-master .hd-c-conf { display: none; }
  .hd-c-pl { min-width: 190px; }
  .hd-master thead .hd-c-vid { width: 130px; }
  /* the chips stay on one line; the placement column gives up the room */
  .hd-master thead .hd-c-fmt { width: auto; }
}
@media (max-width: 900px) {
  .hd-master .hd-c-vid { display: none; }
  .hd-c-pl { min-width: 200px; }

  /* kit table → cards (tablet portrait and below) */
  .hd-kit, .hd-kit tbody, .hd-kit tr, .hd-kit td, .hd-kit th { display: block; }
  .hd-kit thead { display: none; }
  .hd-kit tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; padding: 15px 16px; }
  .hd-kit tbody th, .hd-kit tbody td { padding: 0; min-width: 0; max-width: none; }
  .hd-kit tbody th { grid-column: 1 / -1; display: flex; align-items: center; }
  .hd-kit td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .hd-kit td:nth-child(2) { order: 1; }
  .hd-kit td:nth-child(4) { order: 2; }
  .hd-kit td:nth-child(5) { order: 3; }
  .hd-kit td:nth-child(3) { order: 4; grid-column: 1 / -1; }
  .hd-kit td.is-single { display: none; }   /* only the master size: already shown */
  .hd-kit td:nth-child(6) { order: 5; grid-column: 1 / -1; }
  .hd-kit .hd-fmts { max-width: none; }
  .hd-kit .hd-size { font-size: 15px; }
  .hd-capfor { white-space: normal; }

  /* text-limit + video tables → one block per placement, label above each value */
  .hd-scroll { overflow: hidden; }
  .hd .hd-lim, .hd .hd-lim tbody, .hd .hd-lim tr, .hd .hd-lim td, .hd .hd-lim tbody th,
  .hd .hd-vtbl, .hd .hd-vtbl tbody, .hd .hd-vtbl tr, .hd .hd-vtbl td, .hd .hd-vtbl tbody th { display: block; }
  .hd .hd-lim thead, .hd .hd-vtbl thead { display: none; }
  .hd .hd-lim tbody tr, .hd .hd-vtbl tbody tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px 14px; padding: 13px 15px; }
  .hd .hd-tbl.hd-lim tbody th, .hd .hd-tbl.hd-vtbl tbody th { grid-column: 1 / -1; position: static; min-width: 0; max-width: none; padding: 0; background: none; box-shadow: none; font-size: 14.5px; line-height: 1.35; }
  .hd .hd-lim td, .hd .hd-vtbl td { padding: 0; min-width: 0; width: auto; text-align: start; white-space: normal; overflow-wrap: anywhere; }
  .hd .hd-lim td.is-empty, .hd .hd-vtbl td.is-empty { display: none; }
  .hd .hd-lim td[data-label]::before, .hd .hd-vtbl td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .hd .hd-lim td.hd-num { font-size: 15px; }
  .hd .hd-lim .hd-lim-txt { grid-column: 1 / -1; }
  .hd .hd-vtbl td { font-size: 13.5px; }
  .hd .hd-vtbl td:nth-child(3), .hd .hd-vtbl td:nth-child(4) { grid-column: 1 / -1; }
  .hd tr[data-hd-ref][data-fit] > * { background: none; }
  .hd .hd-lim tr[data-hd-ref][data-fit="pass"], .hd .hd-vtbl tr[data-hd-ref][data-fit="pass"] { background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
  .hd .hd-lim tr[data-hd-ref][data-fit="warn"], .hd .hd-vtbl tr[data-hd-ref][data-fit="warn"] { background: color-mix(in srgb, var(--warn) 9%, var(--panel)); }
  .hd .hd-kit tr[data-hd-ref][data-fit="pass"] { background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
  .hd .hd-lim tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 15px; }
  .hd .hd-tbl.hd-lim tbody th { flex: 1 0 100%; margin-bottom: 3px; }
  .hd .hd-lim td.hd-num:not(.is-empty) { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; font-size: 13.5px; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 999px; overflow-wrap: normal; }
  .hd .hd-lim td.hd-num::before { display: inline; margin: 0; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; }
  .hd .hd-lim .hd-lim-txt { flex: 1 0 100%; }
}
@media (max-width: 760px) {
  .hd-hero { padding-top: 22px; }
  .hd-title { gap: 13px; }
  .hd-logo { width: 50px; height: 50px; border-radius: var(--radius-sm); }
  .hd-map-stage { --k: .62; gap: 16px; }
  /* docs, filters: one swipeable line with edge fades */
  .hd-docs-list, .hd-js .hd-filters {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    margin-inline: -24px; padding: 2px 24px 4px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 28px), transparent);
  }
  .hd-docs-list::-webkit-scrollbar, .hd-filters::-webkit-scrollbar { display: none; }
  .hd-docs-list > *, .hd-filters > * { flex: none; }
  .hd-docs-list a { white-space: nowrap; }
  .hd-nav-links {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
  }
  .hd-nav-links a { padding: 12px 10px; font-size: 13.5px; }
  .hd-nav-links a:first-child { margin-inline-start: -10px; }
  .hd-nav-links a.is-active::after { left: 10px; right: 10px; }
  .hd-nav-ck { padding: 7px 11px; }
  .hd-sec { margin-top: 40px; }
  .hd-h2s { margin-top: 36px; }

  /* master table → stacked cards, still one <tbody> per placement */
  .hd-mwrap { background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .hd-master, .hd-master tbody, .hd-master tr, .hd-master td, .hd-master tbody th { display: block; }
  .hd-master thead { display: none; }
  .hd-master .hd-pl {
    margin-bottom: 10px; overflow: hidden; background: var(--panel);
    border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  }
  .hd-master .hd-row { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; }
  .hd-master .hd-row > td, .hd-master .hd-row > th { padding: 0; min-width: 0; max-width: none; }
  .hd-master .hd-row > .hd-c-pl { grid-column: 1 / -1; min-width: 0; padding-inline-end: 66px; }
  .hd-master .hd-row > td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .hd-master .hd-row > .hd-c-fmt { grid-column: span 2; }
  .hd-master .hd-row > .hd-c-txt, .hd-master .hd-row > .hd-c-vid { display: block; }
  .hd-master .hd-row > .hd-c-vid { grid-column: 1 / -1; }
  .hd-master .hd-row > .hd-c-vid.is-empty, .hd-master .hd-row > .hd-c-fmt.is-empty, .hd-master .hd-row > .hd-c-txt.is-empty { display: none; }
  .hd-master .hd-row > .hd-c-conf { display: block; position: absolute; top: 25px; right: 52px; width: auto; padding: 0; }
  .hd-master .hd-row > .hd-c-tg { position: absolute; top: 18px; right: 12px; width: auto; }
  .hd-master .hd-c-ratio, .hd-kindlbl { white-space: normal; }
  .hd-vid { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .hd-master .hd-wl { white-space: normal; }
  .hd-master .hd-wl small { display: block; line-height: 1.3; }   /* value, then what it applies to */
  .hd-pl[data-fit] > .hd-row > :first-child, .hd-pl:target > .hd-row > :first-child, .hd-pl.is-target > .hd-row > :first-child, .hd-pl.is-flash > .hd-row > :first-child { box-shadow: none; }
  .hd-pl[data-fit="pass"] { border-color: color-mix(in srgb, var(--ok) 55%, var(--line-strong)) !important; }
  .hd-pl[data-fit="warn"] { border-color: color-mix(in srgb, var(--warn) 55%, var(--line-strong)) !important; }
  html:not(.hd-js) .hd-pl:target, .hd-pl.is-target, .hd-pl.is-flash { border-color: var(--hb-line) !important; }
  .hd-master .hd-detail > td { padding: 0 10px 10px; }
  .hd-dt { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 16px; }

  .hd-kitflat { grid-template-columns: minmax(0, 1fr); }

  /* same-shape rows: one swipeable line of chips per ratio */
  .hd-xrow { grid-template-columns: minmax(0, 1fr); padding: 13px 14px; gap: 10px; }
  .hd-xlist {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; margin-inline: -14px; padding-inline: 14px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent);
  }
  .hd-xlist::-webkit-scrollbar { display: none; }
  .hd-xlist > * { flex: none; }
}
@media (max-width: 640px) {
  .hd-drop { min-height: 0; padding: 16px 14px; }
  .hd-drop-ic { width: 42px; height: 42px; margin-bottom: 4px; }
  .hd-stats { gap: 8px; }
  .hd-stats a { padding: 10px 11px; }
  .hd-stats b { font-size: 24px; }
  .hd-stats span { font-size: 11.5px; }
  .hd-map { padding: 15px 16px 13px; border-radius: var(--radius); }
  .hd-map-head { margin-bottom: 12px; }
  .hd-map-foot { flex-direction: column; align-items: flex-start; }
  /* many sizes: one swipeable lineup instead of a tall wrapped wall */
  .hd-map-stage.is-strip {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
    margin: 0 -16px; padding: 6px 16px 12px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
  }
  .hd-map-stage.is-strip::after { content: ""; flex: 0 0 30px; }   /* lets the last frame scroll clear of the fade */
  .hd .hd-map-stage.is-strip { --k: .46; }
  .hd-map-stage.is-strip .hd-map-it { flex: none; }
  .hd-result { padding: 10px; border-radius: var(--radius); }
  .hub-ck-row { grid-template-columns: 26px minmax(0, 1fr); }
  .hub-ck-size { grid-column: 2; }
}
@media (max-width: 420px) {
  .hd-map-stage { --k: .55; gap: 14px; }
  .hd-nav-ck span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hd-nav-ck { padding: 8px 10px; }
}
@media (max-width: 370px) { .hd-map-stage { --k: .5; } }
@media (prefers-reduced-motion: reduce) {
  .hd-tg, .hd-row, .hd-xchip, .hd-map-frame, .hd-n, .hd-stats a { transition: none; }
  .hd-map-frame:hover, .hd-map-frame:focus-visible, a.hd-n:hover, .hd-stats a:hover { transform: none; }
  .hd-ck-card.is-flash { animation: none; }
}

/* Text-limit notes: "recommended" / "max" / scope under a value (data/text-specs.json "note"). */
.hd-lchips .hd-lq { font-style: normal; font-size: 11px; color: var(--muted); padding-left: 6px; border-left: 1px solid var(--line-strong); }
.hd-lchips li.is-q-max .hd-lq { color: var(--ink); font-weight: 600; }
.hd-lim td.hd-num .hd-lv { display: block; line-height: 1.25; }
.hd-lim td.hd-num .hd-lv + .hd-lv { margin-top: 6px; }
.hd-lim td.hd-num .hd-lv small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
/* card layout (≥7 fields, phones): multi-value cells are rounded panels, not pills */
.hd .hd-lim td.hd-num.is-multi { border-radius: 14px; flex-wrap: wrap; }
