/* Bearing visual system. The MC Tools look (mc-platform/DESIGN.md): light and warm,
   no black surfaces, three colours with three jobs. Blue is what you do here. Orange
   is what was marked for the guide. Everything else is ink on white over a warm canvas.
   Inter for the interface, Lora for document text, IBM Plex Mono for data. The fonts
   are self-hosted under /fonts/ and this file makes no third-party requests. */

/* 0. Fonts */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2");
}
@font-face {
  font-family: Lora;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/lora-latin-wght-normal.woff2) format("woff2");
}
@font-face {
  font-family: Lora;
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/lora-latin-wght-italic.woff2) format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2");
}

/* 1. Tokens. Light only, by decision. */
:root {
  color-scheme: light;

  --canvas: #efede7;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f5f1;
  --surface-3: #efede7;
  --ink: #1c1b19;
  --ink-2: #3d3a35;
  --muted: #625e57;
  --rule: #e3e0d8;
  --rule-strong: #8f8a7a;
  --accent: #2563eb;
  --accent-solid: #2563eb;
  --accent-solid-hover: #1d4ed8;
  --accent-tint: #e9f0fe;
  --on-accent: #ffffff;
  --hl: #c2410c;
  --hl-tint: #fdeee3;
  --warn: #a16207;
  --warn-mark: #a16207;
  --warn-tint: #fdf6e7;
  --ok: #15803d;
  --ok-mark: #15803d;
  --ok-tint: #eaf5ee;
  --danger: #b42318;
  --danger-solid: #b42318;
  --danger-tint: #fceeec;
  --focus: #2563eb;
  --shadow-sheet: 0 -6px 18px rgba(16, 19, 22, 0.1);
  --shadow-float: 0 6px 18px rgba(16, 19, 22, 0.1);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23625E57' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s7: 32px;
  --s8: 48px;
  --s9: 64px;
  --gutter: 20px;

  --r1: 2px;
  --r2: 4px;
  --r3: 6px;
  --tab: 56px;
  --bar: 52px;

  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-doc: Lora, Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --t-xs: 0.75rem;
  --t-sm: 0.8125rem;
  --t-ui: 0.875rem;
  --t-base: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.375rem;
  --t-xl: 1.75rem;
  --t-h1: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  --lh-tight: 1.1;
  --lh-snug: 1.3;
  --lh-body: 1.5;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --d-fast: 100ms;
  --d-mid: 200ms;
  --d-slow: 260ms;
  --press: scale(0.97);
  --press-soft: scale(0.99);
  --toast-shift: translateY(8px);
  --toast-bottom: 20px;
}

/* 2. Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-base) / var(--lh-body) var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

::selection {
  background: var(--accent-tint);
  color: var(--ink);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  touch-action: manipulation;
}
p,
ul,
ol {
  margin: 0 0 var(--s4);
}
strong,
b {
  font-weight: 600;
}
hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--s6) 0;
}
img {
  max-width: 100%;
}
svg {
  display: block;
}

/* 3. Type. Quiet: weight 600, near-normal tracking. */
h1,
h2,
h3 {
  margin: 0 0 var(--s3);
  color: var(--ink);
  text-wrap: balance;
}
h1 {
  font-size: var(--t-h1);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.011em;
}
h2 {
  font-size: var(--t-lg);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.011em;
}
h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: -0.005em;
}
.display {
  font-size: var(--t-h1);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.011em;
}
.display small {
  display: block;
  margin-top: var(--s2);
  font-size: var(--t-base);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.heading {
  font-size: var(--t-lg);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.011em;
}

.eyebrow,
.doc-label,
.daylabel,
table.data thead th,
h2.section-label {
  font: 400 11px / 1.3 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow,
.doc-label {
  display: block;
  margin: 0 0 var(--s2);
}
h2.section-label {
  margin: var(--s8) 0 var(--s4);
  padding-top: var(--s5);
  border-top: 1px solid var(--rule);
}
h2.section-label.first {
  margin-top: var(--s6);
  padding-top: 0;
  border-top: 0;
}
.lede {
  font-size: var(--t-md);
  line-height: 1.5;
  color: var(--muted);
  max-width: 58ch;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.8em;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.small,
small {
  font-size: var(--t-sm);
  line-height: 1.5;
}
.error-text {
  margin: 0;
  font-size: var(--t-sm);
  font-weight: 500;
  line-height: 1.5;
  color: var(--danger);
}
.doc {
  font: 400 var(--t-md) / 1.7 var(--font-doc);
  color: var(--ink);
}
.doc p + p {
  margin-top: var(--s3);
}
.doc em {
  color: var(--muted);
}
.signature {
  font: italic 1.2em / 1 var(--font-doc);
  color: var(--accent);
}

/* 4. Layout */
.wrap {
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.wrap.wide {
  max-width: 1080px;
}
main {
  padding-block: var(--s7) calc(var(--s9) + var(--s2) + env(safe-area-inset-bottom, 0px));
}
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.stack > * {
  margin-block: 0;
}
.stack > * + h2,
.stack > * + h3 {
  margin-top: var(--s4);
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
}
.row > * {
  min-width: 0;
}
.spacer {
  flex: 1;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s7);
}

@media (min-width: 860px) {
  main {
    padding-top: var(--s8);
  }
  .split {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--s9);
    align-items: start;
  }
}

/* 5. Header and footer, for the document pages */
.topbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--s4);
  min-height: var(--bar);
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
  padding-top: env(safe-area-inset-top);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.011em;
  color: var(--ink);
  text-decoration: none;
}
/* The mark is a heading arrow cut from a square. The one fixed spot of blue on every screen. */
.brand::before {
  content: "";
  width: 11px;
  height: 11px;
  background: var(--accent);
  clip-path: polygon(100% 0, 62% 100%, 46% 54%, 0 38%);
}
.topnav {
  display: flex;
  align-items: stretch;
  gap: var(--s1);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 44px;
  padding-inline: 10px;
  font-size: var(--t-ui);
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--d-fast) var(--ease-out);
}
.topnav a:active {
  color: var(--ink);
}
.topnav a:focus-visible {
  outline-offset: -3px;
}
.topnav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--ink);
}

