/* ============================================================================
   zhuzhbox — core
   One dark surface, off-white ink, reverse video for emphasis. Space Grotesk
   carries display type, Instrument Sans carries running text, and monospace
   is reserved for anything that is data: bytes, timestamps, tokens, paths.
   Fonts are self-hosted (no request ever leaves this origin) — that is not
   an aesthetic footnote on a site whose whole pitch is "nothing about you
   goes anywhere else".
   ========================================================================= */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

:root {
  color-scheme: dark;

  --bg:      #060606;
  --panel:   #0e0e0e;
  --panel-2: #131313;
  --rule:    rgba(255, 255, 255, 0.10);
  --rule-2:  rgba(255, 255, 255, 0.20);
  --dim:     rgba(244, 244, 242, 0.52);
  --fg:      rgba(244, 244, 242, 0.86);
  --hi:      #f4f4f2;

  /* Character cell. Every vertical rhythm value is a multiple of it. */
  --cell: 1.5rem;
  --half: 0.75rem;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --sans:    'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --display: 'Space Grotesk', 'Instrument Sans', system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono",
          Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;

  --t-fast: 90ms;
  --t-med: 180ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* Soft vignette so the ambient canvas (drawn behind everything, see
   #ambientCanvas below) fades toward the edges instead of reading as a flat
   tiled texture — it's the same trick a photographed CRT vignette uses. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at 50% 40%, rgba(6, 6, 6, 0) 30%, var(--bg) 100%);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

/* Fixed full-viewport backdrop, painted by core.js. Sits behind body::before
   and every section; excluded from the stacking rule above so it can stay at
   the very back regardless of DOM order. */
#ambientCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #ambientCanvas { display: none; }
}

/* Scroll progress hairline, pinned to the top edge above everything. */
.scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--hi);
  z-index: 60;
  will-change: width;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.03em; }
p { margin: 0 0 var(--cell); max-width: 68ch; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 var(--cell); padding-left: 1.5em; max-width: 68ch; }
li { margin-bottom: 0.35em; }
li::marker { color: var(--dim); }

a { color: var(--hi); text-decoration: none; border-bottom: 1px solid var(--rule-2); transition: color var(--t-med) var(--ease), border-color var(--t-med) var(--ease); }
a:hover { color: var(--fg); border-bottom-color: var(--rule); }

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

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

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--rule-2); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--hi); color: var(--bg); padding: 0.5rem 1rem; z-index: 100;
  border: 0; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

/* ---- text roles ---------------------------------------------------------- */

.label {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.note {
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--dim);
  margin: 0;
}
.dim { color: var(--dim); }
.hot { color: var(--hi); }
/* Anything carrying a figure keeps its case and lines up in monospace, so a
   column of byte counts or dates reads as a table even set inline. */
.num { font-variant-numeric: tabular-nums; text-transform: none; font-family: var(--mono); }
.nowrap { white-space: nowrap; }

/* Display line. The one piece of type on the site set hero-scale, styled
   after a marketing headline even though it's only two short lines. */
.thesis {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 6.4vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: var(--hi);
  margin: 0 0 var(--cell);
  max-width: 28ch;
}
.thesis .sep { color: var(--dim); }

/* ---- word-by-word reveal ---------------------------------------------------
   Shared by the hero thesis (pre-split in markup — each word is already its
   own translated span) and every page's <h1> (split at runtime by core.js's
   splitWords(), since a translated sentence can't be hand-chopped into words
   ahead of time across nine languages). Either way the contract is the same:
   a [data-words] container whose direct-descendant [data-w] children start
   hidden and cascade in, one word apart, once core.js adds .is-in. */
.js-reveal [data-words] [data-w] {
  display: inline-block;
  opacity: 0;
  transform: translateY(60%) rotate(2deg);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js-reveal [data-words].is-in [data-w] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-words] [data-w] { opacity: 1; transform: none; transition: none; }
}

/* The cursor. Blinks on a 1.06s square wave, like a real one. */
.caret {
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  vertical-align: -0.1em;
  background: var(--hi);
  animation: blink 1.06s steps(1) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ---- scroll reveal --------------------------------------------------------
   Generic fade-and-rise, armed by core.js's IntersectionObserver. Elements
   start hidden only once JS has actually run (see .js-reveal on <html>) so a
   no-JS visit, or a crawler, still gets full content instead of stuck-at-0
   opacity. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---- bars ---------------------------------------------------------------- */

.bar {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--cell);
  height: calc(var(--cell) * 3);
  display: flex;
  align-items: center;
  gap: var(--cell);
}

.bar-top {
  position: sticky;
  top: 0;
  z-index: 30;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--hi);
  border: 0;
  flex: none;
}
.mark-icon { display: block; height: calc(var(--cell) * 3); width: auto; }
.mark:hover { border: 0; }

.tabs { display: flex; gap: 0.2rem; flex: 1 1 auto; min-width: 7rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--dim);
  padding: 0.3rem 0.75rem;
  font-size: 0.8125rem;
  white-space: nowrap;
  transition: color var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.tab:hover { color: var(--hi); border: 0; background: rgba(255, 255, 255, 0.06); }
