@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600&family=Inter:wght@400;500;600&family=Prompt:wght@500;600&display=swap");

:root {
  color-scheme: light;
  --paper: #f2f1ec;
  --white: #fffdf7;
  --ink: #12262b;
  --deep: #0f2a32;
  --soft: #dce9df;
  --coral: #e86f51;
  --teal: #166473;
  --line: #b9c6be;
  --body: Inter, system-ui, sans-serif;
  --display: "Cormorant Garamond", Georgia, serif;
  --control: Prompt, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--body); }
a { color: var(--teal); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.bar :focus-visible, .hero :focus-visible { outline-color: var(--soft); }
::selection { background: var(--soft); color: var(--ink); }
.shell { width: min(1080px, calc(100% - 48px)); margin-inline: auto; }
.bar { background: var(--deep); color: var(--soft); border-block-start: 1px solid #426169; font-size: .875rem; }
header.bar { border-block-start: 4px solid var(--coral); }
.bar .shell { display: flex; gap: 16px; align-items: center; justify-content: space-between; min-height: 66px; padding-block: 12px; }
.bar .backlink { color: var(--soft); }
.brand { color: var(--white); text-decoration: none; font: 600 2rem/1 var(--display); }
.brand span { color: var(--coral); }
.skip { position: absolute; inset: 8px auto auto 8px; z-index: 2; padding: 10px; background: var(--white); transform: translateY(-150%); }
.skip:focus { transform: none; }
.hero { background: var(--deep); color: var(--white); }
.hero-layout { display: grid; grid-template-columns: 1.15fr minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: center; padding-block: clamp(38px, 6vw, 88px); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.03; margin: 0 0 16px; letter-spacing: -.02em; }
h1 { font-size: clamp(3.3rem, 8vw, 6rem); }
h2 { font-size: clamp(2.4rem, 5vw, 3.7rem); }
h3 { font-size: 1.8rem; }
p { margin: 0 0 16px; max-width: 65ch; }
.hero-layout > div:first-child p { color: var(--soft); max-width: 47ch; }
.intro { font-size: clamp(1.15rem, 2vw, 1.35rem); }
.map-figure { margin: 0; padding: 18px; text-align: center; background: var(--deep); color: var(--soft); border-radius: 12px; }
.map-figure svg { width: 100%; max-width: 320px; display: block; margin: auto; }
figcaption { font-size: .85rem; }
.map-layout { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: clamp(24px, 6vw, 72px); padding-block: 44px 60px; }
.paper { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 4vw, 32px); min-width: 0; }
.request-paper { color: var(--ink); }
.request-paper h2 { font-size: clamp(2.4rem, 4vw, 3.25rem); }
.request-paper :focus-visible { outline-color: var(--teal); }
.receipt-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
#receipt > .note { margin-top: 16px; }
label, legend { display: block; font-weight: 600; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: white; border: 1px solid #829691; border-radius: 6px;
  min-height: 48px; padding: 10px 12px; margin: 6px 0 10px;
}
textarea { min-height: 82px; resize: vertical; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; max-width: 100%;
  padding: 10px 18px; border: 1px solid transparent; border-radius: 6px; background: var(--coral);
  color: var(--ink); text-decoration: none; font: 500 1rem/1.4 var(--control); cursor: pointer; text-align: center;
}
button:hover:not(:disabled), .button:hover { background: #f39178; }
button:disabled { opacity: .65; cursor: default; }
.secondary { background: transparent; border-color: #829691; }
.secondary:hover:not(:disabled) { background: var(--soft); }
.note, .review, .status { font-size: .875rem; }
#outage-note { overflow-wrap: anywhere; white-space: pre-wrap; }
.circle-layout { display: grid; grid-template-columns: 1.35fr minmax(0, 1fr); gap: 18px; margin-block: 16px; }
.circle-fields { min-width: 0; }
.circle-prompt { margin-bottom: 0; }
.circle-notes { background: var(--soft); padding: 16px; border-radius: 8px; }
.circle-notes h3 { margin-bottom: 10px; }
.circle-notes p, .circle-notes dl { margin: 0; }
.circle-notes dl > div + div { margin-top: 8px; }
.circle-notes dt { font-size: .875rem; font-weight: 600; }
.circle-notes dd { margin: 0; overflow-wrap: anywhere; }
#planning-circles:not(:empty) { margin-block: 16px; }
.review { padding: 9px 12px; background: var(--soft); }
.status { margin: 12px 0 0; }
.status:empty { margin: 0; }
#updates { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
#updates .note { margin: 8px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin-bottom: 12px; }
input[type="checkbox"], input[type="radio"] { flex: none; width: 18px; height: 18px; accent-color: var(--teal); }
.reading { width: min(740px, calc(100% - 48px)); padding-block: clamp(32px, 6vw, 68px); }
.reading h1 { font-size: clamp(3rem, 7vw, 4.8rem); }
.step-note { margin: 0 0 24px; color: var(--teal); font: 500 .875rem var(--control); }
.pager { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.score-row { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 220px; gap: 16px; align-items: center; padding: 9px 0; }
.score-row p { margin: 2px 0 0; font-size: .875rem; }
.score-row select { margin: 0; }
.score-group + .score-group { margin-top: 20px; }
.score-group legend { font: 600 1.8rem/1.15 var(--display); }
.score-group > p { margin-bottom: 8px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.outcome { margin: 20px 0 24px; }
.outcome > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.outcome dt { font-weight: 600; }
.outcome dd { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.outcome .next-connection { background: var(--soft); padding: 18px; border: 0; border-radius: 8px; margin-bottom: 4px; }
.next-connection dd { font: 600 clamp(1.6rem, 4vw, 2.2rem)/1.18 var(--display); }
#result-gap { margin-top: 8px; }
.after-result { margin-top: 22px; }
.result-followup { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.print-only { display: none; }
.print-line { min-height: 2.4rem; border-bottom: 1px solid #829691; }
.print-line + p { margin-top: 8px; }
.worksheet h2 { margin-top: 30px; font-size: 2rem; }
.worksheet li { margin-bottom: 6px; }
.worksheet-pillar { margin-block: 14px; }
.worksheet-pillar h3 { margin-bottom: 6px; }
.worksheet-pillar p { margin-bottom: 5px; }
.worksheet-pillar span { display: block; font-size: .875em; }
.worksheet-example { margin-top: 24px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; }
.worksheet-example h2 { margin-top: 0; }
.worksheet-example p { margin-bottom: 0; }
@media (max-width: 700px) {
  .shell, .reading { width: calc(100% - 32px); }
  .hero-layout, .map-layout, .circle-layout { grid-template-columns: 1fr; gap: 20px; }
  .hero-layout { padding-block: 38px; }
  .map-figure svg { max-width: 285px; }
  .map-layout { padding-block: 32px 44px; }
  .score-row { grid-template-columns: 1fr; gap: 6px; }
  .bar .shell { min-height: 56px; }
}
@media print {
  body { background: white; color: black; font-size: 10pt; }
  header, footer, .skip, .no-print, #assessment { display: none !important; }
  .reading { width: 100%; padding: 0; }
  .reading h1 { font-size: 28pt; }
  .print-only { display: block; }
  .worksheet h2 { font-size: 17pt; margin: 12px 0 4px; }
  .print-line { min-height: 1.6rem; }
  p { margin-bottom: 6px; }
  .paper { border: 0; padding: 0; }
  .outcome > div, .worksheet section { break-inside: avoid; }
  .worksheet .worksheet-scores { break-inside: auto; }
  .worksheet-pillar { break-inside: avoid; margin-block: 8px; }
  .worksheet-pillar:nth-child(3) { break-before: page; }
  .worksheet-pillar h3 { font-size: 13pt; }
  .outcome .next-connection { padding: 0 0 10px; }
  .worksheet-example { margin-top: 12px; padding: 8px 10px; }
  .worksheet-example h2 { margin-top: 0; }
}

/* Needs map loop (map-loop.mjs): the canvas replaces the still picture once the script runs. */
.map-figure.is-live { padding: 0; overflow: hidden; background: #0f2229; }
.map-figure.is-live .map-art svg { display: none; }
.map-canvas { display: block; width: 100%; height: auto; }
.map-figure.is-live figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
