/* Spare Key side panel. Tokens from EXPERIENCE.md section 6; every text pair checked for 4.5:1. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/AtkinsonHyperlegibleNext-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("../fonts/AtkinsonHyperlegibleMono-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --ink: #1F2328;
  --ink-2: #4A5058;
  --line: #DDD7CC;
  --control: #8A8478;      /* control edges: 3.4:1 on --bg, 3.7:1 on --surface */
  --accent: #2F5D50;
  --on-accent: #FFFFFF;
  --accent-tint: #E3ECE8;  /* selection and pressed states, never a ground */
  --caution: #8A5200;
  --caution-bg: #FBF1E1;
  --focus: #1F6FEB;
  --shadow-float: 0 -8px 24px rgba(31, 35, 40, 0.12);

  --font: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --radius-card: 10px;
  --radius-control: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15171A;
    --surface: #1D2024;
    --ink: #E9E6E0;
    --ink-2: #B5B1AA;
    --line: #33373D;
    --control: #7D828A;
    --accent: #86C2AE;
    --on-accent: #0F1A16;
    --accent-tint: #22302B;
    --caution: #E5AE57;
    --caution-bg: #2B2318;
    --focus: #79B8FF;
    --shadow-float: 0 -8px 24px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15171A;
  --surface: #1D2024;
  --ink: #E9E6E0;
  --ink-2: #B5B1AA;
  --line: #33373D;
  --control: #7D828A;
  --accent: #86C2AE;
  --on-accent: #0F1A16;
  --accent-tint: #22302B;
  --caution: #E5AE57;
  --caution-bg: #2B2318;
  --focus: #79B8FF;
  --shadow-float: 0 -8px 24px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after { box-sizing: border-box; }
button, input, select, textarea { color: inherit; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) transparent; scrollbar-width: thin; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-tint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- The bar: the product's name, and Quick exit, always in view ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 56px; padding: 0 12px 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; letter-spacing: -0.005em; }
.mark svg { width: 22px; height: 22px; color: var(--accent); flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-control);
  font: 600 16px/1.2 var(--font); text-align: center; text-decoration: none;
  cursor: pointer; user-select: none;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--control); }
.btn-block { display: flex; width: 100%; }
.btn-exit { min-height: 40px; padding: 0 14px; background: var(--surface); color: var(--ink); border-color: var(--control); font-weight: 600; }
.btn-exit svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
  .btn-secondary:hover, .btn-exit:hover { border-color: var(--ink-2); }
}
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; opacity: 1; background: var(--surface); color: var(--ink-2); border-color: var(--line); }

