/* Site styles. Colours come from brand.css (generated from config.json). */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

:root {
  --font-sans: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --gap: 1rem;
  --maxw: 68rem;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 6px 18px rgb(0 0 0 / 0.06);
  --book: var(--primary);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}

[data-book="b1"] { --book: var(--b1); }
[data-book="b2"] { --book: var(--b2); }
[data-book="b3"] { --book: var(--b3); }
[data-book="b4"] { --book: var(--b4); }

h1, h2, h3, h4 { line-height: 1.2; margin: 1.4em 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem); margin-top: 0.6em; }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
small, .small { font-size: 0.9rem; }
.muted { color: var(--muted); }
code, kbd { font-family: var(--font-mono); font-size: 0.92em; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.3em; background: var(--surface); }
hr { border: 0; border-top: 1px solid var(--hairline); margin: 2rem 0; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 100;
  background: var(--surface); color: var(--text); padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  border: 2px solid var(--focus);
}
.skip:focus { top: 0.5rem; }

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
main { display: block; padding-bottom: 3rem; min-height: 60vh; }
main:focus { outline: none; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap { display: flex; align-items: center; gap: 0.75rem; min-height: 3.5rem; flex-wrap: wrap; }
.brand-link { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--text); font-weight: 700; padding: 0.3rem 0; margin-right: auto; }
.brand-link svg { width: 2.4rem; height: 1.2rem; flex: none; }
.brand-link span { font-size: 1.02rem; letter-spacing: 0.01em; }
.header-actions { display: flex; gap: 0.4rem; align-items: center; }
.site-nav { width: 100%; display: none; padding-bottom: 0.75rem; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.25rem; }
.site-nav a { display: block; padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--surface-2); font-weight: 700; box-shadow: inset 3px 0 0 var(--primary); }
@media (min-width: 60rem) {
  .menu-toggle { display: none !important; }
  .site-nav { display: block; width: auto; padding: 0; }
  .site-nav ul { display: flex; flex-wrap: wrap; }
  .site-nav a { padding: 0.45rem 0.6rem; font-size: 0.95rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--primary); }
  .site-header .wrap { flex-wrap: nowrap; }
  .brand-link { margin-right: 1rem; }
  .header-actions { order: 3; margin-left: auto; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); background: var(--surface); padding: 2rem 0 2.5rem; font-size: 0.95rem; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-footer a { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 2.75rem; min-width: 2.75rem; padding: 0.55rem 1.1rem;
  font: inherit; font-weight: 650; line-height: 1.2; text-decoration: none; cursor: pointer;
  border-radius: 999px; border: 2px solid var(--primary);
  background: var(--primary); color: var(--primary-ink);
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--primary); }
.btn.quiet { background: transparent; color: var(--text); border-color: var(--border); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.small { min-height: 2.25rem; padding: 0.3rem 0.8rem; font-size: 0.93rem; }
.btn.icon { padding: 0.4rem; border-radius: 50%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 1.2em; height: 1.2em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 1rem 0; }

/* Forms */
label { font-weight: 600; }
.field { margin: 0 0 1rem; }
.field label, .field .label { display: block; margin-bottom: 0.35rem; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.93rem; }
input[type="text"], input[type="number"], select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem; width: 100%; max-width: 100%;
}
textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
select { min-height: 2.75rem; }
input[type="checkbox"], input[type="radio"] { width: 1.25rem; height: 1.25rem; accent-color: var(--primary); vertical-align: middle; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; padding: 0.35rem 0; }
.check input { margin-top: 0.15rem; flex: none; }
fieldset { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 0.75rem 1rem 1rem; margin: 0 0 1rem; }
legend { font-weight: 700; padding: 0 0.35rem; }