footer.site {
  margin-top: var(--s9);
  padding-block: var(--s6) calc(var(--s6) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--rule);
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--muted);
}
footer.site a {
  color: inherit;
}
main footer.site {
  padding-bottom: var(--s6);
}

/* 6. Surfaces. Flat: a rule, never a shadow, never a card in a card. */
.card {
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0;
}
.card > :last-child,
.section > :last-child,
.msg > :last-child {
  margin-bottom: 0;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s4);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--rule);
}
.card-head > * {
  margin: 0;
}
.section {
  padding-block: var(--s7);
  border-top: 1px solid var(--rule);
}
.step-num {
  display: block;
  margin-bottom: var(--s2);
  font: 400 var(--t-xs) / 1 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--muted);
}
.paper {
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--rule);
}
.paper .doc-title {
  margin: 0 0 var(--s3);
  font: 600 1.1875rem / 1.25 var(--font-doc);
  letter-spacing: -0.005em;
}
/* A signed summary keeps the guide's line breaks: section headings and list items stay on their own lines. */
.summary-text {
  white-space: pre-line;
}
.paper h4 {
  margin: var(--s5) 0 var(--s1);
  font: 400 11px / 1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 860px) {
  .section {
    padding-block: var(--s8);
  }
  .card {
    padding: var(--s6);
  }
}

