/* Intusent Labs — tokens */
:root {
  --canvas: #080807;
  --ink: #d4cec4;
  --ink-strong: #ede8de;
  --muted: #8f8a80;
  --faint: #5f5c55;
  --rule: rgba(212, 206, 196, 0.11);
  --rule-strong: rgba(212, 206, 196, 0.24);
  --panel: #0c0c0b;
  --accent: #e8462f;
  --accent-soft: rgba(232, 70, 47, 0.18);
  --grid: rgba(212, 206, 196, 0.045);
  --glow: rgba(212, 206, 196, 0.05);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;

  --measure: 740px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --canvas: #e8e7e3;
  --ink: #2a2924;
  --ink-strong: #12110f;
  --muted: #69655c;
  --faint: #9c978d;
  --rule: rgba(42, 41, 36, 0.13);
  --rule-strong: rgba(42, 41, 36, 0.28);
  --panel: #e1dfd9;
  --accent: #cf3720;
  --accent-soft: rgba(207, 55, 32, 0.16);
  --grid: rgba(42, 41, 36, 0.06);
  --glow: rgba(255, 255, 255, 0.55);
  color-scheme: light;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color .4s ease, color .4s ease;
}
::selection { background: var(--accent-soft); color: var(--ink-strong); }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 1px dashed var(--accent); outline-offset: 4px; border-radius: 2px; }

/* Header */
.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, var(--canvas) 55%, transparent);
  pointer-events: none;
}
.chrome > * { pointer-events: auto; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-strong);
  text-decoration: none;
  font-size: 18px;
  letter-spacing: 0.005em;
}
.brand .mark { width: 19px; height: 18px; flex: none; }
.brand-name em { color: var(--muted); }
.chrome-actions { display: flex; gap: 4px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.icon-btn:hover { color: var(--ink-strong); background: var(--rule); }
.icon-btn svg { width: 16px; height: 16px; }

/* Hero */
.hero {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  height: clamp(420px, 66vh, 660px);
  margin: 64px auto 8px;
  user-select: none;
  -webkit-user-select: none;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 55% at 50% 48%, var(--glow), transparent 75%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
  background-position: center, center, center;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 35%, transparent 100%);
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
}
#hero-canvas.is-dragging { cursor: grabbing; }

.hud {
  position: absolute;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  pointer-events: none;
}
.hud-k { color: var(--faint); }
.hud-tl { top: 20px; left: 20px; display: flex; gap: 12px; text-transform: uppercase; }
.hud-bl { bottom: 18px; left: 20px; font-variant-numeric: tabular-nums; }
.hud-br { bottom: 18px; right: 20px; text-transform: uppercase; color: var(--faint); }
.hud-stream {
  top: 56px;
  left: 20px;
  bottom: 52px;
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  white-space: pre;
  overflow: hidden;
  opacity: 0;
  transition: opacity .7s ease;
  font-variant-numeric: tabular-nums;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}
.hero[data-lens="machine"] .hud-stream { opacity: 0.85; }

.lens {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  padding: 3px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--canvas) 75%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lens button {
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color .25s, background-color .25s;
}
.lens button:hover { color: var(--ink-strong); }
.lens button[aria-pressed="true"] { background: var(--ink-strong); color: var(--canvas); }

.hand-note {
  position: absolute;
  top: 36%;
  right: 34px;
  width: max-content;
  max-width: min(320px, 34%);
  margin: 0;
  font-family: var(--hand);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  color: var(--accent);
  white-space: pre-line;
  pointer-events: none;
  transform: rotate(-3deg);
  transform-origin: right center;
  clip-path: inset(-20% 100% -20% 0);
  transition: clip-path 1s cubic-bezier(.55, .05, .3, 1);
}
.hand-note.is-in { clip-path: inset(-20% -6% -20% 0); }
.hand-note:not(.is-in) { transition-duration: .25s; }
.hero-ink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.hero-ink path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Article */
.sheet {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px;
  counter-reset: sec;
}
.sheet h1 {
  margin: 36px 0 34px;
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--ink-strong);
  text-wrap: balance;
}
.sheet h1 em { color: var(--ink); }
.sheet p {
  margin: 0 0 1.05em;
  font-size: clamp(19px, 0.55vw + 16px, 24px);
  line-height: 1.68;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}
.sheet h2 {
  position: relative;
  counter-increment: sec;
  margin: 2.2em 0 0.75em;
  font-weight: 400;
  font-size: clamp(26px, 1.4vw + 18px, 32px);
  line-height: 1.2;
  color: var(--ink-strong);
  scroll-margin-top: 84px;
}