/* Cards and layout */
.grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 40rem) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) { .grid.three { grid-template-columns: 1fr 1fr 1fr; } .grid.four { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 40rem) and (max-width: 59.99rem) { .grid.four { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 1.1rem 1.15rem; box-shadow: var(--shadow); position: relative;
}
.card h2, .card h3 { margin-top: 0.1em; }
.card.book { border-top: 6px solid var(--book); }
.card .kicker { color: var(--book); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.3rem; }
.card a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card:has(a.stretch:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.card a.stretch:focus-visible { outline: none; }
.panel { background: var(--surface-2); border-radius: var(--radius); padding: 1rem 1.15rem; margin: 1rem 0; border-left: 5px solid var(--book); }
.panel.note { border-left-color: var(--accent); }
.panel.privacy { border-left-color: var(--ok); }
.panel > :last-child { margin-bottom: 0; }

.pill { display: inline-block; font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 0.12rem 0.6rem; background: var(--surface-2); color: var(--text); border: 1px solid var(--hairline); }
.pill.seed { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0.4rem 0; }

.hero { padding: 2rem 0 1rem; }
.hero .lead { font-size: 1.18rem; max-width: 42rem; color: var(--muted); }
.hero-path { width: 100%; max-width: 30rem; height: auto; display: block; margin: 0.5rem 0 0.25rem; }

.list-plain { list-style: none; padding: 0; margin: 0; }
.list-links li { border-bottom: 1px solid var(--hairline); }
.list-links a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0.2rem; text-decoration: none; color: var(--text); }
.list-links a:hover strong { text-decoration: underline; }

.breadcrumb { font-size: 0.93rem; margin: 1rem 0 0; color: var(--muted); }
.breadcrumb a { color: var(--muted); }

/* Timer */
.timer-shell { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); text-align: center; }
.phase-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; color: var(--book); margin: 0; }
.clock { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: clamp(3rem, 2rem + 6vw, 5.5rem); font-weight: 700; line-height: 1.05; margin: 0.25rem 0; }
.clock.warn { color: var(--warn); }
.clock.untimed { font-size: clamp(1.6rem, 1.3rem + 2vw, 2.4rem); }
.ring { width: 100%; height: 0.6rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 0.5rem 0 0.75rem; }
.ring > span { display: block; height: 100%; width: 0; background: var(--book); border-radius: 999px; transition: width 0.4s linear; }
.flash { animation: flash 0.9s ease 2; }
@keyframes flash { 50% { background: var(--accent); color: var(--accent-ink); } }

.prompt-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--hairline); border-top: 6px solid var(--book); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.prompt-card h2 { margin-top: 0; }
.prompt-card .meta { color: var(--muted); font-size: 0.93rem; }

.steps { display: flex; gap: 0.35rem; list-style: none; padding: 0; margin: 0.5rem 0 1rem; flex-wrap: wrap; }
.steps li { flex: 1 1 0; min-width: 2rem; height: 0.45rem; background: var(--surface-2); border-radius: 999px; }
.steps li.done { background: var(--book); }
.steps li.now { background: var(--accent); }

/* Rubric */
.rubric-row { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 0.8rem 0.9rem 0.9rem; margin: 0 0 0.8rem; background: var(--surface); }
.rubric-row legend { font-size: 1.02rem; }
.anchors { display: grid; gap: 0.45rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) { .anchors { grid-template-columns: repeat(4, 1fr); } }
.anchor { position: relative; }
.anchor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.anchor label { display: block; height: 100%; font-weight: 400; border: 2px solid var(--hairline); border-radius: var(--radius-sm); padding: 0.55rem 0.65rem; cursor: pointer; background: var(--surface); font-size: 0.95rem; }
.anchor label strong { display: block; font-size: 0.85rem; color: var(--muted); }
.anchor input:checked + label { border-color: var(--book); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--book); }
.anchor input:checked + label strong { color: var(--book); }
.anchor input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Bars (dashboard, debrief) */
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr 3.2rem; gap: 0.6rem; align-items: center; margin: 0.4rem 0; }
.bar { height: 0.9rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--hairline); }
.bar > span { display: block; height: 100%; background: var(--book); }
.bars .val { font-variant-numeric: tabular-nums; text-align: right; font-weight: 700; }

