/* Learning Support Planner — site styles.
   Calm, high-contrast, large-target design aimed at WCAG 2.2 AA.
   No external fonts: the system font stack is used on purpose. */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --text: #1b2129;
  --muted: #47515e;
  --border: #b9c0c9;
  --border-strong: #6b7685;
  --accent: #1d5a85;
  --accent-hover: #15486c;
  --accent-text: #ffffff;
  --accent-soft: #e3eef6;
  --focus: #b4480a;
  --info-bg: #e7f0f7;
  --info-border: #2f6a94;
  --warn-bg: #fdf3dc;
  --warn-border: #8a5a00;
  --error-bg: #fbe9e7;
  --error-border: #a3271b;
  --error-text: #8c1f15;
  --demo-bg: #efe9f8;
  --demo-border: #5b3e8f;
  --student-bg: #eaf5ec;
  --student-border: #2f6b3c;
  --suggest-bg: #fff4e5;
  --suggest-border: #9a5300;
  --danger: #a3271b;
  --danger-hover: #861f15;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 40, 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13171c;
    --surface: #1c2229;
    --surface-2: #232b34;
    --text: #eef1f4;
    --muted: #b9c2cc;
    --border: #46515e;
    --border-strong: #8794a3;
    --accent: #8ec5ee;
    --accent-hover: #b3d9f5;
    --accent-text: #0d1a24;
    --accent-soft: #1d3446;
    --focus: #ffb36b;
    --info-bg: #182a38;
    --info-border: #78b4e0;
    --warn-bg: #33280f;
    --warn-border: #e2b450;
    --error-bg: #3a1916;
    --error-border: #f08b7f;
    --error-text: #ffb4aa;
    --demo-bg: #2a2140;
    --demo-border: #b79cec;
    --student-bg: #17301d;
    --student-border: #86cf96;
    --suggest-bg: #36260f;
    --suggest-border: #f0b264;
    --danger: #f08b7f;
    --danger-hover: #ffb4aa;
    --shadow: none;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;          /* 18px */
  line-height: 1.55;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  margin: 1.5em 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.35rem); margin-top: 0.6em; }
h2 { font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.6rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; margin-top: 1.1em; }

