/* ============================================================================
   THE QUAZAR — CONSOLE
   One screen. No page scroll. Everything stacked in the same frame and
   switched in place. One typeface, monochrome, one live colour.
   ========================================================================= */

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

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;              /* the page itself never scrolls */
  overscroll-behavior: none;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }

[hidden] { display: none !important; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ tokens */

:root {
  --bg:     #000000;
  --fg:     #ffffff;
  --dim:    #969696;             /* 6.9:1 on black — the floor for real text */
  --faint:  #4a4a4a;             /* rules and marks only, never text        */
  --line:   #1e1e1e;
  --panel:  #0a0a0a;
  --live:   #ffffff;             /* no colour: 'live' is simply full contrast */

  /* three faces, each with a job: humanist sans reads, mono labels and counts,
     serif carries the two places that need a voice */
  --face:       "Fira Sans", "Segoe UI", system-ui, sans-serif;
  --face-mono:  "Fira Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --face-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --t-xs:   .6875rem;            /* 11px — labels        */
  --t-sm:   .8125rem;            /* 13px — metadata      */
  --t-md:   .875rem;             /* 14px — body          */
  --t-lg:   1rem;
  --t-xl:   clamp(1.5rem, 3.6vw, 2.6rem);
  --t-2xl:  clamp(1.6rem, 4.6vw, 3rem);

  --track:  .14em;
  --gap:    clamp(.75rem, 1.6vw, 1.5rem);
  --bar:    2.75rem;
  --ease:   cubic-bezier(.2, .7, .3, 1);
}

:root[data-theme="light"] {
  --bg:     #ffffff;
  --fg:     #000000;
  --dim:    #6b6b6b;
  --faint:  #b4b4b4;
  --line:   #e6e6e6;
  --panel:  #fafafa;
  --live:   #000000;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:     #ffffff;
    --fg:     #000000;
    --dim:    #6b6b6b;
    --faint:  #b4b4b4;
    --line:   #e6e6e6;
    --panel:  #fafafa;
    --live:   #000000;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--face);
  font-size: var(--t-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--fg); color: var(--bg); }

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------- shell */

.shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--bar) minmax(0, 1fr);
}

.bar {
  font-family: var(--face-mono);
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding-inline: var(--gap);
  border-bottom: 1px solid var(--line);
  font-size: var(--t-xs);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--dim);
  min-width: 0;
}

.brand {
  color: var(--fg);
  letter-spacing: .18em;
  flex: none;
}

.brand b { font-weight: 500; }

.caret {
  display: inline-block;
  width: .55em;
  height: 1em;
  margin-left: .2em;
  background: var(--live);
  vertical-align: -.15em;
  animation: blink 1.2s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* -------------------------------------------------------------------- tabs */

.tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-left: auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

#theme { flex: none; margin-left: 0; }

/* The bar reads as a numbered index — 01 02 03 04 05 — and only the section
   you are in (or pointing at) spells itself out. The hairline under the bar is
   the position marker: it goes solid beneath the current number. */
.tab {
  position: relative;
  font-family: var(--face-mono);
  display: inline-flex;
  align-items: center;
  padding: 0 .7em;
  min-height: 44px;
  cursor: pointer;
  color: var(--dim);
  letter-spacing: var(--track);
  text-transform: uppercase;
  font-size: var(--t-xs);
  white-space: nowrap;
  transition: color 140ms var(--ease);
}

.tab i {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  transition: color 140ms var(--ease);
}

.tab .tl {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 280ms var(--ease), opacity 180ms var(--ease),
              margin-left 280ms var(--ease);
}

.tab:hover,
.tab:focus-visible { color: var(--fg); }
.tab:hover i { color: var(--dim); }

.tab:hover .tl,
.tab:focus-visible .tl,
.tab[aria-selected="true"] .tl {
  max-width: 9ch;
  opacity: 1;
  margin-left: .6em;
}

.tab[aria-selected="true"] { color: var(--fg); }
.tab[aria-selected="true"] i { color: var(--fg); }

/* the marker sits exactly on the bar's own rule */
.tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: transparent;
  transition: background 160ms var(--ease);
}

.tab:hover::after { background: var(--faint); }
.tab[aria-selected="true"]::after { background: var(--fg); }

/* the theme switch is not part of the index */
#theme::after { content: none; }
#theme .tl { max-width: none; opacity: 1; margin-left: 0; }