@media (min-width: 700px) {
  .sheet > p { text-align: justify; }
}
@media (min-width: 1080px) {
  .sheet h2::before {
    content: counter(sec, decimal-leading-zero);
    position: absolute;
    right: calc(100% + 30px);
    top: 0.62em;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--faint);
  }
}

/* Figures */
.fig {
  margin: 2.1em 0 2.3em;
  border: 1px solid var(--rule);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  transition: background-color .4s ease;
}
@media (min-width: 880px) {
  .fig { margin-left: -32px; margin-right: -32px; }
}
.fig-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.fig-meta { margin-left: auto; color: var(--faint); }
.fig figcaption {
  padding: 11px 16px;
  border-top: 1px solid var(--rule);
  font-size: 11.5px;
  color: var(--faint);
}

/* Fig 02: bars */
.bars { display: grid; gap: 16px; padding: 24px 16px 22px; }
.bar-row {
  display: grid;
  grid-template-columns: 230px 1fr;
  align-items: center;
  gap: 16px;
}
.bar-label { color: var(--ink); }
.bar { position: relative; height: 12px; }
.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) * 100%);
  min-width: 3px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 6px);
  opacity: 0.8;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.6s cubic-bezier(.2, .75, .1, 1);
}
.bar-row:nth-child(2) i { transition-delay: .15s; }
.bar-row:nth-child(3) i { transition-delay: .3s; }
.bar-row:nth-child(4) i { transition-delay: .9s; }
.is-scarce .bar-label { color: var(--ink-strong); }
.is-scarce .bar i { background: var(--accent); opacity: 1; }
.caret {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: calc(var(--v) * 100% + 8px);
  width: 2px;
  background: var(--accent);
  opacity: 0;
}
.fig.in-view .bar i { transform: scaleX(1); }
.fig.in-view .caret { animation: blink 1.1s steps(1) 1.6s infinite; }

/* Fig 03: feature tree */
.tree { margin: 0; padding: 14px 0 12px; list-style: none; counter-reset: step; }
.tree li {
  display: grid;
  grid-template-columns: 30px 84px 1fr;
  gap: 0 12px;
  align-items: baseline;
  padding: 6px 16px;
}
.tree li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-size: 11px;
  color: var(--faint);
}
.tree .k { color: var(--ink); }
.tree .why { margin-top: 8px; padding-top: 14px; border-top: 1px dashed var(--rule-strong); }
.tree .why .k { color: var(--accent); }
.missing { position: relative; color: var(--faint); }
.missing::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 55%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s ease;
}
.fig-tree.is-struck .missing::after { transform: scaleX(1); }
.typed { display: block; margin-top: 6px; color: var(--ink-strong); }
.typed:empty { display: none; }
.typed.is-typing::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

/* Fig 04: practice */
.states { display: flex; border-bottom: 1px solid var(--rule); }
.states span {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color .25s;
}
.states span + span { border-left: 1px solid var(--rule); }
.states span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rule-strong);
  transition: background-color .25s, box-shadow .25s;
}
.states span.on { color: var(--ink-strong); }
.states span.on::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.log { min-height: 214px; padding: 14px 16px 16px; line-height: 1.8; font-variant-numeric: tabular-nums; }
.log .line { display: grid; grid-template-columns: 74px 20px 1fr; gap: 0 10px; animation: rise .35s ease both; }
.log .line.task { grid-template-columns: 74px 1fr; color: var(--ink-strong); margin-bottom: 6px; }
.log .line .t { color: var(--faint); }
.log .bad { color: var(--accent); }
.log .good { color: var(--ink-strong); }
.log .line.reward { margin-top: 6px; grid-template-columns: 74px 1fr; color: var(--accent); }
.log .pending { color: var(--faint); }

/* Pull quote */
.pull { margin: 1.9em 0 1.6em; padding: 0; }
.pull::before { content: ""; display: block; width: 44px; height: 2px; margin-bottom: 24px; background: var(--accent); }
.sheet .pull p {
  margin: 0;
  font-style: italic;
  font-size: clamp(26px, 1.8vw + 17px, 36px);
  line-height: 1.28;
  color: var(--ink-strong);
  text-align: left;
  hyphens: manual;
  -webkit-hyphens: manual;
  text-wrap: balance;
}