.tab[aria-current="page"] {
  background: var(--hi);
  color: var(--bg);
}

.bar-right { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.bar-gap { flex: 1 1 auto; min-width: 0; }

.nav-menu { display: none; position: relative; min-width: 0; }
.nav-menu-btn { gap: 0.4rem; max-width: 100%; }
#navMenuLabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nav-menu-caret { color: var(--dim); font-size: 0.7em; flex: none; }
.nav-menu-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  min-width: 9rem;
  background: var(--panel);
  border: 1px solid var(--rule-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.8);
}
.nav-menu-panel[hidden] { display: none; }
.nav-menu-panel .tab {
  display: block;
  border-radius: 0;
  padding: 0.6rem 0.85rem;
  text-align: left;
}
.nav-menu-panel .tab + .tab { border-top: 1px solid var(--rule); }

/* ---- the keybind bar ----------------------------------------------------- */

.bar-foot {
  position: sticky;
  bottom: 0;
  z-index: 20;
  border-bottom: 0;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
}
.bar-foot .bar-inner { height: calc(var(--cell) * 1.6); gap: 1.1rem; }
.keys { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; }
.keyhint { color: var(--dim); display: inline-flex; gap: 0.4rem; align-items: baseline; }

kbd {
  font: inherit;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  padding: 0 0.3rem;
  min-width: 1.4em;
  display: inline-block;
  text-align: center;
  line-height: 1.45;
}

/* ---- panes --------------------------------------------------------------- */

/* A pane is a rounded card with its title notched into the top rule, the way
   a labelled terminal window interrupts its own border. */
.pane {
  position: relative;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: calc(var(--cell) * 0.9) var(--cell) var(--cell);
  min-width: 0;
}
.pane > .pane-t {
  position: absolute;
  top: 0;
  left: 1.3rem;
  transform: translateY(-50%);
  padding: 0 0.55rem;
  background: var(--panel);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  display: flex;
  gap: 0.6rem;
  align-items: center;
  max-width: calc(100% - 2.6rem);
}
.pane > .pane-t .t-meta { color: var(--dim); letter-spacing: 0.08em; text-transform: none; }
.pane-action {
  all: unset;
  margin-left: auto;
  padding-left: 0.5rem;
  color: var(--dim);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: none;
  cursor: pointer;
  flex: none;
  transition: color var(--t-med) var(--ease);
}
.pane-action:hover { color: var(--hi); }
.pane-fill { background: var(--panel-2); }
.pane-flush { padding: 0; }

.divide {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: var(--cell) 0 var(--half);
}
.divide::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ---- controls ------------------------------------------------------------ */

.btn {
  font: inherit;
  font-size: 0.8125rem;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--rule-2);
  border-radius: var(--radius);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: border-color var(--t-med) var(--ease), background var(--t-med) var(--ease),
              color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.btn:hover:not(:disabled) { border-color: var(--hi); color: var(--hi); background: rgba(255, 255, 255, 0.06); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn[hidden] { display: none; }
a.btn { border-bottom: 1px solid var(--rule-2); }
a.btn:hover { border-color: var(--hi); }

/* Reverse video is the only "primary" treatment on the site — a solid white
   pill that lifts a hair on hover, the one moment of physical motion on an
   otherwise static control. */
.btn-go {
  background: var(--hi);
  color: var(--bg);
  border-color: var(--hi);
}
.btn-go:hover:not(:disabled) { background: #fff; border-color: #fff; color: var(--bg); transform: translateY(-1px); }
.btn-sm { font-size: 0.75rem; padding: 0.25rem 0.6rem; border-radius: var(--radius-sm); }
.btn-quiet { border-color: transparent; color: var(--dim); }
.btn-quiet:hover:not(:disabled) { border-color: transparent; background: rgba(255, 255, 255, 0.08); color: var(--hi); }
.btn-x { border-color: var(--rule-2); }
.btn-x:hover:not(:disabled) { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.btn-row { display: flex; gap: var(--half); flex-wrap: wrap; align-items: center; }

.input, .textarea, .select {
  font: inherit;
  font-size: 0.8125rem;
  width: 100%;
  color: var(--fg);
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  transition: border-color var(--t-med) var(--ease);
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--hi); outline-offset: 1px; }
.input::placeholder, .textarea::placeholder { color: var(--dim); opacity: 1; }
.textarea { resize: vertical; min-height: calc(var(--cell) * 3); line-height: 1.5; }
.input[readonly] { color: var(--hi); }

.field { display: block; margin-bottom: var(--half); }
.field > .label { display: flex; justify-content: space-between; margin-bottom: 0.3rem; }

/* Segmented switch — the active segment is reverse video, like a selected row
   in a list widget. */
.seg { display: inline-flex; border: 1px solid var(--rule-2); border-radius: var(--radius); overflow: hidden; }
.seg button {
  font: inherit;
  font-size: 0.75rem;
  background: transparent;
  color: var(--dim);
  border: 0;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: color var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.seg button + button { border-left: 1px solid var(--rule-2); }
.seg button:hover { color: var(--hi); }
.seg button[aria-pressed="true"] { background: var(--hi); color: var(--bg); }

/* ---- meters -------------------------------------------------------------- */

.meter {
  --pct: 0%;
  position: relative;
  height: 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--panel-2);
  overflow: hidden;
}
.meter::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--pct);
  background:
    repeating-linear-gradient(to right, var(--fg) 0 4px, transparent 4px 6px);
  transition: width var(--t-med) linear;
}
.meter-hot::before { background: repeating-linear-gradient(to right, var(--hi) 0 4px, transparent 4px 6px); }
.meter-row { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; align-items: center; }