/* ------------------------------------------------------------------- stage */

.stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.pane {
  position: absolute;
  inset: 0;
  padding: clamp(1rem, 3vh, 2.25rem) var(--gap);
  overflow: auto;                /* only ever needed on very short screens */
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.pane[hidden] { display: none !important; }

.pane::-webkit-scrollbar { width: 6px; height: 6px; }
.pane::-webkit-scrollbar-thumb { background: var(--line); }

@media (prefers-reduced-motion: no-preference) {
  .pane { animation: rise 220ms var(--ease) both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(4px); }
  }
}

/* every pane composes itself around the middle of the frame */
.inner {
  position: relative;
  z-index: 1;
  max-width: 78rem;
  margin-inline: auto;
  height: 100%;
  display: grid;
  align-content: center;
  gap: var(--gap);
}

/* ------------------------------------------------------------ shared parts */

.label {
  font-family: var(--face-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--dim);
}

.rule { height: 1px; background: var(--line); border: 0; }

.link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  transition: border-color 140ms var(--ease), color 140ms var(--ease);
}

.link:hover, .link:focus-visible { color: var(--fg); border-color: currentColor; }

.out::after { content: " ↗"; color: var(--faint); }

.btn {
  font-family: var(--face-mono);
  border: 1px solid var(--line);
  padding: 0 .9em;
  min-height: 44px;
  cursor: pointer;
  font-size: var(--t-xs);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--dim);
  transition: color 140ms var(--ease), border-color 140ms var(--ease);
  white-space: nowrap;
}

.btn:hover:not(:disabled) { color: var(--fg); border-color: var(--fg); }
.btn:disabled { opacity: .5; cursor: default; }

.dot {
  display: inline-block;
  width: .5em;
  height: .5em;
  border-radius: 50%;
  background: var(--faint);
  margin-right: .5em;
  vertical-align: .05em;
}

.dot[data-status="online"] { background: var(--live); }
.dot[data-status="idle"], .dot[data-status="dnd"] { background: var(--dim); }

/* --------------------------------------------------------------- 01 whoami */

.hello { align-content: center; }

/* five voices in one sentence: mono kicker, mono lead-in, an enormous serif
   noun, a sans clause, and a dim coda. The hierarchy is the artwork. */
.headline { display: block; font-weight: 400; }

.h-small {
  display: block;
  font-family: var(--face-mono);
  font-size: var(--t-xs);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--dim);
}


.h-small { margin-bottom: -.1em; padding-left: .28em; }

.h-big {
  display: block;
  font-family: var(--face-serif);
  font-size: clamp(3.2rem, 13.5vw, 11rem);
  font-weight: 600;
  line-height: .84;
  letter-spacing: -.045em;
  /* optical alignment: the S overhangs the column edge */
  margin-left: -.035em;
}

.h-stop { font-style: normal; color: var(--dim); }

.h-mid {
  display: block;
  max-width: 46ch;
  margin-top: 1.1rem;
  font-size: clamp(1rem, 1.9vw, 1.45rem);
  line-height: 1.4;
  text-wrap: balance;
}

.h-dim { color: var(--dim); font-family: var(--face-serif); font-style: italic; }


/* ----------------------------------------------------------------- 02 work */

.work {
  height: 100%;
  display: grid;
  gap: var(--gap);
  grid-template-rows: auto minmax(0, 1fr);
}

@media (min-width: 900px) {
  .work { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: minmax(0, 1fr); }
}

/* narrow: the list keeps the top half, the detail the bottom — both stay in
   the frame, each scrolls inside itself, the page still never scrolls */
/* narrow: the index and the detail are two views of one frame, not two
   cramped panes. Tapping a project swaps the view; 'back' returns. */
@media (max-width: 899px) {
  .work { grid-template-rows: minmax(0, 1fr); height: 100%; }
  .work > .list, .work > .detail { grid-area: 1 / 1; }
  .work[data-view="list"] > .detail { display: none; }
  .work[data-view="detail"] > .list { display: none; }
  .work[data-view="detail"] > .detail { border-top: 0; padding-top: 0; }
  .work[data-view="detail"] .back { display: inline-flex; }
}

.list {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  border-top: 1px solid var(--line);
}

