/* ==========================================================================
   Mindalo — site styles (v2: mobile-first header, compact reading tools,
   step-by-step timeline)
   Designed for older readers and people living with dementia:
   large text, strong contrast, underlined links, big tap targets,
   the same layout on every page, no motion that is not needed.
   ========================================================================== */

:root {
  /* Brand colours (from the Mindalo logo) */
  --cream: #FAF6EE;       /* page background */
  --sand: #F2E8D9;        /* panels */
  --sand-deep: #E8D9C3;   /* hover on panels */
  --line: #DCCBB2;        /* borders */
  --ink: #1F3B4D;         /* main text, headings */
  --ink-soft: #3E5566;    /* secondary text */
  --clay: #9A4730;        /* links, labels (terracotta, darkened for reading) */
  --ochre: #D9A441;       /* the gold dot — decoration only, never text on cream */
  --night: #172C3A;       /* footer */
  --night-text: #F4EEE3;
  --night-accent: #E9C98A;
  --warn-bg: #FBEFD3;
  --warn-edge: #B7791F;

  /* Journey stages */
  --diagnosis: #8A5A12;
  --support: #9A4730;
  --education: #1F3B4D;

  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, "Segoe UI", system-ui, sans-serif;

  --measure: 34rem;       /* comfortable reading width */
  --wide: 60rem;          /* page width */
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 10px;
  --tap: 3rem;            /* minimum height of anything you press */

  /* A light disc sits behind the logo mark wherever the background is dark. */
  --mark-chip: #F7F1E6;

  color-scheme: light;
}

/* Base size is 20px on computers. The text-size buttons change this one value. */
html { font-size: 125%; -webkit-text-size-adjust: 100%; }
html[data-text="large"]   { font-size: 143.75%; }  /* 23px */
html[data-text="largest"] { font-size: 162.5%; }   /* 26px */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  overflow-wrap: break-word;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 0.5em;
  font-weight: 800;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.8rem, 1.1rem + 3vw, 2.9rem); }
h2 { font-size: 1.6rem; margin-top: 1.8em; }
h3 { font-size: 1.2rem; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; max-width: var(--measure); }
li { margin-bottom: 0.45em; }
li::marker { color: var(--clay); }
strong { font-weight: 700; }

a { color: var(--clay); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); text-decoration-thickness: 3px; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--ochre);
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 1rem; top: -10rem;
  background: var(--ink); color: var(--cream);
  padding: 0.75rem 1rem; border-radius: var(--radius); z-index: 10;
}
.skip-link:focus { top: 1rem; color: var(--cream); }

.wrap { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Header: brand first, then the menu ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 2rem; padding-block: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 3.2rem; height: 3.2rem; flex: none; }
.wordmark { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.wordmark .i { position: relative; }
.wordmark .i::after {
  content: ""; position: absolute; left: 50%; top: -0.06em;
  width: 0.2em; height: 0.2em; border-radius: 50%;
  background: var(--ochre); transform: translateX(-50%);
}
.brand-tag { display: block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay); margin-top: 0.35rem; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; max-width: none; }
.site-nav li { margin: 0; }
.site-nav a {
  display: flex; align-items: center; justify-content: center; min-height: var(--tap);
  padding: 0 0.9rem; border-radius: 8px;
  color: var(--ink); font-weight: 700; text-decoration: none;
  border: 2px solid transparent;
}
.site-nav a:hover { background: var(--sand); }
.site-nav a[aria-current="page"] { border-color: var(--ink); background: var(--cream); }