/* Statement checker */
.counter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; font-size: 0.93rem; margin-top: 0.35rem; }
.counter .num { font-variant-numeric: tabular-nums; font-weight: 700; }
.status-ok { color: var(--ok); }
.status-warn { color: var(--warn); }
.status-bad { color: var(--bad); }
.meter { height: 0.7rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--hairline); }
.meter > span { display: block; height: 100%; background: var(--ok); }
.meter.over > span { background: var(--bad); }
.findings li { margin-bottom: 0.5rem; }
mark { background: var(--accent); color: var(--accent-ink); border-radius: 3px; padding: 0 0.15em; }
.sticky-total { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--hairline); padding: 0.6rem 0; z-index: 5; }

/* Flashcards */
.flashcard { min-height: 14rem; display: flex; flex-direction: column; justify-content: center; text-align: center; font-size: 1.2rem; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--hairline); border-top: 6px solid var(--book); padding: 1.5rem 1.25rem; box-shadow: var(--shadow); }
.flashcard .side { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin-bottom: 0.75rem; }
.flashcard .answer { border-top: 1px dashed var(--border); margin-top: 1rem; padding-top: 1rem; font-size: 1.08rem; }
.boxes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; text-align: center; font-size: 0.85rem; }
.boxes div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 0.4rem 0.2rem; }
.boxes strong { display: block; font-size: 1.15rem; }

/* Choices (quiz, ethics) */
.choices { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: grid; gap: 0.6rem; }
.choice { width: 100%; text-align: left; justify-content: flex-start; border-radius: var(--radius-sm); background: var(--surface); color: var(--text); border: 2px solid var(--border); font-weight: 500; }
.choice:hover { border-color: var(--primary); filter: none; }
.choice.correct { border-color: var(--ok); background: var(--surface-2); }
.choice.wrong { border-color: var(--bad); }
.choice[disabled] { opacity: 1; cursor: default; }
.choice .mark { margin-left: auto; font-weight: 700; padding-left: 0.5rem; }
.feedback { border-radius: var(--radius); padding: 0.9rem 1rem; margin: 0.75rem 0; background: var(--surface-2); border-left: 5px solid var(--primary); }
.feedback.good { border-left-color: var(--ok); }
.feedback.mixed { border-left-color: var(--warn); }
.feedback.poor { border-left-color: var(--bad); }
.principle { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--book); color: var(--surface); margin-right: 0.25rem; }
.path-trail { list-style: none; padding: 0; counter-reset: step; }
.path-trail li { position: relative; padding: 0 0 1rem 2.2rem; counter-increment: step; }
.path-trail li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--book); color: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }

/* Peer cards */
.peer-card { background: var(--surface); border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: 1rem 0; }
.peer-card h3 { margin-top: 0; }
.cover-screen { text-align: center; padding: 2rem 1rem; background: var(--surface-2); border-radius: var(--radius); }
.tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; border-bottom: 2px solid var(--hairline); margin: 1rem 0; }
.tabs button { font: inherit; background: none; border: 0; border-bottom: 3px solid transparent; padding: 0.6rem 0.9rem; min-height: 2.75rem; cursor: pointer; color: var(--muted); font-weight: 650; margin-bottom: -2px; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--book); }

/* Recorder */
.media-box { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; max-height: 60vh; display: grid; place-items: center; color: #ddd; }
.media-box video { width: 100%; height: 100%; object-fit: contain; }
.rec-dot { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--bad); margin-right: 0.35rem; animation: pulse 1.2s ease infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.take { display: grid; gap: 0.5rem; padding: 0.8rem 0; border-bottom: 1px solid var(--hairline); }
.take audio, .take video { width: 100%; max-height: 50vh; }

/* Toggle switch */
.switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; -webkit-appearance: none; width: 2.9rem; height: 1.6rem; border-radius: 999px; background: var(--border); position: relative; margin: 0; flex: none; cursor: pointer; transition: background 0.15s; }
.switch input::after { content: ""; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.2rem; height: 1.2rem; background: var(--surface); border-radius: 50%; transition: transform 0.15s; }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(1.3rem); }

