/* ComplyDay guide and template pages. The palette matches public/index.html; everything else uses the
   taste-skill tokens from assets/system.css. No second system: only prose, the short answer, sheets and print. */
:root {
  --p-bg: #e5e1d8; --p-surface: #dad5ca; --p-ink: #2a1d17; --p-muted: #65564c;
  --p-accent: #456f3a; --p-accent-ink: #ffffff; --p-action: #456f3a; --p-action-ink: #ffffff;
  --p-inv-bg: #2a1d17; --p-inv-surface: #352822; --p-inv-ink: #e5e1d8; --p-inv-muted: #9e968e;
  --p-inv-accent: #e5e1d8; --p-inv-accent-ink: #2a1d17; --p-inv-action: #e5e1d8; --p-inv-action-ink: #2a1d17;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-text: "Outfit", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 400;
  --display-tracking: -0.03em;
  --display-tracking-xl: -0.04em;
}
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { width: auto; height: auto; clip-path: none; padding: var(--s-2) var(--s-4); background: var(--bg); z-index: 20; }

@media (max-width: 1023px) { .closing__links .grid > .footer__col { grid-column: span 4; } }
/* phones: the closing section takes the height of its content (the kit's two fixed screens left a
   large empty gap between the call to action and the footer links) */
@media (max-width: 639px) {
  html body footer.closing { height: auto !important; min-height: 0 !important; padding: 72px 0 32px !important; }
  html body footer.closing.g2m > .wrap, html body footer.closing > .wrap { height: auto; display: flex; flex-direction: column; row-gap: 56px; }
}

/* wide but short screens (1280x720, 1366x768 laptops, zoomed windows): the closing section grows past
   its screen instead of squeezing the call to action, as on the home page (public/index.html) */
@media (min-width: 1280px) {
  html body footer.closing {
    height: auto !important; min-height: calc(var(--h, 1) * 100vh); min-height: calc(var(--h, 1) * 100svh);
    display: flex; flex-direction: column;
  }
  html body footer.closing > .wrap { flex: 1 0 auto; height: auto; min-height: 0; }
}

/* page frame */
.guide { padding: calc(var(--nav) + var(--s-8)) 0 var(--s-9); }
.guide__head { max-width: 62rem; }
.guide__head h1 { margin-top: var(--s-4); }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; font-size: var(--t-label); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.guide__meta { margin-top: var(--s-4); font-size: var(--t-label); color: var(--muted); }
.guide__meta a { color: var(--muted); }
.guide__body { margin-top: var(--s-8); align-items: start; }
.guide__aside { display: grid; gap: var(--s-5); }
@media (max-width: 1023px) { .guide__body > * { grid-column: 1 / -1; } .guide__aside { margin-top: var(--s-8); } }

/* the short answer */
.answer { padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface, var(--p-surface)); }
.answer > .t-label { display: block; margin-bottom: var(--s-2); color: var(--muted); }
.answer p { font-size: var(--t-lead); line-height: 1.5; color: var(--ink); }
.answer p + p { margin-top: var(--s-3); }

/* prose */
.prose { font-size: var(--t-body); line-height: 1.7; color: var(--ink); max-width: 46rem; }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { font-size: var(--t-h3); line-height: 1.25; margin-top: var(--s-8); scroll-margin-top: calc(var(--nav) + var(--s-4)); }
.prose h3 { font-size: var(--t-card); line-height: 1.3; font-weight: 500; margin-top: var(--s-6); scroll-margin-top: calc(var(--nav) + var(--s-4)); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--muted); }
.prose li + li { margin-top: var(--s-2); }
.prose li > ul, .prose li > ol { margin-top: var(--s-2); }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-small); line-height: 1.5; }
.prose th, .prose td { padding: var(--s-3) var(--s-3) var(--s-3) 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { font-weight: 500; color: var(--muted); border-bottom-color: var(--line-strong); }
.prose .table-wrap { overflow-x: auto; }
/* phones: one block per row, the first cell as its title and each other cell under its column heading */
@media (max-width: 639px) {
  .prose table.stack, .prose table.stack tbody { display: block; }
  .prose table.stack thead { display: none; }
  .prose table.stack tr { display: block; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
  .prose table.stack td { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: var(--s-3); padding: var(--s-1) 0; border: 0; }
  .prose table.stack td::before { content: attr(data-label); color: var(--muted); }
  .prose table.stack td[data-label=""]::before { content: none; }
  .prose table.stack td[data-label=""] { grid-template-columns: minmax(0, 1fr); }
  .prose table.stack td:first-child { display: block; padding-bottom: var(--s-2); font-weight: 500; font-size: var(--t-body); }
  .prose table.stack td:first-child::before { content: none; }
}
.prose blockquote { margin: 0; padding: var(--s-4) var(--s-5); border-left: 2px solid var(--line-strong); background: color-mix(in oklab, var(--ink) 4%, var(--bg)); }
.prose .note { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); border: 1px solid var(--line-strong); }
.prose .steps { counter-reset: step; list-style: none; padding-left: 0; }
.prose .steps > li { counter-increment: step; position: relative; padding-left: 2.5em; }
.prose .steps > li::before { content: counter(step); position: absolute; left: 0; top: 0.1em; width: 1.75em; height: 1.75em; border-radius: 999px; display: grid; place-items: center; font-size: var(--t-label); font-weight: 500; background: color-mix(in oklab, var(--ink) 8%, var(--bg)); }

/* aside cards */
.side-card { padding: var(--s-6); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg); display: grid; gap: var(--s-4); }
.side-card h2, .side-card h3 { font-size: var(--t-card); font-weight: 500; line-height: 1.3; }
.side-card p { font-size: var(--t-body); line-height: 1.6; }
.side-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-3); }
.side-card .btn { width: 100%; }

