:root {
  --bg: #f6f7f9; --card: #ffffff; --ink: #16181d; --muted: #6b7280; --line: #e5e7eb;
  --good: #16a34a; --ok: #d97706; --bad: #dc2626; --accent: #1f4e79; --accent2: #c0392b;
  --noclaim: #9ca3af; --soft: #eef2f7;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --card: #171a21; --ink: #e5e7eb; --muted: #9ca3af; --line: #262a33;
    --accent: #7fb3e6; --accent2: #f1948a; --noclaim: #6b7280; --soft: #1c2029;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --card: #171a21; --ink: #e5e7eb; --muted: #9ca3af; --line: #262a33;
  --accent: #7fb3e6; --accent2: #f1948a; --noclaim: #6b7280; --soft: #1c2029;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink);
       font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
/* the top of the page: words, menu and note on the left; the band's panels (brain waves, then the chains) on the right */
.masthead { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto auto 1fr;
  column-gap: 28px; padding: 28px 24px 8px; }
.masthead > header.top, .masthead > nav, .masthead > .listen-note { grid-column: 1; }
.masthead > .band-col { grid-column: 2; grid-row: 1 / 5; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.masthead > nav { padding: 8px 0 0; }
.masthead > .listen-note { margin: 12px 0 0; }
header.top { max-width: none; margin: 0; padding: 0 0 8px; }
@media (max-width: 900px) {
  /* one column: words, brain waves, menu, chains, note */
  .masthead { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .masthead > .band-col { display: contents; }
  .masthead > header.top { order: 1; }
  .masthead .swim-panel { order: 2; }
  .masthead > nav { order: 3; }
  .masthead .chains-panel { order: 4; margin-top: 14px; }
  .masthead > .listen-note { order: 5; }
  .masthead > header.top, .masthead > nav, .masthead > .listen-note, .masthead .swim-panel, .masthead .chains-panel { grid-column: 1; grid-row: auto; }
}
header.top h1 { margin: 0; font-size: 30px; letter-spacing: -0.01em; }
header.top .tag { color: var(--muted); font-size: 16px; margin: 4px 0 0; }
header.top .about { font-size: 14px; line-height: 1.5; margin: 12px 0 0; max-width: 78ch; }
nav { max-width: none; margin: 0; padding: 8px 24px 0; display: flex; gap: 14px; flex-wrap: wrap;
      font-size: 14px; }
nav a { text-decoration: none; color: var(--muted); border-bottom: 1px solid transparent; }
nav a:hover { color: var(--ink); border-color: var(--ink); }
main { max-width: none; margin: 0; padding: 8px 24px 40px; }
section { margin: 28px 0; }
section > h2 { font-size: 21px; margin: 0 0 4px; }
section > h3 { font-size: 17px; margin: 28px 0 4px; }
section > .sub { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.tiles { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-width: 140px; flex: 1 1 140px; }
.tile b { display: block; font-size: 22px; }
.tile span { color: var(--muted); font-size: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); gap: 14px; }   /* min(): on a phone a card is as wide as the page, not 440 px */
.empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.badge { display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--soft); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.dots { display: flex; gap: 10px; margin: 8px 0; font-size: 12px; color: var(--muted); }
.dot i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--noclaim); margin-right: 4px; vertical-align: -1px; }
.dot.g i { background: var(--good); } .dot.o i { background: var(--ok); } .dot.b i { background: var(--bad); }
.est b { font-size: 24px; } .est small { display: block; color: var(--muted); }
.est.noclaim b { color: var(--noclaim); }
.reason, .hr { font-size: 13px; color: var(--muted); margin-top: 4px; }
canvas.bands, canvas.raw { width: 100%; display: block; margin-top: 8px; }
.status { font-size: 13px; color: var(--muted); }
.status code { background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin: 10px 0 2px; }
.bars div { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-width: 6px; position: relative; }
.bars div:hover::after { content: attr(data-label); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); font-size: 11px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.bars-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0; font-size: 13px; }
.filters select, .filters input { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); }
/* a table wider than the window scrolls inside its own box; the page itself never slides sideways */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* shown only where scripts are off: where the lasting parts of the page are */
main > header.top { padding-top: 28px; }      /* a page whose title sits in its one column (record.html) */
/* the head that opens: a picture that is a link, as on Rich Fletcher's page */
/* Under the words about the name: the head with its slider on the left, what it is on the right; on a narrow
   screen the words go under it. Over the picture, once it can be drawn, lies the head itself in a frame (.head-live),
   which turns when dragged; where it cannot be drawn the slider steps through pictures drawn ahead of time (.head-frames). */
