@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f2eee3;
  --fg: #121211;
  --ink: #121211; /* outlines and hard shadows */
  --pane: #fffdf5;
  --ahead: #8d8777;
  --muted: #5f5a4e;
  --line: #d9d3c2;
  --gutter: #b3ad9c;
  --accent: #c8f751; /* acid lime, always used as a fill under dark text */
  --on-accent: #121211;
  --accent-text: #121211; /* accent when it has to be text: ink on cream, lime on black */
  --accent-soft: rgba(200, 247, 81, 0.55);
  --tint: rgba(18, 18, 17, 0.07);
  --error: #e5361f;
  --cursorline: rgba(200, 247, 81, 0.45);
  --shadow: #121211;
  --bar-stroke: #121211;
  --grain: 0.08;
  --grain-blend: multiply;

  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;

  --fs: clamp(1.05rem, 0.9rem + 0.6vw, 1.4rem);
  --lh: calc(var(--fs) * 1.85);
  --rows: 5; /* lines visible in the editor */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0c0d;
    --fg: #f4f1e8;
    --ink: #f4f1e8;
    --pane: #151517;
    --ahead: #6f6f75;
    --muted: #9a978c;
    --line: #2a2a2e;
    --gutter: #4b4b51;
    --accent-text: #c8f751;
    --accent-soft: rgba(200, 247, 81, 0.17);
    --tint: rgba(244, 241, 232, 0.08);
    --error: #ff6a58;
    --cursorline: rgba(200, 247, 81, 0.09);
    --shadow: #c8f751;
    --bar-stroke: transparent;
    --grain: 0.1;
    --grain-blend: screen;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c0d;
  --fg: #f4f1e8;
  --ink: #f4f1e8;
  --pane: #151517;
  --ahead: #6f6f75;
  --muted: #9a978c;
  --line: #2a2a2e;
  --gutter: #4b4b51;
  --accent-text: #c8f751;
  --accent-soft: rgba(200, 247, 81, 0.17);
  --tint: rgba(244, 241, 232, 0.08);
  --error: #ff6a58;
  --cursorline: rgba(200, 247, 81, 0.09);
  --shadow: #c8f751;
  --bar-stroke: transparent;
  --grain: 0.1;
  --grain-blend: screen;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* a little paper grain over the page background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain);
  mix-blend-mode: var(--grain-blend);
  background-size: 160px 160px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: var(--on-accent); }

button { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- page frame ---------- */

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  grid-template-columns: minmax(0, 1fr); /* nothing inside may make the single column wider than the screen (WebKit sized it to a text box) */
}

.wrap {
  width: 100%;
  max-width: 62rem;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.top { padding-top: env(safe-area-inset-top, 0px); transition: opacity 0.35s ease; }
.foot { padding-block: 1.5rem max(1.5rem, env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 0.75rem; transition: opacity 0.35s ease; }
.foot .bar { flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.app.typing .top, .app.typing .foot { opacity: 0.2; }

.brand {
  display: inline-flex;
  align-items: center;
  padding-block: 1rem;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.05rem, 0.9rem + 0.8vw, 1.45rem);
  letter-spacing: -0.04em;
}

.cursor {
  display: inline-block;
  width: 0.46em;
  height: 1em;
  margin-left: 0.18em;
  background: var(--accent);
  border: 2px solid var(--ink);
  animation: blink 1.1s steps(1) infinite;
}

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

.top-actions { display: flex; align-items: center; gap: 0.6rem; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.3rem 0.95rem;
  background: transparent;
  color: var(--fg);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pill.icon { width: 2.25rem; padding: 0; }
.pill:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- the ticker ---------- */

.marquee {
  overflow: hidden;
  padding-block: 0.7rem;
  background: var(--accent);
  color: var(--on-accent);
  border-block: 2px solid var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.35rem);
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.35s ease;
}
.app.typing .marquee { opacity: 0.25; }
.marquee-track { display: flex; width: max-content; animation: slide 70s linear infinite; }
.marquee-group { display: flex; align-items: center; gap: 1.4rem; padding-right: 1.4rem; }
.marquee i {
  flex: none;
  width: 0.85em;
  height: 0.85em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0l2.4 9.6L24 12l-9.6 2.4L12 24l-2.4-9.6L0 12l9.6-2.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0l2.4 9.6L24 12l-9.6 2.4L12 24l-2.4-9.6L0 12l9.6-2.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- main ---------- */

.main {
  padding-top: clamp(1.75rem, 5vw, 3.5rem);
  padding-bottom: 2.5rem;
  min-width: 0;
}

.hero { margin-bottom: 2rem; transition: opacity 0.35s ease; }
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7.2vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.hero mark {
  display: inline-block;
  padding: 0 0.14em 0.04em;
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--ink);
  border-radius: 0.2em;
  transform: rotate(-1.6deg);
}
.hero p { margin: 1rem 0 0; max-width: 42rem; color: var(--muted); font-size: 0.92rem; }
.app:not([data-phase="idle"]) .hero { opacity: 0.14; }
.app[data-phase="done"] .hero { display: none; }

/* ---------- the editor ---------- */

.test { position: relative; min-width: 0; }

.pane {
  position: relative;
  background: var(--pane);
  color: var(--fg);
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 7px 7px 0 var(--shadow);
  overflow: hidden;
}

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: 0 0.7rem 0 1.1rem;
  border-bottom: 2px solid var(--ink);
  color: var(--muted);
  font-size: 0.78rem;
}
.file { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--fg); }
.file::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); }