/* ---------- Tabs: underline tabs on one rule ---------- */
.tabs { display: flex; gap: 20px; margin: 0 -16px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.tab {
  position: relative; min-height: 44px; padding: 0 2px;
  background: none; border: 0; color: var(--ink-2);
  font: 500 15px/1 var(--font); cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }

/* ---------- Screens ---------- */
main { padding: 0 16px 40px; }
.screen { max-width: 68ch; }
h1 { margin: 24px 0 12px; font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
h2 { margin: 32px 0 8px; font-size: 18px; line-height: 1.3; font-weight: 700; text-wrap: balance; }
p { margin: 0 0 16px; }
.lead { font-size: 17px; }
.muted { color: var(--ink-2); }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
code, .code { font-family: var(--mono); font-size: 0.92em; }

.with-info { display: flex; align-items: flex-start; gap: 8px; }
.with-info > :first-child { flex: 1; margin: 0; }

/* The "i" button: a 20px circle, a 44px hit area. */
.info {
  position: relative; flex: none;
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; margin: -2px -4px 0 0; padding: 0;
  background: none; border: 0; border-radius: 50%;
  color: var(--ink-2); cursor: pointer;
}
.info::before { content: ""; position: absolute; inset: -8px; }
.info svg { width: 20px; height: 20px; }
.info[aria-expanded="true"] { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .info:hover { color: var(--ink); } }

/* ---------- Safety screen ---------- */
.hotline {
  margin: 20px 0 16px; padding: 4px 16px 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
}
.hotline-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 12px 0 4px; font-weight: 600; }
.hotline a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; color: var(--ink); text-decoration: none; font-size: 17px;
  border-top: 1px solid var(--line);
}
.hotline a:first-of-type { border-top: 0; }
.hotline a strong { font-weight: 700; letter-spacing: 0.01em; }
.hotline a svg { width: 18px; height: 18px; color: var(--ink-2); flex: none; }
.hotline .hotline-more { margin: 0; padding: 10px 0 12px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.hotline .hotline-more a { display: inline; min-height: 0; border: 0; font-size: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.hotline .hotline-more a strong { font-weight: 600; }
.keys { display: inline-flex; gap: 4px; }
kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 6px;
  font: 600 14px/1.4 var(--font); text-align: center;
  background: var(--surface); border: 1px solid var(--control); border-radius: 6px;
}
.actions { display: grid; gap: 12px; margin-top: 24px; }

/* ---------- Choose what to check ---------- */
.status-line { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.status-line:first-of-type { border-top: 1px solid var(--line); }
.status-line .text { flex: 1; }
.dot { width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--control); flex: none; }
.dot.on { background: var(--accent); }
.group { margin-top: 24px; }
.group h2 { margin: 0 0 4px; font-size: 16px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row label { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; }
.row input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 0 12px 0 14px; }

.switch {
  position: relative; flex: none; width: 52px; height: 44px; margin: -10px -6px -10px 0;
  background: none; border: 0; cursor: pointer;
}
.switch .track { position: absolute; left: 8px; top: 12px; width: 36px; height: 20px; border-radius: 999px; background: var(--control); transition: background-color 160ms ease; }
.switch .thumb { position: absolute; left: 10px; top: 14px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform 160ms var(--ease-out); }
.switch[aria-checked="true"] .track { background: var(--accent); }
.switch[aria-checked="true"] .thumb { transform: translateX(16px); }

.notice { margin: 16px 0; padding: 12px 14px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); }
.notice.caution { background: var(--caution-bg); border-color: color-mix(in srgb, var(--caution) 35%, transparent); color: var(--ink); }

/* ---------- Scanning ---------- */
.verify-box { margin-top: 16px; }
.verify-box p { margin: 0 0 8px; }
.verify-box .verify-title { font-weight: 600; }
.verify-box .btn { margin-top: 4px; }
.progress-block { margin-top: 20px; padding: 14px 16px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.progress-line { margin: 0 0 10px; font-weight: 600; }
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 300ms var(--ease-out); }
.progress-block .num { margin: 8px 0 0; font-size: 14px; }
.plain-list { margin: 12px 0 0; padding: 0; list-style: none; }
.plain-list > li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.plain-list > li:first-child { border-top: 0; }
.scan-done li { grid-template-columns: 1fr auto; align-items: baseline; gap: 12px; font-size: 15px; }
.scan-done .muted { font-size: 14px; text-align: right; }