.list::-webkit-scrollbar { width: 6px; }
.list::-webkit-scrollbar-thumb { background: var(--line); }

.row {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  gap: .9rem;
  align-items: baseline;
  width: 100%;
  text-align: left;
  padding: .42rem .55rem;
  margin-left: -.55rem;
  min-height: 34px;
  cursor: pointer;
  color: var(--dim);
  transition: background 110ms var(--ease), color 110ms var(--ease);
}

.row .n {
  font-family: var(--face-mono);
  font-size: var(--t-xs);
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}

.row .t {
  font-size: var(--t-sm);
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* a short lower-case code, not a shouted label repeated nineteen times */
.row .k {
  font-family: var(--face-mono);
  font-size: var(--t-xs);
  letter-spacing: .06em;
  color: var(--dim);
  white-space: nowrap;
}

.row:hover { background: var(--panel); }
.row:hover .n, .row:hover .k { color: var(--fg); }

.row[aria-current="true"] { background: var(--fg); }
.row[aria-current="true"] .t { color: var(--bg); }
.row[aria-current="true"] .n,
.row[aria-current="true"] .k { color: var(--bg); opacity: .5; }

.detail {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  border-top: 1px solid var(--line);
  padding-top: .9rem;
}

.detail::-webkit-scrollbar { width: 6px; }
.detail::-webkit-scrollbar-thumb { background: var(--line); }

.detail h3 {
  font-family: var(--face-serif);
  font-size: var(--t-xl);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.012em;
  margin-bottom: .15rem;
}

.detail .sub { font-size: var(--t-sm); color: var(--dim); margin-bottom: 1rem; }
.detail p { font-size: var(--t-md); color: var(--fg); max-width: 62ch; }
.detail p + p { margin-top: .7rem; }

.detail .note {
  font-size: var(--t-sm);
  color: var(--dim);
  border-left: 1px solid var(--faint);
  padding-left: .75rem;
  margin-top: .9rem;
  max-width: 58ch;
}

.spec {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: .3rem .9rem;
  margin-top: 1.1rem;
  font-size: var(--t-sm);
  border-top: 1px solid var(--line);
  padding-top: .8rem;
}

.spec dt { font-family: var(--face-mono); color: var(--dim); font-size: var(--t-xs); letter-spacing: var(--track); text-transform: uppercase; padding-top: .18em; }
.spec dd { margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }

/* ---------------------------------------------------------------- 03 stack */

.stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--gap) clamp(1.25rem, 3vw, 3rem);
}

.stack h3 {
  font-family: var(--face-mono);
  font-size: var(--t-xs);
  font-weight: 400;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: .45rem;
  margin-bottom: .6rem;
}

.stack li { font-size: var(--t-sm); padding: .12rem 0; }

/* ---------------------------------------------------------------- 04 stats */

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: var(--gap);
  border-block: 1px solid var(--line);
  padding-block: clamp(.9rem, 2.5vh, 1.6rem);
}

.figure b {
  font-family: var(--face-mono);
  display: block;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 500;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.figure span {
  font-family: var(--face-mono);
  display: block;
  margin-top: .3rem;
  font-size: var(--t-xs);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--dim);
}

.langs { margin-top: clamp(1rem, 3vh, 1.75rem); max-width: 44rem; }

.lang {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr) 3.2rem;
  gap: .75rem;
  align-items: center;
  padding: .22rem 0;
  font-size: var(--t-sm);
}