/* ---------- Reading tools (text size, listen, print) ---------- */
.tools { background: var(--sand); border-bottom: 1px solid var(--line); font-size: 0.78rem; }
.tools .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.2rem; padding-block: 0.35rem; }
.tools-group { display: flex; align-items: center; gap: 0.35rem; }
.tools-label { color: var(--ink-soft); margin-right: 0.15rem; }
.tool-btn {
  font: inherit; color: var(--ink); background: var(--cream);
  border: 2px solid var(--line); border-radius: 8px;
  min-height: 2.1rem; min-width: 2.1rem; padding: 0 0.6rem;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
}
.tool-btn:hover { border-color: var(--ink); }
.tool-btn[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.tool-btn .a1 { font-size: 0.8rem; } .tool-btn .a2 { font-size: 0.98rem; } .tool-btn .a3 { font-size: 1.18rem; }
.tool-btn svg { width: 1.05em; height: 1.05em; flex: none; }
.tools-right { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tools-group { flex-wrap: wrap; }

/* ---------- Page furniture ---------- */
main { display: block; padding-block: 2.5rem 4rem; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay); margin-bottom: 0.8rem; }
.lead { font-size: 1.12rem; color: var(--ink); max-width: 36rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }

.crumbs { font-size: 0.85rem; margin-bottom: 1.5rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; max-width: none; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 0.35rem; color: var(--ink-soft); }
.crumbs [aria-current] { color: var(--ink-soft); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: var(--tap); padding: 0.4rem 1.3rem; max-width: 100%;
  background: var(--ink); color: var(--cream);
  font-weight: 700; text-decoration: none; border-radius: 999px;
  border: 2px solid var(--ink); text-align: center;
}
button.button { font: inherit; font-weight: 700; cursor: pointer; } .button:hover { background: var(--night); color: var(--cream); }
.button.secondary { background: transparent; color: var(--ink); }
.button.secondary:hover { background: var(--sand); color: var(--ink); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.arrow { font-size: 1.1em; line-height: 1; }

.section { margin-top: 4rem; }
.section > h2:first-child { margin-top: 0; }

/* ---------- Home: hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem 3rem; align-items: center; }
.hero h1 { font-size: clamp(1.8rem, 1rem + 3.2vw, 2.9rem); letter-spacing: -0.02em; }
.hero h1 .quiet { display: block; color: var(--ink-soft); font-weight: 700; font-size: 0.62em; letter-spacing: -0.005em; margin-top: 0.4em; }
.hero-mark { justify-self: center; width: min(100%, 15rem); }
.hero-mark img { width: 100%; } .hero:has(.hero-art) { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); } .hero-art { width: min(100%, 27rem); } .hero-art img { width: 100%; border-radius: 22px; }

/* ---------- Home: "How can we help" ---------- */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.door {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.3rem 1rem;
  padding: 1.2rem 1.4rem; min-height: 6.5rem;
  background: var(--sand); border: 2px solid var(--sand); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
}
.door:hover { border-color: var(--ink); color: var(--ink); background: var(--sand-deep); }
.door strong { font-size: 1.15rem; line-height: 1.3; }
.door span { grid-column: 1; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.45; }
.door .arrow { grid-column: 2; grid-row: 1 / span 2; font-size: 1.5rem; color: var(--clay); }

/* ---------- Timeline: what Mindalo offers, step by step ---------- */
.timeline { list-style: none; padding: 0; margin: 1.6rem 0 0; max-width: 46rem; }
.timeline > li {
  position: relative; margin: 0;
  display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0 1.1rem;
  padding-bottom: 1.8rem;
}
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li:not(:last-child)::before {
  content: ""; position: absolute; left: calc(1.3rem - 1.5px); top: 2.8rem; bottom: 0.2rem;
  width: 3px; border-radius: 3px; background: var(--line);
}
.tl-num {
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--education); color: var(--cream);
  font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums;
}
.tl-body { padding-top: 0.2rem; min-width: 0; }
.tl-stage { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--education); }
.tl-body h3 { margin: 0.1rem 0 0.35rem; font-size: 1.25rem; }
.tl-body p { margin: 0 0 0.45rem; font-size: 0.95rem; color: var(--ink-soft); }
.tl-body .tl-link { font-weight: 700; font-size: 0.95rem; }
.tl-meta { font-size: 0.8rem; color: var(--ink-soft); }
[data-stage="diagnosis"] .tl-num { background: var(--diagnosis); }
[data-stage="diagnosis"] .tl-stage { color: var(--diagnosis); }
[data-stage="support"] .tl-num { background: var(--support); }
[data-stage="support"] .tl-stage { color: var(--support); }

