/* NUWECO design system
   ------------------------------------------------------------------
   Proposed palette (editable): deep forest green and warm ivory, with
   charcoal text, muted terracotta and a very restrained brass accent.
   Type: Newsreader (headings, editorial) + Figtree (interface).
*/

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-normal.f7e2f1a75fe8.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-italic.69c46afe79df.woff2") format("woff2");
  font-weight: 400 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin-wght-normal.d5d4d0ae3973.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour */
  --forest-950: #0f2119;
  --forest-900: #16301f;
  --forest-800: #1e3b2c;
  --forest-700: #2b4f3c;
  --forest-100: #dfe7df;
  --ivory-50: #fbf8f2;
  --ivory-100: #f6f1e7;
  --ivory-200: #ece4d4;
  --ivory-300: #ddd2bd;
  --charcoal: #24221f;
  --charcoal-soft: #4a4640;
  --terracotta: #a14f2d;
  --terracotta-soft: #e9cdbf;
  --brass: #a8873e;
  --brass-light: #cfae63;
  --danger: #9b2c2c;
  --danger-bg: #f8e6e3;
  --success: #2d5e3e;
  --success-bg: #e3eee5;
  --info-bg: #ebe7dc;

  --bg: var(--ivory-100);
  --surface: var(--ivory-50);
  --text: var(--charcoal);
  --text-muted: var(--charcoal-soft);
  --line: #d8ceba;
  --focus: #1d5fd1;

  /* Type */
  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1.02rem, 0.98rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.75vw, 1.9rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.5vw, 2.7rem);
  --step-4: clamp(2.3rem, 1.75rem + 2.7vw, 4rem);
  --step-5: clamp(2.7rem, 1.9rem + 4vw, 5.4rem);

  /* Space */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-s: 0.85rem;
  --space-m: 1.25rem;
  --space-l: 2rem;
  --space-xl: 3.25rem;
  --space-2xl: clamp(4rem, 3rem + 5vw, 7.5rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --measure: 66ch;
  --max: 76rem;

  /* Shape and motion */
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 16px;
  --border: 1px solid var(--line);
  --shadow: 0 1px 2px rgb(36 34 31 / 0.06), 0 8px 24px -12px rgb(36 34 31 / 0.18);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 180ms;
}

/* Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0 0 var(--space-s);
  text-wrap: balance;
  font-optical-sizing: auto;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }
p { margin: 0 0 var(--space-m); text-wrap: pretty; }
ul, ol { padding-left: 1.2em; margin: 0 0 var(--space-m); }
li + li { margin-top: 0.3em; }
a { color: var(--forest-800); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--terracotta); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
hr { border: 0; border-top: var(--border); margin: var(--space-l) 0; }
::selection { background: var(--terracotta-soft); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-s); top: -100px; z-index: 100;
  background: var(--forest-900); color: var(--ivory-50); padding: var(--space-xs) var(--space-s);
  border-radius: var(--radius-s);
}
.skip-link:focus { top: var(--space-s); color: var(--ivory-50); }

/* Layout ---------------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), 44rem); margin-inline: auto; }
.section { padding-block: clamp(2.5rem, 2rem + 2.5vw, 4.5rem); }
.section-tight { padding-block: clamp(2rem, 1.5rem + 1.5vw, 3rem); }
/* Two plain sections in a row: don't stack both paddings. */
:is(.section, .section-tight):not([class*="band"]) + :is(.section, .section-tight):not([class*="band"]) { padding-top: 0; }
.stack > * + * { margin-top: var(--space-m); }
.measure { max-width: var(--measure); }
.grid-2 { display: grid; gap: var(--space-xl); }
@media (min-width: 60em) {
  .grid-2 { grid-template-columns: 1fr 1fr; align-items: center; }
  .grid-2.top { align-items: start; }
  .grid-5-7 { grid-template-columns: 5fr 7fr; }
  .grid-7-5 { grid-template-columns: 7fr 5fr; }
}

.h-feature { font-size: var(--step-3); }
.preview-course { font-family: var(--font-serif); font-size: var(--step-2); line-height: 1.15; margin-bottom: 0.5rem; }
.mt-xs { margin-top: var(--space-xs); }
.mt-l { margin-top: var(--space-l); }
.center { margin-inline: auto; text-align: center; }

/* Typography helpers ---------------------------------------------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: var(--space-s);
  display: block;
}
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--text-muted); max-width: 40ch; }
.display { font-size: clamp(2.4rem, 1.7rem + 3vw, 4.4rem); font-weight: 400; letter-spacing: -0.022em; line-height: 1.05; }
.display em { display: block; margin-top: 0.08em; }
.display em, h2 em { font-style: italic; color: var(--forest-700); }
.muted { color: var(--text-muted); }
.small { font-size: var(--step--1); }
.serif { font-family: var(--font-serif); }

/* Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.7em 1.35em;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--forest-800); color: var(--ivory-50); }
.btn-primary:hover { background: var(--forest-950); color: var(--ivory-50); }
.btn-secondary { background: transparent; color: var(--forest-800); border-color: var(--forest-800); }
.btn-secondary:hover { background: var(--forest-800); color: var(--ivory-50); }
.btn-light { background: var(--ivory-50); color: var(--forest-900); }
.btn-light:hover { background: var(--ivory-200); color: var(--forest-900); }
.btn-ghost-light { color: var(--ivory-50); border-color: rgb(251 248 242 / 0.5); background: transparent; }
.btn-ghost-light:hover { border-color: var(--ivory-50); color: var(--ivory-50); background: rgb(251 248 242 / 0.08); }
.btn-text { background: none; border: 0; padding: 0.4em 0; min-height: 44px; color: var(--forest-800); text-decoration: underline; text-underline-offset: 0.2em; font-weight: 600; cursor: pointer; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #7a1f1f; color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--ivory-200); color: var(--charcoal-soft); border-color: var(--line); cursor: not-allowed; transform: none;
}
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: center; }
.arrow::after { content: "→"; transition: transform var(--dur) var(--ease); }
.arrow:hover::after { transform: translateX(3px); }

/* Environment banner ------------------------------------------------ */
.env-banner {
  background: var(--brass-light); color: var(--forest-950);
  font-size: var(--step--1); font-weight: 600; text-align: center; padding: 0.4rem var(--gutter);
}

/* Header ------------------------------------------------------------ */
.site-header { background: var(--bg); border-bottom: var(--border); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-m); min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--forest-900); }
.brand:hover { color: var(--forest-900); }
.brand-mark { width: auto; height: 46px; flex: none; }
/* On dark headers the teal runner sits on an ivory disc so it stays visible. */
.app-header .brand-mark { height: 44px; width: 44px; padding: 5px; border-radius: 50%; background: var(--ivory-50); object-fit: contain; }
.brand-name { font-family: var(--font-serif); font-size: 1.45rem; font-weight: 500; letter-spacing: 0.06em; line-height: 1; }
.brand-sub { display: block; white-space: nowrap; font-family: var(--font-sans); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-top: 0.25rem; }
.nav-primary { display: none; }
.nav-primary ul { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; }
.nav-primary li + li { margin: 0; }
.nav-primary a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.8rem; color: var(--charcoal); text-decoration: none; font-weight: 500; border-radius: 999px; }
.nav-primary a:hover { color: var(--forest-800); background: var(--ivory-200); }
.nav-primary a[aria-current="page"] { color: var(--forest-900); box-shadow: inset 0 -2px 0 var(--brass); border-radius: 0; }
.nav-actions { display: none; gap: var(--space-xs); align-items: center; }
.nav-actions .btn { min-height: 44px; padding: 0.5em 1.1em; }
.nav-actions form { margin: 0; }

.nav-mobile { position: static; }
.nav-mobile > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0 1rem; border: var(--border); border-radius: 999px; font-weight: 600; background: var(--surface);
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile > summary .bars { width: 18px; height: 12px; position: relative; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.nav-mobile > summary .bars::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; }
.nav-mobile[open] > summary { background: var(--forest-800); color: var(--ivory-50); border-color: var(--forest-800); }
.nav-mobile-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: var(--border); box-shadow: var(--shadow);
  padding: var(--space-s) var(--gutter) var(--space-l);
}
.nav-mobile-panel ul { list-style: none; margin: 0; padding: 0; }
.nav-mobile-panel li + li { margin: 0; border-top: var(--border); }
.nav-mobile-panel nav a { display: flex; min-height: 52px; align-items: center; text-decoration: none; color: var(--charcoal); font-size: 1.1rem; font-family: var(--font-serif); }
.nav-mobile-panel .btn-row { margin-top: var(--space-m); }
.nav-mobile-panel .btn-row .btn, .nav-mobile-panel .btn-row form { flex: 1; }
.nav-mobile-panel .btn-row form .btn { width: 100%; }
@media (min-width: 64em) {
  .nav-primary, .nav-actions { display: flex; }
  .nav-mobile { display: none; }
}

@media (max-width: 30em) { .brand-name { font-size: 1.3rem; } .brand-sub { font-size: 0.6rem; letter-spacing: 0.06em; white-space: normal; } }