/* 7. Forms */
.fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s5) var(--s4);
}
.fields .full {
  grid-column: 1 / -1;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
@media (min-width: 520px) {
  .fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
label,
.label {
  display: block;
  font-size: var(--t-sm);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--ink);
}
.label {
  margin: var(--s4) 0 var(--s1);
}
.label small,
.optional {
  margin-left: 6px;
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--muted);
}
.hint {
  margin: 0;
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  font: inherit;
  font-size: max(16px, 1rem);
  line-height: 1.4;
  color: var(--ink);
  background-color: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r3);
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  transition: border-color var(--d-fast) var(--ease-out);
}
textarea {
  min-height: 96px;
  line-height: 1.5;
  resize: vertical;
}
select {
  padding-right: 36px;
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-position: right 13px center;
}
::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--focus);
  outline-offset: 0;
}
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}
input:disabled,
select:disabled,
textarea:disabled {
  color: var(--muted);
  background-color: var(--surface-2);
  border-color: var(--rule);
  cursor: not-allowed;
}
input[type="checkbox"],
input[type="radio"] {
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  border: 0;
  accent-color: var(--accent-solid);
  appearance: auto;
  -webkit-appearance: auto;
}
textarea.bare {
  min-height: 120px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1.1875rem;
  line-height: 1.45;
  resize: none;
}
textarea.bare:focus-visible {
  outline: none;
}
input.mins {
  width: 84px;
  min-height: 40px;
  padding: 6px 10px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Choice: a joined stack of options that share hairlines. */
.choice {
  display: flex;
  flex-direction: column;
}
.choice label {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  min-height: 52px;
  padding: 14px var(--s4);
  font-size: var(--t-base);
  font-weight: 400;
  line-height: 1.4;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color var(--d-fast) var(--ease-out),
    transform var(--d-fast) var(--ease-out);
}
.choice label + label {
  margin-top: -1px;
}
.choice label:first-child {
  border-radius: var(--r3) var(--r3) 0 0;
}
.choice label:last-child {
  border-radius: 0 0 var(--r3) var(--r3);
}
.choice label:only-child {
  border-radius: var(--r3);
}
.choice label:active {
  transform: var(--press-soft);
  background: var(--surface-2);
}
.choice label:has(input:checked) {
  z-index: 1;
  background: var(--accent-tint);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.choice label:has(input:focus-visible) {
  z-index: 2;
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.choice input {
  margin: 0;
  outline: none;
}
.choice span {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}
.choice small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  color: var(--muted);
}

/* 8. Buttons. One primary per screen. 6px radius, no pills. */
.btn,
.chip,
.toggle,
.del,
.topnav a,
.tabs button[role="tab"],
.tab,
.switch button,
.disclosure {
  margin: 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  min-height: 44px;
  padding: 0 18px;
  font: 600 var(--t-ui) / 1 var(--font-sans);
  white-space: nowrap;
  text-decoration: none;
  color: var(--on-accent);
  background: var(--accent-solid);
  border: 1px solid var(--accent-solid);
  border-radius: var(--r3);
  transition:
    transform var(--d-fast) var(--ease-out),
    background-color var(--d-fast) var(--ease-out),
    border-color var(--d-fast) var(--ease-out),
    color var(--d-fast) var(--ease-out);
}
.btn:active {
  transform: var(--press);
  background: var(--accent-solid-hover);
  border-color: var(--accent-solid-hover);
}
.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.btn-primary {
  color: var(--on-accent);
  background: var(--accent-solid);
  border-color: var(--accent-solid);
}
.btn-ghost,
.btn.ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--rule-strong);
}
.btn-ghost:active,
.btn.ghost:active {
  color: var(--accent);
  background: transparent;
  border-color: var(--accent);
}
.btn-danger,
.btn.danger {
  color: var(--danger);
  background: transparent;
  border-color: var(--danger);
}
.btn-danger:active,
.btn.danger:active {
  color: var(--on-accent);
  background: var(--danger-solid);
}
.btn.link {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
  padding-inline: 8px;
}
.btn.link:active {
  background: var(--accent-tint);
}
.btn-sm,
.btn.small {
  min-height: 34px;
  padding-inline: var(--s3);
  font-size: var(--t-sm);
}
.btn.tall {
  min-height: 52px;
  font-size: var(--t-base);
}
.btn-block,
.btn.block {
  display: flex;
  width: 100%;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
}
button[disabled],
.btn[aria-disabled="true"] {
  color: var(--muted);
  background: var(--surface-2);
  border-color: var(--rule);
  cursor: not-allowed;
}
button[disabled]:active,
.btn[aria-disabled="true"]:active {
  transform: none;
  background: var(--surface-2);
}

/* 9. Toggles, chips, switches, tabs */
.chips,
.toggles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip,
.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  font: 500 var(--t-sm) / 1 var(--font-sans);
  white-space: nowrap;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r3);
  transition:
    transform var(--d-fast) var(--ease-out),
    background-color var(--d-fast) var(--ease-out),
    border-color var(--d-fast) var(--ease-out),
    color var(--d-fast) var(--ease-out);
}
.chip:active,
.toggle:active {
  transform: var(--press);
}
.chip[aria-pressed="true"],
.toggle[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-tint);
  border-color: var(--accent);
}
.chip.chip-flag {
  border-style: dashed;
}
.chip.chip-flag[aria-pressed="true"],
.toggle.flag[aria-pressed="true"] {
  color: var(--hl);
  background: var(--hl-tint);
  border-color: var(--hl);
  border-style: solid;
}
@media (pointer: coarse) {
  .chip,
  .toggle,
  .btn-sm {
    min-height: 40px;
  }
}

