/* Clear Duty. Colours and type from the pack's BRAND.md. Typography-led, mobile first. Contrast checked to WCAG 2.2 AA.
   Amber fails contrast as text, so it is used only for rules and small accents, never for text. */

:root {
  color-scheme: light;
  --ink: #1b1f23;        /* 16:1 on white */
  --muted: #4a5560;      /* 7.5:1 on white, 6.6:1 on pale teal */
  --accent: #0d5c63;     /* teal, 7.3:1 on white */
  --accent-dark: #0a4a50;
  --accent-soft: #e7f1f2; /* pale teal; 6.6:1 against teal */
  --amber: #b4651e;      /* rules and accents only */
  --line: #7b8590;       /* 3.8:1, for control borders */
  --rule: #dde1e5;
  --track: #e3e6ea;
  --surface: #f6f7f8;
  --bg: #ffffff;
  --error: #a4262c;      /* 7:1 on white */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

.wrap { max-width: 42rem; margin: 0 auto; padding: 0 1rem; }
.wide { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 0.75rem; color: var(--ink); }
h1 { font-size: 2.125rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; margin-top: 2.75rem; }
h3 { font-size: 1.125rem; }
h1:focus, h2:focus, legend:focus { outline: none; }
p { margin: 0 0 1rem; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip { position: absolute; left: -999px; top: 0; background: var(--bg); padding: 0.5rem 1rem; z-index: 2; }
.skip:focus { left: 1rem; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.site-header .wide { padding-top: 1rem; padding-bottom: 1rem; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; flex-wrap: wrap; }
.brand { display: block; line-height: 0; }
.brand img { width: 160px; height: auto; }
.site-header nav a { margin-left: 1.5rem; color: var(--ink); font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.site-header nav a:first-child { margin-left: 0; }
.site-header nav a:hover { color: var(--accent); text-decoration: underline; }

main.wrap { padding-top: 2rem; padding-bottom: 4rem; }

.site-footer { background: var(--accent); color: var(--accent-soft); font-size: 0.9375rem; border-top: 4px solid var(--amber); }
.site-footer a { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; padding-top: 2.25rem; padding-bottom: 2.5rem; }
.footer-logo { width: 140px; height: auto; margin-bottom: 1rem; }
.site-footer nav a { margin-right: 1.25rem; }

/* Bands and sections */
.section { padding: 3rem 0; }
.section > .wide > h2:first-child, .section > .wrap > h2:first-child { margin-top: 0; }
.band-pale { background: var(--accent-soft); }
.band-teal { background: var(--accent); color: #fff; }
.band-teal h2, .band-teal h3 { color: #fff; }
.band-teal .lead { color: var(--accent-soft); }
a.on-teal { color: #fff; }
.band-teal :focus-visible { outline-color: #fff; }
/* Text sections inside a band line up with the wide grid, at reading width. */
.section > .wrap { max-width: 72rem; }
.section > .wrap > * { max-width: 42rem; }
.intro { color: var(--muted); max-width: 40rem; }
.cta-band { text-align: left; }
.cta-band h2::before { content: ""; display: block; width: 2.5rem; height: 3px; background: var(--amber); margin-bottom: 0.875rem; }

.hero { overflow-x: clip; background: linear-gradient(var(--accent-soft), var(--bg)); border-bottom: 1px solid var(--rule); padding: 2.5rem 0 3rem; }
.hero-grid { display: grid; gap: 2rem; align-items: start; }

/* Fanned covers in the hero: Start Here on top, Document 1 to the left, Document 5 to the right. */
.fan { position: relative; width: 100%; max-width: 22rem; aspect-ratio: 1 / 0.92; margin: 0.5rem auto 0; }
.fan img { position: absolute; top: 3%; left: 22%; width: 56%; border-radius: 0.25rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 12px 28px rgba(13, 92, 99, 0.18); }
.fan img:nth-child(1) { z-index: 3; }
.fan img:nth-child(2) { z-index: 2; transform: translateX(-32%) rotate(-6deg); transform-origin: bottom center; }
.fan img:nth-child(3) { z-index: 1; transform: translateX(32%) rotate(6deg); transform-origin: bottom center; }
.hero h1 { color: var(--accent); }
.hero .panel { margin-top: 0; background: var(--bg); border: 1px solid var(--rule); border-top: 4px solid var(--accent); }
.change-strip { padding: 2.5rem 0 0; }
.change-strip .change { max-width: 48rem; }
.change { background: var(--bg); border: 1px solid var(--rule); border-top: 4px solid var(--amber); border-radius: 0.375rem; padding: 1.25rem 1.25rem 0.25rem; }
.change h2 { font-size: 1.125rem; margin: 0 0 0.75rem; }
.change .claim { margin: 0 0 1rem; border: 0; background: none; padding: 0; }

/* Start page */
.eyebrow { color: var(--muted); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.75rem; }
.lead { font-size: 1.1875rem; }
.facts, .ticks, .rule-list { padding: 0; margin: 0 0 1.5rem; list-style: none; }
.facts li { padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.facts li:last-child { border-bottom: 1px solid var(--rule); }
.ticks li, .rule-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.625rem; }
.ticks li::before, .rule-list li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 0.75rem; height: 2px; background: var(--amber); }

.claim { border-left: 4px solid var(--accent); background: var(--surface); padding: 1rem 1rem 0.25rem; margin: 2rem 0; }
.source { color: var(--muted); font-size: 0.875rem; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.75rem; counter-reset: step; }
.steps li { counter-increment: step; }
.steps h3 { font-size: 1.25rem; }
.steps li > h3::before { content: counter(step); display: block; width: 2.25rem; font-size: 2rem; color: var(--accent); margin-bottom: 0.625rem; padding-bottom: 0.25rem; border-bottom: 3px solid var(--amber); }
.steps p { color: var(--muted); }
.steps.compact { gap: 1.25rem; }
.steps.compact h3 { font-size: 1.0625rem; }
.steps.compact li > h3::before { font-size: 1.5rem; }

/* Pack covers and contents */
.cover-band { list-style: none; padding: 0; margin: 1.5rem 0 1.75rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem 0.75rem; }
.cover-band p { font-size: 0.8125rem; line-height: 1.35; margin: 0.625rem 0 0; color: #fff; }
.cover-band .doc-num { display: block; color: var(--accent-soft); font-size: 0.8125rem; }
.cover { display: block; width: 100%; aspect-ratio: 1 / 1.414; border-radius: 0.25rem; background: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08); object-fit: contain; object-position: top; }
/* Every cover sits in the same page-shaped frame; the shorter workbook covers end on white. */
.band-teal img.cover { outline: 1px solid rgba(255, 255, 255, 0.45); outline-offset: 0; }
.cover-band li, .inside li { align-items: start; }
.placeholder { display: flex; align-items: center; justify-content: center; text-align: center; padding: 0.75rem; background: var(--track); border: 2px dashed var(--line); box-shadow: none; color: var(--muted); font-size: 0.875rem; font-weight: 600; }

.inside { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.5rem; }
.inside li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.inside .placeholder { font-size: 0.75rem; padding: 0.375rem; }
.inside h3 { margin: 0 0 0.375rem; }
.inside .doc-num { color: var(--muted); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 0.25rem; }
.inside .format { text-transform: none; letter-spacing: 0; font-weight: 400; }
.purpose { margin: 0; font-size: 0.9875rem; }

.samples { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.5rem; }
.sample { display: block; width: 100%; border-radius: 0.25rem; }
.sample.placeholder { aspect-ratio: 1 / 1.414; }
a.sample { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08); }
.sample img { display: block; width: 100%; border: 1px solid var(--rule); }
.sample.placeholder { font-size: 1rem; }
dialog.enlarge { max-width: min(60rem, 95vw); max-height: 95vh; padding: 1rem; border: 0; border-radius: 0.5rem; }
dialog.enlarge::backdrop { background: rgba(27, 31, 35, 0.75); }
dialog.enlarge form { text-align: right; margin-bottom: 0.75rem; }

.facts-strip { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; }
.facts-strip li { color: var(--muted); font-size: 0.9375rem; }
.facts-strip strong { display: block; font-family: var(--serif); font-size: 1.75rem; color: var(--accent); line-height: 1.1; }

.faq h3 { margin-top: 1.75rem; }
.faq blockquote { margin: 0 0 0.75rem; padding-left: 1rem; border-left: 4px solid var(--rule); }
.seller { margin-top: 2.75rem; padding: 1.25rem; border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 0.375rem; }
.seller h2 { margin-top: 0; font-size: 1.25rem; }
.seller p { margin-bottom: 0.5rem; }

/* Buttons */
.button {
  display: inline-block; min-height: 3rem; padding: 0.75rem 1.5rem;
  font: inherit; font-weight: 600; color: #fff; background: var(--accent);
  border: 2px solid var(--accent); border-radius: 0.25rem; cursor: pointer; text-decoration: none;
}
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button:disabled { opacity: 0.6; cursor: progress; }
.button.secondary { color: var(--accent); background: var(--bg); }
.button.secondary:hover { background: var(--accent-soft); }

.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.actions .button:last-child:not(:first-child) { margin-left: auto; }
.actions.start { margin-bottom: 0.75rem; }

.status { color: var(--muted); font-size: 0.9375rem; margin-top: 1rem; }

/* Progress */
.progress { margin-bottom: 1.75rem; }
.progress-text { color: var(--muted); font-size: 0.875rem; margin-bottom: 0.375rem; }
.progress-track { height: 0.375rem; background: var(--track); border-radius: 1rem; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.2s ease; }

/* Questions */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.question { font-family: var(--serif); font-weight: 700; font-size: 1.375rem; line-height: 1.3; margin-bottom: 1.25rem; }
.done { font-weight: 600; color: var(--accent); }
.section-label { color: var(--muted); font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; }

.option {
  display: flex; align-items: flex-start; gap: 0.75rem;
  min-height: 3rem; padding: 0.875rem 1rem; margin-bottom: 0.625rem;
  border: 1px solid var(--line); border-radius: 0.25rem; cursor: pointer;
}
.option:hover { background: var(--surface); }
.option:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); padding: calc(0.875rem - 1px) calc(1rem - 1px); }
.option input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--accent); }

label.field { display: block; font-weight: 600; margin-bottom: 0.375rem; }
select, input[type="email"] {
  display: block; width: 100%; min-height: 3rem; padding: 0.625rem 0.75rem;
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 0.25rem;
}
.check { display: flex; gap: 0.625rem; align-items: flex-start; margin: 1rem 0; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--accent); }

.error { color: var(--error); font-weight: 600; margin: 0.5rem 0 0; }
.error:empty { display: none; }
[aria-invalid="true"] { border-color: var(--error); }

/* Result: laid out as a report */
.report-head { background: var(--accent-soft); border-top: 4px solid var(--accent); border-radius: 0.375rem; padding: 1.25rem 1.25rem 1.5rem; }
.report-head .lead { margin-bottom: 1.25rem; }
.band { font-size: 2.25rem; margin-bottom: 0.5rem; color: var(--accent); }
.total { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 0.5rem; }
.total-bar { background: var(--bg); }
.report-card { border: 1px solid var(--rule); border-radius: 0.375rem; padding: 1.25rem; margin-top: 1.5rem; }
.report-card h2 { margin-top: 0; font-size: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--rule); margin-bottom: 1rem; }
.report-card > .small:last-child, .report-card > p:last-child { margin-bottom: 0; }
.areas { list-style: none; padding: 0; margin: 0; }
.areas li { margin-bottom: 1rem; }
.areas li:last-child { margin-bottom: 0; }
.area-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.375rem; font-weight: 600; }
.area-score { color: var(--muted); font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { height: 0.625rem; background: var(--track); border-radius: 0.125rem; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }

.gaps { list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: gap; }
.gaps li { counter-increment: gap; position: relative; padding: 0.625rem 0 0.625rem 2.75rem; border-bottom: 1px solid var(--rule); font-weight: 600; }
.pack-line { margin: 0.25rem 0 0; font-weight: 400; font-size: 0.9375rem; color: var(--muted); }
.refund-line { margin-top: 0.75rem; }
.gaps li::before { content: counter(gap); position: absolute; left: 0; top: 0.5rem; width: 1.875rem; height: 1.875rem; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--serif); font-size: 1rem; line-height: 1.875rem; text-align: center; }
#flow .panel { border-top: 4px solid var(--accent); }