/* Timeline as a list of guides: the whole step is one big link */
.tl-card {
  display: block; padding: 0.9rem 1.1rem; margin-top: -0.2rem;
  background: var(--cream); border: 2px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
}
.tl-card:hover { border-color: var(--ink); background: var(--sand); color: var(--ink); }
.tl-card h3 { margin: 0.1rem 0 0.3rem; }
.tl-card p { margin: 0 0 0.35rem; font-size: 0.95rem; color: var(--ink-soft); }
.tl-card .tl-go { display: inline-block; margin-top: 0.3rem; font-weight: 700; font-size: 0.9rem; color: var(--clay); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

/* ---------- Home: myths and facts ---------- */
.myths { list-style: none; padding: 0; margin: 1.4rem 0 0; max-width: none; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.myths li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0.5rem 2.5rem; padding-block: 1.3rem; border-bottom: 1px solid var(--line); margin: 0; }
.myths .said, .myths .fact { margin: 0; max-width: none; }
.myths .tag { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.3rem; }
.myths .said { color: var(--ink-soft); font-style: italic; }
.myths .said .tag { color: var(--ink-soft); font-style: normal; }
.myths .fact .tag { color: var(--clay); }

/* ---------- Figures ---------- */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin: 1.4rem 0 0.8rem; padding: 0; list-style: none; max-width: none; }
.figures li { margin: 0; padding-top: 0.9rem; border-top: 2px solid var(--line); }
.figures b { display: block; font-size: 1.8rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.figures span { display: block; color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.3rem; }

.panel { background: var(--sand); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2.2rem); }
.panel > :last-child { margin-bottom: 0; }
.panel h2 { margin-top: 0; }

