/* Fonts are hosted with the site, so no visitor data goes to a font service */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/source-serif-4.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-serif-4-italic.woff2") format("woff2");
}

:root {
  --night: #0A295A;
  --night-2: #123A70;
  --dawn: #73C4CF;
  --dusk: #24669B;
  --ink: #0A295A;
  --muted: #4A5B72;
  --paper: #F5F8FA;
  --mist: #E5EFF3;
  --line: #CCDAE3;
  --alert: #9B2C2C;
  --alert-bg: #FBEDEC;

  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 112px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 112px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .btn, .brand, .nav, summary, label, legend, dt, .result-title, .compare-head, [role="rowheader"] {
  font-family: var(--sans);
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: var(--dusk); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--dusk); outline-offset: 3px; border-radius: 2px; }
.hero :focus-visible, .page-hero :focus-visible, .band :focus-visible, .site-footer :focus-visible { outline-color: var(--dawn); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: 66ch; }
.small { font-size: 0.95rem; color: var(--muted); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 16px; top: 0; transform: translateY(-120%); z-index: 20;
  background: var(--dawn); color: var(--night); padding: 8px 14px;
  font-family: var(--sans); font-weight: 600; text-decoration: none;
}
.skip:focus { transform: translateY(12px); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8em 1.4em;
  border: 2px solid var(--night);
  border-radius: 6px;
  background: var(--night);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--dusk); border-color: var(--dusk); color: #fff; }
.btn-small { padding: 0.55em 1em; font-size: 0.95rem; }
.btn-dawn { background: var(--dawn); border-color: var(--dawn); color: var(--night); }
.btn-dawn:hover { background: #9AD6DE; border-color: #9AD6DE; color: var(--night); }
.btn-ghost { background: transparent; border-color: rgba(245, 246, 250, 0.45); color: var(--paper); }
.btn-ghost:hover { background: rgba(245, 246, 250, 0.1); border-color: var(--paper); color: var(--paper); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 96px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; height: 76px; width: auto; }
.site-header nav { margin-left: auto; }
.nav { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 0.98rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--dusk); text-decoration: underline; }
.nav a[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--dawn);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.4em;
}

.menu-toggle {
  display: none;
  font: 600 0.95rem var(--sans);
  color: var(--ink);
  background: none;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 0.5em 0.9em;
  cursor: pointer;
}
.menu-toggle:hover { border-color: var(--dusk); }

@media (max-width: 1040px) {
  .menu-toggle { display: inline-block; margin-left: auto; }
  .site-header nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(10, 41, 90, 0.08);
  }
  .site-header.nav-open nav { display: block; }
  .nav { flex-direction: column; gap: 0; padding: 4px var(--gutter) 16px; font-size: 1.05rem; }
  .nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
}
/* Enlarged text (accessibility options): the full menu no longer fits, so use the Menu button at every width */
html[data-a11y-text] .menu-toggle { display: inline-block; margin-left: auto; }
html[data-a11y-text] .site-header nav {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  max-height: calc(100vh - 100px); overflow-y: auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(10, 41, 90, 0.08);
}
html[data-a11y-text] .site-header.nav-open nav { display: block; }
html[data-a11y-text] .nav { flex-direction: column; gap: 0; padding: 4px var(--gutter) 16px; font-size: 1.05rem; }
html[data-a11y-text] .nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { html[data-a11y-text] .header-cta { display: none; } }

@media (max-width: 560px) {
  .header-cta { display: none; }
  .brand-logo { height: 60px; }
}

/* Inner page banner */
.page-hero { background: var(--night); color: var(--paper); padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; max-width: 20ch; }
.page-hero p { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: #D2E3EE; max-width: 56ch; margin: 0.6em 0 0; }
.band-link { color: var(--dawn); }
.band-link:hover { color: #fff; }

/* Hero */
.hero {
  background: var(--night);
  color: var(--paper);
  padding-top: clamp(40px, 6vw, 80px);
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.25rem);
  font-weight: 700;
  max-width: 20ch;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); max-width: 54ch; color: #D2E3EE; margin-top: 0.75em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); gap: clamp(32px, 5vw, 64px); align-items: end; }
.hero-photo { margin: 0; }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; border-radius: 10px; box-shadow: 0 0 0 1px rgba(115, 196, 207, 0.35); }
.hero-photo figcaption { margin-top: 12px; font-family: var(--sans); font-weight: 600; font-size: 0.98rem; color: #D2E3EE; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { max-width: 320px; }
}