.panel { background: var(--surface); border-radius: 0.375rem; padding: 1.25rem 1rem; margin-top: 2.5rem; }
.panel h2 { margin-top: 0; }
.small { font-size: 0.9375rem; color: var(--muted); }

/* Content pages */
.actions.start .button:last-child { margin-left: 0; }
.view { border-left: 4px solid var(--rule); padding-left: 1rem; color: var(--muted); }
.docs { padding-left: 1.5rem; }
.docs li { margin-bottom: 0.875rem; }
.format { display: inline-block; font-size: 0.8125rem; color: var(--muted); border: 1px solid var(--line); border-radius: 0.25rem; padding: 0 0.375rem; margin-left: 0.25rem; }
.price { font-family: var(--serif); font-size: 2.25rem; font-weight: 700; color: var(--accent); margin-bottom: 0.75rem; }
.legal h1 { color: var(--accent); }
.legal h2 { margin-top: 2rem; font-size: 1.25rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: 0.375rem; }
.draft-banner { background: #fff4d6; border: 2px solid #8a5a00; color: #4d3200; padding: 0.75rem 1rem; border-radius: 0.375rem; }

/* Articles */
.article h1 { color: var(--accent); }
.article h2 { padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.article-meta { color: var(--muted); font-size: 0.875rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 3px solid var(--amber); display: inline-block; }
.answer { font-size: 1.125rem; background: var(--accent-soft); border-radius: 0.375rem; padding: 1rem 1.25rem; }
.article ol, .article ul { padding-left: 1.25rem; }
.article li { margin-bottom: 0.5rem; }
.cta { background: var(--accent-soft); border-top: 4px solid var(--accent); border-radius: 0.375rem; margin-top: 2.5rem; padding: 1.25rem; }
.cta h2 { border-top: 0; padding-top: 0; margin-top: 0; }
.cta > :last-child { margin-bottom: 0; }
.table-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--rule); border-radius: 0.375rem; }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 44rem; font-size: 0.9375rem; }
.table-scroll caption { text-align: left; padding: 0.75rem; font-weight: 600; }
.table-scroll th, .table-scroll td { border-top: 1px solid var(--rule); padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
.table-scroll thead th { background: var(--accent); color: #fff; }
.table-scroll tbody th { background: var(--accent-soft); }
.table-scroll.narrow table { min-width: 0; }
.example-row td { background: var(--accent-soft); }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #fff; background: var(--accent); border-radius: 0.25rem; padding: 0.05rem 0.4rem; margin-bottom: 0.25rem; }

@media (min-width: 40rem) {
  h1 { font-size: 2.75rem; }
  main.wrap { padding-top: 3rem; }
  .panel { padding: 1.5rem; }
  .section { padding: 4rem 0; }
  .hero { padding: 4rem 0; }
  .cover-band { grid-template-columns: repeat(5, 1fr); gap: 1.75rem 1.25rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .steps.compact { grid-template-columns: repeat(2, 1fr); }
  .samples { grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (min-width: 56rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
  .fan { max-width: 26rem; margin-top: 0; }
  .fan img:nth-child(2) { transform: translateX(-36%) rotate(-7deg); }
  .fan img:nth-child(3) { transform: translateX(36%) rotate(7deg); }
  .cover-band { grid-template-columns: repeat(6, 1fr); }
  .inside { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .inside li { grid-template-columns: 6.5rem 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill { transition: none; }
}
