/* AccessTrip walkthrough for screen-reader review.
   Tokens from homework5/prototype/tokens.json (light and dark). */

:root {
  color-scheme: light dark;
  --bg: #FFFAEE;
  --surface: #F9F1E2;
  --surface-raised: #FFFDF9;
  --border: #DDD3C5;
  --border-strong: #8C7D72;
  --text: #2A1F19;
  --text-muted: #665750;
  --accent: #BE4935;
  --accent-hover: #AE3F2C;
  --accent-press: #9A3322;
  --on-accent: #FFFFFF;
  --accent-tint: #FDE8DE;
  --on-accent-tint: #822D1F;
  --focus: #194CB1;
  --ill-coral-deep: #BD4238;
  --ill-coral: #EA6D56;
  --ill-coral-pink: #EE939B;
  --ill-coral-peach: #F8B793;
  --ill-sand: #EDDCB9;
  --ill-sea: #8AC4C3;
  --ill-graphite: #463A34;
  --link: var(--accent-hover);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgb(42 31 25 / 0.06);
  --shadow-sm: 0 1px 2px rgb(42 31 25 / 0.06), 0 4px 14px rgb(42 31 25 / 0.06);
  --shadow-primary: 0 2px 10px rgb(190 73 53 / 0.28);

  /* No web font: the pages make no network requests. Fraunces is used only
     if it is installed on the reader's device. */
  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: -apple-system, "SF Pro", system-ui, sans-serif;
  --measure: 38rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18130E;
    --surface: #251E18;
    --surface-raised: #2D251F;
    --border: #4B4038;
    --border-strong: #87776D;
    --text: #F3EEE4;
    --text-muted: #BDB2A7;
    --accent: #FBA587;
    --accent-hover: #FCBDA5;
    --accent-press: #EF9275;
    --on-accent: #18130E;
    --accent-tint: #41261D;
    --on-accent-tint: #FDCBB5;
    --focus: #9BBEFF;
    --ill-coral-deep: #D15D51;
    --ill-coral: #EF816B;
    --ill-coral-pink: #E39096;
    --ill-coral-peach: #E2A989;
    --ill-sand: #B3A381;
    --ill-sea: #6BA4A4;
    --ill-graphite: #E0D6CA;
    --shadow-xs: none;
    --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.4);
    --shadow-primary: none;
  }
}

/* ---------- Base ---------- */

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

/* The hidden attribute always wins over component display rules. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

h1, h2, h3 { line-height: 1.2; margin: 0; hyphens: auto; }

h1, h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-optical-sizing: auto;
}

h1 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.375rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.0625rem; font-weight: 650; }

p, ul, ol { margin: 0; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 650; }

.glyph { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }

/* Focus: 2px focus color, 2px offset, on every interactive element. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
/* Text fields show the ring whenever they have focus, including when the
   page moves focus into them after a click. */
textarea:focus, input[type="text"]:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Programmatic focus targets (headings, notes) are not controls. */
[tabindex="-1"]:focus { outline: none; }