/* ---- code ---------------------------------------------------------------- */

.code {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: var(--half) 0.85rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  margin: 0 0 var(--half);
  max-width: none;
  tab-size: 2;
}
.code pre { margin: 0; font: inherit; }
.code .c { color: var(--dim); }
.code .k { color: var(--hi); }
.code-copy {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  opacity: 0;
  font-family: var(--sans);
  background: var(--panel-2);
  transition: opacity var(--t-fast);
}
.code:hover .code-copy, .code-copy:focus-visible { opacity: 1; }
@media (hover: none) {
  .code-copy { opacity: 1; }
}

code.tick {
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0 0.35em;
  font-size: 0.875em;
  color: var(--fg);
}

/* ---- tables -------------------------------------------------------------- */

.table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.table th, .table td {
  text-align: left;
  padding: 0.45rem 0.75rem 0.45rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}
.table th {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.table td { font-family: var(--mono); }
.table tr:last-child td { border-bottom: 0; }
.table td:last-child, .table th:last-child { padding-right: 0; }

/* ---- toasts -------------------------------------------------------------- */

.toasts {
  position: fixed;
  right: var(--cell);
  bottom: calc(var(--cell) * 2.6);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-end;
  pointer-events: none;
}
.toast {
  background: var(--hi);
  color: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
  max-width: 44ch;
  box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.9);
  animation: toast-in var(--t-med) var(--ease);
}
.toast-bad { background: var(--fg); }
@keyframes toast-in { from { opacity: 0; transform: translateY(0.4rem); } }

/* ---- modal --------------------------------------------------------------- */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: start center;
  padding: calc(var(--cell) * 2) var(--cell);
  overflow-y: auto;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-root[hidden] { display: none; }
.modal {
  width: min(620px, 100%);
  background: var(--panel);
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 0.9);
  animation: modal-in var(--t-med) var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(-0.5rem); } }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cell);
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--rule);
}
.modal-body { padding: var(--cell) 0.9rem; }

/* Tab strip inside a dialog. */
.subtabs { display: flex; gap: 0.2rem; margin-bottom: var(--cell); }
.subtab {
  font: inherit;
  font-size: 0.75rem;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--dim);
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition: color var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.subtab[aria-selected="true"] { background: var(--hi); color: var(--bg); border-color: var(--hi); }

/* Picker rows shared by the language modal (and anything else with a simple
   list of named options to choose between). */
.theme-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.theme-list li + li { border-top: 1px solid var(--rule); }
.theme-opt {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  color: var(--fg);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background var(--t-med) var(--ease);
}
.theme-opt:hover { background: rgba(255, 255, 255, 0.06); }
.theme-opt[aria-pressed="true"] { background: var(--hi); color: var(--bg); }
.theme-name { flex: 1; text-transform: capitalize; }
.theme-mark { flex: none; font-family: var(--mono); font-variant-numeric: normal; opacity: 0.35; }
.theme-opt[aria-pressed="true"] .theme-mark { opacity: 1; }

/* ---- utility ------------------------------------------------------------- */

.stack > * + * { margin-top: var(--cell); }
.stack-sm > * + * { margin-top: var(--half); }
.row { display: flex; gap: var(--half); align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: var(--cell); align-items: center; justify-content: space-between; }
.mono-url {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--hi);
  word-break: break-all;
}
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .caret { opacity: 1; }
}

@media (max-width: 720px) {
  :root { --cell: 1.25rem; --half: 0.625rem; }
  body { font-size: 0.875rem; }
  .bar-inner { padding: 0 var(--cell); gap: var(--half); }
  .mark-icon { height: 1.15rem; }
  .bar-foot { display: none; }
  .quota-chip { display: none; }
  .kbd-hint { display: none; }
  .tabs { display: none; }
  .nav-menu { display: block; flex: 1 1 auto; min-width: 0; }
  .toasts { right: var(--half); left: var(--half); bottom: var(--half); align-items: stretch; }
  .toast { max-width: none; }
  .bar-top { position: static; }

  .tab { padding: 0.55rem 0.75rem; }
  .btn-sm { padding: 0.45rem 0.7rem; }
  .qi-drop { padding: 0.4rem 0.5rem; margin: -0.4rem -0.5rem; }
  .pane-action { padding: 0.4rem 0; margin: -0.4rem 0; }
  .seg button { padding: 0.5rem 0.85rem; }
}
