/* ============================================================
   MATHLETE MTB
   Field-notes / trail-map design language. One palette for the
   whole site: a light paper nav bar over a dark charcoal-and-pine
   page (the "Lab" look), with trail-blaze rust as the accent.
   The page tokens are dark; .site-nav redefines them light.
   Every photo slot is a fixed-shape frame that crops to fit,
   so any photo (landscape or portrait) can drop in.
   ============================================================ */

:root {
  /* --- color: the page (dark) --- */
  --ink:          #ECEFE7;   /* primary text */
  --ink-soft:     #A8B4AA;   /* muted text */
  --text:         #D3DACF;   /* long-form text */
  --bg:           #131815;   /* charcoal */
  --panel:        #19201C;   /* banded sections */
  --cream:        #1E2622;   /* card surface */
  --rule:         rgba(236, 239, 231, 0.14);
  --rule-soft:    rgba(236, 239, 231, 0.08);
  --tint:         rgba(236, 239, 231, 0.05);   /* photo frame ground */
  --blaze:        #E36A40;   /* trail-blaze rust, brightened for dark */
  --blaze-dim:    #E8825E;
  --chalk:        #86B6D4;   /* chalkboard blue, teaching accent */
  --contour:      #C9A764;   /* elevation-line gold */
  --moss:         #8DBA74;   /* terrain green */
  --lab-deep:     #0D110F;   /* deepest ground: footer, feature bands */
  color-scheme: dark;

  /* --- type --- */
  --f-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --f-body:    'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;
  --f-serif:   'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;

  --wrap: 1100px;
  --measure: 680px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
/* `hidden` must always win over component display rules (e.g. members-only cards). */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blaze);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 16px;
  font-family: var(--f-mono);
  font-size: 13px;
}
.skip-link:focus { left: 16px; top: 12px; }

/* ---------- small type helpers ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blaze);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--blaze);
  display: inline-block;
  flex-shrink: 0;
}

.kicker {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blaze-dim);
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.kicker-flag {
  background: var(--ink);
  color: var(--cream);
  padding: 3px 7px 2px;
  letter-spacing: 0.14em;
}

.meta {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin: 0;
}

.label {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
}

.read-link {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--blaze);
  transition: color .15s ease;
}
.read-link:hover { color: var(--blaze); }

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--lab-deep);
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 26px;
  transition: background-color .15s ease;
}
.button:hover { background: var(--blaze); color: var(--lab-deep); }

/* ---------- nav ---------- */
/* The light surfaces: the nav bar and the tool player's top bar get
   paper tokens, scoped to the bar. */
.site-nav,
.player-bar {
  --ink:       #1F2B24;
  --ink-soft:  #48584B;
  --cream:     #F7F5EE;
  --rule:      rgba(31, 43, 36, 0.16);
  --blaze:     #C1502E;
  --blaze-dim: #A8431F;
  color-scheme: light;
  color: var(--ink);
}
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 240, 231, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand span { color: var(--blaze); }
.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--blaze);
  border-color: var(--blaze);
}
.nav-links .nav-cta a { color: var(--blaze); }
/* Member "Log in" button (shown only when signed out) */
.nav-links { align-items: center; }
.nav-links .nav-login a {
  display: inline-block;
  padding: 7px 14px;
  color: var(--ink);
  border: 1px solid var(--ink);
  transition: background-color .15s ease, color .15s ease;
}
.nav-links .nav-login a:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
/* "Book a Session": always in the bar */
.site-nav .nav-links { margin-left: auto; }
.nav-book {
  flex-shrink: 0;
  background: var(--blaze);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  padding: 9px 16px;
  transition: background-color .15s ease;
}
.nav-book:hover { background: var(--blaze-dim); }
.nav-book.active { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25); }
/* In-between widths (with the signed-in links showing): tighten the row and
   shorten "Private Tutoring" before switching to the two-row layout. */
@media (max-width: 1100px) and (min-width: 861px) {
  .site-nav .wrap { gap: 18px; }
  .nav-links { gap: 18px; }
  .nav-long { display: none; }
}
/* Narrow screens: brand and "Book a Session" on top, every other link in a
   row below that scrolls sideways if it doesn't fit. */