/* Visually hidden, still read by screen readers. */
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 650;
  border-radius: var(--radius-md);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------- Header and step navigation ---------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 3rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
}
.brand:hover .brand-text { text-decoration: underline; }
.brand-mark { display: inline-flex; width: 2.5rem; height: 2.5rem; margin-left: -0.375rem; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-sub {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.steps-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
}
.steps-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-raised);
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.steps-nav a:hover { border-color: var(--text); }
.steps-nav a[aria-current="page"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* ---------- Page intro ---------- */

main { display: block; padding: 1.75rem 0 2.5rem; }
main:focus { outline: none; }

.page-intro {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.page-intro-text { flex: 1; min-width: 0; }
.h1-step {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}
.lede { margin-top: 0.75rem; font-size: 1.125rem; }
.walk-control { margin-top: 1rem; }

/* Decorative art: one piece per page, hidden from assistive tech. */
.art { flex-shrink: 0; }
.art svg { display: block; width: 100%; height: auto; }
.page-intro .art { width: 6.5rem; margin-top: 0.5rem; }
.page-intro--index .art { width: 11rem; }

.art [stroke="#463A34"] { stroke: var(--ill-graphite); }
.art [stroke="#BD4238"] { stroke: var(--ill-coral-deep); }
.art [fill="#BD4238"] { fill: var(--ill-coral-deep); }
.art [stroke="#EA6D56"] { stroke: var(--ill-coral); }
.art [stroke="#EE939B"] { stroke: var(--ill-coral-pink); }
.art [stroke="#F8B793"] { stroke: var(--ill-coral-peach); }
.art [stroke="#EDDCB9"] { stroke: var(--ill-sand); }
.art [stroke="#8AC4C3"] { stroke: var(--ill-sea); }

@media (max-width: 30rem) {
  .page-intro { flex-direction: column; gap: 0.25rem; }
  .page-intro .art { width: 3.5rem; order: -1; margin-top: 0; }
  .page-intro--index .art { width: 9rem; }
}

/* ---------- Index ---------- */

main section { margin-top: 2rem; }
main section > h2 { margin-bottom: 0.75rem; }
.wrap > p + p { margin-top: 1rem; }

.plain-list { padding-left: 1.25rem; }
.plain-list li + li { margin-top: 0.5rem; }

.step-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.step-list li {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-xs);
}
.step-list a { font-weight: 650; display: inline-block; padding: 0.25rem 0; }
.step-list p { color: var(--text-muted); font-size: 0.9375rem; }

.changes-list { padding-left: 1.25rem; }
.changes-list li + li { margin-top: 0.75rem; }

/* ---------- The app screen ---------- */

.screen {
  margin-top: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
main .screen { margin-top: 0; }

.screen-tag {
  align-self: flex-start;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.125rem 0.5rem;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.screen > .eyebrow { margin-bottom: -0.75rem; }

.screen-title { font-size: clamp(1.75rem, 1.5rem + 1vw, 2rem); }

.muted { color: var(--text-muted); font-size: 0.9375rem; }

.card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}
.hero { display: flex; flex-direction: column; gap: 0.75rem; }
.hero-title { font-size: 1.0625rem; }
.card-subtitle { margin-top: 0.5rem; }

.support { color: var(--text-muted); }
.support--icon, .pin-note, .pinned {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.support--icon .glyph, .pin-note .glyph, .pinned .glyph { margin-top: 0.125rem; }

.fact { font-size: 1.75rem; font-weight: 650; line-height: 1.2; }
.fact--xl { font-size: 2.5rem; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.fact--icon { display: flex; gap: 0.5rem; align-items: center; }
.fact--icon .glyph { width: 1.75rem; height: 1.75rem; color: var(--text); }
.fact-label { color: var(--text-muted); font-size: 0.9375rem; font-weight: 600; margin-bottom: -0.5rem; }

.tile {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.75rem;
}
.tile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  border: 1.5px solid var(--border-strong);
}
.tile-link:hover { border-color: var(--text); }
.tile-link:hover .tile-body { text-decoration: underline; }
.tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.tile-link > .glyph { color: var(--text-muted); }
.tile-body { display: block; }
.tile-more { color: var(--link); font-weight: 650; text-decoration: underline; text-underline-offset: 0.15em; }
.btn.btn-inline { width: auto; align-self: flex-start; }
.screen--next { margin-top: 1.5rem; }
main .screen--next { margin-top: 1.5rem; }
.inline-details > summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--link);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}
.inline-details > p { font-size: 0.9375rem; }
.reports { list-style: none; display: flex; flex-direction: column; }
.reports > li { padding: 0.625rem 0; }
.reports > li + li { border-top: 1px solid var(--border); }
.reports > li:first-child { padding-top: 0; }
.reports > li:last-child { padding-bottom: 0; }
.tile-label {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Pinned access mode: top of every AI surface. */
.pinned {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
}
.pinned-label { font-weight: 650; margin-right: 0.25rem; }
.pinned-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.pinned-note { color: var(--text-muted); }
.pinned .btn-link { min-height: 2.75rem; }

.pin-note {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
}

/* Badges: shape and words carry the status, not hue alone. */
.badge {
  align-self: flex-start;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 650;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.625rem;
}
.badge .glyph { width: 1.125rem; height: 1.125rem; }
.badge-ink { background: var(--text); color: var(--bg); }
.badge-attention {
  background: var(--accent-tint);
  color: var(--on-accent-tint);
  border: 1.5px solid var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-primary:active { background: var(--accent-press); }
.btn-secondary {
  background: var(--surface-raised);
  color: var(--text);
  border-color: var(--text);
}
.btn-secondary:hover { background: var(--surface); }
.btn-small {
  width: auto;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  background: var(--surface-raised);
  color: var(--text);
  border-color: var(--text);
  font-size: 0.9375rem;
}
.btn-small[aria-pressed="true"] { background: var(--text); color: var(--bg); }

.btn-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.25rem 0;
  background: none;
  border: 0;
  color: var(--link);
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.toolbar { display: flex; flex-direction: column; gap: 0.5rem; }
.toolbar--top { margin-top: -0.25rem; }

.actions { display: flex; flex-direction: column; gap: 0.5rem; }

.screen-status:not(:empty) {
  border-left: 4px solid var(--text);
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.walk-note {
  font-size: 0.9375rem;
  border-left: 3px dashed var(--border-strong);
  padding-left: 0.75rem;
  color: var(--text-muted);
}

/* ---------- Lists inside the screen ---------- */

.list-group {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.list-group > * + * { border-top: 1px solid var(--border); }

.row, .row-details > summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.row--static { cursor: default; }
.list-group > :first-child .row, .list-group > .row:first-child,
.list-group > :first-child > summary { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.list-group > :last-child .row, .list-group > .row:last-child,
.list-group > :last-child:not([open]) > summary { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.list-group > :only-child .row, .list-group > :only-child:not([open]) > summary { border-radius: var(--radius-lg); }
button.row:hover, a.row:hover, .row-details > summary:hover { background: var(--surface); }

.row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  flex-shrink: 0;
}
.row-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.row-label { font-weight: 650; flex: 1; }
.row-desc { color: var(--text-muted); font-size: 0.9375rem; }
.row > .glyph:last-child, .row-details > summary > .glyph:last-child { color: var(--text-muted); }

.row-details > summary { list-style: none; }
.row-details > summary::-webkit-details-marker { display: none; }
.row-details[open] > summary > .glyph:last-child { transform: rotate(90deg); }
.details-body { padding: 0 1rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.details-body ul { padding-left: 1.25rem; }
.details-body li + li { margin-top: 0.375rem; }
.details-lead { font-weight: 650; }

/* Switch rows (step 1) */
.switch-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.switch-group legend {
  padding: 0 0 0.375rem;
  font-weight: 650;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.switch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0 1rem;
}
.switch-text { flex: 1; display: flex; flex-direction: column; padding: 0.5rem 0; }
.switch-label { flex: 1; padding: 0.875rem 0; cursor: pointer; }
.switch-text .switch-label { padding: 0; }
.switch-row .row-label { font-weight: 500; }

.sw-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.sw-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.sw {
  position: relative;
  width: 52px;
  height: 32px;
  border-radius: 16px;
  border: 2px solid var(--border-strong);
  background: var(--surface-raised);
  transition: background-color 0.15s ease;
}
.sw::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: transform 0.15s ease;
}
.sw::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 30px;
  width: 6px;
  height: 11px;
  border: solid var(--text);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  opacity: 0;
}
.sw-input:checked ~ .sw { background: var(--text); border-color: var(--text); }
.sw-input:checked ~ .sw::before { transform: translateX(20px); background: var(--bg); }
.sw-input:checked ~ .sw::after { opacity: 1; }
.sw-input:focus-visible ~ .sw { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Disabled (design-system-4): solid muted track at reduced opacity, never
   dashed. The row text and the "Off" word keep full contrast. */
.sw-input[aria-disabled="true"] { cursor: not-allowed; }
.sw-input[aria-disabled="true"] ~ .sw { opacity: 0.55; background: var(--surface); border-width: 1.5px; }
.sw-input[aria-disabled="true"] ~ .sw::before { background: var(--surface-raised); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.sw-state { min-width: 1.75rem; font-size: 0.9375rem; font-weight: 650; }
.sw-state::before { content: "Off"; }
.sw-input:checked ~ .sw-state::before { content: "On"; }

/* Share lists (step 2) */
.list-title { font-size: 1.0625rem; }
.list-title + .share-list { margin-top: -0.25rem; }
.share-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.share-list li { display: flex; gap: 0.625rem; align-items: flex-start; }
.share-list .glyph { margin-top: 0.125rem; color: var(--text); }
.share-list--not li > span { color: var(--text); }
.share-list--not .glyph { color: var(--text-muted); }
.item-desc { display: block; color: var(--text-muted); font-size: 0.9375rem; }
.share-list--not { padding-bottom: 0.25rem; }
.hero .list-title:not(:first-child) {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

/* Countdown (step 3) */
.offer { font-size: 1.125rem; font-weight: 600; }
.countdown {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}
.countdown-label { display: flex; gap: 0.375rem; align-items: center; font-weight: 600; color: var(--text-muted); }
.countdown-num {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
  font-size: 3rem;
  font-weight: 650;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.countdown-num .glyph { width: 1.75rem; height: 1.75rem; align-self: center; color: var(--text-muted); }
.countdown-unit, .countdown-paused { font-size: 1.0625rem; font-weight: 600; color: var(--text-muted); }
.link-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
/* S13 after call-5: one vertical stack, the variant action first and
   "End call without agreeing" always last. */
.link-list--stack { flex-direction: column; flex-wrap: nowrap; gap: 0.5rem; }
.decision-title { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; line-height: 1.25; }
.plan-block { display: flex; flex-direction: column; gap: 0.375rem; }
.variant-choice { border: 0; padding: 0; min-width: 0; }
.variant-choice legend { font-weight: 650; padding: 0; margin-bottom: 0.25rem; }
.variant-choice .radio-row input { width: 1.375rem; height: 1.375rem; margin: 0; flex-shrink: 0; accent-color: var(--text); }
.variant-choice .radio-row label { padding: 0.5rem 0; cursor: pointer; flex: 1; }
.btn-link .glyph { margin-right: 0.375rem; }
.countdown-note { margin-top: 0.25rem; font-size: 0.9375rem; }
.more-time-note { padding: 0.5rem 0; }
.result-title { font-family: var(--font-serif); font-size: 1.375rem; font-weight: 600; }
.result .btn + .btn { margin-top: -0.25rem; }

.transcript {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.transcript li { font-size: 0.9375rem; }
.speaker { font-weight: 650; }
.transcript .sound { color: var(--text-muted); font-style: italic; }

/* Call summary (step 4) */
.agreed { list-style: none; padding: 0; display: flex; flex-direction: column; }
.agreed > li { padding: 0.625rem 0; border-top: 1px solid var(--border); }
.agreed > li:first-child { border-top: 0; padding-top: 0.25rem; }
.agreed > li { font-weight: 500; display: flex; gap: 0.5rem; align-items: flex-start; }
.agreed > li > .glyph { margin-top: 0.125rem; flex-shrink: 0; }
.not-covered { border-top: 1px solid var(--border); padding-top: 0.625rem; font-weight: 500; }
.not-covered .glyph { flex-shrink: 0; }
.list-group .report { margin-top: 0; gap: 0; }
.list-group .report-form, .list-group .reported { margin: 0 1rem 1rem; }
.report { display: flex; flex-direction: column; gap: 0.5rem; margin-top: -0.25rem; }
.report > .btn-link { align-self: flex-start; }
.radio-group { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; }
.radio-group legend { font-weight: 650; padding: 0; margin-bottom: 0.25rem; }
.radio-row { display: flex; align-items: center; gap: 0.625rem; min-height: 2.75rem; }
.radio-row input { width: 1.375rem; height: 1.375rem; margin: 0; flex-shrink: 0; accent-color: var(--text); }
.radio-row label { font-weight: 500; padding: 0.5rem 0; cursor: pointer; flex: 1; }
.report-form { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.report-form label { font-weight: 650; }
.report-form textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.75rem;
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
}
.form-actions { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }
.form-actions .btn { width: auto; }
.reported {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-top: 0.5rem;
  padding: 0.5rem 0.625rem;
  background: var(--accent-tint);
  color: var(--on-accent-tint);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}
.reported .glyph { margin-top: 0.0625rem; }

/* Stage stepper (step 5) */
.stepper {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.25rem;
}
.stage {
  flex: 1 1 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}
.stage-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px dashed var(--border-strong);
  background: var(--bg);
}
.stage--done .stage-dot { border: 2px solid var(--text); background: var(--text); color: var(--bg); }
.stage--done .stage-dot .glyph { width: 1rem; height: 1rem; }
.stage--now { color: var(--text); font-weight: 700; }
.stage--now .stage-dot { border: 2.5px solid var(--text); background: var(--bg); }
.stage--now .stage-dot::after {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--text);
}

/* Rights card (step 6) */
.rules { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.rule { display: flex; flex-direction: column; gap: 0.625rem; }
.rule-title { font-size: 1.1875rem; }
.rule-note, .rule-limit { color: var(--text); font-weight: 600; }
.rule-sentence { font-size: 1.0625rem; }
/* Rule 2 shows the gloss and the form line on separate lines (R3-lucy-html-1). */
.note-line { display: block; }
.rule-source { color: var(--text); font-weight: 650; }
.rule-text { font-size: 1.0625rem; }
.excerpt {
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.excerpt-label {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.excerpt blockquote {
  margin: 0;
  padding-left: 0.75rem;
  border-left: 3px solid var(--text);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.4;
}
.excerpt figcaption { display: flex; flex-direction: column; gap: 0.375rem; font-size: 0.9375rem; color: var(--text-muted); }
.excerpt figcaption a { font-weight: 600; }
.source-chip {
  display: inline-block;
  border: 1.5px solid var(--text);
  border-radius: var(--radius-sm);
  padding: 0.125rem 0.5rem;
  color: var(--text);
  font-weight: 650;
  font-size: 0.9375rem;
}
.applies { font-size: 0.9375rem; }
.applies-label { font-weight: 650; }

.sources p { margin-bottom: 0.75rem; }
.sources h3 { margin: 1rem 0 0.75rem; }
.references { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.references li { padding-left: 2rem; text-indent: -2rem; overflow-wrap: anywhere; }

/* Officer view: full-screen dialog, very large text. */
.officer {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--surface-raised);
  color: var(--text);
}
.officer::backdrop { background: var(--surface-raised); }
.officer-inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 100%;
}
.officer-top {
  display: grid;
  /* The first column never shrinks below the Close button, so at 320 px
     the label stays on one line (it broke letter by letter before). */
  grid-template-columns: minmax(max-content, 1fr) auto 1fr;
  align-items: center;
  gap: 0.5rem 1rem;
}
.officer-top::after { content: ""; width: 0; }
.officer-close { width: auto; justify-self: start; white-space: nowrap; }
.officer-count {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
}
.officer-showing {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-weight: 650;
  font-size: 1.0625rem;
}
.officer-awake { font-size: 0.9375rem; color: var(--text-muted); }
.officer-rule { display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.officer-excerpt {
  margin: 0;
  padding-left: 1rem;
  border-left: 6px solid var(--text);
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 2.75rem);
  line-height: 1.3;
}
.officer-label {
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.officer-note { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem); font-weight: 600; }
.officer-source {
  border-top: 2px solid var(--text);
  padding-top: 0.75rem;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
}
.officer-source-detail { font-size: 1.125rem; }
/* Flex, not a grid: on rule 1 "Previous rule" is hidden and "Show next rule"
   takes the full width. At large text the two buttons stack. */
.officer-nav { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.officer-nav > .btn { flex: 1 1 12rem; }

/* ---------- Previous / next and footer ---------- */

.pager { padding: 0 0 2rem; }
.pager ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-height: 3rem;
  height: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface-raised);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
}
.pager-link:hover { border-color: var(--text); }
.pager-link:hover .pager-title { text-decoration: underline; }
.pager-next { text-align: right; }
.pager-dir { font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.pager-title { font-weight: 650; color: var(--link); }

@media (max-width: 30rem) {
  .pager ul { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 1rem 0 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.site-footer .art { max-width: 16rem; margin-bottom: 0.5rem; }

/* ---------- Preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .sw, .stage-dot, .badge, .card, .list-group, .pinned, .pin-note, .tile, .countdown, .excerpt, .reported { border: 1px solid CanvasText; }
  .sw::before { background: CanvasText; }
  .sw-input:checked ~ .sw { background: Highlight; }
  .sw-input:checked ~ .sw::before { background: Canvas; }
  .btn { border: 2px solid ButtonText; }
  .steps-nav a[aria-current="page"] { border-width: 3px; }
  .stage--now .stage-dot::after { background: CanvasText; }
}

@media print {
  .site-header, .pager, .skip-link, .toolbar, .art, .screen-tag, .page-intro, .officer, .row-details > summary > .glyph { display: none !important; }
  body, .screen, .card, .excerpt { background: #fff !important; color: #000 !important; box-shadow: none !important; }
  .screen { border: 0; padding: 0; }
  .card { border: 1px solid #000; break-inside: avoid; }
  a { color: #000; }
  .row-details > div { display: block; }
}