.switch {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--r3);
  background: var(--surface);
  overflow: hidden;
}
.switch button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--rule);
  background: transparent;
  font: 500 var(--t-sm) / 1 var(--font-sans);
  color: var(--muted);
  transition:
    color var(--d-fast) var(--ease-out),
    background-color var(--d-fast) var(--ease-out);
}
.switch button:first-child {
  border-left: 0;
}
.switch button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-tint);
}
.switch button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.tabs {
  display: flex;
  gap: var(--s5);
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: inset 0 -1px 0 var(--rule);
}
.tabs button[role="tab"] {
  flex: none;
  min-height: 44px;
  padding: 0 2px;
  font: 500 var(--t-ui) / 1 var(--font-sans);
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 0;
  transition: color var(--d-fast) var(--ease-out);
}
.tabs button[role="tab"]:active {
  color: var(--ink);
}
.tabs button[role="tab"]:focus-visible {
  outline-offset: -3px;
}
.tabs button[role="tab"][aria-selected="true"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--ink);
}

/* 10. Notes. White, a rule, and the meaning in the words. Never a coloured bar. */
.note,
.flag,
.ok,
.note-box {
  padding: var(--s3) var(--s4);
  font-size: var(--t-ui);
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0;
}
.note-box {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  margin: 0 0 var(--s4);
  overflow-wrap: anywhere;
}
.note-box b {
  flex: none;
  font: 400 11px / 1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.note-box.ok b {
  color: var(--ok);
}
.note-box.warn b {
  color: var(--warn);
}
.note-box.err b {
  color: var(--danger);
}
.note-box p {
  min-width: 0;
  margin: 0;
}
.note > :last-child,
.flag > :last-child,
.ok > :last-child {
  margin-bottom: 0;
}
.note strong {
  color: var(--ink);
}
.flag strong {
  color: var(--warn);
}
.ok strong {
  color: var(--ok);
}

/* 11. Documents */
pre.letter,
pre.report {
  margin: 0;
  padding: var(--s4);
  max-width: 100%;
  font: 400 0.8125rem / 1.62 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 4;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
}

/* 12. Data */
.scroller {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.scroller table.data {
  min-width: 560px;
}
.scroller table.data th,
.scroller table.data td {
  white-space: nowrap;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-ui);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
table.data th,
table.data td {
  padding: 10px var(--s4) 10px 0;
  text-align: left;
  vertical-align: baseline;
  border-bottom: 1px solid var(--rule);
}
table.data th:last-child,
table.data td:last-child {
  padding-right: 0;
}
table.data thead th {
  padding-block: var(--s2);
  border-bottom-color: var(--rule);
}
table.data tbody th {
  font-weight: 500;
}
table.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.data tr.total th,
table.data tr.total td {
  font-weight: 600;
  color: var(--ink);
  border-top: 1px solid var(--ink);
  border-bottom: 0;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--s3);
}
.stat {
  padding: var(--s3);
  border: 1px solid var(--rule);
}
.stat b {
  display: block;
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.011em;
  font-variant-numeric: tabular-nums;
}
.stat span {
  display: block;
  margin-top: var(--s1);
  font-size: var(--t-sm);
  line-height: 1.4;
  color: var(--muted);
}
dl.facts {
  margin: 0;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: baseline;
}
dl.facts dt {
  font-size: var(--t-sm);
  color: var(--muted);
}
dl.facts dd {
  margin: 0;
  font-size: var(--t-ui);
  overflow-wrap: anywhere;
}

/* 13. Guide console */
.roster {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.roster li {
  margin: 0;
}
.roster-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 52px;
  padding: var(--s2);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  touch-action: manipulation;
  transition: background-color var(--d-fast) var(--ease-out);
}
.roster-row:active {
  background: var(--surface-3);
}
.roster-row:focus-visible {
  outline-offset: -2px;
}
.roster-row > :first-child {
  flex: none;
  width: 3.75em;
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  color: var(--muted);
}
.roster-row > :nth-child(2) {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}
.roster-row > :last-child:not(:nth-child(-n + 2)) {
  flex: none;
  margin-left: auto;
  font-size: var(--t-sm);
  color: var(--muted);
  text-align: right;
}

.timer-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: var(--bar);
  padding: var(--s1) max(var(--gutter), env(safe-area-inset-right)) var(--s1)
    max(var(--gutter), env(safe-area-inset-left));
  font-size: var(--t-ui);
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule);
}
.timer-bar .mono {
  font-size: var(--t-base);
  font-weight: 500;
}
.timer-bar.running {
  color: var(--accent);
  background: var(--accent-tint);
  border-bottom-color: var(--accent-tint);
}
.timer-bar.running::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s var(--ease-in-out) infinite alternate;
}
.quicklog {
  display: grid;
  gap: var(--s4);
  padding: var(--s4);
  background: var(--surface-2);
  border: 1px solid var(--rule);
}
.quicklog > * {
  margin: 0;
  min-width: 0;
}
.quicklog .chips {
  gap: 6px;
}
.quicklog .chip {
  min-width: 40px;
  padding-inline: 10px;
  font-variant-numeric: tabular-nums;
}
.quicklog input,
.quicklog select {
  min-height: 44px;
  padding-block: 9px;
}
.stepper {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.stepper li {
  position: relative;
  counter-increment: step;
  min-height: 44px;
  margin: 0 0 0 13px;
  padding: 2px 0 var(--s5) 30px;
  font-size: var(--t-ui);
  line-height: 1.5;
  color: var(--muted);
  border-left: 1px solid var(--rule);
}
.stepper li:last-child {
  min-height: 0;
  padding-bottom: 0;
  border-left-color: transparent;
}
.stepper li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: -14px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  font: 400 0.6875rem / 1 var(--font-mono);
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
}
.stepper li.done {
  color: var(--ink-2);
  border-left-color: var(--ink);
}
.stepper li.done::before {
  content: "";
  background: var(--ink);
  border-color: var(--ink);
}
.stepper li.done::after {
  content: "";
  position: absolute;
  top: 7px;
  left: -3px;
  width: 6px;
  height: 11px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.stepper li.current {
  font-weight: 600;
  color: var(--ink);
}
.stepper li.current::before {
  color: var(--accent);
  background: var(--accent-tint);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.stepper li small {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

/* 14. The log */
.daygroup {
  margin-top: var(--s7);
}
.daygroup:first-child {
  margin-top: 0;
}
.daylabel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin: 0;
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--ink);
  letter-spacing: 0.08em;
}
.daylabel > :last-child:not(:first-child) {
  flex: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.entry {
  position: relative;
  overflow: hidden;
}
.entry-inner,
.entry.plain {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr);
  gap: var(--s1) var(--s3);
  align-items: start;
  padding-block: var(--s4);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.entry-inner {
  will-change: transform;
  touch-action: pan-y;
}
.entry.plain {
  grid-template-columns: 4.2em minmax(0, 1fr) auto;
  overflow: visible;
}
.etime {
  padding-top: 3px;
  font: 400 var(--t-xs) / 1.4 var(--font-mono);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.ebody {
  min-width: 0;
}
.etext {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.etags {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  margin-top: 2px;
  font-size: var(--t-sm);
  color: var(--muted);
}
.tag {
  display: inline;
}
.tag.mono {
  font-size: var(--t-xs);
}
.tag.hl {
  padding: 0 3px;
  color: var(--hl);
  background: var(--hl-tint);
  border-radius: 1px;
}
.tag.time {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
}
.dot {
  color: var(--rule);
}
.thumb {
  display: block;
  width: 72px;
  height: 72px;
  margin-top: var(--s3);
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--r2);
}
.entry-action {
  position: absolute;
  top: 0;
  bottom: 1px;
  right: 0;
  width: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: var(--danger-solid);
  color: #fff;
  font: 600 var(--t-ui) / 1 var(--font-sans);
  border: 0;
  cursor: pointer;
}
.del {
  min-width: 44px;
  min-height: 44px;
  margin: -10px -8px -14px 0;
  padding: 0 var(--s2);
  font: 500 var(--t-sm) / 1 var(--font-sans);
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: var(--r2);
  transition:
    transform var(--d-fast) var(--ease-out),
    color var(--d-fast) var(--ease-out),
    background-color var(--d-fast) var(--ease-out);
}
.del:active {
  transform: var(--press);
  color: var(--danger);
  background: var(--danger-tint);
}
.empty {
  padding-block: var(--s7);
  color: var(--muted);
}
.empty .big {
  margin: 0 0 var(--s2);
  font-size: var(--t-lg);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.011em;
  color: var(--ink);
}
.empty > :last-child {
  margin-bottom: 0;
}
/* A new row grows in from zero height. A deleted one collapses. Entrances ease out. */
.grow {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows var(--d-mid) var(--ease-out),
    opacity var(--d-mid) var(--ease-out);
}
.grow > * {
  min-height: 0;
  overflow: hidden;
}
@starting-style {
  .grow {
    grid-template-rows: 0fr;
    opacity: 0;
  }
}
.grow.leaving {
  grid-template-rows: 0fr;
  opacity: 0;
  transition-duration: 150ms, var(--d-fast);
}
.quiet {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr);
  gap: var(--s3);
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.quiet p {
  margin: 0;
  font-size: var(--t-ui);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--s2);
  margin: var(--s6) 0 var(--s2);
}
.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font: 400 11px / 1 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.day i {
  display: block;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 50%;
  will-change: transform;
}
.day.done i {
  background: var(--ink);
  border-color: var(--ink);
}
.day.today span {
  color: var(--ink);
  font-weight: 500;
}

/* 15. Mastery badges, guide screens only */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px var(--s2) 2px 7px;
  font-size: var(--t-xs);
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: var(--r1);
}
.badge::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
}
.badge-exploring::before {
  background: transparent;
  border-color: var(--muted);
}
.badge-practicing::before {
  background: var(--warn-mark);
  border-color: var(--warn-mark);
}
.badge-fluent::before {
  background: var(--ok-mark);
  border-color: var(--ok-mark);
}

