/*
 * Done With Windows 10: styles.
 *
 * The idea: the plan your most helpful friend would write out for you on a sheet of squared
 * notebook paper. Ballpoint-blue ink, a red margin line, a yellow highlighter on the one date
 * that matters, and a red pen circle round the days left. The hand-made touches sit on a very
 * plain, very legible base, because many readers are older or not confident with computers.
 *
 * Type: Atkinson Hyperlegible Next, made by the Braille Institute for low-vision readers.
 * Colour carries meaning: blue is the way forward, yellow marks what's important, red is a warning.
 */

@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("atkinson-next-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("atkinson-next-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("atkinson-next-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --paper: #fcfcfd;        /* the page */
  --grid: #e3e8f4;         /* squared paper */
  --rule: #d6dcec;         /* ruled lines, borders */
  --ink: #1c2340;          /* body text: ballpoint ink */
  --ink-soft: #4a5170;     /* secondary text */
  --pen: #2645b8;          /* headings, links, buttons: the way forward */
  --pen-deep: #1b3391;
  --pen-tint: #edf1ff;
  --marker: #ffe94d;       /* highlighter: the date that matters */
  --red: #c8352b;          /* red pen: warnings and the margin line */
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --margin: 5.25rem;       /* where the red margin line sits on the sheets */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 1.125rem; line-height: 1.6;
}
[hidden] { display: none !important; }
img, svg { display: block; }
a { color: var(--pen); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--pen-deep); text-decoration-thickness: 0.14em; }
p, li { max-width: 40rem; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 0.5rem; color: var(--pen); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.125rem; font-weight: 700; margin-top: 1.5rem; color: var(--ink); }
strong { font-weight: 700; }
[tabindex="-1"]:focus { outline: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -3rem; background: var(--ink); color: #fff; padding: 0.5rem 0.75rem; border-radius: 6px; z-index: 10; }
.skip:focus { top: 0.75rem; }
.muted { color: var(--ink-soft); }

/* ---------------------------------------------------------------- header and footer */

.site-header { margin-bottom: 1.5rem; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; min-height: 4.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 2.4rem; height: 2.4rem; flex: none; }
.brand-mark path { fill: none; stroke: var(--pen); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.header-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: 1rem; }

.site-footer { margin-top: 4.5rem; padding: 2rem 0 3rem; border-top: 2px solid var(--rule); color: var(--ink-soft); font-size: 0.95rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }

/* ---------------------------------------------------------------- the sheets (squared paper with a margin) */

.sheet {
  position: relative; padding: 2.75rem 2.5rem 2.75rem var(--margin);
  background-color: #fff;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 1.5rem 1.5rem; background-position: -1px -1px;
  border: 1px solid var(--rule); border-radius: 4px;
}
.sheet::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--margin) - 1.4rem); width: 2px;
  background: var(--red); opacity: 0.55;
}

/* ---------------------------------------------------------------- hero */