.trace { position: relative; margin: clamp(48px, 7vw, 80px) 0 0; padding-bottom: 40px; }
.trace svg { display: block; width: 100%; height: clamp(90px, 12vw, 140px); }
.trace-line {
  fill: none;
  stroke: var(--dawn);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .trace-line { stroke-dashoffset: 1; animation: draw 4.2s cubic-bezier(.45,.05,.4,1) 0.3s forwards; }
  .pause-mark, .trace-caption { opacity: 0; animation: appear 0.6s ease 2.6s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* bracket under the flat stretch of the trace (x 540–760 of 1200) */
.pause-mark {
  position: absolute;
  left: 45%; width: 18.33%;
  top: calc(clamp(90px, 12vw, 140px) * 0.5 + 18px);
  height: 10px;
  border: 1px solid rgba(115, 196, 207, 0.75);
  border-top: 0;
}
.trace-caption {
  position: relative;
  max-width: 34ch;
  margin: 18px 0 0 45%;
  padding-right: var(--gutter);
  font-size: 0.98rem;
  line-height: 1.5;
  color: #D2E3EE;
}
@media (max-width: 700px) {
  .trace-caption { margin-left: var(--gutter); max-width: none; }
}

/* Sections */
.section { padding: var(--section) 0; }
.section-mist { background: var(--mist); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* Symptom checker */
.checker fieldset { border: 0; margin: 0; padding: 0; }
.check {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem; font-weight: 500; line-height: 1.4;
  cursor: pointer;
}
.check:first-child { border-top: 1px solid var(--line); }
.check input {
  flex: none; width: 22px; height: 22px; margin: 0;
  accent-color: var(--dusk);
}
.check-urgent input { accent-color: var(--alert); }

.result {
  margin-top: 24px;
  padding: 20px 22px;
  background: var(--mist);
  border-left: 4px solid var(--line);
  transition: border-color 0.2s;
}
.result p:last-child { margin-bottom: 0; }
.result-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.3em; }
.result[data-level="some"] { border-left-color: var(--dusk); }
.result[data-level="strong"] { border-left-color: var(--night); background: #D6E6EE; }
.result .btn { margin-top: 6px; }
.urgent {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--alert-bg);
  color: var(--alert);
  border-left: 4px solid var(--alert);
  font-size: 1rem;
}

/* Do / don't */
.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); margin-top: 40px; }
@media (max-width: 760px) { .do-dont { grid-template-columns: 1fr; } }
.ticks, .crosses { list-style: none; margin: 0; padding: 0; }
.ticks li, .crosses li { position: relative; padding: 12px 0 12px 34px; border-top: 1px solid var(--line); }
.ticks li::before, .crosses li::before {
  position: absolute; left: 2px; top: 12px;
  font-family: var(--sans); font-weight: 700;
}
.ticks li::before { content: "✓"; color: var(--dusk); }
.crosses li::before { content: "✕"; color: var(--muted); }

/* Comparison */
.compare { margin-top: 40px; border-top: 2px solid var(--ink); }
.compare-row {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 1fr 1fr;
  border-bottom: 1px solid var(--line);
}
.compare-row > span { padding: 16px 16px 16px 0; font-size: 1rem; line-height: 1.45; }
.compare-head > span { font-weight: 600; font-size: 0.98rem; align-self: end; }
[role="rowheader"] { font-weight: 600; }
.col-ours { background: rgba(36, 102, 155, 0.07); padding-left: 16px !important; }
.compare-head .col-ours { color: var(--dusk); }

@media (max-width: 760px) {
  .compare-head { display: none; }
  .compare-row { grid-template-columns: 1fr; padding: 14px 0; }
  .compare-row > span { padding: 4px 0; }
  [role="rowheader"] { font-size: 1.05rem; padding-bottom: 8px !important; }
  [role="cell"]::before {
    content: attr(data-label) ": ";
    font-family: var(--sans); font-weight: 600; color: var(--muted);
  }
  .col-ours { padding: 8px 12px !important; }
}

/* CPAP band */
.band { background: var(--night-2); color: var(--paper); padding: clamp(48px, 6vw, 72px) 0; }
.band-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 64px); }
.band h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.band p { color: #D2E3EE; max-width: 62ch; }
.band p:last-child { margin-bottom: 0; color: var(--paper); font-weight: 600; }
@media (max-width: 760px) { .band-inner { grid-template-columns: 1fr; } }

/* Steps: a real sequence */
.steps {
  list-style: none; counter-reset: step;
  margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 48px);
}
.steps li { counter-increment: step; padding-top: 18px; border-top: 2px solid var(--ink); }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--sans); font-weight: 700; font-size: 2rem; line-height: 1;
  color: var(--dusk);
  margin-bottom: 14px;
}
.steps h2 { font-size: 1.2rem; font-weight: 600; }
.steps p { font-size: 1.02rem; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.steps:first-child { margin-top: 0; }

/* Home: where to go next */
.paths {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 48px);
}
.paths li { padding-top: 18px; border-top: 2px solid var(--dawn); }
.paths h3 a { color: var(--ink); text-decoration-color: var(--dawn); text-decoration-thickness: 2px; }
.paths h3 a:hover { color: var(--dusk); }
.paths p { font-size: 1.02rem; margin: 0; }
@media (max-width: 760px) { .paths { grid-template-columns: 1fr; } }