/* Hero -------------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 2rem + 4vw, 6rem) var(--space-2xl); overflow: hidden; }
.hero-grid { display: grid; gap: var(--space-xl); align-items: center; }
@media (min-width: 60em) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-2xl); } }
.hero .lead { margin-block: var(--space-m) var(--space-l); max-width: 36ch; }
.hero-login { margin-top: var(--space-m); font-size: var(--step--1); color: var(--text-muted); }

.art-frame {
  position: relative; border-radius: var(--radius-l); overflow: hidden; background: var(--ivory-200);
  aspect-ratio: 4 / 5; isolation: isolate; margin: 0;
}
.art-frame.wide { aspect-ratio: 16 / 10; }
.art-frame.square { aspect-ratio: 1; }
.art-frame > img, .art-frame > svg { width: 100%; height: 100%; object-fit: cover; }
.art-frame figcaption, .art-caption {
  font-size: var(--step--1); color: var(--text-muted); margin-top: var(--space-xs);
}
.art-frame.on-dark { background: var(--forest-900); }

/* SVG illustration palette (classes keep CSP strict: no inline styles) */
.ill-bg { fill: var(--ivory-200); }
.ill-bg-dark { fill: var(--forest-900); }
.ill-mat { fill: #d9c49a; }
.ill-mat-ring { fill: none; stroke: #b99b62; stroke-width: 2; }
.ill-mat-ring-fine { fill: none; stroke: #c9ae78; stroke-width: 1; }
.ill-bowl { fill: var(--ivory-50); }
.ill-bowl-rim { fill: none; stroke: #c9b896; stroke-width: 2; }
.ill-bowl-dark { fill: var(--forest-800); }
.ill-nsima { fill: #fffdf7; }
.ill-nsima-shade { fill: #efe9db; }
.ill-greens { fill: #3f6b4a; }
.ill-greens-2 { fill: #5c8a5f; }
.ill-beans { fill: var(--terracotta); }
.ill-beans-2 { fill: #7d3b22; }
.ill-nut { fill: #c58a52; }
.ill-tomato { fill: #b8492c; }
.ill-leaf { fill: var(--forest-700); }
.ill-leaf-light { fill: #6f9877; }
.ill-stem { fill: none; stroke: var(--forest-700); stroke-width: 2.5; stroke-linecap: round; }
.ill-line { fill: none; stroke: var(--brass-light); stroke-width: 1.2; }
.ill-line-soft { fill: none; stroke: rgb(207 174 99 / 0.45); stroke-width: 1; }
.ill-water { fill: #24493a; }
.ill-sun { fill: var(--brass-light); }
.ill-ink { fill: var(--forest-900); }

/* Hierarchy band ----------------------------------------------------- */
.hierarchy { border-block: var(--border); background: var(--surface); }
.hierarchy .wrap { display: grid; gap: var(--space-m); padding-block: var(--space-l); }
@media (min-width: 60em) { .hierarchy .wrap { grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: center; } }
.hierarchy-title { font-family: var(--font-serif); font-size: var(--step-2); margin: 0; line-height: 1.2; }
.hierarchy-text { margin: 0; font-size: var(--step-1); line-height: 1.55; color: var(--text-muted); max-width: 52ch; }
.hierarchy-text a { color: var(--forest-800); text-decoration-color: var(--brass); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.hierarchy-text a:hover { color: var(--terracotta); text-decoration-color: currentColor; }
.hierarchy-text .core-link { font-weight: 600; color: var(--forest-900); }
.hierarchy-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.hierarchy-list li { margin: 0; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0.3em 0.9em; border-radius: 999px; border: var(--border); font-size: var(--step--1); font-weight: 500; color: var(--text-muted); background: var(--bg); }
.chip-core { background: var(--forest-800); border-color: var(--forest-800); color: var(--ivory-50); font-size: 1rem; padding: 0.45em 1.15em; }
a.chip { text-decoration: none; transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
a.chip:hover { border-color: var(--forest-700); color: var(--forest-900); background: var(--surface); }
a.chip-core:hover { background: var(--forest-950); border-color: var(--forest-950); color: var(--ivory-50); }
.hierarchy-joiner { font-family: var(--font-serif); font-style: italic; color: var(--text-muted); padding-inline: 0.25rem; }

/* Steps -------------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: var(--space-xl) 0 0; display: grid; gap: var(--space-l); counter-reset: step; }
@media (min-width: 52em) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); } }
.steps li { margin: 0; padding-top: var(--space-m); border-top: 1px solid var(--forest-800); counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-serif); font-size: var(--step-3); color: var(--brass); line-height: 1; margin-bottom: var(--space-s); }
.steps h3 { font-size: var(--step-2); }

/* Services ------------------------------------------------------------- */
.feature-dark { background: var(--forest-900); color: var(--ivory-100); border-radius: var(--radius-l); overflow: hidden; }
.feature-dark .feature-body { padding: clamp(1.5rem, 1rem + 3vw, 4rem); }
.feature-dark h2, .feature-dark h3 { color: var(--ivory-50); }
.feature-dark .eyebrow { color: var(--brass-light); }
.feature-dark p, .feature-dark li { color: #dcd6c8; }
.feature-dark a:not(.btn) { color: var(--ivory-50); }
.feature-dark .feature-art { position: relative; aspect-ratio: 16 / 7; margin: 0; background: var(--forest-950); overflow: hidden; }
.feature-dark .feature-art > svg, .feature-dark .feature-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-dark .feature-art:has(img) { aspect-ratio: 3 / 2; }
.feature-dark .feature-art > img, .page-header .art-frame > img { object-position: center 35%; }
@media (min-width: 60em) {
  .feature-dark { display: grid; grid-template-columns: 7fr 5fr; }
  .feature-dark:has(.feature-art img) { grid-template-columns: 5fr 7fr; }
  .feature-dark .feature-art, .feature-dark .feature-art:has(img) { aspect-ratio: auto; min-height: 100%; }
}
.tick-list { list-style: none; padding: 0; }
.tick-list li { padding-left: 1.6em; position: relative; }
.tick-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.8em; height: 0.45em; border-left: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(-45deg); }
.dash-list { list-style: none; padding: 0; }
.dash-list li { padding-left: 1.4em; position: relative; }
.dash-list li::before { content: "–"; position: absolute; left: 0; color: var(--terracotta); }

.service-index { list-style: none; padding: 0; margin: var(--space-l) 0 0; border-top: var(--border); }
.service-index li { margin: 0; border-bottom: var(--border); }
.service-index a {
  display: grid; grid-template-columns: 3rem 1fr auto; gap: var(--space-m); align-items: baseline;
  padding: var(--space-m) 0; text-decoration: none; color: var(--text);
  transition: padding var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.service-index a:hover { background: var(--surface); padding-inline: var(--space-s); color: var(--text); }
.service-index .num { font-family: var(--font-serif); color: var(--brass); font-size: var(--step-1); }
.service-index .title { font-family: var(--font-serif); font-size: var(--step-2); line-height: 1.2; display: block; }
.service-index .short { display: block; color: var(--text-muted); margin-top: 0.25rem; font-size: var(--step-0); }
.service-index .go { color: var(--forest-800); font-size: 1.4rem; }
@media (max-width: 40em) { .service-index a { grid-template-columns: 2.2rem 1fr; } .service-index .go { display: none; } }

/* Preview window (learning preview) -------------------------------- */
.preview-window { background: var(--surface); border: var(--border); border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); padding: 0.7rem 1.1rem; border-bottom: var(--border); background: var(--ivory-200); font-size: var(--step--1); }
.preview-body { padding: var(--space-l); display: grid; gap: var(--space-l); }
@media (min-width: 48em) { .preview-body { grid-template-columns: 0.9fr 1.1fr; } }
.preview-modules { list-style: none; padding: 0; margin: 0; font-size: var(--step--1); }
.preview-modules li { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0; border-bottom: var(--border); margin: 0; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.dot.done { background: var(--forest-700); border-color: var(--forest-700); }
.dot.current { border-color: var(--terracotta); box-shadow: inset 0 0 0 3px var(--surface); background: var(--terracotta); }
.dot.locked { border-style: dashed; }

/* Badges / notices ---------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.15em 0.6em; border-radius: var(--radius-s); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; background: var(--ivory-200); color: var(--charcoal); border: var(--border); vertical-align: middle; }
.badge-sample { background: #f3e7c9; border-color: #e0cc9b; color: #5b4615; }
.badge-draft { background: var(--terracotta-soft); border-color: #dcb19d; color: #6c2f16; }
.badge-locked { background: var(--ivory-200); }
.badge-done { background: var(--success-bg); border-color: #bcd4c1; color: var(--success); }
.badge-dark { background: rgb(251 248 242 / 0.1); border-color: rgb(251 248 242 / 0.25); color: var(--ivory-50); }

.notice { border-radius: var(--radius-m); padding: var(--space-m); border: var(--border); background: var(--info-bg); margin-bottom: var(--space-m); }
.notice > :last-child { margin-bottom: 0; }
.notice-title { font-weight: 700; margin-bottom: 0.25rem; }
.notice-success { background: var(--success-bg); border-color: #bcd4c1; }
.notice-error { background: var(--danger-bg); border-color: #e3b5ae; }
.notice-warning { background: #f6ecd2; border-color: #e3cf9b; }
.notice-safety { background: #fff4ef; border: 2px solid var(--terracotta); }
.messages { list-style: none; padding: 0; margin: var(--space-m) 0; }
.messages li { margin: 0 0 var(--space-xs); }

/* Commitment callout ------------------------------------------------ */
.commitment {
  display: grid; gap: var(--space-m); padding: var(--space-l); border-radius: var(--radius-l);
  background: var(--surface); border: 1px solid var(--forest-800);
}
.commitment-term { font-family: var(--font-serif); font-size: var(--step-3); line-height: 1.1; color: var(--forest-900); margin: 0; }
.commitment-term small { display: block; font-family: var(--font-sans); font-size: var(--step--1); letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 0.4rem; font-weight: 600; }
.price-tba { font-family: var(--font-serif); font-size: var(--step-2); margin: 0; }
@media (min-width: 52em) { .commitment.split { grid-template-columns: 1fr 1fr auto; align-items: end; } }

/* FAQ --------------------------------------------------------------- */
.faq { border-top: var(--border); }
.faq details { border-bottom: var(--border); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--space-m);
  padding: var(--space-m) 0; font-family: var(--font-serif); font-size: var(--step-1); line-height: 1.3; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-sans); font-size: 1.5rem; line-height: 1; color: var(--terracotta); transition: transform var(--dur) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: var(--space-m); color: var(--text-muted); max-width: var(--measure); }

/* Bands --------------------------------------------------------------- */
.band-dark { background: var(--forest-900); color: var(--ivory-100); }
.band-dark h2, .band-dark h3 { color: var(--ivory-50); }
.band-dark p { color: #d6d0c2; }
.band-dark .eyebrow { color: var(--brass-light); }
.band-dark a:not(.btn) { color: var(--ivory-50); }
.band-surface { background: var(--surface); border-block: var(--border); }
.cta-final { text-align: center; }
.cta-final .btn-row { justify-content: center; }
.cta-final h2 { max-width: 20ch; margin-inline: auto; }

.founder { display: grid; gap: var(--space-l); }
@media (min-width: 52em) { .founder { grid-template-columns: 220px 1fr; align-items: start; } }
.portrait-fallback { aspect-ratio: 4 / 5; border-radius: var(--radius-l); background: var(--forest-100); display: grid; place-items: center; color: var(--forest-700); }
.portrait-fallback span { font-family: var(--font-serif); font-size: 3.5rem; letter-spacing: 0.04em; }

.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-m); }
@media (min-width: 48em) { .principles { grid-template-columns: 1fr 1fr; } }
.principles li { margin: 0; padding: var(--space-m) 0 0; border-top: 1px solid var(--forest-800); }
.principles strong { display: block; font-family: var(--font-serif); font-weight: 500; font-size: var(--step-1); margin-bottom: 0.25rem; }

/* Page header -------------------------------------------------------- */
.page-header { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem) var(--space-xl); border-bottom: var(--border); }
.page-header h1 { max-width: 20ch; }
.page-header .lead { max-width: 52ch; }
.breadcrumbs { font-size: var(--step--1); margin-bottom: var(--space-m); }
/* Header photos: a short landscape frame when stacked under the text,
   a portrait frame only when they sit beside it on wide screens.
   Landscape photos keep the 3:2 frame everywhere. */
.page-header .art-frame:not(.wide) { aspect-ratio: 3 / 2; }
@media (min-width: 60em) { .page-header .art-frame:not(.wide):not(.landscape) { aspect-ratio: 4 / 5; max-height: 34rem; justify-self: end; width: 100%; } }
.breadcrumbs a { color: var(--text-muted); }

/* Service detail ------------------------------------------------------ */
.detail-grid { display: grid; gap: var(--space-xl); }
@media (min-width: 60em) { .detail-grid { grid-template-columns: 7fr 4fr; } }
.aside-box { border: var(--border); border-radius: var(--radius-l); padding: var(--space-l); background: var(--surface); align-self: start; }
.aside-box h2 { font-size: var(--step-1); }
.aside-box + .aside-box { margin-top: var(--space-m); }

/* Forms ---------------------------------------------------------------- */
.form { display: grid; gap: var(--space-m); }
.field { display: grid; gap: 0.35rem; }
.field > label, .field legend, .label { font-weight: 600; }
.field .help { font-size: var(--step--1); color: var(--text-muted); }
.field .error, .errorlist { color: var(--danger); font-size: var(--step--1); font-weight: 600; list-style: none; padding: 0; margin: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; min-height: 48px; padding: 0.6rem 0.8rem; border: 1px solid #a99f8c; border-radius: var(--radius-m);
  background: #fff; font-size: 1rem; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--forest-800); box-shadow: 0 0 0 3px rgb(30 59 44 / 0.15); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 0.4rem; }
.choices { display: grid; gap: 0.5rem; }
.choice { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; cursor: pointer; min-height: 48px; }
.choice:hover { border-color: var(--forest-700); }
.choice input { width: 1.2rem; height: 1.2rem; margin: 0.2rem 0 0; accent-color: var(--forest-800); flex: none; }
.choice:has(input:checked) { border-color: var(--forest-800); background: var(--forest-100); }
.choices-inline { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-card { background: var(--surface); border: var(--border); border-radius: var(--radius-l); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); }
.inline-form { display: inline; margin: 0; }

/* Footer ---------------------------------------------------------------- */
.site-footer { background: var(--forest-950); color: #cfc8b8; padding-block: var(--space-2xl) var(--space-l); margin-top: 0; font-size: var(--step--1); }
.site-footer a { color: var(--ivory-100); text-decoration: none; }
.site-footer a:hover { color: var(--brass-light); text-decoration: underline; }
.footer-grid { display: grid; gap: var(--space-xl); }
@media (min-width: 52em) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid h2 { font-family: var(--font-sans); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-light); font-weight: 600; margin-bottom: var(--space-s); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 0 0 0.45rem; }
.footer-brand { font-family: var(--font-serif); font-size: var(--step-1); color: var(--ivory-50); line-height: 1.25; margin-bottom: var(--space-2xs); }
.footer-tagline { color: var(--brass-light); font-size: var(--step-0); margin-bottom: var(--space-m); }
.footer-base { margin-top: var(--space-xl); padding-top: var(--space-m); border-top: 1px solid rgb(255 255 255 / 0.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-s); }

/* Auth pages ------------------------------------------------------------ */
.auth-shell { min-height: 70vh; display: grid; place-items: start center; padding-block: var(--space-xl) var(--space-2xl); }
.auth-card { width: min(100% - 2 * var(--gutter), 30rem); background: var(--surface); border: var(--border); border-radius: var(--radius-l); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); }
.auth-card h1 { font-size: var(--step-3); }
.auth-card form p, .auth-card form .field { margin-bottom: var(--space-m); }
.auth-card button[type="submit"] { width: 100%; }
.auth-card .btn-text { width: auto; }

/* Member app ------------------------------------------------------------ */
.app-header { background: var(--forest-900); color: var(--ivory-100); }
.app-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-m); min-height: 64px; }
.app-header .brand { color: var(--ivory-50); }
.app-header .brand-sub { color: #b9b19f; }
.app-nav { background: var(--forest-800); }
.app-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; }
.app-nav ul::-webkit-scrollbar { display: none; }
.app-nav li { margin: 0; flex: none; }
.app-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 0.9rem; color: #e6e0d2; text-decoration: none; font-weight: 500; font-size: 0.95rem; white-space: nowrap; }
.app-nav a:hover { color: var(--ivory-50); background: rgb(255 255 255 / 0.06); }
.app-nav a[aria-current="page"] { color: var(--ivory-50); box-shadow: inset 0 -3px 0 var(--brass-light); }
.app-header form { margin: 0; }
.app-header .btn-text { color: var(--ivory-50); }
.app-main { padding-block: var(--space-xl) var(--space-2xl); }
.app-main h1 { font-size: var(--step-3); }

.dash-grid { display: grid; gap: var(--space-m); margin-top: var(--space-l); }
@media (min-width: 60em) { .dash-grid { grid-template-columns: 2fr 1fr; align-items: start; } }
.dash-col { display: grid; gap: var(--space-m); }
.panel { background: var(--surface); border: var(--border); border-radius: var(--radius-l); padding: var(--space-l); }
.panel > :last-child { margin-bottom: 0; }
.panel h2 { font-size: var(--step-1); font-family: var(--font-serif); display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); flex-wrap: wrap; }
.panel-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 0.35rem; }
.panel-primary { background: var(--forest-900); color: var(--ivory-100); border-color: var(--forest-900); }
.panel-primary h2, .panel-primary h3 { color: var(--ivory-50); }
.panel-primary .panel-label { color: var(--brass-light); }
.panel-primary p { color: #d6d0c2; }
.panel-separate { border-style: dashed; }
.status-line { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.status-dot.progress { background: var(--brass); }
.status-dot.limited { background: var(--terracotta); }
.status-dot.complete { background: var(--forest-700); }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--ivory-200); overflow: hidden; display: block; }
progress::-webkit-progress-bar { background: var(--ivory-200); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--forest-700); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--forest-700); border-radius: 999px; }
.panel-primary progress, .panel-primary progress::-webkit-progress-bar { background: rgb(255 255 255 / 0.15); }
.panel-primary progress::-webkit-progress-value { background: var(--brass-light); }
.panel-primary progress::-moz-progress-bar { background: var(--brass-light); }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 0.6rem 0; border-bottom: var(--border); margin: 0; display: flex; justify-content: space-between; gap: var(--space-s); align-items: baseline; flex-wrap: wrap; }
.plain-list li:last-child { border-bottom: 0; }
.empty { color: var(--text-muted); font-style: italic; font-family: var(--font-serif); font-size: var(--step-1); }

/* Learning --------------------------------------------------------------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: end; margin-block: var(--space-l); }
.filter-bar .field { flex: 1 1 16rem; }
.filter-bar .btn { flex: none; }
.area-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: var(--space-l); }
.area-tabs a { text-decoration: none; }
.area-tabs a[aria-current="true"] .chip { background: var(--forest-800); color: var(--ivory-50); border-color: var(--forest-800); }
.area-group { margin-bottom: var(--space-xl); }
.area-group > h2 { font-size: var(--step-2); display: flex; align-items: baseline; gap: var(--space-s); }
.course-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-m); }
@media (min-width: 48em) { .course-list { grid-template-columns: repeat(2, 1fr); } }
.course-list li { margin: 0; }
.course-item { display: grid; gap: 0.6rem; height: 100%; padding: var(--space-l); background: var(--surface); border: var(--border); border-radius: var(--radius-l); text-decoration: none; color: var(--text); transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.course-item:hover { border-color: var(--forest-700); color: var(--text); }
.course-item h3 { font-size: var(--step-2); margin: 0; }
.course-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: var(--step--1); color: var(--text-muted); }
.area-nutrition { border-top: 4px solid var(--forest-700); }
.area-wellness { border-top: 4px solid var(--brass); }
.area-first_aid { border-top: 4px solid var(--terracotta); }

.module { margin-bottom: var(--space-l); }
.module h2 { font-size: var(--step-1); padding-bottom: var(--space-xs); border-bottom: 1px solid var(--forest-800); }
.lesson-rows { list-style: none; padding: 0; margin: 0; }
.lesson-rows li { display: grid; grid-template-columns: 18px 1fr; gap: 0.25rem var(--space-s); align-items: center; padding: 0.8rem 0; border-bottom: var(--border); margin: 0; }
.lesson-rows li > :not(.dot) { grid-column: 2; }
.lesson-rows .dot { grid-row: 1; }
.lesson-rows .lesson-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.lesson-rows .locked-why { font-size: var(--step--1); color: var(--text-muted); }
@media (min-width: 48em) {
  .lesson-rows li { grid-template-columns: 18px 1fr auto; }
  .lesson-rows .lesson-meta { grid-column: 3; grid-row: 1; justify-content: flex-end; }
}

.lesson-layout { display: grid; gap: var(--space-xl); }
@media (min-width: 64em) { .lesson-layout { grid-template-columns: minmax(0, 1fr) 18rem; } }
.prose { max-width: var(--measure); font-size: 1.08rem; }
.prose h2 { font-size: var(--step-2); margin-top: var(--space-l); }
.prose .next-step h2 { font-size: var(--step-1); margin-top: 0; }
.prose .next-step .btn { text-decoration: none; }
.prose p { line-height: 1.7; }
.lesson-actions { display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: center; margin-top: var(--space-l); padding-top: var(--space-l); border-top: var(--border); }
.pager { display: flex; justify-content: space-between; gap: var(--space-m); margin-top: var(--space-l); flex-wrap: wrap; }
.media-block { margin-block: var(--space-l); }
.media-block video, .media-block audio { width: 100%; border-radius: var(--radius-m); background: #000; }
.transcript { margin-top: var(--space-s); }
.transcript summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.quiz-q { margin-bottom: var(--space-l); }
.quiz-result { margin-top: var(--space-xs); font-size: var(--step--1); }

/* Assessment ------------------------------------------------------------- */
.assess-header { border-bottom: var(--border); background: var(--surface); }
.assess-header .wrap-narrow { display: flex; justify-content: space-between; align-items: center; min-height: 64px; gap: var(--space-m); }
.assess-header .title { font-family: var(--font-serif); font-size: 1.2rem; }
.assess-main { padding-block: var(--space-xl) var(--space-2xl); }
.assess-main h1 { font-size: var(--step-3); }
.welcome-text p { font-size: var(--step-1); line-height: 1.55; }
.welcome-text p + p { color: var(--text-muted); font-size: var(--step-0); border-left: 3px solid var(--brass); padding-left: var(--space-m); }
.question-prompt { font-family: var(--font-serif); font-size: var(--step-2); line-height: 1.25; margin-bottom: var(--space-m); }
.nonanswer { margin-top: var(--space-m); padding-top: var(--space-m); border-top: var(--border); }
.question-links { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-m); row-gap: 0; margin-top: var(--space-s); padding-top: var(--space-xs); border-top: var(--border); }
.question-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--forest-800); text-underline-offset: 0.2em; }
@media (max-width: 480px) { .question-links { column-gap: 0.9rem; } .question-links > * { font-size: 0.9rem; } }
.number-row { display: flex; gap: var(--space-s); align-items: end; flex-wrap: wrap; }
.number-row .field:first-child { flex: 1 1 10rem; }
.number-row .field:last-child { flex: 0 1 9rem; }
.assess-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-s); margin-top: var(--space-l); align-items: center; }
.report-section { margin-bottom: var(--space-xl); }
.report-section h2 { font-size: var(--step-2); }