.hero h1 {
  font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero h1 span { display: block; }
.lede { font-size: 1.3rem; line-height: 1.5; margin: 0 0 1.5rem; max-width: 34rem; }
.deadline-line { font-size: 1.3rem; line-height: 1.7; margin: 0 0 0.75rem; max-width: 36rem; }

mark {
  color: inherit; font-weight: 700; padding: 0.05em 0.25em; margin: 0 -0.05em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M2 5 Q30 2 60 3.5 T98 3 L97 17 Q70 18.5 40 17 T3 17.5 Z' fill='%23ffe94d'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.circled { position: relative; display: inline-block; font-weight: 800; padding: 0 0.3em; margin: 0 0.35em 0 0.2em; white-space: nowrap; }
.circled::after {
  content: ""; position: absolute; inset: -0.5em -0.5em -0.4em -0.55em; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 80' preserveAspectRatio='none'%3E%3Cpath d='M58 9 C120 2 190 12 194 38 C198 66 120 77 70 74 C25 71 4 58 6 40 C8 22 40 12 96 8' fill='none' stroke='%23c8352b' stroke-width='3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  transform: rotate(-2deg);
}
.red-note { color: var(--red); font-weight: 700; margin: 0 0 1.75rem; max-width: 36rem; }
.red-note a { color: var(--red); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.fine-print { margin: 1.1rem 0 0; color: var(--ink-soft); font-size: 1rem; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 2px solid var(--pen); border-radius: 8px; padding: 0.8rem 1.4rem; min-height: 3.2rem;
}
.btn-pen { background: var(--pen); color: #fff; }
.btn-pen:hover { background: var(--pen-deep); border-color: var(--pen-deep); color: #fff; }
.btn-outline { background: #fff; color: var(--pen); }
.btn-outline:hover { background: var(--pen-tint); color: var(--pen-deep); }

/* ---------------------------------------------------------------- the worksheet (the check) */

.worksheet { margin-top: 2.5rem; }
.check-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.check-progress { margin: 0; color: var(--ink-soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.computer-note { margin: 0.25rem 0 0; color: var(--ink-soft); }
html:not(.js) #check-form { display: none; }

.question { border: 0; margin: 1.75rem 0 0; padding: 0; min-width: 0; }
.question legend {
  position: relative; padding: 0; margin-bottom: 0.4rem; max-width: 36rem;
  font-size: 1.45rem; font-weight: 700; line-height: 1.25; color: var(--ink);
}
.question legend::before, .plan-steps li::before {
  position: absolute; display: grid; place-items: center; width: 2.6rem; height: 2.6rem;
  font-weight: 800; font-size: 1.2rem; color: var(--pen);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cpath d='M30 5 C46 4 56 16 55 31 C54 47 42 56 28 55 C13 54 4 43 5 29 C6 15 18 6 36 6' fill='none' stroke='%232645b8' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.question legend::before { content: attr(data-n); left: calc(-1 * var(--margin) + 0.9rem); top: -0.4rem; }
.hint { margin: 0 0 1rem; color: var(--ink-soft); }

.choice {
  display: flex; gap: 0.9rem; align-items: flex-start; cursor: pointer; max-width: 40rem;
  background: #fff; border: 2px solid var(--rule); border-radius: 10px; padding: 0.9rem 1rem; margin: 0 0 0.6rem;
}
.choice:hover { border-color: var(--ink-soft); }
.choice:has(input:checked) { border-color: var(--pen); background: var(--pen-tint); }
.choice input {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0.12rem 0 0; cursor: pointer;
  width: 1.5rem; height: 1.5rem; border: 2px solid var(--pen); background: #fff no-repeat center;
}
.choice input[type="radio"] { border-radius: 50%; }
.choice input[type="radio"]:checked { background-image: radial-gradient(circle, var(--pen) 0 42%, transparent 46%); }
.choice input[type="checkbox"] { border-radius: 5px; }
.choice input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5 L9.5 18 L20.5 5.5' fill='none' stroke='%232645b8' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 1.15rem;
}
.choice strong { display: block; }
.choice-note { display: block; color: var(--ink-soft); font-size: 1rem; }
.question-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.check-error { margin: 0.75rem 0 0; color: var(--red); font-weight: 700; }
.check-error:empty { margin: 0; }

/* ---------------------------------------------------------------- the plan */

.plan { margin-top: 0.75rem; }
.plan-title { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); font-weight: 800; letter-spacing: -0.015em; max-width: 26ch; margin-bottom: 0.75rem; }
.plan-intro { margin: 0 0 1rem; color: var(--ink-soft); }
.plan-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.plan-steps li { counter-increment: step; position: relative; margin: 0 0 1.5rem; max-width: 40rem; }
.plan-steps li::before { content: counter(step); left: calc(-1 * var(--margin) + 0.9rem); top: -0.35rem; }
.plan-steps h3 { color: var(--ink); margin: 0 0 0.25rem; }
.plan-steps p { margin: 0 0 0.35rem; }
.plan-steps a { font-weight: 700; }
.plan-notes { list-style: none; margin: 0.5rem 0 0; padding: 0.9rem 0 0; border-top: 2px dashed var(--rule); max-width: 40rem; color: var(--ink-soft); }
.plan-notes li + li { margin-top: 0.6rem; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.plan-link { display: block; width: 100%; max-width: 40rem; margin-top: 0.75rem; font: inherit; padding: 0.6rem 0.75rem; border: 2px solid var(--ink-soft); border-radius: 8px; }
.plan-status { margin: 0.75rem 0 0; color: var(--pen); font-weight: 700; }
.plan-status:empty { margin: 0; }

/* ---------------------------------------------------------------- options table */

.block { margin-top: 4rem; }
.table-scroll { overflow-x: auto; margin-top: 1rem; }
table.options { width: 100%; min-width: 46rem; border-collapse: collapse; }
table.options th, table.options td { text-align: left; vertical-align: top; padding: 0.75rem 0.65rem; border-bottom: 1px solid var(--rule); }
table.options thead th { color: var(--pen); font-weight: 800; border-bottom: 3px solid var(--pen); }
table.options tbody th { font-weight: 700; color: var(--ink-soft); width: 9.5rem; }

/* ---------------------------------------------------------------- guides */

.guides > .muted { margin-top: 0; }
.guide-index ul { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.guide-index li { max-width: none; }
.guide-index a {
  display: inline-block; padding: 0.45rem 0.9rem; border: 2px solid var(--rule); border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: 1rem; background: #fff;
}
.guide-index a:hover { border-color: var(--pen); background: var(--pen-tint); }

.guide { padding: 2.25rem 0 0.5rem; margin-top: 2rem; border-top: 2px solid var(--rule); }
.guide h3 { font-size: clamp(1.45rem, 1.25rem + 0.7vw, 1.75rem); font-weight: 800; letter-spacing: -0.01em; }
.plain-list { padding-left: 1.25rem; margin: 0.6rem 0; }
.plain-list li { margin: 0.4rem 0; }
.plain-list li::marker { color: var(--pen); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 1.25rem 0; }
.steps li { counter-increment: s; position: relative; padding-left: 2.9rem; margin: 0 0 0.85rem; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -0.15rem; width: 2.05rem; height: 2.05rem;
  display: grid; place-items: center; font-weight: 800; font-size: 1rem; color: var(--pen);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cpath d='M30 5 C46 4 56 16 55 31 C54 47 42 56 28 55 C13 54 4 43 5 29 C6 15 18 6 36 6' fill='none' stroke='%232645b8' stroke-width='3.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.source { font-size: 0.95rem; color: var(--ink-soft); }
.keys { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 1.75rem; max-width: 48rem; }
.keys li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.keys strong { display: inline-block; min-width: 5rem; }

details { border-top: 1px solid var(--rule); padding: 0.9rem 0; max-width: 46rem; }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 700; }
summary::marker { color: var(--pen); }
details p { margin: 0.5rem 0 0.25rem; color: var(--ink-soft); }

/* ---------------------------------------------------------------- small screens */

@media (max-width: 44rem) {
  :root { --margin: 3rem; }
  body { font-size: 1.0625rem; }
  .sheet { padding: 2rem 1.1rem 2rem var(--margin); border-left: 0; border-right: 0; border-radius: 0; margin-left: -1.25rem; margin-right: -1.25rem; }
  .sheet::before { left: calc(var(--margin) - 0.9rem); }
  .lede, .deadline-line { font-size: 1.15rem; }
  .question legend::before, .plan-steps li::before { width: 2.1rem; height: 2.1rem; font-size: 1rem; left: calc(-1 * var(--margin) + 0.15rem); }
  .question legend { font-size: 1.3rem; }
  .hero-actions .btn, .question-actions .btn, .plan-actions .btn { flex: 1 1 auto; }
}

@media print {
  .site-header nav, .hero-actions, #check-form, .plan-actions, .guide-index, .site-footer { display: none; }
  .sheet { background: none; border: 0; }
}
