@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1b1916;
  --paper: #f3f0ea;
  --card: #ffffff;
  --link: #0c3d86;
  --muted: #3e3933;
  --line: #1b1916;
  --checked: #e3f2ef;
  --checked-line: #0e5c52;
  --tap: #e7f2f0;
  --preview: #d9d3c8;
  color-scheme: light;
}

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

html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible", "Segoe UI", "Noto Sans", sans-serif;
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a,
button,
.check-row,
.start-card,
.topic-card,
.link-card {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(14, 92, 82, 0.18);
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -4rem;
  z-index: 10;
  padding: 12px 16px;
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 8px;
}

.wrap {
  width: min(40rem, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  border-bottom: 2px solid var(--line);
  background: var(--paper);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 64px;
  font-size: 1.75rem;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}

.site-footer {
  margin-top: 8px;
  border-top: 2px solid var(--line);
  padding: 8px 0 28px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-note {
  color: var(--muted);
  font-size: 1.05rem;
}

main {
  padding-top: 12px;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 0.4rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 0.6rem;
}

.lede {
  font-size: 1.3rem;
  margin: 0 0 1rem;
}

.save-note {
  margin: -0.4rem 0 1rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 0 8px;
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-section {
  margin: 0 0 2rem;
}

.topics {
  margin-top: 0.5rem;
}

.start-list,
.topic-list,
.link-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.start-card,
.topic-card,
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 10px;
}

.start-card {
  min-height: 120px;
  border-width: 3px;
}

.start-card:active,
.topic-card:active,
.link-card:active,
.button:active,
.check-row:active,
.section-nav a:active {
  background: var(--tap);
}

.start-card .icon {
  width: 84px;
  height: 84px;
}

.topic-card .icon,
.link-card .icon {
  width: 64px;
  height: 64px;
}

.card-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
}

.start-card .card-title {
  font-size: 1.85rem;
}

.card-text,
.count,
.kind {
  margin-top: 2px;
  font-size: 1.05rem;
}

.kind,
.count {
  font-weight: 700;
}

.section-label {
  margin: 0.4rem 0 8px;
  font-weight: 700;
}

.section-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 1.25rem;
}

.section-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 12px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 10px;
}

.step-group {
  margin: 1.6rem 0 0.75rem;
  padding-top: 0.85rem;
  border-top: 2px solid var(--line);
  scroll-margin-top: 12px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 16px 20px;
  text-align: center;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 10px;
}

.step-number {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 3rem;
  padding: 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
}

.step .icon {
  width: min(220px, 100%);
  height: auto;
  margin: 8px auto 4px;
}