/* ---------- Results ---------- */
.count { color: var(--ink-2); font-weight: 500; }
.findings { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.finding { padding: 14px 14px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.finding-head { display: flex; gap: 8px; align-items: flex-start; }
.finding-text { flex: 1; min-width: 0; }
.finding-title { margin: 0; font-weight: 700; line-height: 1.35; }
.finding-label { margin: 4px 0 0; overflow-wrap: anywhere; }
.finding-meta { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.finding-note { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.caution-line { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--caution-bg); color: var(--caution); font-size: 15px; font-weight: 600; }
.caution-line svg { width: 16px; height: 16px; flex: none; }
.answer-q { margin: 12px 0 0; font-size: 15px; font-weight: 600; }
.answer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 6px; border: 1px solid var(--control); border-radius: var(--radius-control); overflow: hidden; }
.answer button { min-height: 44px; padding: 0 6px; border: 0; border-left: 1px solid var(--control); background: var(--surface); color: var(--ink); font: 500 15px/1.1 var(--font); cursor: pointer; transition: background-color 160ms ease; }
.answer button:first-child { border-left: 0; }
.answer button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.finding-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.link-button { min-height: 44px; padding: 0; background: none; border: 0; color: var(--accent); font: 600 15px/1 var(--font); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; cursor: pointer; }
.checked-list { margin-top: 28px; }
.checked-list summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.checked-list ul { margin: 0; padding: 0; list-style: none; }
.checked-list li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.checked-list .muted { font-size: 14px; }
.not-checked .plain-list li span { color: var(--ink-2); }
.guides { margin: 6px 0 0; padding-left: 18px; }
.guides li { margin: 6px 0; }

/* ---------- Plan ---------- */
.plan-q-title { margin: 24px 0 4px; font-size: 18px; }
.question { margin: 16px 0 0; padding: 0; border: 0; }
.question legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.told .told-label { display: block; font-weight: 600; margin-bottom: 4px; }
.told .muted { margin: 0 0 8px; }
.told textarea { display: block; width: 100%; box-sizing: border-box; min-height: 96px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--control); border-radius: var(--radius-control); resize: vertical; }
.told textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.told .told-status { margin: 8px 0 0; color: var(--ink); font-weight: 600; }
.told .told-status:empty { display: none; }
.btn[aria-busy="true"] { cursor: progress; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--control); border-radius: var(--radius-control); overflow: hidden; }
.choice { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px 6px; border-left: 1px solid var(--control); background: var(--surface); text-align: center; font-size: 15px; line-height: 1.2; cursor: pointer; }
.choice:first-child { border-left: 0; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice:has(input:checked) { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.share-line { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; cursor: pointer; }
.share-line input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.plan-summary { padding: 12px 14px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); }
.plan { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.step { padding: 14px 14px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); font-weight: 700; font-size: 15px; flex: none; }
.step-kind { margin: 0; font-weight: 700; }
.kind-change_now { color: var(--accent); }
.kind-wait { color: var(--caution); }
.step p { margin: 0 0 10px; }
.step-title { font-weight: 700; }
.step-list, .how { margin: 0 0 10px; padding-left: 20px; }
.step-list li { margin: 6px 0; }
.step-list li > * { display: block; }
.how li { margin: 4px 0; }
.step .caution-line { margin: 0 0 10px; }
.later summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--accent); }
.source { font-size: 14px; }
.hotline.compact { margin: 0 0 10px; }
.ask { margin-top: 16px; padding: 14px; border-radius: var(--radius-card); background: var(--surface); border: 2px solid var(--accent); }
.ask p { margin: 0 0 10px; font-weight: 600; }
.ask .answer { margin-top: 0; grid-template-columns: repeat(4, 1fr); }
@media print {
  /* Paper is white whatever the screen's theme: without this a dark screen prints pale text on white, or black text
     on dark cards. Every colour token is set to an ink that reads on paper. */
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    color-scheme: light;
    --bg: #FFFFFF; --surface: #FFFFFF; --ink: #000000; --ink-2: #33373D; --line: #999999; --control: #666666;
    --accent: #1F4A3F; --on-accent: #FFFFFF; --accent-tint: #FFFFFF; --caution: #6B4000; --caution-bg: #FFFFFF;
  }
  .bar, .tabs, .actions, .info, .finding-actions, #plan-questions, .ask, .simpler-button { display: none !important; }
  body { background: #fff; color: #000; }
  .step, .plan-summary { break-inside: avoid; border-color: #999; }
  .later { display: block; }
  .later > * { display: block; }
}

/* ---------- Under the hood ---------- */
.kv { margin: 8px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
/* Label over value: the values are phrases, which a right-hand column at panel width would wrap into ragged lines. */
.kv > div { padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.kv > div:first-child { border-top: 0; }
.kv dt { color: var(--ink-2); font-size: 14px; }
.kv dd { margin: 2px 0 0; font-weight: 600; }
.kv dd.sub { margin-top: 2px; color: var(--ink-2); font-size: 14px; font-weight: 400; }
.log { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.log li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 10px 12px; }
.log .meta { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); font-size: 14px; }
.log pre { margin: 6px 0 0; font: 400 13px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.empty { margin: 8px 0 0; padding: 12px 14px; border: 1px dashed var(--control); border-radius: var(--radius-card); color: var(--ink-2); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control); }
.segmented button { min-height: 38px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); font: 500 15px/1 var(--font); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--accent-tint); color: var(--ink); }