/* 16. Keys */
.words {
  --words-col: max(16.66% - 1px, min(33.33% - 1px, (52ch - 100%) * 999), min(50% - 1px, (25ch - 100%) * 999));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--words-col), 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  counter-reset: word;
  font: 400 1.0625rem / 1.2 var(--font-mono);
  letter-spacing: 0.01em;
  background: var(--rule);
  overflow: hidden;
}
.words span {
  counter-increment: word;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s1);
  min-width: 0;
  padding: var(--s3) var(--s1) 14px;
  color: var(--ink);
  background: var(--surface);
}
.words span::before {
  content: counter(word);
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--muted);
}
.recovery-code {
  margin: 0;
  padding: var(--s5) var(--s4);
  font: 400 clamp(1rem, 0.7rem + 1.6vw, 1.375rem) / 1.7 var(--font-mono);
  letter-spacing: 0.08em;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--ink);
  user-select: all;
  -webkit-user-select: all;
}

/* 17. Inbox */
.inbox {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.msg {
  max-width: min(34rem, 88%);
  padding: var(--s3) var(--s4);
  font-size: var(--t-ui);
  line-height: 1.55;
  border: 1px solid var(--rule);
}
.msg p {
  margin-bottom: var(--s2);
}
.msg-parent {
  align-self: flex-end;
  background: var(--accent-tint);
  border-color: var(--accent-tint);
}
.msg-guide {
  align-self: flex-start;
  background: var(--surface);
}
.msg-meta {
  display: block;
  margin-bottom: var(--s1);
  font: 400 11px / 1.4 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* 18. Feedback. The toast is a note that arrives. Short, ease-out, leaves faster. */
.toast {
  position: fixed;
  left: var(--s4);
  right: var(--s4);
  bottom: calc(var(--toast-bottom) + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  width: fit-content;
  max-width: min(32rem, calc(100vw - var(--s7)));
  margin-inline: auto;
  padding: var(--s3) var(--s4);
  font-size: var(--t-ui);
  line-height: 1.4;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-float);
  transition:
    opacity var(--d-slow) var(--ease-out),
    transform var(--d-slow) var(--ease-out);
}
.toast button {
  min-height: 28px;
  margin: -4px -4px -4px 0;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: 600 var(--t-sm) / 1 var(--font-sans);
  cursor: pointer;
}
@starting-style {
  .toast {
    opacity: 0;
    transform: var(--toast-shift);
  }
}
.toast.leaving {
  opacity: 0;
  transform: var(--toast-shift);
  transition-duration: var(--d-fast);
}
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--on-accent);
  background: var(--accent-solid);
  border-radius: var(--r2);
}
.skeleton {
  display: block;
  height: 0.875em;
  margin-block: 0.4em;
  background: var(--surface-3);
  border-radius: var(--r1);
  animation: pulse 1.1s var(--ease-in-out) infinite alternate;
}
.skeleton:last-child:not(:only-child) {
  width: 62%;
}
@keyframes pulse {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.4;
  }
}

