/* Shared presentation for the public practice tools. No external assets required. */
:root {
  --red: #99141b;
  --chocolate: #3e0908;
  --choc: var(--chocolate);
  --gold: #ed7703;
  --ink: #211b19;
  --muted: #655b55;
  --paper: #fff;
  --warm: #f8f5f0;
  --line: #ded5cd;
  --strong-line: #b7a69b;
  --radius: 6px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 18px/1.65 Calibri, Aptos, 'Segoe UI', Arial, sans-serif; }
main, article, section, div { min-width: 0; }
a { color: var(--red); text-underline-offset: .17em; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
a:hover { color: var(--chocolate); text-decoration-thickness: 2px; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
[hidden], .hidden { display: none !important; }
.print-only { display: none; }
.visually-hidden, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
.skip-link, .skip { position: absolute; top: -150px; left: 16px; z-index: 20; padding: 12px 20px; color: var(--chocolate); background: #fff; border: 2px solid var(--red); }
.skip-link:focus, .skip:focus { top: 12px; }
.wrap { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }

header { border-bottom: 1px solid var(--line); background: #fff; }
.top, .mast { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.mast { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.brand { color: var(--chocolate); font-size: 20px; font-weight: 750; text-decoration: none; line-height: 1.3; }
.brand span { margin-left: 8px; color: var(--muted); font-weight: 400; }
.top > a:last-child:not(.brand), .mast > a:last-child:not(.brand) { font-size: 15px; }
.nav, .guide-nav, .chapters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 15px; line-height: 1.4; }
.guide-nav, .chapters { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 0 0 18px; }
.nav a, .guide-nav a, .chapters a { display: inline-block; min-height: 36px; padding-block: 8px; color: var(--muted); text-decoration: none; }
.nav a:hover, .guide-nav a:hover, .chapters a:hover { color: var(--red); text-decoration: underline; }
.nav a[aria-current='page'], .guide-nav a[aria-current='page'], .chapters a[aria-current='page'] { color: var(--red); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; font-weight: 750; }

.hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg, #fff 65%, #faf6f0); }
.hero > :not(.wrap) { max-width: var(--max); margin-inline: auto; }
.hero .eyebrow { margin-top: 0; }
.eyebrow, .kicker { margin: 0 0 14px; color: var(--red); font-size: 13px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, h4 { line-height: 1.2; text-wrap: balance; }
h1, h2 { font-family: Georgia, 'Times New Roman', serif; letter-spacing: -.025em; }
h1 { max-width: 1000px; margin: 0 0 24px; color: var(--red); font-size: clamp(42px, 5.6vw, 74px); line-height: 1.08; }
h2 { margin: 0 0 24px; color: var(--chocolate); font-size: clamp(28px, 3vw, 39px); }
h3 { margin: 28px 0 12px; color: var(--chocolate); font-size: 22px; }
h4 { margin: 24px 0 10px; color: var(--chocolate); font-size: 18px; }
p { margin: 0 0 20px; }
.lead, .deck { max-width: 850px; margin: 0; font-size: 24px; line-height: 1.5; }
.hero .lead + p, .hero .deck + p { margin-top: 22px; }
.edition, .meta, .small, small { color: var(--muted); font-size: 15px; }
.edition, .meta { margin-top: 22px; }
.crumbs { margin-bottom: 28px; font-size: 15px; }
.section { padding-block: 52px; }
.section.alt { border-block: 1px solid var(--line); background: var(--warm); }
.section-head { max-width: 850px; margin-bottom: 28px; }
.section-head p { color: var(--muted); }
.prose { max-width: 840px; }
.prose > p, .prose > ul, .prose > ol { max-width: 76ch; }
.prose > section, .chapter-section { padding: 36px 0; border-top: 1px solid var(--line); }
.prose > section:first-child, .chapter-section:first-child { border-top: 2px solid var(--red); }
.reading-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 52px; width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding-bottom: 64px; }
.toc { align-self: start; padding-top: 24px; font-size: 15px; }
.toc a { display: block; padding: 6px 0; }
section[id], h2[id], h3[id] { scroll-margin-top: 24px; }
ul, ol { margin: 0 0 24px; padding-left: 25px; }
li { margin-bottom: 9px; padding-left: 4px; }
li > p { margin-bottom: 8px; }
blockquote { margin: 26px 0; border-left: 3px solid var(--gold); padding: 6px 0 6px 22px; color: var(--chocolate); font-size: 22px; }
blockquote p:last-child { margin-bottom: 0; }
strong { font-weight: 750; }
cite { font-style: italic; }
hr { margin: 36px 0; border: 0; border-top: 1px solid var(--line); }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
figure { margin: 30px 0; }
figcaption { margin-top: 12px; color: var(--muted); font-size: 15px; }

.grid, .cards, .route-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.two-col, .two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.card, .route { padding: 26px; border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: var(--radius); background: #fff; }
.card h2, .card h3, .route h2, .route h3 { margin-top: 0; font-family: inherit; font-size: 23px; letter-spacing: 0; }
.card > :last-child, .route > :last-child { margin-bottom: 0; }
.card p, .route small { font-size: 17px; line-height: 1.55; }
a.card, a.route { color: var(--ink); text-decoration: none; }
a.card:hover, a.route:hover { border-color: var(--red); }
a.card:hover h2, a.card:hover h3, a.route:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.route > span, .route > strong, .route > small { display: block; }
.route > span { margin-bottom: 10px; color: var(--red); font-size: 13px; font-weight: 700; }
.route > strong { color: var(--chocolate); font-size: 24px; line-height: 1.25; }
.route > small { margin-top: 12px; color: var(--muted); }
.card .go { display: inline-block; margin-top: 12px; font-weight: 750; }
.matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-block: 28px; border: 1px solid var(--strong-line); background: var(--strong-line); }
.matrix > * { padding: 28px; background: var(--warm); }
.matrix > :nth-child(2), .matrix > :nth-child(3) { background: #fff; }
.matrix h3 { margin-top: 0; font-size: 25px; }
.matrix p:last-child { margin-bottom: 0; }
.matrix .eyebrow { color: var(--muted); }

.note, .callout { margin-block: 28px; padding: 22px 26px; border-left: 4px solid var(--gold); background: var(--warm); }
.note > :first-child, .callout > :first-child { margin-top: 0; }
.note > :last-child, .callout > :last-child { margin-bottom: 0; }
.warning, .note.warning, .callout.warning { border-left-color: var(--red); }
.chip, .tag { display: inline-block; margin: 2px 4px 2px 0; padding: 3px 9px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.resource-list, .resources { margin-block: 24px; padding: 0; list-style: none; }
.resource-list > li, .resources > li { margin: 0; padding: 22px 0; border-top: 1px solid var(--line); }
.resource-list strong, .resource-list small { display: block; }
.resource-list strong { font-size: 21px; line-height: 1.35; }
.resource-list h3, .resources h3 { margin: 0 0 8px; }
.resource-list p, .resources p { margin: 10px 0 0; font-size: 17px; }
.steps { list-style: none; counter-reset: steps; padding: 0; }
.steps > li { counter-increment: steps; position: relative; margin: 0; padding: 24px 0 24px 56px; border-top: 1px solid var(--line); }
.steps > li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; top: 24px; color: var(--red); font-size: 22px; font-weight: 750; }
.steps h3 { margin: 0 0 10px; }
.steps > li p:last-child { margin-bottom: 0; }

.table-wrap { width: 100%; overflow-x: auto; margin: 26px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
caption { text-align: left; padding: 16px; color: var(--chocolate); font-size: 18px; font-weight: 750; }
th, td { padding: 15px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--chocolate); background: var(--warm); font-weight: 750; }
thead th { border-bottom: 2px solid var(--strong-line); }
tbody tr:last-child > * { border-bottom: 0; }
td:first-child, th[scope='row'] { font-weight: 650; }
td p:last-child { margin-bottom: 0; }
td small, th small { display: block; margin-top: 5px; font-weight: 400; }

button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px; border: 1px solid var(--red); border-radius: 4px; color: var(--red); background: #fff; font: 700 16px/1.4 Calibri, Aptos, 'Segoe UI', Arial, sans-serif; text-align: center; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { color: var(--chocolate); border-color: var(--chocolate); background: var(--warm); }
button.primary, .button.primary, button[type='submit'] { color: #fff; background: var(--red); }
button.primary:hover, .button.primary:hover, button[type='submit']:hover { color: #fff; background: var(--chocolate); }
button.secondary, .button.secondary { border-color: var(--strong-line); color: var(--chocolate); }
button[disabled] { cursor: not-allowed; opacity: .55; }
.actions, .toolbar, .button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; }
.actions p { margin: 0; }
form { margin-block: 24px; }
fieldset { margin: 28px 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
legend { padding-inline: 9px; color: var(--chocolate); font-size: 21px; font-weight: 750; }
label { color: var(--chocolate); font-size: 17px; font-weight: 650; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.field > label, label.field { display: block; }
.field small, .help, .hint { display: block; color: var(--muted); font-size: 15px; line-height: 1.5; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.form-grid .field { margin: 0; }
.field-wide { grid-column: 1 / -1; }
input, select, textarea { max-width: 100%; border: 1px solid var(--strong-line); border-radius: 4px; color: var(--ink); background: #fff; font: inherit; }
input:not([type='checkbox']):not([type='radio']):not([type='range']), select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; }
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
input[type='number'] { font-variant-numeric: tabular-nums; }
input[type='range'] { width: 100%; min-height: 44px; accent-color: var(--red); cursor: pointer; }
input[type='checkbox'], input[type='radio'] { width: 19px; height: 19px; margin: 0 9px 0 0; vertical-align: -.15em; accent-color: var(--red); }
label:has(input[type='checkbox']), label:has(input[type='radio']) { display: block; min-height: 44px; padding-block: 8px; font-weight: 400; }
output { color: var(--red); font-weight: 750; font-variant-numeric: tabular-nums; }
details { margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); }
summary { min-height: 48px; padding: 13px 18px; color: var(--chocolate); font-weight: 750; cursor: pointer; }
details[open] > summary { margin-bottom: 18px; border-bottom: 1px solid var(--line); background: var(--warm); }
details > :not(summary) { margin-inline: 18px; }
details > :last-child { margin-bottom: 20px; }
.results { margin: 36px 0; padding: 28px; border: 2px solid var(--chocolate); border-radius: var(--radius); background: var(--warm); }
.results h2 { margin-bottom: 18px; font-size: 31px; }
.result { margin: 20px 0; padding: 22px; border: 1px solid var(--line); background: #fff; }
.result h3 { margin-top: 0; }
.result > :last-child { margin-bottom: 0; }
.status, [role='status'] { color: var(--muted); font-size: 15px; }
.status:empty, [role='status']:empty { display: none; }
progress, meter { width: 100%; height: 18px; accent-color: var(--red); }

.page-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-top: 44px; padding-top: 24px; border-top: 2px solid var(--red); }
.page-nav a { max-width: 46%; font-weight: 750; }
.page-nav span { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }
footer { padding: 32px 0 40px; border-top: 1px solid var(--line); color: var(--muted); background: var(--warm); font-size: 15px; }
footer p { margin: 8px 0; }
.discussion-pixel { position: fixed; right: 0; bottom: 0; width: 44px; height: 44px; z-index: 10; }
.discussion-pixel::after { content: ''; position: absolute; right: 8px; bottom: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); opacity: .45; }

@media (min-width: 1000px) { .toc { position: sticky; top: 18px; } }
@media (max-width: 950px) {
  .grid, .cards, .route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading-layout { display: block; }
  .toc { display: flex; flex-wrap: wrap; gap: 2px 20px; padding: 20px 0; }
  .toc > p { width: 100%; margin-bottom: 4px; }
  .top { flex-wrap: wrap; padding-block: 18px; gap: 12px 24px; }
  .top .nav { width: 100%; }
  .lead, .deck { font-size: 22px; }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .wrap, .mast, .guide-nav, .chapters, .reading-layout { width: min(calc(100% - 36px), var(--max)); }
  .mast { min-height: 70px; align-items: flex-start; padding-block: 20px; }
  .brand { font-size: 18px; }
  .brand span { display: block; margin: 3px 0 0; font-size: 14px; }
  .top > a:last-child:not(.brand), .mast > a:last-child:not(.brand) { max-width: 100px; font-size: 14px; }
  .nav, .guide-nav, .chapters { font-size: 14px; column-gap: 18px; }
  .hero { padding: 36px 0 32px; }
  h1 { margin-bottom: 20px; font-size: clamp(37px, 10vw, 50px); }
  h2 { font-size: 29px; }
  h3 { font-size: 21px; }
  .lead, .deck { font-size: 21px; }
  .section { padding-block: 36px; }
  .grid, .cards, .route-grid, .two-col, .two-up, .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .field-wide { grid-column: auto; }
  .card, .route { padding: 22px; }
  .matrix { grid-template-columns: 1fr; }
  .matrix > * { padding: 22px; }
  .matrix > :nth-child(odd) { background: var(--warm); }
  .matrix > :nth-child(even) { background: #fff; }
  fieldset { padding: 18px 16px; }
  .results { padding: 20px 16px; }
  .result { padding: 18px 16px; }
  .note, .callout { padding: 18px; }
  .table-wrap { font-size: 15px; }
  th, td { padding: 12px 10px; }
  .page-nav a { max-width: 100%; }
  footer { padding: 26px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (forced-colors: active) {
  button, .button, .card, .route, .result, .results { border: 1px solid ButtonText; }
  :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline-color: Highlight; }
}
@media print {
  @page { size: A4; margin: 17mm; }
  html { scroll-behavior: auto; }
  body { color: #000; background: #fff; font-size: 10.5pt; line-height: 1.45; }
  header, footer, .skip-link, .skip, .toc, .actions, .toolbar, .button-row, .page-nav, .discussion-pixel, button, .button, .no-print { display: none !important; }
  .print-only { display: block; }
  .wrap, .mast, .reading-layout, .hero > :not(.wrap) { width: 100%; max-width: none; margin: 0; }
  .hero { padding: 0 0 20px; background: #fff; }
  .eyebrow { font-size: 8pt; }
  h1 { font-size: 30pt; max-width: none; }
  h2 { font-size: 20pt; }
  h3 { font-size: 14pt; }
  .lead, .deck { font-size: 14pt; }
  .edition, .meta, .small, small { font-size: 9pt; }
  .section { padding-block: 22px; }
  .reading-layout { display: block; padding: 0; }
  .prose { max-width: none; }
  .grid, .cards, .route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card, .route, .matrix > * { padding: 14px; }
  .card p, .route small { font-size: 10pt; }
  .card h2, .card h3, .route strong { font-size: 14pt; }
  a { color: inherit; }
  .resource-list a[href^='http']::after, .resources a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 8pt; font-weight: 400; overflow-wrap: anywhere; }
  .note, .callout, fieldset, .result { padding: 14px; }
  .results { margin-block: 20px; padding: 16px; }
  .results h2 { font-size: 20pt; }
  .table-wrap { overflow: visible; border: 0; }
  table { font-size: 9pt; }
  th, td { padding: 8px; }
  th { background: #f2f2f2; }
  thead { display: table-header-group; }
  h2, h3, h4, legend { break-after: avoid; }
  tr, figure, blockquote, .card, .route { break-inside: avoid; }
  input:not([type='range']), textarea, select { min-height: 0; padding: 5px; font-size: 10pt; border-color: #aaa; }
  input[type='range'] { height: 18px; }
  textarea { min-height: 60px; }
  details { border: 0; }
  details:not([open]) { display: none; }
  details[open] > summary { margin: 0 0 10px; padding: 0; border: 0; background: #fff; }
  details > :not(summary) { margin-inline: 0; }
}
