  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --par-0: #212438;
    --par-1: #2F3452;
    --par-2: #8CA1FF;
    --par-3: #6864D1;
    --par-4: #FF5719;
    --par-5: #F8931C;
    --alt-1: #FF2751;
    --alt-2: #34C679;
    --bg: #F3F5FF;
    --surface: #FFFFFF;
    --border: rgba(47,52,82,0.1);
    --border-strong: rgba(47,52,82,0.2);
    --text: #2F3452;
    --text-muted: #525878;
    --text-faint: #9296B4;
    --page-bg: linear-gradient(135deg, rgba(104,100,209,0.2) 0%, rgba(140,159,255,0.1) 50%, #ffffff 100%);
    --accent-text: var(--par-3);
    --accent-hover: var(--par-1);
    --btn-hover: var(--par-1);
    --tooltip-bg: var(--par-1);
    --checkbox-bg: #fff;
    --lock-text: #C41430;
    --req-text: #0A5C47;
    --flex-text: #0E6E72;
    --note-text: #7A4A00;
    --note-bg: rgba(248,147,28,0.08);
    --note-border: rgba(248,147,28,0.3);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --sidebar-w: 220px;
    --font: 'Manrope', system-ui, sans-serif;
    --font-mono: 'DM Mono', monospace;
  }

  /* ── Dark mode ──
     Scalar adds .dark-mode / .light-mode to the page (follows the portal's
     light / dark / system toggle). Only the tokens below change; category
     colours are derived in the "Category colours" section. */
  .dark-mode {
    color-scheme: dark;
    --bg: #1A1D30;
    --surface: #23273F;
    --border: rgba(255,255,255,0.1);
    --border-strong: rgba(255,255,255,0.22);
    --text: #E8EAF6;
    --text-muted: #B8BDD9;
    --text-faint: #9EA2C2;
    --page-bg: #14162A;
    --accent-text: #AEB3FF;
    --accent-hover: #FFFFFF;
    --btn-hover: #7F7BE3;
    --tooltip-bg: #3B4070;
    --checkbox-bg: var(--bg);
    --lock-text: #FF93A9;
    --req-text: #6FE0A6;
    --flex-text: #5ED8DD;
    --note-text: #FFE9C2;
    --note-bg: #3D3017;
    --note-border: #9A7424;
  }

  body {
    font-family: var(--font);
    background: var(--page-bg) no-repeat fixed;
    background-size: cover;
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
  }

  /* ── Tab bar ── */
  .tab-bar {
    background: var(--par-3);
    display: flex;
    align-items: center;
    padding: 8px 40px;
    gap: 6px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(33,36,56,0.25);
  }

  .tab-btn {
    padding: 11px 22px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    letter-spacing: -0.1px;
    transition: color .15s, background .15s;
    border-radius: 999px;
  }
  .tab-btn:hover { color: #fff; background: rgba(255,255,255,0.12); }
  .tab-btn:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
  .tab-btn.active { color: var(--par-3); background: #fff; }
  .tab-btn.active:hover { color: var(--par-3); background: #fff; }

  .reset-guide-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font);
    letter-spacing: -0.1px;
    transition: background .15s, color .15s, border-color .15s;
  }
  .reset-guide-btn svg { flex-shrink: 0; }
  .reset-guide-btn:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.5); color: #fff; }
  .reset-guide-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

  /* ── Tab panes ── */
  .tab-pane { display: none; }
  .tab-pane.active { display: block; }

  /* ── Page shell ── */
  .page {
    padding: 0 0 80px;
  }

  /* ── Masthead ── */
  .masthead {
    background: var(--par-1);
    position: relative;
    overflow: hidden;
    padding: 36px 40px 0;
    margin-bottom: 36px;
  }
  .masthead-dots { position: absolute; top: 22px; right: 36px; opacity: 0.15; pointer-events: none; }
  .masthead-circles { position: absolute; bottom: -30px; right: 120px; opacity: 0.12; pointer-events: none; }
  .masthead-eyebrow { font-family: var(--font); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--par-2); margin-bottom: 12px; position: relative; }
  .masthead-title { font-size: 28px; font-weight: 200; line-height: 1.15; color: #fff !important; margin-bottom: 10px; position: relative; letter-spacing: -0.3px; }
  .masthead-sub { font-size: 14px; font-weight: 400; color: rgba(255,255,255,0.65); max-width: 540px; line-height: 1.6; position: relative; margin-bottom: 20px; }
  .masthead-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative; margin-bottom: 28px; }
  .meta-chip { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 3px 11px; font-family: var(--font-mono); letter-spacing: .02em; }
  .masthead-strip { height: 5px; margin: 0 -40px; position: relative; background: linear-gradient(to right, #F8931C, #FF5719, #6864D1, #8C9FFF); }
  .masthead-strip div { display: none; }

  /* ── Layout ── */
  .layout { display: flex; align-items: flex-start; gap: 24px; padding: 0 28px; }

  /* ── Sidebar ── */
  .sidebar { width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 47px; max-height: calc(100vh - 75px); overflow-y: auto; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
  .sidebar-section { padding: 14px 14px 16px; border-bottom: 1px solid var(--border); }
  .sidebar-section:last-child { border-bottom: none; }
  .sidebar-section-label { font-family: var(--font); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 10px; }

  .filter-select-wrap { position: relative; display: flex; align-items: center; margin-bottom: 8px; }
  .filter-select { appearance: none; background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 6px 28px 6px 10px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--text); cursor: pointer; transition: border-color .15s; width: 100%; }
  .filter-select:focus { border-color: var(--par-3); }
  .filter-select:focus-visible { outline: 2px solid var(--par-3); outline-offset: 2px; }
  .filter-select-wrap::after { content: ''; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--text-muted); pointer-events: none; }
  .filter-hint { font-size: 11px; color: var(--text-faint); font-family: var(--font); line-height: 1.4; }
  .filter-count-badge { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--accent-text); background: rgba(104,100,209,0.1); border: 1px solid rgba(104,100,209,0.25); border-radius: 20px; padding: 2px 8px; font-family: var(--font-mono); transition: opacity .2s; }
  .filter-count-badge.hidden { opacity: 0; pointer-events: none; }

  .cat-grid { display: flex; flex-direction: column; }
  .cat-btn { border: none; border-radius: 0; padding: 10px 12px; cursor: pointer; background: transparent; text-align: left; width: 100%; transition: background .15s; border-bottom: 1px solid var(--border); }
  .cat-btn:last-child { border-bottom: none; }
  .cat-btn:hover { background: var(--bg); }
  .cat-btn.active { background-color: var(--c-bg); color: var(--c-color); }
  .cat-btn-inner { display: flex; align-items: center; gap: 9px; }

  /* ── Category colours ──
     guide.js sets --cat-color / --cat-bg / --cat-icon-bg inline (from
     guide-data.js) on each category button and panel header. Light mode uses
     them as-is; dark mode derives readable equivalents from --cat-color. */
  .cat-btn, .panel-header--toggle {
    --c-color: var(--cat-color);
    --c-bg: var(--cat-bg);
    --c-icon-bg: var(--cat-icon-bg);
  }
  .dark-mode .cat-btn, .dark-mode .panel-header--toggle {
    --c-color: color-mix(in srgb, var(--cat-color) 35%, #fff);
    --c-bg: color-mix(in srgb, var(--cat-color) 24%, var(--surface));
    --c-icon-bg: color-mix(in srgb, var(--cat-color) 40%, var(--surface));
  }

  /* ── Category checkbox ── */
  .cat-checkbox { width: 16px; height: 16px; border-radius: 3px; border: 1.5px solid var(--border-strong); background: var(--checkbox-bg); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s; }
  .cat-checkbox-mark { opacity: 0; transition: opacity .15s; }
  .cat-btn.active .cat-checkbox { background: var(--par-3); border-color: var(--par-3); }
  .cat-btn.active .cat-checkbox-mark { opacity: 1; }

  /* ── Sidebar label row + clear button ── */
  .sidebar-section-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .sidebar-section-label-row .sidebar-section-label { margin-bottom: 0; }
  .clear-cats-btn { font-family: var(--font); font-size: 10px; font-weight: 600; color: var(--accent-text); background: none; border: none; cursor: pointer; padding: 0; letter-spacing: 0; transition: color .15s; }
  .clear-cats-btn:hover { color: var(--accent-hover); }
  .clear-cats-btn.hidden { display: none; }
  .select-all-cats-btn { font-family: var(--font); font-size: 10px; font-weight: 600; color: var(--text-muted); background: none; border: none; cursor: pointer; padding: 0; letter-spacing: 0; transition: color .15s; }
  .select-all-cats-btn:hover { color: var(--accent-hover); }
  .select-all-cats-btn.hidden { display: none; }
  .cat-actions { display: flex; gap: 8px; align-items: center; }
  .cat-icon { background: var(--c-icon-bg); color: var(--c-color); width: 26px; height: 26px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .cat-icon svg { width: 13px; height: 13px; }
  .cat-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; }
  .cat-count { font-size: 10px; color: var(--text-faint); margin-top: 1px; display: block; font-family: var(--font-mono); }
  .cat-always-badge { display: inline-block; font-size: 9px; font-weight: 700; color: var(--accent-text); background: rgba(104,100,209,0.1); border: 1px solid rgba(104,100,209,0.25); padding: 1px 5px; border-radius: 10px; white-space: nowrap; }
  .cat-always-legend { font-size: 10px; color: var(--text-faint); margin-top: -6px; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
  .cat-text { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1; }
  .cat-icon--has-tip { cursor: help; }
  .cat-tooltip { position: fixed; background: var(--tooltip-bg); color: #fff; font-size: 11px; font-weight: 500; line-height: 1.45; padding: 7px 10px; border-radius: 7px; white-space: normal; width: 220px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 9999; box-shadow: 0 4px 14px rgba(33,36,56,0.22); }
  .cat-tooltip::after { content: ''; position: absolute; top: 100%; left: var(--cat-arrow-left, 50%); transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--tooltip-bg); }
  .cat-tooltip.cat-tooltip--visible { opacity: 1; }

  /* ── Main ── */
  .main { flex: 1; min-width: 0; }
  .content-area { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
  .empty-state { padding: 60px 32px; text-align: center; }
  .empty-icon { width: 40px; height: 40px; margin: 0 auto 14px; opacity: .2; }
  .empty-text { font-size: 14px; color: var(--text-muted); font-weight: 500; }

  .panel-header { padding: 14px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
  .panel-header--toggle { background: var(--c-bg); cursor: pointer; user-select: none; }
  .panel-header--toggle:hover { filter: brightness(0.97); }
  .panel-icon { background: var(--c-icon-bg); color: var(--c-color); width: 28px; height: 28px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-right: 10px; }
  .panel-icon svg { width: 14px; height: 14px; }
  .panel-header-left { display: flex; align-items: center; gap: 10px; }
  .panel-chevron { display: flex; align-items: center; color: var(--text-muted); flex-shrink: 0; padding-left: 12px; transition: transform .2s ease; }
  .panel-chevron--collapsed { transform: rotate(-90deg); }
  .cat-panel--collapsed .subsection { display: none; }
  .cat-panel--collapsed .panel-header { border-bottom: none; }
  .panel-title { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -0.1px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .panel-title-desc { font-size: 11px; font-weight: 400; color: var(--text); letter-spacing: 0; }
  .panel-subtitle { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); }

  .subsection { border-bottom: 1px solid var(--border); }
  .subsection:last-child { border-bottom: none; }
  .subsection-hdr { padding: 10px 22px; background: var(--bg); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-muted); font-family: var(--font); letter-spacing: 0; text-transform: none; }

  table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  thead th { padding: 7px 14px; text-align: left; font-size: 10px; font-weight: 500; color: var(--text-faint); border-bottom: 1px solid var(--border); background: var(--bg); font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
  thead th.th-center { text-align: center; }
  thead th:last-child { text-align: center; }
  tbody td { padding: 10px 14px; vertical-align: top; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.55; color: var(--text); font-weight: 400; }
  tbody tr:last-child td { border-bottom: none; }
  tbody tr:hover td { background: rgba(140,161,255,0.04); }
  tbody tr.version-hidden { display: none; }
  tbody tr.ver-hidden { display: none; }

  /* Decision Guide columns */
  .col-d    { width: 30%; }
  .col-desc { width: 52%; }
  td.col-desc { color: var(--text-muted); font-size: 12.5px; }
  .desc-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .col-lk   { width: 18%; }

  /* Branding Guide columns */
  .col-item    { width: 28%; }
  .col-bg-desc { width: 44%; }
  td.col-bg-desc { color: var(--text-muted); font-size: 12.5px; }
  .col-req     { width: 14%; }
  .col-lock    { width: 14%; }

  /* Decision Guide cell styles */
  .td-decision { font-weight: 600; color: var(--text); }
  .td-options { color: var(--text-muted); }
  .td-default { color: var(--text-faint); font-family: var(--font-mono); font-size: 12px; }
  .td-lock { text-align: center; }

  /* Branding Guide cell styles */
  .td-item { font-weight: 600; color: var(--text); }
  .td-spec { color: var(--text-muted); }
  .td-def  { color: var(--text-faint); font-family: var(--font-mono); font-size: 11.5px; }
  .td-req  { text-align: center; }
  .td-ver  { text-align: center; color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; }

  /* Badges */
  .lock-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--lock-text); background: rgba(255,39,81,0.08); border: 1px solid rgba(255,39,81,0.25); padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
  .lock-badge svg { width: 10px; height: 10px; flex-shrink: 0; }
  .req-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; color: var(--req-text); background: rgba(52,198,121,0.1); border: 1px solid rgba(52,198,121,0.3); padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
  .opt-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; color: var(--text-faint); background: rgba(146,150,180,0.1); border: 1px solid rgba(146,150,180,0.25); padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
  .flex-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; color: var(--flex-text); background: rgba(14,110,114,0.08); border: 1px solid rgba(14,110,114,0.25); padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
  .spec-pill { display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 500; background: rgba(104,100,209,0.08); border: 1px solid rgba(104,100,209,0.2); color: var(--accent-text); border-radius: 5px; padding: 2px 7px; margin: 1px 2px 1px 0; white-space: nowrap; }

  .dash { color: var(--text-faint); }
  .section-empty-row td { text-align: center; color: var(--text-faint); font-size: 12px; font-family: var(--font-mono); padding: 14px 18px; font-style: italic; }
  .cat-panel + .cat-panel { border-top: 20px solid var(--bg); }

  .footer-note { margin-bottom: 16px; padding: 11px 14px; background: var(--note-bg); border: 1px solid var(--note-border); border-radius: var(--radius-md); font-size: 12px; color: var(--note-text); line-height: 1.6; display: none; }
  .footer-note strong { font-weight: 700; }

  .legend { margin-bottom: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 11px; color: var(--text-muted); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
  .legend-item { display: flex; align-items: center; gap: 6px; }

  .footer-doc { padding: 20px 28px 0; margin-top: 28px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }

  /* ── Clickable rows ── */
  .clickable-row { cursor: pointer; }
  .clickable-row:hover td { background: rgba(140,161,255,0.08) !important; }
  .row-expand-icon { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: rgba(104,100,209,0.1); color: var(--accent-text); align-items: center; justify-content: center; margin-left: 6px; opacity: 0; transition: opacity .15s; vertical-align: middle; flex-shrink: 0; }
  .clickable-row:hover .row-expand-icon { opacity: 1; }
  .item-specs { margin-top: 4px; line-height: 1.6; }
  .item-specs .spec-pill { font-size: 10px; padding: 1px 5px; }

  /* ── Modal ── */
  .modal-overlay { position: fixed; inset: 0; background: rgba(33,36,56,0.55); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .modal-overlay.open { opacity: 1; pointer-events: all; }
  .modal-box { background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 8px 40px rgba(33,36,56,0.22); max-width: 560px; width: 100%; max-height: 80vh; overflow-y: auto; position: relative; transform: translateY(8px); transition: transform .2s; }
  .modal-overlay.open .modal-box { transform: translateY(0); }
  .modal-header { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
  .modal-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.4; }
  .modal-close { border: none; background: var(--bg); border-radius: var(--radius-sm); width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-muted); transition: background .15s; }
  .modal-close:hover { background: var(--border-strong); }
  .modal-body { padding: 18px 22px 22px; }
  .modal-field { margin-bottom: 16px; }
  .modal-field:last-child { margin-bottom: 0; }
  .modal-field-label { font-size: 10px; font-weight: 500; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 5px; }
  .modal-field-value { font-size: 13px; color: var(--text-muted); line-height: 1.65; }
  .modal-field-value b { color: var(--text); font-weight: 600; }
  .modal-field-mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
  .modal-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
  .ver-badge { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); background: rgba(146,150,180,0.1); border: 1px solid rgba(146,150,180,0.2); border-radius: 20px; padding: 3px 8px; }
  .modal-box--wide { max-width: 860px; }
  .modal-layout { display: flex; gap: 0; }
  .modal-fields { flex: 1 1 0; min-width: 0; }
  .modal-image-panel { flex: 0 0 240px; border-left: 1px solid var(--border); padding-left: 22px; margin-left: 22px; display: flex; flex-direction: column; gap: 8px; }
  .modal-image-panel .modal-field-label { margin-bottom: 0; }
  .modal-preview-img { width: 100%; border-radius: 12px; box-shadow: 0 2px 12px rgba(33,36,56,0.15); object-fit: contain; max-height: 440px; }
  .modal-image-panel--missing::after { content: 'Image not found'; display: flex; align-items: center; justify-content: center; height: 160px; background: var(--bg); border-radius: 10px; font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }
  .carousel-frame { position: relative; display: flex; align-items: center; justify-content: center; }
  .carousel-nav { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 10px; }
  .carousel-arrow { background: rgba(33,36,56,0.55); border: none; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; flex-shrink: 0; transition: background .15s; padding: 0; }
  .carousel-arrow:hover { background: rgba(33,36,56,0.85); }
  .carousel-dots { display: flex; justify-content: center; gap: 6px; }
  .carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong, #C8CAEE); cursor: pointer; transition: background .15s, transform .15s; }
  .carousel-dot--active { background: var(--par-3); transform: scale(1.25); }
  .carousel-caption { font-size: 12px; color: var(--text-muted, #525878); text-align: center; padding: 6px 12px 0; line-height: 1.4; }

  /* ── Welcome / walkthrough modal ── */
  .welcome-box { max-width: 480px; padding: 32px 30px 26px; }
  .welcome-close { position: absolute; top: 16px; right: 16px; }
  .welcome-view { position: relative; }
  .welcome-eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }
  .welcome-title { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.25; margin-bottom: 12px; padding-right: 24px; }
  .welcome-body { font-size: 14px; color: var(--text-muted); line-height: 1.65; margin-bottom: 24px; }
  .welcome-actions { display: flex; gap: 10px; justify-content: flex-end; }
  .wizard-actions { justify-content: space-between; margin-top: 24px; }
  .welcome-btn { padding: 10px 18px; border-radius: 9999px; font-family: var(--font); font-size: 13px; font-weight: 800; cursor: pointer; border: none; transition: background .15s, color .15s, opacity .15s; min-height: 44px; }
  .welcome-btn--primary { background: var(--par-3); color: #fff; }
  .welcome-btn--primary:hover { background: var(--btn-hover); }
  .welcome-btn--primary:disabled { opacity: .45; cursor: not-allowed; }
  .welcome-btn--ghost { background: var(--bg); color: var(--text-muted); }
  .welcome-btn--ghost:hover { background: var(--border-strong); }
  .welcome-btn--danger { background: var(--alt-1); color: #fff; }
  .welcome-btn--danger:hover { background: #d10f3d; }
  .welcome-btn:focus-visible { outline: 2px solid var(--par-3); outline-offset: 2px; }

  .welcome-dismiss-toggle { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 22px; cursor: pointer; user-select: none; }
  .welcome-dismiss-toggle input { width: 14px; height: 14px; accent-color: var(--par-3); cursor: pointer; }

  .wizard-progress { display: flex; gap: 6px; margin-bottom: 14px; }
  .wizard-progress .dot { height: 4px; flex: 1; border-radius: 2px; background: var(--border-strong); transition: background .2s; }
  .wizard-progress .dot--done { background: var(--par-3); }
  .wizard-progress .dot--active { background: var(--par-2); }
  .wizard-step-count { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
  .wizard-question { font-size: 17px; font-weight: 800; color: var(--text); line-height: 1.3; margin-bottom: 18px; }
  .wizard-options { display: flex; flex-direction: column; gap: 8px; }
  .wizard-options--grid { display: grid; grid-template-columns: repeat(2, 1fr); }
  .wizard-opt { text-align: left; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--surface); font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; display: flex; align-items: center; gap: 10px; }
  .wizard-opt:hover { border-color: var(--par-2); background: rgba(140,161,255,0.06); }
  .wizard-opt.selected { border-color: var(--par-3); background: rgba(104,100,209,0.08); }
  .wizard-opt:focus-visible { outline: 2px solid var(--par-3); outline-offset: 2px; }
  .wizard-opt .opt-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); flex-shrink: 0; position: relative; transition: border-color .15s; }
  .wizard-opt.selected .opt-radio { border-color: var(--par-3); }
  .wizard-opt.selected .opt-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--par-3); }
  .wizard-opt .opt-check { width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--border-strong); flex-shrink: 0; position: relative; transition: border-color .15s, background .15s; }
  .wizard-opt.selected .opt-check { border-color: var(--par-3); background: var(--par-3); }
  .wizard-opt.selected .opt-check::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

  .copy-link-btn { width: 100%; padding: 9px 12px; background: transparent; color: var(--accent-text); border: 1.5px solid var(--par-3); border-radius: 9999px; font-family: var(--font); font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .15s, color .15s; letter-spacing: -0.1px; min-height: 44px; }
  .copy-link-btn:hover { background: var(--par-3); color: #fff; }
  .copy-link-btn:active { opacity: 0.85; }

  /* ── Search bar ── */
  .search-bar-wrap { margin-bottom: 12px; display: none; }
  .search-bar-wrap.visible { display: block; }
  .table-search { width: 100%; padding: 8px 14px 8px 36px; font-family: var(--font); font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); transition: border-color .15s; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Ccircle cx='6' cy='6' r='4.5' stroke='%239296B4' stroke-width='1.3'/%3E%3Cpath d='M9.5 9.5l2.5 2.5' stroke='%239296B4' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; }
  .table-search:focus { outline: none; border-color: var(--par-3); }
  .table-search:focus-visible { outline: 2px solid var(--par-3); outline-offset: 2px; }
  .table-search::placeholder { color: var(--text-faint); }
  .search-no-results { padding: 40px 32px; text-align: center; font-size: 13px; color: var(--text-muted); }

  @media (max-width: 780px) {
    .tab-bar { padding: 8px 16px; }
    .reset-guide-btn { padding: 9px 11px; }
    .reset-guide-label { display: none; }
    .masthead { padding: 28px 20px 0; }
    .masthead-strip { margin: 0 -20px; }
    .layout { flex-direction: column; padding: 0 16px; }
    .sidebar { width: 100%; position: static; max-height: none; top: 0; }
    .cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .cat-btn { border: 1px solid var(--border) !important; border-radius: var(--radius-md) !important; }
    .cat-btn.active { border-color: currentColor !important; }
    .footer-doc { padding: 20px 16px 0; }
    .wizard-options--grid { grid-template-columns: 1fr; }
    .welcome-box { padding: 26px 20px 22px; }
  }