/* 19. The parent app: one page at a time above a tab bar */
body.app-page {
  --toast-bottom: calc(var(--tab) + var(--s4));
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--surface);
}
.shell {
  position: absolute;
  inset: 0;
}
.shell-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transform-origin: 50% 45%;
  will-change: transform;
}
.page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 var(--gutter) calc(var(--tab) + var(--s6) + env(safe-area-inset-bottom, 0px));
}
.top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: calc(var(--bar) + env(safe-area-inset-top, 0px));
  margin: 0 calc(var(--gutter) * -1) var(--s4);
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.unlock {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(var(--s8) + env(safe-area-inset-top, 0px)) var(--gutter) var(--s8);
}

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  height: calc(var(--tab) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  border-top: 1px solid var(--rule);
  box-shadow: var(--shadow-sheet);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 10.5px / 1 var(--font-sans);
  letter-spacing: 0.01em;
}
.tab > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: transform var(--d-fast) var(--ease-out);
}
.tab:active > span {
  transform: scale(0.92);
}
.tab svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab[aria-current="page"] {
  color: var(--accent);
}
.tab:focus-visible {
  outline-offset: -3px;
}
.tab.center svg {
  width: 40px;
  height: 40px;
  padding: 8px;
  color: var(--on-accent);
  background: var(--accent-solid);
  border-radius: var(--r3);
  stroke-width: 2;
  transition: background-color var(--d-fast) var(--ease-out);
}
.tab.center[aria-expanded="true"] svg {
  background: var(--accent-solid-hover);
}