/* Tables (staff/employer) ----------------------------------------------- */
.table-wrap { overflow-x: auto; border: var(--border); border-radius: var(--radius-m); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: var(--border); vertical-align: top; }
th { font-weight: 600; background: var(--ivory-200); }
tr:last-child td { border-bottom: 0; }

/* Policy pages ------------------------------------------------------------ */
.policy-nav { list-style: none; padding: 0; margin: 0; font-size: var(--step--1); }
.policy-nav li { margin: 0 0 0.4rem; }

/* Reveal (progressive enhancement; content is visible without JS) ------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .app-header, .app-nav, .env-banner, .btn { display: none !important; }
  body { background: #fff; }
}
.h-card { font-size: var(--step-2); margin: 0; }

/* allauth pages render inside <main class="auth-main"> */
.auth-main { width: min(100% - 2 * var(--gutter), 30rem); margin: var(--space-xl) auto var(--space-2xl); background: var(--surface); border: var(--border); border-radius: var(--radius-l); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); }
.auth-main h1 { font-size: var(--step-3); }
.auth-main form .btn-primary { width: 100%; }
.auth-main .btn-row { margin-top: var(--space-s); }

/* Service groups: what membership includes vs what is separate */
.service-groups { display: grid; gap: var(--space-l); margin-top: var(--space-l); }
.service-groups .service-index { margin-top: var(--space-s); }
.group-title { font-family: var(--font-sans); font-size: var(--step--1); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin: 0; }
.separate-grid { display: grid; gap: var(--space-m); }
@media (min-width: 48em) { .separate-grid { grid-template-columns: repeat(2, 1fr); } }
.separate-grid .commitment-term { font-size: var(--step-2); }