.group {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  min-width: 0;
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.opt {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.opt:hover { color: var(--fg); }
.opt[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.opt:disabled { opacity: 0.6; cursor: default; }
.opt:disabled:hover { color: var(--muted); }
.opt[aria-pressed="true"]:disabled:hover { color: var(--on-accent); }

.viewport {
  position: relative;
  height: calc(var(--lh) * var(--rows));
  margin-block: 0.7rem;
  overflow: hidden;
  transition: filter 0.2s, opacity 0.2s;
}

.track {
  position: relative;
  transition: transform 0.16s ease;
  will-change: transform;
}

.text {
  font-size: var(--fs);
  line-height: var(--lh);
  user-select: none;
  -webkit-user-select: none;
  cursor: text;
}

.line {
  display: flex;
  align-items: flex-start;
  padding: 0 1.1rem 0 0.85rem;
}

.gutter {
  flex: 0 0 auto;
  width: 3ch;
  margin-right: 1.5ch;
  text-align: right;
  color: var(--gutter);
}

.code {
  flex: 1 1 auto;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.w { white-space: nowrap; }

.line.current { background: var(--cursorline); }
.line.current .gutter { color: var(--fg); }

.c { color: var(--ahead); transition: color 0.06s; }
.c.ok { color: var(--fg); }
.c.bad {
  color: var(--error);
  text-decoration: underline wavy var(--error);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}

/* the Enter at the end of each line; drawn, because the font has no arrow for it */
.c.nl {
  display: inline-block;
  width: 1ch;
  height: 1em;
  margin-left: 0.3ch;
  vertical-align: -0.14em;
  background-color: currentColor;
  opacity: 0.75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13 3v5H4.4l2.3-2.3-.7-.7L2.5 8.5 6 12l.7-.7L4.4 9H14V3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13 3v5H4.4l2.3-2.3-.7-.7L2.5 8.5 6 12l.7-.7L4.4 9H14V3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.c.nl.ok { opacity: 0.3; }

.caret {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: calc(var(--fs) * 1.4);
  background: var(--accent-text);
  border-radius: 1px;
  transition: transform 0.09s ease-out;
  will-change: transform;
  animation: blink 1.1s steps(1) infinite;
}
.caret.live { animation: none; }

.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.9rem;
  padding: 0 1.1rem;
  border-top: 2px solid var(--ink);
  color: var(--muted);
  font-size: 0.78rem;
}
.st-left { display: flex; align-items: baseline; gap: 1.25rem; min-width: 0; }
.caps { color: var(--error); font-weight: 600; }
.meter {
  min-width: 3ch;
  text-align: right;
  color: var(--accent-text);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.2s;
}
.app[data-phase="idle"] .meter { opacity: 0.55; }

.under {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
  transition: opacity 0.35s ease;
}
.hint { margin: 0; color: var(--muted); font-size: 0.8rem; }
.under-right { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; min-width: 0; }
.streak {
  padding: 0.3rem 0.8rem;
  background: var(--pane);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 0.78rem;
}
.streak[hidden] { display: none; }
.app:not([data-phase="idle"]) .under { opacity: 0; pointer-events: none; }

.focus-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.focus-note .touch { display: none; }
@media (hover: none) {
  .focus-note .desk { display: none; }
  .focus-note .touch { display: inline; }
}
.test.blurred .viewport { filter: blur(5px); opacity: 0.5; }
.test.blurred .focus-note { opacity: 1; }
.test.blurred .caret { visibility: hidden; }

/* ---------- results ---------- */

.results { min-width: 0; }

.label { display: block; color: var(--muted); font-size: 0.78rem; }

.cmd { margin: 0 0 1.75rem; color: var(--muted); font-size: 0.85rem; }
.cmd .p { color: var(--accent-text); margin-right: 0.6ch; font-weight: 600; }

/* the result is a poster: it is what people will screenshot */
.verdict {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1.25rem;
  padding: clamp(1.25rem, 3.4vw, 2.25rem) clamp(1.25rem, 3.4vw, 2.25rem) clamp(2.4rem, 5vw, 3.2rem);
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--ink);
  border-radius: 24px;
  box-shadow: 8px 8px 0 var(--shadow);
}
.verdict .label { flex-basis: 100%; color: rgba(18, 18, 17, 0.72); font-weight: 500; }
.verdict { container-type: inline-size; }
/* sized from the poster's own width and the longest word of the verdict (about 0.58 of the font size per
   letter at most), so even "superintelligence" fits on a phone and nothing ever scrolls sideways */
.rank-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 8vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
}
@supports (width: 1cqw) {
  .rank-name { font-size: clamp(1.5rem, calc(100cqw / (var(--chars, 8) * 0.6)), 8rem); }
}
.rank-line { color: rgba(18, 18, 17, 0.82); font-size: 0.95rem; }
.rank-note { flex-basis: 100%; color: #8e1d0e; font-size: 0.85rem; font-weight: 600; }
.rank-note:empty { display: none; }
.panel-url {
  position: absolute;
  right: clamp(1.25rem, 3.4vw, 2.25rem);
  bottom: 0.9rem;
  color: rgba(18, 18, 17, 0.7);
  font-size: 0.75rem;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1.6rem;
  background: var(--pane);
  border: 2px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
}
.stat { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; padding: 1rem 1.25rem; border-right: 2px solid var(--ink); }
.stat:last-child { border-right: 0; }
.stat .value {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.chart-wrap {
  position: relative;
  margin-top: 1.6rem;
  padding: 2.4rem 1.1rem 0.8rem;
  background: var(--pane);
  border: 2px solid var(--ink);
  border-radius: 18px;
}
.chart-box { position: relative; }
.chart { display: block; width: 100%; height: clamp(6rem, 11vw, 8rem); overflow: visible; }
.chart .base { stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .bar { fill: var(--accent); stroke: var(--bar-stroke); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart-box .mark, .swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pane);
  border: 2px solid var(--error);
}
.chart-box .mark { position: absolute; margin: -13px 0 0 -4.5px; }
.chart-peak { position: absolute; top: 0.8rem; left: 1.1rem; color: var(--muted); font-size: 0.75rem; }
.chart-axis {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.legend { display: inline-flex; align-items: center; gap: 0.5rem; }
.legend[hidden] { display: none; }
.swatch { display: inline-block; flex: none; }

.actions { display: flex; flex-wrap: wrap; gap: 0.9rem 1rem; margin-top: 1.9rem; }
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: var(--pane);
  color: var(--fg);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--shadow);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shadow); }
.btn.primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn[data-on="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.small { padding: 0.4rem 0.95rem; font-size: 0.8rem; box-shadow: 3px 3px 0 var(--shadow); }
.btn.small:hover { box-shadow: 4px 4px 0 var(--shadow); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: default; transform: none; box-shadow: 4px 4px 0 var(--shadow); }
.linkish {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linkish[hidden] { display: none; }
.btn kbd { margin-left: 0.15rem; opacity: 0.6; font-size: 0.75rem; color: inherit; }
@media (hover: none) { .btn kbd { display: none; } }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.55rem 3rem;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}
.facts > div { display: flex; align-items: baseline; gap: 0.6rem; min-width: 0; }
.facts dt {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.facts dt::after {
  content: "";
  flex: 1 1 auto;
  border-bottom: 2px dotted var(--line);
  transform: translateY(-0.2em);
}
.facts dd { margin: 0; font-size: 0.95rem; font-variant-numeric: tabular-nums; text-align: right; }
.facts dd.accent { padding: 0 0.4em; background: var(--accent); color: var(--on-accent); border-radius: 0.4em; }

.tokens { margin-top: 2.25rem; }
.chips {
  margin-top: 0.6rem;
  max-height: 11rem;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 2;
  scrollbar-width: thin;
}
.chip {
  display: inline-block;
  white-space: pre;
  padding: 0 0.12rem;
  margin: 0 1px;
  border-radius: 3px;
  background: var(--accent-soft);
}
.chip:nth-child(even) { background: var(--tint); }
.chips .more { color: var(--muted); }

.fine {
  max-width: 46rem;
  margin: 2.25rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.75;
}

kbd { font: inherit; color: var(--fg); }
.foot kbd { padding: 0.05rem 0.4rem; border: 1.5px solid var(--ink); border-radius: 6px; }

/* ---------- compare (only on when a score service is set) ---------- */

.compare {
  margin-top: 1.6rem;
  padding: 1.3rem 1.2rem 1.2rem;
  background: var(--pane);
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--shadow);
  min-width: 0;
}
.compare[hidden] { display: none; }
.c-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.c-sub { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.8rem; }
.c-label { margin: 1.1rem 0 0.5rem; color: var(--muted); font-size: 0.78rem; }
.c-tools { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tool {
  appearance: none;
  padding: 0.3rem 0.8rem;
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.tool[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.tool:disabled { opacity: 0.55; cursor: default; }
.c-handle { margin: 1rem 0 0; font-size: 0.82rem; }
.c-handle[hidden] { display: none; }
.c-handle b { padding: 0 0.4em; background: var(--accent); color: var(--on-accent); border-radius: 0.4em; font-weight: 600; }
.c-payload {
  margin: 0;
  padding: 0.8rem 1rem;
  background: var(--tint);
  border-radius: 10px;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}
.c-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; margin-top: 1rem; }
.c-result[hidden], .c-board[hidden] { display: none; }
.c-result p { margin: 0.55rem 0 0; font-size: 0.9rem; line-height: 1.6; }
.c-board { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: place; }
.c-board li {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
}
.c-board li::before { counter-increment: place; content: counter(place); flex: none; width: 1.5rem; opacity: 0.6; }
.c-board li.mine { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.c-board .who { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.c-board .v { font-variant-numeric: tabular-nums; }

.backup { margin-top: 1rem; }
.backup summary { width: max-content; max-width: 100%; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.backup-body { max-width: 40rem; margin-top: 0.8rem; }
.backup-body p { margin: 0 0 0.8rem; line-height: 1.7; }
.code-row { display: flex; gap: 0.6rem; margin-top: 0.6rem; min-width: 0; }
.code-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.45rem 0.75rem;
  background: var(--pane);
  color: var(--fg);
  border: 2px solid var(--ink);
  border-radius: 10px;
  font: inherit;
  font-size: 0.78rem;
}
.b-msg { min-height: 1.4em; margin: 0.7rem 0 0 !important; color: var(--fg); }

/* ---------- hidden input that receives the typing ---------- */

.capture {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  outline: 0;
  opacity: 0;
  resize: none;
  font-size: 16px;
  pointer-events: none;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .hero { display: none; }
  .main { padding-top: 1.4rem; }
  .brand { padding-block: 0.75rem; }
  .marquee { padding-block: 0.55rem; }
  .gutter { width: 2ch; margin-right: 1ch; }
  .line { padding: 0 0.75rem 0 0.5rem; }
  .pane { box-shadow: 5px 5px 0 var(--shadow); }
  .pane-head { padding-left: 0.85rem; padding-right: 0.5rem; }
  .opt { padding: 0.28rem 0.5rem; }
  .stat { padding: 0.8rem 0.8rem; }
  .stat .label { font-size: 0.68rem; }
  .verdict { border-radius: 18px; box-shadow: 6px 6px 0 var(--shadow); }
  .foot .note { display: none; }
}

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