.head-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.head-stage { flex: none; width: min(300px, 100%); position: relative; }
.head-live { position: absolute; left: 0; top: 0; z-index: 1; width: 100%; aspect-ratio: 1 / 1; border: 0; background: transparent; visibility: hidden; }   /* above the picture's link, which it stands in for */
.head-link.turning .head-live { visibility: visible; }
.head-link.turning img, .head-link.turning .head-frames, .head-link.turning .head-site { visibility: hidden; }      /* the head itself stands in their place */
/* the electrodes' names over the picture, written as the head's own page writes them (same place, same letters, same colours) */
.head-site { position: absolute; transform: translate(-50%, -160%); font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #1a1a19;
  background: rgba(255, 255, 255, 0.9); padding: 2px 5px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
@media (prefers-color-scheme: dark) { .head-site { color: #f0efec; background: rgba(24, 26, 30, 0.9); } }
.head-link .head-pic { display: block; position: relative; line-height: 0; }
.head-link img { width: 100%; height: auto; display: block; }
.head-frames { position: absolute; inset: 0; background-repeat: no-repeat; }
.head-link.sliding img { visibility: hidden; }                    /* the sheet's picture stands in its place */
.head-slider { display: flex; align-items: center; gap: 8px; margin-top: -6px; font-size: 12px; color: var(--muted); position: relative; z-index: 2; }   /* above the frame's lower edge */
.head-slider input { flex: 1; min-width: 0; margin: 0; accent-color: var(--ink); }
.head-link p { flex: 1 1 150px; margin: 0; }
.head-link .head-open { display: block; color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none; margin-bottom: 3px; }
.head-link .head-open:hover { text-decoration: underline; }
.head-link p a:not(.head-open) { color: inherit; }
.noscript-note { max-width: 70ch; margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table.sessions { width: 100%; border-collapse: collapse; font-size: 13px; }
table.sessions th, table.sessions td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.sessions th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.sessions tr.row { cursor: pointer; }
table.sessions tr.row:hover td { background: var(--soft); }
table.sessions tr.detail td { background: var(--soft); }
.preview { width: 320px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.q { display: inline-block; width: 44px; height: 8px; border-radius: 4px; background: var(--line); vertical-align: middle; overflow: hidden; }
.q i { display: block; height: 100%; background: var(--good); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; font-size: 13px; margin-top: 8px; }
.kv b { color: var(--muted); font-weight: 500; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.project h3 { margin: 0 0 4px; font-size: 16px; }
.project .when { color: var(--muted); font-size: 12px; }
.project p { margin: 8px 0; font-size: 14px; }
.project .n { font-size: 12px; color: var(--muted); }
footer { max-width: none; margin: 0; padding: 16px 24px 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
footer ul { padding-left: 18px; }
.more { font-size: 13px; }
@media (max-width: 600px) { header.top h1 { font-size: 24px; } .tile b { font-size: 18px; } table.sessions th:nth-child(4), table.sessions td:nth-child(4) { display: none; } }

/* what the person said about themselves (name / activity / self-rated mood) */
.said { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 6px; }
.pseud { font-size: 11px; color: var(--muted); }
.chip { font-size: 11px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); background: color-mix(in srgb, var(--card) 80%, var(--line)); }
.mood { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; }
.mood canvas { width: 54px; height: 54px; border-radius: 4px; flex: none; }
.mood .moodtext { font-size: 12px; color: var(--muted); }
.checkin { font-size: 12px; color: var(--muted); margin-top: 6px; }
table.checkins td { white-space: nowrap; }
table.shares td { vertical-align: top; }
table.shares .moodlog-chip { display: inline-block; margin: 1px 2px 1px 0; }

/* the hidden attribute must win over the display rules above */
[hidden] { display: none !important; }

/* facts about the kit, per-channel band table, motion and optics lines */
.facts { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--muted); margin: 2px 0 4px; }
.facts .fact:empty { display: none; }
table.bandtable { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 4px; font-variant-numeric: tabular-nums; }
table.bandtable th, table.bandtable td { padding: 1px 4px; text-align: right; border: 0; }
table.bandtable th:first-child, table.bandtable td:first-child { text-align: left; color: var(--muted); font-weight: 500; }
.imu, .optics { font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* mood in words and colour, and the log of moods stated during a share */
.mood .moodside { display: flex; flex-direction: column; gap: 4px; }
.moodchip { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; }
.moodlog { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 2px 0 6px; }
.moodlog-label { font-size: 11px; color: var(--muted); }
.moodlog-chip { font-size: 11px; padding: 2px 8px; border-radius: 10px; }

/* the horseshoe: contact per electrode, as in the app */
.horseshoe { width: 156px; height: 86px; display: block; margin: 6px 0 0; color: var(--ink); }
.horseshoe text { font: 9px system-ui, sans-serif; fill: var(--muted); }
.horseshoe .el[hidden] { display: none; }

/* one line each, always: the numbers are fixed width */
.imu, .optics, .hr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imu { font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* charts drawn the way the app draws them */
.chart-title { font-size: 11px; color: var(--muted); margin: 10px 0 2px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.chart-title .legend { display: inline-flex; gap: 8px; align-items: center; }
.chart-title .legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 3px; vertical-align: middle; }
canvas.raw { width: 100%; height: 200px; display: block; border-radius: 6px; background: color-mix(in srgb, var(--card) 85%, var(--line)); }
canvas.bands { width: 100%; height: 96px; display: block; border-radius: 6px; background: color-mix(in srgb, var(--card) 85%, var(--line)); }
canvas.optics-chart { width: 100%; height: 90px; display: block; border-radius: 6px; background: color-mix(in srgb, var(--card) 85%, var(--line)); }
.imu { white-space: normal; }
.imu-row { display: flex; align-items: center; gap: 6px; margin: 3px 0; flex-wrap: wrap; }
.imu-label { font-size: 11px; color: var(--muted); min-width: 108px; }
.tile-v { border: 1px solid; border-radius: 6px; padding: 2px 7px; font-size: 11px; font-variant-numeric: tabular-nums; }
.tile-v b { font-weight: 700; margin-right: 2px; }

/* other wearables the person switched on */
.wearables { font-size: 12px; }
.wear-row { margin: 4px 0; line-height: 1.4; }
.wear-row b { font-weight: 600; }
.wear-row img { display: block; width: 120px; max-width: 100%; border-radius: 6px; margin-top: 4px; border: 1px solid var(--line); }


/* cameras: the picture from the computer they hang off, opened by this browser */
.card.camera .cam { margin-top: 10px; }
.cam-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.cam-head b { color: var(--ink); font-size: 13px; }
.cam-head select { margin-left: auto; font: inherit; font-size: 12px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); }
.cam-view { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
camera-stream { display: block; width: 100%; height: 100%; }
camera-stream video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.cam-off { display: flex; align-items: center; justify-content: center; height: 100%; color: #9ca3af; font-size: 13px; }
.cam-rec { margin-top: 4px; font-size: 12px; }
.camnote { margin: 10px 0 0; }
/* a headset's splats: what its depth sensing sees, drawn in 3-D (splat-view.js) */
.card.camera .splat { margin-top: 10px; }
/* a phone that is scanning a head or a place: its picture (if switched on) beside how far it has got */
.card.scanner .scan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 8px 0; }
.scan-frame { margin: 0; flex: 0 1 300px; min-width: 0; }
.scan-frame img { display: block; width: 100%; max-height: 380px; object-fit: contain; border-radius: 8px; background: #0b0e14; }
.scan-frame figcaption { font-size: 11px; color: var(--muted); margin-top: 3px; }
.scan-ring { position: relative; width: 120px; height: 120px; flex: none; display: grid; place-content: center; text-align: center; }
.scan-ring svg { position: absolute; inset: 0; }
.scan-ring circle { fill: none; stroke-width: 9; }
.scan-ring .track { stroke: var(--line); }
.scan-ring .arc { stroke: #16a34a; stroke-linecap: round; stroke-dasharray: 0 315; transition: stroke-dasharray .4s; }
.scan-ring .scan-n { font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.scan-ring .scan-l { font-size: 11px; color: var(--muted); max-width: 84px; }
ul.phone-scans { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
ul.phone-scans li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
ul.phone-scans li small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
ul.phone-scans .badge.ok { background: #dcfce7; color: #166534; }
.splat-view { height: 340px; background: #0b0e14; border-radius: 6px; overflow: hidden; }
.splat-view canvas { display: block; touch-action: none; cursor: grab; outline: none; }
.splat-view canvas:active { cursor: grabbing; }
.splat-note { margin: 6px 0 0; }
table.bags td { vertical-align: top; }
table.bags a { white-space: nowrap; }
@media (max-width: 600px) { table.bags th:nth-child(3), table.bags td:nth-child(3) { display: none; } }

.nav-btn { font: inherit; font-size: 14px; color: var(--ink); background: transparent; border: 1px solid var(--muted); border-radius: 999px; padding: 2px 12px; cursor: pointer; line-height: 1.5; }
.nav-btn:hover, .nav-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg, #fff); border-color: var(--ink); }
.nav-btn[disabled] { opacity: 0.5; cursor: default; }
.nav-note { color: var(--muted); font-size: 13px; align-self: center; }

/* the band: the brain-wave panel beside the title (dark in both themes, as a SWIM's long exposure is), and the note that says what is heard */
.swim-panel { margin: 0; height: 272px; flex: none; display: flex; flex-direction: column; overflow: hidden;
  background: #0b0e14; border: 1px solid #1c212b; border-radius: 12px; transition: box-shadow 0.4s; }
.swim-panel.sounding { box-shadow: 0 0 0 1px rgba(127, 179, 230, 0.4), 0 8px 28px rgba(0, 0, 0, 0.25); }
.swim-panel figcaption { padding: 9px 14px 0; font-size: 12px; line-height: 1.4; color: #aeb7c4; }
.swim-panel figcaption b { color: #e5e7eb; }
/* shown while the browser holds the sound back: the one thing the visitor has to do */
.sound-ask { display: inline-block; margin-left: 6px; padding: 0 9px; border-radius: 999px; background: #e0b366; color: #14110a;
  font-weight: 600; white-space: nowrap; animation: sound-ask 1.6s ease-in-out infinite; }
@keyframes sound-ask { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .sound-ask { animation: none; } }
.swim-panel canvas { display: block; width: 100%; height: 0; min-height: 0; flex: 1 1 auto; }
@media (max-width: 900px) { .swim-panel { height: 264px; margin-top: 14px; } }
/* the chains: the chord walk and the signal chain for the bar that is sounding (music/chains.js) */
.chains-panel { margin: 0; min-width: 0; padding: 9px 14px 12px; font-size: 12px; line-height: 1.45; color: #aeb7c4;
  background: #0b0e14; border: 1px solid #1c212b; border-radius: 12px; }
.chains-panel figcaption b { color: #e5e7eb; }
.chains-panel .ch-clock { float: right; margin-left: 12px; color: #7d8794; font-variant-numeric: tabular-nums; }
.chains-panel .ch-how { margin: 4px 0 0; color: #7d8794; clear: both; }
.chains-panel .ch-how i { font-style: normal; }
.chains-panel .ch-gold { color: #e0b366; }
.chains-panel .ch-cold { color: #7fb3e6; }
.chains-panel .ch-warm { color: #e07373; }
.chains-panel h4 { margin: 12px 0 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #7d8794; }
.chains-panel h4 span { margin-left: 8px; font-weight: 400; letter-spacing: 0; text-transform: none; color: #e5e7eb; }
.chains-panel .ch-line { margin: 2px 0 0; color: #aeb7c4; overflow-wrap: anywhere; }
.chains-panel .ch-scroll { overflow-x: auto; }
.ch-svg { display: block; width: 100%; height: auto; }
.ch-ball { fill: #0b0e14; stroke: #3a4250; stroke-width: 1.2; }
.ch-label, .ch-value, .ch-edge-label { font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; paint-order: stroke; stroke: #0b0e14; stroke-width: 3px; stroke-linejoin: round; }
.ch-label { fill: #8b94a1; }
.ch-value { fill: #e5e7eb; font-variant-numeric: tabular-nums; }
.ch-node[data-live="true"] .ch-ball { stroke: #7fb3e6; }
.ch-node[data-live="true"] .ch-label { fill: #c8d0da; }
.ch-node[data-live="true"][data-kind="voice"] .ch-ball { stroke: #e0b366; fill: #2a2416; }
.ch-node[data-open="true"] .ch-ball { stroke: #e0b366; stroke-width: 1.6; stroke-dasharray: 4 3; }
.ch-node[data-ahead="true"] .ch-ball { stroke: #e07373; stroke-dasharray: 4 3; }
.ch-node[data-ahead="true"] .ch-value { fill: #e07373; }
.ch-node[data-state="current"] .ch-ball { stroke: #e0b366; stroke-width: 2.4; stroke-dasharray: none; fill: #3a2f17; }
.ch-node[data-state="current"] .ch-label { fill: #e0b366; }
.ch-node[data-state="armed"] .ch-ball { stroke: #e07373; stroke-width: 2.4; stroke-dasharray: none; fill: #3a1d1d; }
.ch-edge { fill: none; stroke: #2b323d; stroke-width: 1; }
.ch-edge[data-live="true"] { stroke: #7fb3e6; stroke-width: 1.6; }
.ch-edge[data-dashed="true"] { stroke-dasharray: 3 4; opacity: 0.6; }
.ch-edge[data-ahead="true"] { stroke: #e07373; stroke-dasharray: 3 4; }
.ch-edge-head { fill: #2b323d; }
.ch-edge-head[data-live="true"] { fill: #e07373; }
.ch-edge-label { fill: #7fb3e6; font-size: 10px; }
.mark6 { font-weight: 700; transition: color 0.4s; }
.mark6.sounding { color: var(--accent); }
.listen-note { position: relative; margin: 12px 24px 0; max-width: 104ch; padding: 10px 38px 10px 14px; font-size: 13px; line-height: 1.5;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.listen-note.floating { position: fixed; left: 16px; bottom: 16px; margin: 0; max-width: min(460px, calc(100vw - 32px)); z-index: 20;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22); }
/* pinned on a small screen it keeps to the foot of the window and scrolls inside itself, so it does not sit over the head above it */
@media (max-width: 600px) { .listen-note.floating { max-height: 30vh; overflow-y: auto; } }
.listen-note p { margin: 0; }
.listen-note p + p { margin-top: 4px; }
.listen-note .foot { color: var(--muted); }
.listen-note .band-chip { white-space: nowrap; }
.listen-note .band-chip + .band-chip { margin-left: 4px; }
.listen-note .band-chip i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.listen-note .x { position: absolute; top: 4px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.listen-note .x:hover { background: var(--soft); color: var(--ink); }

/* doors: a few large links side by side; with .lead the first, which carries a picture, stands beside the others */
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin: 10px 0 0; }
.door { display: block; text-decoration: none; color: var(--ink); }
.door b { display: block; font-size: 16px; }
.door span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.door:hover { border-color: var(--accent); }
.door img { display: block; width: calc(100% + 28px); max-width: none; height: auto; margin: -14px -14px 10px; border-radius: 12px 12px 0 0; background: #0b0e14; }
.doors.lead { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.doors.lead > .door:first-child { grid-row: span 2; }
.doors.lead > .door:not(:first-child) { display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 900px) { .doors.lead { grid-template-columns: minmax(0, 1fr); } .doors.lead > .door:first-child { grid-row: auto; } }

/* trust: the receipt card and the tier table */
.door img.figure { background: #fff; }
.door p.cap { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
.door p.links { margin: 10px 0 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
table.numbers, table.tiers { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
table.numbers th, table.numbers td, table.tiers th, table.tiers td { text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.numbers th, table.tiers th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.numbers td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.door .tier { display: inline-block; margin: 0; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.door .tier-verified { color: var(--good); } .door .tier-measured { color: var(--accent); } .door .tier-estimated { color: var(--ok); } .door .tier-refused { color: var(--bad); }
.door > span + .table-scroll { margin-top: 2px; }

#trust .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#trust .door.wide table.numbers th:first-child, #trust .door.wide table.numbers td:first-child { width: 30%; }
#trust .door.wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4px 18px; align-items: start; }
#trust .door.wide > a { display: block; }
#trust .door.wide img.figure { width: 100%; max-width: 100%; height: auto; margin: 0; border-radius: 8px; }
#trust .door.wide table.numbers { font-size: 12.5px; }
@media (max-width: 900px) { #trust .doors, #trust .door.wide { grid-template-columns: minmax(0, 1fr); } }