.badges { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; }
.badges li { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 0.6rem 0.8rem; background: var(--surface); min-width: 9rem; }
.badges li.locked { border-style: dashed; background: transparent; }
.badges li.locked .b-name::after { content: " (not yet)"; font-weight: 400; color: var(--muted); }
.badges .b-name { font-weight: 700; display: block; }

.toast { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 0.7rem 1.1rem; border-radius: 999px; z-index: 50; max-width: calc(100% - 32px); box-shadow: var(--shadow); }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.5rem 0.55rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th { background: var(--primary); color: var(--primary-ink); }
.table-scroll { overflow-x: auto; }

.offline-banner { background: var(--accent); color: var(--accent-ink); text-align: center; padding: 0.35rem 1rem; font-size: 0.92rem; font-weight: 600; }

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

@media print {
  .site-header, .site-footer, .no-print, .btn-row, .skip, .tabs { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .peer-card, .card, .prompt-card, .rubric-row { box-shadow: none; break-inside: avoid; border-color: #555; }
  .print-break { break-before: page; }
  [role="tabpanel"], .breadcrumb { display: none !important; }
  [hidden].print-show { display: block !important; }
  .print-show { display: block !important; }
  a { color: #000; }
}

/* Headings that receive focus from script (to move screen readers to new content) do not need a ring. */
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus, h3[tabindex="-1"]:focus { outline: none; }

@media (max-width: 29.99rem) {
  #theme-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #theme-toggle { padding: 0.3rem 0.55rem; }
  .brand-link span { font-size: 0.95rem; }
  .site-header .wrap { gap: 0.4rem; }
}
.btn kbd { background: transparent; color: inherit; border-color: currentColor; }
html { scroll-padding-top: 5rem; }
.hero > .pill:first-child { background: var(--book); color: var(--surface); border-color: transparent; }
body[data-hub] .hero { border-bottom: 4px solid var(--book); padding-bottom: 1.25rem; }

/* Book 1 content (added 13 October 2026) */
.label-inline { display: inline-block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--book); margin-right: 0.35rem; }
.timing-bar { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; font-size: 0.93rem; background: var(--surface-2); border-radius: var(--radius-sm); padding: 0.45rem 0.7rem; }
.timing-bar strong { color: var(--book); }
.exhibit { margin: 1rem 0; }
.exhibit caption { text-align: left; font-weight: 700; font-size: 0.93rem; padding: 0 0 0.35rem; caption-side: top; }
.exhibit tbody th { background: var(--surface-2); color: var(--text); font-weight: 600; }
.exhibit-card { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; }
.exhibit-card ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.exhibit-label { margin: 0 0 0.25rem; }
.exhibit-title { margin: 0 0 0.25rem; }
.write-in { display: inline-block; min-width: 3rem; border-bottom: 1px solid var(--border); height: 1.1em; }
.ladder { padding-left: 1.4rem; }
.ladder li { margin-bottom: 0.35rem; }
.curveball { border-left: 4px solid var(--accent); padding-left: 0.7rem; }
.follow-ups { border-top: 1px dashed var(--border); margin-top: 1rem; padding-top: 0.5rem; }
.unit-block { border-bottom: 1px solid var(--hairline); padding: 0.6rem 0; }
.unit-block summary { cursor: pointer; padding: 0.3rem 0; }
.unit-stations li { padding: 0.2rem 0; }
.pill.soon { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.dated { color: var(--muted); border-top: 1px solid var(--hairline); margin-top: 0.6rem; padding-top: 0.4rem; }
.flashcard .answer-text { white-space: pre-line; text-align: left; }
.dated-box ul { padding-left: 1.2rem; }
.register-item { margin: 0.6rem 0; }
.register-item summary, details.card summary { cursor: pointer; }
.link-list { padding-left: 1.2rem; }
.link-list li { margin-bottom: 0.45rem; overflow-wrap: anywhere; }
.cal-lines { padding-left: 1.4rem; }
.cal-line { margin-bottom: 1rem; }
.cal-line p { margin-bottom: 0.4rem; }
.cal-pick { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: center; }
.cal-pick select { width: auto; min-width: 9rem; }
.pair-grid { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) { .pair-grid { grid-template-columns: 1fr 1fr; } }
.pair-card { border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 0.75rem 0.9rem; background: var(--surface); break-inside: avoid; }
.pair-card h3 { margin: 0.1rem 0 0.4rem; font-size: 1.05rem; }
.pair-card p { margin: 0 0 0.45rem; font-size: 0.95rem; }
.pair-card .kicker { color: var(--book); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0; }
.pair-card.rp { border-color: var(--book); }
.card-ladder { font-size: 0.9rem !important; }
.print-only { display: none; }
.form-table { margin: 0.75rem 0 1rem; }
.form-table caption { text-align: left; font-size: 0.9rem; font-weight: 600; padding-bottom: 0.3rem; caption-side: top; }
.form-table td { min-width: 2.2rem; height: 2.1rem; border: 1px solid var(--hairline); }
.form-table th { border: 1px solid var(--hairline); }
.form-table tbody th { background: var(--surface-2); color: var(--text); font-weight: 600; }
.form-table .wide { min-width: 9rem; }
.form-table tr.tall td { height: 3.4rem; }
.form-table.compact td { height: 1.8rem; }
.tpl { border-top: 1px solid var(--hairline); margin-top: 1.5rem; }
.room-plan { padding-left: 1.4rem; }
.room-plan li.done { color: var(--muted); text-decoration: line-through; }
.room-plan li.now { font-weight: 700; }
.room-jobs { font-size: 1.05rem; max-width: 40rem; margin: 0.5rem auto; }
.tz-out { font-weight: 700; margin: 0.3rem 0 0; }
tr.overdue td:first-child { border-left: 4px solid var(--warn); }
.seven li { padding: 0.2rem 0; }
#av-meter { display: inline-block; width: 12rem; max-width: 60%; vertical-align: middle; }
@media print {
  .print-only { display: block !important; }
  .no-print { display: none !important; }
  .pair-grid { grid-template-columns: 1fr 1fr; }
  .pair-card { border: 1.5pt dashed #555; }
  .card-sheet h2 { margin-top: 0; }
  .form-table td, .form-table th { border: 1px solid #555 !important; }
  .form-table th { background: #eee !important; color: #000 !important; }
  .sheet-pair .sheet-block + .sheet-block { margin-top: 1.2rem; }
  [data-printing] .tpl:not(.printing) { display: none !important; }
  [data-printing] > :not(.tpl):not(.print-only) { display: none !important; }
  #app:not([data-printing]) .tpl + .tpl { break-before: page; }
  .tpl { border-top: 0; margin-top: 0; }
  details { display: block; }
  details > summary { list-style: none; }
  th { background: #eee !important; color: #000 !important; }
  .timing-bar, .exhibit tbody th { background: #f2f2f2 !important; }
}
@media screen { .tpl, #ss-out, #log-out, #plan-out, #tracker-out { overflow-x: auto; max-width: 100%; } }
/* Book 2 printable lines (templates, countdown, workshop) */
.tpl-lines { margin: 0.75rem 0 1rem; }
.tpl-lines .rule-line { display: block; width: 100%; height: 1.8rem; margin: 0; border-bottom: 1px solid var(--border); }