.band .btn { margin-top: 20px; }

/* Lists in prose */
.levels, .bullets { padding-left: 1.2em; margin: 0 0 1em; }
.levels li, .bullets li { margin-bottom: 0.4em; }
.next-link { margin: 48px 0 0; font-family: var(--sans); font-weight: 600; font-size: 1.05rem; }
.contact-bring { margin-top: 28px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 18px 0;
  font-weight: 600; font-size: 1.1rem;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; font-size: 1.4rem; line-height: 1; color: var(--dusk);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { max-width: 62ch; padding-bottom: 8px; }

/* Booking */
.contact { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 24px; margin: 28px 0 0; }
.contact dt { font-weight: 600; font-size: 0.98rem; }
.contact dd { margin: 0; overflow-wrap: anywhere; }

.enquiry {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(20px, 4vw, 36px);
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.field label { font-weight: 600; font-size: 0.98rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem;
  padding: 11px 12px;
  border: 1px solid #AFC3D1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--dusk); outline-offset: 1px;
}
.form-note { margin: 12px 0 0; }

/* Footer */
.site-footer { background: var(--night); color: #C4D6E3; padding: 56px 0 32px; font-size: 1rem; }
.site-footer a { color: var(--dawn); }
.site-footer .brand-name { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; color: var(--paper); margin-bottom: 0.4em; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px clamp(32px, 6vw, 80px); }
.footer-inner p { max-width: 60ch; }
.footer-inner .copyright { max-width: none; }
.copyright {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin: 16px 0 0; padding-top: 20px;
  border-top: 1px solid rgba(245, 246, 250, 0.12);
  color: #98B1C6;
}
.site-footer .footer-link { color: var(--paper); }

/* Privacy notice page */
.notice { padding: clamp(48px, 7vw, 88px) 0 var(--section); }
.notice h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.4em; }
.notice h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin-top: 1.8em; }
.notice-header {
  font-family: var(--sans); font-weight: 600; font-size: 1.05rem; line-height: 1.5;
  padding: 18px 20px; margin: 28px 0 32px;
  border: 2px solid var(--ink);
}
.notice-contact {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 32px;
  padding: 18px 20px; margin: 24px 0 0;
  background: var(--mist); border-left: 4px solid var(--dusk);
  font-size: 1rem;
}
.notice-contact p { margin: 0.4em 0; }
.notice h3 { margin-top: 1.6em; }
.notice ul { padding-left: 1.2em; }
.notice li { margin-bottom: 0.4em; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* About page */
.about { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }
.portrait { margin: 0; }
.portrait img, .portrait-placeholder { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; border-radius: 10px; }
.portrait-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--mist); border: 2px dashed var(--line);
  font-family: var(--sans); font-weight: 600; color: var(--muted);
}
.portrait figcaption { margin-top: 12px; font-family: var(--sans); font-weight: 600; font-size: 0.98rem; color: var(--muted); }
@media (max-width: 760px) { .portrait { max-width: 320px; } }

.section-follow { padding-top: 0; }

/* Logo on dark backgrounds */
.hero-logo { display: block; width: clamp(240px, 38vw, 420px); height: auto; margin: 0 0 clamp(28px, 4vw, 44px); }
.footer-logo { display: block; width: 200px; height: auto; margin-bottom: 16px; }