@media (max-width: 860px) {
  html { scroll-padding-top: 116px; }
  .site-nav .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; gap: 0 16px; }
  .site-nav .nav-links {
    order: 3;
    width: 100%;
    margin: 8px 0 0;
    padding: 6px 0 10px;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav .nav-links::-webkit-scrollbar { display: none; }
  .nav-links .nav-login a { display: inline; padding: 0 0 4px; border: 0; border-bottom: 1px solid transparent; color: var(--ink-soft); }
  .nav-links .nav-login a:hover { background: none; color: var(--blaze); border-color: var(--blaze); }
}
@media (max-width: 420px) {
  .nav-links { gap: 18px; font-size: 12px; }
  .nav-book { font-size: 11.5px; padding: 8px 12px; }
}

/* ---------- photo frames (crop to fill) ---------- */
.fig-frame {
  display: block;
  overflow: hidden;
  background: var(--tint);
  cursor: zoom-in;
}
.fig-frame img,
.exp-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fig-frame img { transition: transform .8s cubic-bezier(.2, .6, .2, 1), opacity .3s ease; }
.fig-frame:hover img { opacity: 0.93; }
.service-media .fig-frame:hover img,
.album-tile .fig-frame:hover img { transform: scale(1.03); opacity: 1; }

.img-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 120px;
  padding: 16px;
  background: var(--tint);
  color: var(--ink-soft);
  font-family: var(--f-mono);
  font-size: 12px;
  text-align: center;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 72px;
}
.contour-field path { stroke: var(--ink); }
.contour-field path:nth-child(2) { stroke: var(--moss); }
.contour-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
}
.hero-logo {
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 8px 0 28px;
}
.hero-title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(40px, 6.4vw, 78px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 26px;
}
.hero-title span { color: inherit; }   /* headings are one colour (white) */
.hero-lede {
  font-family: var(--f-serif);
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.45;
  color: var(--ink);
  max-width: 34rem;
  margin: 0 0 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 26px;
}
.hero-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--f-mono);
  font-size: 13.5px;
}
.hero-contact a {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color .15s ease, color .15s ease;
}
.hero-contact a:hover { color: var(--blaze); border-color: var(--blaze); }
@media (max-width: 820px) {
  .hero { padding: 48px 0; }
}

/* ---------- inner-page header (about.html) ---------- */
.page-head {
  position: relative;
  overflow: hidden;
  padding: 88px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.page-head .wrap { position: relative; z-index: 1; }
.page-title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(56px, 10vw, 128px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 8px 0 28px;
}
.page-head .hero-lede { margin-bottom: 0; }
@media (max-width: 640px) { .page-head { padding: 56px 0 40px; } }

/* ---------- wide photograph band ---------- */
.band { margin: 0; }
.band .fig-frame { aspect-ratio: 21 / 9; max-height: 78vh; width: 100%; }
.band figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-soft);
}
@media (max-width: 640px) { .band .fig-frame { aspect-ratio: 4 / 3; } }

/* ---------- sections ---------- */
.section { padding: 104px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section--panel { background: var(--panel); }
@media (max-width: 640px) { .section { padding: 64px 0; } }

/* label column + content column */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr);
  gap: 24px 56px;
}
.split + .split { margin-top: 80px; }
.split-label {
  align-self: start;
  position: sticky;
  top: 100px;
  padding-top: 14px;
  border-top: 3px solid var(--ink);
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split-label { position: static; }
}

.prose { max-width: var(--measure); }
.prose p {
  font-family: var(--f-serif);
  font-size: 21px;
  line-height: 1.66;
  color: var(--text);
  margin: 0 0 1.1em;
}
.prose h3 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  text-transform: uppercase;
  margin: 1.8em 0 0.6em;
}
.prose h3:first-child { margin-top: 0; }
@media (max-width: 640px) { .prose p { font-size: 19px; } }

/* section header for full-width sections */
.head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  align-items: end;
  gap: 0 48px;
  padding-bottom: 24px;
  margin-bottom: 64px;
  border-bottom: 1px solid var(--ink);
}
.head .eyebrow { grid-column: 1 / -1; }
.head-title { font-size: clamp(42px, 6.4vw, 80px); line-height: 0.9; }
.head-title:last-child { grid-column: 1 / -1; }
.head-note {
  font-family: var(--f-serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}
@media (max-width: 760px) {
  .head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 44px; }
}