/* ---------- The bottom sheet for "i" buttons ---------- */
.scrim { position: fixed; inset: 0; z-index: 20; background: transparent; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  max-height: 70vh; overflow: auto;
  padding: 20px 16px 24px;
  background: var(--surface); color: var(--ink);
  border-top: 1px solid var(--line); border-radius: 14px 14px 0 0;
  box-shadow: var(--shadow-float);
  transform: translateY(0);
  transition: transform 240ms var(--ease-drawer);
}
.sheet[data-state="closed"] { transform: translateY(100%); transition: transform 160ms var(--ease-out); }
.sheet h2 { margin: 0 0 8px; font-size: 18px; }
.sheet p { margin: 0 0 12px; }
.sheet .label { display: block; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.sheet details { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.sheet summary { min-height: 44px; display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--ink-2); font-weight: 600; list-style: none; }
.sheet summary::-webkit-details-marker { display: none; }
.sheet summary::before {
  content: ""; width: 7px; height: 7px; margin-left: 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform 160ms var(--ease-out);
}
.sheet details[open] summary::before { transform: rotate(45deg); }
.sheet .close { position: absolute; top: 8px; right: 8px; }

@media (hover: hover) and (pointer: fine) {
  .answer button:not([aria-pressed="true"]):hover { background: var(--accent-tint); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:active { transform: none; }
}

/* ---------- Locked copy ---------- */
.lock-sheet form { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; }
.field input[type="password"] { min-height: 44px; padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font: 400 16px/1.2 var(--font); }
.field input[type="file"] { font: 400 15px/1.3 var(--font); color: var(--ink); }
.lock-sheet .muted { margin: 0; }
.lock-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--caution-bg); color: var(--caution); font-weight: 600; }

