  :root {
    --bg: #0e0c0b;
    --bg2: #1b1612;
    --bg3: #26201a;
    --card: #221b15;
    --card-hover: #2d241d;
    --brown: #6b3d1e;
    --brown-light: #a8673d;
    --cream: #f6eddc;
    --cream-dim: #ddd1bf;
    --text: #e5dacc;
    --text-dim: #a3978a;
    --accent: #c97335;
    --accent2: #ec9a5c;
    --border: #3a2f28;
    --border-light: #5a4a3f;
    --tag-bg: #1f1a15;
    --highlight: #3a2b1d;
  }

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

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ── HEADER ── */
  header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    height: 64px;
  }

  .logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.12em;
    color: var(--cream);
  }
  .logo span { color: var(--accent); }

  .nav-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-transform: uppercase;
  }

  .home-link {
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cream);
    text-decoration: none;
    border: 1px solid var(--border-light);
    padding: 0.55rem 0.85rem;
    transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  }

  .home-link:hover {
    color: var(--accent2);
    border-color: var(--accent2);
    transform: translateY(-1px);
  }

  /* ── HERO ── */
  .hero {
    padding: 5rem 3rem 3rem;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: end;
  }

  .hero-eyebrow {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 1.2rem;
  }

  .hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 0.9;
    color: var(--cream);
    letter-spacing: 0.02em;
  }

  .hero h1 em {
    font-style: normal;
    color: var(--brown-light);
    display: block;
  }

  .hero-meta {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 0.5rem;
  }

  .hero-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.8;
    max-width: 380px;
  }

  .stat-row {
    display: flex;
    gap: 2.5rem;
  }

  .stat { display: flex; flex-direction: column; gap: 0.2rem; }
  .stat-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--accent2);
    line-height: 1;
  }
  .stat-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    text-transform: uppercase;
  }

  /* ── SEARCH ── */
  .search-bar {
    padding: 1.5rem 3rem;
    border-bottom: 1px solid var(--border);
    border-top: 1px solid rgba(255,255,255,0.04);
    background: linear-gradient(180deg, #241b14 0%, #1a130f 100%);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.03),
      inset 0 -1px 0 rgba(0,0,0,0.35);
  }

  .search-icon {
    color: var(--accent2);
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.95;
  }

  #search-input {
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: #fff7eb;
    width: 100%;
    letter-spacing: 0.05em;
  }

  #search-input::placeholder { color: #b9ab9a; }

  .search-hint {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--cream-dim);
    white-space: nowrap;
    opacity: 0.8;
  }

  .view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.18rem;
    background: #16100d;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    flex-shrink: 0;
  }

  .view-toggle-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
  }

  .view-toggle-btn.is-active {
    background: linear-gradient(180deg, rgba(236,154,92,0.18) 0%, rgba(201,115,53,0.3) 100%);
    color: var(--cream);
  }

  .view-toggle-btn:focus-visible,
  .why-trigger:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 2px;
  }

  #result-count {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--accent2);
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
    font-weight: 700;
  }

  /* ── LAYOUT ── */
  .layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 64px);
  }

  /* ── SIDEBAR ── */
  .sidebar {
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--bg2);
  }

  .sidebar::-webkit-scrollbar { width: 3px; }
  .sidebar::-webkit-scrollbar-track { background: transparent; }
  .sidebar::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

  .sidebar-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.22em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-nav { display: flex; flex-direction: column; gap: 0.2rem; }

  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.55rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    transition: all 0.15s;
    cursor: pointer;
  }

  .sidebar-link:hover { background: var(--bg3); color: var(--cream); }
  .sidebar-link.active {
    background: linear-gradient(90deg, rgba(201,115,53,0.18) 0%, rgba(58,43,29,0.95) 100%);
    color: var(--cream);
    border-left: 2px solid var(--accent2);
  }

  .sidebar-num {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    color: var(--accent);
    flex-shrink: 0;
    width: 18px;
  }

  /* ── MAIN ── */
  main {
    padding: 0;
    overflow-y: auto;
  }

  /* ── SECTION ── */
  .section {
    border-bottom: 1px solid var(--border);
    padding: 3rem;
  }

  .section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    gap: 2rem;
  }

  .section-title-wrap { display: flex; align-items: center; gap: 1.2rem; }

  .section-num {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    flex-shrink: 0;
  }

  .section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.4rem;
    letter-spacing: 0.05em;
    color: var(--cream);
    line-height: 1;
  }

  .section-desc {
    font-size: 0.78rem;
    color: var(--text-dim);
    max-width: 500px;
    text-align: right;
    line-height: 1.7;
  }

  /* ── CONVERTER ── */
  .converter-panel {
    display: grid;
    gap: 1rem;
    padding: 1.4rem;
    border: 1px solid var(--border);
    background:
      radial-gradient(circle at top right, rgba(201,115,53,0.16), transparent 34%),
      linear-gradient(180deg, rgba(38,32,26,0.96) 0%, rgba(24,19,15,0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }

  .converter-entry {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) 180px auto;
    gap: 0.9rem;
    align-items: end;
  }

  .converter-field {
    display: grid;
    gap: 0.45rem;
  }

  .converter-label,
  .converter-examples-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  .converter-input,
  .converter-select {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--border-light);
    background: rgba(12, 9, 7, 0.92);
    color: var(--cream);
    padding: 0.9rem 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.86rem;
    letter-spacing: 0.03em;
    outline: none;
  }

  .converter-input::placeholder {
    color: #a48f7d;
  }

  .converter-input:focus,
  .converter-select:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 0 1px rgba(236,154,92,0.25);
  }

  .converter-select {
    appearance: none;
    cursor: pointer;
  }

  .converter-clear,
  .converter-example {
    appearance: none;
    border: 1px solid var(--border-light);
    background: #17110d;
    color: var(--cream);
    font-family: 'Space Mono', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  }

  .converter-clear {
    min-height: 52px;
    padding: 0.85rem 1rem;
    font-size: 0.62rem;
  }

  .converter-clear:hover,
  .converter-example:hover {
    border-color: var(--accent2);
    color: var(--accent2);
    background: var(--highlight);
    transform: translateY(-1px);
  }

  .converter-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
  }

  .converter-example {
    padding: 0.45rem 0.7rem;
    font-size: 0.58rem;
  }

  .converter-status {
    min-height: 1.4rem;
    font-size: 0.72rem;
    color: var(--cream-dim);
  }

  .converter-status.is-error {
    color: #e29a82;
  }

  .converter-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    background: #5a493c;
  }

  .converter-card {
    background: #18120f;
    padding: 1rem 1.05rem;
    display: grid;
    gap: 0.38rem;
    min-height: 124px;
    align-content: start;
  }

  .converter-card-label,
  .converter-card-note {
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
  }

  .converter-card-label {
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    color: var(--text-dim);
  }

  .converter-card-value {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(1.65rem, 2.8vw, 2.35rem);
    line-height: 1;
    color: var(--accent2);
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
  }

  .converter-card-note {
    font-size: 0.5rem;
    letter-spacing: 0.1em;
    color: var(--brown-light);
    line-height: 1.5;
  }

  /* ── CARDS GRID ── */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 3px;
    background: #5a493c;
  }

  .card-top {
    margin-bottom: 1rem;
  }

  .card-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--cream);
    letter-spacing: 0.02em;
    line-height: 1.35;
    display: block;
    width: 100%;
  }

  .card-flag {
    font-family: 'Space Mono', monospace;
    font-size: 0.48rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.22rem 0.55rem;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .flag-dim   { background: var(--brown); color: var(--cream); }
  .flag-mat   { background: #1a2a1a; color: #7abf7a; }
  .flag-rule  { background: #1a1a2a; color: #7a9abf; }
  .flag-clear { background: #2a1a1a; color: #bf7a7a; }
  .flag-code  { background: #1f1a08; color: #c9a84c; border: 1px solid #3a2e10; }

  /* ── CARD INNER LAYOUT ── */
  .card {
    background: var(--card);
    padding: 1.4rem 1.6rem;
    transition: background 0.15s;
    cursor: default;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }

  .card:hover { background: var(--card-hover); }
  .card.hidden { display: none; }

  .card-top { display: block; }

  .card-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--cream);
    letter-spacing: 0.02em;
    line-height: 1.35;
    display: block;
    width: 100%;
  }

  .card-flag {
    font-family: 'Space Mono', monospace;
    font-size: 0.48rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.22rem 0.55rem;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .flag-dim   { background: var(--brown); color: var(--cream); }
  .flag-mat   { background: #1a2a1a; color: #7abf7a; }
  .flag-rule  { background: #1a1a2a; color: #7a9abf; }
  .flag-clear { background: #2a1a1a; color: #bf7a7a; }
  .flag-code  { background: #1f1a08; color: #c9a84c; border: 1px solid #3a2e10; }

  .dims {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
  }

  /* ── CARD BOTTOM ROW ── */
  .card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: auto;
  }

  .dim-pill {
    background: #15100d;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    padding: 0.45rem 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.14rem;
    min-width: 62px;
    min-inline-size: 0;
  }

  .dim-value {
    order: 2;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.15rem;
    color: var(--accent2);
    line-height: 1.05;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .dim-value.is-compact {
    font-size: 0.98rem;
    line-height: 1.08;
  }

  .dim-value-unit {
    color: var(--brown-light);
  }

  .dim-unit {
    order: 1;
    font-family: 'Space Mono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.12em;
    color: var(--brown-light);
    text-transform: none;
    line-height: 1.15;
    text-align: center;
  }

  .dim-label {
    order: 3;
    font-size: 0.55rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 0.04rem;
    overflow-wrap: anywhere;
  }

  /* ── RANGE NOTE (compact, below dims) ── */
  .range-note {
    font-family: 'Space Mono', monospace;
    font-size: 0.52rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-top: 0.5rem;
    display: block;
  }

  /* ── HOVER TOOLTIP ── */
  .card-why {
    display: none;
    position: fixed;
    z-index: 200;
    width: min(290px, calc(100vw - 24px));
    background: #1e1a14;
    border: 1px solid var(--brown);
    border-radius: 4px;
    padding: 1rem 1.1rem;
    font-size: 0.73rem;
    color: var(--text);
    line-height: 1.75;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  }

  .card-why.visible { display: block; }

  .card-why.is-modal {
    top: 50%;
    left: 50%;
    width: min(420px, calc(100vw - 32px));
    max-height: min(70vh, 560px);
    overflow-y: auto;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    padding: 1.1rem 1.15rem;
  }

  .card-why strong {
    color: var(--accent2);
    font-weight: 500;
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
  }

  /* ── WHY TRIGGER CHIP ── */
  .why-trigger {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.9rem;
    padding: 0.28rem 0.65rem;
    background: #15100d;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
    min-height: 40px;
  }

  .why-trigger:hover {
    border-color: var(--brown-light);
    background: var(--highlight);
  }

  .why-trigger-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
  }

  .why-trigger span {
    font-family: 'Space Mono', monospace;
    font-size: 0.52rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
  }

  .why-trigger:hover span { color: var(--accent2); }

  .why-trigger.is-open {
    border-color: var(--brown-light);
    background: var(--highlight);
  }

  .why-trigger.is-open span {
    color: var(--accent2);
  }

  .why-backdrop {
    appearance: none;
    border: none;
    padding: 0;
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(8, 6, 5, 0.76);
    backdrop-filter: blur(4px);
    display: none;
  }

  .why-backdrop.visible {
    display: block;
  }

  /* hide tags + old card::after */
  .card-tags { display: none; }

  /* ── NO RESULTS ── */
  #no-results {
    display: none;
    padding: 4rem 3rem;
    text-align: center;
    color: var(--text-dim);
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  #no-results span {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--border-light);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
  }

  /* ── HIGHLIGHT MATCH ── */
  mark {
    background: var(--brown);
    color: var(--cream);
    border-radius: 2px;
    padding: 0 2px;
  }

  body.view-simple .hero-desc,
  body.view-simple .search-hint,
  body.view-simple .section-desc,
  body.view-simple .card-bottom,
  body.view-simple .range-note {
    display: none;
  }

  body.view-simple .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }

  body.view-simple .card {
    padding: 1rem 1.05rem;
    gap: 0.7rem;
  }

  body.view-simple .card-top {
    margin-bottom: 0.35rem;
  }

  body.view-simple .card-name {
    font-size: 0.78rem;
    line-height: 1.25;
  }

  body.view-simple .card-flag {
    display: none;
  }

  body.view-simple .dims {
    gap: 0.4rem;
  }

  body.view-simple .dim-pill {
    flex: 1 1 calc(50% - 0.4rem);
    min-width: 0;
    padding: 0.42rem 0.55rem 0.45rem;
    background: #120e0b;
  }

  body.view-simple .dim-value {
    font-size: 1.45rem;
  }

  body.view-simple .dim-unit {
    font-size: 0.44rem;
    letter-spacing: 0.09em;
  }

  body.view-simple .dim-label {
    font-size: 0.5rem;
  }

  /* ── RANGE NOTE ── */
  .range-note {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-top: 0.4rem;
    display: block;
  }

  /* ── CODE QUIZ ── */
  .code-quiz-page .quiz-toolbar {
    justify-content: space-between;
  }

  .quiz-date,
  .quiz-code-link {
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .quiz-date {
    color: var(--cream-dim);
    flex: 1 1 auto;
  }

  .quiz-code-link {
    color: var(--cream);
    text-decoration: none;
    border: 1px solid var(--border-light);
    padding: 0.55rem 0.85rem;
    transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
  }

  .quiz-code-link:hover {
    color: var(--accent2);
    border-color: var(--accent2);
    transform: translateY(-1px);
  }

  .quiz-list {
    display: grid;
    gap: 1rem;
  }

  .quiz-card {
    background:
      radial-gradient(circle at top right, rgba(201,115,53,0.12), transparent 32%),
      var(--card);
    border: 1px solid var(--border);
    padding: 1.35rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }

  .quiz-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
  }

  .quiz-number,
  .quiz-ref {
    font-family: 'Space Mono', monospace;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .quiz-number {
    color: var(--accent);
  }

  .quiz-ref {
    color: var(--brown-light);
    text-align: right;
  }

  .quiz-card h3 {
    color: var(--cream);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 1rem;
    max-width: 760px;
  }

  .quiz-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .quiz-option {
    appearance: none;
    border: 1px solid var(--border-light);
    background: #15100d;
    color: var(--text);
    min-height: 56px;
    padding: 0.8rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-align: left;
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.35;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  }

  .quiz-option span {
    display: inline-grid;
    place-items: center;
    width: 1.4rem;
    height: 1.4rem;
    flex: 0 0 1.4rem;
    border: 1px solid var(--border-light);
    color: var(--accent2);
    font-family: 'Space Mono', monospace;
    font-size: 0.58rem;
  }

  .quiz-option:hover {
    border-color: var(--accent2);
    background: var(--highlight);
    transform: translateY(-1px);
  }

  .quiz-option:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 2px;
  }

  .quiz-option.is-correct {
    border-color: #79a875;
    background: rgba(45, 88, 54, 0.32);
    color: #eaf4e4;
  }

  .quiz-option.is-wrong {
    border-color: #bd6f5f;
    background: rgba(112, 48, 38, 0.34);
    color: #f1d8d0;
  }

  .quiz-feedback {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 0.45rem;
  }

  .quiz-feedback[hidden] {
    display: none;
  }

  .quiz-feedback strong {
    color: var(--accent2);
    font-family: 'Space Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .quiz-feedback p {
    color: var(--cream-dim);
    font-size: 0.78rem;
    line-height: 1.65;
    max-width: 760px;
  }

  .quiz-feedback a {
    color: var(--brown-light);
    font-family: 'Space Mono', monospace;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
  }

  .quiz-feedback a:hover {
    color: var(--accent2);
  }

  .quiz-reference-panel {
    display: grid;
    justify-items: start;
    gap: 1rem;
    border: 1px solid var(--border);
    background: var(--card);
    padding: 1.35rem;
  }

  .quiz-reference-panel p {
    color: var(--cream-dim);
    font-size: 0.82rem;
    line-height: 1.7;
  }

  /* ── FOOTER ── */
  footer {
    padding: 2rem 3rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }

  .footer-note {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--text-dim);
  }

  /* ── SCROLLBAR ── */
  ::-webkit-scrollbar { width: 4px; height: 4px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

  /* ── RESPONSIVE ── */
  @media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .hero { grid-template-columns: 1fr; gap: 2rem; }
    .hero-meta { gap: 1.15rem; }
    .stat-row { flex-wrap: wrap; gap: 1.2rem; }
    .section-header { flex-direction: column; }
    .section-title-wrap { flex-wrap: wrap; }
    .section-desc { text-align: left; }
    header { padding: 0 1.5rem; }
    .hero { padding: 3rem 1.5rem 2rem; }
    .search-bar {
      padding: 1rem 1.5rem;
      flex-wrap: wrap;
      row-gap: 0.7rem;
    }
    .search-icon { order: 1; }
    #search-input { order: 2; flex: 1 1 220px; min-width: 0; }
    .view-toggle { order: 3; }
    .search-hint {
      order: 4;
      flex: 1 1 100%;
      white-space: normal;
    }
    #result-count {
      order: 5;
      flex: 1 1 100%;
      text-align: left;
      min-width: 0;
    }
    .code-quiz-page .quiz-toolbar {
      align-items: flex-start;
    }
    .quiz-code-link {
      white-space: normal;
    }
    .section { padding: 2rem 1.5rem; }
    .converter-entry {
      grid-template-columns: 1fr;
    }
    .converter-clear {
      width: 100%;
    }
    .converter-results {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    footer {
      flex-direction: column;
      align-items: flex-start;
    }
  }

  @media (max-width: 640px) {
    header {
      padding: 0.9rem 1rem;
      height: auto;
      gap: 0.8rem;
      align-items: flex-start;
      flex-direction: column;
    }
    .home-link {
      align-self: flex-end;
    }
    .nav-label {
      font-size: 0.58rem;
      letter-spacing: 0.16em;
    }
    .hero {
      padding: 2.4rem 1rem 1.6rem;
    }
    .hero-desc {
      max-width: none;
      font-size: 0.8rem;
    }
    #search-input {
      font-size: 16px;
    }
    .search-bar {
      padding: 0.95rem 1rem;
    }
    .view-toggle {
      width: 100%;
      justify-content: center;
    }
    .view-toggle-btn {
      flex: 1 1 50%;
      text-align: center;
    }
    .section {
      padding: 1.5rem 1rem;
    }
    .converter-panel {
      padding: 1rem;
    }
    .converter-input,
    .converter-select,
    .converter-clear {
      min-height: 48px;
    }
    .converter-results {
      grid-template-columns: 1fr;
    }
    .section-title {
      font-size: 2rem;
    }
    .quiz-options {
      grid-template-columns: 1fr;
    }
    .quiz-card {
      padding: 1rem;
    }
    .quiz-card-top {
      align-items: flex-start;
      flex-direction: column;
      gap: 0.35rem;
    }
    .quiz-ref {
      text-align: left;
    }
    .cards-grid {
      grid-template-columns: 1fr;
    }
    .card {
      padding: 1.15rem 1.1rem;
    }
    .dims {
      gap: 0.5rem;
    }
    .dim-pill {
      flex: 1 1 calc(50% - 0.5rem);
      min-width: 0;
      padding-inline: 0.55rem;
    }
    .dim-value {
      font-size: 1.02rem;
    }
    .dim-value.is-compact {
      font-size: 0.88rem;
    }
    .dim-unit,
    .dim-label {
      line-height: 1.2;
    }
    .card-bottom {
      flex-wrap: wrap;
    }
    .why-trigger {
      width: 100%;
      justify-content: center;
    }
    .card-why.is-modal {
      width: min(420px, calc(100vw - 24px));
      max-height: min(76vh, 640px);
      padding: 1rem;
    }
    body.view-simple .cards-grid {
      grid-template-columns: 1fr;
    }
    body.view-simple .card {
      padding: 0.95rem 0.95rem 1rem;
    }
    body.view-simple .dim-value {
      font-size: 1.32rem;
    }
    body.view-simple .dim-value.is-compact {
      font-size: 1rem;
    }
    footer {
      padding: 1.5rem 1rem;
    }
  }