/* ---------- Guide page ---------- */
.article { max-width: var(--measure); }
.meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1.8rem; }
.key-points { background: var(--sand); border-radius: var(--radius); padding: 1.3rem 1.5rem 0.6rem; margin: 0 0 2rem; }
.key-points h2 { font-size: 1.15rem; margin: 0 0 0.6rem; }
.key-points ul { padding-left: 1.2rem; }
.callout {
  background: var(--warn-bg); border: 2px solid var(--warn-edge); border-radius: var(--radius);
  padding: 1.1rem 1.4rem; margin: 1.8rem 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout .callout-title { font-weight: 800; margin-bottom: 0.3rem; }
.next-guide { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.next-guide p { margin-bottom: 0.4rem; }
.disclaimer { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2.5rem; }

/* ---------- Training ---------- */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.two-col h2 { margin-top: 0; }
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 1.4rem 0 0; max-width: none; }
.formats li { margin: 0; background: var(--sand); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.formats h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.formats p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--night-text); font-size: 0.9rem; }
.site-footer .wrap { padding-block: 2.5rem; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.site-footer a { color: var(--night-accent); }
.site-footer a:hover { color: var(--night-text); }
.site-footer h2 { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--night-accent); margin: 0 0 0.8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer p { max-width: 28rem; }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.footer-brand img { width: 2.8rem; height: 2.8rem; background: var(--mark-chip); border-radius: 50%; padding: 0.15rem; }
.footer-brand .wordmark { font-size: 1.6rem; color: var(--night-text); }
.footer-note { grid-column: 1 / -1; border-top: 1px solid #2E4556; padding-top: 1.2rem; font-size: 0.8rem; color: #C9D2D8; }
.footer-note p { max-width: none; margin-bottom: 0.4rem; }

/* ---------- Tablets and small laptops ---------- */
@media (max-width: 52rem) {
  .hero, .hero:has(.hero-art) { grid-template-columns: minmax(0, 1fr); }
  .hero-mark { display: none; } .hero-art { display: block; justify-self: start; width: min(100%, 24rem); margin-top: 0.5rem; }
  .doors, .two-col, .formats { grid-template-columns: minmax(0, 1fr); }
  .myths li { grid-template-columns: minmax(0, 1fr); }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Phones ---------- */
@media (max-width: 40rem) {
  /* Slightly smaller base on phones (18px) so lines are not broken every few words */
  html { font-size: 112.5%; }
  html[data-text="large"]   { font-size: 128%; }
  html[data-text="largest"] { font-size: 145%; }

  main { padding-block: 1.4rem 3rem; }
  .section { margin-top: 2.8rem; }
  h2 { font-size: 1.4rem; }

  /* Mindalo comes first: brand on its own row, menu as one compact row */
  .header-row { padding-block: 0.8rem 0.6rem; gap: 0.7rem; }
  .brand img { width: 2.7rem; height: 2.7rem; }
  .wordmark { font-size: 1.75rem; }
  .brand-tag { font-size: 0.58rem; letter-spacing: 0.12em; margin-top: 0.3rem; }
  .site-nav { width: 100%; }
  .site-nav ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.3rem; }
  .site-nav a { min-height: 2.6rem; padding: 0 0.2rem; font-size: 0.82rem; background: var(--sand); line-height: 1.2; text-align: center; }
  .nav-full { display: none; }
  .nav-short { display: inline; }

  /* Reading tools: one slim row */
  .tools { font-size: 0.72rem; }
  .tools .wrap { flex-wrap: wrap; gap: 0.35rem 0.5rem; padding-block: 0.3rem; }
  .tool-btn { min-height: 2rem; min-width: 2rem; padding: 0 0.45rem; border-width: 1.5px; }
  .tool-btn .a1 { font-size: 0.72rem; } .tool-btn .a2 { font-size: 0.86rem; } .tool-btn .a3 { font-size: 1rem; }
  .tools-right { gap: 0.3rem; }
  .tools-label { display: none; }
  #print-page { display: none; }

  /* Hero: catchphrase straight after the brand, then the paragraph */
  .hero .eyebrow { display: none; }
  .hero h1 { font-size: 1.75rem; }
  .hero h1 .quiet { font-size: 0.68em; }
  .lead { font-size: 1.05rem; }
  .hero .button-row { flex-direction: column; margin-top: 1.2rem; }
  .hero .button { width: 100%; }

  .door { padding: 1rem 1.1rem; min-height: 0; }
  .door strong { font-size: 1.05rem; }
  .figures { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .timeline > li { grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0 0.85rem; padding-bottom: 1.5rem; }
  .timeline > li:not(:last-child)::before { left: calc(1.1rem - 1.5px); top: 2.4rem; }
  .tl-num { width: 2.2rem; height: 2.2rem; font-size: 0.95rem; }
  .tl-body h3 { font-size: 1.12rem; }
  .key-points { padding: 1.1rem 1.1rem 0.4rem; }
}

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

/* ---------- Printing a guide ---------- */
@media print {
  html { font-size: 12pt; }
  body { background: #fff; color: #000; }
  .tools, .site-nav, .skip-link, .button-row, .next-guide, .crumbs { display: none !important; }
  .site-header { border: 0; }
  .site-footer { background: #fff; color: #000; }
  .site-footer .wrap > :not(.footer-note) { display: none; }
  .footer-note { color: #000; border-color: #999; }
  a { color: #000; }
  .key-points, .panel, .callout, .tl-card { border: 1px solid #999; background: #fff; }
}

/* ---------- Checklist (fill in, then print) ---------- */ .checklist { max-width: var(--measure); } .checklist .section { margin-top: 2.4rem; } .checklist h2 { font-size: 1.25rem; } .fields { display: grid; gap: 0.9rem; margin-top: 1rem; } .field { display: grid; gap: 0.3rem; margin: 0; } .field label { font-weight: 700; } .field input, .qa .ans { font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; padding: 0.45rem 0.2rem; min-height: 2.6rem; width: 100%; } .field input:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; } .ticks, .qa { list-style: none; padding: 0; margin: 1rem 0 0; } .ticks li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 0.9rem; align-items: start; padding: 0.7rem 0; border-bottom: 1px solid var(--line); } .ticks li label, .choice label { cursor: pointer; } .checklist input[type="checkbox"], .checklist input[type="radio"] { appearance: none; -webkit-appearance: none; width: 1.7rem; height: 1.7rem; margin: 0.1rem 0 0; flex: none; border: 2px solid var(--ink); background: #fff; cursor: pointer; display: inline-block; position: relative; print-color-adjust: exact; -webkit-print-color-adjust: exact; } .checklist input[type="radio"] { border-radius: 50%; } .checklist input[type="checkbox"] { border-radius: 5px; } .checklist input:checked::after { content: ""; position: absolute; inset: 0.25rem; background: var(--ink); border-radius: 3px; } .checklist input[type="radio"]:checked::after { border-radius: 50%; } .checklist input:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; } .choice { border: 0; padding: 0; margin: 1.4rem 0 0; } .choice legend { font-weight: 700; padding: 0; margin-bottom: 0.5rem; } .choice p { display: flex; align-items: center; gap: 0.9rem; margin: 0 0 0.5rem; max-width: none; } .write-box { margin-top: 1rem; border: 2px solid var(--line); border-radius: var(--radius); min-height: 8rem; background: transparent; } .qa li { padding: 0.6rem 0 1.5rem; } .qa .q { display: block; font-weight: 700; } .qa .ans { display: block; min-height: 3.2rem; margin-top: 0.5rem; } @media (max-width: 40rem) { .ticks li { gap: 0 0.7rem; } } @media print { .checklist input[type="checkbox"], .checklist input[type="radio"] { border-color: #000; background: #fff; } .checklist input:checked::after { background: #000; } .field input, .qa .ans { border-bottom-color: #666; } .write-box { border-color: #666; } .ticks li, .qa li { border-bottom-color: #ccc; break-inside: avoid; } .qa li { padding-bottom: 0.8rem; } .checklist .disclaimer { margin-top: 1.2rem; } .write-box { min-height: 6rem; } .checklist .section { break-inside: auto; } .checklist h2 { break-after: avoid; } .choice { break-inside: avoid; } .screen-only { display: none !important; } .checklist .js-print, .button-row { display: none !important; } .callout { break-inside: avoid; } }  /* ---------- Listen: highlight and floating player ---------- */
.reading {
  background: #FBE3A6;
  box-shadow: 0 0 0 0.35rem #FBE3A6;
  border-radius: 4px;
}
.tl-card .reading, .door .reading { box-shadow: none; }
.player {
  position: fixed; z-index: 30;
  left: 50%; transform: translateX(-50%);
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(34rem, calc(100% - 2rem));
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.6rem 0.55rem 0.9rem;
  background: var(--ink); color: var(--cream);
  border-radius: 14px; box-shadow: 0 10px 28px rgba(23, 44, 58, 0.35);
  font-size: 0.85rem; line-height: 1.3;
}
.player-icon svg { width: 1.3rem; height: 1.3rem; display: block; color: var(--night-accent); }
.player-status { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.player-title { font-weight: 800; }
.player-now { color: #C9D2D8; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player button {
  font: inherit; font-weight: 700; cursor: pointer;
  min-height: 2.6rem; padding: 0 1rem; border-radius: 999px;
  border: 2px solid var(--cream); background: var(--cream); color: var(--ink);
}
.player button:hover { background: var(--night-accent); border-color: var(--night-accent); }
.player .player-stop { background: transparent; color: var(--cream); }
.player .player-stop:hover { background: rgba(255, 255, 255, 0.12); color: var(--cream); border-color: var(--cream); }
.player :focus-visible { outline-color: var(--cream); box-shadow: 0 0 0 6px var(--ochre); }
body.is-reading { padding-bottom: 5.5rem; }
@media (max-width: 40rem) {
  .player { gap: 0.45rem; padding: 0.5rem 0.5rem 0.5rem 0.75rem; font-size: 0.8rem; }
  .player button { min-height: 2.5rem; padding: 0 0.8rem; }
}
@media print { .player { display: none !important; } }

/* ---------- Wider screens: use the width ---------- */
@media (min-width: 64rem) {
  .journey-layout { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 3.5rem; align-items: start; }
  .journey-intro { position: sticky; top: 1.5rem; }
  .journey-layout .timeline { margin-top: 0.4rem; }
}
.journey-intro > h2 { margin-top: 0; }

/* ---------- Languages ---------- */
.nav-short { display: none; }
html[lang="yo"], html[lang="ig"] { --font: "Noto Sans", "Atkinson Hyperlegible Next", Verdana, system-ui, sans-serif; }
html[lang="am"] { --font: "Atkinson Hyperlegible Next", "Noto Sans Ethiopic", "Nyala", "Abyssinica SIL", system-ui, sans-serif; }
html[lang="am"] .eyebrow, html[lang="am"] .tl-stage, html[lang="am"] .brand-tag { letter-spacing: 0.02em; }

.lang-menu { position: relative; }
.lang-code { display: none; }
.lang-menu summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 2.1rem; padding: 0 0.6rem;
  border: 2px solid var(--line); border-radius: 8px; background: var(--cream);
  font-weight: 700; color: var(--ink);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: "▾"; font-size: 0.8em; }
.lang-menu summary svg { width: 1.15em; height: 1.15em; flex: none; }
.lang-menu summary:hover, .lang-menu[open] summary { border-color: var(--ink); }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 40;
  list-style: none; margin: 0; padding: 0.35rem; min-width: 12rem; max-width: none; font-size: 1.25em;
  background: var(--cream); border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(23, 44, 58, 0.18);
}
.lang-menu li { margin: 0; }
.lang-menu a { display: block; padding: 0.55rem 0.8rem; border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 700; }
.lang-menu a:hover { background: var(--sand); color: var(--ink); }
.lang-menu a[aria-current] { background: var(--ink); color: var(--cream); }
.translated-note { font-size: 0.8rem; color: var(--ink-soft); background: var(--sand); border-radius: 8px; padding: 0.5rem 0.8rem; margin: 0 0 1.4rem; max-width: none; }
@media (max-width: 40rem) {
  .nav-full { display: none; }
  .nav-short { display: inline; }
  .lang-menu summary { min-height: 2rem; padding: 0 0.45rem; border-width: 1.5px; }
  .lang-current { display: none; }
  .lang-code { display: inline; }
}
@media print { .lang-menu, .translated-note { display: none !important; } }


/* ==========================================================================
   Dark mode — follows the setting on the phone or computer.
   Same layout, same type sizes; only the colours change. Backgrounds stay a
   deep blue-grey rather than black, and text a warm off-white rather than
   pure white, because hard black-and-white edges are tiring to read.
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --cream: #131E26;       /* page background */
    --sand: #1E303B;        /* panels */
    --sand-deep: #2A3F4D;   /* hover on panels */
    --line: #5E7F90;        /* borders, button edges */
    --ink: #F2ECE2;         /* main text, headings */
    --ink-soft: #C2CED6;    /* secondary text */
    --clay: #F4A98B;        /* links, labels */
    --ochre: #E9C98A;       /* the gold dot */
    --night: #0C161D;       /* footer, floating player */
    --night-text: #F2ECE2;
    --night-accent: #E9C98A;
    --warn-bg: #2C2412;
    --warn-edge: #D9A441;

    --diagnosis: #E2B45F;
    --support: #F0A084;
    --education: #9FC7DF;
  }

  /* The logo mark keeps its own colours, so it sits on a light disc. */
  .brand img, .hero-mark img {
    background: var(--mark-chip); border-radius: 50%; padding: 0.2rem;
  }
  .hero-mark img { padding: 0.55rem; } .hero-art img { background: none; border-radius: 22px; padding: 0; }

  /* The main button is light on a dark page; keep its hover readable. */
  .button:hover { background: var(--night-accent); border-color: var(--night-accent); color: var(--night); }
  .button.secondary:hover { background: var(--sand); color: var(--ink); }

  /* Listen: the highlighted sentence stays amber with dark text. */
  .reading { background: #F6D89A; color: #14212B; box-shadow: 0 0 0 0.35rem #F6D89A; }

  /* Floating player stays dark so the page behind it is still readable. */
  .player { background: var(--night); color: var(--night-text); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55); }
  .player button { background: var(--night-text); color: var(--night); border-color: var(--night-text); }
  .player .player-stop { background: transparent; color: var(--night-text); border-color: var(--night-text); }
  .player .player-stop:hover { background: rgba(255, 255, 255, 0.14); color: var(--night-text); }
  .player :focus-visible { outline-color: var(--night-text); }

  /* The footer sits close to the page colour, so it gets a hairline. */
  .site-footer { border-top: 1px solid var(--line); }

  .lang-menu ul { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55); }
  .footer-note { border-top-color: #2A3E4C; color: #C3CED6; }
}