.lang .bar-cell { height: 1px; background: var(--line); position: relative; }
.lang .bar-cell i { position: absolute; inset: 0 auto 0 0; background: var(--fg); display: block; }
.lang .pct { font-family: var(--face-mono); text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 05 reach */

.reach {
  display: grid;
  gap: var(--gap) clamp(1.5rem, 4vw, 3.5rem);
}

@media (min-width: 900px) { .reach { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.chan {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: .9rem;
  align-items: baseline;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}

.chan > .label { padding-top: .15rem; }
.chan a, .chan button { font-size: var(--t-md); text-align: left; }
.chan button.link { cursor: pointer; min-height: 44px; }

.flow { margin-top: .7rem; display: grid; gap: .55rem; max-width: 24rem; }
.field { display: flex; gap: .5rem; flex-wrap: wrap; }

.field input {
  flex: 1 1 10rem;
  min-width: 0;
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  padding: 0 .7rem;
  font: inherit;
  font-size: var(--t-sm);
  color: var(--fg);
  border-radius: 0;
}

.field input::placeholder { color: var(--faint); }
.field input:focus { outline: none; border-color: var(--fg); }
.field input:focus-visible { outline: 1px solid var(--fg); outline-offset: 1px; }

.note-line { font-family: var(--face-mono); font-size: var(--t-xs); color: var(--dim); min-height: 1.2em; letter-spacing: .04em; }
.note-line[data-tone="error"] { color: var(--fg); }

/* ------------------------------------------------------------- foot & keys */


kbd {
  font-family: var(--face-mono);
  border: 1px solid var(--line);
  padding: 0 .3em;
  color: var(--dim);
}

/* ============================================================== references
   A hard word pops out of the sentence: image first, then the meaning.
   ========================================================================= */

.wt {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--dim);
  cursor: help;
  transition: color 140ms var(--ease), border-color 140ms var(--ease);
}

.wt::after {
  content: "?";
  font-size: .7em;
  vertical-align: .4em;
  margin-left: .12em;
  color: var(--dim);
  line-height: 0;
}

/* in an index or a label the marker would be noise — the dashed rule is enough */
.stack .wt::after,
.lang .wt::after,
.label .wt::after { content: none; }

.headline .wt { border-bottom-width: 1px; }
.headline .wt::after { content: none; }

.wt:hover, .wt:focus-visible, .wt[aria-expanded="true"] {
  color: var(--live);
  border-bottom-style: solid;
  border-bottom-color: var(--live);
}

.wt:hover::after, .wt[aria-expanded="true"]::after { color: var(--live); }

.ref {
  position: fixed;
  z-index: 80;
  width: min(20rem, calc(100vw - 1.5rem));
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px -18px rgba(0, 0, 0, .85);
  opacity: 0;
  transform: translateY(4px) scale(.985);
  transform-origin: top center;
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
  pointer-events: none;
  overflow: hidden;
}

.ref[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }

.ref-figure {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  filter: grayscale(1) contrast(1.06);
}

.ref-body { padding: .7rem .8rem .8rem; }

.ref-kicker {
  font-family: var(--face-mono);
  display: block;
  font-size: var(--t-xs);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: .35rem;
}

.ref-title { font-size: var(--t-md); font-weight: 500; line-height: 1.25; }
.ref-desc { font-size: var(--t-xs); color: var(--dim); margin-top: .1rem; letter-spacing: .03em; }
.ref-text { font-size: var(--t-sm); color: var(--fg); margin-top: .5rem; }

.ref-foot {
  font-family: var(--face-mono);
  margin-top: .65rem;
  padding-top: .5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  font-size: var(--t-xs);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--dim);
}

.ref-foot a { color: var(--live); text-decoration: none; }
.ref-foot a:hover { text-decoration: underline; }

.sk { height: .6rem; background: var(--line); margin-bottom: .4rem; }
.sk:first-child { width: 60%; height: .9rem; }
.sk:nth-child(3) { width: 85%; }
.sk:last-child { width: 35%; }

/* link previews: no picture, just the destination */
.ref--link .ref-body { padding-top: .8rem; }
.ref--link .ref-title { font-size: var(--t-sm); }
.ref--link .ref-domain { font-family: var(--face-mono); font-size: var(--t-xs); color: var(--live); letter-spacing: .06em; margin-top: .15rem; }

.ref-close {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--fg);
  background: var(--panel);
}

.ref-scrim {
  position: fixed;
  inset: 0;
  z-index: 79;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity 180ms var(--ease);
}

.ref-scrim[data-open="true"] { opacity: 1; }

@media (max-width: 767px), (pointer: coarse), (hover: none) {
  .ref {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: 78dvh;
    overflow: auto;
    border: 0;
    border-top: 1px solid var(--line);
    transform: translateY(100%);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .ref[data-open="true"] { transform: none; }
  .ref-close { display: block; }
  .ref-figure { aspect-ratio: 2 / 1; }
}

/* ------------------------------------------------------------------ toast */

.toast {
  font-family: var(--face-mono);
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, .4rem);
  z-index: 90;
  background: var(--fg);
  color: var(--bg);
  padding: .4rem .8rem;
  font-size: var(--t-xs);
  letter-spacing: var(--track);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
  pointer-events: none;
}

