/* Personal Hub: the public pages. The Navigator look (web/DESIGN.md): evergreen band,
   stone page, white cards, gold marks; Libre Baskerville for titles and numbers,
   IBM Plex Sans for everything else. Phone first.

   Type      12 · 14 · 16 · 18 · 20 · 24 · 28–34 (page title) · 24–32 (band title); nothing below 12px.
             Larger sizes are numerals only (the case cards).
   Space     4px grid. Gutter 16 / 24 / 32 at 0 / 640 / 1024. Card padding 16, 20 in the three-column layout.
   Shape     cards 12 · tiles and rows 10 · buttons and fields 8 · chips round.
   Widths    landing 1200 in three columns from 1200px, one 560 column below · reading 600, prose 33em
             · case list 760 · forms 520.
   Themes    light and dark (prefers-color-scheme, screens only); print is always light.

   1 fonts · 2 tokens · 3 base · 4 helpers · 5 controls · 6 landing pages · 7 forms and notices
   8 case list · 9 reading pages · 10 booking · 11 footer · 12 motion · 13 print */

/* ---------- 1 Fonts (self-hosted; copied by scripts/copy-fonts.mjs) ---------- */
@font-face { font-family: "Libre Baskerville"; src: url(/fonts/libre-baskerville-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url(/fonts/libre-baskerville-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
/* Until the web fonts arrive the text is set in Georgia and Arial, each resized to the
   web font's measured width (Georgia is 15.3% narrower than Libre Baskerville; Arial is
   within 3% of IBM Plex Sans), so lines do not re-wrap when the fonts swap in. */
@font-face { font-family: "Baskerville Fallback"; src: local("Georgia"); font-weight: 400; size-adjust: 115.3%; ascent-override: 84%; descent-override: 23%; line-gap-override: 0%; }
@font-face { font-family: "Baskerville Fallback"; src: local("Georgia Bold"), local("Georgia-Bold"); font-weight: 700; size-adjust: 101.7%; ascent-override: 95%; descent-override: 27%; line-gap-override: 0%; }
@font-face { font-family: "Plex Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 400; size-adjust: 100.6%; ascent-override: 101%; descent-override: 27%; line-gap-override: 0%; }
@font-face { font-family: "Plex Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 500; size-adjust: 102.7%; ascent-override: 99%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: "Plex Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600; size-adjust: 97.3%; ascent-override: 105%; descent-override: 28%; line-gap-override: 0%; }

/* ---------- 2 Tokens ---------- */
:root {
  color-scheme: light dark;
  --serif: "Libre Baskerville", "Baskerville Fallback", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Plex Fallback", "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.75rem; --fs-sm: 0.875rem; --fs-md: 1rem; --fs-lg: 1.125rem; --fs-xl: 1.25rem; --fs-2xl: 1.5rem;
  --r-s: 8px; --r-m: 10px; --r-l: 12px;
  --gutter: 16px;

  /* The brand colours themselves: the same in both themes, used directly only where a
     block keeps its colour whatever the theme (the band, the navy and gold cards). */
  --evergreen: #15352E; --graphite: #0F2044; --gold-brand: #C9A84C; --gold-light: #D2B35C; --sage: #D4DDD6; --paper: #FAFAFA;

  /* Surfaces, text and lines. Contrast: text 13.7:1, muted 6.2:1 on the page; a control's edge 3.4:1. */
  --bg: #F5F5F4; --surface: #FFFFFF; --inset: #EFEFED; --inset-hover: #E6E6E3;
  --text: #27272A; --text-2: #3F3F46; --muted: #5B5B63; --placeholder: #6B6B73;
  --line: #E4E4E7; --field-line: #8B8B93;
  /* Evergreen: the band and dark blocks keep it in both themes; the action colour changes. */
  --brand-surface: var(--evergreen); --brand-line: var(--evergreen); --on-brand: var(--paper); --on-brand-2: var(--sage);
  --primary: var(--evergreen); --primary-hover: #1D4A40; --on-primary: var(--paper);
  --heading: var(--evergreen); --link: var(--evergreen); --link-hover: var(--graphite); --numeral: var(--graphite);
  /* Gold is a fill or a mark. As text on a light surface it is 2.3:1, so use --gold-ink there. */
  --gold: var(--gold-brand); --gold-ink: #7A5C1B;
  --navy: var(--graphite); --icon-green: var(--evergreen);
  --chip: #EFEFED; --chip-strong: var(--evergreen); --chip-soft: var(--sage);
  --notice-bg: #F7F1DE; --notice-line: #E5D6A6; --notice-text: #4A3A0B; --notice-icon: #7A5C1B;
  --bad: #A32222; --bad-bg: #FCEEEE; --bad-line: #E9B9B9;
  --ok-bg: #E7F0EA; --ok-line: #BBD2C3; --ok-text: var(--evergreen);
  --focus: var(--evergreen);
  --shadow: 0 1px 2px rgba(39, 39, 42, 0.05);
}
@media screen and (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1514; --surface: #151E1C; --inset: #212C29; --inset-hover: #2A3633;
    --text: #E9ECE9; --text-2: #D2D8D3; --muted: #A2AEA5; --placeholder: #8E9A92;
    --line: #283331; --field-line: #6E7C75;
    --brand-line: #24493F;
    --primary: #B3D0BD; --primary-hover: #C8DED0; --on-primary: #0D211D;
    --heading: #DCE6DE; --link: #B3D0BD; --link-hover: #DCE6DE; --numeral: #DCE6DE;
    --gold: var(--gold-light); --gold-ink: #DDC27A;
    --navy: #16274F; --icon-green: #24493F;
    --chip: #212C29; --chip-strong: #24493F; --chip-soft: #33403B;
    --notice-bg: #2B2816; --notice-line: #4D4520; --notice-text: #EBDDB0; --notice-icon: #D2B35C;
    --bad: #F2A3A3; --bad-bg: #351A1A; --bad-line: #6B2F2F;
    --ok-bg: #16302A; --ok-line: #2B5347; --ok-text: #CFE3D6;
    --focus: var(--gold-light);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

/* ---------- 3 Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* The page is a column at least one screen tall, so the last line sits at the bottom. */
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 400 var(--fs-md)/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
main { flex: 1 0 auto; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { font: inherit; }
p, li, dd { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }
b, strong { font-weight: 600; }
/* No italic face is shipped, and a slanted roman is not one: emphasis is drawn another way. */
em, i { font-style: normal; }
small { font-size: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* On the evergreen and navy blocks the ring is gold in both themes. */
.hero :focus-visible, .b-head :focus-visible, .lesson :focus-visible { outline-color: var(--gold-light); }
::selection { background: var(--sage); color: var(--evergreen); }

/* ---------- 4 Helpers ---------- */
.wrap { width: 100%; max-width: calc(75rem + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
@supports (padding: max(0px)) {
  .wrap { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
}
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.diamond { width: 14px; height: 14px; flex-shrink: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -100px; z-index: 10; display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); color: var(--link); font-size: var(--fs-sm); font-weight: 600; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-xs); line-height: 1.5; }
.wrap-any { overflow-wrap: anywhere; }
.print-only { display: none; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
/* Group label: the overline above a set of things. Used on <h2>/<h3> and on <p>. */
.label { font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.label-gold { color: var(--gold); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.label-row > .label { flex: 0 0 auto; }
.label-row > .small { min-width: 0; text-align: right; }
@media (max-width: 1199.98px) { .desk-only { display: none !important; } }
@media (min-width: 1200px) { .phone-only { display: none !important; } }

/* ---------- 5 Controls ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 8px 16px; border: 1px solid transparent; border-radius: var(--r-s); font: 500 var(--fs-md)/1.25 var(--sans); text-align: center; text-decoration: none; cursor: pointer; }
.btn-dark { background: var(--primary); color: var(--on-primary); }
.btn-dark:hover { background: var(--primary-hover); color: var(--on-primary); }
/* On the evergreen band, which is the same in both themes. */
.btn-light { background: var(--paper); color: var(--evergreen); font-weight: 600; }
.btn-light:hover { background: var(--sage); color: var(--evergreen); }
.btn-ghost { background: transparent; border-color: var(--primary); color: var(--link); }
.btn-ghost:hover { background: var(--primary); color: var(--on-primary); }
.back { display: inline-flex; align-items: center; align-self: flex-start; gap: 4px; min-height: 44px; margin-left: -4px; padding-right: 8px; font-size: var(--fs-sm); font-weight: 500; text-decoration: none; }
.back:hover { text-decoration: underline; }
.back-light { color: var(--on-brand-2); }
.back-light:hover { color: var(--on-brand); }
.link-c { display: flex; align-items: center; justify-content: center; min-height: 44px; font-size: var(--fs-sm); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 10px; border-radius: 999px; background: var(--chip); font-size: var(--fs-xs); line-height: 1.5; }
.chip-dark { background: var(--chip-strong); color: var(--on-brand); }
.chip-sage { background: var(--chip-soft); }
/* Icon squares: the three brand fills, the same in both themes. */
.t-navy { background: var(--navy); color: var(--gold-light); }
.t-green { background: var(--icon-green); color: var(--paper); }
.t-gold { background: var(--gold); color: var(--graphite); }

/* ---------- 6 Landing pages: public (screens 8, 13) and personal (screens 1, 7) ---------- */
.hero { flex: 0 0 auto; background: var(--brand-surface); color: var(--on-brand); }
.hero-in { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; padding-bottom: 52px; }
.hero-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eyebrow { display: flex; align-items: flex-start; gap: 8px; color: var(--gold); font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; letter-spacing: 0.12em; text-transform: uppercase; }
.eyebrow .diamond { margin-top: 2px; }
.eyebrow span { text-wrap: balance; }
.hero h1 { font-family: var(--serif); font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem); line-height: 1.25; text-wrap: balance; }
.hero-sub { color: var(--on-brand-2); font-size: var(--fs-sm); }

/* One stack on a phone: each column's cards join it (display: contents), in .o-* order. */
.cols { display: flex; flex-direction: column; gap: 16px; margin-top: -36px; padding-bottom: 8px; font-size: var(--fs-sm); line-height: 1.45; }
.col { display: contents; }
.o-1 { order: 1; } .o-2 { order: 2; } .o-3 { order: 3; } .o-4 { order: 4; } .o-5 { order: 5; }

.card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); }
/* A label and its set, with no card around them. */
.group { display: flex; flex-direction: column; gap: 8px; }
.group > .label { padding-inline: 4px; }

.who { display: flex; align-items: center; gap: 12px; }
.photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--sage); }
.who-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.name { font-family: var(--serif); font-size: var(--fs-xl); line-height: 1.25; color: var(--heading); }
.role { font-size: var(--fs-sm); font-weight: 500; line-height: 1.35; text-wrap: balance; }
.where { font-size: var(--fs-xs); line-height: 1.5; color: var(--muted); }
.tagline-lg { font-family: var(--serif); font-size: var(--fs-lg); line-height: 1.45; color: var(--heading); text-wrap: pretty; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 0 2px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { font-family: var(--serif); font-weight: 700; font-size: clamp(1rem, 4.8vw, 1.25rem); line-height: 1.1; letter-spacing: -0.02em; white-space: nowrap; color: var(--heading); }
.stat span { font-size: var(--fs-xs); line-height: 1.35; color: var(--text-2); }
.worked { font-size: var(--fs-xs); line-height: 1.5; color: var(--text-2); }
@media (max-width: 359.98px) {
  /* Four numbers do not fit side by side: two rows of two. */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .stat:nth-child(odd) { border-left: 0; }
}

/* A link to something to read or ask for: a tile below 1200px, a row with a second line above. */
.act-grid { display: grid; gap: 8px; }
.act { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 56px; padding: 10px 12px; border-radius: var(--r-m); background: var(--inset); color: var(--text); text-decoration: none; }
.act:hover { background: var(--inset-hover); color: var(--text); }
.act-ic { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--r-s); }
.act-t { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; font-weight: 600; line-height: 1.3; }
.act-t small { font-size: var(--fs-xs); font-weight: 400; line-height: 1.4; color: var(--muted); }
.act-go { width: 16px; height: 16px; color: var(--muted); }

.talks { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 8px; }
.talks-2 { --n: 2; } .talks-3 { --n: 3; } .talks-4 { --n: 4; }
.talk { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 60px; padding: 6px 2px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: clamp(0.75rem, 3.5vw, 0.875rem); font-weight: 500; line-height: 1.3; text-align: center; text-decoration: none; }
.talk .ic { width: 20px; height: 20px; color: var(--link); }
.talk:hover { border-color: var(--primary); color: var(--text); }
.talk-main { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.talk-main .ic { color: inherit; }
.talk-main:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.talks > .note { grid-column: 1 / -1; }
.note { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: var(--r-s); background: var(--notice-bg); border: 1px solid var(--notice-line); color: var(--notice-text); font-size: var(--fs-xs); line-height: 1.45; }
.note .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--notice-icon); }

.keeps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.keep { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 6px 8px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); color: var(--text); font: 500 var(--fs-sm)/1.25 var(--sans); text-decoration: none; cursor: pointer; }
.keep .ic { color: var(--link); }
.keep:hover { border-color: var(--primary); color: var(--text); }

.row-link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.row-link > span { flex: 1 1 auto; min-width: 0; }
.row-link .diamond { width: 18px; height: 18px; color: var(--link); }
.row-link .ic { width: 16px; height: 16px; color: var(--muted); }
.row-link:hover { border-color: var(--primary); color: var(--text); }

/* Desktop-only parts of the landing pages (hidden below 1200px by .desk-only). */
.hero-cta { display: flex; flex-direction: column; flex: 0 0 280px; gap: 8px; }
.hero-cta span { font-size: var(--fs-sm); color: var(--on-brand-2); text-align: center; }
.now-row { display: flex; justify-content: space-between; gap: 12px; }
.now-row > span:last-child { white-space: nowrap; }
.more-link { display: inline-flex; align-items: center; min-height: 28px; margin: -5px -4px; padding: 0 4px; font-size: var(--fs-xs); font-weight: 500; }
.minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mini { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px; border-radius: var(--r-m); background: var(--inset); color: var(--text); text-decoration: none; }
.mini:hover { background: var(--inset-hover); color: var(--text); }
.mini b { font-family: var(--serif); font-weight: 700; font-size: var(--fs-2xl); line-height: 1.15; color: var(--numeral); }
.mini > span:last-child { color: var(--text-2); }
/* Career: one row a role (years · organisation · what), so nothing is squeezed into a narrow column. */
.career { display: flex; flex-direction: column; gap: 6px; }
.step { display: grid; grid-template-columns: 3.75rem 5.75rem minmax(0, 1fr); column-gap: 12px; align-items: baseline; }
.step-y { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.step-o { font-weight: 600; }
.step-r { color: var(--text-2); }
.step-now .step-y, .step-now .step-o { color: var(--link); }
.step-now .step-y { font-weight: 600; }
.teaser { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--r-l); background: var(--brand-surface); border: 1px solid var(--brand-line); color: var(--on-brand); }
.teaser-text { font-family: var(--serif); font-size: var(--fs-lg); line-height: 1.45; text-wrap: pretty; }
.teaser-sub { color: var(--on-brand-2); }

@media (max-width: 1199.98px) {
  /* One centred column: a phone, a tablet, a narrow window. */
  .hero-in, .cols { max-width: calc(35rem + 2 * var(--gutter)); }
  /* A labelled set with no card around it; from 1200px it becomes a card. */
  .card.plain { gap: 8px; padding: 0; background: none; border: 0; box-shadow: none; }
  .card.plain > .label, .card.plain > .label-row, .card.plain > .small, .card.plain > .worked { padding-inline: 4px; }
  .act-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .act-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .act-wide { grid-column: 1 / -1; }
  .act { background: var(--surface); border: 1px solid var(--line); }
  .act:hover { background: var(--surface); border-color: var(--primary); }
  .act:not(.act-wide) { flex-direction: column; justify-content: flex-start; gap: 6px; min-height: 68px; padding: 9px 6px 8px; text-align: center; }
  .act:not(.act-wide) .act-ic { width: 28px; height: 28px; border-radius: 6px; }
  .act:not(.act-wide) .act-ic .ic { width: 16px; height: 16px; }
  .act:not(.act-wide) .act-t { flex: 0 0 auto; font-weight: 500; }
}

@media (min-width: 1200px) {
  .hero-in { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; padding-top: 24px; padding-bottom: 64px; }
  .hero-text { flex: 1 1 auto; gap: 8px; }
  .hero-sub { font-size: var(--fs-md); }

  .cols { flex-direction: row; align-items: flex-start; margin-top: -40px; padding-bottom: 24px; }
  .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .col > * { order: 0; } /* the phone stacking order must not reorder cards inside a column */
  .col-a, .col-c { flex: 1 1 0; }
  .col-b { flex: 1.6 1 0; }
  .card { gap: 14px; padding: 20px; }
  .photo { width: 72px; height: 72px; }
  .who { gap: 14px; }
  .name { font-size: var(--fs-2xl); }

  .stat { align-items: flex-start; gap: 6px; padding: 0 12px; text-align: left; }
  .stat:first-child { padding-left: 0; }
  .stat:last-child { padding-right: 0; }
  .stat b { font-size: var(--fs-2xl); }

  /* Call is a full row with the number; the note sits under it; the rest share the next row. */
  .talks.has-call { grid-template-columns: repeat(calc(var(--n) - 1), minmax(0, 1fr)); }
  .talks > * { order: 3; }
  .talks > .talk-call { order: 1; grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 56px; padding: 10px 12px; text-align: left; }
  .talks > .note { order: 2; }
  .talk { font-size: var(--fs-sm); }
  .talk-call > .ic { width: 36px; height: 36px; padding: 9px; border-radius: var(--r-s); background: rgba(128, 128, 128, 0.2); background: color-mix(in srgb, currentColor 14%, transparent); }
  .talk-t { display: flex; flex-direction: column; font-weight: 600; line-height: 1.3; }
  .talk-t small { font-size: var(--fs-xs); font-weight: 400; line-height: 1.4; opacity: 0.85; }
}

/* ---------- 7 Forms and notices (screens 9–12) ---------- */
.narrow { max-width: calc(32.5rem + 2 * var(--gutter)); padding-top: 8px; padding-bottom: 32px; display: flex; flex-direction: column; }
.narrow-top { padding-top: 24px; }
.form { gap: 16px; padding: 20px; }
.form-head { display: flex; flex-direction: column; gap: 4px; }
.form-head .muted { font-size: var(--fs-sm); }
.h-form { font-family: var(--serif); font-size: var(--fs-2xl); line-height: 1.25; color: var(--heading); text-wrap: balance; }
.alert { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--r-s); background: var(--notice-bg); border: 1px solid var(--notice-line); color: var(--notice-text); font-size: var(--fs-sm); line-height: 1.45; }
.alert .ic { margin-top: 1px; color: var(--notice-icon); }
.alert-bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.alert-ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-text); }
.alert-bad .ic, .alert-ok .ic { color: inherit; }

/* CV / Full profile / Both: three radio buttons drawn as one control. The radio itself
   is the option's background, so the choice and the focus ring need no :has(). */
.segs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; min-width: 0; margin: 0; padding: 4px; border: 0; border-radius: var(--r-m); background: var(--inset); }
.seg { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; padding: 6px 4px; text-align: center; cursor: pointer; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 2px solid transparent; border-radius: 7px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.seg input:checked { background: var(--surface); border-color: var(--primary); }
.seg-t, .seg-s { position: relative; pointer-events: none; line-height: 1.3; }
.seg-t { font-size: var(--fs-sm); font-weight: 600; }
.seg-s { font-size: var(--fs-xs); color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: 500; }
.opt { font-weight: 400; color: var(--muted); }
/* 16px text: iOS zooms the page when a focused field is set any smaller. */
.field input, .field textarea { width: 100%; min-height: 48px; margin: 0; padding: 11px 12px; border: 1px solid var(--field-line); border-radius: var(--r-s); background: var(--surface); color: var(--text); font: 400 var(--fs-md)/1.5 var(--sans); -webkit-appearance: none; appearance: none; }
.field textarea { display: block; min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); opacity: 1; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--primary); }
.field-bad input { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.field-err { display: flex; align-items: flex-start; gap: 6px; color: var(--bad); font-size: var(--fs-sm); line-height: 1.4; }
.field-err .ic { width: 16px; height: 16px; margin-top: 2px; }
/* Honeypot: off the page for people, present for programs that fill every field. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.tick { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--on-primary); }
.tick .ic { width: 22px; height: 22px; stroke-width: 2.5; }
.progress { border: 1px solid var(--line); border-radius: var(--r-m); }
.progress li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-size: var(--fs-sm); line-height: 1.4; }
.progress li + li { border-top: 1px solid var(--line); }
.dot { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 24px; height: 24px; border: 2px solid var(--primary); border-radius: 50%; }
.dot-muted { border-color: var(--field-line); }
.step-done .dot { background: var(--primary); color: var(--on-primary); }
.step-done .dot .ic { width: 14px; height: 14px; stroke-width: 2.5; }

.optout { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--r-m); }
.optout-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* A 52 x 44 button; the 52 x 32 track is its background, clipped to the content box. */
.switch { display: flex; align-items: center; justify-content: flex-start; flex-shrink: 0; width: 52px; height: 44px; padding: 6px 0; border: 0; border-radius: 16px / 22px; background: var(--field-line) content-box; cursor: pointer; }
.switch.on { justify-content: flex-end; background-color: var(--primary); }
.knob { width: 26px; height: 26px; margin: 0 3px; border-radius: 50%; background: #FFFFFF; }
.switch.on .knob { background: var(--on-primary); }
@media (min-width: 640px) {
  .narrow { padding-top: 24px; padding-bottom: 48px; }
  .narrow-top { padding-top: 48px; }
  .form { gap: 20px; padding: 28px; }
}

/* ---------- 8 Case list (screen 6) ---------- */
.sub { max-width: calc(47.5rem + 2 * var(--gutter)); padding-top: 8px; padding-bottom: 32px; display: flex; flex-direction: column; }
.sub-intro { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 16px; }
.h-page { font-family: var(--serif); font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.125rem); line-height: 1.2; color: var(--heading); text-wrap: balance; }
/* Emphasis in a title: a gold rule under the words, not a slant. */
.h-page em { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.lead { font-size: var(--fs-md); line-height: 1.6; color: var(--text-2); }
.sub-intro .lead { text-wrap: balance; }
.bentos { display: flex; flex-direction: column; gap: 12px; }
.bento-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bento { display: flex; min-width: 0; overflow: hidden; border: 1px solid transparent; border-radius: var(--r-l); text-decoration: none; }
.b-org { font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; letter-spacing: 0.1em; text-transform: uppercase; }
.b-title { font-family: var(--serif); font-size: var(--fs-md); line-height: 1.3; }
.b-line { font-size: var(--fs-sm); line-height: 1.4; }
.b-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.b-num { display: flex; flex-direction: column; flex: 0 0 auto; }
.b-hero { align-items: flex-end; gap: 16px; min-height: 152px; padding: 20px; background: var(--brand-surface); border-color: var(--brand-line); color: var(--on-brand); }
.b-hero:hover { color: var(--on-brand); }
.b-hero .b-num b { font-family: var(--serif); font-weight: 700; font-size: 3.5rem; line-height: 0.9; letter-spacing: -0.03em; color: var(--gold); }
.b-hero .b-num > span { padding-top: 8px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.b-hero .b-org, .b-hero .b-line { color: var(--on-brand-2); }
.b-hero .b-title, .b-gold .b-title { font-size: var(--fs-lg); }
.b-white, .b-navy { flex-direction: column; gap: 8px; min-height: 216px; padding: 16px; }
.b-white { background: var(--surface); border-color: var(--line); color: var(--text); }
.b-white:hover { border-color: var(--primary); color: var(--text); }
.b-white .b-org { color: var(--muted); }
.b-white .b-line { color: var(--text-2); }
.b-white .b-title { margin-top: auto; color: var(--heading); }
.b-big { font-family: var(--serif); font-weight: 700; font-size: 2.5rem; line-height: 1; letter-spacing: -0.02em; }
.b-white .b-big { color: var(--numeral); }
.b-rag { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.b-rag .ic { width: 12px; height: 12px; }
.rag-a, .rag-g { flex: 1 1 0; height: 6px; border-radius: 3px; background: var(--gold); }
.rag-g { background: var(--primary); }
.b-navy { background: var(--navy); color: var(--paper); }
.b-navy:hover { color: var(--paper); }
.b-navy .b-org, .b-navy .b-big, .b-navy .b-line { color: var(--sage); }
.b-navy .b-title { margin-top: auto; }
.b-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 2px 10px; border: 1px solid rgba(212, 221, 214, 0.5); border-radius: 999px; font-size: var(--fs-xs); line-height: 1.5; color: var(--sage); }
.pill-gold { background: var(--gold-brand); border-color: var(--gold-brand); font-weight: 600; color: var(--graphite); }
/* The gold card keeps the print gold and graphite ink in both themes. */
.b-gold { align-items: center; gap: 16px; min-height: 124px; padding: 16px 20px; background: var(--gold-brand); color: var(--graphite); }
.b-gold:hover { color: var(--graphite); }
.b-gold .b-num { gap: 6px; }
.b-row { display: flex; align-items: baseline; gap: 6px; }
.b-row b { font-family: var(--serif); font-weight: 700; font-size: 3.25rem; line-height: 0.9; }
.b-row span { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.bars { display: flex; gap: 3px; }
.bars i { width: 9px; height: 18px; border-radius: 2px; background: var(--graphite); }
.bars i:last-child { background: var(--evergreen); }
.bento:hover { filter: brightness(1.05); }
.b-white:hover { filter: none; }
.book-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; margin-top: 16px; padding: 10px 20px; border: 1px solid var(--primary); border-radius: var(--r-l); background: var(--surface); color: var(--link); text-decoration: none; }
.book-row > span { display: flex; flex-direction: column; font-weight: 600; line-height: 1.35; }
.book-row small { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
.book-row:hover { background: var(--primary); color: var(--on-primary); }
.book-row:hover small { color: inherit; opacity: 0.85; }
@media (min-width: 640px) {
  .sub { padding-top: 24px; padding-bottom: 48px; }
  .sub-intro { padding-bottom: 20px; }
}
@media (min-width: 720px) {
  .bentos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-pair { grid-row: span 2; }
}

/* ---------- 9 Reading pages: full profile and a case study ---------- */
/* One 600px column, so cards and running text share both edges. Running text is 16px
   (18px from 640px) on a 1.65 line and at most 33em wide: about 45 characters to a line
   on a phone, 75 on a desktop. */
.article { max-width: calc(37.5rem + 2 * var(--gutter)); padding-top: 8px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 28px; }
.article > .back { margin-bottom: -16px; }
.article section, .a-head { display: flex; flex-direction: column; gap: 12px; }
.article h2:not(.label) { font-family: var(--serif); font-size: var(--fs-xl); line-height: 1.3; color: var(--heading); }
.article p:not([class]), .bullets li, .lead { max-width: 33em; }
.article p:not([class]), .bullets li { line-height: 1.65; }
.a-head .who { margin-bottom: 4px; }
.nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nums > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.nums b { font-family: var(--serif); font-weight: 700; font-size: var(--fs-2xl); line-height: 1.1; color: var(--heading); }
.nums span { font-size: var(--fs-sm); line-height: 1.45; color: var(--text-2); }
.nums .muted { color: var(--muted); }
.flow { display: flex; flex-direction: column; gap: 8px; }
.flow li { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 8px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.flow i { grid-row: span 2; font-size: var(--fs-sm); font-weight: 600; line-height: 1.7; color: var(--gold-ink); }
.flow span { font-size: var(--fs-sm); line-height: 1.45; color: var(--text-2); }
.glance { display: flex; flex-direction: column; }
.glance > div { display: grid; grid-template-columns: minmax(5.5rem, 24%) minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.glance > div:last-child { border-bottom: 1px solid var(--line); }
.glance dt { font-size: var(--fs-sm); font-weight: 600; line-height: 1.7; color: var(--muted); }
.glance dd { line-height: 1.5; }
.bullets { display: flex; flex-direction: column; gap: 10px; }
.bullets li { position: relative; padding-left: 20px; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }
.tl { display: flex; flex-direction: column; margin-left: 4px; border-left: 2px solid var(--chip-soft); }
.tl li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 0 0 14px 18px; line-height: 1.5; }
.tl li:last-child { padding-bottom: 2px; }
.tl li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.tl b { font-size: var(--fs-xs); line-height: 1.5; letter-spacing: 0.02em; color: var(--muted); }
.lesson { padding: 20px; border: 1px solid var(--brand-line); border-radius: var(--r-l); background: var(--brand-surface); color: var(--on-brand); }
.article .lesson > p { font-family: var(--serif); font-size: var(--fs-lg); line-height: 1.55; text-wrap: pretty; }
.lesson a { color: var(--gold-light); }
.lesson a:hover { color: var(--paper); }
.contact { display: flex; flex-wrap: wrap; gap: 0 24px; }
.contact a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.more { display: flex; flex-direction: column; gap: 8px; }
.more a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--text); font-weight: 500; line-height: 1.4; text-decoration: none; }
.more a .ic { width: 16px; height: 16px; color: var(--muted); }
.more a:hover, .more-cards a:hover { border-color: var(--primary); color: var(--text); }
.more-cards { display: flex; flex-direction: column; gap: 8px; }
.more-cards a { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); color: var(--text); text-decoration: none; }
.more-cards b { font-family: var(--serif); font-weight: 400; font-size: var(--fs-lg); line-height: 1.3; color: var(--heading); }
.more-cards span:last-child { max-width: 33em; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-2); }
.values { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.values > div { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--r-l); background: var(--navy); color: var(--paper); }
.values i { font-size: var(--fs-sm); font-weight: 600; color: var(--gold-light); }
.values span { font-size: var(--fs-sm); line-height: 1.5; color: var(--sage); }
.article .cols2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.cols2 > div { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px) {
  .article { gap: 40px; padding-top: 24px; padding-bottom: 48px; }
  .article > .back { margin-bottom: -24px; }
  .article section, .a-head { gap: 14px; }
  .article h2:not(.label) { font-size: var(--fs-2xl); }
  .article p:not([class]), .bullets li { font-size: var(--fs-lg); }
  .a-head .lead { font-size: var(--fs-xl); line-height: 1.5; }
  .sub-intro .lead { font-size: var(--fs-lg); }
  .more-cards span:last-child { font-size: var(--fs-md); }
  .a-head .photo { width: 72px; height: 72px; }
  .values { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article .cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 10 Booking (screens 2–5) ---------- */
.b-head { flex: 0 0 auto; background: var(--brand-surface); color: var(--on-brand); }
.b-head-in { max-width: calc(47.5rem + 2 * var(--gutter)); padding-top: 4px; padding-bottom: 20px; display: flex; flex-direction: column; gap: 4px; }
.b-head h1 { font-family: var(--serif); font-size: var(--fs-2xl); line-height: 1.25; }
.b-head p { font-size: var(--fs-sm); color: var(--on-brand-2); }
/* The booking page is exactly one screen: the band, then Calendly filling the rest and
   scrolling inside its own frame. On a very short screen (a phone on its side) the page
   is 34rem tall instead and scrolls. iOS Safari sizes an iframe to its content unless it
   is given width:1px + min-width:100% (the standard workaround). */
body.pg-book { height: 100vh; height: 100dvh; min-height: 34rem; }
.book { flex: 1 1 0; min-height: 0; max-width: calc(47.5rem + 2 * var(--gutter)); padding-top: 12px; padding-bottom: 8px; display: flex; flex-direction: column; }
.cal-wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
/* Calendly draws a white page, so its box stays light in both themes. The frame is
   transparent until Calendly paints, so the loading line behind it shows meanwhile. */
.cal-box { position: relative; flex: 1 1 auto; min-height: 0; display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-l); background: #FFFFFF; color-scheme: light; }
.cal-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #5B5B63; font-size: var(--fs-sm); }
.cal { position: relative; flex: 1 1 auto; min-height: 0; display: block; width: 1px; min-width: 100%; max-width: 100%; height: 100%; border: 0; background: transparent; color-scheme: light; }
.cal-note { flex: 0 0 auto; padding: 0 4px; }
.booked { margin-top: 4px; }
@media (min-width: 640px) {
  .b-head-in { padding-top: 12px; padding-bottom: 24px; }
  .book { padding-top: 20px; padding-bottom: 12px; }
}

/* ---------- 11 Footer ---------- */
.site-foot { flex: 0 0 auto; display: flex; justify-content: center; padding: 0 var(--gutter) 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.site-foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: var(--fs-sm); color: var(--muted); }
.site-foot a:hover { color: var(--link); }

/* ---------- 12 Motion ---------- */
.btn, .act, .talk, .keep, .mini, .row-link, .book-row, .more a, .more-cards a, .b-white, .field input, .field textarea, .seg input, .switch { transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- 13 Print: the profile and case studies are passed on as paper or PDF ---------- */
@media print {
  @page { margin: 16mm 18mm; }
  body { display: block; min-height: 0; background: #FFFFFF; font-size: 10.5pt; }
  .wrap { max-width: none; padding: 0; }
  .skip, .back, .site-foot, .book-row, .no-print, .hero-cta, .btn, .keeps, .cal-wrap { display: none !important; }
  .print-only { display: inline; }
  /* A 160mm column; running text stays at a readable measure (about 75 characters). */
  .article { max-width: 160mm; margin: 0 auto; gap: 16pt; padding: 0; }
  .article section, .a-head { gap: 8pt; }
  .article h2:not(.label) { font-size: 14pt; }
  .h-page { font-size: 22pt; }
  .article p:not([class]), .bullets li, .a-head .lead { font-size: inherit; line-height: 1.5; }
  .card, .nums > div, .flow li, .more-cards a, .values > div, .lesson, .bento, .tl li, .glance > div, .who { break-inside: avoid; box-shadow: none; }
  .article h2 { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
  /* Dark blocks become outlined boxes with dark text: no page of solid ink, nothing white on white. */
  .lesson, .values > div, .teaser, .bento, .talk-main { background: none; border: 1px solid var(--field-line); color: var(--text); }
  .lesson a, .values span, .teaser-sub, .talk-main .ic { color: var(--text); }
  .bento * { color: var(--text) !important; }
  .values i, .label-gold, .eyebrow { color: var(--gold-ink); }
  .b-hero .b-num b, .b-hero .b-num > span { color: var(--gold-ink) !important; }
  .pill, .pill-gold { background: none; border-color: var(--field-line); }
  .act-ic { background: none; color: var(--text); }
  .bars i, .rag-a, .rag-g { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* Landing pages: the band becomes a plain heading and the cards no longer overlap it. */
  .hero { background: none; color: var(--text); }
  .hero-in { padding: 0 0 12pt; }
  .hero h1 { color: var(--heading); }
  .hero-sub { color: var(--text-2); }
  .cols { margin-top: 0; }
  .group { display: none; }
  .chip, .chip-dark, .chip-sage { background: none; border: 1px solid var(--field-line); color: var(--text); }
  .contact a { display: inline; min-height: 0; }
  /* The gold marks and timeline dots are small fills: print them as they are. */
  .bullets li::before, .tl li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tl { margin-left: 5px; border-left: 0; }
  .nums { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nums > div { padding: 10pt; }
  .values { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article .cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