/* Accessibility options (button and panel built by script.js) */
.a11y { position: fixed; left: 16px; bottom: 16px; z-index: 50; font-family: var(--sans); font-size: 16px; letter-spacing: normal; word-spacing: normal; line-height: 1.4; }
.a11y-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 18px 0 12px;
  font: 600 1em var(--sans);
  color: var(--paper); background: var(--night);
  border: 2px solid var(--dawn); border-radius: 999px;
  box-shadow: 0 4px 14px rgba(10, 41, 90, 0.25);
  cursor: pointer;
}
.a11y-toggle svg { width: 26px; height: 26px; fill: var(--dawn); }
.a11y-toggle:hover { background: var(--dusk); }
.a11y-toggle[aria-expanded="true"] { background: var(--dusk); }
.a11y-panel {
  position: absolute; left: 0; bottom: calc(100% + 10px);
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100vh - 100px); overflow-y: auto;
  padding: 18px; background: #fff; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(10, 41, 90, 0.25);
}
.a11y-panel[hidden] { display: none; }
.a11y-title { font-weight: 700; font-size: 1.1em; margin: 0 0 12px; }
.a11y-size { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-weight: 600; }
.a11y-size > span { margin-right: auto; }
.a11y-step {
  min-width: 48px; min-height: 44px;
  font: 700 1em var(--sans); color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; cursor: pointer;
}
.a11y-step:hover:not(:disabled) { background: var(--mist); }
.a11y-step:disabled { opacity: 0.4; cursor: not-allowed; }
.a11y-size-value { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; }
.a11y-option {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 48px; padding: 8px 4px;
  font: 600 1em var(--sans); color: var(--ink); text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.a11y-option:hover { background: var(--paper); }
.a11y-switch {
  flex: none; position: relative; width: 40px; height: 24px;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff;
}
.a11y-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--ink);
  transition: transform 0.15s;
}
.a11y-option[aria-pressed="true"] .a11y-switch { background: var(--dusk); border-color: var(--dusk); }
.a11y-option[aria-pressed="true"] .a11y-switch::after { transform: translateX(16px); background: #fff; }
.a11y-reset {
  margin-top: 14px; min-height: 44px; padding: 0 14px;
  font: 600 1em var(--sans); color: var(--dusk);
  background: none; border: 2px solid var(--dusk); border-radius: 8px; cursor: pointer;
}
.a11y-reset:hover { background: var(--paper); }
.site-footer { padding-bottom: 96px; } /* room so the button never covers the last footer line */
@media print { .a11y { display: none; } }

/* Text size */
html[data-a11y-text="120"] { font-size: 120%; }
html[data-a11y-text="140"] { font-size: 140%; }
html[data-a11y-text="160"] { font-size: 160%; }

/* High contrast */
html[data-a11y-contrast] {
  --muted: #0A295A;
  --line: #0A295A;
  --dusk: #003A70;
  --paper: #FFFFFF;
  --mist: #FFFFFF;
}
html[data-a11y-contrast] .lede,
html[data-a11y-contrast] .page-hero p,
html[data-a11y-contrast] .band p,
html[data-a11y-contrast] .hero-photo figcaption,
html[data-a11y-contrast] .trace-caption,
html[data-a11y-contrast] .site-footer { color: #FFFFFF; }
html[data-a11y-contrast] .hero,
html[data-a11y-contrast] .page-hero,
html[data-a11y-contrast] .band,
html[data-a11y-contrast] .site-footer { background: #001A3D; }
html[data-a11y-contrast] .btn-ghost { border-color: #FFFFFF; }
html[data-a11y-contrast] .site-footer a,
html[data-a11y-contrast] .band-link { color: #A6E9F2; }

/* Highlight links */
html[data-a11y-links] main a:not(.btn),
html[data-a11y-links] .site-footer a,
html[data-a11y-links] .nav a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  font-weight: 700;
}
html[data-a11y-links] main a:not(.btn) { background: #FFF3B0; color: #0A295A !important; }
html[data-a11y-links] .hero a:not(.btn),
html[data-a11y-links] .page-hero a:not(.btn),
html[data-a11y-links] .band a:not(.btn) { background: none; color: #FFE680 !important; }
html[data-a11y-links] .btn { outline: 3px dashed currentColor; outline-offset: 3px; }

/* Easier reading: plain font, wider spacing (WCAG text spacing) */
html[data-a11y-readable] { --serif: Verdana, "Schibsted Grotesk", system-ui, sans-serif; --sans: Verdana, "Schibsted Grotesk", system-ui, sans-serif; }
html[data-a11y-readable] body { letter-spacing: 0.03em; word-spacing: 0.16em; }
html[data-a11y-readable] main :is(p, li, dd, label, summary) { line-height: 1.9; }
html[data-a11y-readable] main p { margin-bottom: 2em; max-width: 60ch; }
html[data-a11y-readable] :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.3; }

/* Stop animations: show everything in its finished state */
html[data-a11y-still] *, html[data-a11y-still] *::before, html[data-a11y-still] *::after {
  animation: none !important; transition: none !important;
}
html[data-a11y-still] { scroll-behavior: auto; }
html[data-a11y-still] .trace-line { stroke-dashoffset: 0; }
html[data-a11y-still] .pause-mark, html[data-a11y-still] .trace-caption { opacity: 1; }

/* Long words and email addresses wrap instead of pushing the page sideways at large text sizes */
main a, .site-footer a { overflow-wrap: anywhere; }
html[data-a11y-text] :is(h1, h2, h3) { overflow-wrap: anywhere; hyphens: auto; }