/* Tenets */
.tenets { margin: 1.3em 0 0; padding: 0; list-style: none; counter-reset: t; border-top: 1px solid var(--rule); }
.tenets li {
  counter-increment: t;
  position: relative;
  padding: 17px 0 17px 52px;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(18px, 0.4vw + 15.5px, 21px);
  line-height: 1.55;
}
.tenets li::before {
  content: counter(t, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: calc(17px + 0.5em);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  color: var(--faint);
}
.tenets strong { font-weight: 500; color: var(--ink-strong); }

/* Call to action */
.cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 1.4em;
  padding-top: 40px;
}
.cta-mail {
  padding-bottom: 6px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 2px no-repeat;
  transition: color .2s ease;
}
.cta-mail:hover { color: var(--accent); }
.copy {
  padding: 7px 13px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.copy:hover { color: var(--ink-strong); border-color: var(--ink-strong); }
.copy.is-done { color: var(--accent); border-color: var(--accent); }
.sheet .cta-note {
  position: absolute;
  top: -14px;
  right: 0;
  margin: 0;
  font-family: var(--hand);
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  color: var(--accent);
  text-align: left;
  transform: rotate(-4deg);
}
.cta-arrow {
  position: absolute;
  top: 10px;
  right: 168px;
  width: 64px;
  height: 44px;
  overflow: visible;
}
.cta-arrow path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Footer */
.foot {
  width: min(692px, calc(100% - 48px));
  margin: 104px auto 0;
  padding: 22px 0 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.foot-brand { display: inline-flex; align-items: center; gap: 10px; }
.foot .mark { width: 13px; height: 12.5px; }

/* Header: read-as-a-model switch */
.chrome-actions { align-items: center; }
.model-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  margin-right: 6px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.model-toggle:hover { color: var(--ink-strong); border-color: var(--ink-strong); }
.mt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rule-strong); transition: background-color .2s, box-shadow .2s; }
.mt-short { display: none; }
.mt-count { padding-left: 8px; border-left: 1px solid var(--rule-strong); color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.mt-count:empty { display: none; }
.model-toggle[aria-pressed="true"] { color: var(--ink-strong); border-color: var(--accent); background: var(--accent-soft); }
.model-toggle[aria-pressed="true"] .mt-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* Token lens */
:root {
  --on-accent: #0b0b0a;
  --tk0: rgba(232, 70, 47, 0.17);
  --tk1: rgba(226, 170, 64, 0.15);
  --tk2: rgba(112, 190, 122, 0.14);
  --tk3: rgba(96, 160, 232, 0.17);
  --tk4: rgba(176, 128, 232, 0.17);
}
:root[data-theme="light"] {
  --on-accent: #ffffff;
  --tk0: rgba(207, 55, 32, 0.15);
  --tk1: rgba(200, 140, 20, 0.18);
  --tk2: rgba(60, 150, 80, 0.16);
  --tk3: rgba(40, 110, 200, 0.15);
  --tk4: rgba(130, 80, 200, 0.15);
}
.tk { border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-color .15s, color .15s, box-shadow .15s; }
.tk.c0 { background: var(--tk0); }
.tk.c1 { background: var(--tk1); }
.tk.c2 { background: var(--tk2); }
.tk.c3 { background: var(--tk3); }
.tk.c4 { background: var(--tk4); }
.tk.is-attended { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--accent) calc(var(--w, 0.5) * 100%), transparent); }
.tk.is-focus { background: var(--accent); color: var(--on-accent); }
.attn {
  position: fixed;
  inset: 0;
  z-index: 15;
  width: 100vw;
  height: 100vh;
  overflow: visible;
  pointer-events: none;
}
.attn path { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: attn-draw .45s cubic-bezier(.3, .7, .2, 1) forwards; }
.attn circle { fill: var(--accent); }
@keyframes attn-draw { to { stroke-dashoffset: 0; } }