/* ---------- pull quote ---------- */
.pullquote {
  margin: 56px 0 0;
  padding: 1.1em 0 1.2em;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.pullquote blockquote { margin: 0; }
.pullquote blockquote p {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(30px, 4.2vw, 42px);
  line-height: 1.08;
  color: var(--ink);
  text-wrap: balance;
}
.pullquote blockquote p::before { content: '\201C'; color: var(--blaze); }
.pullquote blockquote p::after { content: '\201D'; color: var(--blaze); }
.pullquote p.pullquote-cite {
  margin: 14px 0 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.pullquote p.pullquote-cite::before { content: '\2014  '; }

/* ---------- services (alternating photo + text rows) ---------- */
.service {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.service + .service {
  margin-top: 88px;
  padding-top: 88px;
  border-top: 1px solid var(--rule);
}
.service:nth-of-type(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.service:nth-of-type(even) .service-media { order: 2; }

.service-media {
  aspect-ratio: 3 / 2;
  display: grid;
  gap: 6px;
}
.service-media--n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.service-media--n3 .fig-frame:first-child { grid-row: 1 / -1; }
.service-media .fig-frame { min-height: 0; height: 100%; }

.service-text .kicker { margin-bottom: 16px; }
.service-num { color: var(--ink); }
.service-num::after { content: '/'; color: var(--rule); margin-left: 10px; }
.service-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.service-desc {
  font-family: var(--f-serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.service-points {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule-soft);
}
.service-points li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 15px;
  color: var(--ink-soft);
}
.service-points strong { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
  .service,
  .service:nth-of-type(even) { grid-template-columns: 1fr; gap: 28px; }
  .service:nth-of-type(even) .service-media { order: 0; }
  .service + .service { margin-top: 56px; padding-top: 56px; }
}

/* ---------- tutoring details ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 56px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
@media (max-width: 760px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-grid h3 { margin: 0 0 18px; }

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.check-list li {
  position: relative;
  padding: 10px 0 10px 26px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 16px;
  color: var(--text);
}
.check-list li:first-child { padding-top: 0; }
.check-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.95em;
  width: 9px;
  height: 9px;
  border: 2px solid var(--blaze);
  border-radius: 50%;
}
.check-list li:first-child::before { top: 0.35em; }

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pill {
  font-family: var(--f-mono);
  font-size: 12.5px;
  padding: 7px 12px;
  border: 1px solid var(--rule);
  background: var(--cream);
  color: var(--ink);
}
.pill--physics { border-color: rgba(134, 182, 212, 0.45); color: var(--chalk); }

/* ---------- learning tools: card grid ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 960px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tool-grid { grid-template-columns: 1fr; } }

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--rule);
  min-width: 0;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .2s ease, box-shadow .2s ease;
}
.tool-card > summary {
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  list-style: none;
}
.tool-card > summary::-webkit-details-marker { display: none; }
.tool-card:not(.tool-card--soon):hover {
  border-color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.7);
}
.tool-card > summary:focus-visible { outline: 2px solid var(--blaze); outline-offset: 3px; }

.tool-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--tint);
  border-bottom: 1px solid var(--rule);
}
.tool-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .8s cubic-bezier(.2, .6, .2, 1);
}
.tool-card:not(.tool-card--soon):hover .tool-thumb img { transform: scale(1.03); }

.tool-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 20px 22px 22px;
}
.tool-card-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 30px;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 2px 0 0;
}
.tool-card-desc {
  display: block;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.tool-card-more {
  margin-top: auto;
  padding-top: 8px;
  align-self: flex-start;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--blaze);
  padding-bottom: 3px;
}
.tool-card:hover .tool-card-more { color: var(--blaze); }

/* "#fried" in the Focus Training heading */
.hashtag { color: var(--blaze); text-transform: none; }

/* placeholders for tools still being built */
.tool-card--soon { background: transparent; border-style: dashed; }
.tool-card--soon .tool-thumb { opacity: 0.7; }
.tool-card--soon .tool-card-title { color: var(--ink-soft); }
.tool-card--idea {
  justify-content: center;
  border: 1px dashed var(--contour);
  background: rgba(176, 141, 79, 0.08);
}
.tool-card--idea .tool-card-body { justify-content: center; flex: 0; }

/* full description: in place without JS, in the pop-up with JS */
.tool-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 24px 22px 28px;
  border-top: 1px solid var(--rule);
}
.tool-card .tool-detail { grid-template-columns: 1fr; gap: 20px; }
.tool-shot { margin: 0; }
.tool-shot .fig-frame { border: 1px solid var(--rule); }
.tool-shot img { height: auto; }
.tool-shot figcaption { margin-top: 10px; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 22px; padding: 0; }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; margin-top: 28px; }

.tool-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  overflow: auto;
}
.tool-dialog::backdrop { background: rgba(17, 23, 19, 0.72); }
.tool-dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 26px 28px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.tool-dialog-head .kicker { margin-bottom: 10px; }
.tool-dialog-head .service-title { margin: 0; }
.tool-dialog-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  cursor: pointer;
}
.tool-dialog-close:hover { border-color: var(--ink); }
.tool-dialog .tool-detail { border-top: 0; padding: 28px; }
@media (max-width: 760px) {
  .tool-dialog .tool-detail { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .tool-dialog-head { padding: 20px; }
}
body.dialog-open { overflow: hidden; }

/* ---------- photo album ---------- */
.album {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(60px, 7.4vw, 100px);
  grid-auto-flow: dense;
  gap: 20px 14px;
}
.album-tile {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  grid-column: span 4;
  grid-row: span 5;
}
.album-tile .fig-frame { flex: 1; min-height: 0; }
/* repeating 7-tile rhythm: one large, two stacked, three tall, one panorama */
.album-tile:nth-child(7n + 1) { grid-column: span 7; grid-row: span 6; }
.album-tile:nth-child(7n + 2),
.album-tile:nth-child(7n + 3) { grid-column: span 5; grid-row: span 3; }
.album-tile:nth-child(7n + 7) { grid-column: 1 / -1; grid-row: span 5; }
.album-tile figcaption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-tile figcaption .kicker { display: inline; flex-shrink: 0; font-size: 10.5px; }
@media (max-width: 700px) {
  .album { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; gap: 18px 10px; }
  .album-tile,
  .album-tile:nth-child(n) { grid-column: span 1; grid-row: auto; }
  .album-tile .fig-frame { flex: none; aspect-ratio: 4 / 5; }
  .album-tile:nth-child(7n + 1),
  .album-tile:nth-child(7n + 6),
  .album-tile:nth-child(7n + 7) { grid-column: 1 / -1; }
  .album-tile:nth-child(7n + 1) .fig-frame,
  .album-tile:nth-child(7n + 6) .fig-frame,
  .album-tile:nth-child(7n + 7) .fig-frame { aspect-ratio: 3 / 2; }
  .album-tile figcaption { white-space: normal; flex-wrap: wrap; gap: 2px 8px; font-size: 13px; }
}

/* ---------- experience ---------- */
.exp-list { list-style: none; margin: 0; padding: 0; }
.exp {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.exp:first-child { padding-top: 14px; }
.exp:last-child { border-bottom: 0; }
.exp--plain { grid-template-columns: 1fr; }
.exp-photo { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.exp-body .meta { margin-bottom: 8px; }
.exp-role {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.exp-org { margin: 0; font-size: 16px; color: var(--ink-soft); }
.exp-co { color: var(--blaze-dim); font-weight: 600; }
@media (max-width: 560px) {
  .exp { grid-template-columns: 104px minmax(0, 1fr); gap: 18px; align-items: start; }
  .exp--plain { grid-template-columns: 1fr; }
}

/* ---------- student stories ---------- */
.story .pullquote { margin-top: 0; }
.story-full {
  margin-top: 28px;
  font-family: var(--f-serif);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.story-full p { margin: 0 0 1em; }
.story-full summary {
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  list-style: none;
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--blaze);
  margin-bottom: 18px;
}
.story-full summary::-webkit-details-marker { display: none; }
.story-full summary:hover { color: var(--blaze); }
.story-full[open] summary .more { display: none; }
.story-full:not([open]) summary .less { display: none; }

/* ---------- contact ---------- */
.contact {
  background: var(--lab-deep);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.contact .contour-field { opacity: 0.35; }
.contact .wrap { position: relative; z-index: 1; }
.contact .eyebrow { color: var(--contour); }
.contact .eyebrow::before { background: var(--contour); }
.contact-title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(44px, 8vw, 96px);
  line-height: 0.9;
  text-transform: uppercase;
  margin: 0 0 28px;
}
.contact-lede {
  font-family: var(--f-serif);
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.5;
  color: rgba(247, 245, 238, 0.82);
  max-width: 36rem;
  margin: 0 0 40px;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 36px;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 14px;
}
.contact-links a {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid rgba(247, 245, 238, 0.3);
  padding-bottom: 2px;
}
.contact-links a:hover { border-color: var(--blaze); color: var(--blaze); }
.contact .button { background: var(--blaze); color: var(--lab-deep); border: 0; padding-bottom: 15px; }
.contact .button:hover { background: var(--blaze-dim); color: var(--lab-deep); }

/* ---------- footer ---------- */
.footer {
  padding: 32px 0 36px;
  background: var(--lab-deep);
  border-top: 1px solid rgba(247, 245, 238, 0.12);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: rgba(247, 245, 238, 0.55);
}
.footer a { color: rgba(247, 245, 238, 0.75); text-decoration: none; }
.footer a:hover { color: var(--blaze); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: rgba(17, 23, 19, 0.97);
  color: var(--ink);
}
.lightbox::backdrop { background: rgba(17, 23, 19, 0.9); }
.lb-stage {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 64px 88px 28px;
}
.lb-img {
  max-width: 100%;
  max-height: calc(100dvh - 170px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lb-caption {
  max-width: 640px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(247, 245, 238, 0.8);
  min-height: 1.5em;
}
.lb-count {
  position: absolute;
  top: 24px;
  left: 28px;
  margin: 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(247, 245, 238, 0.65);
}
.lb-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(247, 245, 238, 0.28);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.lb-btn:hover { border-color: var(--ink); background: rgba(247, 245, 238, 0.06); }
.lb-close { top: 14px; right: 16px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox[data-single] .lb-prev,
.lightbox[data-single] .lb-next,
.lightbox[data-single] .lb-count { display: none; }
@media (max-width: 640px) {
  .lb-stage { padding: 64px 12px 88px; }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}
body.lb-open { overflow: hidden; }

/* ============================================================
   MEMBER LOGIN (login.html, account.html)
   ============================================================ */
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }

.tool-card--members {
  justify-content: center;
  background: var(--lab-deep);
  border-color: var(--blaze);
  color: var(--ink);
}
.tool-card--members .tool-card-body { justify-content: center; flex: 0; }
.tool-card--members .kicker { color: var(--contour); }
.tool-card--members .tool-card-desc { color: var(--ink-soft); }
.tool-card--members .tool-card-more { border-color: var(--blaze); }
.tool-card--members:hover .tool-card-more { color: #F0A07F; }

.form-panel { max-width: 480px; }
.form { display: grid; gap: 20px; }
.form--sub {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.input {
  width: 100%;
  font: inherit;
  font-size: 17px;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid rgba(236, 239, 231, 0.3);
  border-radius: 0;
}
.input:focus { outline: 2px solid var(--blaze); outline-offset: 1px; border-color: var(--ink); }
.input:disabled { opacity: 0.55; }
.field-hint { margin: 0; font-size: 13px; color: var(--ink-soft); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 4px; }
button.button { border: 0; cursor: pointer; }
button.button:disabled { opacity: 0.6; cursor: progress; }
.link-button {
  background: none;
  border: 0;
  padding: 0 0 3px;
  font: inherit;
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}
.link-button:hover { color: var(--blaze); border-color: var(--blaze); }
.form-note { margin: 28px 0 0; font-size: 15px; color: var(--ink-soft); }
.form .form-note { margin: 0; }
.form-note a { color: var(--ink); }
.form-note a:hover { color: var(--blaze); }

.notice {
  margin: 0 0 24px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.5;
  border-left: 3px solid var(--chalk);
  background: rgba(134, 182, 212, 0.1);
  color: var(--ink);
}
.notice--error { border-color: var(--blaze); background: rgba(227, 106, 64, 0.1); }
.notice--success { border-color: var(--moss); background: rgba(141, 186, 116, 0.1); }

/* ============================================================
   TOOL PLAYER (tool.html)
   ============================================================ */
body.player {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.player-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 56px;
  padding: 0 20px;
  background: #F3F0E7;
  border-bottom: 1px solid var(--rule);
}
.player-title {
  flex: 1;
  min-width: 0;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-links { display: flex; gap: 20px; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.player-links a { color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.player-links a:hover { color: var(--blaze); }
.player-main { flex: 1; min-height: 0; display: flex; }
.player-frame { flex: 1; width: 100%; height: 100%; border: 0; background: #fff; }
.player-state {
  margin: auto;
  max-width: 560px;
  padding: 48px 24px;
}
.player-state-title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 0.92;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.player-state-text { font-family: var(--f-serif); font-size: 19px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.player-state-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 28px 0 0; }
.player-state-actions .read-link { margin-top: 0; }
@media (max-width: 560px) {
  .player-bar { gap: 12px; padding: 0 14px; }
  .player-title { display: none; }
  .player-links { margin-left: auto; }
}

/* ============================================================
   COLLEGE & BEYOND (college-beyond.html)
   ============================================================ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.page-head--service .hero-title { max-width: 15ch; margin-top: 8px; }
.page-head--service .hero-lede { max-width: 40rem; margin-bottom: 32px; }
.page-head--service .read-link { margin-top: 0; }

/* homepage service card: a single illustration that links to the page */
.service-media--one { aspect-ratio: 3 / 2; }
.fig-frame--link { cursor: pointer; }

.cb-list { margin-top: 12px; max-width: var(--measure); }

/* outcomes: numbered list */
.outcome-list {
  list-style: none;
  counter-reset: outcome;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
}
.outcome-list li {
  counter-increment: outcome;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--f-serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--text);
}
.outcome-list li:first-child { padding-top: 12px; }
.outcome-list li::before {
  content: counter(outcome, decimal-leading-zero);
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--blaze-dim);
  padding-top: 0.45em;
}
@media (max-width: 640px) { .outcome-list li { font-size: 18px; grid-template-columns: 36px minmax(0, 1fr); } }

/* four pillars */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 760px) { .pillar-grid { grid-template-columns: 1fr; } }
.pillar {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  padding: 24px 26px 28px;
}
.pillar-title,
.option-title,
.step-title {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
}
.pillar-title { font-size: clamp(30px, 3.4vw, 38px); margin: 14px 0 14px; }
.pillar p:not(.kicker) {
  margin: 0;
  font-family: var(--f-serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* how it works */
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
@media (max-width: 960px) { .step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .step-list { grid-template-columns: 1fr; gap: 28px; } }
.step { padding-top: 16px; border-top: 1px solid var(--ink); }
.step-num {
  display: block;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 56px;
  line-height: 1;
  color: var(--blaze);
}
.step-title { font-size: 26px; margin: 12px 0 10px; }
.step p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }

/* program options */
.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 960px) { .option-grid { grid-template-columns: 1fr; max-width: 560px; } }
.option {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 24px 24px 26px;
  min-width: 0;
}
.option-title { font-size: 32px; margin: 14px 0 6px; }
.option-price { margin: 4px 0 0; font-family: var(--f-mono); font-size: 15px; color: var(--ink); }
.option-price span { color: var(--ink-soft); font-size: 13px; }
.option-detail { margin: 14px 0 0; }
.option-detail dt {
  margin-top: 16px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blaze-dim);
}
.option-detail dd { margin: 6px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--text); }
.option-points { list-style: none; margin: 0; padding: 0; }
.option-points li {
  padding: 7px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 15px;
  color: var(--ink-soft);
}
.option-detail { flex: 1; }
.option .read-link { margin-top: 24px; align-self: flex-start; }

/* FAQs */
.faq-list { max-width: var(--measure); border-top: 1px solid var(--ink); }
.faq { border-bottom: 1px solid var(--rule); }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  flex-shrink: 0;
  font-family: var(--f-mono);
  font-size: 20px;
  line-height: 1;
  color: var(--blaze);
}
.faq[open] .faq-q::after { content: '\2212'; }
.faq-q:hover { color: var(--blaze); }
.faq-q:focus-visible { outline: 2px solid var(--blaze); outline-offset: 3px; }
.faq p {
  margin: -4px 0 20px;
  font-family: var(--f-serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
}
.faq a, .prose a:not(.read-link) { color: var(--ink); text-decoration-color: var(--blaze); text-underline-offset: 3px; }
.faq a:hover, .prose a:not(.read-link):hover { color: var(--blaze); }

/* inquiry form */
.inquiry-title { font-size: clamp(36px, 4.4vw, 52px); line-height: 0.95; }
.inquiry-label .eyebrow { margin-bottom: 14px; }
.inquiry-lede {
  margin: 18px 0 0;
  font-family: var(--f-serif);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.form-panel--wide { max-width: 620px; }
.form-panel--wide .notice:focus { outline: 2px solid var(--blaze); outline-offset: 2px; }
.req { color: var(--blaze-dim); }
.field label .optional { text-transform: none; letter-spacing: 0; color: var(--ink-soft); }
.choice-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.choice-group legend {
  padding: 0;
  margin-bottom: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.choice-group .field-hint { margin-bottom: 4px; }
.choices { display: grid; gap: 4px; }
.choices--row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.field .choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  min-height: 44px;
  font-family: var(--f-body);
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
}
.choice input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}
.choice input:focus-visible { outline: 2px solid var(--blaze); outline-offset: 2px; }
.choice--consent { padding-top: 4px; }
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23A8B4AA' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
textarea.input { resize: vertical; min-height: 120px; line-height: 1.5; }
.input[aria-invalid="true"] { border-color: var(--blaze); border-width: 2px; padding: 12px 13px; }
.choice-group[aria-invalid="true"] legend,
.field:has(> .field-error:not([hidden])) > label { color: var(--blaze-dim); }
.field-error {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--blaze-dim);
}
.field-error::before { content: '! '; font-family: var(--f-mono); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact--short { padding: 72px 0; }
.contact--short .contact-title { font-size: clamp(36px, 6vw, 64px); }

/* ---------- homepage: Learning Lab call-out (dark band on the light site) ---------- */
.lab-callout {
  border: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 40px;
  padding: 24px 28px;
  background: #19201C;
  color: #ECEFE7;
}
.lab-callout p { margin: 0; font-size: 16px; max-width: 36rem; }
.lab-callout strong {
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.lab-callout .button { background: #ECEFE7; color: #131815; }
.lab-callout .button:hover { background: var(--blaze); color: #131815; }

/* hero: secondary link beside the main button, contact line below */
.hero-actions .hero-link { margin-top: 0; }
.hero .hero-contact { margin-top: 24px; }

/* ============================================================
   TUTORING & BOOKING
   Homepage offer cards, subject cards (homepage and tutoring.html),
   the virtual-session photo feature, and the booking page.
   ============================================================ */

/* two offers: Private Tutoring / The Mathlete Lab */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 760px) { .offer-grid { grid-template-columns: 1fr; } }
.offer {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--blaze);
  padding: 28px 28px 30px;
}
.offer-title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(36px, 4.4vw, 52px);
  line-height: 0.92;
  text-transform: uppercase;
  margin: 14px 0 14px;
}
.offer p:not(.kicker) {
  margin: 0;
  font-family: var(--f-serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  flex: 1;
}
.offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 26px; }
.offer-actions .read-link { margin-top: 0; }
.offer--lab { background: var(--lab-deep); color: var(--ink); border-color: var(--rule); border-top-color: var(--moss); }
.offer--lab .kicker { color: #8DBA74; }
.offer--lab p:not(.kicker) { color: #C3CCC0; }
.offer--lab .button { background: #ECEFE7; color: #131815; }
.offer--lab .button:hover { background: #E36A40; color: #131815; }
.offer--lab .read-link { border-color: #8DBA74; }
.offer--lab .read-link:hover { color: #8DBA74; }

/* subject cards; each links to book.html?subject=... */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 960px) { .subject-grid { grid-template-columns: 1fr; max-width: 560px; } }
.subject-card {
  --subject: var(--blaze);
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--subject);
  padding: 24px 24px 26px;
  min-width: 0;
}
.subject-card--physics { --subject: var(--chalk); }
.subject-card--sat { --subject: var(--contour); }
.subject-card .kicker { color: var(--ink-soft); }
.subject-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 36px;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 12px 0 14px;
}
.subject-card .option-points { flex: 1; }
.subject-card .button { margin-top: 24px; align-self: flex-start; }

/* a large photo beside text */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 32px; } }
.feature-photo { margin: 0; }
.feature-photo .fig-frame { aspect-ratio: 4 / 3; }
.feature-photo figcaption { margin-top: 10px; }
.feature--portrait { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
@media (max-width: 860px) { .feature--portrait { grid-template-columns: 1fr; } }
.feature--portrait .fig-frame { aspect-ratio: 4 / 5; max-width: 360px; }
.feature .prose .label { margin-bottom: 22px; }

.step-list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .step-list--3 { grid-template-columns: 1fr; gap: 28px; } }
.step-actions { margin-top: 32px; }
.step-note { margin: 40px 0 0; max-width: var(--measure); font-family: var(--f-serif); font-size: 19px; line-height: 1.5; color: var(--ink-soft); }

/* prices, shown only when set in js/booking-config.js */
.price-box { margin-top: 28px; padding: 18px 22px; border: 1px solid var(--rule); background: var(--cream); max-width: 420px; }
.price-box dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; margin: 10px 0 0; }
.price-box dt { font-size: 15.5px; color: var(--text); }
.price-box dd { margin: 0; font-family: var(--f-mono); font-size: 15px; color: var(--ink); }
.price-box .form-note { margin-top: 12px; font-size: 13.5px; }

/* final booking band (reuses .contact) */
.contact-links .button { border-bottom: 0; }

/* ---------- booking page ---------- */
.book-step + .book-step { margin-top: 64px; }
.book-step-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.book-step-num { font-family: var(--f-display); font-weight: 900; font-size: 44px; line-height: 1; color: var(--blaze); }
.book-step-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(28px, 3.4vw, 38px); line-height: 1; text-transform: uppercase; margin: 0; }
.subject-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
@media (max-width: 760px) { .subject-picks { grid-template-columns: 1fr; } }
.subject-pick { position: relative; display: block; cursor: pointer; }
.subject-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.subject-pick-body {
  display: block;
  height: 100%;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--subject, var(--blaze));
  padding: 18px 20px 20px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.subject-pick--physics { --subject: var(--chalk); }
.subject-pick--sat { --subject: var(--contour); }
.subject-pick-name { display: block; font-family: var(--f-display); font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; }
.subject-pick-desc { display: block; margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }
.subject-pick:hover .subject-pick-body { border-color: var(--ink); border-top-color: var(--subject, var(--blaze)); }
.subject-pick input:focus-visible + .subject-pick-body { outline: 2px solid var(--blaze); outline-offset: 2px; }
.subject-pick input:checked + .subject-pick-body {
  border-color: var(--ink);
  border-top-color: var(--subject, var(--blaze));
  box-shadow: inset 0 0 0 1px var(--ink);
}
.subject-pick input:checked + .subject-pick-body .subject-pick-name::after { content: '  \2713'; color: var(--blaze); }
.book-pick-hint { margin-top: 20px; }
.book-note { margin: 0 0 20px; max-width: var(--measure); font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.book-calendar { min-height: 720px; background: var(--cream); border: 1px solid var(--rule); }
.book-calendar .calendly-inline-widget, .book-calendar iframe { min-height: 720px; height: 720px; width: 100%; }
.book-loading { margin: 0; padding: 32px 24px; font-family: var(--f-mono); font-size: 13px; color: var(--ink-soft); }
.book-fallback { padding: 24px 26px; border: 1px solid var(--rule); border-left: 4px solid var(--blaze); background: var(--cream); max-width: 720px; }
.book-fallback p { margin: 0 0 16px; font-size: 16px; line-height: 1.55; }
.book-fallback .button { margin-top: 4px; }
.book-done:focus { outline: 2px solid var(--blaze); outline-offset: 2px; }
.book-done { margin-bottom: 24px; }
.book-done .read-link { margin-top: 12px; }
.book-privacy { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--rule); max-width: var(--measure); }
.book-privacy h2 { margin-bottom: 14px; }
.book-privacy p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }
.section--offers { padding-top: 0; }
.book-fallback .form-note { margin: 16px 0 0; }
@media (max-width: 480px) { .nav-long { display: none; } }