.toast[data-on="true"] { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================= SMALL SCREENS
   Not the desktop shrunk: navigation moves within thumb reach, the work pane
   becomes two views, and every target grows to 44px.
   ========================================================================= */

/* notches and rounded corners */
.shell {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* no 300ms tap delay, no blue flash */
button, a, input, [role="tab"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* comfortable targets wherever there is no mouse */
@media (pointer: coarse) {
  .row { min-height: 44px; }
  .stack li { padding: .3rem 0; }
  .lang { padding: .35rem 0; }
  .chan { padding: .7rem 0; }
}

@media (max-width: 620px) {
  :root { --bar: 3rem; --t-xs: .72rem; }

  /* the tab bar drops to the bottom, where a thumb actually reaches */
  .tabs {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
    overflow: visible;
    margin-left: 0;
  }

  /* on a phone there is no hover to reveal anything, so the words stay out
     and the marker moves to the top edge of the bottom bar */
  .tab {
    flex: 1 1 0;
    justify-content: center;
    padding: 0 .2em;
    min-height: 52px;
    letter-spacing: .05em;
    font-size: .7rem;
  }

  .tab i { display: none; }
  .tab .tl { max-width: none; opacity: 1; margin-left: 0; }
  .tab::after { bottom: auto; top: -1px; }

  /* reserve the bar's height so the stage still fills exactly one screen */
  .shell { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }

  /* the top bar keeps the name and the theme switch */
  .bar { gap: .5rem; justify-content: space-between; }
  .brand { display: inline; }
  #theme { min-height: 44px; }

  .toast { bottom: calc(52px + env(safe-area-inset-bottom) + .75rem); }

  /* denser panels, fewer internal scrollbars */
  .pane { padding: 1rem var(--gap) .5rem; }
  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem .9rem; }
  .chan { grid-template-columns: 1fr; gap: .2rem; }
  .spec { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .lang { grid-template-columns: 5rem minmax(0, 1fr) 3rem; }
  .row { grid-template-columns: 1.8rem minmax(0, 1fr) auto; gap: .6rem; }
  .figures { padding-block: 1rem; }
  .h-mid { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .caret { animation: none; }
}

/* ============================================================ TYPE AS TEXTURE
   Two layers behind every pane, both made only of letters: the pane name set
   enormous and hollow, and a hairline index turned on its side.
   ========================================================= */

.ghost {
  position: absolute;
  right: var(--gap);
  bottom: -.17em;
  z-index: 0;
  font-family: var(--face-serif);
  font-size: clamp(4rem, 11vw, 10rem);
  font-weight: 600;
  line-height: .75;
  letter-spacing: -.055em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 620px) { .ghost { font-size: 19vw; } }

/* ------------------------------------------------- the detail as a title page */

.back {
  display: none;
  align-items: center;
  gap: .6em;
  font-family: var(--face-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--dim);
  padding: .6rem .6rem .6rem 0;
  margin-bottom: .35rem;
  min-height: 44px;
  cursor: pointer;
}

.back:hover, .back:focus-visible { color: var(--fg); }
.back::before { content: "←"; }

.detail .idx {
  display: block;
  font-family: var(--face-mono);
  font-size: var(--t-xs);
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: .5rem;
}

.detail h3 .stop { color: var(--dim); }

/* first line of the description gets a small-caps run-in */
.detail p:first-of-type::first-line { letter-spacing: .005em; }

/* ------------------------------------------------------- figures as display */

.figure b {
  font-family: var(--face-serif);
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  font-weight: 600;
  letter-spacing: -.035em;
}

.figure { position: relative; }

.figure::before {
  content: attr(data-i);
  position: absolute;
  top: -.9rem;
  left: 0;
  font-family: var(--face-mono);
  font-size: .6rem;
  letter-spacing: .3em;
  color: var(--faint);
}

/* ------------------------------------------------------- the stack as index */

.stack h3 i {
  font-style: normal;
  color: var(--faint);
  margin-right: .8em;
  letter-spacing: .1em;
}

.stack li {
  transition: letter-spacing 160ms var(--ease), color 160ms var(--ease);
}

.stack li:hover { letter-spacing: .015em; }

/* ------------------------------------------------------- values with a voice */

.chan a.link, .chan button.link {
  font-family: var(--face-serif);
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  letter-spacing: -.005em;
}