/* Figure hover states */
.bar-row:hover .bar-label, .tree li:hover .k { color: var(--ink-strong); }
.bar-row:hover .bar i { opacity: 1; }
.tree li { transition: background-color .15s; }
.tree li:hover { background: var(--rule); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  padding: 9px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--canvas) 86%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .3s ease, transform .3s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Margin notes */
.has-note { position: relative; }
.mnote {
  position: absolute;
  top: 0;
  left: calc(100% + 28px);
  width: 200px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-family: var(--hand);
  font-weight: 600;
  font-size: 25px;
  line-height: 1.02;
  color: var(--accent);
  text-align: left;
  hyphens: manual;
  -webkit-hyphens: manual;
  transform: rotate(-2.5deg);
  transform-origin: left top;
  clip-path: inset(-30% 100% -30% 0);
  transition: clip-path 1.1s cubic-bezier(.55, .05, .3, 1) .25s;
}
.mnote.mid { top: 38%; }
.mnote.at-end { top: auto; bottom: 0.3em; }
.mnote.in-view { clip-path: inset(-30% -10% -30% 0); }
.mnote svg { flex: none; width: 36px; height: 18px; margin-top: 5px; overflow: visible; }
.mnote path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Crosshair cursor */
.has-cursor, .has-cursor * { cursor: none !important; }
.cursor { position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .2s; }
.cursor.is-on { opacity: 1; }
.cursor > * { position: absolute; left: 0; top: 0; will-change: transform; }
.cur-cross { width: 25px; height: 25px; margin: -12px 0 0 -12px; transition: opacity .12s; }
.cur-cross::before, .cur-cross::after { content: ""; position: absolute; background: var(--ink-strong); }
.cur-cross::before {
  left: 0; right: 0; top: 12px; height: 1px;
  -webkit-mask: linear-gradient(90deg, #000 0 9px, transparent 9px 16px, #000 16px);
  mask: linear-gradient(90deg, #000 0 9px, transparent 9px 16px, #000 16px);
}
.cur-cross::after {
  top: 0; bottom: 0; left: 12px; width: 1px;
  -webkit-mask: linear-gradient(180deg, #000 0 9px, transparent 9px 16px, #000 16px);
  mask: linear-gradient(180deg, #000 0 9px, transparent 9px 16px, #000 16px);
}
.cur-cross i { position: absolute; left: 9px; top: 9px; width: 7px; height: 7px; border: 1px solid var(--accent); transition: transform .12s, background-color .12s; }
.cursor.is-down .cur-cross i { transform: scale(.55); background: var(--accent); }
.cursor.is-snapped .cur-cross { opacity: 0; }
.cur-guide { background: var(--rule-strong); opacity: 0; transition: opacity .2s; }
.cur-gx { height: 1px; }
.cur-gy { width: 1px; }
.cursor.has-guides .cur-guide { opacity: 1; }
.cur-snap { opacity: 0; transition: opacity .15s; }
.cursor.is-snapped .cur-snap { opacity: 1; }
.cur-snap i { position: absolute; width: 8px; height: 8px; border: 0 solid var(--accent); }
.cur-snap i:nth-child(1) { left: 0; top: 0; border-width: 1.5px 0 0 1.5px; }
.cur-snap i:nth-child(2) { right: 0; top: 0; border-width: 1.5px 1.5px 0 0; }
.cur-snap i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1.5px 1.5px; }
.cur-snap i:nth-child(4) { right: 0; bottom: 0; border-width: 0 1.5px 1.5px 0; }
.cur-label {
  padding: 4px 7px;
  border-radius: 3px;
  background: var(--ink-strong);
  color: var(--canvas);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: pre;
  opacity: 0;
  transition: opacity .15s;
}
.cur-label.is-on { opacity: 1; }
.cur-label.is-token { background: var(--accent); color: var(--on-accent); text-transform: none; letter-spacing: 0.02em; }
.cur-coord { font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: pre; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .2s; }
.cursor.has-guides .cur-coord { opacity: 1; }

/* Training run */
.train {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 12;
  width: 210px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.train-row { display: flex; justify-content: space-between; gap: 10px; }
.train-row + .train-row { margin-top: 3px; }
.train-head { margin-bottom: 8px; color: var(--faint); text-transform: uppercase; }
.train b { font-weight: 400; color: var(--ink-strong); }
.train-chart { display: block; width: 184px; height: 46px; margin-bottom: 8px; overflow: visible; }
.train-axis { fill: none; stroke: var(--rule-strong); stroke-width: 1; }
.train-line { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.train-dot { fill: var(--accent); }
.train.is-done .train-head span:first-child { color: var(--accent); }

@media (max-width: 1239px) {
  .train { display: none; }
  .mnote { position: static; width: auto; justify-content: flex-end; margin-top: 6px; font-size: 24px; transform: rotate(-1.5deg); transform-origin: right center; }
  .mnote svg { display: none; }
  .mnote br { display: none; }
}

/* Small screens */
@media (max-width: 760px) {
  .hud-bl, .hud-br, .hud-stream { display: none; }
  .lens { top: auto; bottom: 14px; right: 50%; transform: translateX(50%); }
  .hand-note { top: auto; bottom: 100px; right: 50%; max-width: 86%; text-align: center; transform: translateX(50%) rotate(-3deg); transform-origin: center; font-size: 28px; }
}
@media (max-width: 600px) {
  .chrome { padding: 0 12px 0 16px; }
  .mt-long, .mt-count { display: none !important; }
  .mt-short { display: inline; }
  .model-toggle { margin-right: 2px; }
  .bar-row { grid-template-columns: 1fr; gap: 8px; }
  .tree li { grid-template-columns: 26px 66px 1fr; }
  .log .line { grid-template-columns: 58px 18px 1fr; }
  .log .line.task, .log .line.reward { grid-template-columns: 58px 1fr; }
  .states span { padding: 10px 12px; }
  .cta-arrow { display: none; }
  .sheet .cta-note { position: static; flex-basis: 100%; transform: rotate(-3deg); font-size: 28px; }
}

@keyframes blink { 50% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

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