.scrim {
  position: absolute;
  inset: 0;
  bottom: calc(var(--tab) + env(safe-area-inset-bottom, 0px));
  z-index: 8;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
}
.scrim.on {
  pointer-events: auto;
}
.compose {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  will-change: transform, opacity;
}
.compose.above-tabs {
  bottom: calc(var(--tab) + env(safe-area-inset-bottom, 0px));
  border-bottom: 1px solid var(--rule);
}
.compose-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(var(--bar) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--s3) 0;
  border-bottom: 1px solid var(--rule);
  touch-action: none;
  cursor: grab;
}
.compose-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--s5) var(--gutter) var(--s6);
}
.capture {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.capture .q {
  margin: 0;
  font-size: var(--t-xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.011em;
  text-wrap: balance;
  touch-action: none;
  cursor: grab;
}
.disclosure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: 500 var(--t-ui) / 1 var(--font-sans);
}
.disclosure::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
  transition: transform var(--d-mid) var(--ease-out);
}
.disclosure[aria-expanded="true"]::before {
  transform: rotate(45deg);
}
.extras {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--d-mid) var(--ease-out);
}
.extras > div {
  min-height: 0;
  overflow: hidden;
}
.extras.open {
  grid-template-rows: 1fr;
}
.extras-inner {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding-bottom: var(--s1);
}
.extras-inner .label:first-child {
  margin-top: 0;
}
.capture-slot {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.capture-slot:empty {
  display: none;
}
.scrub {
  user-select: none;
  -webkit-user-select: none;
}
.scrub-read {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s2);
}
.scrub-read b {
  font: 600 1.625rem / 1 var(--font-sans);
  letter-spacing: -0.011em;
  font-variant-numeric: tabular-nums;
}
.scrub-read > span:not(.spacer) {
  font-size: var(--t-sm);
  color: var(--muted);
}
.ruler {
  position: relative;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--surface);
  touch-action: pan-y;
  cursor: ew-resize;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticks {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  will-change: transform;
}
.tick {
  position: absolute;
  bottom: 16px;
  width: 1px;
  height: 10px;
  background: var(--rule);
}
.tick.major {
  height: 18px;
  background: var(--rule-strong);
}
.tick.major::after {
  content: attr(data-l);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 3px;
  font: 400 11px / 1 var(--font-mono);
  color: var(--muted);
}
.needle {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  pointer-events: none;
}

/* 19b. Spacing, for markup that cannot carry a style attribute under the CSP */
.mt-3 {
  margin-top: var(--s3);
}
.mt-4 {
  margin-top: var(--s4);
}
.mt-6 {
  margin-top: var(--s6);
}
.mt-7 {
  margin-top: var(--s7);
}
.my-4 {
  margin-block: var(--s4);
}

/* 20. Hover, only where a pointer can hover */
@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration-thickness: 2px;
  }
  .topnav a:hover,
  .tabs button[role="tab"]:hover {
    color: var(--ink);
  }
  .btn:hover {
    background: var(--accent-solid-hover);
    border-color: var(--accent-solid-hover);
  }
  .btn-ghost:hover,
  .btn.ghost:hover {
    color: var(--accent);
    background: transparent;
    border-color: var(--accent);
  }
  .btn-danger:hover,
  .btn.danger:hover {
    color: var(--on-accent);
    background: var(--danger-solid);
    border-color: var(--danger-solid);
  }
  .btn.link:hover {
    background: var(--accent-tint);
    border-color: transparent;
  }
  button[disabled]:hover,
  .btn[aria-disabled="true"]:hover {
    color: var(--muted);
    background: var(--surface-2);
    border-color: var(--rule);
  }
  .chip:hover,
  .toggle:hover {
    border-color: var(--accent);
  }
  .chip.chip-flag:hover,
  .toggle.flag:hover {
    border-color: var(--hl);
  }
  .choice label:hover {
    background: var(--surface-2);
  }
  .choice label:has(input:checked):hover {
    background: var(--accent-tint);
  }
  .roster-row:hover {
    background: var(--surface-2);
  }
  .del:hover {
    color: var(--danger);
    background: var(--danger-tint);
  }
  table.data tbody tr:hover td,
  table.data tbody tr:hover th {
    background: var(--surface-2);
  }
  .tab:hover {
    color: var(--ink);
  }
  .tab[aria-current="page"]:hover {
    color: var(--accent);
  }
  .entry-inner:hover {
    background: var(--surface-2);
  }
}