/* questions and sources */
.guide__section { margin-top: var(--s-9); max-width: 46rem; }
.guide__section > h2 { font-size: var(--t-h3); }
.qa { margin-top: var(--s-6); display: grid; gap: var(--s-6); }
.qa h3 { font-size: var(--t-card); font-weight: 500; line-height: 1.3; }
.qa p { margin-top: var(--s-2); line-height: 1.7; }
.sources { margin-top: var(--s-5); padding-left: 1.25em; display: grid; gap: var(--s-2); font-size: var(--t-small); line-height: 1.6; }
.sources a { color: var(--ink); }

/* hub list */
.hub { margin-top: var(--s-8); }
.hub h2 { font-size: var(--t-h3); margin-top: var(--s-8); }
.hub .grid { margin-top: var(--s-5); }
.hub-card { display: grid; gap: var(--s-2); padding: var(--s-6); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg); text-decoration: none; color: var(--ink); transition: border-color var(--dur) var(--ease); }
.hub-card:hover { border-color: var(--line-strong); }
.hub-card h3 { font-size: var(--t-card); font-weight: 500; line-height: 1.3; }
.hub-card p { font-size: var(--t-body); line-height: 1.6; color: var(--ink); }
.hub-card .t-label { color: var(--muted); }

/* printable sheets (shown on the page and on /print routes) */
.sheet { background: #fff; color: #111; border-radius: var(--r-md); border: 1px solid var(--line); padding: 28px; font-family: var(--font-text); font-size: 12px; line-height: 1.4; }
.sheet__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1.5px solid #111; padding-bottom: 8px; }
.sheet__head h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.sheet__fields { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 10px; }
.sheet__fields span { min-width: 180px; border-bottom: 1px solid #999; padding-bottom: 2px; }
.sheet table { width: 100%; border-collapse: collapse; margin-top: 12px; table-layout: fixed; }
.sheet th { font-size: 10.5px; font-weight: 600; text-align: left; padding: 6px 5px; border: 1px solid #555; background: #f1f1f1; vertical-align: bottom; }
.sheet td { height: 26px; border: 1px solid #888; }
.sheet .sheet__note { margin-top: 10px; font-size: 10.5px; color: #333; }
.sheet .sheet__text { font-size: 14px; line-height: 1.6; margin-top: 16px; }
.sheet .sheet__sign { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; margin-top: 28px; }
.sheet .sheet__sign span { display: block; border-bottom: 1px solid #111; height: 28px; }
.sheet .sheet__sign label { display: block; font-size: 10.5px; margin-top: 4px; color: #333; }
.sheet .check { display: inline-block; width: 12px; height: 12px; border: 1px solid #333; margin-right: 6px; vertical-align: -2px; }
.sheet h3 { font-size: 13px; font-weight: 600; margin-top: 16px; }
.sheet ul.checklist { list-style: none; padding: 0; margin: 6px 0 0; }
.sheet ul.checklist li { padding: 4px 0; border-bottom: 1px solid #ddd; display: flex; gap: 6px; }
.sheet ul.checklist li small { margin-left: auto; color: #555; white-space: nowrap; padding-left: 8px; }
.sheet-frame { overflow-x: auto; }
.sheet-frame .sheet { min-width: 640px; }

/* print routes: the sheet alone, page size letter */
.print-page { background: #fff; padding: 0; }
.print-page .sheet { border: 0; border-radius: 0; padding: 0; min-width: 0; }
@page { size: letter; margin: 0.5in; }
@page landscape { size: letter landscape; margin: 0.4in; }
.print-page .sheet--landscape { page: landscape; }
.print-page .sheet + .sheet { break-before: page; }
.print-bar { padding: 16px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid #ddd; font: 14px/1.4 system-ui, sans-serif; }
@media print {
  .print-bar { display: none; }
  .sheet { border: 0; }
}
