/* ==========================================================
   Wehan Coombs · site styles
   Dark is the default. Light values live under [data-theme="light"].
   ========================================================== */

:root {
  --bg: #100F0D;
  --bg-2: #171512;
  --surface: #1D1A16;
  --line: #2F2A24;
  --line-2: #433C33;
  --text: #ECE4D6;
  --text-2: #A79C8C;
  --text-3: #7C7264;
  --gold: #C9A24D;
  --gold-2: #E8CC85;
  --teach: #D6734F;
  --think: #86ACDF;
  --make: #73B8A3;
  --accent: var(--gold);
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F4EEE2;
  --bg-2: #ECE4D4;
  --surface: #FBF8F1;
  --line: #DCD2C0;
  --line-2: #C6B9A2;
  --text: #231E19;
  --text-2: #675D50;
  --text-3: #8E8376;
  --gold: #946F1F;
  --gold-2: #B9933C;
  --teach: #A8432A;
  --think: #2E5B8F;
  --make: #277A63;
  color-scheme: light;
}
body[data-chapter="teach"] { --accent: var(--teach); }
body[data-chapter="think"] { --accent: var(--think); }
body[data-chapter="make"]  { --accent: var(--make); }
#teach, [data-ch="teach"], .seal.teach { --accent: var(--teach); }
#think, [data-ch="think"], .seal.think { --accent: var(--think); }
#make,  [data-ch="make"],  .seal.make  { --accent: var(--make); }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .9s var(--ease), color .9s var(--ease);
}
body.locked { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* A soft lantern that follows the cursor. Only in the dark, only with a mouse. */
.lantern { position: fixed; left: 0; top: 0; width: 640px; height: 640px; border-radius: 50%; pointer-events: none; z-index: 0; opacity: 0; transform: translate(-50%, -50%); background: radial-gradient(circle, color-mix(in srgb, var(--accent) 9%, transparent), transparent 62%); transition: opacity 1.2s; will-change: transform; }
body.lit .lantern { opacity: 1; }
:root[data-theme="light"] .lantern { opacity: 0 !important; }
main { position: relative; z-index: 1; }
.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }

.eyebrow { font: 600 12.5px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin: 0 0 clamp(12px, 2.4vh, 20px); transition: color .6s; }
.display { font-family: var(--serif); font-weight: 500; font-size: clamp(54px, min(11vw, 17vh), 160px); line-height: .9; letter-spacing: -.025em; margin: 0; color: var(--text); }
.display em { font-style: italic; font-weight: 400; color: var(--accent); }
.line { font-family: var(--serif); font-style: italic; font-size: clamp(19px, min(2.4vw, 3.2vh), 27px); line-height: 1.35; color: var(--text-2); max-width: 30ch; margin: clamp(14px, 2.6vh, 26px) 0 0; }
.small { font-size: 14.5px; color: var(--text-2); margin: 0; }
.hint { font: 600 11.5px/1.6 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); margin: 16px 0 0; }
.hint .m-only { display: none; }
.hint .textlink { font-size: 11.5px; }
.more { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.textlink { all: unset; cursor: pointer; font: 600 12.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); border-bottom: 1px solid var(--line-2); padding-bottom: 4px; transition: color .3s, border-color .3s; }
.textlink:hover, .textlink:focus-visible { color: var(--accent); border-color: var(--accent); }
.btn { display: inline-block; padding: 10px 20px; border-radius: 999px; text-decoration: none; font: 600 14.5px/1.2 var(--sans); border: 1px solid var(--accent); color: var(--accent); background: transparent; cursor: pointer; transition: transform .3s var(--ease), filter .3s; }
.btn:disabled { opacity: .7; cursor: default; transform: none; }
.btn.solid { background: var(--accent); color: var(--bg); }
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* The little contents line under each chapter heading. */
.index { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 clamp(24px, 5vh, 44px); }
.index button { all: unset; cursor: pointer; font: 600 12px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); padding: 4px 0; transition: color .3s; }
.index button::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin: 0 9px 2px 0; vertical-align: middle; }
.index button:hover, .index button:focus-visible { color: var(--accent); }
.hero-text .index { margin: 26px 0 0; }

/* Voices: one quotation at a time, from students, mentors and colleagues. */
.voices { margin: -10px 0 clamp(24px, 5vh, 44px); max-width: 760px; }
.voice { margin: 0; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.voice.swap { opacity: 0; transform: translateY(6px); }
.voice p { margin: 0; font: italic 500 clamp(19px, 2.1vw, 24px)/1.4 var(--serif); color: var(--text); }
.voice p::before { content: "“"; color: var(--accent); }
.voice p::after { content: "”"; color: var(--accent); }
.voice figcaption { display: block; margin-top: 10px; font: 600 11.5px/1.5 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); font-style: normal; }
.voices-nav { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.voices-nav button { all: unset; cursor: pointer; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transition: background-color .3s, transform .3s; }
.voices-nav button:hover { background: var(--text-3); }
.voices-nav button[aria-current] { background: var(--accent); transform: scale(1.45); }
.voices-nav .textlink { all: unset; cursor: pointer; margin-left: 10px; font: 600 11.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); border-bottom: 1px solid var(--line-2); padding-bottom: 3px; transition: color .3s, border-color .3s; }
.voices-nav .textlink:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Top bar ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; padding: 16px 26px; pointer-events: none; }
.top > * { pointer-events: auto; }
.top .left { display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--serif); font-size: 19px; }
.face { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 1.5px solid var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bg) 65%, transparent); background: var(--surface); flex: none; position: relative; z-index: 2; transform-origin: 50% 0; transition: transform .5s var(--ease), border-color .6s; }
.face.mark { display: grid; place-items: center; font: 500 22px/1 var(--serif); color: var(--accent); background: color-mix(in srgb, var(--bg) 70%, transparent); }
.brand:hover .face, .brand:focus-visible .face { color: var(--gold-2); border-color: var(--gold-2); }
.mono { width: 34px; height: 34px; border: 1px solid var(--accent); border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-size: 17px; color: var(--accent); transition: border-color .6s, color .6s; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(10px); }
.links { display: flex; gap: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); background: color-mix(in srgb, var(--bg) 72%, transparent); border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; backdrop-filter: blur(10px); cursor: pointer; transition: color .3s, border-color .3s; }
.pill:hover { color: var(--accent); border-color: var(--accent); }
/* The CVs sit in the bar on a wide screen and fold into a "CVs" menu on a narrow one. */
.cvs { position: relative; display: flex; }
.cvs-btn { display: none; }
.cvs-menu { display: flex; gap: 8px; }
.cv-link { text-decoration: none; }
.cv-link b { font: 500 15px/1 var(--serif); color: var(--accent); transition: color .3s; }
.cv-link i { font-style: normal; display: none; }
.cv-link.gen { --accent: var(--gold); }
.cv-link.teach { --accent: var(--teach); }
.cv-link.think { --accent: var(--think); }
.cv-link.make { --accent: var(--make); }
.burger { display: inline-flex; flex-direction: column; gap: 3px; width: 14px; }
.burger i { display: block; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .3s; }
.map-btn[aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.map-btn[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.map-btn[aria-expanded="true"] .burger i:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- Chapter dots ---------- */
.dots { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; }
.dots a { position: relative; display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); opacity: .5; transition: transform .35s var(--ease), background-color .35s, opacity .35s; }
.dots a[aria-current] { background: var(--accent); opacity: 1; transform: scale(1.55); }
.dots a span { position: absolute; right: 20px; top: 50%; transform: translateY(-50%) translateX(6px); font: 600 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; opacity: 0; transition: .25s; pointer-events: none; }
.dots a:hover span, .dots a:focus-visible span { opacity: 1; transform: translateY(-50%); }

/* ---------- Scrim, map and sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); z-index: 60; opacity: 0; transition: opacity .35s; }
.scrim.on { opacity: 1; }
.close { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--text-2); font-size: 24px; line-height: 1; cursor: pointer; border-radius: 50%; }
.close:hover { background: var(--line); color: var(--text); }

.map { position: fixed; top: 0; left: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); border-right: 1px solid var(--line); z-index: 70; display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .45s var(--ease); box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .7); }
.map.on { transform: none; }
.map-head { position: relative; padding: 24px 28px 6px; }
.map-head .eyebrow { margin: 6px 0 0; }
.map-body { overflow: auto; padding: 0 28px 28px; flex: 1; scrollbar-width: thin; }
.map-intro { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--text-2); margin: 10px 0 14px; }
.map-group { --c: var(--gold); margin: 0; padding: 16px 0 14px; border-top: 1px solid var(--line); }
.map-group[data-ch="teach"] { --c: var(--teach); }
.map-group[data-ch="think"] { --c: var(--think); }
.map-group[data-ch="make"]  { --c: var(--make); }
.map-ch { display: flex; align-items: baseline; gap: 12px; font: 500 30px/1.1 var(--serif); color: var(--text); text-decoration: none; }
.map-ch:hover { color: var(--c); }
.map-ch small { font: 600 11px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--c); }
.map-group ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
.map-group li button, .map-group li a { all: unset; cursor: pointer; display: block; padding: 5px 0; font-size: 15.5px; line-height: 1.35; color: var(--text-2); transition: color .25s; }
.map-group li button::before, .map-group li a::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--c); margin: 0 9px 2px 0; vertical-align: middle; opacity: .8; }
.map-group li button:hover, .map-group li a:hover, .map-group li button:focus-visible { color: var(--text); }

.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100%); background: var(--surface); border-left: 1px solid var(--line); z-index: 70; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .45s var(--ease); box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .7); }
.sheet.on { transform: none; }
.sheet-head { position: relative; padding: 26px 32px 16px; border-bottom: 1px solid var(--line); }
.sheet-head .eyebrow { margin: 0 0 10px; }
.sheet-head h3 { font: 500 clamp(26px, 4vw, 34px)/1.1 var(--serif); margin: 0; color: var(--text); padding-right: 44px; outline: none; }
.sheet-body { overflow: auto; padding: 22px 32px 32px; flex: 1; font-size: 16px; line-height: 1.6; scrollbar-width: thin; }
.sheet-body h4 { font: 600 12px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 28px 0 10px; }
.sheet-body h4:first-child { margin-top: 0; }
.sheet-body p { margin: 0 0 12px; }
.sheet-body .when { font: italic 17px/1.4 var(--serif); color: var(--text-2); }
.sheet-body .note { font-size: 14px; color: var(--text-3); }
.sheet-body p.note { font-size: 15px; color: var(--text-2); border-left: 2px solid var(--line-2); padding-left: 14px; }
.sheet-body .motto-line { font-family: var(--serif); font-size: 20px; color: var(--text-2); }
.sheet-body .motto-line em { color: var(--accent); }
.sheet-body blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 2px solid var(--accent); font: italic 19px/1.45 var(--serif); color: var(--text); }
.sheet-body blockquote cite { display: block; margin-top: 8px; font: 600 11px/1.5 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); font-style: normal; }
.sheet-body .ratings li b { font: 500 18px/1 var(--serif); color: var(--accent); margin-right: 8px; }
.sheet-body .pub { padding-left: 18px; text-indent: -18px; }
.sheet-body a { border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.sheet-body a.btn { border-bottom: 1px solid var(--accent); }
.sheet-body .list { list-style: none; margin: 0; padding: 0; }
.sheet-body .list li { position: relative; padding-left: 18px; margin-bottom: 9px; }
.sheet-body .list li::before { content: ""; position: absolute; left: 0; top: .66em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.sheet-body .years-list li b { font-family: var(--serif); font-weight: 500; color: var(--accent); margin-right: 6px; }
.sheet-body .refs li { margin-bottom: 14px; }
.sheet-body .pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-body .pills span { border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; font-size: 14px; color: var(--text-2); }
.sheet-body button.inline { all: unset; cursor: pointer; color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.sheet-body button.inline:hover { border-color: var(--accent); }
.sheet-body .more button:not(.inline):not(.btn) { all: unset; cursor: pointer; font: 600 12.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); border-bottom: 1px solid var(--line-2); padding-bottom: 4px; transition: .3s; }
.sheet-body .more button:not(.inline):not(.btn):hover { color: var(--accent); border-color: var(--accent); }
.sheet-body .more a:not(.btn) { font: 600 12.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); border-bottom: 1px solid var(--line-2); padding-bottom: 4px; }
.sheet-body .more a:not(.btn):hover { color: var(--accent); border-color: var(--accent); }
.sheet-foot { border-top: 1px solid var(--line); padding: 14px 32px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-where { font: 600 11.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.sheet-nav { display: flex; gap: 22px; }
.sheet-nav button:disabled { opacity: .3; cursor: default; pointer-events: none; }
.embed { position: relative; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #0b0a09; margin: 14px 0; }
.embed.vid { aspect-ratio: 16 / 9; }
.embed.doc { aspect-ratio: 3 / 4; max-height: 64vh; }
.embed.doc.tall { aspect-ratio: 3 / 4; max-height: 70vh; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.req { margin: 4px 0 0; }
.req-label { display: block; font: 600 11.5px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px; }
.req-label small { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; margin-left: 8px; }
.req-body { display: block; width: 100%; box-sizing: border-box; min-height: 210px; resize: vertical; font: 15.5px/1.55 var(--sans); color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
.req-body:focus { outline: none; border-color: var(--accent); }
.req-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 12px; }
.req-to { font-size: 14px; color: var(--text-2); }
.req-to .inline { color: var(--text); }

/* ---------- Welcome card ---------- */

/* ---------- Chapters ---------- */
.chapter { position: relative; min-height: 100vh; display: flex; align-items: center; padding: clamp(84px, 13vh, 120px) 0 clamp(56px, 10vh, 100px); }
.chapter > .wrap { width: min(1120px, 100% - 48px); }
.ch-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; margin-bottom: 30px; }
.stats { list-style: none; margin: 0; padding: 0; display: flex; gap: 34px; flex-wrap: wrap; }
.stats li button { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 110px; border-radius: 8px; transition: transform .35s var(--ease); }
.stats li button:hover { transform: translateY(-3px); }
.stats li button:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.stats b { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 6.5vh, 54px); line-height: 1; color: var(--accent); letter-spacing: -.02em; }
.stats span { font: 600 11.5px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); max-width: 160px; }
.stars { position: relative; display: inline-block; height: 44px; line-height: 0; padding-top: 10px; }
.stars-bg, .stars-fg { display: flex; gap: 3px; white-space: nowrap; }
.stars svg { width: 28px; height: 28px; fill: var(--line-2); flex: none; }
.stars-fg { position: absolute; left: 0; top: 10px; overflow: hidden; width: 0; }
.stars-fg svg { fill: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }


/* ---------- 1. Threshold ---------- */
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 36px; }
.whisper { margin: 30px 0 0; position: relative; }
.ainigma { background: none; border: 0; padding: 0 0 2px; font-family: var(--serif); font-size: 23px; color: var(--text-3); cursor: help; letter-spacing: .04em; border-bottom: 1px dotted var(--text-3); transition: .3s; }
.ainigma:hover, .ainigma:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
[role="tooltip"] { position: absolute; left: 0; top: calc(100% + 10px); width: max-content; max-width: 36ch; font-size: 14.5px; line-height: 1.5; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: .3s; z-index: 5; }
[role="tooltip"] em { color: var(--text); }
.ainigma:hover + [role="tooltip"], .ainigma:focus-visible + [role="tooltip"] { opacity: 1; transform: none; }
#solid { width: min(440px, 40vw, 52vh); height: min(440px, 40vw, 52vh); cursor: grab; touch-action: none; border-radius: 50%; }
#solid.dragging { cursor: grabbing; }
#solid:focus-visible { outline: 1px dashed var(--accent); outline-offset: 8px; }
.solid-label { margin: 0; font-family: var(--serif); font-size: 20px; color: var(--text-2); }
.solid-label span:first-child { color: var(--accent); }
.cue { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 45; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--accent); opacity: .7; transition: opacity .5s var(--ease); }
.cue svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; animation: cue 2.2s ease-in-out infinite; }
.cue:hover { opacity: 1; }
.cue.gone { opacity: 0; pointer-events: none; }
@keyframes cue { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }

/* ---------- 2. Start here: three doors, Teach, Think and Make ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
.menu { position: relative; list-style: none; margin: 0; padding: 0; }
.menu-row { display: flex; align-items: center; gap: 20px; padding: clamp(10px, 1.9vh, 18px) 0; border-top: 1px solid var(--line); }
.menu-row:last-child { border-bottom: 1px solid var(--line); }
.menu-main { all: unset; cursor: pointer; flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 2px 0; border-radius: 6px; transition: transform .35s var(--ease); }
.menu-main:hover, .menu-main:focus-visible { transform: translateX(6px); }
.menu-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.m-name { font: 500 clamp(21px, 3.3vh, 27px)/1.1 var(--serif); color: var(--text); transition: color .3s; }
.m-name::after { content: "→"; display: inline-block; margin-left: .35em; font-size: .7em; color: var(--accent); opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s; }
.menu-main:hover .m-name, .menu-main:focus-visible .m-name { color: var(--accent); }
.menu-main:hover .m-name::after, .menu-main:focus-visible .m-name::after { opacity: 1; transform: none; }
.m-desc { font-size: clamp(13px, 1.8vh, 14.5px); line-height: 1.45; color: var(--text-2); max-width: 44ch; }
.menu-row .btn { flex: none; }
.door .menu-main { text-decoration: none; color: inherit; }
.m-for { font: 600 11.5px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.door .m-name { font-size: clamp(28px, 4.6vh, 40px); }
.door .m-desc { max-width: 48ch; }
.door .btn { font-size: 12.5px; padding: 8px 14px; letter-spacing: .04em; }

/* ---------- 3. Teach ---------- */
.arc { margin: 0; }
.arc svg { width: 100%; overflow: visible; }
.arc path { fill: none; stroke: var(--accent); stroke-opacity: .5; stroke-width: 1.5; stroke-dasharray: 4 7; }
.arc .runner { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.arc .node { cursor: pointer; outline: none; }
.arc .node .hit { fill: transparent; }
.arc .node .pt { fill: var(--bg); stroke: var(--accent); stroke-width: 2; transition: fill .3s; }
.arc .node.is-on .pt, .arc .node:hover .pt, .arc .node:focus-visible .pt { fill: var(--accent); }
.arc .node text { font: 600 13px var(--sans); letter-spacing: .18em; text-transform: uppercase; fill: var(--text-2); text-anchor: middle; transition: fill .3s; }
.arc .node.is-on text { fill: var(--text); }
.arc-text { font-family: var(--serif); font-size: 24px; line-height: 1.35; color: var(--text); margin: 14px 0 0; min-height: 66px; transition: opacity .2s; }
.arc-text.swap { opacity: 0; }

.shelf { display: flex; align-items: flex-end; gap: 9px; height: 240px; padding: 0 0 14px 6px; border-bottom: 2px solid var(--line-2); perspective: 900px; }
.book, .case { --bk: var(--accent); position: relative; border: 0; color: #fff; writing-mode: vertical-rl; font-family: var(--serif); font-size: 18px; letter-spacing: .02em; padding: 16px 0; cursor: pointer; transition: transform .5s var(--ease), filter .4s; transform-origin: bottom; text-align: center; }
.book { width: 50px; height: 196px; border-radius: 3px 6px 6px 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--bk) 70%, #000) 0, var(--bk) 14%, color-mix(in srgb, var(--bk) 82%, #000) 100%); box-shadow: inset 2px 0 0 rgba(255, 255, 255, .18), 8px 0 16px -10px #000; }
.book:hover, .book.is-on, .case:hover, .case.is-on { transform: translateY(-14px) rotateX(-6deg); filter: brightness(1.12); }
.book.b-mac { --bk: #8A3B2C; height: 212px; }
.book.b-temp { --bk: #2F5A86; height: 200px; width: 48px; }
.book.b-poems { --bk: #4E7A5A; height: 186px; width: 46px; }
.book.b-poems.is-on { transform: translateY(-24px) rotateX(-8deg) rotateZ(-5deg); }
.book.b-gram { --bk: #6B5B3E; height: 172px; width: 38px; font-size: 15px; }
.book.b-phil { --bk: #7A6A2E; height: 160px; width: 30px; font-size: 14px; border-radius: 2px; padding: 12px 0; }
.case { width: 36px; height: 150px; border: 1px solid #5a5a66; border-radius: 2px; background: linear-gradient(90deg, #1c1c22, #3a3a46 45%, #1c1c22); color: #dcdce4; font: 600 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: 16px 0; }
.case::before { content: ""; position: absolute; left: 7px; right: 7px; top: 6px; height: 3px; background: #7a7a88; border-radius: 2px; }
.shelf-detail { min-height: 118px; margin-top: 14px; }
.shelf-detail .caption { font-family: var(--serif); font-size: 19px; line-height: 1.4; color: var(--text-2); margin: 0; animation: fadein .35s var(--ease); }
.shelf-detail .caption strong { color: var(--text); font-weight: 500; }
.shelf-detail .caption .textlink { margin-left: 10px; font-size: 11.5px; vertical-align: middle; }
@keyframes fadein { from { opacity: 0; } }
.fan { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.poem-card { all: unset; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; min-height: 118px; padding: 10px 10px 9px; border: 1px solid var(--line-2); border-left: 3px solid #4E7A5A; border-radius: 4px; background: linear-gradient(180deg, var(--surface), var(--bg-2)); box-sizing: border-box; animation: burst .75s var(--ease) both; transition: transform .35s var(--ease), border-color .3s; }
.poem-card:hover, .poem-card:focus-visible { transform: translateY(-4px); border-color: var(--accent); }
.poem-card .p-title { font: 500 14px/1.2 var(--serif); color: var(--text); }
.poem-card .p-poet { font-size: 12px; line-height: 1.3; color: var(--text-2); margin-top: 4px; }
.poem-card .p-where { font: 600 9.5px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-top: 8px; }
@keyframes burst { from { opacity: 0; transform: translate(-40px, -70px) scale(.25) rotate(-12deg); } 55% { opacity: 1; } to { opacity: 1; transform: none; } }

/* ---------- Seals (CV downloads) ---------- */
.seal { display: inline-flex; align-items: center; gap: 14px; color: var(--text); margin-top: 28px; }
.seal svg { width: 98px; height: 98px; overflow: visible; flex: none; }
.seal-ring { fill: color-mix(in srgb, var(--accent) 10%, transparent); stroke: var(--accent); stroke-width: 1.2; transition: fill .4s, stroke-width .4s; }
.seal-text { font: 600 9.5px var(--sans); letter-spacing: .3em; text-transform: uppercase; fill: var(--accent); transform-box: view-box; transform-origin: 60px 60px; animation: spin 30s linear infinite; }
.seal-letter { font: 500 44px var(--serif); fill: var(--text); text-anchor: middle; }
.seal:hover .seal-ring { fill: color-mix(in srgb, var(--accent) 24%, transparent); stroke-width: 2; }
.seal-label { font: 600 12px/1.5 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); }
.seal-label small { display: block; letter-spacing: .06em; text-transform: none; font-weight: 400; font-size: 13.5px; color: var(--text-3); }

/* ---------- 4. Think ---------- */
.think-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
.guides-bar { margin-top: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.guides-toggle { all: unset; cursor: pointer; display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 0; box-sizing: border-box; }
.guides-toggle .eyebrow { margin: 0; }
.guides-toggle .g-list { font: italic 500 15px var(--serif); color: var(--text-2); }
.guides-toggle .g-arrow { margin-left: auto; color: var(--accent); font-size: 18px; transition: transform .35s var(--ease); }
.guides-toggle:hover .g-list, .guides-toggle:focus-visible .g-list { color: var(--text); }
.guides-toggle[aria-expanded="true"] .g-arrow { transform: rotate(180deg); }
.guides-wrap { padding: 6px 0 16px; }
.sky { position: relative; height: clamp(190px, 32vh, 560px); }
#sky { width: 100%; height: 100%; overflow: visible; display: block; }
#sky line { stroke: var(--accent); stroke-opacity: .22; stroke-width: 1; transition: stroke-opacity .3s, stroke-width .3s; }
#sky line.lit { stroke-opacity: .95; stroke-width: 1.6; }
#sky .node { cursor: pointer; outline: none; }
#sky .hit { fill: transparent; }
#sky .glow { fill: var(--accent); opacity: .12; transform-box: fill-box; transform-origin: center; transition: opacity .3s, transform .3s; }
#sky .dot { fill: var(--text); transition: fill .3s; animation: twinkle 5s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
#sky .node:hover .glow, #sky .node.lit .glow, #sky .node.near .glow, #sky .node.sel .glow, #sky .node:focus-visible .glow { opacity: .4; transform: scale(1.7); }
#sky .node:hover .dot, #sky .node.lit .dot, #sky .node.sel .dot { fill: var(--accent); }
#sky text { font: 500 22px var(--serif); fill: var(--text-2); transition: fill .3s; pointer-events: none; }
#sky .node:hover text, #sky .node.lit text, #sky .node.near text, #sky .node.sel text { fill: var(--text); }
#sky .node.big text { font-size: 28px; }

.lectures { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lecture { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%), linear-gradient(160deg, var(--surface), var(--bg-2)); transition: border-color .4s; }
.lecture:hover { border-color: var(--accent); }
.lecture .play { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--accent); background: color-mix(in srgb, var(--bg) 60%, transparent); cursor: pointer; transition: transform .35s var(--ease), background-color .3s; }
.lecture .play span { position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%); width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 14px; border-color: transparent transparent transparent var(--accent); }
.lecture:hover .play { transform: translate(-50%, -50%) scale(1.08); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.lecture .l-cap { position: absolute; left: 12px; right: 12px; bottom: 9px; margin: 0; font-size: 11.5px; line-height: 1.35; color: var(--text-2); pointer-events: none; }
.lecture .l-cap strong { display: block; font: 500 15px/1.15 var(--serif); color: var(--text); margin-bottom: 2px; }
.lecture iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.lecture.playing .play, .lecture.playing .l-cap { display: none; }

.guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.guide { all: unset; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 3 / 4.2; border: 1px solid var(--line-2); border-top: 4px solid var(--accent); border-radius: 4px 4px 6px 6px; background: linear-gradient(180deg, var(--surface), var(--bg-2)); padding: 10px 10px 9px; box-sizing: border-box; overflow: hidden; transition: transform .4s var(--ease), border-color .3s, box-shadow .4s; box-shadow: 0 12px 22px -16px #000; }
@keyframes pop { from { opacity: 0; transform: translateY(44px) scale(.5) rotate(-8deg); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
.guide:hover, .guide:focus-visible { transform: translateY(-6px) rotate(-1deg); border-color: var(--accent); box-shadow: 0 18px 24px -16px #000; }
.guide .g-code { font: 600 10px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.guide .g-title { font: 500 14px/1.2 var(--serif); color: var(--text); margin: 6px 0; }
.guide .g-year { font: 600 10px var(--sans); letter-spacing: .12em; color: var(--text-3); }
.row-end { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- 5. Make ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.svc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 20px; display: flex; flex-direction: column; transition: border-color .4s, opacity 1s var(--ease), transform 1s var(--ease); }
.svc:hover { border-color: var(--accent); }
.svc-vis { height: 108px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.svc h3 { font: 500 27px/1.1 var(--serif); color: var(--text); margin: 0; }
.svc-sub { font: 600 11px/1.5 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); margin: 6px 0 12px; }
.deliv { list-style: none; margin: 0 0 18px; padding: 0; flex: 1; }
.deliv li { position: relative; padding-left: 16px; margin-bottom: 8px; font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
.deliv li::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.svc-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.svc-actions .btn { font-size: 13.5px; padding: 9px 16px; }
.quill { width: 96px; height: 96px; }
.quill path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 7s var(--ease) infinite; }
.quill > path:nth-of-type(2) { animation-delay: .4s; }
.quill > path:nth-of-type(3) { animation-delay: .8s; }
.quill .ghost path { animation: none; stroke-dashoffset: 0; opacity: .18; }
@keyframes draw { 0% { stroke-dashoffset: 420; } 40% { stroke-dashoffset: 0; } 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -420; } }
.typer { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.35; color: var(--text); text-align: center; max-width: 22ch; display: block; }
.caret { display: inline-block; width: 1px; height: 1.1em; background: var(--accent); vertical-align: -3px; margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { to { visibility: hidden; } }
.blocks { position: relative; width: 140px; height: 90px; display: block; transform: scale(.85); }
.blocks i { position: absolute; left: 0; top: 0; border-radius: 4px; background: var(--accent); opacity: .85; transition: transform .9s var(--ease), width .9s var(--ease), height .9s var(--ease); }
.blocks i:nth-child(even) { opacity: .45; }
.tetractys { width: 104px; height: 96px; }
.tetractys circle { fill: var(--accent); animation: breathe 4.5s ease-in-out infinite; }
.tetractys circle:nth-child(2n) { animation-delay: -1.5s; }
.tetractys circle:nth-child(3n) { animation-delay: -3s; }
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- Compact chapters: Teach, Think and Make fit one screen; the detail pops out ---------- */
.chapter.compact { padding: clamp(76px, 11vh, 110px) 0 clamp(44px, 7vh, 72px); }
.compact .ch-head { align-items: flex-start; margin-bottom: clamp(10px, 2.2vh, 22px); gap: 28px; }
.compact .ch-lead { flex: 1 1 440px; min-width: 0; }
.compact .ch-side { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: clamp(12px, 1.4vw, 24px); flex: 0 1 auto; max-width: 56%; }
.compact .ch-side .seal.mini { padding-left: clamp(12px, 1.4vw, 24px); border-left: 1px solid var(--line); }
.compact .display { font-size: clamp(52px, min(9vw, 13vh), 150px); }
.compact .ch-lead .voices { margin: clamp(10px, 1.6vh, 16px) 0 0; max-width: 74ch; }
.compact .voice p { font-size: clamp(16px, 2.1vh, 20px); }
#teach .voice p, #make .voice p { font-size: clamp(16px, 2.1vh, 23px); }
.compact .voice figcaption { margin-top: 8px; }
.compact .voices-nav { margin-top: 10px; }
.compact .stats { gap: clamp(12px, 1.4vw, 22px); justify-content: flex-end; flex-wrap: wrap; }
.compact .stats b { font-size: clamp(34px, 5.2vh, 46px); }
#teach .stats b { font-size: clamp(34px, 5.4vh, 60px); }
.compact .stats span { max-width: 124px; font-size: 11px; }
.compact .stats li button { min-width: 96px; }
.compact .stars { height: 38px; padding-top: 8px; }
.compact .stars svg { width: 24px; height: 24px; }
.compact .stars-fg { top: 8px; }
.side-note { margin: 0; max-width: 30ch; text-align: right; font: italic 500 clamp(16px, 2.1vh, 19px)/1.35 var(--serif); color: var(--text-2); }
.seal.mini { margin-top: 0; gap: 10px; }
.seal.mini svg { width: 62px; height: 62px; }
.seal.mini .seal-label { font-size: 11px; }
.seal.mini .seal-label small { font-size: 12px; }
.compact .index { margin-bottom: clamp(14px, 2.6vh, 28px); }
.compact .grid-2 { gap: 40px; }
.compact .arc svg { height: clamp(120px, calc(44vh - 170px), 400px); }
.compact .arc-text { font-size: clamp(17px, 2.5vh, 26px); min-height: 2.9em; margin-top: 8px; }
.compact .arc .more { margin-top: 8px; }
.compact .shelf { height: clamp(140px, calc(56vh - 230px), 440px); padding-bottom: 10px; gap: clamp(7px, 1vh, 12px); }
.compact .book { height: 82%; width: clamp(40px, 5.6vh, 72px); font-size: clamp(14px, 2vh, 24px); }
.compact .book.b-mac { height: 88%; }
.compact .book.b-temp { height: 83%; width: clamp(38px, 5.4vh, 58px); }
.compact .book.b-poems { height: 78%; width: clamp(36px, 5.2vh, 56px); }
.compact .book.b-gram { height: 72%; width: clamp(30px, 4.4vh, 46px); font-size: clamp(12px, 1.8vh, 18px); }
.compact .book.b-phil { height: 67%; width: clamp(24px, 3.4vh, 36px); font-size: clamp(11px, 1.6vh, 16px); }
.compact .case { height: 63%; width: clamp(30px, 4.2vh, 44px); }
.compact .shelf-detail { min-height: 0; margin-top: 10px; }
.compact .shelf-detail .caption { font-size: clamp(15px, 2.2vh, 22px); }
.compact .poem-card { min-height: 92px; padding: 8px 8px 7px; }
.compact .sky-wrap .eyebrow, .compact .think-side .eyebrow { margin-bottom: clamp(8px, 1.4vh, 14px); }
.compact .lecture .play { width: 42px; height: 42px; }
.compact .lecture .play span { border-width: 7px 0 7px 12px; }
.compact .lecture .l-cap { font-size: 10.5px; left: 10px; right: 10px; bottom: 7px; }
.compact .lecture .l-cap strong { font-size: 13px; }
.compact .think-side .hint { margin-top: 10px; }
.compact .svc { padding: clamp(18px, 2.4vh, 26px) clamp(18px, 1.6vw, 26px) clamp(16px, 2vh, 22px); }
.compact .svc-body { position: relative; height: clamp(96px, calc(30vh - 115px), 300px); margin-bottom: clamp(10px, 1.4vh, 16px); }
.compact .svc-vis { position: absolute; inset: 0; height: auto; margin: 0; transition: opacity .35s var(--ease); }
.compact .deliv { position: absolute; inset: 0; margin: 0; flex: none; overflow: hidden; opacity: 0; transition: opacity .35s var(--ease); }
.compact .deliv li { font-size: clamp(12.5px, 1.5vh, 15.5px); line-height: 1.35; margin-bottom: 5px; padding-left: 12px; }
.compact .deliv li::before { top: .5em; width: 4px; height: 4px; }
@media (hover: hover) {
  .compact .svc:hover .svc-vis, .compact .svc:focus-within .svc-vis { opacity: 0; }
  .compact .svc:hover .deliv, .compact .svc:focus-within .deliv { opacity: 1; }
}
.compact .svc h3 { font-size: clamp(19px, 2.6vh, 28px); }
.compact .svc-sub { margin: 4px 0 clamp(10px, 1.4vh, 16px); font-size: clamp(10.5px, 1.2vh, 12px); }
.compact .svc-actions .btn { font-size: clamp(12.5px, 1.4vh, 14.5px); padding: 8px 13px; }
.compact .quill { width: clamp(70px, 9.5vh, 104px); height: clamp(70px, 9.5vh, 104px); }
.compact .typer { font-size: clamp(15px, 1.9vh, 20px); max-width: 20ch; }
.compact .blocks { transform: scale(.72); }
.compact .tetractys { width: clamp(78px, 10vh, 110px); height: clamp(72px, 9.3vh, 102px); }
.services { gap: clamp(14px, 1.6vw, 24px); }

/* ---------- 6. So far ---------- */

/* ---------- 7. Write ---------- */
.mail { display: inline-block; font: 500 clamp(22px, min(3.4vw, 4.6vh), 40px) var(--serif); color: var(--text); margin-top: clamp(14px, 2.4vh, 28px); border-bottom: 1px solid var(--accent); transition: color .3s; }
.mail:hover { color: var(--accent); }
.mail-row { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; }
#write .display { font-size: clamp(52px, min(9vw, 13vh), 130px); }
.copy { all: unset; cursor: pointer; font: 600 11.5px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 13px; transition: color .3s, border-color .3s; }
.copy:hover, .copy:focus-visible { color: var(--accent); border-color: var(--accent); }
#write .index { margin: 26px 0 0; }
.seals { display: flex; gap: clamp(18px, 2.4vw, 34px); flex-wrap: wrap; margin-top: 6px; }
.seals .seal { margin-top: clamp(10px, 1.8vh, 20px); gap: 10px; }
.seals .seal svg { width: clamp(60px, 8.5vh, 90px); height: clamp(60px, 8.5vh, 90px); }
.seals .seal-label { font-size: 11px; }
.write-links { margin: clamp(18px, 3.2vh, 40px) 0 0; font-size: 15px; color: var(--text-3); line-height: 2; }
.write-links a { color: var(--text-2); border-bottom: 1px solid var(--line-2); transition: .3s; }
.write-links a:hover { color: var(--accent); border-color: var(--accent); }

footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--text-3); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.motto { all: unset; cursor: pointer; font: italic 18px var(--serif); color: var(--text-2); border-bottom: 1px dotted var(--text-3); transition: .3s; }
.motto:hover, .motto:focus-visible { color: var(--accent); border-color: var(--accent); }

/* ---------- Theme change ---------- */
.theming .pill, .theming .mono, .theming .svc, .theming .sheet, .theming .map, .theming footer { transition: background-color .8s, color .8s, border-color .8s; }

/* ---------- Bigger screens ---------- */
@media (min-width: 1700px) {
  .wrap, .chapter > .wrap { width: min(1340px, 100% - 96px); }
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .cvs-btn { display: inline-flex; }
  .cvs-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); flex-direction: column; gap: 4px; padding: 8px; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 40px -24px #000; }
  .cvs.on .cvs-menu { display: flex; }
  .cvs-menu .pill { background: transparent; border-color: transparent; backdrop-filter: none; justify-content: flex-start; padding: 10px 12px; }
  .cvs-menu .pill:hover { border-color: var(--line-2); }
  .cvs-menu .cv-link i { display: inline; }
}
@media (max-width: 1000px) {
  .services { grid-template-columns: 1fr 1fr; }
  .compact .svc-body { height: auto; }
  .compact .svc-vis { position: static; height: 84px; }
  .compact .deliv { position: static; opacity: 1; margin: 10px 0 0; }
}
@media (max-width: 900px) {
  .hero-grid, .start-grid, .grid-2, .think-grid { grid-template-columns: minmax(0, 1fr); }
  .compact .ch-head { flex-direction: column; }
  .compact .ch-side { justify-content: flex-start; max-width: none; }
  .compact .stats { justify-content: flex-start; }
  .side-note { text-align: left; }
  .compact .svc-body { height: auto; }
  .compact .svc-vis { position: static; height: 84px; }
  .compact .deliv { position: static; opacity: 1; margin: 10px 0 0; }
  .solid-wrap { order: -1; }
  #solid { width: min(240px, 56vw); height: min(240px, 56vw); }
  .think-grid { gap: 36px; }
  .lectures { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .chapter { padding: 96px 0 72px; }
  .top { padding: 12px 14px; }
  .brand .name { display: none; }
  .pill .lbl { display: none; }
  .pill { padding: 10px 12px; }
  .map-btn { gap: 0; }
  .dots { right: 10px; gap: 12px; }
  .dots a span { display: none; }
  .stats { gap: 22px; }
  .stats b { font-size: 40px; }
  .ch-head { margin-bottom: 24px; }
  .index { gap: 6px 16px; margin-bottom: 32px; }
  .m-name { font-size: 22px; }
  .door .m-name { font-size: 26px; }
  .face { width: 40px; height: 40px; }
  .voice p { font-size: 18px; }
  .voices { margin-top: -10px; }
  .m-desc { font-size: 13.5px; }
  .menu-row { gap: 12px; padding: 14px 0; }
  .menu-row .btn { font-size: 13px; padding: 8px 13px; }
  .shelf { height: 206px; gap: 7px; }
  .book { height: 170px !important; width: 42px !important; font-size: 15px; }
  .book.b-gram, .book.b-phil { width: 32px !important; height: 150px !important; font-size: 13px; }
  .case { height: 140px !important; width: 32px !important; }
  .fan { grid-template-columns: repeat(3, 1fr); }
  .services { grid-template-columns: 1fr; }
  .lectures { grid-template-columns: 1fr; }
  .guides-toggle { flex-wrap: wrap; gap: 8px 14px; }
  .compact .shelf { height: 206px; }
  .lecture .l-cap { font-size: 12.5px; }
  .lecture .l-cap strong { font-size: 16px; }
  .guides { grid-template-columns: repeat(3, 1fr); }
  .guide .g-title { font-size: 13px; }
  .seals { gap: 18px; }
  /* The constellation keeps its size and scrolls sideways on a phone, so the stars stay tappable. */
  .sky { height: auto; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 -24px; padding: 0 24px; }
  .sky::-webkit-scrollbar { display: none; }
  #sky { width: 720px; height: auto; max-width: none; }
  .hint .m-only { display: inline; }
  .map { width: 100%; }
  .map-group ul { grid-template-columns: 1fr; }
  .sheet { width: 100%; }
  .sheet-head { padding: 22px 20px 14px; }
  .sheet-body { padding: 18px 20px 28px; }
  .sheet-foot { padding: 12px 20px; }
  .embed.doc { max-height: 56vh; }
  .close { width: 44px; height: 44px; font-size: 30px; right: 6px; top: 6px; }
  .sheet-head h3 { padding-right: 48px; }
  .sheet-body { overflow-wrap: anywhere; }
  .sheet-body img, .sheet-body iframe { max-width: 100%; }
  .cue { left: auto; right: 14px; bottom: 16px; transform: none; }
}
@media (hover: none) {
  .m-name::after { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cue svg { animation: none; }
}

/* ---------- Reading layer: the long pieces open as a centred page, not a drawer ---------- */
.sheet.read { left: 50%; right: auto; width: min(980px, 100%); border-left: 1px solid var(--line); border-right: 1px solid var(--line); transform: translate(-50%, 28px); opacity: 0; transition: transform .5s var(--ease), opacity .4s var(--ease); box-shadow: 0 0 90px -20px rgba(0, 0, 0, .8); }
.sheet.read.on { transform: translate(-50%, 0); opacity: 1; }
.sheet.read .sheet-head { padding: 44px clamp(24px, 9vw, 110px) 22px; }
.sheet.read .sheet-head h3 { font-size: clamp(32px, 4.6vw, 46px); max-width: 22ch; }
.sheet.read .sheet-body { padding: 26px clamp(24px, 9vw, 110px) 80px; font-size: 17.5px; line-height: 1.68; }
.sheet.read .sheet-body > :not(.quotes):not(.contents):not(.embed) { max-width: 66ch; }
.sheet.read .sheet-body > p:first-of-type:not(.when):not(.note) { font-size: 20.5px; line-height: 1.55; color: var(--text); }
.sheet.read .sheet-body p { margin-bottom: 16px; }
.sheet.read .sheet-body .when { font-size: 19px; }
.sheet.read .sheet-body h4 { font: 500 24px/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--text); margin: 40px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.sheet.read .sheet-body h4:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.sheet.read .sheet-foot { padding: 14px clamp(24px, 9vw, 110px); }

/* The contents line at the top of a long piece */
.contents { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 30px; padding: 0 0 20px; border-bottom: 1px solid var(--line); counter-reset: contents; }
.contents button { all: unset; cursor: pointer; font: 600 11.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); padding: 2px 0; border-bottom: 1px solid transparent; }
.contents button::before { counter-increment: contents; content: counter(contents, decimal-leading-zero) "\2002"; color: var(--accent); }
.contents button:hover, .contents button:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }

/* Quotations as cards */
.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 14px; margin: 0 0 26px; }
.sheet-body .quotes blockquote { margin: 0; padding: 22px 22px 20px; border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 14px; background: var(--bg-2); font-size: 17px; line-height: 1.5; display: flex; flex-direction: column; }
.sheet-body .quotes blockquote::before { content: "\201C"; display: block; font: 500 46px/.5 var(--serif); color: var(--accent); opacity: .85; margin: 10px 0 12px; }
.sheet-body .quotes blockquote cite { margin-top: auto; padding-top: 14px; }

/* Student ratings as bars */
.sheet-body .ratings { display: grid; gap: 12px; margin: 0 0 28px; }
.sheet-body .ratings li { display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; align-items: center; padding-left: 0; margin: 0; }
.sheet-body .ratings li::before { content: none; }
.sheet-body .ratings li b { grid-row: 1 / 3; font-size: 22px; margin: 0; }
.sheet-body .ratings li::after { content: ""; grid-column: 2; height: 4px; margin-top: 7px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--gold-2)) no-repeat, var(--line); background-size: calc(var(--v, 0) * 100%) 100%, 100% 100%; transition: background-size .9s var(--ease); }

@media (max-width: 640px) {
  .sheet.read .sheet-head { padding: 26px 20px 14px; }
  .sheet.read .sheet-head h3 { font-size: 30px; }
  .sheet.read .sheet-body { padding: 18px 20px 56px; font-size: 17px; }
  .sheet.read .sheet-foot { padding: 12px 20px; }
  .sheet-body .quotes blockquote { padding: 18px 18px 16px; font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet.read, .sheet-body .ratings li::after { transition: none; }
}

/* ---------- Round B: the drawer reshaped ---------- */
.sheet:not(.read) .sheet-head { padding: 30px 40px 18px; }
.sheet:not(.read) .sheet-body { padding: 24px 40px 44px; font-size: 16.5px; line-height: 1.62; }
.sheet:not(.read) .sheet-foot { padding: 14px 40px; }
.sheet:not(.read) .sheet-body p.lede { font-size: 19px; line-height: 1.5; color: var(--text); margin-bottom: 18px; }

/* The date line as chips */
.sheet-body .when.chips { display: flex; flex-wrap: wrap; gap: 6px; font: 600 11px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin: 0 0 20px; }
.sheet-body .when.chips span { border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 11px; }
.sheet-body .when.chips span:first-child { border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); }

/* Big figures */
.sheet-body .facts { list-style: none; margin: 0 0 24px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 14px; }
.sheet-body .facts li { margin: 0; padding: 0; }
.sheet-body .facts b { display: block; font: 500 34px/1 var(--serif); color: var(--accent); margin-bottom: 7px; }
.sheet-body .facts span { display: block; font: 600 10.5px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }

/* The board: the word that went up before the lesson */
.sheet-body .board { position: relative; margin: 0 0 22px; padding: 36px 24px 28px; border-radius: 12px; background: #141a16; border: 1px solid #263029; box-shadow: inset 0 0 70px rgba(0, 0, 0, .5); text-align: center; font: 600 clamp(26px, 5vw, 38px)/1.15 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #ECE7DA; text-shadow: 0 0 8px rgba(255, 255, 255, .18); }
.sheet-body .board::before { content: "On the board"; position: absolute; top: 10px; left: 14px; font: 600 9.5px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: rgba(236, 231, 218, .38); text-shadow: none; }
.sheet-body .board.quote { font: italic 500 clamp(24px, 4.6vw, 32px)/1.2 var(--serif); letter-spacing: 0; text-transform: none; }

@media (max-width: 640px) {
  .sheet:not(.read) .sheet-head { padding: 24px 22px 14px; }
  .sheet:not(.read) .sheet-body { padding: 18px 22px 36px; font-size: 16px; }
  .sheet:not(.read) .sheet-foot { padding: 12px 22px; }
  .sheet-body .facts b { font-size: 28px; }
}

/* ---------- Round C: covers, a timeline, a video ---------- */
/* The guide cards on the shelf wear their own first page */
.guide .g-cover { display: block; flex: 1 1 0; min-height: 0; width: calc(100% + 20px); margin: -10px -10px 8px; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line-2); background: #fff; }

/* The five guides as covers in the pop-up */
.sheet-body .covers { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 108px), 1fr)); gap: 14px 12px; }
.sheet-body .covers li { margin: 0; padding: 0; }
.sheet-body .covers button { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.sheet-body .covers img, .sheet-body .cover-link img { display: block; width: 100%; height: auto; aspect-ratio: 560 / 793; object-fit: cover; object-position: top; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; box-shadow: 0 12px 22px -16px #000; transition: transform .4s var(--ease), border-color .3s, box-shadow .4s; }
.sheet-body .covers button:hover img, .sheet-body .covers button:focus-visible img, .sheet-body .cover-link:hover img { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 26px -16px #000; }
.sheet-body .covers span { font: 500 13px/1.3 var(--serif); color: var(--text-2); }
.sheet-body .covers button:hover span { color: var(--text); }
.sheet-body .cover-link { display: block; width: min(200px, 60%); margin: 4px 0 18px; border: 0; }

/* Conference papers down the years */
.sheet-body .timeline { list-style: none; margin: 0 0 10px; padding: 0; }
.sheet-body .timeline li { position: relative; display: grid; grid-template-columns: 56px 1fr; column-gap: 30px; padding: 0 0 18px; margin: 0; }
.sheet-body .timeline li::before { content: ""; position: absolute; left: 70px; top: 10px; bottom: -6px; width: 1px; background: var(--line-2); }
.sheet-body .timeline li:last-child::before { display: none; }
.sheet-body .timeline li::after { content: ""; position: absolute; left: 66.5px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
.sheet-body .timeline b { font: 500 17px/1.3 var(--serif); color: var(--accent); text-align: right; }
.sheet-body .timeline b.again { visibility: hidden; }
.sheet-body .timeline b { grid-column: 1; grid-row: 1; }
.sheet-body .timeline .t-title { grid-column: 2; grid-row: 1; display: block; color: var(--text); }
.sheet-body .timeline .t-where { grid-column: 2; grid-row: 2; display: block; font-size: 14px; line-height: 1.45; color: var(--text-3); margin-top: 3px; }

/* A video that plays in place */
.embed video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }

@media (max-width: 640px) {
  .sheet-body .timeline li { grid-template-columns: 44px 1fr; column-gap: 24px; }
  .sheet-body .timeline li::before { left: 55px; }
  .sheet-body .timeline li::after { left: 51.5px; }
  .sheet-body .timeline b { font-size: 15px; }
  .sheet-body .covers { grid-template-columns: repeat(3, 1fr); gap: 12px 10px; }
  .sheet-body .covers span { font-size: 12px; }
}

/* ---------- Push 2: the first screen is the funnel ---------- */
.solid-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; justify-self: center; }
.solid-hint { margin: 0; font: 600 11px/1.6 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); text-align: center; }
.solid-hint em { font-style: normal; color: var(--text-2); }
.hero-id { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.hero-me { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 210px; }
.hero-face { display: block; width: 210px; height: 210px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); box-shadow: 0 24px 40px -26px #000, 0 0 0 8px color-mix(in srgb, var(--accent) 10%, transparent); }
.hero-me .btn { font-size: 13px; padding: 9px 16px; margin-top: 40px; }
.hero-me .index { margin: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
.hero-me .index button { font-size: 11px; }
.hero .display { font-size: clamp(48px, min(7.5vw, 11vh), 96px); }
.hero .line { max-width: 36ch; }
.hero .whisper { margin-top: 14px; }
.hero-doors { margin-top: clamp(16px, 2.6vh, 28px); }
.hero-doors .menu-row { gap: 16px; padding: clamp(8px, 1.5vh, 14px) 0; }
.hero-doors .door .m-name { font-size: clamp(22px, 3.4vh, 30px); }
.hero-doors .m-for { font-size: 11px; }
.door-acts { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.hero-doors .btn { font-size: 12px; padding: 7px 12px; letter-spacing: .04em; }

/* Proof beside the asks */
.proof { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font: italic 13.5px/1.5 var(--serif); color: var(--text-3); }
.proof b { font-style: normal; font-weight: 500; font-size: 15px; color: var(--accent); }
.proof small { display: block; margin-top: 4px; font: 600 10px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-style: normal; }

/* The years, in brief, inside About me */
.sheet-body .timeline.brief li { padding-bottom: 12px; }
.sheet-body .timeline.brief .t-title { font-weight: 500; }

@media (max-width: 900px) {
  .hero-id { grid-template-columns: 1fr; gap: 18px; }
  .hero-me { flex-direction: row; flex-wrap: wrap; align-items: center; width: auto; gap: 10px 16px; }
  .hero-face { width: 150px; height: 150px; }
  .hero-me .index { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; flex-basis: 100%; }
  .solid-hint { display: none; }
}
@media (max-width: 640px) {
  .hero-doors .menu-row { flex-wrap: wrap; gap: 10px; padding: 12px 0; }
  .door-acts { flex-basis: 100%; justify-content: flex-start; }
  .hero-doors .door .m-name { font-size: 24px; }
}

/* ---------- Push 3: rates, the form that leaves a trace, booking ---------- */
.svc .rate { margin: -6px 0 12px; font: italic 500 13.5px/1.45 var(--serif); color: var(--text-2); }
.sheet-body .rate { font: italic 16px/1.45 var(--serif); color: var(--text-2); border-left: 2px solid var(--accent); padding-left: 12px; margin: 0 0 16px; }
.req-from { display: block; width: 100%; box-sizing: border-box; font: 15.5px/1.4 var(--sans); color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; }
.req-from:focus { outline: none; border-color: var(--accent); }
.req-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* The booking calendar is a white Google page; in dark mode its colours are inverted so that it sits in the dark drawer */
:root:not([data-theme="light"]) .embed.doc.cal { background: #fff; }
:root:not([data-theme="light"]) .embed.doc.cal iframe { filter: invert(.92) hue-rotate(180deg); }
/* The filter inverts the small profile photo inside the frame too, so the real one is laid over it */
:root:not([data-theme="light"]) .embed.doc.cal::after { content: ""; position: absolute; left: 8px; top: 4px; width: 42px; height: 42px; border-radius: 50%; background: #141414 url(../headshot.jpg) center / cover; pointer-events: none; }
@media (max-width: 640px) { :root:not([data-theme="light"]) .embed.doc.cal::after { left: 12px; top: 60px; width: 48px; height: 48px; } }
/* Tall enough that the booking page needs no scrollbar of its own; the drawer scrolls instead */
.embed.doc.cal { aspect-ratio: auto; height: 660px; max-height: none; }
@media (max-width: 640px) { .embed.doc.cal { height: 1130px; } }

/* ==========================================================
   The Cabinet, push 1: structure only.
   Each section opens with a full-screen case (.cab): one object, one title, one sentence, one way on.
   The home case is the first of them. Cases follow the theme.
   ========================================================== */
.chapter.cabinet { display: block; min-height: 0; padding: 0; }
.cab { position: relative; background: color-mix(in srgb, #000 58%, transparent); }
:root[data-theme="light"] .cab { background: color-mix(in srgb, var(--surface) 62%, transparent); }
.cab-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(28px, 4vw, 64px); }
.cab-grid.obj-wide { grid-template-columns: .85fr 1.15fr; }
.cab-grid.obj-wider { grid-template-columns: .6fr 1.4fr; }
.cab-words { min-width: 0; }
.cab-object { min-width: 0; }
.cab .eyebrow { margin-bottom: clamp(10px, 1.8vh, 18px); }
.cab .line { max-width: 34ch; }
.cab-down { margin-top: clamp(18px, 3.4vh, 34px); }
.cab-down span { display: inline-block; margin-left: 4px; }
.cab-detail .grid-2 { grid-template-columns: minmax(0, 560px); }
.cab-detail .think-grid { grid-template-columns: minmax(0, 760px); }

/* The home case */
.home-id { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 24px); }
.home-id .hero-face { width: clamp(64px, 7.5vw, 104px); height: auto; aspect-ratio: 1; flex: none; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 10%, transparent); }
.home .display { font-size: clamp(44px, min(7vw, 10.5vh), 92px); }
.home .line { max-width: 36ch; margin-top: clamp(12px, 2.2vh, 22px); }
.home .whisper { margin-top: clamp(8px, 1.6vh, 16px); }
.cab-doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: clamp(16px, 3vh, 30px); }
.cab-door { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px 13px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 12px; color: var(--text); transition: transform .35s var(--ease), border-color .3s, background-color .3s; }
.cab-door:hover, .cab-door:focus-visible { transform: translateY(-3px); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cab-door b { font: 500 clamp(22px, 3.2vh, 28px)/1.05 var(--serif); }
.cab-door b::after { content: " ↓"; font-size: .62em; color: var(--accent); }
.cab-door small { font: 600 10px/1.35 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.cab-write { margin: clamp(14px, 2.4vh, 22px) 0 0; }
.home #solid { width: min(430px, 36vw, 54vh); height: min(430px, 36vw, 54vh); }

/* The section cases */
.cab .sky-wrap .eyebrow { margin-bottom: 12px; }
.cab .sky { height: auto; aspect-ratio: 1040 / 450; }
.cab .shelf { height: clamp(180px, 40vh, 360px); }
.cab .shelf-detail { min-height: 3.2em; }
.cab-placeholder { width: min(320px, 60vw, 44vh); aspect-ratio: 1; margin-inline: auto; border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); }

@media (max-width: 900px) {
  .cab-grid, .cab-grid.obj-wide, .cab-grid.obj-wider { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .cab-object { order: -1; }
  .home #solid { width: min(220px, 52vw, 22svh); height: min(220px, 52vw, 22svh); }
  .cab .shelf { height: 206px; }
}
@media (max-width: 640px) {
  .cab.home .cab-grid { gap: 10px; }
  .home .solid-wrap { gap: 4px; }
  .home .solid-label { font-size: 16px; }
  .home-id .hero-face { width: 58px; }
  .home .display { font-size: clamp(38px, 11.5vw, 46px); }
  .home .line { font-size: 17px; line-height: 1.3; margin-top: 10px; }
  .home .whisper { margin-top: 6px; }
  .home .ainigma { font-size: 19px; }
  .cab-doors { grid-template-columns: 1fr; gap: 7px; margin-top: 12px; }
  .cab-door { padding: 8px 12px 9px; gap: 2px; }
  .cab-door b { font-size: 22px; }
  .cab-door small { font-size: 9.5px; letter-spacing: .1em; }
  .cab-write { margin-top: 12px; }
  .cab .sky { aspect-ratio: auto; }
}

/* ==========================================================
   The Cabinet, take three.
   The page itself does not scroll. <main> is a vertical stack of five full-screen cabinets that snaps:
   home, Teach, Think, Make, Write to me. One is on screen at a time.
   Each of Teach, Think and Make has a detail: a side room (.detail) that slides in from the right
   when More is pressed, while the stack slides away to the left. A back button reverses it.
   ========================================================== */
html, body { height: 100%; overflow: hidden; }
main { height: 100vh; height: 100svh; overflow-x: hidden; overflow-y: auto; scroll-snap-type: y mandatory; scroll-behavior: smooth; overscroll-behavior: none; scrollbar-width: none; transition: transform .7s var(--ease), opacity .5s var(--ease); }
main::-webkit-scrollbar { display: none; }
.chapter.cabinet { display: block; min-height: 0; padding: 0; }
.pane { position: relative; box-sizing: border-box; width: 100%; height: 100vh; height: 100svh; overflow-x: hidden; overflow-y: auto; scroll-snap-align: start; scroll-snap-stop: always; display: flex; flex-direction: column; padding: clamp(74px, 10vh, 100px) 0 clamp(26px, 5vh, 52px); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.pane > .wrap { margin-block: auto; flex: none; }
.cabinet + .cabinet .pane { border-top: 1px solid var(--line); }
.write-pane { padding-bottom: 0; }
.write-pane footer { margin-top: 28px; padding: 22px 0 26px; flex: none; }

/* The side rooms */
.detail { position: fixed; inset: 0; z-index: 2; height: auto; transform: translateX(100%); visibility: hidden; transition: transform .7s var(--ease), visibility 0s linear .7s; background: color-mix(in srgb, var(--bg) 35%, transparent); border-left: 1px solid var(--line); overscroll-behavior: contain; }
.detail.on { transform: none; visibility: visible; transition: transform .7s var(--ease); }
body.in-detail main { transform: translateX(-100%); opacity: 0; pointer-events: none; }
.detail-back { display: inline-block; margin: 0 0 clamp(14px, 2.6vh, 26px); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

/* The pager: where you are in the stack, and the way up and down it */
.pager { position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 45; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 5px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px); transition: opacity .4s; }
.pager .dots { position: static; transform: none; right: auto; top: auto; flex-direction: column; gap: 13px; }
.pager-btn { all: unset; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 500 15px/1 var(--sans); color: var(--text-2); transition: color .3s, background-color .3s, opacity .3s; }
.pager-btn:hover, .pager-btn:focus-visible { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.pager-btn:disabled { opacity: .25; cursor: default; background: none; color: var(--text-3); }
body.in-detail .pager .pager-btn { visibility: hidden; }

@media (max-width: 900px) {
  /* In a stacked heading the lead takes only the room it needs */
  .cab-detail .ch-lead { flex: none; width: 100%; }
}
@media (max-width: 640px) {
  .pane { padding: 70px 0 20px; }
  .cab.home.pane { padding-bottom: 14px; }
  .write-pane { padding-bottom: 0; }
  .pager { right: 3px; gap: 9px; padding: 5px 2px; border-color: transparent; background: none; backdrop-filter: none; }
  .pager-btn { width: 22px; height: 22px; font-size: 13px; }
  .pager .dots { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  main { scroll-behavior: auto; transition: none; }
  .detail, .detail.on { transition: none; }
}

/* ==========================================================
   The detail pages, tidied (brief from chat, 2026-11-14).
   Each fits one laptop screen; on a phone it is one column and scrolls inside itself.
   ========================================================== */
/* The Teach cabinet's object is now the arc of a lesson, drawn large */
.cab .arc svg { height: auto; max-height: 50vh; }
.cab .arc-text { font-size: clamp(18px, 2.6vh, 24px); min-height: 2.8em; margin-top: 6px; }

.room-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 2.8vh, 30px) clamp(30px, 4.4vw, 64px); align-items: start; }
.room-grid > * { min-width: 0; }
.room .detail-back { margin-bottom: clamp(12px, 2.2vh, 22px); }
.room .eyebrow { margin: 0 0 10px; }
.room .index { margin: 0; gap: 6px 20px; }
.room .index + .eyebrow { margin-top: 16px; }
.room .index a { font: 600 12px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); padding: 4px 0; transition: color .3s; }
.room .index a::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin: 0 9px 2px 0; vertical-align: middle; }
.room .index a:hover, .room .index a:focus-visible { color: var(--accent); }

/* Figures: medium, always one row */
.room .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; justify-content: start; }
.room .stats li button { min-width: 0; }
.room .stats b { font-size: clamp(30px, 4.6vh, 38px); }
.room .stats span { max-width: none; font-size: 10.5px; letter-spacing: .13em; }

/* Quotations: one at a time, small enough for one or two lines */
.room .voices { margin: 0; max-width: none; }
.room .voice p { font-size: 16px; line-height: 1.4; }
.room .voice figcaption { margin-top: 6px; font-size: 10.5px; }
.room .voices-nav { margin-top: 10px; flex-wrap: wrap; }
.voices-extra { display: none; }

/* The round CV button is the last thing on the page */
.room .seal.mini svg { width: 84px; height: 84px; }
.room .seal.mini .seal-label { font-size: 12px; }
.room-make .seal.mini svg { width: 52px; height: 52px; }

/* Teach: the spines */
.room .shelf { height: clamp(150px, 27vh, 240px); }
.room .shelf-detail { min-height: 2.9em; margin-top: 10px; }

/* Think: the lectures, larger, always side by side; the study guides as a shelf of short spines */
.room .lectures { grid-template-columns: 1fr 1fr; gap: 12px; }
.room .hint { margin-top: 10px; }
.guides-label { all: unset; cursor: pointer; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.guides-label .eyebrow { margin: 0; }
.guides-label .g-list { font: italic 500 15px var(--serif); color: var(--text-2); transition: color .3s; }
.guides-label:hover .g-list, .guides-label:focus-visible .g-list { color: var(--text); }
.guide-shelf { display: flex; align-items: flex-end; gap: 8px; height: clamp(104px, 15vh, 124px); margin-top: 12px; padding: 0 0 8px 6px; border-bottom: 2px solid var(--line-2); }
.gbook { all: unset; box-sizing: border-box; cursor: pointer; writing-mode: vertical-rl; display: flex; align-items: center; justify-content: center; text-align: center; height: 100%; width: 50px; padding: 8px 5px; border-radius: 3px 6px 6px 3px; color: #fff; font: 500 11.5px/1.2 var(--serif); letter-spacing: .01em; background: linear-gradient(90deg, color-mix(in srgb, var(--bk) 70%, #000) 0, var(--bk) 14%, color-mix(in srgb, var(--bk) 82%, #000) 100%); box-shadow: inset 2px 0 0 rgba(255, 255, 255, .18), 0 10px 18px -12px #000; transition: transform .45s var(--ease), filter .35s; }
.gbook:hover, .gbook:focus-visible { transform: translateY(-9px); filter: brightness(1.14); }
.gbook:nth-child(1) { --bk: #3D5E8C; }
.gbook:nth-child(2) { --bk: #5B4A7C; height: 94%; }
.gbook:nth-child(3) { --bk: #2F6B66; height: 86%; width: 44px; }
.gbook:nth-child(4) { --bk: #7A5C2E; height: 98%; }
.gbook:nth-child(5) { --bk: #8A3F2E; height: 90%; }

/* Make: one availability line, four slim cards, one large booking button */
.r-avail { margin: 0; font: italic 500 clamp(17px, 2.4vh, 20px)/1.3 var(--serif); color: var(--text-2); }
.room .services { gap: 14px; }
.room .svc { padding: 18px 18px 16px; }
.room .svc h3 { font-size: clamp(20px, 2.8vh, 25px); }
.room .svc h3 button { all: unset; cursor: pointer; transition: color .3s; }
.room .svc h3 button:hover, .room .svc h3 button:focus-visible { color: var(--accent); }
.room .svc .rate { margin: 6px 0 14px; flex: 1; }
.r-book { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; }
.book-big { font-size: 17px; padding: 15px 28px; }

/* Inside a service pop-up: what used to sit on its card */
.svc-summary { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.svc-summary .svc-vis { height: 110px; margin: 0; }
.svc-summary .svc-sub { margin: 0 0 8px; }
.svc-summary .deliv { margin: 0; }
.sheet-body .proof { margin: 0 0 18px; }

@media (min-width: 901px) {
  .room-teach .room-grid { grid-template-columns: 1.05fr .95fr; grid-template-areas: "shelf figs" "shelf quote" "where how" "where cv"; grid-template-rows: auto 1fr auto auto; }
  .room-think .room-grid { grid-template-columns: 1.08fr .92fr; grid-template-areas: "lect figs" "lect quote" "guides links" "guides cv"; grid-template-rows: auto 1fr auto auto; }
  .room-make .room-grid { grid-template-columns: 1.2fr .8fr; grid-template-areas: "avail avail" "cards cards" "quote book" "quote cv"; }
  .r-shelf { grid-area: shelf; } .r-figs { grid-area: figs; } .r-quote { grid-area: quote; } .r-where { grid-area: where; } .r-how { grid-area: how; }
  .r-lect { grid-area: lect; } .r-guides { grid-area: guides; } .r-links { grid-area: links; }
  .r-avail { grid-area: avail; } .r-cards { grid-area: cards; } .r-book { grid-area: book; }
  .r-cv { grid-area: cv; justify-self: end; align-self: end; }
  .r-book { justify-content: flex-end; }
}
@media (max-width: 640px) {
  .cab .arc svg { max-height: 30svh; }
  .room .stats b { font-size: 30px; }
  .room .stats span { font-size: 9.5px; letter-spacing: .1em; }
  .room .shelf { height: 176px; gap: 6px; }
  .room .book { height: 150px !important; width: 40px !important; }
  .room .book.b-gram, .room .book.b-phil { height: 132px !important; width: 30px !important; }
  .room .case { height: 124px !important; width: 30px !important; }
  .room .services { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .room .svc { padding: 12px 14px; }
  .room .svc h3 { font-size: 20px; }
  .room .svc .rate { margin: 2px 0 10px; }
  .book-big { width: 100%; box-sizing: border-box; text-align: center; }
  .gbook { width: 46px; }
  .svc-summary { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* Two lecture tiles side by side on a phone: taller tiles, so the caption clears the play button */
  .room .lecture { aspect-ratio: 5 / 4; }
  .room .lecture .play { top: 30%; width: 36px; height: 36px; }
}

/* ---------- Write to me, in the same form as the other cabinets ---------- */
.write-grid { grid-template-columns: 1fr 1fr; }
#write .display { font-size: clamp(48px, min(7.6vw, 12vh), 108px); }
.write-acts { display: flex; flex-wrap: wrap; gap: 10px; margin: clamp(18px, 3.2vh, 32px) 0 0; }
.write-side .seals { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2.4vh, 22px) 24px; margin: 0; }
.write-side .seals .seal { margin-top: 0; }
.write-side .seals .seal svg { width: clamp(56px, 8vh, 78px); height: clamp(56px, 8vh, 78px); }
#write .write-side .index { margin: clamp(18px, 3.2vh, 30px) 0 0; padding-top: clamp(14px, 2.4vh, 22px); border-top: 1px solid var(--line); gap: 6px 20px; }
.write-side .write-links { margin: clamp(10px, 1.8vh, 18px) 0 0; line-height: 1.8; }
@media (max-width: 900px) {
  .write-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  #write .display { font-size: 46px; }
  .write-side .seals { gap: 12px 10px; }
  .write-side .seals .seal { gap: 8px; }
  .write-side .seals .seal svg { width: 50px; height: 50px; }
  .write-side .seals .seal-label { font-size: 10px; letter-spacing: .12em; }
  .write-side .seals .seal-label small { font-size: 11.5px; }
  .write-pane footer { margin-top: 14px; padding: 14px 0 18px; }
}

/* The four service animations are back on the Make cards */
.room .svc .svc-vis { position: static; inset: auto; height: clamp(70px, 11vh, 96px); margin: 0 0 12px; opacity: 1 !important; }
.room .svc .blocks { transform: scale(.7); }
.svc-summary { grid-template-columns: 1fr; }
@media (max-width: 640px) { .room .svc .svc-vis { height: 64px; margin-bottom: 6px; } }

/* ---------- The tetraktys on the Make cabinet: ten points in a pyramid, drawn by main.js ---------- */
.tetra { display: block; width: min(400px, 64vw, 52vh); aspect-ratio: 1; margin-inline: auto; cursor: grab; touch-action: pan-y; }
.tetra.dragging { cursor: grabbing; }
.tetra:focus-visible { outline: 1px dashed var(--accent); outline-offset: 8px; }
@media (max-width: 640px) { .tetra { width: min(260px, 62vw, 34svh); } }

/* ---------- The Make cards' animations run only while the pointer is over the card (or focus is inside it) ---------- */
.room .svc .quill > path { animation-name: none; stroke-dashoffset: 0; }
.room .svc:hover .quill > path, .room .svc:focus-within .quill > path { animation-name: draw; }
.room .svc .tetractys circle { animation-name: none; opacity: .85; }
.room .svc:hover .tetractys circle, .room .svc:focus-within .tetractys circle { animation-name: breathe; }
.room .svc .typer .caret { visibility: hidden; }
.room .svc:hover .typer .caret, .room .svc:focus-within .typer .caret { visibility: visible; }

/* ---------- The maker's shapes: the caption under the Make cabinet's object ---------- */
.maker { gap: 8px; }
.maker-name { all: unset; cursor: pointer; color: var(--accent); border-bottom: 1px dotted color-mix(in srgb, var(--accent) 60%, transparent); transition: border-color .3s; }
.maker-name:hover, .maker-name:focus-visible { border-bottom-style: solid; border-color: var(--accent); }
.maker-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
@media (max-width: 640px) { .maker .solid-label { font-size: 16px; } .tetra { width: min(250px, 60vw, 30svh); } }

/* ---------- The lesson at a glance: a bar of stages as wide as their minutes; tap a stage to read it (from the PGCE portfolio) ---------- */
.sheet-body .h4-hint { color: var(--text-3); letter-spacing: .14em; }
.lesson-bar { display: flex; gap: 4px; margin: 6px 0 16px; }
.lesson-bar span { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; padding: 10px 10px 8px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 16%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-bar span:nth-child(2) { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.lesson-bar span:nth-child(3) { background: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--text); }
.lesson-bar span:nth-child(4) { background: color-mix(in srgb, var(--accent) 56%, transparent); color: var(--text); }
.lesson-bar b { display: block; font: 500 22px/1 var(--serif); color: var(--text); margin-bottom: 2px; }
.lesson-bar b::after { content: " min"; font: 400 11px var(--sans); color: var(--text-2); }
.lesson-bar.staged span { cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s; }
.lesson-bar.staged span:hover { transform: translateY(-2px); }
.lesson-bar.staged span.on { box-shadow: 0 0 0 2px var(--accent); transform: translateY(-3px); }
.lesson-bar.staged span:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sheet-body ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 18px; }
.sheet-body ol.steps li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 12px; min-height: 30px; }
.sheet-body ol.steps li b { color: var(--accent); font-weight: 600; }
.sheet-body ol.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.sheet-body ol.steps.staged li { display: none; }
.sheet-body ol.steps.staged li.on { display: block; animation: fadein .3s; }
.sheet-body ol.steps.staged li::before { content: attr(data-n); }
/* Every stage is at least as wide as its name; the minutes share out the rest of the bar */
.lesson-bar span { min-width: fit-content; }
@media (max-width: 640px) { .lesson-bar { gap: 3px; } .lesson-bar span { padding: 9px 7px 7px; font-size: 11px; } .lesson-bar b { font-size: 19px; } }

/* ---------- Pop-ups in the portfolio's manner: a tinted header with a large faint drawing, a colour per lesson and per study guide, tinted chips, link cards ---------- */
.sheet-head { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); overflow: hidden; }
.sheet-head .eyebrow, .sheet-head h3 { position: relative; z-index: 1; }
.sheet-head .close { z-index: 2; }
.sheet:not(.read) .sheet-head h3 { padding-right: 130px; }
.sheet-art { position: absolute; right: 60px; top: 50%; width: 92px; height: 92px; transform: translateY(-50%); opacity: .24; pointer-events: none; }
.sheet-art:empty { display: none; }
.sheet-art svg { display: block; width: 100%; height: 100%; stroke: var(--accent); fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.sheet.read .sheet-art { right: clamp(56px, 9vw, 110px); width: 120px; height: 120px; }
.sheet[data-tone="mac"] { --accent: #D0674F; } .sheet[data-tone="temp"] { --accent: #6B9BD1; } .sheet[data-tone="poet"] { --accent: #6FAE82; }
.sheet[data-tone="words"] { --accent: #6FB5AE; } .sheet[data-tone="clothes"] { --accent: #A893CF; } .sheet[data-tone="oompiet"] { --accent: #D9A066; }
.sheet[data-tone="herb"] { --accent: #9DBF6B; } .sheet[data-tone="gram"] { --accent: #C2A878; } .sheet[data-tone="film"] { --accent: #A9A9BC; } .sheet[data-tone="phil"] { --accent: #D4BC5A; }
.sheet[data-tone="g5"] { --accent: #7FA3D6; } .sheet[data-tone="g3"] { --accent: #A893CF; } .sheet[data-tone="g4"] { --accent: #6FB5AE; } .sheet[data-tone="g2"] { --accent: #CDA567; } .sheet[data-tone="g1"] { --accent: #D97F68; }
:root[data-theme="light"] .sheet[data-tone="mac"] { --accent: #8A3B2C; } :root[data-theme="light"] .sheet[data-tone="temp"] { --accent: #2F5A86; } :root[data-theme="light"] .sheet[data-tone="poet"] { --accent: #3F7A54; }
:root[data-theme="light"] .sheet[data-tone="words"] { --accent: #2F6B66; } :root[data-theme="light"] .sheet[data-tone="clothes"] { --accent: #5B4A7C; } :root[data-theme="light"] .sheet[data-tone="oompiet"] { --accent: #8A5A1E; }
:root[data-theme="light"] .sheet[data-tone="herb"] { --accent: #55752A; } :root[data-theme="light"] .sheet[data-tone="gram"] { --accent: #6B5B3E; } :root[data-theme="light"] .sheet[data-tone="film"] { --accent: #4A4A58; } :root[data-theme="light"] .sheet[data-tone="phil"] { --accent: #7A6A2E; }
:root[data-theme="light"] .sheet[data-tone="g5"] { --accent: #3D5E8C; } :root[data-theme="light"] .sheet[data-tone="g3"] { --accent: #5B4A7C; } :root[data-theme="light"] .sheet[data-tone="g4"] { --accent: #2F6B66; } :root[data-theme="light"] .sheet[data-tone="g2"] { --accent: #7A5C2E; } :root[data-theme="light"] .sheet[data-tone="g1"] { --accent: #8A3F2E; }
.sheet-body .when.chips span { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 32%, transparent); color: var(--text); }
.sheet-body .when.chips span:first-child { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); }
.sheet-body .dl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 260px)); gap: 10px; margin: 20px 0 16px; }
.sheet-body a.dl { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 34px 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); color: var(--text); text-decoration: none; transition: border-color .25s, transform .25s var(--ease); }
.sheet-body a.dl::after { content: "\2197"; position: absolute; right: 14px; top: 12px; color: var(--text-3); font-size: 15px; transition: color .25s; }
.sheet-body a.dl:hover, .sheet-body a.dl:focus-visible { border-color: var(--accent); transform: translateY(-3px); }
.sheet-body a.dl:hover::after, .sheet-body a.dl:focus-visible::after { color: var(--accent); }
.sheet-body a.dl svg { width: 26px; height: 26px; stroke: var(--accent); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.sheet-body a.dl b { font: 500 17px/1.25 var(--serif); }
.sheet-body a.dl span { font-size: 13px; line-height: 1.35; color: var(--text-2); }
@media (max-width: 640px) {
  .sheet:not(.read) .sheet-head h3 { padding-right: 56px; }
  .sheet-art, .sheet.read .sheet-art { width: 64px; height: 64px; right: 46px; opacity: .18; }
  .sheet-body .dl-cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .sheet-body a.dl { transition: none; } .sheet-body a.dl:hover { transform: none; } }

/* ---------- The maker's shapes, larger: the size of the solid on the first screen and a little more ---------- */
.tetra { width: min(540px, 44vw, 64vh); max-width: 100%; }
@media (max-width: 900px) { .tetra { width: min(420px, 74vw, 40svh); } }
@media (max-width: 640px) { .tetra { width: min(320px, 80vw, 36svh); } }

/* ==========================================================
   Three cabinets (2026-11-15, after the services-site try was turned down).
   1. The landing page, as it was, with two ways down: My services and About me.
   2. My services: the sketch, bottom right, pointing at a plain blackboard. The board has three tabs
      (Teach, Design, Consult), the list of services on its far left and the turning shapes in the middle.
      Details folds the list away into a chevron and lays the details over the shape.
   3. About me: a second tabbed board, of proof.
   Contact is a slim bar fixed to the bottom of every cabinet; the form opens from it as a small panel.
   ========================================================== */
:root { --bar-h: 58px; --pane-pad: clamp(14px, 3vh, 34px); --bb: #0A0908; }
:root[data-theme="light"] { --bb: #FDFBF6; }
.pane { padding-bottom: calc(var(--bar-h) + var(--pane-pad)); }
.pager { top: calc(50% - var(--bar-h) / 2); }

/* ---------- The three colours: Teach green, Design orange, Consult purple ---------- */
:root { --c-teach: #8FB79A; --c-design: #D3A377; --c-consult: #AA9FCC; }   /* muted: sage, clay, lavender */
:root[data-theme="light"] { --c-teach: #426F53; --c-design: #8E5C33; --c-consult: #675A8E; }
.bb[data-open="teach"], .tabs [data-tab="teach"], .cab-door[data-door="teach"] { --accent: var(--c-teach); }
.bb[data-open="design"], .tabs [data-tab="design"], .cab-door[data-door="design"] { --accent: var(--c-design); }
.bb[data-open="consult"], .tabs [data-tab="consult"], .cab-door[data-door="consult"] { --accent: var(--c-consult); }
/* The whole services cabinet (the stars, the bar, the top bar) takes the colour of the open tab */
body[data-chapter="services"]:has(#board[data-open="teach"]) { --accent: var(--c-teach); }
body[data-chapter="services"]:has(#board[data-open="design"]) { --accent: var(--c-design); }
body[data-chapter="services"]:has(#board[data-open="consult"]) { --accent: var(--c-consult); }

/* The older three colours (schools terracotta, universities blue, services teal) give way to the same three everywhere:
   schools and teaching green, universities and research purple, making and design orange. The pop-ups, the Map and the CVs menu follow. */
:root, :root[data-theme="light"] { --teach: var(--c-teach); --think: var(--c-consult); --make: var(--c-design); }
.sheet[data-tone="c-teach"] { --accent: var(--c-teach); }
.sheet[data-tone="c-design"] { --accent: var(--c-design); }
.sheet[data-tone="c-consult"] { --accent: var(--c-consult); }

/* ---------- The CVs: one dropdown in the top bar, at every width ---------- */
.cvs-btn { display: inline-flex; }
.cvs-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); flex-direction: column; gap: 4px; padding: 8px; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 40px -24px #000; }
.cvs.on .cvs-menu { display: flex; }
.cvs-menu .pill { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; justify-content: flex-start; padding: 10px 12px; }
.cvs-menu .pill:hover { border-color: var(--line-2); }
.cvs-menu .cv-link i { display: inline; }

/* ---------- 1. The landing page: four boxes, two by two (Teach, Design, Consult in their colours; About me in gold) ---------- */
.cab-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 470px; }
.cab-door { border-color: color-mix(in srgb, var(--accent) 75%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.cab-door:hover, .cab-door:focus-visible { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.cab-door[data-door] b { color: var(--accent); }
.cab-door { gap: 6px; }
.cab-door small { font: 500 12.5px/1.4 var(--sans); letter-spacing: .01em; text-transform: none; color: var(--text-2); text-wrap: balance; }   /* what is behind each box */
.home-id .hero-face { width: clamp(92px, 10.5vw, 148px); }

/* ---------- 2. My services ---------- */
.svc-pane > .wrap, .about-pane > .wrap { width: min(1240px, 100% - 104px); margin-block: 0; flex: 1 0 auto; }
.svc-pane > .wrap { display: flex; flex-direction: column; }
.stage { --me-h: clamp(300px, min(calc(100vh - 310px), 38vw), 640px); --me-w: calc(var(--me-h) * .709); position: relative; flex: 1; display: flex; }
@supports (height: 100svh) { .stage { --me-h: clamp(300px, min(calc(100svh - 310px), 38vw), 640px); } }
.svc-head { position: absolute; right: 0; top: 0; width: calc(var(--me-w) - 66px); text-align: right; }
.svc-head .eyebrow { margin: 0 0 10px; }
.svc-title { margin: 0; font: 500 clamp(34px, min(3.8vw, 6.4vh), 56px)/1 var(--serif); letter-spacing: -.02em; color: var(--text); }
.svc-head .r-avail { margin-top: 10px; font-size: clamp(15px, 2.1vh, 18px); }

/* The board: one flat near-black panel with a hairline round it */
.bb { --u: min(1vw, 1.55vh); --obj-w: clamp(128px, 13vw, 190px); position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bb); border: 1px solid var(--line-2); border-radius: 6px; transition: background-color .9s var(--ease), border-color .9s; }
.stage > .bb { margin-right: calc(var(--me-w) - 46px); }
.tabs { flex: none; display: flex; gap: clamp(18px, 2.4vw, 34px); padding: 0 clamp(16px, 1.8vw, 26px); border-bottom: 1px solid var(--line); }
.tabs button { all: unset; cursor: pointer; padding: clamp(10px, 1.8vh, 16px) 0 clamp(8px, 1.5vh, 13px); margin-bottom: -1px; font: 500 clamp(22px, min(2.2vw, 3.8vh), 32px)/1 var(--serif); color: var(--text-3); border-bottom: 2px solid transparent; transition: color .3s, border-color .3s; }
.tabs button { color: color-mix(in srgb, var(--accent) 48%, var(--text-3)); }
.tabs button:hover { color: color-mix(in srgb, var(--accent) 80%, var(--text-3)); }
.tabs button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.bb-body { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: var(--obj-w) minmax(0, 1fr); }

/* The object of the service under the pointer: small, far left */
.bb-stage { grid-column: 1; grid-row: 1; position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px 6px 10px; border-right: 1px solid var(--line); }
.bb .tetra { width: calc(var(--obj-w) - 26px); max-width: 100%; margin: 0; }
.bb .solid-label { margin: 0; font-size: clamp(14px, 1.9vh, 17px); text-align: center; }

/* The services: one large box each, sharing the height of the board. A box shows its name, its price and "click for details" on the left,
   and on the right its one-line description with a point or two under it. Under the pointer it lifts a little. */
.bb-menu { grid-column: 2; grid-row: 1; min-width: 0; padding: 0 clamp(54px, 4.8vw, 64px) 0 clamp(14px, 1.5vw, 22px); }   /* clear of the pointing hand on the right */
.bb-menu .items { display: none; list-style: none; margin: 0; padding: 0; }
.bb[data-open="teach"] .items[data-col="teach"], .bb[data-open="design"] .items[data-col="design"], .bb[data-open="consult"] .items[data-col="consult"] { display: flex; flex-direction: column; justify-content: center; gap: clamp(8px, 1.6vh, 14px); height: 100%; box-sizing: border-box; padding: clamp(10px, 1.8vh, 16px) 0; }
.item { flex: 1 1 0; min-height: 0; max-height: 176px; display: flex; padding: 0; }
.item-btn { all: unset; box-sizing: border-box; flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, .66fr) minmax(0, 1.34fr); align-items: center; column-gap: clamp(16px, 2vw, 28px); padding: 8px clamp(16px, 1.7vw, 24px); cursor: pointer; border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--accent) 6%, transparent); transition: transform .3s var(--ease), background-color .3s, border-color .3s, box-shadow .3s; }
.item-btn:focus-visible { transform: scale(1.018); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: 0 16px 30px -18px #000; outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .item-btn:hover { transform: scale(1.018); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: 0 16px 30px -18px #000; } .item-btn:hover .item-hint::after { color: var(--accent); } }   /* only where there is a pointer: on a phone a tapped box would stay lifted */
.item-btn:active { transform: scale(1.005); }
.item-a, .item-b { min-width: 0; display: flex; flex-direction: column; }
.item-a { gap: clamp(3px, .7vh, 7px); }
.item-b { gap: clamp(4px, .9vh, 8px); padding-left: clamp(16px, 2vw, 28px); border-left: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); }
.item-name { font: 500 clamp(22px, calc(var(--u) * 2.3), 33px)/1.08 var(--serif); letter-spacing: -.01em; color: var(--text); }
.item-rate { font: italic 500 clamp(13px, calc(var(--u) * 1.08), 15.5px)/1.3 var(--serif); color: var(--accent); }
.item-hint::after { content: "click for details"; font: 600 10px/1 var(--sans); letter-spacing: .17em; text-transform: uppercase; color: var(--text-3); transition: color .3s; }
.item-btn:focus-visible .item-hint::after { color: var(--accent); }
@media (hover: none) { .item-hint::after { content: "tap for details"; } }
.item-line { font: italic 500 clamp(16px, calc(var(--u) * 1.42), 20px)/1.3 var(--serif); color: var(--text); }
.item-pts { display: flex; flex-direction: column; gap: 2px; }
.item-pts:empty { display: none; }
.item-pts span { position: relative; padding-left: 16px; font: 400 clamp(12.5px, calc(var(--u) * 1.06), 14.5px)/1.4 var(--sans); color: var(--text-2); }
.item-pts span::before { content: ""; position: absolute; left: 2px; top: .48em; width: 5px; height: 5px; transform: rotate(45deg); border: 1px solid var(--accent); }

/* The bar that brings the boxes back: on a phone only (on a computer the cross, the tab and Escape do it) */
.bb-chev { all: unset; box-sizing: border-box; display: none; place-items: center; cursor: pointer; color: var(--accent); }
.bb-chev svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bb-chev:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

/* The details card: it grows out of the box that was pressed and covers the whole board under the tabs. What it covers stays in view
   until it is covered, then is put out of reach. */
.stage.detail-open .bb-menu, .stage.detail-open .bb-stage { visibility: hidden; transition: visibility 0s .46s; }
.bb-detail { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; border-radius: 0 0 5px 5px; padding: clamp(16px, 2.8vh, 28px) 74px 18px clamp(20px, 2.6vw, 38px); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.bb-detail[hidden] { display: none; }
.bb-detail .close { right: 10px; top: 10px; }
.bb-title { margin: 0 0 16px; padding-right: 40px; font: 500 clamp(26px, 3vw, 38px)/1.1 var(--serif); color: var(--text); outline: none; }
.bb-text.sheet-body { overflow: visible; padding: 0; flex: none; font-size: 16px; line-height: 1.6; }
.bb-short { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px clamp(24px, 3.4vw, 48px); align-items: start; margin: 0 0 clamp(18px, 3vh, 30px); }
.sheet-body .bb-rate { margin: 0 0 14px; font: italic 500 clamp(22px, 2.5vw, 31px)/1.25 var(--serif); color: var(--accent); }
.sheet-body .bb-line { margin: 0 0 4px; font: italic 500 clamp(18px, 1.9vw, 22px)/1.35 var(--serif); color: var(--text-2); }
.bb-lines.long li { font: 400 clamp(15px, 1.25vw, 16.5px)/1.5 var(--sans); color: var(--text-2); }
.bb-lines.long li strong { color: var(--text); }
.sheet-body .bb-para { margin: 12px 0 0; font-size: clamp(15.5px, 1.3vw, 17px); line-height: 1.6; color: var(--text-2); }
.sheet-body .bb-proof p { margin: 0; }
.bb-extra { margin: 0 0 clamp(16px, 2.6vh, 26px); }
.bb-extra .eyebrow { margin: 0 0 10px; }
.bb-two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px clamp(24px, 3.4vw, 48px); align-items: start; }
.bb-extra .lectures { grid-template-columns: 1fr 1fr; gap: 10px; }
.bb-extra .shelf { height: clamp(104px, 16.5vh, 150px); }
.bb-short .bb-extra { margin: clamp(12px, 2vh, 18px) 0 0; }
.bb-short:has(+ .bb-extra) { margin-bottom: clamp(12px, 2vh, 18px); }
.bb-extra .shelf-detail { min-height: 2.8em; margin-top: 8px; }
.bb-extra .shelf-detail .caption { font-size: clamp(14.5px, 2vh, 17px); }
.bb-extra .guide-shelf { height: clamp(78px, 10.8vh, 100px); margin-top: 0; }
.bb-lines { list-style: none; margin: 12px 0 0; padding: 0; }
.bb-lines li { padding: clamp(8px, 1.5vh, 13px) 0; border-top: 1px solid var(--line); font: 500 clamp(18px, 2vw, 24px)/1.3 var(--serif); color: var(--text); }
.sheet-body .bb-proof { margin: 0; padding: 20px 22px; border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--bb) 70%, transparent); font: italic 18px/1.5 var(--serif); color: var(--text); }
.bb-proof b { font-style: normal; font-weight: 500; font-size: 26px; color: var(--accent); }
.bb-detail { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 46%), var(--bb); }
.bb-head { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 22px); margin: 0 0 clamp(12px, 2vh, 20px); padding-right: 44px; }
.bb-icon { flex: none; width: clamp(58px, 6vw, 78px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%); }
.bb-icon svg { width: 56%; height: 56%; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.bb-head .bb-title { margin: 0 0 9px; padding: 0; font-size: clamp(30px, 3.6vw, 46px); line-height: 1; letter-spacing: -.015em; }
.sheet-body .bb-rate, .bb-head .bb-rate { display: inline-block; margin: 0; padding: 7px 15px 6px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); font: 600 13px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }   /* the price, under the name of the service */
.sheet-body .bb-line { margin: 0 0 6px; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3; color: var(--text); }
.bb-lines { margin-top: 8px; }
.bb-lines li { position: relative; padding: clamp(6px, 1.1vh, 10px) 0 clamp(6px, 1.1vh, 10px) 28px; border-top: 0; }
.bb-lines li::before { content: ""; position: absolute; left: 3px; top: calc(clamp(6px, 1.1vh, 10px) + .42em); width: 8px; height: 8px; transform: rotate(45deg); border: 1.5px solid var(--accent); }
.bb-lines.long li::before { top: calc(clamp(6px, 1.1vh, 10px) + .36em); }
.sheet-body .bb-proof { padding: 24px 24px 20px; border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); border-radius: 16px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 13%, transparent), transparent 75%); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.45; }
.sheet-body .bb-proof::before { content: "\201C"; display: block; height: 28px; font: 500 64px/1 var(--serif); color: var(--accent); opacity: .85; }
.bb-head, .bb-short > *, .bb-extra, .bb-text > .more { animation: bb-rise .55s var(--ease) both; }
.bb-short > :nth-child(1) { animation-delay: .07s; } .bb-short > :nth-child(2) { animation-delay: .16s; } .bb-extra { animation-delay: .22s; } .bb-text > .more { animation-delay: .28s; }
@keyframes bb-rise { from { opacity: 0; transform: translateY(10px); } }
.bb-proof small { display: block; margin-top: 10px; font: 600 10.5px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-style: normal; }

/* The sketch: the picture is a mask, so its lines take the text colour; mirrored, so that it points left at the board */
.me { position: absolute; right: calc(46px - var(--me-w)); bottom: calc(-1px - var(--pane-pad)); z-index: 2; height: var(--me-h); aspect-ratio: 1004 / 1416; transform: scaleX(-1); pointer-events: none; transition: opacity .4s var(--ease); }
/* Two layers in one frame. Under: the figure's solid shape, in the page's own colour, so that nothing behind him shows through and the edge of
   the board does not run across his hand. Over: his lines, in the text colour. Dark mode has a drawing of its own (white on black, his). */
.me::before, .me::after { content: ""; position: absolute; inset: 0; -webkit-mask-position: center bottom; mask-position: center bottom; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; transition: background-color .9s var(--ease); }
.me::before { background-color: var(--bg); -webkit-mask-image: url(wehan-fill-dark.webp); mask-image: url(wehan-fill-dark.webp); }
.me::after { background-color: var(--text); -webkit-mask-image: url(wehan-line-dark.webp); mask-image: url(wehan-line-dark.webp); }
:root[data-theme="light"] .me::before { -webkit-mask-image: url(wehan-fill.webp); mask-image: url(wehan-fill.webp); }
:root[data-theme="light"] .me::after { -webkit-mask-image: url(wehan-line.webp); mask-image: url(wehan-line.webp); }
html.first-visit .me { opacity: 0; transition: opacity 1.8s var(--ease) .2s; }
html.first-visit .me.in { opacity: 1; }

/* ---------- 3. About me ---------- */
.about-grid { display: grid; grid-template-columns: clamp(250px, 25vw, 330px) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "side main" "more main"; column-gap: clamp(24px, 3vw, 44px); row-gap: clamp(12px, 2.2vh, 22px); }
.ab-side { grid-area: side; min-width: 0; }
.ab-more { grid-area: more; min-width: 0; align-self: start; }
.ab-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: clamp(12px, 2.4vh, 24px); }
.ab-figs .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px clamp(12px, 1.8vw, 26px); }   /* six figures in one row */
.ab-figs .stats b { font-size: clamp(30px, 4.6vh, 42px); }
/* The six figures are buttons, and look it: each in an outlined tile with a small arrow after its label, lifting under the pointer as the service boxes do */
.ab-figs .stats { gap: clamp(8px, 1vw, 14px); }
.ab-figs .stats li { display: flex; min-width: 0; }
.ab-figs .stats li button { flex: 1; min-width: 0; box-sizing: border-box; justify-content: flex-start; padding: clamp(8px, 1.4vh, 12px) clamp(9px, .9vw, 13px); border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 6%, transparent); transition: transform .3s var(--ease), background-color .3s, border-color .3s, box-shadow .3s; }
.ab-figs .stats li button span::after { content: " \2192"; color: var(--accent); letter-spacing: 0; white-space: nowrap; }
.ab-figs .stats li button:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
@media (hover: hover) { .ab-figs .stats li button:hover { transform: translateY(-3px); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: 0 14px 26px -18px #000; } }
.ab-sky .eyebrow { margin: 0 0 6px; }
.ab-main .sky { aspect-ratio: auto; height: clamp(220px, calc(100vh - 390px), 500px); overflow: visible; margin: 0; padding: 0; }
@supports (height: 100svh) { .ab-main .sky { height: clamp(220px, calc(100svh - 390px), 500px); } }
.ab-main #sky { width: 100%; height: 100%; max-width: 100%; }
.ab-main .index { margin: 0; }
.stash { position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden; }
.bb-extra .arc svg { height: auto; max-height: min(190px, 25vh); }
.bb-extra .arc-text { font-size: clamp(16px, 2.2vh, 19px); min-height: 2.8em; margin-top: 4px; }
.bb-extra .arc .eyebrow { margin: 0 0 4px; }
.ab-side .eyebrow { margin: 0 0 clamp(10px, 1.8vh, 16px); }
/* The title has a turning seal beside it: the motto runs round the ring, and pressing it opens "Why I teach" */
.ab-id { display: flex; align-items: center; gap: clamp(12px, 1.4vw, 18px); }
.ab-seal { all: unset; flex: none; display: block; cursor: pointer; border-radius: 50%; }
.ab-seal svg { display: block; width: clamp(74px, 7.4vw, 100px); height: auto; aspect-ratio: 1; overflow: visible; }
.ab-seal .seal-text { animation-duration: 36s; }
.ab-seal:hover .seal-ring, .ab-seal:focus-visible .seal-ring { fill: color-mix(in srgb, var(--accent) 24%, transparent); stroke-width: 2; }
.ab-seal:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.ab-seal.spin svg { animation: coin-spin 1.65s cubic-bezier(.3, .1, .2, 1); }
/* The coin: a milled edge, a face lit from the upper left, a thin inner ring and a soft shadow. Kept quiet. */
.ab-seal svg { filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .42)); }
:root[data-theme="light"] .ab-seal svg { filter: drop-shadow(0 2px 4px rgba(60, 40, 10, .28)); }
/* An old coin: a flat, dull face with no shine, worn patches and fine pitting */
.ab-seal .seal-ring, .ab-seal:hover .seal-ring, .ab-seal:focus-visible .seal-ring { fill: color-mix(in srgb, var(--accent) 17%, var(--bg)); stroke: color-mix(in srgb, var(--accent) 72%, var(--bg)); stroke-width: 1.6; }
.coin-wear { fill: color-mix(in srgb, var(--accent) 30%, #000); opacity: .52; }
.coin-pits { fill: #000; opacity: .6; }
:root[data-theme="light"] .coin-wear { fill: color-mix(in srgb, var(--accent) 60%, #3a2a10); opacity: .28; }
:root[data-theme="light"] .ab-seal .seal-text { fill: color-mix(in srgb, var(--accent) 75%, #000); }
:root[data-theme="light"] .coin-pits { fill: #3a2a10; opacity: .46; }
.ab-seal .seal-text { fill: color-mix(in srgb, var(--accent) 78%, var(--bg)); }
.ab-seal .seal-letter { fill: color-mix(in srgb, var(--text) 82%, var(--accent)); }
/* Its thickness: a second disc a little below the face, darker, with the milling on it; the face has a solid back so the edge does not show through */
.coin-side { fill: color-mix(in srgb, var(--accent) 42%, var(--bg)); stroke: color-mix(in srgb, var(--accent) 70%, #000); stroke-width: 1; }
.coin-mill { fill: none; stroke: color-mix(in srgb, var(--accent) 80%, #000); stroke-width: 4.2; stroke-dasharray: .9 1.7; opacity: .8; }
.coin-back { fill: var(--bg); }
.ab-seal svg { margin-bottom: 5%; }
.coin-inner { fill: none; stroke: var(--accent); stroke-width: .8; opacity: .55; }
@keyframes coin-spin { to { transform: rotateY(1080deg); } }
.seal-hex { display: none; fill: none; stroke: var(--text); stroke-width: 2.4; stroke-linejoin: round; }
.ab-seal.hex .seal-hex { display: block; }
.ab-seal.hex .seal-letter { visibility: hidden; }
/* Why he teaches: a quotation under the title, where the pop-up used to be a button */
.ab-why { margin: clamp(10px, 1.8vh, 16px) 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--accent); font: italic 400 clamp(15.5px, 2.1vh, 17.5px)/1.45 var(--serif); color: var(--text-2); }
.ab-side { padding-bottom: clamp(2px, .6vh, 6px); }
/* The motto in the foot: a tooltip says what it means and where it is from */
.motto-wrap { position: relative; display: inline-block; }
.motto-wrap .motto { cursor: help; }
.motto-wrap [role="tooltip"] { top: auto; bottom: calc(100% + 10px); max-width: min(34ch, 80vw); }
.motto:hover + [role="tooltip"], .motto:focus-visible + [role="tooltip"], .motto:focus + [role="tooltip"] { opacity: 1; transform: none; }
.about-pane .ab-title { margin: 0; font: 500 clamp(38px, min(4vw, 7vh), 56px)/.95 var(--serif); letter-spacing: -.02em; color: var(--text); }
.ab-open { margin: clamp(12px, 2.2vh, 20px) 0 0; font: italic 500 clamp(17px, 2.4vh, 20px)/1.3 var(--serif); color: var(--text-2); }
/* Four buttons, then the three outside links as a dotted list, then the full resume, underlined */
.ab-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0; padding-top: clamp(14px, 2.6vh, 24px); border-top: 1px solid var(--line); }
.ab-btns .btn { padding: 10px 8px; font-size: 13.5px; text-align: center; white-space: nowrap; }
.ab-more .ab-links { margin: clamp(14px, 2.6vh, 24px) 0 0; gap: 8px 20px; }
.ab-links a { font: 600 12px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); padding: 4px 0; transition: color .3s; }
.ab-links a::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin: 0 9px 2px 0; vertical-align: middle; }
.ab-links a:hover, .ab-links a:focus-visible { color: var(--accent); }
.ab-btns .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* an odd button out takes the whole row */
.ab-note { margin: 10px 0 0; font: italic 500 16px/1.35 var(--serif); color: var(--text-2); }
.ab-resume { margin: clamp(14px, 2.6vh, 24px) 0 0; }
.ab-resume button { all: unset; cursor: pointer; font: 500 clamp(21px, 2.9vh, 26px)/1.2 var(--serif); color: var(--text); padding-bottom: 3px; border-bottom: 2px solid var(--accent); transition: color .3s; }
.ab-resume button::after { content: " →"; color: var(--accent); }
.ab-resume button:hover, .ab-resume button:focus-visible { color: var(--accent); }
.ab-resume button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.ab-foot { margin: clamp(14px, 2.6vh, 24px) 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-size: 13px; color: var(--text-3); }
.ab-foot .motto { font-size: 16px; }
.ab-panels { position: relative; flex: 1; min-height: 0; }
.ab-panel { position: absolute; left: 0; top: 0; width: 100%; box-sizing: border-box; padding: clamp(14px, 2.6vh, 26px) clamp(16px, 1.8vw, 26px); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(14px, 2.4vh, 24px) clamp(20px, 2.6vw, 38px); align-content: start; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease), visibility 0s .35s; }
.ab-panel > * { min-width: 0; }
.bb[data-open="teach"] .ab-panel[data-col="teach"], .bb[data-open="design"] .ab-panel[data-col="design"], .bb[data-open="consult"] .ab-panel[data-col="consult"] { position: relative; visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .35s var(--ease); }
.ab-board .stats + .stats { margin-top: clamp(10px, 1.8vh, 16px); }
.ab-board .shelf { height: clamp(140px, 27vh, 250px); }
.ab-board .stats b { font-size: clamp(32px, 5vh, 44px); }
.ab-board .shelf-detail { min-height: 3em; margin-top: 8px; }
.ab-board .shelf-detail .caption { font-size: clamp(14.5px, 2vh, 17px); }
.ab-board .poem-card { min-height: 76px; padding: 7px 7px 6px; }
.ab-board .guide-shelf { height: clamp(110px, 20vh, 170px); }
.ab-board .gbook { width: clamp(50px, 4.6vw, 64px); font-size: clamp(11.5px, 1.6vh, 13.5px); }
.ab-board .arc svg { height: auto; max-height: min(320px, 40vh); }
.ab-board .arc-text { font-size: clamp(17px, 2.4vh, 21px); min-height: 2.8em; margin-top: 6px; }
.ab-board .sky { aspect-ratio: auto; height: clamp(190px, calc(100vh - 440px), 370px); overflow: visible; margin: 0; padding: 0; }
@supports (height: 100svh) { .ab-board .sky { height: clamp(190px, calc(100svh - 440px), 370px); } }
.ab-board #sky { width: 100%; height: 100%; max-width: 100%; }
#sky.tall text { font-size: 14px; }
#sky.tall .node.big text { font-size: 17px; }
@media (min-width: 901px) {
  .ab-panel.pt { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-areas: "lect figs" "shelf quote"; }
  .ab-panel.pd { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "guides arc" "quote arc" "links arc"; }
  .ab-panel.pc { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); grid-template-areas: "sky sky" "quote links"; }
  .p-lect { grid-area: lect; } .p-figs { grid-area: figs; } .p-shelf { grid-area: shelf; } .p-quote { grid-area: quote; }
  .p-guides { grid-area: guides; } .p-arc { grid-area: arc; } .p-links { grid-area: links; } .p-sky { grid-area: sky; }
}

/* A little less air at the top and bottom of a card, so that the longer lines still fit without scrolling on a laptop */
@media (min-width: 901px) { .bb .solid-hint { display: none; } .bb-detail { padding-top: clamp(20px, 3.4vh, 32px); padding-bottom: 8px; } .bb-head { margin-bottom: clamp(8px, 1.4vh, 14px); } }
/* A card may have a small heading over its list, and a second column of its own above the quotation (A university) */
.bb-sub { margin: clamp(10px, 1.8vh, 16px) 0 0; }
.bb-sub + .bb-lines { margin-top: 2px; }
.sheet-body .bb-side .bb-para { margin-top: 0; }
.bb-side .bb-proof { margin-top: clamp(8px, 1.4vh, 12px); padding: 13px 18px 12px; font-size: clamp(15.5px, 1.35vw, 17px); line-height: 1.4; }
.bb-side .bb-proof::before { height: 16px; font-size: 42px; }
.bb-side .bb-proof small { margin-top: 6px; }
.bb-short:has(> .bb-side) { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 20px clamp(20px, 2.6vw, 36px); margin-bottom: clamp(10px, 1.8vh, 16px); }
.sheet-body .bb-side .bb-para, .bb-side .bb-lines.long li { font-size: clamp(14.5px, 1.2vw, 15.5px); line-height: 1.45; }
.bb-side .bb-lines.long li, .bb-sub + .bb-lines.long li { padding-top: clamp(4px, .8vh, 7px); padding-bottom: clamp(4px, .8vh, 7px); }

/* The lesson spines on the Classes card: the shelf is short there, so the names are set smaller and closer to the ends of their spines */
.bb-extra .shelf .book, .bb-extra .shelf .case { padding: 6px 0; white-space: nowrap; }
.bb-extra .shelf .book { font-size: clamp(12px, 1.75vh, 16px); }
.bb-extra .shelf .book.b-gram, .bb-extra .shelf .book.b-phil { font-size: clamp(11px, 1.55vh, 14px); }
.bb-extra .shelf .case { font-size: 9px; letter-spacing: .08em; padding: 9px 0 4px; }

/* The two recordings on the Lectures card: one in front, the other tucked behind it, and a chevron beside them that brings the other forward */
.bb-short.wide { grid-template-columns: minmax(0, 1.85fr) minmax(0, .8fr); }
.deck { position: relative; padding: 0 82px 18px 0; }
.deck .lectures { display: block; position: relative; aspect-ratio: 16 / 9; }
.deck .lecture { position: absolute; inset: 0; aspect-ratio: auto; transform-origin: right bottom; transition: transform .55s var(--ease), opacity .55s var(--ease); }
.deck .lecture:not(.front) { transform: translate(22px, 18px) scale(.93); opacity: .55; pointer-events: none; }
.deck .lecture.front { z-index: 1; box-shadow: 0 20px 44px -24px #000; }
.deck-next { all: unset; box-sizing: border-box; position: absolute; right: 0; top: calc(50% - 9px); transform: translateY(-50%); width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: var(--accent); border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); transition: background-color .3s, transform .35s var(--ease); }
.deck-next svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.deck-next:hover, .deck-next:focus-visible { background: color-mix(in srgb, var(--accent) 26%, transparent); transform: translateY(-50%) translateX(3px); }
.deck-next:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.bb-extra .deck .lecture .play { width: 64px; height: 64px; top: 42%; }
.bb-extra .deck .lecture .play span { border-width: 11px 0 11px 19px; }
.bb-extra .deck .lecture .l-cap { font-size: 13px; left: 16px; right: 16px; bottom: 12px; }
.bb-extra .deck .lecture .l-cap strong { font-size: 20px; margin-bottom: 3px; }

/* Each recording shows a still from itself (Google Drive's own preview picture), darkened at the foot so that its caption reads */
.lecture[data-src*="3yu_p7YIFhc"] { --still: url("https://i.ytimg.com/vi/3yu_p7YIFhc/maxresdefault.jpg"); }
.lecture[data-src*="A2ta75nJWTI"] { --still: url("https://i.ytimg.com/vi/A2ta75nJWTI/maxresdefault.jpg"); }
.lecture[data-src*="peBkDshxgYs"] { --still: url("https://i.ytimg.com/vi/peBkDshxgYs/maxresdefault.jpg"); }
/* With three recordings, only the next one waits behind the front one; the third stays out of sight */
.deck .lecture.later { opacity: 0; }
.lecture::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .12) 58%, rgba(0, 0, 0, .28)), var(--still, none) center / cover no-repeat; }
.lecture .play, .lecture .l-cap { z-index: 1; }
.lecture .play { background: rgba(0, 0, 0, .5); }
.lecture .l-cap { color: rgba(255, 255, 255, .82); }
.lecture .l-cap strong { color: #fff; }
.lecture iframe { z-index: 2; }

/* The Map: under My services, the three tabs side by side, each with its services; a service opens its details card */
.map-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; margin: 10px 0 6px; }
.map-tabs [data-tone="teach"] { --c: var(--c-teach); } .map-tabs [data-tone="design"] { --c: var(--c-design); } .map-tabs [data-tone="consult"] { --c: var(--c-consult); }
.map-tab { display: block; font: 500 21px/1.2 var(--serif); color: var(--c); text-decoration: none; }
.map-tab:hover, .map-tab:focus-visible { color: var(--text); }
.map-group .map-tabs ul { grid-template-columns: minmax(0, 1fr); margin-top: 4px; }
p.map-ch { margin: 0; }
p.map-ch:hover { color: var(--text); }
@media (max-width: 520px) { .map-tabs { grid-template-columns: minmax(0, 1fr); gap: 10px; } .map-group .map-tabs ul { grid-template-columns: 1fr 1fr; gap: 2px 16px; } }

/* Trial: a testimonial between one solid and the next. The solid dims and the words stand over it. */
.solid-box { position: relative; display: grid; place-items: center; }
.solid-box #solid { transition: opacity 1.2s var(--ease); }
.solid-box.voiced #solid { opacity: .13; }
.solid-voice { position: absolute; inset: 0 -4%; margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: clamp(10px, 1.8vh, 16px); text-align: center; pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.solid-box.voiced .solid-voice { opacity: 1; transform: none; }
.solid-voice p { margin: 0; font: italic 500 clamp(19px, min(2.2vw, 3.4vh), 28px)/1.36 var(--serif); color: var(--text); text-wrap: balance; }
.solid-voice p::before { content: "\201C"; } .solid-voice p::after { content: "\201D"; }
.solid-voice small { max-width: 34ch; font: 600 10.5px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
@media (max-width: 900px) { .solid-voice { inset: 0 -22%; gap: 6px; } .solid-voice p { font-size: 16px; line-height: 1.3; } .solid-voice small { font-size: 9px; } }

/* ---------- The contact bar and its panel ---------- */
.bar { position: fixed; inset: auto 0 0 0; z-index: 50; height: var(--bar-h); display: flex; align-items: center; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line-2); transition: background-color .9s var(--ease), border-color .9s; }
.bar-in { width: min(1240px, 100% - 64px); margin-inline: auto; display: flex; align-items: center; gap: 12px 20px; }
.bar .btn { padding: 9px 18px; font-size: 14px; white-space: nowrap; }
.bar .btn:hover { transform: none; }
.bar-mail { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.bar-addr { font: 500 19px/1.2 var(--serif); color: var(--text); border-bottom: 1px solid var(--accent); transition: color .3s; }
.bar-addr:hover { color: var(--accent); }
.bar-one { display: none; }
.panel { position: fixed; right: max(24px, calc((100% - 1240px) / 2)); bottom: calc(var(--bar-h) + 10px); z-index: 55; width: min(430px, 100% - 24px); max-height: calc(100vh - var(--bar-h) - 90px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .85); transform: translateY(14px); opacity: 0; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.panel[hidden] { display: none; }
.panel.on { transform: none; opacity: 1; }
.panel-head { position: relative; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.panel-head .eyebrow { margin: 0 0 8px; }
.panel-head h3 { margin: 0; font: 500 26px/1.1 var(--serif); color: var(--text); outline: none; }
.panel-top { display: none; }
.panel-body.sheet-body { padding: 14px 20px 18px; font-size: 15px; }
.panel .req-body { height: 132px; min-height: 96px; }
.panel .req-actions { gap: 8px; margin: 12px 0 10px; }
.panel .req-actions .btn { font-size: 13px; padding: 8px 13px; }
.panel .sheet-body .note { margin-bottom: 0; }
.theming .bar, .theming .panel, .theming .bb { transition: background-color .8s, color .8s, border-color .8s; }

/* ---------- Narrow screens: one column; the object sits above the list, with the sketch beside it ---------- */
@media (max-width: 900px) {
  .svc-pane > .wrap, .about-pane > .wrap { width: auto; margin-inline: 16px 30px; }
  .top { background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 94%, transparent) 60%, transparent); }   /* a cabinet that scrolls inside itself passes under the top bar */
  .stage { --st-h: clamp(150px, 22vh, 230px); --me-h: calc(var(--st-h) + 4px); flex-direction: column; }
  .svc-head { position: static; width: auto; text-align: left; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 14px; margin: 0 0 8px; }
  .svc-head .eyebrow { display: none; }
  .svc-title { font-size: 30px; }
  .svc-head .r-avail { margin: 0; font-size: 15px; }
  .stage > .bb { margin-right: 0; }
  .tabs { height: 46px; box-sizing: border-box; gap: 22px; padding: 0 14px; }
  .tabs button { display: flex; align-items: center; padding: 0; font-size: 22px; }
  .bb-body { display: flex; flex-direction: column; }
  .bb-stage { order: -1; flex: none; height: var(--st-h); box-sizing: border-box; align-items: flex-start; padding: 6px 0 6px 12px; border-right: 0; }
  .bb .tetra { width: min(calc(var(--st-h) - 42px), 54vw); }
  .bb .solid-label { font-size: 15px; padding-left: 4px; text-align: left; }
  .bb-menu { padding: 0 14px 2px; border-top: 1px solid var(--line); }
  .bb[data-open="teach"] .items[data-col="teach"], .bb[data-open="design"] .items[data-col="design"], .bb[data-open="consult"] .items[data-col="consult"] { height: auto; gap: 8px; padding: 10px 0 8px; }
  .item { flex: none; max-height: none; }
  .item-btn { grid-template-columns: minmax(0, 1fr); row-gap: 7px; padding: 10px 14px 12px; }
  .item-a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 10px; row-gap: 3px; }   /* the name and "tap for details" share a line, the price sits under them */
  .item-name { grid-column: 1; grid-row: 1; font-size: 22px; }
  .item-hint { grid-column: 2; grid-row: 1; }
  .item-rate { grid-column: 1 / -1; font-size: 14px; }
  .item-b { padding-left: 0; border-left: 0; }
  .item-line { font-size: 16px; }
  .item-pts span { font-size: 13.5px; }
  .me { right: 2px; bottom: auto; top: calc(46px + var(--st-h) - var(--me-h)); }
  .bb-chev { position: absolute; left: 0; right: 0; bottom: 0; height: 42px; border-top: 1px solid var(--line); background: var(--bb); }
  .bb-chev svg { transform: rotate(-90deg); }
  .stage.detail-open .bb-chev { display: grid; }
  .stage.detail-open .bb-body { min-height: 64vh; }
  .bb-detail { bottom: 42px; border-radius: 0; scroll-margin-top: 118px; }   /* when it is scrolled into sight it stops under the top bar and the tabs */
  .stage.detail-open .me { opacity: 0; }
  .bb-detail { padding: 16px 16px 24px; }
  .bb-short, .bb-two { grid-template-columns: minmax(0, 1fr); }
  .bb-head { gap: 12px; margin-bottom: 14px; }
  .bb-icon { width: 50px; }
  .bb-head .bb-title { font-size: 28px; }
  .bb-short.wide, .bb-short:has(> .bb-side) { grid-template-columns: minmax(0, 1fr); }
  .deck { padding: 0 58px 16px 0; }
  .deck-next { width: 42px; height: 42px; }
  .bb-extra .deck .lecture .play { width: 52px; height: 52px; }
  .bb-extra .deck .lecture .play span { border-width: 9px 0 9px 15px; }
  .bb-extra .deck .lecture .l-cap strong { font-size: 17px; }
  .about-grid { display: flex; flex-direction: column; gap: 14px; }
  .ab-seal svg { width: 64px; }
  .about-pane .ab-title { font-size: 36px; }
  .ab-open { margin-top: 8px; font-size: 16.5px; }
  .ab-side .eyebrow { margin-bottom: 8px; }
  .ab-panel { padding: 14px; gap: 18px; }
  .ab-main .sky { height: auto; aspect-ratio: 1040 / 450; }
  /* One column: who he is, the figures, the CVs and links; the constellation comes last and has a view to itself */
  .ab-main { display: contents; }
  .ab-side { order: 0; } .ab-figs { order: 1; } .ab-more { order: 2; } .ab-sky { order: 3; } .ab-main .index { order: 4; }
  .ab-figs .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
  .ab-board .arc svg { max-height: 30vh; }
}
@media (max-width: 760px) {
  .bar-in { width: calc(100% - 32px); }
  .bar-book, .bar-mail, .bar-write { display: none; }
  .bar-one { display: block; width: 100%; text-align: center; padding: 12px 10px; font-size: 14.5px; }
  .panel { left: 8px; right: 8px; width: auto; }
  .panel-top { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 20px 14px; border-bottom: 1px solid var(--line); }
  .panel-top .btn { width: 100%; box-sizing: border-box; text-align: center; }
  .panel-top .bar-mail { display: flex; margin: 0; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  :root { --bar-h: 62px; --pane-pad: 10px; }
  .pane { padding: 70px 0 calc(var(--bar-h) + var(--pane-pad)); }
  .cab.home.pane { padding-bottom: calc(var(--bar-h) + 8px); }
  .cab-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cab-door b { font-size: 20px; }
  .ab-main .sky { aspect-ratio: 360 / 548; max-height: calc(100vh - 250px); }
  @supports (height: 100svh) { .ab-main .sky { max-height: calc(100svh - 250px); } }
  .ab-side .eyebrow { display: none; }
  .about-grid { gap: 12px; }
  .ab-figs .stats b { font-size: 28px; }
  .bb-extra .shelf { height: 172px; }   /* on a phone the spines are a fixed 150px tall, so the shelf is made tall enough to hold them */
  .home-id .hero-face { width: 78px; }
  .cab-door small { font-size: 11.5px; line-height: 1.35; }
}
@media (prefers-reduced-motion: reduce) {
  html.first-visit .me, html.first-visit .me.in { opacity: 1; transition: none; }
  .bb-body, .bb-menu, .bb-chev, .ab-panel, .panel, .bb .tetra, .item-btn { transition: none !important; }
  .item-btn:hover, .item-btn:focus-visible { transform: none !important; }
  .bb-detail, .bb-head, .bb-short > *, .bb-extra, .bb-text > .more { animation: none; }
}

/* The price on a details card is a button: it opens the form for that service (the booking pop-up where a service has no form) */
.bb-head button.bb-rate { -webkit-appearance: none; appearance: none; cursor: pointer; text-align: left; transition: background-color .3s, border-color .3s, transform .3s var(--ease); }
.bb-head button.bb-rate::after { content: "\00a0\2192"; letter-spacing: 0; }   /* tied to the last word, so the arrow never drops to a line of its own */
.bb-head button.bb-rate:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) { .bb-head button.bb-rate:hover { background: color-mix(in srgb, var(--accent) 26%, transparent); border-color: var(--accent); transform: translateY(-1px); } }

/* On a phone an open details card is part of the page, not a box that scrolls inside itself (that box kept the scroll to itself, so its end stayed
   under the contact bar). The boxes and the object step aside while it is open, and the page scrolls to the very end of the card. */
@media (max-width: 900px) {
  .stage.detail-open .bb-menu, .stage.detail-open .bb-stage { display: none; }
  .stage.detail-open .bb-body { min-height: 0; }
  .bb-detail { position: static; order: 2; overflow: visible; overscroll-behavior: auto; animation: fadein .35s var(--ease) both; }
  .bb-chev { position: static; order: 3; flex: none; }
}
@media (prefers-reduced-motion: reduce) { .bb-detail { animation: none; } .bb-head button.bb-rate { transition: none; } }

/* Light and dark: the page handles both itself. Saying so (here and in the head) keeps a browser's own dark mode from recolouring the light page. */
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: only light; }
/* The switch always shows its word, on a phone too, so that the choice is plain to see */
.pill.theme .lbl { display: inline; }
.pill.theme { white-space: nowrap; }

/* For Samsung Internet: it darkens any page that has no rule of this kind. Having one tells it the page looks after dark mode itself.
   The rule sets a value nothing uses, so nothing seen changes; light and dark are still chosen by the switch alone. */
@media (prefers-color-scheme: dark) { :root { --own-dark: 1; } }

/* Samsung Internet: its own dark mode darkens light pages and keeps their tint, so the cream would turn brown. There the light look uses neutral
   off-whites and greys instead; darkened, they turn charcoal. Accents, the drawing and everything else are unchanged. */
html.samsung[data-theme="light"] {
  --bg: #F4F4F3; --bg-2: #EAEAE8; --surface: #FBFBFA; --bb: #FFFFFF;
  --line: #D9D9D6; --line-2: #C2C2BE;
  --text: #1E1E1D; --text-2: #5C5C5A; --text-3: #8A8A87;
}

/* About me: a star can be pulled a little way and the web wobbles back (v87) */
#sky { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#sky .node { touch-action: none; }
#sky.pulling, #sky.pulling .node { cursor: grabbing; }

/* Under the Lectures deck: a link to the recording in front, on YouTube */
.deck-watch { margin: 4px 0 0; font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.deck-watch a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); padding-bottom: 2px; }
.deck-watch a:hover, .deck-watch a:focus-visible { border-bottom-color: var(--accent); }

/* The micro lesson on the Classes card: one recording on its own, under the shelf */
.bb-extra .lectures.solo { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.bb-extra .lectures.solo + .deck-watch { margin-top: 8px; }
.bb-extra .lectures.solo .lecture .play { width: 58px; height: 58px; top: 42%; }
.bb-extra .lectures.solo .lecture .play span { border-width: 10px 0 10px 17px; }