/* Phone path on the guide. It sits under the timer and names the open step. The aside path is the wide-screen copy. */
.pathbar {
  position: sticky;
  top: var(--bar);
  z-index: 19;
  display: grid;
  gap: 2px;
  margin-inline: calc(var(--gutter) * -1);
  padding: var(--s2) var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.pathbar-now {
  margin: 0;
  font-size: var(--t-xs);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--muted);
}
.pathbar-steps {
  display: flex;
  gap: var(--s1);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pathbar-steps li {
  flex: none;
  margin: 0;
}
.pathbar-steps a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 8px;
  font-size: var(--t-ui);
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.pathbar-steps a.is-done {
  color: var(--ink-2);
}
.pathbar-steps a[aria-current="step"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--ink);
}
.pathbar-steps a:active {
  color: var(--ink);
}

@media (max-width: 859px) {
  .path-card {
    display: none;
  }
  #work .section {
    scroll-margin-top: calc(var(--bar) + var(--bar) + 72px);
  }
}

@media (min-width: 860px) {
  .pathbar {
    display: none;
  }
}

.inline-confirm {
  display: grid;
  gap: var(--s3);
  padding: var(--s4);
  background: var(--surface-2);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r2);
}
.inline-confirm p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

/* 21. Reduced motion: cross-fades stay, movement goes */
@media (prefers-reduced-motion: reduce) {
  :root {
    --press: none;
    --press-soft: none;
    --toast-shift: none;
  }
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .grow,
  .toast {
    transform: none !important;
  }
}

/* 22. Print: documents only, black on white */
@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --surface-2: #fff;
    --ink: #000;
    --ink-2: #000;
    --muted: #333;
    --rule: #999;
    --rule-strong: #000;
    --accent: #000;
    --warn: #000;
    --ok: #000;
    --danger: #000;
    --surface-3: #fff;
    --accent-tint: #fff;
    --warn-tint: #fff;
    --ok-tint: #fff;
    --danger-tint: #fff;
  }
  .noprint,
  .topbar,
  .timer-bar,
  .toast,
  .tabbar,
  .compose,
  .scrim,
  .top,
  footer.site {
    display: none !important;
  }
  body,
  body.app-page {
    height: auto;
    overflow: visible;
    background: #fff !important;
    color: #000 !important;
  }
  .app,
  .shell,
  .shell-content {
    position: static;
  }
  .page {
    overflow: visible;
    padding: 0;
  }
  .letter,
  .report,
  .recovery-code {
    color: #000 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  .letter,
  .report {
    padding: 0 !important;
    border: 0 !important;
    font-size: 10.5pt !important;
  }
  .recovery-code {
    border: 1px solid #000 !important;
    break-inside: avoid;
  }
}

/* 23. Styleguide only */
.sg-head {
  padding-block: 0 var(--s7);
}
.sg-demo {
  display: grid;
  gap: var(--s4);
  margin-top: var(--s5);
}
.sg-demo > * {
  margin-block: 0;
  min-width: 0;
}
.sg-demo > .daygroup {
  margin-top: var(--s4);
}
.sg-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: var(--s3);
}
.sg-swatch {
  font-size: var(--t-xs);
  line-height: 1.4;
  color: var(--muted);
}
.sg-swatch::before {
  content: "";
  display: block;
  height: 48px;
  margin-bottom: 6px;
  background: var(--sg-c, var(--bg));
  border: 1px solid var(--rule);
  border-radius: var(--r1);
}
.sg-c-ink {
  --sg-c: var(--ink);
}
.sg-c-muted {
  --sg-c: var(--muted);
}
.sg-c-rule {
  --sg-c: var(--rule);
}
.sg-c-surface {
  --sg-c: var(--surface-2);
}
.sg-c-accent {
  --sg-c: var(--accent-solid);
}
.sg-c-warn {
  --sg-c: var(--warn-mark);
}
.sg-c-ok {
  --sg-c: var(--ok-mark);
}
.sg-c-danger {
  --sg-c: var(--danger-solid);
}
.sg-toast .toast {
  position: static;
  margin-inline: 0;
}
.sg-console {
  margin-inline: calc(var(--gutter) * -1);
}