.step-text {
  font-size: clamp(1.7rem, 5vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
}

.steps-board .step-text {
  font-size: clamp(2rem, 6vw, 2.5rem);
}

.step-detail {
  margin-top: 6px;
  color: var(--muted);
  font-size: 1.15rem;
}

.step-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 8px;
  padding: 8px 4px;
  font-weight: 700;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.progress {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.check-group + .check-group {
  margin-top: 1.25rem;
}

.check-group h2 {
  margin-bottom: 8px;
}

.check-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 88px;
  padding: 10px 12px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.check-row input {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  accent-color: var(--checked-line);
}

.check-row .icon {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
}

.check-label {
  flex: 1;
  min-width: 0;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
}

.check-row:has(input:checked) {
  background: var(--checked);
  border-color: var(--checked-line);
}

.check-row:focus-within {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

.actions,
.end-home,
.reset-row,
.tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1.25rem;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--ink);
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.button-secondary {
  color: var(--ink);
  background: var(--card);
}

.button-secondary:active {
  background: var(--tap);
}

.pack {
  margin: 0 0 12px;
  padding: 14px 16px 16px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 10px;
}

.pack h2 {
  margin-top: 0;
}

.pack p + p {
  margin-top: 6px;
}

.status {
  font-weight: 700;
}

.pack-links {
  margin-top: 8px;
}

.pack-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.screen-end {
  margin-bottom: 1.5rem;
}

.preview-bar {
  display: none;
}

.paper {
  display: none;
}

.paper:target {
  display: block;
}

body:has(.paper:target) {
  background: var(--preview);
}

body:has(.paper:target) .screen-only,
body:has(.paper:target) .site-header,
body:has(.paper:target) .site-footer,
body:has(.paper:target) .skip-link {
  display: none;
}

body:has(.paper:target) .preview-bar {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 4;
  gap: 8px;
  align-items: center;
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}

.preview-bar .button {
  width: auto;
  flex: 1;
}

.paper {
  width: 210mm;
  min-height: 297mm;
  margin: 12px auto 28px;
  padding: 12mm;
  background: #fff;
  color: #1b1916;
}

.cut-hint,
.paper .lede,
.print-brand {
  font-size: 12pt;
}

.cut-hint,
.paper .lede {
  margin: 0 0 4mm;
}

.print-brand {
  margin: 4mm 0 0;
}

.paper h1 {
  margin: 0 0 4mm;
  font-size: 22pt;
}

.cut-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5mm;
}

.cut-card {
  display: flex;
  flex: 0 0 calc(50% - 2.5mm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: calc(50% - 2.5mm);
  min-height: 112mm;
  padding: 4mm;
  text-align: center;
  border: 1.25pt dashed #1b1916;
  break-inside: avoid;
  page-break-inside: avoid;
}

.card-kicker {
  font-size: 11pt;
  font-weight: 700;
}

.cut-card .num,
.poster-step .num {
  font-size: 18pt;
  font-weight: 700;
}

.cut-card .icon {
  width: 36mm;
  height: 36mm;
  margin: 2mm 0;
}

.cut-card .step-text {
  font-size: 16pt;
  line-height: 1.2;
}

.cut-card .step-detail {
  margin-top: 2mm;
  color: #1b1916;
  font-size: 11pt;
}

.poster-list,
.print-items {
  display: flex;
  flex-direction: column;
  gap: 3mm;
}

.poster-group {
  margin: 2mm 0 0;
  font-size: 14pt;
}

.poster-step,
.print-item {
  display: flex;
  align-items: center;
  gap: 4mm;
  padding: 2.5mm 3mm;
  border: 1.5pt solid #1b1916;
  break-inside: avoid;
  page-break-inside: avoid;
}

.poster-step .icon {
  width: 18mm;
  height: 18mm;
  flex: none;
}

.poster-step p,
.print-item p {
  margin: 0;
  font-size: 16pt;
  font-weight: 700;
  line-height: 1.2;
}

.poster-step .num {
  flex: none;
  min-width: 8mm;
  font-size: 16pt;
}

.print-item {
  min-height: 20mm;
}

.tick-box {
  flex: none;
  width: 12mm;
  height: 12mm;
  border: 1.5pt solid #1b1916;
}

.print-item .icon {
  width: 16mm;
  height: 16mm;
  flex: none;
}

.print-items {
  margin-bottom: 3mm;
}

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

@media (forced-colors: active) {
  .start-card,
  .topic-card,
  .link-card,
  .step,
  .check-row,
  .button,
  .section-nav a,
  .cut-card,
  .poster-step,
  .print-item,
  .tick-box {
    border-color: CanvasText;
  }

  .step-number {
    background: CanvasText;
    color: Canvas;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  body {
    background: #fff !important;
    padding: 0;
  }

  .screen-only,
  .site-header,
  .site-footer,
  .skip-link,
  .preview-bar,
  .no-print {
    display: none !important;
  }

  .paper {
    display: none !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #cards,
  #print {
    display: block !important;
  }

  body:has(#poster:target) #cards {
    display: none !important;
  }

  body:has(#poster:target) #poster {
    display: block !important;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