/* ---------- Two voices ---------- */
.voices { margin-top: 16px; padding: 4px 14px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.voices > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.voices h3 { margin: 14px 0 4px; font-size: 16px; }
.voices p { margin: 0 0 8px; }

/* ---------- Plan sections ---------- */
.step h2.step-kind { margin: 0; font-size: 17px; line-height: 1.3; }
.wait-group { margin-top: 14px; }
.wait-group h3 { margin: 0 0 6px; font-size: 15px; color: var(--ink-2); font-weight: 700; }
.code-block { margin: 8px 0 0; padding: 4px 12px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.code-block > p.step-title { margin: 8px 0 0; }
.code-block > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.code-block > summary::-webkit-details-marker { display: none; }
.code-block > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform 160ms var(--ease-out); flex: none; }
.code-block[open] > summary::after { transform: rotate(-135deg); }
.code-block .items { margin: 4px 0 8px; }
.step-list.items li { margin: 2px 0; }
.step-list li > span { display: block; }
@media print { details > *:not(summary) { display: block !important; } .code-block > summary::after { display: none; } }

/* ---------- Break the pages first (try.html only) ---------- */
.break-it { margin: 16px 0 0; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; }
.break-it > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.break-it[open] { padding-bottom: 12px; }
.break-it .question { margin-top: 8px; }
.drift-choices { display: grid; gap: 6px; }
#drift-line { margin-bottom: 12px; }

/* ---------- Two voices, kind by kind ---------- */
.voice-table { margin-top: 12px; }
.voice-row { border-top: 1px solid var(--line); padding: 8px 0; }
.voice-row p { margin: 4px 0; }

/* ---------- The network ledger (Under the hood) ---------- */
#ledger { margin: 12px 0 8px; }
.table-scroll { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th, .ledger td { text-align: left; padding: 6px 8px 6px 0; border-top: 1px solid var(--line); vertical-align: top; }
.ledger th { color: var(--ink-2); font-weight: 600; }
.ledger .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-line { margin: 8px 0 0; font-weight: 600; }

/* ---------- Since your last check ---------- */
.since { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.since h2 { margin: 0; font-size: 17px; }
.since p { margin: 8px 0 0; }
.since-new { display: block; margin-top: 8px; }

/* ---------- A location app on the phone, from a screenshot ---------- */
.phone-shot { margin: 20px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.phone-shot h2 { margin: 0; font-size: 17px; }
.phone-shot p { margin: 8px 0 0; }
.file-button { position: relative; margin-top: 12px; cursor: pointer; }
.file-button:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.file-button.is-disabled { opacity: 0.55; cursor: not-allowed; }
.phone-shot img { display: block; margin: 12px 0 0; width: 195px; max-width: 60%; height: auto; border: 1px solid var(--line); border-radius: 12px; }

/* ---------- Start here, simpler words, linked steps ---------- */
.start-here { margin: 12px 0 16px; padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.start-here h2 { margin: 0 0 6px; font-size: 17px; }
.start-here ol { margin: 0; padding-left: 20px; }
.start-here li { margin: 4px 0; }
.simpler { margin: 8px 0 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }
.simpler p { margin: 4px 0; }
.simpler-button { margin-top: 6px; }
.linked-line { margin-top: 6px; }

/* ---------- Help fix these pages (opt-in layout report) ---------- */
.report-box { margin: 16px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.report-box h2 { margin: 0; font-size: 17px; }
.report-box p { margin: 8px 0; }

/* ---------- The words on each page (a dated record) ---------- */
.page-record .page-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; max-height: 320px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }

/* ---------- Plan end: leaving this computer; the children's devices step ---------- */
.print-note { margin: 4px 0 0; font-size: 15px; }
.leave-steps { margin-top: 4px; }
.kids-check { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.kids-check h3 { margin: 0 0 6px; font-size: 17px; }
.kids-check p { margin: 0 0 8px; }
.findings-record table { width: 100%; border-collapse: collapse; font-size: 13px; }
.findings-record th, .findings-record td { border: 1px solid #999; padding: 4px 6px; text-align: left; vertical-align: top; }
@media print { body.printing-record main > *:not(#findings-record) { display: none !important; } }

/* Ticking off the plan: a record made, a change done. The box is the hit target's left edge; the whole row is the label. */
.tick, .step-list li > .tick { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; align-items: start; min-height: 44px; padding-block: 10px; cursor: pointer; }
.tick-box { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.tick-box:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tick-label { grid-column: 2; }
.tick-words { grid-column: 2; display: block; margin-top: 2px; color: var(--ink-2); font-size: 15px; }
.tick.is-done .tick-label { color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.tick.is-done .tick-words { color: var(--ink-2); }
.step-list.ticks { list-style: none; padding-left: 0; }
.step-list.ticks > li { border-top: 1px solid var(--line); }
.step-list.ticks > li:first-child { border-top: 0; }
.code-block > .tick { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 12px; font-weight: 600; }
.done-line { margin: 12px 0 0; font-weight: 600; color: var(--ink); }

/* Every fold shows that it opens: the same chevron as the plan's cards, before the words (design review, November 25). */
.checked-list > summary, .later > summary, .voices > summary, .break-it > summary { gap: 10px; list-style: none; }
.checked-list > summary::-webkit-details-marker, .later > summary::-webkit-details-marker, .voices > summary::-webkit-details-marker, .break-it > summary::-webkit-details-marker { display: none; }
.checked-list > summary::before, .later > summary::before, .voices > summary::before, .break-it > summary::before {
  content: ""; flex: none; width: 7px; height: 7px; margin: 0 3px 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform 160ms var(--ease-out);
}
.checked-list[open] > summary::before, .later[open] > summary::before, .voices[open] > summary::before, .break-it[open] > summary::before { transform: rotate(45deg); }
@media print { .checked-list > summary::before, .later > summary::before, .voices > summary::before, .break-it > summary::before { display: none; } }

/* Results: what is left to do, said once at the top; the shared caution under a group's heading. */
.todo-line { margin: 16px 0 0; font-weight: 600; }
.group-caution { margin: 6px 0 10px; }
/* "Make my plan", in reach while scrolling a long list. The page's background behind it, so cards never show through. */
.sticky-go { position: sticky; bottom: 0; z-index: 2; margin: 16px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.sticky-go[hidden] { display: none; }
@media print { .sticky-go { display: none; } }

/* "What would they see?": the notice written with this entry's names, set apart from the library's own words. */
.they-see-button { margin: 2px 0 6px; }
.they-see { margin: 6px 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.they-see p { margin: 4px 0; }
