  :root {
    --wood-0: #120c08;
    --wood-1: #1c130d;
    --wood-2: #2b1d13;
    --wood-edge: #3e2b1c;
    --velvet-0: #0f1a15;
    --velvet-1: #18291f;
    --paper-0: #f5ecd8;
    --paper-1: #e8d9b9;
    --ink: #2b1e13;
    --ink-soft: #6b5640;
    --cream: #efe3c8;
    --cream-soft: #b8a689;
    --brass: #c9a14a;
    --brass-hi: #ecc96f;
    --brass-lo: #7d5f24;
    --fancy: #b998f5;
    --fancy-lo: #6e4fb3;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "P052", "URW Palladio L", "Book Antiqua", Georgia, serif;
    --mono: ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", Menlo, Consolas, monospace;
  }

  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0;
    min-height: 100vh;
    color: var(--cream);
    font-family: var(--serif);
    line-height: 1.5;
    background-color: var(--wood-0);
    background-image:
      radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 161, 74, .14), transparent 70%),
      repeating-linear-gradient(90deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 9px),
      linear-gradient(180deg, var(--wood-1), var(--wood-0) 60%);
    background-attachment: fixed;
  }
  a { color: var(--brass-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
  a:hover { color: #fff1c9; }
  button { font: inherit; color: inherit; }
  :focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* ---------- masthead (same as the cabinet) ---------- */
  .wrap { max-width: 1340px; margin: 0 auto; padding: 0 24px; }
  .masthead { padding: 16px 0 12px; }
  .eyebrow { margin: 0 0 10px; font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--cream-soft); }
  h1 { margin: 0; font-weight: 400; line-height: 1.02; letter-spacing: -.01em; font-size: clamp(2rem, 4vw, 2.9rem); }
  h1 em { color: var(--brass-hi); }
  .lede { max-width: 100ch; margin: 8px 0 0; color: #dccdb0; font-size: 1.06rem; }
  .scale-note { margin: 8px 0 0; font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; color: var(--brass-hi); }
  footer { padding: 18px 0 40px; color: #9a876b; font-size: .88rem; }
  footer p { margin: 0; max-width: 80ch; }
  footer code { font-family: var(--mono); font-size: .8em; }

  /* ---------- the corridor: walnut panelling, one long wall ---------- */
  .corridor {
    position: relative; overflow-x: auto; overflow-y: hidden; margin: 6px 0 0;
    background:
      linear-gradient(180deg, rgba(0,0,0,.45), transparent 22px, transparent calc(100% - 26px), rgba(0,0,0,.55)),
      repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 2px, transparent 2px 240px),
      repeating-linear-gradient(90deg, rgba(255,255,255,.012) 0 1px, transparent 1px 7px),
      linear-gradient(180deg, #3a2716, #2b1d13 55%, #22170f);
    border-top: 6px solid var(--wood-edge); border-bottom: 10px solid #160f0a;
    scrollbar-color: var(--brass-lo) #160f0a;
  }
  .corridor:focus-visible { outline-offset: -4px; }
  .wall { position: relative; min-height: 100%; }
  .wall > .wires { position: absolute; left: 0; top: 0; z-index: 1; overflow: visible; pointer-events: none; }
  .plaques, .rulers { position: relative; z-index: 2; }
  .wire { fill: none; stroke: rgba(201, 161, 74, .55); stroke-width: 1.2; }
  .knob { fill: var(--brass-hi); stroke: #5d4419; stroke-width: 1; }
  .span-bar { fill: rgba(236, 201, 111, .28); stroke: var(--brass-hi); stroke-width: 1.2; }
  .rail { position: absolute; border-radius: 2px; background: linear-gradient(180deg, #f3d98f, var(--brass) 50%, var(--brass-lo)); box-shadow: 0 2px 3px rgba(0,0,0,.6); }
  .ticks { position: absolute; inset: 0; pointer-events: none; }
  .tick { position: absolute; width: 1px; height: 6px; background: rgba(236,201,111,.45); }
  .tick.big { height: 10px; background: var(--brass-hi); }
  .tick-label { position: absolute; transform: translateX(-50%); font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; color: var(--cream-soft); white-space: nowrap; }

  /* plaques: small brass-framed cards hanging from the rail */
  .plaques { list-style: none; margin: 0; padding: 0; }
  .plaque-slot { position: absolute; width: 150px; }
  .plaque {
    display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 7px; height: 94px; overflow: hidden;
    text-align: center; text-decoration: none; color: var(--ink); border-radius: 3px;
    background: linear-gradient(180deg, var(--paper-0), var(--paper-1));
    border: 3px solid var(--brass); box-shadow: 0 0 0 1px var(--brass-lo), 0 10px 18px -8px rgba(0,0,0,.85);
    transition: transform .2s ease, box-shadow .2s ease;
  }
  .plaque:hover, .plaque:focus-visible { color: var(--ink); transform: translateY(-2px); box-shadow: 0 0 0 1px var(--brass-lo), 0 0 0 4px rgba(236,201,111,.35), 0 14px 22px -8px rgba(0,0,0,.9); }
  .pl-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .pl-text { display: flex; flex-direction: column; gap: 2px; }
  .pl-name { font-size: .84rem; line-height: 1.1; }
  .pl-date { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
  .lit .plaque { box-shadow: 0 0 0 1px var(--brass-lo), 0 0 0 4px var(--brass-hi), 0 14px 22px -8px rgba(0,0,0,.9); }
  .is-target .plaque { box-shadow: 0 0 0 1px var(--brass-lo), 0 0 0 5px var(--brass-hi), 0 14px 22px -8px rgba(0,0,0,.9); }

  /* rulers: measured brass brackets for the documented threads */
  .rulers { position: absolute; inset: 0; pointer-events: none; }
  .plaques { position: absolute; inset: 0; pointer-events: none; }
  .plaque-slot { pointer-events: auto; }
  .ruler {
    position: absolute; height: 7px; pointer-events: auto; text-decoration: none; color: var(--brass-hi);
    border: 2px solid var(--brass); border-top: 0; border-radius: 0 0 2px 2px;
  }
  .ruler.zero { border-width: 0 0 0 2px; width: 0; }
  .ruler-label {
    position: absolute; left: 50%; top: 6px; transform: translateX(-50%); white-space: nowrap; line-height: 1.15;
    font-family: var(--mono); font-size: .66rem; letter-spacing: .04em; color: var(--brass-hi);
  }
  .ruler:hover, .ruler:focus-visible { border-color: var(--brass-hi); }
  .ruler:hover .ruler-label, .ruler:focus-visible .ruler-label { color: #fff1c9; text-decoration: underline; }

  /* the mini-map: the whole wall, and where you are on it */
  .minimap {
    position: relative; z-index: 20; margin: 0 auto 8px;
    width: min(820px, calc(100vw - 48px)); padding: 6px 14px 4px; border-radius: 10px;
    background: rgba(18, 12, 8, .92); border: 1px solid var(--wood-edge); box-shadow: 0 10px 30px rgba(0,0,0,.6);
  }
  .mm-track { position: relative; height: 16px; cursor: pointer; touch-action: none; border-radius: 3px;
    background: linear-gradient(180deg, transparent 7px, var(--brass-lo) 7px 9px, transparent 9px); }
  .mm-dot { position: absolute; top: 4px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--brass-hi); }
  .mm-window { position: absolute; top: 0; height: 100%; border: 1px solid var(--brass-hi); border-radius: 3px; background: rgba(236,201,111,.12); }
  .mm-here { margin: 4px 0 0; font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cream-soft); text-align: center; }

  /* ---------- phones: the wall turns vertical and the page scrolls ---------- */
  body.vertical .corridor { overflow: visible; border-top-width: 4px; border-bottom-width: 6px;
    background: repeating-linear-gradient(180deg, rgba(0,0,0,.18) 0 2px, transparent 2px 240px), linear-gradient(90deg, #3a2716, #2b1d13 60%, #22170f); }
  body.vertical .wall { width: 100%; }
  body.vertical .tick { width: 6px; height: 1px; }
  body.vertical .tick.big { width: 10px; height: 1px; }
  body.vertical .tick-label { transform: translateY(-50%); font-size: .6rem; }
  body.vertical .plaque-slot { width: auto; }
  body.vertical .plaque { flex-direction: row; align-items: center; gap: 10px; min-height: 0; height: 76px; padding: 3px 10px; text-align: left; }
  body.vertical .ruler.crowded .ruler-label { display: none; }
  body.vertical .pl-icon svg { width: 30px; height: 30px; }
  body.vertical .pl-name { font-size: .86rem; }
  body.vertical .ruler { width: 9px; height: auto; border: 2px solid var(--brass); border-right: 0; border-radius: 2px 0 0 2px; }
  body.vertical .ruler.zero { border-width: 2px 0 0 0; height: 0; width: 9px; }
  body.vertical .ruler-label { left: -13px; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; font-size: .6rem; }
  body.vertical .minimap { position: fixed; margin: 0; left: auto; right: 4px; top: 50%; bottom: auto; transform: translateY(-50%); width: 18px; padding: 6px 4px; }
  body.vertical .mm-track { width: 10px; height: 52vh; background: linear-gradient(90deg, transparent 4px, var(--brass-lo) 4px 6px, transparent 6px); }
  body.vertical .mm-dot { top: auto; left: 2px; margin: -3px 0 0; }
  body.vertical .mm-window { top: 0; left: 0; width: 100%; height: auto; }
  body.vertical .mm-here { position: fixed; left: 12px; bottom: 10px; margin: 0; padding: 4px 8px; border-radius: 6px; background: rgba(18,12,8,.92); border: 1px solid var(--wood-edge); text-align: left; }
  @media (max-width: 760px) { .wrap { padding: 0 16px; } body { padding-bottom: 40px; } }

  @media (prefers-reduced-motion: reduce) {
    .plaque { transition: none; }
    .plaque:hover, .plaque:focus-visible { transform: none; }
  }

  /* signposts in long empty stretches of wall */
  .signs { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
  .signpost { position: absolute; pointer-events: auto; display: grid; gap: 2px; width: 250px; padding: 8px 14px 9px; text-decoration: none;
    border: 1px dashed var(--brass-lo); border-radius: 4px; background: rgba(18, 12, 8, .55); color: var(--cream-soft); }
  .signpost:hover, .signpost:focus-visible { border-color: var(--brass-hi); color: var(--cream); }
  .sp-k { font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; }
  .sp-n { font-family: var(--serif); font-size: 1.05rem; color: var(--cream); }
  .sp-y { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; color: var(--brass-hi); }
  body.vertical .signpost { width: auto; right: 36px; }

  /* You on the wall: one year, a plaque of your own, and comparisons computed from the wall's dates */
  .you { margin: 12px 0 0; max-width: 62ch; }
  .you-form { display: grid; gap: 6px; }
  .you-form label { font-size: .98rem; line-height: 1.3; color: var(--cream); }
  .you-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .you input { width: 9em; padding: 6px 10px; font: inherit; font-family: var(--mono); font-size: .95rem; color: var(--cream);
    background: rgba(18, 12, 8, .8); border: 1px solid var(--brass-lo); border-radius: 4px; }
  .you input:focus-visible { outline-offset: 1px; border-color: var(--brass-hi); }
  .you button, .you-card button { padding: 6px 14px; cursor: pointer; border-radius: 4px; border: 1px solid var(--brass); background: rgba(201, 161, 74, .14); color: var(--brass-hi); }
  .you button:hover, .you-card button:hover { background: rgba(201, 161, 74, .26); color: #fff1c9; }
  .you-hint { font-size: .8rem; color: #9a876b; }
  .you-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0 0; }
  .you-tools button, .you-row button { padding: 4px 12px; }
  .you-tools[hidden] { display: none; }
  .you-tools a { font-size: .9rem; }
    .you-out { margin: 0; }
  .you-msg { margin: 0; color: var(--cream); }
  .you-err:empty { display: none; }
  .you-src { margin: 6px 0 4px; font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fancy); }
  .you-list { margin: 0; padding-left: 1.2em; display: grid; gap: 2px; color: #dccdb0; font-size: .9rem; line-height: 1.35; }
  .you-plaque { justify-content: center; background: linear-gradient(180deg, #efe6ff, #d9c9f7); border-color: var(--fancy); box-shadow: 0 0 0 1px var(--fancy-lo), 0 0 0 5px rgba(185, 152, 245, .25), 0 10px 18px -8px rgba(0,0,0,.85); }
  .you-k { font-size: 1.5rem; line-height: 1; font-style: italic; color: #3b2a63; }
  .you-plaque .pl-date { color: #4f3d78; }
  .you-wire { stroke: var(--fancy); stroke-width: 2; }
  .you-knob { fill: var(--fancy); stroke: #2c1f4a; }
  .mm-you { background: var(--fancy); width: 8px; height: 8px; margin-left: -4px; top: 3px; box-shadow: 0 0 0 2px rgba(185,152,245,.35); }
  body.vertical .mm-you { left: 1px; margin: -4px 0 0; }
  body.vertical .you-plaque { flex-direction: row; gap: 12px; justify-content: flex-start; padding-left: 16px; }

  /* the comparisons card, docked to the window while you walk */
  .you-card { position: fixed; z-index: 30; left: 16px; bottom: 16px; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
    padding: 10px 16px 12px; border-radius: 8px; border: 1px solid var(--fancy-lo); border-left: 4px solid var(--fancy);
    background: rgba(18, 12, 8, .96); box-shadow: 0 14px 40px rgba(0,0,0,.7); }
  .you-card[hidden] { display: none; }
  .you-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .you-card-k { font-size: 1.15rem; font-style: italic; color: #e4d6ff; }
  .you-card button { padding: 3px 10px; font-size: .88rem; cursor: pointer; border-radius: 4px; border: 1px solid var(--brass); background: rgba(201, 161, 74, .14); color: var(--brass-hi); }
  .you-card .you-src { margin-top: 4px; }
  .you-card.folded { width: auto; }
  body.vertical .you-card { left: 8px; right: 30px; bottom: 8px; width: auto; max-height: 50vh; padding: 8px 12px 10px; }
  body.vertical .you-card .you-list { font-size: .86rem; }
  body.vertical .you-slot { scroll-margin-top: 70px; }
