/* =========================================================
   brendanchalifour.ca · redesign
   Rules, written once and used everywhere:
   - Type: Apple Garamond for headlines; Inter for everything else.
     Accents, used sparingly: Manus = handwritten notes (things scribbled in the margin);
     Manthoels = signatures (who said it, the sign-off). Nothing else uses them.
     Accents are never small: Manus is 1.6rem or larger, Manthoels 2.4rem or larger (it is a thin script).
   - Layers: main content sits above the footer, so anything that pops out (book card, menus) is never covered.
   - Green: --accent for big or decorative green; --accent-text for small green text
     (4.5:1 on cream); filled green shapes use --accent-text with cream bold text.
   - The four C9 bulb colours (green, blue, yellow, red) and warm white appear only in neon.
   - Text is 14px or larger; contrast is 4.5:1 or better.
   ========================================================= */

/* ---------- Fonts ---------- */
@font-face { font-family: "Apple Garamond"; src: url("fonts/AppleGaramond-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Apple Garamond"; src: url("fonts/AppleGaramond.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Apple Garamond"; src: url("fonts/AppleGaramond-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Apple Garamond"; src: url("fonts/AppleGaramond-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Manus"; src: url("fonts/Manus.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Manthoels"; src: url("fonts/Manthoels.otf") format("opentype"); font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f5f1ea;
  --bg-2: #ece6db;
  --card: #fffdf8;
  --ink: #1d2320;
  --ink-2: #48514c;
  --ink-3: #5c655f;
  --line: rgba(29, 35, 32, 0.12);
  --accent: #4b7a63;
  --accent-text: #2f5c47;
  --accent-soft: rgba(75, 122, 99, 0.14);
  --cream: #fffaf2;
  --shadow: 0 1px 2px rgba(25, 35, 30, 0.06), 0 12px 40px -12px rgba(25, 35, 30, 0.2);
  --radius: 28px;
  --serif: "Apple Garamond", Garamond, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hand: "Manus", "Bradley Hand", cursive;
  --sig: "Manthoels", "Snell Roundhand", cursive;
  --wrap: 1120px;
  --read: 44rem;
  --tb-h: 0px;
  --nav-h: 64px;
  /* neon only */
  --n-green: #39ff88; --n-blue: #2fb8ff; --n-yellow: #ffdd3c; --n-red: #ff3b4e; --n-warm: #ffb347;
  --wall: #07090f;
  color-scheme: light;
}
/* dark mode lives at the end of this file (html[data-theme="dark"]) */
/* accents switched off in the test panel: fall back to the house fonts */
html[data-accents="off"] { --hand: var(--serif); --sig: var(--serif); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--tb-h) + var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding-top: var(--tb-h);
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.25 0 0 0 0 0.2 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .nav, .foot, .legal { position: relative; z-index: 1; }
main { z-index: 2; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; margin: 0; }
h2 { font-size: clamp(2.2rem, 5.6vw, 3.9rem); line-height: 1.04; }
h1 em, h2 em, h3 em, .foot-vision em { font-style: italic; color: var(--accent); }
p { margin: 0; }
ul, ol { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, .lede, .hero-sub, .foot-vision, .big-quote { text-wrap: balance; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.hand { font-family: var(--hand); font-weight: 400; letter-spacing: 0; }
.sig { font-family: var(--sig); font-weight: 400; letter-spacing: 0; font-style: normal; }

.eyebrow {
  font-size: 0.875rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-text); font-weight: 600; margin-bottom: 1rem;
}
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lede { color: var(--ink-2); max-width: 38rem; margin-top: 1.1rem; font-size: 1.12rem; }
.section { padding: clamp(4.5rem, 10vw, 7.5rem) 16px; max-width: var(--wrap); margin: 0 auto; }
.section.tight { padding-top: clamp(2rem, 5vw, 3rem); }
.section-head { margin-bottom: clamp(2.2rem, 5vw, 3.2rem); }
.more-link { display: inline-block; margin-top: 2rem; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.num { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.1em; color: var(--accent-text); }
.note { font-family: var(--hand); color: var(--accent-text); font-size: 1.75rem; line-height: 1.15; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Test panel (Brendan's preview bar; not part of the site) ---------- */
.tb {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px;
  padding: 5px 12px; min-height: 40px;
  background: #fff; color: #555; border-bottom: 1px solid #ddd;
  font: 500 12px/1 system-ui, -apple-system, sans-serif;
}
.tb .grp { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.tb .lbl { color: #8a8a8a; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; margin-right: 5px; }
.tb button { border: 0; background: none; padding: 6px 8px; border-radius: 6px; color: #333; cursor: pointer; font: inherit; }
.tb button:hover { background: #f0f0f0; }
.tb button[aria-pressed="true"] { background: #1a1a1a; color: #fff; }
.tb .tb-hide { margin-left: auto; color: #8a8a8a; }
.tb-tab {
  position: fixed; top: 0; right: 12px; z-index: 60; display: none;
  font: 600 11px/1 system-ui, sans-serif; background: #1a1a1a; color: #fff; border: 0;
  border-radius: 0 0 8px 8px; padding: 7px 10px; cursor: pointer;
}
html.tb-closed .tb { display: none; }
html.tb-closed .tb-tab { display: block; }
@media (max-width: 767px) {
  .tb { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .tb::-webkit-scrollbar { display: none; }
  .tb .grp { flex-wrap: nowrap; }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: var(--tb-h); z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.icon-link { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; }
.icon-link img { width: 34px; height: 34px; object-fit: contain; }
.nav nav { display: flex; gap: clamp(0.9rem, 1.7vw, 1.6rem); margin-left: auto; }
.nav nav a { text-decoration: none; font-size: 0.92rem; color: var(--ink-2); padding: 2px 0; border-bottom: 1px solid transparent; white-space: nowrap; transition: color 0.2s; }
.nav nav a:hover { color: var(--accent-text); }
.nav nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.search-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; flex: none;
  height: 40px; padding: 0 0.9rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); cursor: pointer; font-size: 0.9rem;
}
.search-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-btn kbd { font: 600 0.75rem/1 var(--sans); color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 3px 5px; }
@media (hover: hover) and (pointer: fine) { .search-btn:hover { border-color: var(--accent); color: var(--ink); } }

/* ---------- Wordmark ---------- */
.wordmark { display: block; width: 100%; height: auto; overflow: visible; }
.wordmark use { fill: currentColor; }

/* ---------- Home hero ---------- */
.hero { text-align: center; padding: clamp(2.6rem, 7vw, 5rem) 16px 0; max-width: var(--wrap); margin: 0 auto; }
.hero-mark { display: block; width: min(440px, 78vw); margin: 0 auto clamp(1.6rem, 4vw, 2.6rem); color: var(--ink); }
.hero-title {
  font-size: clamp(3.4rem, 12.5vw, 9.5rem); line-height: 1; font-weight: 300; letter-spacing: -0.025em;
  display: flex; flex-wrap: wrap; justify-content: center; column-gap: 0.22em;
  min-height: 1.15em; user-select: none; -webkit-user-select: none; position: relative;
}
.hero-title .word { display: inline-block; white-space: nowrap; }
.hero-title .slot { display: inline-block; }
.hero-title .ch {
  display: inline-block; position: relative; --f: 0;
  transition: opacity 0.25s ease;   /* movement is eased by the script, frame by frame */
  padding: 0.12em 0.2em 0.18em; margin: -0.12em -0.2em -0.18em;   /* room for italic overhang */
}
.hero-title .ch.drop { animation: drop 0.9s cubic-bezier(.2,.9,.25,1.2) both; }
.hero-title .ch.typed-out { opacity: 0; }
.hero-title .ch.caret::after {
  content: ""; position: absolute; right: 0.12em; top: 0.22em; bottom: 0.26em; width: max(2px, 0.04em);
  background: var(--accent); border-radius: 2px; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes drop { from { opacity: 0; transform: translateY(-0.6em) rotate(-8deg); } }
.hero-title em { font-style: italic; }
.hero-title em .ch { color: var(--accent); }
/* cursor styles (test panel) */
html[data-cursor="lift"] .hero-title .ch { color: color-mix(in srgb, var(--accent) calc(var(--f) * 100%), var(--ink)); }
html[data-cursor="lift"] .hero-title em .ch { color: var(--accent); }
html[data-cursor="glow"] .hero-title { --mx: -999px; --my: -999px; }
html[data-cursor="glow"] .hero-title .ch { color: color-mix(in srgb, var(--accent) calc(var(--f) * 85%), var(--ink)); text-shadow: 0 0 calc(var(--f) * 22px) color-mix(in srgb, var(--accent) calc(var(--f) * 60%), transparent); }
html[data-cursor="glow"] .hero-title em .ch { color: var(--accent); }
.hero-sub { margin: 1.4rem auto 0; font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--ink-2); max-width: 30rem; }

/* ---------- Daily quote: one controller, five looks (test panel) ---------- */
.qmode { display: none; }
html[data-quote="photo"] .q-photo,
html[data-quote="editorial"] .q-editorial,
html[data-quote="deck"] .q-deck,
html[data-quote="neon"] .q-neon { display: block; }
.q-text { margin: 0; }
.q-by:empty { display: none; }
.q-nav { display: flex; justify-content: center; align-items: center; gap: 1rem; }
.q-arrow {
  width: 48px; height: 48px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); transition: transform 0.15s, border-color 0.2s, background 0.2s;
}
.q-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.q-arrow:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .q-arrow:hover { border-color: var(--accent); } }
.q-count { min-width: 4.5em; text-align: center; font-weight: 600; font-size: 0.95rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.q-swap .q-text, .q-swap .q-by { transition: opacity 0.4s ease, transform 0.4s ease; }
.q-out .q-text, .q-out .q-by { opacity: 0; transform: translateY(8px); }

/* 1. on the photo */
.q-photo .photo {
  position: relative; margin-top: clamp(2.5rem, 6vw, 4rem);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  height: clamp(460px, 50vw, 600px); cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.q-photo .photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.q-photo .photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,25,20,.56), rgba(15,25,20,.6)); }
.q-photo .q-body { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem clamp(1.4rem, 9vw, 9rem) 5.5rem; color: #fff; text-align: center; }
.q-photo .q-label { font-size: 0.875rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; opacity: 0.85; margin-bottom: 1rem; }
.q-photo .q-text { font-family: var(--serif); font-size: clamp(1.35rem, 2.8vw, 2.2rem); line-height: 1.22; max-width: 30ch; text-wrap: balance; text-shadow: 0 1px 2px rgba(0,0,0,.35), 0 0 22px rgba(0,0,0,.3); }
.q-photo .q-by { margin-top: 1rem; font-family: var(--sig); font-size: clamp(2.4rem, 3.4vw, 2.9rem); line-height: 1; }
.q-photo .q-nav { position: absolute; z-index: 2; left: 0; right: 0; bottom: 1.4rem; }
.q-photo .q-arrow { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.q-photo .q-count { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* 2. editorial: the quote is the page */
.q-editorial { margin-top: clamp(3.5rem, 8vw, 6rem); padding: clamp(2.5rem, 6vw, 4rem) 0 0; border-top: 1px solid var(--line); }
.q-editorial .q-label { font-size: 0.875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); font-weight: 600; }
.q-editorial .q-mark { display: block; font-family: var(--serif); font-size: clamp(6rem, 14vw, 9rem); line-height: 0.6; height: 0.42em; color: var(--accent); opacity: 0.5; margin-top: 1.4rem; }
.q-editorial .q-text { font-family: var(--serif); font-size: clamp(1.8rem, 4.4vw, 3.3rem); line-height: 1.15; max-width: 24ch; margin: 0 auto; min-height: 3.5em; display: flex; align-items: center; justify-content: center; text-wrap: balance; }
.q-editorial .q-by { font-family: var(--sig); font-size: clamp(2.6rem, 4.6vw, 3.4rem); color: var(--accent-text); margin-top: 1.2rem; line-height: 1; }
.q-editorial .q-nav { margin-top: 1.8rem; }

/* 3. deck: a stack of cards you flip through */
.q-deck { margin-top: clamp(3rem, 7vw, 5rem); }
.q-deck .deck { position: relative; max-width: 720px; margin: 0 auto; touch-action: pan-y; cursor: pointer; user-select: none; -webkit-user-select: none; }
.q-deck .deck::before, .q-deck .deck::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow);
}
.q-deck .deck::before { transform: rotate(-3.2deg) translateY(10px); opacity: 0.6; }
.q-deck .deck::after { transform: rotate(2.2deg) translateY(5px); opacity: 0.8; }
.q-deck .card-q {
  position: relative; z-index: 1; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(2rem, 5vw, 3.4rem) clamp(1.4rem, 5vw, 3.4rem); min-height: clamp(300px, 34vw, 360px);
  display: flex; flex-direction: column; justify-content: center; text-align: left;
  transition: transform 0.45s cubic-bezier(.2,.7,.2,1), opacity 0.45s ease;
}
.q-deck.q-out .card-q { transform: translateX(-30px) rotate(-4deg); opacity: 0; }
.q-deck .q-label { font-family: var(--hand); color: var(--accent-text); font-size: 1.8rem; margin-bottom: 1rem; }
.q-deck .q-text { font-family: var(--serif); font-size: clamp(1.45rem, 3vw, 2.2rem); line-height: 1.22; }
.q-deck .q-by { font-family: var(--sig); font-size: clamp(2.5rem, 4vw, 3rem); line-height: 1; color: var(--accent-text); margin-top: 1.2rem; align-self: flex-end; }
.q-deck .q-nav { margin-top: 2rem; }

/* 4. neon: lit up on a dark wall */
.q-neon { margin-top: clamp(3rem, 7vw, 5rem); }
.q-neon .wall {
  border-radius: var(--radius); background: radial-gradient(110% 90% at 50% 0%, #18233a, #0d1422 70%);
  padding: clamp(2.4rem, 6vw, 4.4rem) clamp(1.2rem, 6vw, 4rem) clamp(1.6rem, 4vw, 2.4rem); text-align: center; color: #fff;
  box-shadow: var(--shadow); cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.q-neon .q-text {
  font-family: var(--serif); font-size: clamp(1.45rem, 3vw, 2.3rem); line-height: 1.3; max-width: 30ch; margin: 0 auto; min-height: 4.2em;
  display: flex; align-items: center; justify-content: center; text-wrap: balance;
  color: #fff6e6; text-shadow: 0 0 1px #fff, 0 0 4px var(--n-warm), 0 0 12px rgba(255,179,71,.65), 0 0 28px rgba(255,179,71,.4);
}
.q-neon .q-by { font-family: var(--sig); font-size: clamp(2.6rem, 4.6vw, 3.4rem); line-height: 1.1; margin-top: 1rem; color: #ffe0ef; text-shadow: 0 0 1px #fff, 0 0 5px #ff3fa4, 0 0 14px rgba(255,63,164,.7), 0 0 30px rgba(255,63,164,.4); }
.q-neon .q-nav { margin-top: 1.6rem; }
.q-neon .q-arrow { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.2); color: #fff; }
.q-neon .q-count { color: #c9cfdc; }
.q-neon .rings { display: flex; justify-content: center; gap: 22px; margin-bottom: 1.6rem; }
.q-neon .rings i { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--c); box-shadow: 0 0 4px var(--c), 0 0 12px var(--c), inset 0 0 4px var(--c); }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); padding: 1.1rem 0; margin-top: clamp(4rem, 9vw, 6rem);
  position: relative; z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 120s linear infinite; }
@media (hover: hover) and (pointer: fine) { .marquee:hover .marquee-track { animation-play-state: paused; } }
.marquee-track a { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); padding: 0 1.4rem; white-space: nowrap; color: var(--ink-2); text-decoration: none; }
.marquee-track a:hover { color: var(--accent-text); }
.marquee-track a::after { content: "·"; padding-left: 2.8rem; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Building blocks ---------- */
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.6rem, 4vw, 2.4rem); }
.panel h3 { font-size: clamp(1.7rem, 3.2vw, 2.2rem); line-height: 1.1; }
.panel p { color: var(--ink-2); margin-top: 0.7rem; }
.tile { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 1.5rem 1.4rem 1.6rem; }
.tile h3 { font-size: 1.55rem; line-height: 1.12; margin: 0.45rem 0 0.5rem; }
.tile p { color: var(--ink-2); font-size: 0.98rem; line-height: 1.5; }
.tile .ex { margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px dashed var(--line); font-size: 0.92rem; color: var(--ink-3); }
.tile .ex b { color: var(--ink-2); font-weight: 600; }
.feature { background: var(--accent-text); color: var(--cream); }
.feature .tag, .feature p, .feature li { color: var(--cream); opacity: 0.94; }
.feature h2, .feature h3 { color: var(--cream); }
.feature a { color: var(--cream); }
.tag { font-size: 0.875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }
.pill { padding: 0.45rem 1rem; border-radius: 999px; background: var(--accent-text); color: var(--cream); font-weight: 700; font-size: 0.92rem; }
.btn {
  display: inline-block; margin-top: 1.6rem; padding: 0.8rem 1.6rem; border-radius: 999px;
  background: var(--cream); color: var(--accent-text); font-weight: 700; text-decoration: none; border: 0; cursor: pointer;
  transition: transform 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-line { background: transparent; color: var(--accent-text); border: 1px solid var(--line); }
.btn-fill { background: var(--accent-text); color: var(--cream); }
.feature .btn { color: var(--accent-text); }
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: start; }

/* numbered ideas, big */
.ideas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.4rem, 4vw, 3rem); counter-reset: idea; }
.idea { border-top: 2px solid var(--ink); padding-top: 1.2rem; }
.idea .hand { display: block; font-size: 2.6rem; line-height: 1; color: var(--accent); margin-bottom: 0.6rem; }
.idea h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.12; }
.idea p { color: var(--ink-2); margin-top: 0.6rem; }

/* link lists */
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li + li { border-top: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.85rem 0; text-decoration: none; }
.link-list a span:first-child { overflow-wrap: anywhere; }
.link-list a span:last-child { color: var(--accent-text); font-weight: 600; flex: none; }
.link-list a:hover span:first-child { color: var(--accent-text); }
.link-list small { color: var(--ink-3); font-size: 0.9rem; margin-left: 0.4rem; }
/* link lists inside a filled green panel: arrows, notes and dividers in cream so they show */
.feature .link-list a span:last-child, .feature .link-list small { color: var(--cream); opacity: 0.85; }
.feature .link-list li + li { border-top-color: rgba(255, 250, 242, 0.2); }
html[data-theme="dark"] .feature .link-list a span:last-child, html[data-theme="dark"] .feature .link-list small { color: var(--accent-text); opacity: 1; }
html[data-theme="dark"] .feature .link-list li + li { border-top-color: var(--line); }
.list-label { font-size: 0.875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 2rem 0 0.2rem; }
.list-label:first-child { margin-top: 0; }
.link-groups { columns: 3 300px; column-gap: 1rem; }
.link-group { break-inside: avoid; margin-bottom: 1rem; background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 1.3rem 1.4rem 0.6rem; }
.link-group h3 { font-size: 1.45rem; line-height: 1.15; margin-bottom: 0.3rem; }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 0.5rem 1rem;
  font-size: 0.92rem; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all 0.2s;
}
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--accent); color: var(--accent-text); } }
.chip[aria-pressed="true"] { background: var(--accent-text); border-color: var(--accent-text); color: var(--cream); }
[data-filter-item][hidden] { display: none !important; }

/* cards with photos */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; transition: transform 0.3s cubic-bezier(.2,.7,.2,1);
}
@media (hover: hover) and (pointer: fine) { .card:hover { transform: translateY(-4px); } }
.card-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); display: block; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.card h3 { font-size: 1.45rem; line-height: 1.15; }
.card p { color: var(--ink-2); font-size: 0.97rem; }
.card-go { margin-top: auto; padding-top: 0.4rem; font-weight: 600; color: var(--accent-text); font-size: 0.95rem; }

/* doors: the six areas of the site */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.door { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 1.5rem 1.5rem 1.4rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.35rem; min-height: 11rem; transition: transform 0.3s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) and (pointer: fine) { .door:hover { transform: translateY(-4px); } }
.door .hand { font-size: 2.4rem; line-height: 1; color: var(--accent); }
.door h3 { font-size: 1.8rem; line-height: 1.1; }
.door p { color: var(--ink-2); font-size: 0.97rem; }
.door .card-go { margin-top: auto; }

/* sticky notes (Manus) */
.notes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.sticky {
  background: #fbf3c8; color: #2b2a1e; padding: 1.3rem 1.2rem 1.5rem; min-height: 9.5rem;
  box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 10px 22px -12px rgba(60,50,10,.35);
  font-family: var(--hand); font-size: 1.75rem; line-height: 1.15; transform: rotate(var(--r, -1deg));
}
.sticky:nth-child(4n+2) { --r: 1.2deg; background: #e7f0e3; }
.sticky:nth-child(4n+3) { --r: -0.6deg; background: #f6e3d8; }
.sticky:nth-child(4n) { --r: 0.8deg; background: #e3ecf3; }

/* big stat */
.stat { display: flex; align-items: baseline; gap: 0.6rem 1.2rem; flex-wrap: wrap; }
.stat .big { font-family: var(--hand); font-size: clamp(4.5rem, 12vw, 8rem); line-height: 0.9; color: var(--accent); }
.stat p { max-width: 26rem; color: var(--ink-2); font-size: 1.1rem; }

/* a workday timeline */
.day { margin-top: 1.6rem; }
.day-track { position: relative; height: 64px; border-radius: 16px; background: var(--bg-2); overflow: hidden; }
.day-block { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 0.9rem; font-weight: 600; padding: 0 4px; line-height: 1.2; }
.day-block.focus { background: var(--accent-text); color: var(--cream); }
.day-block.meet { background: #d9c7a8; color: #3a2e1a; }
.day-pin { position: absolute; top: -2px; bottom: -2px; width: 3px; background: #c25a35; border-radius: 2px; }
.day-hours { position: relative; height: 1.6rem; margin-top: 0.5rem; font-size: 0.875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.day-hours span { position: absolute; transform: translateX(-50%); }
.day-key { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1rem; font-size: 0.95rem; color: var(--ink-2); }
.day-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 0.45rem; vertical-align: -1px; }

/* steps (numbered flow) */
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; gap: 0.7rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.8rem; align-items: baseline; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 0.95rem 1.2rem; color: var(--ink); }
.steps li::before { content: counter(s); font-family: var(--hand); font-size: 2rem; line-height: 1; color: var(--accent); text-align: center; }

/* big pull quote */
.big-quote { font-family: var(--serif); font-size: clamp(1.9rem, 4.8vw, 3.4rem); line-height: 1.13; max-width: 24ch; }
.big-quote.long { font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.25; max-width: 38ch; }   /* long quotes read better smaller */
.big-quote::before { content: "“"; display: block; color: var(--accent); font-size: 1.8em; line-height: 0.6; height: 0.5em; }
.quote-block { border-left: 2px solid var(--accent); padding: 0.2rem 0 0.2rem 1.4rem; font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.6vw, 1.65rem); line-height: 1.35; color: var(--ink); }
.quote-block .sig { display: block; font-style: normal; margin-top: 0.5rem; font-size: 2.6rem; color: var(--accent-text); }

/* question bank */
.qbank-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.qbank-list li { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 1rem 1.2rem; font-family: var(--serif); font-size: 1.22rem; line-height: 1.3; }

/* notebook chapters */
.chapters { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.toc { position: sticky; top: calc(var(--tb-h) + var(--nav-h) + 24px); display: grid; gap: 0.2rem; }
.toc a { text-decoration: none; color: var(--ink-3); font-size: 0.95rem; padding: 0.35rem 0 0.35rem 0.9rem; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--accent); font-weight: 600; }
.chapter { padding-bottom: clamp(3.5rem, 8vw, 5.5rem); }
.chapter + .chapter { border-top: 1px solid var(--line); padding-top: clamp(3rem, 7vw, 4.5rem); }
.chapter > h2 { margin-bottom: 1.4rem; }
.chapter > * + * { margin-top: 1.4rem; }
.prose-p { color: var(--ink-2); font-size: 1.08rem; max-width: var(--read); }
.prose-p + .prose-p { margin-top: 1rem; }

/* Eisenhower matrix */
.matrix { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 1rem; }
.matrix .axis { font-weight: 700; font-size: 1rem; color: var(--ink); text-align: center; }
.matrix .axis.side { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; }
.quad { border-radius: 22px; padding: 1.5rem 1.4rem; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.25s, box-shadow 0.25s; text-align: left; border: 0; color: #22261f; font: inherit; }
.quad h3 { font-family: var(--hand); font-size: 1.9rem; line-height: 1; letter-spacing: 0.02em; }
.quad p { margin-top: 0.7rem; font-size: 1rem; }
.quad ul { margin-top: 0.8rem; padding-left: 1.1rem; font-size: 0.97rem; }
.quad .ex-h { margin-top: 0.9rem; font-weight: 700; font-size: 0.95rem; }
.quad.do { background: #f6dcd9; } .quad.schedule { background: #dde8de; } .quad.delegate { background: #f5e6d6; } .quad.delete { background: #f6efcf; }
.matrix.focus .quad { opacity: 0.45; }
.matrix.focus .quad.on { opacity: 1; transform: scale(1.02); box-shadow: 0 20px 50px -18px rgba(0,0,0,.35); }

/* bookshelf */
/* Books: every cover keeps its real shape (a square book stays square) and stands on a line */
.shelf { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 2.4rem 1.2rem; align-items: end; padding: 0 0.4rem; }
.shelf .book { position: relative; z-index: 1; display: block; width: 100%; padding: 0 0 10px; border: 0; background: none; cursor: pointer; }
.shelf img, .books .book img {
  display: block; width: 100%; height: auto; border-radius: 4px 8px 8px 4px;
  box-shadow: 0 10px 18px -10px rgba(0,0,0,.5), inset 3px 0 0 rgba(255,255,255,.2);
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), opacity 0.3s ease, filter 0.3s ease;
}
@media (hover: hover) and (pointer: fine) { .shelf .book:hover img { transform: translateY(-8px) rotate(-1.5deg); } }
/* one plank per row, wall to wall (placed by script under each row) */
.plank { position: absolute; left: 0; right: 0; height: 12px; border-radius: 3px; z-index: 0; pointer-events: none;
  background: linear-gradient(#d6c3a5, #b39a75 60%, #9c845f); box-shadow: 0 8px 14px -8px rgba(60,40,20,.55), inset 0 1px 0 rgba(255,255,255,.35); }
/* tap a book: the rest dim, that one lifts, its details appear underneath */
.shelf.focus .book:not(.on) img { opacity: 0.35; filter: saturate(0.6); }
.shelf .book.on { z-index: 3; }
.shelf .book.on img { transform: translateY(-12px) scale(1.06); box-shadow: 0 24px 40px -16px rgba(0,0,0,.55); }
.book-info {
  position: absolute; z-index: 4; width: min(280px, calc(100% - 8px)); background: var(--card); border-radius: 18px;
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.4); padding: 1rem 1.2rem 1.1rem; text-align: left;
  animation: pop 0.3s cubic-bezier(.2,.9,.25,1.2);
}
.book-info::before { content: ""; position: absolute; top: -7px; left: var(--arrow, 50%); width: 14px; height: 14px; margin-left: -7px; background: var(--card); transform: rotate(45deg); border-radius: 3px 0 0 0; }
.bi-title { font-family: var(--serif); font-size: 1.45rem; line-height: 1.15; color: var(--ink); }
.bi-author { margin-top: 0.3rem; color: var(--ink-2); font-size: 1rem; }
.bi-year { margin-top: 0.15rem; color: var(--accent-text); font-weight: 600; font-size: 0.95rem; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.books { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(0.8rem, 2vw, 1.4rem); align-items: end; }
.books .book { display: block; }
@media (hover: hover) and (pointer: fine) { .books .book:hover img { transform: translateY(-6px) rotate(-1deg); } }

/* quote posters */
.posters { columns: 3 300px; column-gap: 1rem; }
.poster { break-inside: avoid; margin: 0 0 1rem; border-radius: 22px; padding: clamp(1.6rem, 3vw, 2.2rem); box-shadow: var(--shadow); background: var(--card); }
.poster blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.25; }
.poster figcaption { margin-top: 1rem; font-family: var(--sig); font-size: 2.6rem; line-height: 1; color: var(--accent-text); }
.poster.ink { background: #1d2320; color: #f5f1ea; }
.poster.ink figcaption { color: #b6dcc6; }
.poster.green { background: var(--accent-text); color: var(--cream); }
.poster.green figcaption { color: #e9f3ec; }
.poster.big blockquote { font-size: clamp(1.7rem, 3vw, 2.2rem); }

/* poems */
.poem { max-width: 40rem; margin: 0 auto; }
.poem p { font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.55rem); line-height: 1.5; color: var(--ink); }
.poem p + p { margin-top: 1.3rem; }
.poem:not(.lines) p:first-child::first-letter { float: left; font-size: 4.2em; line-height: 0.8; padding: 0.06em 0.08em 0 0; color: var(--accent); }
.poem.lines p { margin: 0; }
.poem.lines p + p { margin-top: 0.2rem; }
.poem .sig { display: block; text-align: right; font-size: clamp(2.8rem, 5vw, 3.4rem); color: var(--accent-text); margin-top: 2rem; }

/* recipes */
.recipe { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.recipe-photo { position: sticky; top: calc(var(--tb-h) + var(--nav-h) + 24px); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.recipe-photo img { display: block; width: 100%; height: auto; }
.recipe .note { margin-bottom: 1.2rem; }
.method { list-style: none; padding: 0; counter-reset: m; display: grid; gap: 0.7rem; }
.method > li {
  counter-increment: m; position: relative; background: var(--card); border-radius: 18px; box-shadow: var(--shadow);
  padding: 1rem 1.2rem 1rem 3.6rem; cursor: pointer; transition: opacity 0.25s, background 0.25s; user-select: none; -webkit-user-select: none;
}
.method > li::before { content: counter(m); position: absolute; left: 1.1rem; top: 0.7rem; font-family: var(--hand); font-size: 1.9rem; color: var(--accent); line-height: 1; }
.method > li.done { opacity: 0.5; }
.method > li.done::before { content: "✓"; font-family: var(--sans); font-size: 1.2rem; top: 1rem; }
.method > li.done > .step { text-decoration: line-through; text-decoration-color: var(--accent); }
.method .step { font-size: 1.05rem; }
.method ul { list-style: none; padding: 0; margin-top: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.method ul li { background: var(--bg-2); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.95rem; color: var(--ink); }
.ingredients { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.ingredients li { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 0.75rem 1rem; }
.tap-hint { font-size: 0.95rem; color: var(--ink-3); margin-bottom: 0.8rem; }

/* YouTube: a still image until someone presses play (no YouTube cookies before that) */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.6rem 1.2rem; }
.video h3 { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; margin: 0.8rem 0 0; }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 18px; overflow: hidden; background: #000; cursor: pointer; box-shadow: var(--shadow); }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.88; transition: opacity 0.2s; }
.yt::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: rgba(255,255,255,.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%232f5c47'/%3E%3C/svg%3E") center / 30px no-repeat;
  box-shadow: 0 6px 20px rgba(0,0,0,.3); transition: transform 0.2s;
}
@media (hover: hover) and (pointer: fine) { .yt:hover img { opacity: 1; } .yt:hover::after { transform: scale(1.06); } }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt.playing { cursor: auto; }
.yt.playing::after { display: none; }
.film video { width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: #000; display: block; box-shadow: var(--shadow); }
.film h3 { font-family: var(--serif); font-size: 1.5rem; margin-top: 0.8rem; }

/* compare: batch vs one piece flow */
.flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.flow .tile { padding-bottom: 1.4rem; }
.dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin-top: 1rem; max-width: 300px; }
.dots i { aspect-ratio: 1; border-radius: 50%; background: var(--accent); }
.dots.bad i { background: #c25a35; }
.dots.one { grid-template-columns: repeat(10, 1fr); }
.dots.one i { background: var(--line); }
.dots.one i:first-child { background: var(--accent); }

/* ---------- Inner page header ---------- */
/* masthead: the site name on every inner page, like the top of a magazine page */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.1rem; margin-bottom: clamp(2rem, 5vw, 3rem); border-bottom: 1px solid var(--line); }
.masthead a { display: block; width: clamp(170px, 22vw, 240px); color: var(--ink); }
.masthead p { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--ink-2); white-space: nowrap; }
.masthead p em { color: var(--accent); }
.page-head { max-width: var(--wrap); margin: 0 auto; padding: clamp(1.6rem, 4vw, 2.6rem) 16px clamp(2rem, 5vw, 3rem); }
.page-head h1 { font-size: clamp(2.9rem, 8.5vw, 6rem); line-height: 1; font-weight: 300; letter-spacing: -0.02em; }
.page-head .note { margin-top: 1.2rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.crumbs span[aria-hidden] { color: var(--ink-3); }
.page-body { max-width: var(--wrap); margin: 0 auto; padding: 0 16px clamp(4rem, 9vw, 6rem); }
.page-body > section + section { margin-top: clamp(3.5rem, 8vw, 5.5rem); }
.sub-head { margin-bottom: 1.6rem; }
.sub-head h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.sub-head p { color: var(--ink-2); margin-top: 0.6rem; max-width: 38rem; }

/* ---------- Contact ---------- */
.two-up { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.contact-links .btn { margin-top: 0; }
.contact-rows { display: grid; gap: 1.4rem; margin-top: 1.4rem; }
.contact-row dt { font-size: 0.875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.feature .contact-row dt { color: var(--cream); opacity: 0.85; }
.contact-row dd { margin: 0.3rem 0 0; font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 1.3; word-break: break-word; }
.contact-row dd a { text-decoration: none; border-bottom: 1px solid currentColor; }
.reveal-btn { font: inherit; font-family: var(--sans); font-size: 0.95rem; font-weight: 600; background: none; border: 1px dashed currentColor; border-radius: 999px; padding: 0.35rem 0.9rem; cursor: pointer; color: inherit; }
.contact-photo { display: block; width: 100%; max-height: 380px; object-fit: cover; margin-top: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.logo-on-green { display: block; width: 200px; max-width: 70%; height: auto; margin-bottom: 1.2rem; background: #fff; border-radius: 12px; padding: 10px 14px; }

/* ---------- Search ---------- */
.search { position: fixed; inset: 0; z-index: 80; display: none; background: rgba(20, 24, 22, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); padding: calc(var(--tb-h) + 8vh) 16px 16px; }
.search.open { display: block; }
.search-box { max-width: 640px; margin: 0 auto; background: var(--card); border-radius: 22px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); overflow: hidden; }
.search-field { display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); }
.search-field svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; flex: none; }
.search-field input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font: 400 1.15rem/1.4 var(--sans); color: var(--ink); }
.search-field button { border: 1px solid var(--line); background: none; border-radius: 8px; padding: 0.3rem 0.6rem; font-size: 0.875rem; color: var(--ink-3); cursor: pointer; }
.search-results { list-style: none; margin: 0; padding: 0.4rem; max-height: min(60vh, 520px); overflow-y: auto; }
.search-results a { display: block; padding: 0.75rem 0.9rem; border-radius: 14px; text-decoration: none; }
.search-results a:hover, .search-results a.sel { background: var(--accent-soft); }
.search-results .r-t { font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; }
.search-results .r-s { display: block; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); font-weight: 600; margin-top: 0.15rem; }
.search-results .r-x { display: block; font-size: 0.95rem; color: var(--ink-2); margin-top: 0.25rem; }
.search-results mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty { padding: 1.2rem 1.1rem 1.4rem; color: var(--ink-3); font-size: 0.97rem; }

/* ---------- Neon (dark mode wordmark) ---------- */
@keyframes hum { 0%,100% { opacity: 1; } 50% { opacity: .93; } }
@keyframes flicker { 0%, 88%, 100% { opacity: 1; } 89% { opacity: .25; } 90% { opacity: 1; } 92% { opacity: .4; } 93.5% { opacity: 1; } }

/* ---------- Footer ---------- */
.foot { text-align: center; padding: 4rem 16px 3rem; border-top: 1px solid var(--line); }
.foot-vision { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 8vw, 5rem); line-height: 1; letter-spacing: -0.02em; margin-bottom: 2rem; }
.foot-mark { display: block; width: min(300px, 70vw); margin: 0 auto; color: var(--ink); }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.4rem; margin-top: 2rem; }
.foot-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; }
.foot-nav a:hover { color: var(--accent-text); }
.legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1.5rem;
  padding: 1rem 16px calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--ink-2);
}
.legal a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line); }
.legal a:hover { color: var(--accent-text); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { flex-wrap: wrap; row-gap: 0.3rem; }
  .nav nav { order: 3; width: 100%; justify-content: space-between; margin-left: 0; gap: 0.6rem; }
  .search-btn { margin-left: auto; }
  :root { --nav-h: 104px; }
}
@media (max-width: 960px) {
  .g4, .cards, .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .doors, .ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .books { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .books .book:nth-child(n+9) { display: none; }
  .split, .two-up, .recipe, .chapters, .flow { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 0.9rem; }
  .toc a.on { border-color: var(--accent); }
  .recipe-photo { position: static; }
  .qbank-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .books { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .books .book:nth-child(n+7) { display: none; }
  .legal { justify-content: center; text-align: center; }
  .marquee { padding: 0.9rem 0; }
  .marquee-track a { font-size: 1.25rem; padding: 0 0.9rem; }
  .marquee-track a::after { padding-left: 1.8rem; }
  .search-btn kbd { display: none; }
  .matrix { grid-template-columns: minmax(0, 1fr); }
  .matrix .axis { display: none; }
  .quad::before { content: attr(data-axis); display: block; font-size: 0.875rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: #4b4a3a; margin-bottom: 0.4rem; }
}
/* phones: the menu sits in two even rows of four */
@media (max-width: 600px) {
  .nav nav { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; row-gap: 0.3rem; column-gap: 0.4rem; }
  .nav nav a { font-size: 0.875rem; }
  :root { --nav-h: 132px; }
}
@media (max-width: 480px) {
  .g4, .g3, .g2, .cards, .cards.three, .doors, .ideas, .notes { grid-template-columns: minmax(0, 1fr); }
  .search-btn span { display: none; }
  .search-btn { width: 44px; justify-content: center; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; scrollbar-width: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Light / dark switch in the menu ---------- */
.theme-btn { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .sun { display: none; }
@media (hover: hover) and (pointer: fine) { .theme-btn:hover { border-color: var(--accent); color: var(--ink); } }

/* ---------- Dark mode: night colours, and the wordmark lit like the neon sign ----------
   Follows the device setting until someone uses the switch. One rule everywhere:
   warm white neon for the wordmark, warm amber for accents, the four C9 colours only in neon. */
html[data-theme="dark"] {
  --bg: #0a0e17; --bg-2: #121a2a; --card: #121a2a; --ink: #eef1f6; --ink-2: #c3cad8; --ink-3: #9aa4b8;
  --line: rgba(233, 236, 242, 0.12); --accent: #ffb347; --accent-text: #ffc978; --accent-soft: rgba(255, 179, 71, 0.14); --cream: #1a1206;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 50px -18px rgba(0,0,0,.8);
  color-scheme: dark;
}
html[data-theme="dark"] body { background: radial-gradient(120% 60% at 50% 0%, #18233a 0%, #0d1422 45%, #0a0e17 100%) fixed; }
html[data-theme="dark"] body::before { opacity: 0.12; }
html[data-theme="dark"] .nav { background: color-mix(in srgb, #0d1422 85%, transparent); }
html[data-theme="dark"] .theme-btn .sun { display: block; }
html[data-theme="dark"] .theme-btn .moon { display: none; }
html[data-theme="dark"] .search-btn, html[data-theme="dark"] .theme-btn { background: rgba(255,255,255,.04); }
/* the wordmark becomes the neon sign: warm white tube, and the f flickers now and then */
html[data-theme="dark"] .hero-mark, html[data-theme="dark"] .masthead a, html[data-theme="dark"] .foot-mark { color: #fff; filter: url(#neon-warm); animation: hum 3.4s ease-in-out infinite; }
html[data-theme="dark"] .wordmark .flick { animation: flicker 6s linear infinite; }
html[data-theme="dark"] .masthead p em, html[data-theme="dark"] .hero-title em .ch { text-shadow: 0 0 10px rgba(255,179,71,.45); }
html[data-theme="dark"] .feature { background: #16203a; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,179,71,.28), var(--shadow); }
html[data-theme="dark"] .feature .tag { color: var(--accent-text); opacity: 1; }
html[data-theme="dark"] .feature p, html[data-theme="dark"] .feature li, html[data-theme="dark"] .feature .contact-row dt { color: var(--ink-2); opacity: 1; }
html[data-theme="dark"] .feature h2, html[data-theme="dark"] .feature h3, html[data-theme="dark"] .feature a:not(.btn) { color: var(--ink); }
html[data-theme="dark"] .feature .btn { background: var(--accent-text); color: #1a1206; }
html[data-theme="dark"] .sticky { filter: brightness(0.9); }
html[data-theme="dark"] .film video, html[data-theme="dark"] .yt { box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 24px 60px -20px rgba(0,0,0,.9), 0 0 40px -10px rgba(255,179,71,.15); }
html[data-theme="dark"] .day-block.meet { background: #6b5a3c; color: #fff4e2; }
html[data-theme="dark"] .poster.ink { background: #05070c; }
html[data-theme="dark"] .poster.green { background: #1d3b2e; color: #eef1f6; }
html[data-theme="dark"] .tb { color-scheme: light; }
@media (max-width: 480px) { .masthead p { display: none; } }
/* five ideas (Decisions): one row on desktop instead of 3 + 2 */
.ideas.five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); }
.ideas.five .idea h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); }
@media (max-width: 960px) { .ideas.five { grid-template-columns: minmax(0, 1fr); } }
/* 10-10-10 (Decisions): the numbers in the script font */
.stat .big.script { font-family: var(--sig); line-height: 1.05; }