/* Employer programme report */
.stat-grid { display: grid; gap: var(--space-s); grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin-top: var(--space-s); }
.stat { background: var(--surface); border: var(--border); border-radius: var(--radius-m); padding: var(--space-m); display: grid; gap: 0.25rem; }
.stat-value { font-family: var(--font-serif); font-size: var(--step-3); line-height: 1; color: var(--forest-900); }
.stat-of { font-size: var(--step-1); color: var(--text-muted); }
.stat-label { font-size: var(--step--1); color: var(--text-muted); }

/* First aid classes */
.training-course + .training-course { margin-top: var(--space-l); }
.training-head { display: grid; gap: var(--space-m); }
@media (min-width: 48em) { .training-head { grid-template-columns: 1fr auto; align-items: start; } }
.training-prices { margin: 0; display: grid; gap: var(--space-xs); min-width: 14rem; }
.training-prices div { background: var(--bg); border: var(--border); border-radius: var(--radius-m); padding: var(--space-xs) var(--space-s); }
.training-prices dt { font-size: var(--step--1); color: var(--text-muted); }
.training-prices dd { margin: 0; font-family: var(--font-serif); font-size: var(--step-1); }
.training-sessions { margin-top: var(--space-m); }
.training-action { display: flex; flex-wrap: wrap; gap: var(--space-s); align-items: center; }
.founder > img { object-fit: cover; width: 100%; height: auto; aspect-ratio: 4 / 5; }

/* About: the two brands side by side */
.brand-pair { display: flex; flex-wrap: wrap; gap: var(--space-m); margin-top: var(--space-l); }
.brand-pair figure { margin: 0; flex: 1 1 14rem; display: flex; align-items: center; gap: var(--space-s); padding: var(--space-m); background: var(--surface); border: var(--border); border-radius: var(--radius-m); }
.brand-pair img { height: 56px; width: auto; }
.brand-pair figcaption { font-size: var(--step--1); color: var(--text-muted); line-height: 1.35; }
.brand-pair figcaption strong { font-family: var(--font-serif); font-size: var(--step-1); color: var(--forest-900); font-weight: 500; }

/* Contact details by country */
.contact-email a { font-family: var(--font-serif); font-size: var(--step-1); }
.contact-countries { display: grid; gap: var(--space-m); margin-block: var(--space-m); }
@media (min-width: 30em) { .contact-countries { grid-template-columns: 1fr 1fr; } }
.contact-countries h3 { font-family: var(--font-sans); font-size: var(--step--1); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--terracotta); margin-bottom: var(--space-xs); }
.contact-countries p { margin-bottom: var(--space-2xs); }