p, ul, ol, dl, blockquote, pre { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: 0.3em; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

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

img, svg { max-width: 100%; height: auto; }

blockquote {
  margin: 0.5em 0 1em;
  padding: 0.6em 1em;
  border-left: 4px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
}

pre {
  font-family: var(--mono);
  font-size: 0.95rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  background: var(--surface);
  color: var(--accent);
  padding: 0.7rem 1rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.wrap {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 48em) { .wrap { padding: 0 1.5rem; } }

.prose { max-width: 70ch; }
.lead { font-size: 1.2rem; color: var(--text); max-width: 70ch; }
.small { font-size: 0.95rem; color: var(--muted); }
.block { display: block; }
.eyebrow {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.req { font-weight: 400; color: var(--muted); font-size: 0.95rem; }

/* ---------- Header / navigation ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--accent); }
.brand__mark { width: 32px; height: 32px; }

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
  margin: 0;
  padding: 0;
}
.site-nav li { margin: 0; }
.site-nav a,
.site-nav .link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem;
  border-radius: 8px;
  font-size: 1rem;
}
.site-nav a:hover, .site-nav .link-button:hover { background: var(--accent-soft); }

.inline-form { display: inline; margin: 0; }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.pilot-banner {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted);
}
.pilot-banner p { margin: 0; padding: 0.45rem 0; }
.pilot-banner strong { color: var(--text); }

main { display: block; padding-bottom: 3rem; }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
  padding: 1.5rem 0 2rem;
}
.site-footer p { max-width: 80ch; }

/* ---------- Layout with section steps ---------- */
.layout-steps { display: block; }
@media (min-width: 62em) {
  .layout-steps {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }
  .steps-panel { position: sticky; top: 1rem; }
}
.steps-content { min-width: 0; }

.steps-panel {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.steps-panel__title { font-size: 1rem; margin: 0 0 0.5rem; color: var(--muted); }
.steps, .steps-extra { list-style: none; margin: 0; padding: 0; }
.steps li, .steps-extra li { margin: 0; }
.steps a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
}
.steps a:hover { background: var(--accent-soft); }
.steps__marker {
  flex: 0 0 1.6rem;
  height: 1.6rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}
.steps__item--done .steps__marker { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.steps__item--current a { background: var(--accent-soft); font-weight: 700; }
.steps__item--current .steps__marker { border-color: var(--accent); color: var(--accent); }
.steps-extra { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.steps-extra a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1rem; }

@media (max-width: 61.99em) {
  .steps { display: flex; flex-wrap: wrap; gap: 0.25rem; }
  .steps a { padding-right: 0.75rem; border: 1px solid var(--border); }
  .steps-extra { display: flex; flex-wrap: wrap; gap: 0 1rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.6rem 1.15rem;
  border-radius: 8px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn-secondary { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn-quiet { background: transparent; color: var(--accent); border-color: var(--border); }
.btn-quiet:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
@media (prefers-color-scheme: dark) {
  .btn-danger, .btn-danger:hover { color: #1a0b09; }
}
.btn[disabled], .btn:disabled {
  cursor: not-allowed;
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.25rem 0;
}
.form-buttons {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
@media (max-width: 30em) {
  .form-buttons .btn { flex: 1 1 100%; }
}

/* Hidden default submit button for Enter-key submission (section forms). */
.default-submit {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Notices, badges, cards ---------- */
.notice {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  border-left-width: 6px;
  background: var(--surface);
  max-width: 80ch;
}
.notice > :last-child { margin-bottom: 0; }
.notice h2 { margin-top: 0; font-size: 1.2rem; }
.notice--info { background: var(--info-bg); border-color: var(--info-border); }
.notice--warn, .notice--warning { background: var(--warn-bg); border-color: var(--warn-border); }
.notice--error { background: var(--error-bg); border-color: var(--error-border); }
.notice--success { background: var(--student-bg); border-color: var(--student-border); }
.notice--demo { background: var(--demo-bg); border-color: var(--demo-border); margin-top: 1.25rem; max-width: none; }
.messages { margin-top: 1rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.5rem; }
.badge {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}
.badge--quiet { font-weight: 500; color: var(--muted); border-color: var(--border); }
.badge--student { background: var(--student-bg); border-color: var(--student-border); }
.badge--suggested { background: var(--suggest-bg); border-color: var(--suggest-border); }
.badge--status { background: var(--surface-2); border-style: dashed; }
.badge--discuss_first { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.badge--also_discuss { background: var(--accent-soft); border-color: var(--accent); }
.badge--gather_info { background: var(--surface-2); border-style: dashed; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 0 0 1.25rem;
  box-shadow: var(--shadow);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card--plain { box-shadow: none; background: var(--surface); }
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  margin: 2rem 0;
}
.card-grid .card { margin: 0; }
.card h2 { margin-top: 0; font-size: 1.3rem; }

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

.link-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding: 0;
  margin: 0.75rem 0 0;
}
.link-row li { margin: 0; }
.link-row a { display: inline-flex; align-items: center; min-height: 44px; }

.meta {
  display: grid;
  gap: 0.35rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  margin: 0.75rem 0 1rem;
}
.meta div { min-width: 0; }
.meta dt { font-size: 0.88rem; color: var(--muted); font-weight: 600; }
.meta dd { margin: 0; }

/* ---------- Home ---------- */
.hero {
  padding: 2rem 0 0.5rem;
  max-width: 62rem;
}
.hero h1 { margin-top: 0.3em; }

/* ---------- Questionnaire ---------- */
.section-form { max-width: 52rem; }

.question {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}
fieldset.question { margin-inline: 0; }
.question--student { border-left: 6px solid var(--student-border); }
.question--suggested { border-left: 6px solid var(--suggest-border); }
.question--error { border-color: var(--error-border); border-width: 2px; }

.q-label {
  display: block;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0 0 0.4rem;
  padding: 0;
  max-width: 65ch;
}
legend.q-label { float: left; width: 100%; }
legend.q-label + * { clear: left; }
.q-help, .field-help { color: var(--muted); font-size: 1rem; margin: 0 0 0.6rem; max-width: 65ch; }
.field-help ul { margin: 0.25rem 0 0; }
.q-hint { font-size: 0.95rem; color: var(--muted); margin: 0 0 0.5rem; }
.q-error {
  color: var(--error-text);
  font-weight: 600;
  margin: 0 0 0.6rem;
}
.q-error ul.errorlist { margin: 0; padding: 0; list-style: none; }
.errorlist { color: var(--error-text); font-weight: 600; padding-left: 0; list-style: none; }

.choices {
  display: grid;
  gap: 0.5rem;
  margin: 0.25rem 0 0.5rem;
}
.choices--special {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-strong);
}
.choices--special:not(:has(input)) { display: none; }
.choices-or { margin: 0; font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.choices--inline { grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }

.choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  line-height: 1.35;
}
.choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.choice input {
  flex: 0 0 auto;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  accent-color: var(--accent);
}
.choice:has(input:checked) {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.choice--special { background: var(--surface-2); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

input[type="text"], input[type="password"], input[type="email"], input[type="date"],
input[type="number"], select, textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-radius: 8px;
}
textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--accent);
}
[aria-invalid="true"] { border-color: var(--error-border); }

.field { margin: 0 0 1.1rem; }
.field > label { display: block; font-weight: 650; margin-bottom: 0.3rem; }
.field--checkbox .choice { font-weight: 500; }
.field--error input, .field--error textarea, .field--error select { border-color: var(--error-border); }

.why { margin-top: 0.6rem; }
.why summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
}
.why p { margin: 0.25rem 0 0; color: var(--muted); font-size: 1rem; max-width: 65ch; }

.ai-box { border-left: 6px solid var(--info-border); max-width: 52rem; }
.ai-box h2 { font-size: 1.25rem; }

/* ---------- Review ---------- */
.review-group { margin: 2rem 0; max-width: 56rem; }
.obs-list { list-style: none; padding: 0; }
.obs-card fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.obs-card__label { font-weight: 700; font-size: 1.15rem; padding: 0; margin-bottom: 0.5rem; }
.obs-card--confirmed { border-left: 6px solid var(--student-border); }
.obs-card--edited { border-left: 6px solid var(--accent); }
.obs-card--rejected { border-left: 6px dashed var(--border-strong); }
.obs-card--proposed { border-left: 6px solid var(--suggest-border); }
.obs-quote { font-style: italic; }
.obs-flags { font-size: 1rem; color: var(--muted); }
.reported-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 0 0 0.75rem;
  padding: 0 1rem;
}
.reported-section summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 650;
}
.reported-section[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 0.75rem; }
.answer-list > div { padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.answer-list > div:last-child { border-bottom: 0; }
.answer-list dt { font-weight: 600; }
.answer-list dd { margin: 0.15rem 0 0; }
.missing-list li { margin-bottom: 0.4rem; }

/* ---------- Plan ---------- */
.plan-header { padding-top: 0.5rem; }
.limits-box { margin: 1.5rem 0; max-width: none; }
.limits-box ul { margin-bottom: 0; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.2rem;
  margin: 1.5rem 0;
  max-width: 40rem;
}
.toc h2 { font-size: 1.1rem; margin: 0.25rem 0 0.4rem; }
.toc ol { margin: 0; columns: 2 14rem; column-gap: 2rem; }
.toc li { break-inside: avoid; margin: 0; }
.toc a { display: inline-flex; align-items: center; min-height: 40px; }

.plan-section {
  margin: 2.5rem 0;
  padding-top: 0.5rem;
  border-top: 3px solid var(--border);
  scroll-margin-top: 1rem;
}
.plan-section > h2 { margin-top: 0.75rem; }

.brief-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  margin-bottom: 1.25rem;
}
.brief-grid .card { margin: 0; }
.domain-label { font-weight: 650; }
.prov { color: var(--muted); font-size: 0.92rem; }
.qid {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 0.3rem;
  margin-right: 0.2rem;
  white-space: nowrap;
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.5rem;
  scroll-margin-top: 1rem;
}
.action-card h3 { margin-top: 0.2rem; }
.action-card--discuss_first { border-left-color: var(--accent); }
.action-card--also_discuss { border-left-color: var(--info-border); border-left-style: double; border-left-width: 6px; }
.action-card--gather_info { border-left-style: dashed; }
.action-card blockquote { margin: 0.3rem 0; }
.trace-list { font-size: 1rem; }
.action-details {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-radius: 8px;
}
.action-details dt { font-weight: 650; font-size: 0.95rem; }
.action-details dd { margin: 0 0 0.25rem; }
.action-details dd ul { margin: 0.2rem 0 0; }
.source-list { font-size: 1rem; }
.source-list ul { margin-top: 0.25rem; }
.rule-trace { font-family: var(--font); }
.checklist li { margin-bottom: 0.35rem; }

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 1rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
}
thead th { background: var(--surface-2); font-weight: 650; white-space: nowrap; }
.worksheet td { min-width: 7.5rem; height: 3.25rem; border-left: 1px solid var(--border); }
.worksheet th[scope="row"] { min-width: 12rem; }

.request-form textarea { font-family: var(--mono); font-size: 0.98rem; min-height: 22rem; }
.request-form label { display: block; font-weight: 650; margin-bottom: 0.3rem; }
.request-draft {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.copy-status { min-height: 1.5em; color: var(--muted); }

.review-records { list-style: none; padding: 0; }
.team-review { background: var(--surface-2); }

/* ---------- Sources page ---------- */
.source-card .meta { grid-template-columns: 1fr; }
.passages { list-style: none; padding: 0; }
.passages li { margin-bottom: 1rem; }
.passage-locator { margin-bottom: 0.2rem; }
.url-text { display: block; font-size: 0.9rem; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- Cases ---------- */
.case-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.case-card { margin: 0; }
.case-card__title { margin: 0 0 0.25rem; font-size: 1.3rem; }
.empty-state { max-width: 44rem; margin-top: 1.5rem; }

/* ---------- Auth ---------- */
.auth-box { max-width: 34rem; margin: 2rem auto; }
.auth-box h1 { margin-top: 0; }

/* ---------- Packet (print-first) ---------- */
.packet { max-width: 60rem; margin: 0 auto; }
.packet-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.25rem 0;
}
.packet-controls .small { flex-basis: 100%; margin: 0; }
.packet-header {
  border-bottom: 3px solid var(--text);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}
.packet-header h1 { margin-top: 0.25em; }
.packet-demo, .packet-note {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
}
.packet-section { margin: 2rem 0; }
.packet-section > h2 { border-bottom: 1px solid var(--border-strong); padding-bottom: 0.25rem; }
.packet-action { margin: 0 0 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.packet-action h3 { margin-top: 0.5rem; }
.answer-list--compact > div { padding: 0.2rem 0; }
.source-register li { margin-bottom: 0.6rem; }
.source-register a { overflow-wrap: anywhere; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .choice, .steps a, .site-nav a { transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
}

/* ---------- Print ---------- */
@media print {
  :root {
    --bg: #fff; --surface: #fff; --surface-2: #fff; --text: #000; --muted: #222;
    --border: #777; --border-strong: #333; --accent: #000; --accent-soft: #fff;
  }
  @page { margin: 1.6cm 1.4cm; }
  html { font-size: 11pt; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.4; }
  .site-header, .pilot-banner, .site-footer, .skip-link, .steps-panel,
  .no-print, .btn, .button-row, .toc, .link-row, .messages, .default-submit,
  form button, .copy-status { display: none !important; }
  .layout-steps { display: block; }
  .wrap { max-width: none; padding: 0; }
  main { padding: 0; }
  a { color: #000; text-decoration: underline; }
  .source-list a[href^="http"]::after,
  .source-card a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; overflow-wrap: anywhere; }
  .card, .action-card, .notice, .question, .table-scroll, .reported-section, .toc {
    box-shadow: none;
    background: #fff;
    border-color: #555;
  }
  .table-scroll { overflow: visible; border: 0; }
  .badge { border-color: #333; background: #fff; color: #000; }
  .badge--discuss_first { background: #fff; color: #000; border-width: 2px; }
  details { display: block; }
  details > summary { list-style: none; }
  details > summary::-webkit-details-marker { display: none; }
  details:not([open]) > *:not(summary) { display: block; }
  h2, h3, h4 { break-after: avoid; page-break-after: avoid; }
  .action-card, .packet-action, tr, blockquote, .card { break-inside: avoid; page-break-inside: avoid; }
  .plan-section, .packet-section { break-before: page; page-break-before: always; border-top: 0; margin-top: 0; }
  .plan-section#brief, .packet-brief { break-before: auto; page-break-before: auto; }
  .packet-header { border-bottom: 2px solid #000; }
  table { font-size: 9.5pt; }
  .worksheet td { height: 1.2cm; border: 1px solid #555; }
  .worksheet th { border: 1px solid #555; }
  textarea { border: 1px solid #555; min-height: 0; }
  .request-draft { border: 1px solid #555; font-size: 9.5pt; }
}