/* Assessment: progress, sections, saving */
.assess-progress { display: grid; gap: 0.35rem; margin-bottom: var(--space-m); }
.assess-progress p { margin: 0; }
.assess-progress progress { width: 100%; height: 6px; }
.save-status { list-style: none; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; font-weight: 600; color: var(--forest-800); margin: 0 0 var(--space-s); }
.save-status::before { content: "\2713"; }
.messages:has(> .save-status:only-child) { padding: 0; margin: 0 0 var(--space-s); }
.section-banner { padding: var(--space-xs) var(--space-s); border-left: 3px solid var(--forest-800); background: rgb(30 59 44 / 0.06); font-size: 0.95rem; }
.section-list { list-style: none; padding: 0; margin: var(--space-m) 0; display: grid; gap: 0.5rem; counter-reset: sec; }
.section-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-s); padding: 0.8rem 1rem; border: var(--border); border-radius: var(--radius-m); background: #fff; counter-increment: sec; }
.section-name::before { content: counter(sec) ". "; color: var(--muted, #6b6b6b); }
.section-row.status-completed .section-badge { background: var(--forest-100); border-color: var(--forest-700); color: var(--forest-800); }
.section-row.status-in_progress .section-badge { background: #f6ecd2; border-color: #e3cf9b; }
.section-row.status-in_preparation { background: transparent; }
.section-row.status-in_preparation .section-name { color: var(--muted, #6b6b6b); }
.section-badge { flex: none; white-space: nowrap; }
.theme-summary { margin: var(--space-m) 0 var(--space-s); }
.theme-list { list-style: none; padding: 0; margin: 0 0 var(--space-m); display: grid; gap: 0.5rem; }
.theme-row { padding: 0.8rem 1rem; border: var(--border); border-radius: var(--radius-m); background: #fff; }
.theme-row.is-current { border-color: var(--forest-800); box-shadow: 0 0 0 2px rgb(30 59 44 / 0.15); }
.theme-head { display: flex; align-items: center; gap: var(--space-s); }
.theme-number { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: 0.9rem; border: 1px solid var(--line); color: var(--forest-800); }
.theme-row.status-completed .theme-number, .theme-row.status-skipped .theme-number, .theme-row.status-not_applicable .theme-number { background: var(--forest-800); border-color: var(--forest-800); color: #fff; }
.theme-name { flex: 1; min-width: 0; font-weight: 600; }
.theme-current { display: inline-block; margin-left: 0.35rem; font-size: 0.8rem; font-weight: 600; color: var(--forest-800); background: var(--forest-100); border-radius: 999px; padding: 0.05rem 0.55rem; }
.theme-row.status-completed .section-badge { background: var(--forest-100); border-color: var(--forest-700); color: var(--forest-800); }
.theme-row.status-in_progress .section-badge { background: #f6ecd2; border-color: #e3cf9b; }
.theme-sections { margin: 0.5rem 0 0 calc(1.9rem + var(--space-s)); font-size: 0.92rem; }
.theme-sections summary { cursor: pointer; color: var(--muted, #6b6b6b); }
.theme-sections ul { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.25rem; }
.theme-sections li { display: flex; justify-content: space-between; gap: var(--space-s); }
.theme-sections li > .small { flex: none; white-space: nowrap; }
@media (max-width: 480px) { .theme-head { flex-wrap: wrap; row-gap: 0.3rem; } .theme-name { flex-basis: calc(100% - 1.9rem - var(--space-s)); } .theme-head .section-badge { margin-left: calc(1.9rem + var(--space-s)); } }
.section-mini { list-style: none; padding: 0; margin: 0 0 var(--space-s); display: grid; gap: 0.2rem; }
.section-mini li { display: flex; justify-content: space-between; gap: var(--space-s); }
.section-mini li > .small { flex: none; white-space: nowrap; }
.section-mini li.is-current { font-weight: 600; }
.select-long { width: 100%; max-width: 32rem; font-size: 1rem; padding: 0.4rem; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; }
.other-text { margin: 0 0 0.25rem 2.2rem; }
.other-text[hidden] { display: none; }
.answer-item { display: block; }
.select-dropdown { min-width: 14rem; max-width: 100%; font-size: 1rem; padding: 0.6rem 0.7rem; min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; }
.btn-small { min-height: 40px; padding: 0.45em 0.9em; font-size: 0.9rem; }
.group-heading { font-weight: 600; color: var(--forest-800); margin: 0 0 var(--space-xs); }
.measure { display: grid; gap: var(--space-s); }
.measure-unit { padding: var(--space-s) 0; }
.measure-unit[hidden] { display: none; }
.measure-unit-label { margin: 0 0 0.25rem; }
.measure-row { display: flex; flex-wrap: wrap; gap: var(--space-s); }
.measure-row .field { margin: 0; }
.select-part { min-width: 7rem; }
.list-entry { border: var(--border); border-radius: var(--radius-m); padding: var(--space-s) var(--space-m); margin: 0 0 var(--space-s); background: #fff; }
.list-entry legend { padding: 0 0.3rem; font-weight: 600; }
.list-fields { display: grid; gap: var(--space-s); }
@media (min-width: 40em) { .list-fields { grid-template-columns: 1fr 1fr; } }
.list-fields .field { margin: 0; }
.list-fields input { width: 100%; }
.list-remove { display: inline-flex; gap: 0.4rem; align-items: center; margin-top: var(--space-xs); }

/* Portion guides kept visible above an assessment answer */
.portion-guide { border: var(--border); border-radius: var(--radius-m); padding: var(--space-m); margin-bottom: var(--space-m); background: var(--surface, #fff); }
.portion-guide ul { margin: 0; padding-left: 1.2em; }
.portion-guide li + li { margin-top: 0.25em; }
.portion-guide p { margin: var(--space-s, 0.5rem) 0 0; }
.portion-guide ul + p { margin-top: var(--space-m); }
.portion-guide .guide-heading { margin: 0; font-weight: 600; color: var(--forest-800); }
.portion-guide .guide-tips { margin-top: var(--space-s); font-size: 0.95rem; }
.guide-table summary { cursor: pointer; font-weight: 600; }
.guide-table[open] summary { margin-bottom: var(--space-s, 0.5rem); }
.guide-table th[scope="row"] { font-weight: 400; }
.portion-guide > p:first-child { margin-top: 0; }
.measure-row input[type="text"] { width: min(100%, 22rem); }
.input-count { width: 8rem; }
.measure-row { align-items: flex-start; }
.details-fields { display: grid; gap: var(--space-s); max-width: 28rem; }

/* Verified support resources shown with an assessment question */
.resources { margin-top: var(--space-l, 1.5rem); padding-top: var(--space-m); border-top: var(--border); }
.resources-title { font-size: 1.15rem; margin: 0 0 var(--space-s, 0.5rem); }
.resources-subtitle { font-size: 1rem; margin: var(--space-m) 0 var(--space-s, 0.5rem); }
.resource-list { margin: 0; padding-left: 1.2em; }
.resource-list li { margin-bottom: var(--space-s, 0.5rem); }
.resource-list li span { display: block; }

/* Personalised feedback */
.report-meta { margin-bottom: var(--space-l, 1.5rem); }
.report-theme { border: var(--border); border-radius: var(--radius-m); padding: var(--space-s, 0.5rem) var(--space-m); margin-bottom: var(--space-s, 0.5rem); background: var(--surface); }
.report-theme summary { cursor: pointer; font-weight: 600; padding: var(--space-xs, 0.25rem) 0; }
.report-theme ul { margin: var(--space-s, 0.5rem) 0; padding-left: 1.2em; }
.report-screening { border-top: var(--border); padding-top: var(--space-s, 0.5rem); margin-top: var(--space-s, 0.5rem); }

/* Review page: answers grouped by part */
.review-submit-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-s); }
.review-submit-top p { margin: 0; flex: 1 1 18rem; }
.review-check { border: var(--border); border-radius: var(--radius-m); background: #fff; padding: var(--space-s) var(--space-m); margin: var(--space-m) 0; }
.review-check h2 { font-size: 1.15rem; margin: 0; }
.review-check ul { list-style: none; padding: 0; margin: var(--space-xs) 0 0; display: grid; gap: 0.35rem; }
.review-check li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-s); }
.review-check .review-q { flex: 1 1 14rem; }
.review-check a { font-weight: 600; color: var(--forest-800); }
.review-parts-title { font-size: 1.15rem; margin: var(--space-m) 0 var(--space-xs); }
.review-part { border: var(--border); border-radius: var(--radius-m); background: #fff; margin-bottom: 0.5rem; }
.review-part > summary { cursor: pointer; padding: 0.75rem 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: var(--space-s); }
.review-part-name { font-weight: 600; }
.review-part[open] > summary { border-bottom: var(--border); }
.review-part .table-wrap { margin: 0; border: 0; }
.notice-update ul { margin: var(--space-xs) 0 var(--space-s); }

/* Feedback findings */
.report-basis { font-weight: 600; color: var(--forest-800); }
.next-steps { padding-left: 1.2em; }
.next-steps li + li { margin-top: 0.35rem; }
.finding-parts { margin: var(--space-s) 0 0; }
.finding-parts dt { font-weight: 600; font-size: 0.9rem; color: var(--forest-800); margin-top: var(--space-s); }
.finding-parts dd { margin: 0.15rem 0 0; }
.finding-parts dd p { margin: 0 0 0.25rem; }
.finding-actions { margin-top: var(--space-s); padding-top: var(--space-s); border-top: var(--border); }
.finding-actions .btn-row { flex-wrap: wrap; gap: 0.4rem; }
.routine-form fieldset { border: 0; padding: 0; margin: 0 0 var(--space-xs); display: grid; gap: 0.3rem; }
.routine-form legend { margin-bottom: 0.3rem; }
.choice-inline { display: flex; gap: 0.5rem; align-items: center; min-height: 36px; }
/* Portion conversion (staff) */
.portion-search { display: grid; gap: var(--space-s); margin-bottom: var(--space-m); }
.portion-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--space-s); }
.portion-convert fieldset { border: 0; padding: 0; margin: 0 0 var(--space-s); display: grid; gap: 0.3rem; }
.portion-unusable { margin-top: var(--space-s); }
.portion-results-folded { margin-bottom: var(--space-m); }
.portion-results-folded > summary { cursor: pointer; font-weight: 600; }
.portion-result { margin-top: var(--space-m); }
.portion-section { margin-top: var(--space-m); border: var(--border); border-radius: var(--radius-m); background: #fff; padding: var(--space-s) var(--space-m); }
.portion-section > summary { cursor: pointer; font-weight: 600; }
.portion-measured { display: grid; gap: var(--space-s); margin-top: var(--space-s); }
.portion-choice { border: 0; padding: 0; margin: 0; display: grid; gap: 0.3rem; }

.portion-nutrients-title { margin-top: var(--space-m, 1rem); }

/* Feedback page (owner-approved layout, 2 Nov 2026) */
.report-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-s); }
.report-head h1 { margin-bottom: 0; }
.print-only { display: none; }
.glance { list-style: none; padding: 0; margin: var(--space-s) 0 0; display: grid; gap: var(--space-s); grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.glance-item { background: var(--surface); border: var(--border); border-radius: var(--radius-m); padding: 0.75rem 0.9rem; display: flex; flex-direction: column; gap: 0.2rem; }
.glance-label { font-size: var(--step--1); color: var(--text-muted); }
.glance-value { font-size: var(--step-1); font-weight: 600; }
.glance-goal { font-weight: 400; }
.status { display: inline-block; align-self: flex-start; font-size: 0.8rem; font-weight: 600; padding: 0.15em 0.6em; border-radius: var(--radius-s); border: 1px solid transparent; }
.status-meets { background: var(--success-bg); color: var(--success); border-color: #bcd4c1; }
.status-notyet { background: #f6ecd2; color: #6b4e12; border-color: #e3cf9b; }
.finding-group { font-family: var(--font-sans); font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: var(--space-l) 0 var(--space-xs); }
.finding summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.finding-title { margin-right: auto; }
.report-intro { color: var(--text-muted); }
.gauge { margin: var(--space-s) 0 var(--space-xs); }
.gauge-svg { display: block; overflow: visible; font-family: var(--font-sans); }
.gauge-you-label { font-size: 13px; font-weight: 700; fill: var(--charcoal); }
.gauge-goal-label { font-size: 12px; fill: var(--charcoal-soft); }
.gauge-bg { fill: var(--ivory-200); }
.zone-within { fill: #b9d3bf; }
.zone-under, .zone-over { fill: #ecd9a6; }
.zone-high { fill: #e2b3a0; }
.gauge-tick { stroke: var(--charcoal-soft); stroke-width: 2; stroke-dasharray: 3 2; }
.gauge-you { fill: var(--forest-900); stroke: #fff; stroke-width: 3; }
.next-steps-list { padding-left: 1.2em; margin: var(--space-s) 0 0; }
.next-step { margin-bottom: var(--space-m); }
.next-step p { margin: 0 0 0.3rem; }
.next-step-topic { font-weight: 600; }
.print-letterhead, .print-ref, .print-footer-note { display: none; }

@page { size: A4; margin: 18mm 16mm 20mm;
  @bottom-left { content: "NUWECO · Nutrition and Wellness Consultants · Confidential"; font: 8pt "Figtree", sans-serif; color: #666; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 8pt "Figtree", sans-serif; color: #666; }
  /* Our own header boxes, so the browser does not print its date, title and address there. */
  @top-left { content: "NUWECO · Nutrition and Wellness Consultants"; font: 8pt "Figtree", sans-serif; color: #666; }
  @top-right { content: "Initial assessment feedback"; font: 8pt "Figtree", sans-serif; color: #666; } }
@page :first { @top-left { content: " "; } @top-right { content: " "; } }
@media print {
  body { background: #fff; font-size: 10.5pt; line-height: 1.45; color: #1d1d1b; }
  .assess-header, .env-banner, .skip-link, .messages, .report-head, .report-download, .finding-actions, .routine-form,
  .assess-actions, .notice-update, .notice-outdated, form, .no-print, .glance-item a::after { display: none !important; }
  .assess-main, .wrap-narrow { padding: 0 !important; margin: 0 !important; width: auto !important; max-width: none !important; }
  .print-letterhead { display: flex; align-items: center; justify-content: space-between; gap: 12mm;
    padding-bottom: 5mm; border-bottom: 2.5pt solid var(--forest-800); margin-bottom: 6mm; }
  .print-logo { height: 15mm; width: auto; }
  .print-brand { display: flex; align-items: center; gap: 4mm; }
  .print-brand p { margin: 0; display: grid; }
  .print-brand-name { font-family: var(--font-serif); font-size: 18pt; letter-spacing: 0.04em; color: var(--forest-900); }
  .print-brand-sub { font-size: 7.5pt; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
  .print-doc { text-align: right; }
  .print-doc-type { margin: 0; font: 600 8pt var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--forest-700); }
  .print-doc-title { margin: 1mm 0 0; font: 400 18pt var(--font-serif); color: var(--forest-900); }
  .print-ref { display: table; width: 100%; border-collapse: collapse; margin: 0 0 6mm; font-size: 9pt; }
  .print-ref th, .print-ref td { background: none !important; border: 0 !important; border-bottom: 0.75pt solid #c9c2b3 !important; padding: 1.2mm 0; }
  .print-ref th { width: 32mm; text-align: left; font-weight: 600; color: var(--forest-800); }
  .report-intro { font-size: 9pt; border-left: 2pt solid var(--forest-700); padding-left: 3mm; }
  main { counter-reset: section; }
  .report-section > h2 { counter-increment: section; font: 400 14pt var(--font-serif); color: var(--forest-900);
    border-bottom: 0.75pt solid #bbb; padding-bottom: 1.5mm; margin: 7mm 0 3mm; break-after: avoid; }
  .report-section > h2::before { content: counter(section) ". "; color: var(--forest-700); }
  .glance { grid-template-columns: repeat(3, 1fr); gap: 3mm; }
  .glance-item { border: 0.75pt solid #c9c2b3; border-radius: 2mm; padding: 2.5mm 3mm; break-inside: avoid; }
  .glance-item a { color: inherit; text-decoration: none; }
  .finding-group { margin: 5mm 0 2mm; color: var(--forest-700); break-after: avoid; }
  .report-theme { break-inside: auto; border: 0.75pt solid #c9c2b3; border-radius: 2mm; background: #fff; padding: 3mm 4mm; margin-bottom: 3mm; }
  .report-theme summary { list-style: none; font-weight: 700; }
  .report-theme summary::marker, .report-theme summary::-webkit-details-marker { display: none; }
  .finding summary, .gauge, .finding-parts dt { break-after: avoid; }
  .finding-parts dd, .gauge { break-inside: avoid; }
  .finding-parts dt { color: var(--forest-800); font-size: 8.5pt; text-transform: uppercase; letter-spacing: 0.06em; }
  .report-limits summary, .report-sources summary { font: 400 14pt var(--font-serif); color: var(--forest-900); }
  .report-sources a { color: inherit; text-decoration: none; }
  .report-sources a::after { content: " (" attr(href) ")"; font-size: 0.8em; word-break: break-all; }
  .next-step { break-inside: avoid; }
  .print-footer-note { display: block; margin-top: 8mm; padding-top: 3mm; border-top: 0.75pt solid #bbb; font-size: 8pt; color: #555; }
  .glance-item, .status, .gauge-svg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
}

/* Dashboard: actions chosen from feedback */
ul.action-list { list-style: none; padding: 0; margin: 0; }
.action-item { padding: var(--space-s) 0; border-top: var(--border); }
.action-item:first-child { border-top: 0; }
.action-item p { margin: 0 0 0.3rem; }
.action-topic { font-weight: 600; }
.action-checkin fieldset { border: 0; padding: 0; margin: var(--space-xs) 0 0; }
.notice h2.notice-title { font-family: var(--font-sans); font-size: var(--step-0); }

/* Learning programme (owner brief, 2 Nov 2026) */
.programme-list { list-style: none; padding: 0; margin: 0; }
.programme-list > li { padding: var(--space-s) 0; border-top: var(--border); }
.programme-list > li:first-child { border-top: 0; }
.programme-list p { margin: 0 0 0.3rem; }
.programme-lesson-title { font-weight: 600; }
.progress-states { list-style: none; padding: 0; margin: 0.4rem 0 0.6rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.progress-states li { font-size: var(--step--1); padding: 0.15em 0.6em; border-radius: var(--radius-s); border: var(--border); background: var(--surface); color: var(--text-muted); }
.progress-states li.is-done { background: var(--success-bg); color: var(--success); border-color: #bcd4c1; }
.lesson-progress { width: 100%; height: 0.5rem; accent-color: var(--forest-700); margin: 0 0 var(--space-m); }
.lesson-section { background: var(--surface); border: var(--border); border-radius: var(--radius-l); padding: clamp(1rem, 0.8rem + 1.5vw, 2rem); }
.lesson-section:focus { outline: none; }
.card-choices { display: grid; gap: var(--space-s); grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin-bottom: var(--space-s); }
.card-choice { display: flex; gap: 0.6rem; align-items: flex-start; border: var(--border); border-radius: var(--radius-m); padding: 0.8rem; background: var(--bg); cursor: pointer; }
.card-choice:has(input:checked) { border-color: var(--forest-700); box-shadow: 0 0 0 2px var(--forest-100); }
.lesson-feedback { margin-top: var(--space-s); }
.lesson-feedback.is-correct { background: var(--success-bg); }
.recap-list li { margin-bottom: 0.4rem; }
.lesson-nav { margin-top: var(--space-m); align-items: center; }
.lesson-outline ol { margin: var(--space-s) 0 0; }
@media (prefers-reduced-motion: reduce) { .card-choice { transition: none; } }

/* Lesson screens from NUWECO's lesson specifications: readable copy (18px rising to 20px), one
   calculation step per line (scrolls sideways rather than shrinking), figures drawn from the lesson's numbers. */
.lesson-blocks { display: grid; gap: var(--space-s); margin-bottom: var(--space-s); }
.lesson-blocks > p, .lesson-section > p, .lesson-blocks li { font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); line-height: 1.55; margin: 0; }
.lesson-blocks .small { font-size: var(--step--1); }
.lesson-highlight { border-left: 4px solid var(--brass); background: var(--ivory-100); padding: var(--space-s) var(--space-m); border-radius: var(--radius-s); margin: 0; }
.lesson-highlight-title { font-weight: 700; margin: 0 0 0.2rem; }
.lesson-caution { background: var(--terracotta-soft); border-radius: var(--radius-m); padding: var(--space-s) var(--space-m); margin: 0; }
.lesson-equation { font-family: var(--font-serif); font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); white-space: nowrap; overflow-x: auto;
  background: var(--forest-100); border-radius: var(--radius-m); padding: 0.6rem 0.9rem; margin: 0; }
.equation-explain { margin: 0; color: var(--text-muted); }
.slide-text .lesson-equation { white-space: normal; }  /* beside a chart the column is narrow: wrap rather than hide */
.table-scroll { overflow-x: auto; }
.lesson-table { border-collapse: collapse; width: 100%; font-size: var(--step-0); }
.lesson-table th, .lesson-table td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem; border-bottom: var(--border); }
.lesson-facts { display: grid; gap: var(--space-m); margin: 0; }
.lesson-facts > div { border-left: 3px solid #8ca184; padding: 0.15rem 0 0.15rem var(--space-s); }
.lesson-facts dt { font-size: var(--step--1); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.lesson-facts dd { margin: 0.2rem 0 0; font-size: var(--step-1); line-height: 1.35; }
.lesson-base { font-weight: 700; margin: 0; }
.lesson-steps { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.4rem; }
.lesson-more summary, .lesson-note summary, .reveal-card summary { cursor: pointer; font-weight: 600; }
.lesson-note { border: var(--border); border-radius: var(--radius-m); padding: 0.7rem 0.9rem; background: var(--bg); }
.lesson-note p, .lesson-more p { margin: 0.5rem 0 0; }
.lesson-figure { margin: 0; }
.lesson-photo img { display: block; max-width: 100%; width: auto; height: auto; max-height: min(22rem, 42vh); margin: 0 auto;
  border-radius: var(--radius-m); }  /* whole photo, original proportions: never cropped or stretched */
.slide-split { display: grid; gap: var(--space-m); }
.slide-visual { order: -1; }  /* phones: picture first, then the text at full width */
@media (min-width: 56em) {
  .slide-split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-l); align-items: center; }
  .slide-visual { order: 0; }
}
.photo-labels { display: grid; grid-template-columns: 1fr 1fr; text-align: center; font-size: var(--step--1); color: var(--text-muted); margin-top: 0.3rem; }
.figure-title { font-size: var(--step--1); color: var(--text-muted); margin: 0 0 0.4rem; text-transform: uppercase; letter-spacing: 0.04em; }
.figure-energy, .figure-results, .figure-shares, .figure-bars, .figure-pictorial, .figure-notequal, .figure-conversion {
  background: var(--ivory-100); border-radius: var(--radius-m); padding: var(--space-s) var(--space-m); }
.energy-row { margin-bottom: 0.5rem; }
.energy-row-label { display: flex; justify-content: space-between; gap: var(--space-s); }
.energy-units { width: 100%; max-width: 22rem; height: 1rem; display: block; margin-top: 0.2rem; }
.unit-on { fill: var(--forest-700); }
.unit-off { fill: var(--ivory-300); }
.figure-bars svg, .figure-pictorial svg, .figure-shares svg { width: 100%; height: auto; max-width: 30rem; display: block; margin: 0 auto; }
.figure-pictorial svg { max-width: 16rem; }
.fig-grid { stroke: var(--line); }
.fig-muted { fill: var(--text-muted); font-family: var(--font-sans); }
.fig-text { fill: var(--charcoal); font-family: var(--font-sans); }
.fig-bar-1 { fill: #69876d; }
.fig-bar-2, .fig-bar { fill: var(--forest-700); }
.fig-bar-label { fill: #fff; font-family: var(--font-sans); font-weight: 600; }
.fig-box { fill: var(--forest-100); }
.fig-serif { fill: var(--forest-700); font-family: var(--font-serif); }
.fig-line { stroke: #8ca184; }
.fig-stomach { fill: #d9b19a; stroke: #9b735d; }
.fig-gut { stroke: #8ba17f; }
.fig-spark { fill: var(--brass); }
.share-1 { fill: var(--forest-700); background: var(--forest-700); }
.share-2 { fill: var(--brass); background: var(--brass); }
.share-3 { fill: var(--terracotta); background: var(--terracotta); }
.share-legend { display: flex; gap: var(--space-s); justify-content: center; margin-top: 0.4rem; font-size: var(--step--1); }
.share-key::before { content: ""; display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; margin-right: 0.3rem; background: inherit; }
.share-key { background: none; }
.share-key.share-1::before { background: var(--forest-700); }
.share-key.share-2::before { background: var(--brass); }
.share-key.share-3::before { background: var(--terracotta); }
/* Worked calculations revealed one step at a time; a chart that adds up to its total; the BMR explorer. */
.lesson-step { display: grid; gap: var(--space-s); }
.lesson-step[hidden], .figure-explorer[hidden], .figure-bars[hidden], [data-show-when][hidden] { display: none; }
.lesson-step:focus { outline: none; }
.lesson-step.is-revealed { animation: step-in 0.35s ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateY(0.4rem); } to { opacity: 1; transform: none; } }
.lesson-next-step { justify-self: start; }
.figure-stack, .figure-explorer { background: var(--ivory-100); border-radius: var(--radius-m); padding: var(--space-s) var(--space-m); }
.figure-stack svg, .figure-explorer svg { width: 100%; height: auto; max-width: 30rem; display: block; margin: 0 auto; }
.stack-legend { display: grid; gap: 0.4rem; margin: var(--space-s) 0 0; }
.stack-legend > div { display: flex; justify-content: space-between; gap: var(--space-s); align-items: baseline; }
.stack-legend dt { font-size: var(--step--1); }
.stack-legend dt::before { content: ""; display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; margin-right: 0.4rem; }
.stack-legend .stack-1 dt::before { background: var(--forest-700); }
.stack-legend .stack-2 dt::before { background: var(--brass); }
.stack-legend dd { margin: 0; font-weight: 600; white-space: nowrap; }
.explorer-sex { border: 0; padding: 0; margin: 0 0 var(--space-xs); display: flex; flex-wrap: wrap; gap: var(--space-s); }
.explorer-sex label { display: inline-flex; align-items: center; gap: 0.35rem; }
.explorer-inputs { display: grid; gap: 0.25rem; margin-bottom: var(--space-xs); }
.explorer-inputs label { display: grid; font-size: var(--step--1); }
.explorer-inputs output { font-weight: 700; }
.explorer-inputs input[type="range"] { width: 100%; accent-color: var(--forest-700); min-height: 1.6rem; margin: 0; }
.explorer-result { font-weight: 600; margin: 0.3rem 0; }
.figure-explorer figcaption .btn-text { font-size: inherit; }
@media (prefers-reduced-motion: reduce) { .lesson-step.is-revealed { animation: none; } }
/* Lesson 2 food illustrations: one tile per food the slide names, label underneath. */
.figure-foods { background: var(--ivory-100); border-radius: var(--radius-m); padding: var(--space-s) var(--space-m); display: grid; gap: var(--space-s); }
.food-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: var(--space-s); }
.food-tiles.is-many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.food-tiles.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.food-tiles.is-one { grid-template-columns: minmax(0, 10rem); }
.food-tiles li { display: grid; justify-items: center; align-content: start; gap: 0.3rem; text-align: center; font-size: var(--step--1); line-height: 1.3;
  background: #fff; border-radius: var(--radius-m); padding: 0.7rem 0.4rem; box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); }
.food-tiles .food-icon { width: clamp(3.5rem, 2.6rem + 2.6vw, 5rem); height: auto; aspect-ratio: 1; }
.figure-foods[role="img"] .food-tiles li { background: none; padding: 0; }
.foods-group-title { margin: 0 0 0.4rem; font-size: var(--step--1); font-weight: 700; color: var(--forest-700); }
.foods-group.is-muted .food-icon { filter: grayscale(1); opacity: 0.55; }
.foods-group.is-muted .foods-group-title, .foods-group.is-muted li { color: var(--text-muted); }
.choice-food { align-items: center; }
.choice-food .food-icon { width: 2.25rem; height: 2.25rem; flex: none; }
.figure-notequal, .figure-conversion { display: flex; align-items: center; justify-content: center; gap: var(--space-m); text-align: center; }
.figure-notequal div, .conv-circle { display: grid; }
.figure-notequal strong, .conv-circle strong { font-family: var(--font-serif); font-size: var(--step-3); color: var(--forest-700); }
.notequal-sign, .conv-arrow { font-size: var(--step-3); color: var(--brass); }
.conv-circle { width: 7rem; height: 7rem; border-radius: 50%; place-content: center; background: var(--surface); border: 2px solid var(--forest-100); }
.conv-result { border-color: var(--forest-700); }
.figure-results dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xs); margin: 0; text-align: center; }
.figure-results dt { font-size: var(--step--1); color: var(--text-muted); }
.figure-results dd { margin: 0; font-family: var(--font-serif); font-size: var(--step-2); color: var(--forest-700); }
.nutrient-cards { display: grid; gap: var(--space-s); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.nutrient-card { border: var(--border); border-radius: var(--radius-m); padding: var(--space-s) var(--space-m); background: var(--bg); }
.nutrient-card h3 { margin: 0 0 0.3rem; font-size: var(--step-1); }
.nutrient-card p { margin: 0 0 0.5rem; }
.mini-label { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.reveal-grid { display: grid; gap: var(--space-xs); grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.reveal-card { border: var(--border); border-radius: var(--radius-m); padding: 0.7rem 0.9rem; background: var(--bg); }
.reveal-card summary { display: grid; gap: 0.1rem; }
.reveal-card[open] { border-color: var(--forest-700); }
.reveal-card p { margin: 0.5rem 0 0; }
.colour-swatch { width: 1.2rem; height: 1.2rem; border-radius: 50%; display: inline-block; }
.colour-red .colour-swatch { background: #ad514e; }
.colour-orange .colour-swatch { background: #b77a25; }
.colour-green .colour-swatch { background: #4a7554; }
.colour-purple .colour-swatch { background: #79628e; }
.colour-white .colour-swatch { background: #8c7b64; }
.choices-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
/* On phones, long lists of short answers on a slide sit in two columns, so the slide fits without
   scrolling; labels wrap rather than shrink. */
@media (max-width: 40em) { .slide-card .choices-grid { grid-template-columns: 1fr 1fr; gap: .5rem; } .slide-card .choices-grid .choice { align-items: flex-start; gap: .5rem; padding: .6rem .7rem; hyphens: auto; } }
.match-rows { display: grid; gap: var(--space-xs); }
@media (min-width: 40em) { .match-rows .field { display: grid; grid-template-columns: 9rem 1fr; align-items: center; gap: var(--space-s); margin: 0; } }
.factor-result { margin: var(--space-s) 0; }
.big-number { font-family: var(--font-serif); font-size: var(--step-3); color: var(--forest-700); margin: 0.3rem 0 0; }
.lesson-outline-part { font-weight: 700; margin: var(--space-s) 0 0; }
.reflection-message { font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); line-height: 1.55; }
.form-row { display: flex; flex-wrap: wrap; gap: var(--space-s); }
.obs-field { margin-top: var(--space-m); }

/* Lesson player: one steady frame. Every slide sits in a card of the same height (taller slides grow
   rather than clip), the controls stay pinned to the card's foot, and slides cross-fade in place. */
.lesson-shell { max-width: 68rem; margin: 0 auto; }
.lesson-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-s); margin-bottom: var(--space-s); }
.lesson-bar-link { font-size: var(--step--1); color: var(--text-muted); }
.app-main .lesson-title { font-size: var(--step-1); font-family: var(--font-sans); font-weight: 600; margin: 0.15rem 0 0; }
.lesson-done-tag { font-size: var(--step--1); font-weight: 600; color: var(--success); background: var(--success-bg); border-radius: 999px; padding: 0.1rem 0.55rem; margin-left: 0.3rem; vertical-align: middle; }
.part-stepper { list-style: none; display: flex; gap: 0.35rem; padding: 0; margin: 0 0 0.4rem; }
.part-stepper .step { flex: 1 1 0; min-width: 0; margin: 0; }
.part-stepper .step.is-current { flex-grow: 3; }
.part-stepper a, .part-stepper .step > span { display: block; text-decoration: none; color: inherit; }
.part-stepper progress { display: block; width: 100%; height: 0.45rem; border: 0; border-radius: 999px; overflow: hidden; background: var(--ivory-200); appearance: none; -webkit-appearance: none; }
.part-stepper progress::-webkit-progress-bar { background: var(--ivory-200); border-radius: 999px; }
.part-stepper progress::-webkit-progress-value { background: var(--forest-700); border-radius: 999px; transition: width 0.3s ease; }
.part-stepper progress::-moz-progress-bar { background: var(--forest-700); border-radius: 999px; }
.part-stepper .is-done progress::-webkit-progress-value { background: #8ca184; }
.part-stepper .is-done progress::-moz-progress-bar { background: #8ca184; }
.part-stepper a:hover progress, .part-stepper a:focus-visible progress { outline: 2px solid var(--forest-100); outline-offset: 2px; }
.step-label { display: block; font-size: var(--step--1); font-weight: 600; margin-top: 0.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-where { font-size: var(--step--1); color: var(--text-muted); margin: 0.2rem 0 var(--space-s); }
.lesson-where strong { color: var(--text); font-weight: 600; }
.slide-card { display: flex; flex-direction: column; background: var(--surface); border: var(--border); border-radius: var(--radius-l);
  min-height: clamp(27rem, 64vh, 36rem); box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(22 48 31 / 0.06);
  view-transition-name: lesson-slide; }
.slide-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: var(--space-s); padding: clamp(1.1rem, 0.8rem + 1.5vw, 2.25rem); }
.slide-body > * { margin-top: 0; margin-bottom: 0; }
.slide-body .messages { margin: 0; }
.slide-heading { margin: 0 0 var(--space-xs); }
.slide-heading:focus { outline: none; }
.slide-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-s);
  padding: var(--space-s) clamp(1.1rem, 0.8rem + 1.5vw, 2.25rem); border-top: var(--border); }
.slide-controls form { justify-self: end; }
.slide-controls > a { justify-self: start; }
.slide-count { text-align: center; font-variant-numeric: tabular-nums; }
.part-list { list-style: none; padding: 0; margin: var(--space-s) 0 0; display: grid; gap: 0.15rem; }
.part-list li { display: grid; grid-template-columns: 1.6rem 1fr auto; align-items: center; gap: var(--space-xs); padding: 0.35rem 0; margin: 0; }
.part-mark { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-content: center; font-size: 0.75rem; border: 1px solid var(--line); }
.part-list .is-done .part-mark { background: #8ca184; border-color: #8ca184; color: #fff; }
.part-list .is-current .part-mark { background: var(--forest-700); border-color: var(--forest-700); color: #fff; }
.part-list .is-current a { font-weight: 600; }
.lesson-keys { margin-top: var(--space-s); }
@media (hover: none) { .lesson-keys { display: none; } }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 50; list-style: none;
  background: var(--forest-800); color: #fff; padding: 0.7rem 1.1rem; border-radius: 999px; font-weight: 600;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18); animation: toast-in 0.35s ease-out, toast-out 0.4s ease-in 3.6s forwards; }
.toast::before { content: "✓ "; color: var(--brass-light); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 0.75rem); } }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }
.lesson-feedback { animation: feedback-in 0.25s ease-out; }
.lesson-feedback.is-correct .notice-title::before { content: "✓ "; color: var(--success); }
@keyframes feedback-in { from { opacity: 0; transform: translateY(0.4rem); } }
.is-loading-slide .slide-controls .btn-primary { opacity: 0.7; cursor: progress; }
::view-transition-old(lesson-slide), ::view-transition-new(lesson-slide) { animation-duration: 0.22s; animation-timing-function: ease; }
::view-transition-old(lesson-slide) { animation-name: slide-out; }
::view-transition-new(lesson-slide) { animation-name: slide-in; }
@keyframes slide-out { to { opacity: 0; transform: translateX(-0.75rem); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(0.75rem); } }
@media (max-width: 40em) {
  .slide-card { min-height: 70svh; }
  .lesson-bar .btn-text { font-size: var(--step--1); }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .lesson-feedback { animation: none; }
  .toast { animation: toast-out 0s linear 4s forwards; }
  ::view-transition-old(lesson-slide), ::view-transition-new(lesson-slide) { animation: none; }
}
.app-content .panel + .panel, .panel + section.panel { margin-top: var(--space-m); }

/* Lessons 3 and 4: definitions, key points, ingredient lists, nutrition panels, calculators and
   pictures that open larger. Every label keeps its whole panel; the rows a slide is about are highlighted. */
.lesson-definitions { display: grid; gap: var(--space-xs); margin: 0; }
.lesson-definitions > div { border-left: 3px solid #8ca184; padding: 0.2rem 0 0.2rem var(--space-s); }
.lesson-definitions dt { font-weight: 700; }
.lesson-definitions dd { margin: 0.15rem 0 0; }
.lesson-points { display: grid; gap: var(--space-s); }
.lesson-point p, .lesson-point ul { margin: 0; }
.lesson-point ul { padding-left: 1.2rem; margin-top: 0.3rem; display: grid; gap: 0.25rem; }
.lesson-point-key { font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); line-height: 1.45; }
.lesson-quote { margin: 0; border-left: 4px solid var(--brass); background: var(--ivory-100); padding: var(--space-s) var(--space-m); border-radius: var(--radius-s); }
.lesson-quote p { margin: 0; }
.lesson-quote .mini-label { margin-bottom: 0.2rem; }
.big-number-unit { font-family: var(--font-sans); font-size: var(--step-0); color: var(--text-muted); }
.lesson-included { background: var(--forest-100); border-radius: var(--radius-m); padding: var(--space-s) var(--space-m); max-width: 24rem; }
.lesson-included strong { display: block; margin-bottom: 0.4rem; }
.lesson-included div { background: #fff; border-radius: var(--radius-s); padding: 0.4rem 0.6rem; width: 45%; min-width: 8rem; }
.lesson-table caption { caption-side: top; text-align: left; font-size: var(--step--1); color: var(--text-muted); padding-bottom: 0.3rem; }
.lesson-table thead th { font-size: var(--step--1); color: var(--text-muted); font-weight: 600; }
.lesson-table td { font-variant-numeric: tabular-nums; }
.nutrition-panel tr.is-focus { background: var(--forest-100); }
.nutrition-panel th, .nutrition-panel td { padding: 0.35rem 0.6rem; }
.label-row summary { cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; }
.label-row p { margin: 0.3rem 0 0.2rem; font-weight: 400; font-size: var(--step--1); max-width: 28rem; }
.portion-options { gap: 0.4rem; }
.portion-options .btn { min-width: 4.5rem; }
.portion-result { margin: 0; }
.portion-result .big-number { margin: 0; }
.photo-enlarge { display: block; position: relative; border-radius: var(--radius-m); }
.photo-enlarge:focus-visible { outline: 3px solid var(--forest-700); outline-offset: 3px; }
/* The hint sits just below the picture, never over it: many pictures carry labels or panel text near their edges. */
.photo-enlarge-hint { display: block; width: fit-content; margin: 0.35rem 0 0 auto; background: #fff; color: var(--forest-800);
  font-size: var(--step--1); font-weight: 600; padding: 0.1rem 0.55rem; border-radius: 999px; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.12); }
.photo-enlarge-hint::before { content: "⤢ "; }
.enlarge-dialog { width: min(64rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); padding: var(--space-m); border: 0;
  border-radius: var(--radius-l); box-shadow: 0 12px 40px rgb(0 0 0 / 0.25); }
.enlarge-dialog::backdrop { background: rgb(20 30 25 / 0.6); }
.enlarge-dialog img { display: block; width: 100%; height: auto; border-radius: var(--radius-m); margin: var(--space-s) 0; }
.enlarge-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-s); }
.enlarge-head h2 { margin: 0; font-size: var(--step-1); }
/* Slides with a label or calculator: the picture keeps a modest height so the text and controls fit beside or below it. */
.slide-visual .lesson-photo img { max-height: min(24rem, 48vh); }
@media (max-width: 55.99em) {
  .slide-visual .lesson-photo img { max-height: 30vh; }
}
/* Lessons 3 and 4: the answer button and its note share a row, and feedback sits a little closer,
   so a slide still fits once its answer and explanation show. */
.is-beside .lesson-choices { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-s); }
.is-beside .lesson-choices > fieldset, .is-beside .lesson-choices > .field { flex-basis: 100%; }
.is-beside .lesson-choices > p.small { margin: 0; flex: 1 1 12rem; }
.is-beside .lesson-feedback { padding: var(--space-s) var(--space-m); margin-bottom: var(--space-s); }
/* Lessons 3 and 4 on phones (as the lesson package does): the picture becomes a small thumbnail beside
   the heading, still opening full size with its values as text; tables and choices sit a little closer
   together. Body text keeps its size. */
@media (max-width: 55.99em) {
  .is-beside .slide-split { position: relative; display: block; }
  .is-beside .slide-visual { position: absolute; top: 0; right: 0; width: 5.5rem; }
  .is-beside .slide-visual .lesson-photo img { max-height: none; width: 5.5rem; }
  .is-beside .photo-enlarge-hint { position: absolute; right: 0.2rem; bottom: 0.2rem; margin: 0; padding: 0 0.3rem; font-size: 0; }
  .is-beside .photo-enlarge-hint::before { font-size: 0.85rem; content: "⤢"; }
  .is-beside .slide-heading { padding-right: 6.5rem; min-height: 3.7rem; font-size: var(--step-2); }
  .is-beside .slide-text > * + * { margin-top: var(--space-xs); }
  .is-beside .lesson-blocks { gap: 0.6rem; margin-bottom: 0.6rem; }
  .is-beside .lesson-table th, .is-beside .lesson-table td { padding: 0.3rem 0.45rem; font-size: 1rem; line-height: 1.35; }
  .is-beside .lesson-table caption { padding-bottom: 0.15rem; }
  .is-beside .choices { gap: 0.4rem; }
  .is-beside .choice { padding: 0.55rem 0.75rem; }
  .is-beside .lesson-choices fieldset { margin: 0; }
  .is-beside .lesson-choices legend { margin-bottom: 0.4rem; }
  .is-beside .lesson-definitions > div { padding-top: 0.1rem; padding-bottom: 0.1rem; }
  .is-beside .lesson-equation { padding: 0.45rem 0.7rem; }
  .is-beside .slide-body { padding: 1rem; }
}

/* Step-by-step activities */
.response-group-title { font-weight: 700; margin: var(--space-m) 0 0.2rem; }
.response-group + .obs-field { margin-top: 0.4rem; }
.response-form select { max-width: 100%; }
.response-controls { margin-top: var(--space-l); }
.response-summary { gap: var(--space-s); }
.response-summary dd { font-size: var(--step-0); }
.history-entry { border-top: var(--border); padding-top: var(--space-xs); margin-top: var(--space-xs); }

/* Consultation booking ------------------------------------------------- */
.time-grid { list-style: none; padding: 0; margin: 0 0 var(--space-m); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; max-width: 30rem; }
.time-grid form, .time-grid li { margin: 0; }
.time-period + .time-period { margin-top: var(--space-m); }
.time-period[hidden] { display: none; }
.time-period-title { font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 0.5rem; }
.time-period .time-grid { margin-bottom: 0; }
.time-slot { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; min-height: 48px; padding: 0.45rem 0.4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); color: var(--forest-800); font: inherit; cursor: pointer; transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s; }
.time-slot time { display: contents; }
.time-slot .ts-main { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.time-slot .ts-sub { font-size: 0.7rem; color: var(--text-muted); font-variant-numeric: tabular-nums; line-height: 1.2; }
.time-slot:hover { border-color: var(--forest-700); background: var(--forest-100); box-shadow: 0 1px 3px rgb(20 40 30 / 0.08); }
.time-slot:focus-visible { outline: 2px solid var(--forest-800); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .time-slot { transition: none; } }
.payment-instructions { background: var(--ivory-100); border: var(--border); border-radius: var(--radius-m); padding: var(--space-s) var(--space-m); margin-bottom: var(--space-m); }
.payment-instructions > :last-child { margin-bottom: 0; }
.booking-calendar { background: var(--surface); border: var(--border); border-radius: var(--radius-l); padding: var(--space-m); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); margin-bottom: var(--space-s); }
.cal-head h2 { margin: 0; }
.cal-nav-spacer { width: 40px; }
.cal-grid { width: 100%; border-collapse: separate; border-spacing: 0.3rem; table-layout: fixed; }
.cal-grid th { font-size: var(--step--1); font-weight: 600; color: var(--text-muted); padding-bottom: 0.2rem; text-align: center; }
.cal-grid td { padding: 0; text-align: center; }
.cal-day { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; max-height: 3.25rem; margin-inline: auto; width: 100%; border-radius: var(--radius-m); font-variant-numeric: tabular-nums; }
.cal-day.is-closed { color: #a7a196; background: var(--ivory-200); opacity: 0.6; cursor: not-allowed; }
.cal-day.is-open { background: var(--forest-100); color: var(--forest-800); font-weight: 700; text-decoration: none; border: 1px solid var(--forest-700); }
.cal-day.is-open:hover { background: var(--forest-700); color: #fff; }
.cal-day.is-selected { background: var(--forest-800); color: #fff; }
.cal-key { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin: var(--space-s) 0 0; }
.cal-swatch { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 3px; }
.cal-swatch.is-open { background: var(--forest-100); border: 1px solid var(--forest-700); }
.cal-swatch.is-closed { background: var(--ivory-200); margin-left: var(--space-s); }
@media (max-width: 420px) { .cal-wd-rest { display: none; } .cal-grid { border-spacing: 0.15rem; } }
.cal-grid th, .cal-grid td { background: none; border: 0; }
.cal-grid th { padding: 0 0 0.2rem; }
.learn-programme { margin-block: var(--space-l); }
.learn-more-title { margin-top: var(--space-xl); }
.lesson-index { list-style: none; padding: 0; margin: 0; }
.lesson-index li { display: grid; grid-template-columns: 1.9rem 1fr auto; align-items: center; gap: var(--space-s); padding: 0.6rem 0; border-bottom: var(--border); margin: 0; }
.lesson-index li:last-child { border-bottom: 0; }
.lesson-index-num { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--line); font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.lesson-index .is-done .lesson-index-num, .lesson-index li.is-done .lesson-index-num { background: var(--forest-800); border-color: var(--forest-800); color: #fff; }
.lesson-index li.is-open .lesson-index-num { border-color: var(--forest-700); color: var(--forest-800); background: var(--forest-100); }
.lesson-index li.is-later { color: var(--text-muted); }
.lesson-index-state { color: var(--text-muted); white-space: nowrap; }
.lesson-index li.is-open .lesson-index-state { color: var(--forest-800); font-weight: 600; }
@media (max-width: 480px) { .lesson-index li { grid-template-columns: 1.9rem 1fr; } .lesson-index-state { grid-column: 2; white-space: normal; } }

/* 24-hour food recalls */
.recall-how li + li, .recall-list li + li { margin-top: var(--space-s); }
.recall-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-m); padding-bottom: var(--space-s); border-bottom: var(--border); }
.recall-occasion { margin-top: var(--space-l); padding-top: var(--space-m); border-top: var(--border); }
.recall-occasion h2 { margin: 0 0 var(--space-s); font-size: var(--step-1); line-height: 1.25; }
.recall-items { margin-bottom: var(--space-m); }
.recall-items li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-s); padding: var(--space-xs) 0; }
.recall-items li + li { margin-top: 0; }
.recall-items .inline-form { margin-left: auto; }
.recall-item-name { font-weight: 600; }
.recall-results li + li { margin-top: var(--space-xs); }
.recall-results a { display: block; padding: var(--space-xs) 0; }
.recall-totals { width: 100%; max-width: 30rem; }
.input-short { max-width: 10rem; }
.recall-flow h1 { font-size: var(--step-3); }
.recall-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-m); margin-bottom: var(--space-s); }
.recall-save { margin: 0; min-height: 1.5em; }
.recall-date { margin-bottom: var(--space-s); }
.recall-stages { list-style: none; padding: 0; margin: 0 0 var(--space-xs); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xs); }
.recall-stages li { margin: 0; display: flex; flex-direction: column; gap: 0.35rem; font-size: var(--step--1); color: var(--text-muted); border-top: 3px solid var(--line); padding-top: 0.4rem; }
.recall-stages li.is-done { border-top-color: var(--text-muted); }
.recall-stages li.is-current { border-top-color: var(--terracotta); color: var(--text); font-weight: 600; }
.recall-stage-num { display: none; }
.recall-tally { margin: 0 0 var(--space-l); }
.recall-occ-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-m); }
.recall-time { font-family: var(--font-sans); font-size: var(--step--1); color: var(--text-muted); font-weight: 400; margin-left: 0.4rem; }
.recall-occasion.is-skipped h2 { color: var(--text-muted); }
.recall-items li { flex-direction: column; align-items: stretch; border-bottom: var(--border); padding: var(--space-s) 0; }
.recall-items li.is-replaced .recall-item-name { text-decoration: line-through; text-decoration-color: var(--text-muted); }
.recall-item-main { display: flex; flex-direction: column; gap: 0.15rem; }
.recall-item-main .badge { align-self: flex-start; margin-top: 0.25rem; }
.recall-item-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-m); align-items: baseline; margin-top: var(--space-xs); }
.recall-item-edit summary, .recall-occ-edit summary { cursor: pointer; font-size: var(--step--1); text-decoration: underline; }
.recall-item-edit[open], .recall-occ-edit[open] { width: 100%; }
.recall-inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-s); margin-top: var(--space-s); }
.recall-inline label { font-size: var(--step--1); }
.recall-inline input[type="text"] { flex: 1 1 12rem; }
.recall-add { margin-top: var(--space-s); }
.recall-add label, .recall-search label { display: block; font-weight: 600; margin-bottom: var(--space-xs); }
.recall-add-row { display: flex; gap: var(--space-s); }
.recall-add-row input { flex: 1; min-width: 0; min-height: 44px; }
.recall-add-row .btn { min-height: 44px; }
.recall-split { margin-top: var(--space-s); padding: var(--space-s) var(--space-m); background: var(--ivory-200); border-radius: 8px; }
.recall-split p { margin: 0 0 var(--space-xs); }
.recall-clarify { border: 0; padding: 0; margin: var(--space-m) 0; }
.recall-clarify legend { font-weight: 600; margin-bottom: var(--space-xs); }
.recall-chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.recall-chips .chip { min-height: 40px; display: inline-flex; align-items: center; padding: 0 0.9rem; text-decoration: none; }
.recall-chips .chip.is-selected { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.recall-results .choice { min-height: 44px; }
.recall-alt li + li { margin-top: var(--space-xs); }
.recall-confirm-amount { font-size: var(--step-1); font-weight: 600; }
.recall-timeline { border-left: 2px solid var(--line); padding-left: var(--space-m); }
.recall-tl-occ { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-s); align-items: baseline; padding: var(--space-s) 0; }
.recall-tl-occ .recall-inline { margin-top: 0; }
.recall-tl-gap { padding: var(--space-xs) 0 var(--space-s); }
.recall-tl-gap.is-long { padding: var(--space-s) var(--space-m); background: var(--ivory-200); border-radius: 8px; }
.recall-tl-gap p { margin: 0 0 var(--space-xs); }
.h-small { font-size: var(--step-1); line-height: 1.3; }
.recall-save-error { margin-bottom: var(--space-m); }
@media (max-width: 30rem) { .recall-stage-label { font-size: 0.72rem; } }

/* Employer seats */
.seat-tools .area-tabs { margin-bottom: 0; }
.seat-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-s) var(--space-m); margin-bottom: var(--space-s); }
.seat-search { display: flex; gap: var(--space-xs); align-items: center; }
.seat-search input { min-height: 40px; min-width: 0; width: 14rem; max-width: 100%; }
.seat-actions { white-space: nowrap; }
.seat-actions form { display: inline; }
.seat-actions form + form { margin-left: var(--space-s); }

/* Employer evaluation */
.eval-steps li { display: flex; justify-content: flex-start; text-align: left; gap: var(--space-s); align-items: flex-start; padding: var(--space-s) 0; border-bottom: var(--border); margin: 0; }
.eval-step-mark { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: 0.9rem; border: 1px solid var(--line); color: var(--forest-800); }
.eval-steps li.is-done .eval-step-mark { background: var(--forest-800); color: var(--ivory-50); border-color: var(--forest-800); }
.eval-step-text { display: flex; flex-direction: column; gap: 0.15rem; }
.eval-change { font-weight: 600; }
.eval-change.is-better { color: var(--forest-800); }
.eval-change.is-worse { color: var(--terracotta); }
.survey-section { border: 0; padding: 0; margin: 0 0 var(--space-l); }
.survey-section legend { padding: 0; }
.survey-q { font-weight: 600; margin-bottom: var(--space-xs); }
.survey-item { margin-bottom: var(--space-m); }
.survey-scale { display: grid; gap: var(--space-xs); }
.eval-steps li.is-past .eval-step-text { color: var(--text-muted); }
.booking-ref { margin-top: calc(-1 * var(--space-s)); }
