/* ============================================================
   scoooba.com — the hub
   Calm, editorial "diving as physics" identity. Deliberately
   distinct from Diver's Gambit (dark abyss + brass) and
   Reef Cartographer (nautical chart + coral): cool paper,
   blue-slate ink, one azure accent, monospace for data.
   Fonts: Newsreader (display) / Instrument Sans (body) /
   IBM Plex Mono (data). One shared stylesheet — edit here once.
   ============================================================ */

:root {
  --paper:      #eef1f3;
  --paper-2:    #f8fafb;
  --ink:        #122230;
  --ink-soft:   #4a5965;
  --azure:      #1862a6;
  --azure-bright:#2b80cf;
  --line:       #d6dde1;
  --line-soft:  #e4e9ec;

  /* dark chrome (header + footer) — dark on every page */
  --chrome-bg:       #0f2330;
  --chrome-ink:      #e9eef2;
  --chrome-ink-soft: #9fb2bf;
  --chrome-azure:    #79c0ff;
  --chrome-line:     #243744;

  /* course-world accent hints */
  --dg-deep:  #0a232e;
  --dg-brass: #c79a4e;
  --rc-coral: #e0633c;

  --radius: 16px;
  --maxw:   1100px;

  --serif: "Newsreader", Georgia, serif;
  --sans:  "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

a { color: var(--azure); text-decoration: none; }
a:hover { color: var(--azure-bright); }

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

/* --- shared mark (three ascending bubbles, the "ooo") --- */
.mark { width: 26px; height: 26px; }
.mark circle { fill: none; stroke: currentColor; stroke-width: 6.5; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--chrome-bg) 90%, transparent);
  border-bottom: 1px solid var(--chrome-line);
  backdrop-filter: saturate(140%) blur(10px);
}
.topbar .bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--chrome-azure);
  font-family: var(--mono); font-weight: 500; letter-spacing: .02em; font-size: .95rem; }
.brand span { color: var(--chrome-ink); }
.nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { font-family: var(--mono); font-size: .82rem; letter-spacing: .04em;
  color: var(--chrome-ink-soft); text-transform: lowercase; }
.nav a:hover { color: var(--chrome-ink); }
.nav .nav-cta { color: var(--chrome-azure); }
/* Mobile menu button — hidden by default; only the html.js + ≤600px block below
   reveals it, so with JS off the button never shows and the wrapped nav row stands. */
.nav-toggle { display: none; background: none; border: 0; padding: 6px; margin: -6px -6px -6px 0;
  color: var(--chrome-ink); cursor: pointer; line-height: 0; -webkit-tap-highlight-color: transparent; }
.nav-toggle svg { display: block; width: 24px; height: 24px; }
.nav-toggle svg line { stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  transform-box: fill-box; transform-origin: center; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] svg line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] svg line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] svg line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  padding: clamp(72px, 13vh, 150px) 0 clamp(64px, 11vh, 130px);
  background:
    radial-gradient(120% 80% at 80% -10%, rgba(43,128,207,.10), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, #e6ebee 100%);
  overflow: hidden;
}
.eyebrow {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--azure); margin: 0 0 18px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(3.1rem, 9vw, 6.4rem); line-height: .96;
  letter-spacing: -.015em; margin: 0 0 26px; color: var(--ink);
}
.lede {
  font-size: clamp(1.15rem, 2.3vw, 1.6rem); line-height: 1.5;
  color: var(--ink-soft); max-width: 30ch; margin: 0 0 38px;
}
.lede em {
  font-style: normal; color: var(--ink); font-weight: 500;
  box-shadow: inset 0 -.42em 0 rgba(43,128,207,.16);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* hero bubble mark — the three O's, scaled up and rising on the right */
.hero .hero-inner { position: relative; z-index: 2; }
.hero-aside {
  position: absolute; top: 50%; right: clamp(40px, 10vw, 150px);
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  z-index: 0;
}
.hero-bubbles {
  height: min(64vh, 480px); width: auto;
  color: var(--azure-bright); pointer-events: none; display: block;
}
.hero-bubble-link {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .03em;
  color: var(--azure); display: inline-flex; align-items: center; gap: 6px;
}
.hero-bubble-link:hover { color: var(--azure-bright); }
.hero-bubble-link svg { width: 14px; height: 14px; }

/* depth-gauge motif, quiet, right edge */
.depthscale {
  position: absolute; right: clamp(14px, 4vw, 54px); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 30px;
  font-family: var(--mono); font-size: .7rem; color: rgba(74,89,101,.42);
}
.depthscale span { position: relative; padding-left: 24px; }
.depthscale span::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 16px; height: 1px;
  background: rgba(74,89,101,.42);
}
.depthscale span[data-m="0"]::before { width: 22px; background: var(--azure); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px;
  font-family: var(--sans); font-weight: 500; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--azure); color: #fff; }
.btn-primary:hover { background: var(--azure-bright); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }

/* ---------------- section scaffolding ---------------- */
section { padding: clamp(64px, 10vw, 110px) 0; }
.section-tag {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--azure); margin: 0 0 22px;
}
h1, h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.08;
  letter-spacing: -.01em; color: var(--ink); margin: 0;
}

/* ---------------- about ---------------- */
.about { background: var(--paper); }
.about-grid {
  display: grid; grid-template-columns: 1.55fr .95fr; gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.about-copy p { color: var(--ink-soft); margin: 0 0 20px; max-width: 60ch; }
.about-copy p:last-child { margin-bottom: 0; }
.about-copy a { box-shadow: inset 0 -1px 0 rgba(24,98,166,.35); }

.about-side { position: sticky; top: 92px; }
.portrait {
  margin: 0 0 28px;
  background: var(--paper-2); padding: 12px 12px 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 18px 40px -24px rgba(18,34,48,.45);
}
.portrait img { width: 100%; height: auto; border-radius: 8px; }
.portrait figcaption {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .03em;
  color: var(--ink-soft); padding: 12px 4px 14px; text-align: center;
}

/* credential timeline — depth-gauge styling */
.timeline-label {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--azure); margin: 0 0 14px;
}
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.timeline li {
  position: relative; padding: 9px 0 9px 26px;
  display: flex; gap: 14px; align-items: baseline;
}
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 16px; width: 13px; height: 1px;
  background: var(--line);
}
.timeline li:first-child::before { background: var(--azure); }
.timeline .yr {
  font-family: var(--mono); font-size: .82rem; font-weight: 500;
  color: var(--azure); min-width: 3.2ch;
}
.timeline .ev { color: var(--ink); font-size: .95rem; }
.timeline .num { font-family: var(--mono); font-size: .74rem; color: var(--ink-soft); margin-left: 6px; white-space: nowrap; }

/* ---------------- courses ---------------- */
.classes { background: var(--paper-2); }
.courses { background: linear-gradient(180deg, #e9edf0, var(--paper)); }
.courses-head { margin: 0 auto clamp(26px, 4vw, 44px); max-width: 56ch; text-align: center; }
.courses .hero-actions, .classes .hero-actions { justify-content: center; }
.courses-lede { color: var(--ink-soft); font-size: 1.05rem; margin: 16px 0 0; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.course-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px 26px; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.course-card .accent {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px; transition: width .2s ease;
}
.course-card.dg .accent { background: var(--dg-brass); }
.course-card.rc .accent { background: var(--rc-coral); }
.course-card h3 {
  font-family: var(--serif); font-weight: 600; font-size: 1.6rem;
  margin: 0 0 12px; color: var(--ink);
}
.course-card p { color: var(--ink-soft); margin: 0 0 26px; flex: 1; }
.course-card .go {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: .82rem; letter-spacing: .02em; color: var(--ink-soft);
}
.course-card .go svg { width: 15px; height: 15px; }
.course-card:hover { transform: translateY(-4px); box-shadow: 0 22px 46px -26px rgba(18,34,48,.5); }
.course-card:hover .accent { width: 7px; }
.course-card.dg:hover { border-color: color-mix(in srgb, var(--dg-brass) 55%, var(--line)); }
.course-card.dg:hover .go { color: var(--dg-deep); }
.course-card.rc:hover { border-color: color-mix(in srgb, var(--rc-coral) 55%, var(--line)); }
.course-card.rc:hover .go { color: var(--rc-coral); }

/* ---------------- contact ---------------- */
.contact { text-align: center; background: var(--paper); }
.contact h2 { margin-bottom: 16px; }
.contact-lede { color: var(--ink-soft); font-size: 1.1rem; max-width: 46ch; margin: 0 auto 34px; }

.contact-form { text-align: left; max-width: 540px; margin: 0 auto; }
.hp { position: absolute; left: -9999px; }   /* honeypot: hidden from humans */
.frow { margin-bottom: 18px; }
.frow label {
  display: block; font-family: var(--mono); font-size: .76rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px;
}
.frow label .opt { text-transform: none; letter-spacing: 0; opacity: .7; }
.frow input, .frow textarea {
  width: 100%; padding: 12px 14px; font-family: var(--sans); font-size: 1rem;
  color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 10px; transition: border-color .18s, box-shadow .18s;
}
.frow textarea { resize: vertical; min-height: 120px; }
.frow input:focus, .frow textarea:focus {
  outline: none; border-color: var(--azure);
  box-shadow: 0 0 0 3px rgba(43,128,207,.16);
}
.contact-form .btn { margin-top: 6px; }
.contact-note { margin-top: 24px; font-size: .95rem; color: var(--ink-soft); }
.contact-note a { box-shadow: inset 0 -1px 0 rgba(24,98,166,.35); }

/* ---------------- about-bubbles page ---------------- */
.band { background: var(--paper); }
.band-lede { color: var(--ink-soft); font-size: 1.12rem; line-height: 1.7; margin: 0 0 18px; }
.band-lede em { font-style: normal; color: var(--ink); font-weight: 500;
  box-shadow: inset 0 -.42em 0 rgba(43,128,207,.16); }

.bub-tool { margin: 34px 0 0; }
.bub-readouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.bub-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.bub-lbl { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.bub-val { font-family: var(--mono); font-size: 1.4rem; color: var(--ink); margin-top: 3px; }
.bub-svg { width: 100%; height: auto; display: block; }
.bub-slider { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; }
.bub-slider input { flex: 1; accent-color: var(--azure); }
.bub-slider span { font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); white-space: nowrap; }
.bub-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bub-toggle button { font-family: var(--mono); font-size: .78rem; padding: 7px 18px; background: var(--paper);
  color: var(--ink-soft); border: none; cursor: pointer; transition: background .15s, color .15s; }
.bub-toggle button.active { background: var(--azure); color: #fff; }
.bub-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.bub-choice button { font-family: var(--mono); font-size: .78rem; padding: 7px 14px; background: var(--paper);
  color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s; }
.bub-choice button:hover { border-color: var(--azure); }
.bub-choice button.active { background: var(--azure); color: #fff; border-color: var(--azure); }

/* colour-at-depth scene */
.scene { border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; min-height: 200px;
  transition: background-color .25s ease; margin-bottom: 6px; }
.scene .chip { flex: 1; border-radius: 10px; transition: background-color .25s ease;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.10); min-height: 150px; }
.scene-labels { display: flex; gap: 12px; padding: 0 16px; margin: 0 0 4px; }
.scene-labels span { flex: 1; text-align: center; font-family: var(--mono); font-size: .74rem;
  color: var(--ink-soft); line-height: 1.4; }
.scene-labels i { font-style: normal; opacity: .65; font-size: .68rem; }
.bub-insight { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.6; margin: 10px 0 0; min-height: 2.6em; }
.deriv { margin-top: 16px; padding: 16px 18px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 12px; overflow-x: auto; }
.deriv-tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 14px; }
.deriv .step { margin: 0 0 14px; font-family: var(--mono); font-size: .92rem; line-height: 1.55; }
.deriv .step:last-child { margin-bottom: 0; }
.deriv .sym { color: var(--ink-soft); }
.deriv .wrk { color: var(--ink); white-space: nowrap; }
.deriv .res { color: var(--azure); font-weight: 500; }
.deriv-note { color: var(--ink-soft); font-size: 1rem; line-height: 1.55; margin: 18px 0 0; }
.deriv-note em { color: var(--ink); font-style: normal; font-weight: 500; }
.eqn { display: block; margin: 20px 0; padding: 15px 20px; background: #ffffff; border: 1px solid var(--line);
  border-radius: 10px; font-family: var(--mono); font-size: 1.02rem; color: var(--ink); text-align: center;
  line-height: 1.5; overflow-x: auto; }
.tank-table { width: 100%; border-collapse: collapse; margin: 26px 0 10px; }
.tank-table caption { text-align: left; font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-soft); padding-bottom: 12px; }
.tank-table th { text-align: left; font-family: var(--mono); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-soft); font-weight: 500; padding: 9px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.tank-table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.tank-table td.num { font-family: var(--mono); white-space: nowrap; }
.tank-table tr:last-child td { border-bottom: none; }
.bub-disclaimer { margin-top: 38px; padding: 20px 22px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-soft);
  font-size: .95rem; line-height: 1.65; }
.bub-disclaimer a { box-shadow: inset 0 -1px 0 rgba(24,98,166,.35); }

.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 32px; }
.tool-card {
  display: flex; flex-direction: column; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px 24px;
  color: var(--ink); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 22px 46px -26px rgba(18,34,48,.5);
  border-color: color-mix(in srgb, var(--azure) 45%, var(--line)); }
.tool-mark { width: 40px; height: 40px; color: var(--azure); margin-bottom: 16px; }
.tool-mark circle { fill: none; stroke: currentColor; stroke-width: 6.5; }
.tool-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; margin: 0 0 10px; color: var(--ink); }
.tool-card p { color: var(--ink-soft); margin: 0 0 22px; flex: 1; font-size: 1rem; }
.tool-card .go { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono);
  font-size: .82rem; color: var(--azure); }
.tool-card .go svg { width: 15px; height: 15px; }

/* collapsible tool categories (tools.html index) */
.tool-cat { border-top: 1px solid var(--line); }
.tool-cat:last-of-type { border-bottom: 1px solid var(--line); }
.tool-cat > summary { list-style: none; cursor: pointer; display: flex; align-items: center;
  gap: 14px; padding: 17px 2px; }
.tool-cat > summary::-webkit-details-marker { display: none; }
.tool-cat > summary:hover .cat-name { color: var(--azure); }
.cat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cat-name { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--ink); }
.cat-desc { color: var(--ink-soft); font-size: .9rem; }
.cat-count { font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); }
.cat-chev { width: 16px; height: 16px; color: var(--ink-soft); align-self: center; flex-shrink: 0;
  transition: transform .2s ease; }
.tool-cat[open] > summary .cat-chev { transform: rotate(180deg); }
.tool-cat > .tool-grid { margin-top: 2px; margin-bottom: 28px; }

/* quick-check quiz (shared by tool pages) */
.quiz { margin-top: 38px; padding: 24px 26px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius); }
.quiz-tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--azure); margin: 0 0 12px; }
.quiz-q { font-family: var(--serif); font-size: 1.25rem; color: var(--ink);
  margin: 0 0 18px; line-height: 1.4; }
.quiz-opts { display: grid; gap: 10px; margin-bottom: 18px; }
.quiz-opt { display: flex; align-items: flex-start; gap: 12px; text-align: left;
  font-family: var(--sans); font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px;
  cursor: pointer; transition: border-color .15s, background .15s; }
.quiz-opt:hover { border-color: var(--azure); }
.quiz-opt input { margin: 3px 0 0; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--azure); }
.quiz-opt.correct { border-color: #2f9e7e; background: color-mix(in srgb, #2f9e7e 13%, var(--paper)); }
.quiz-opt.wrong { border-color: #c0563a; background: color-mix(in srgb, #c0563a 11%, var(--paper)); }
.quiz-check { font-family: var(--mono); font-size: .82rem; letter-spacing: .04em; color: var(--azure);
  background: transparent; border: 1px solid var(--azure); border-radius: 999px;
  padding: 9px 20px; cursor: pointer; transition: background .15s, color .15s; }
.quiz-check:hover:not(:disabled) { background: var(--azure); color: #fff; }
.quiz-check:disabled { opacity: .45; cursor: default; }
.quiz-result { margin-top: 18px; }
.quiz-verdict { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; margin: 0 0 8px; }
.quiz-verdict.ok { color: #1c8a63; }
.quiz-verdict.no { color: #c0563a; }
.quiz-verdict.pending { color: var(--ink-soft); }
.quiz-explain { margin: 0; color: var(--ink-soft); line-height: 1.6; font-size: 1rem; }

/* ---------------- thanks page ---------------- */.thanks { min-height: 62vh; display: flex; align-items: center; text-align: center;
  padding: clamp(48px, 9vw, 96px) 0; }
.thanks h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--ink); margin: 0 0 16px; }
.thanks p { color: var(--ink-soft); font-size: 1.15rem; max-width: 42ch; margin: 0 auto 30px; }

/* ---------------- footer ---------------- */
.site-footer { border-top: 1px solid var(--chrome-line); background: var(--chrome-bg); padding: 40px 0; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--chrome-azure);
  font-family: var(--mono); font-size: .9rem; }
.foot-brand span { color: var(--chrome-ink); }
.foot-line { font-family: var(--mono); font-size: .76rem; letter-spacing: .03em;
  color: var(--chrome-ink-soft); margin: 0; }

/* ---------------- reveal animation ----------------
   Content is fully visible by default; only when JS is present
   (html.js) do we hide-then-reveal. No JS = nothing hidden. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .card-grid .course-card:nth-child(2).in { transition-delay: .1s; }

/* ---------------- mobile nav (progressive enhancement) ----------------
   Gated entirely on html.js: JS off → none of this applies, the button stays
   hidden, and the nav falls back to the wrapped row from the ≤520/≤460 rules
   below. JS on, ≤600px → links collapse behind the hamburger into a full-width
   panel that drops below the bar. Desktop (>600px) is untouched. */
@media (max-width: 600px) {
  html.js .nav-toggle { display: inline-flex; }
  html.js .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0;
    background: var(--chrome-bg);
    border-top: 1px solid var(--chrome-line);
    border-bottom: 1px solid var(--chrome-line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .28);
  }
  html.js .nav.open { display: flex; }
  html.js .nav a { padding: 14px 24px; font-size: .95rem; }
  html.js .nav a + a { border-top: 1px solid var(--chrome-line); }
}

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-side { position: static; max-width: 420px; }
  .card-grid { grid-template-columns: 1fr; }
  .depthscale { display: none; }
  .hero-aside { display: none; }
  .bub-readouts { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav { gap: 18px; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions, .contact-actions { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .course-card:hover { transform: none; }
}

/* ---------------- schedule / classes ---------------- */
.sched-note { background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; margin: 0 0 30px;
  color: var(--ink-soft); font-size: .96rem; line-height: 1.55; }
.sched-note a { color: var(--azure); }
.sched-empty { background: var(--paper-2); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 30px 26px; text-align: center;
  color: var(--ink-soft); line-height: 1.6; }
.sched-empty a { color: var(--azure); }

/* per-class document download links */
.acc-docs { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 18px; align-items: flex-start; }
.dl-link { display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 15px; color: var(--azure); font-weight: 600; font-size: .94rem;
  text-decoration: none; transition: border-color .2s, background .2s, transform .1s; }
.dl-link:hover { border-color: var(--azure-bright); background: #fff; transform: translateY(-1px); }
.dl-link svg { flex: 0 0 auto; color: var(--azure-bright); }
.dl-meta { color: var(--ink-soft); font-weight: 500; font-family: var(--mono); font-size: .82em; }

/* accordion */
.sched-acc { display: flex; flex-direction: column; gap: 14px; }
.acc-item { background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: border-color .2s; }
.acc-item.open { border-color: var(--azure); }
.acc-head { width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 24px; background: none; border: 0; cursor: pointer;
  text-align: left; font: inherit; color: inherit; }
.acc-head:hover { background: color-mix(in srgb, var(--azure) 5%, transparent); }
.acc-headline { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acc-title { font-family: var(--serif); font-weight: 500; font-size: 1.32rem; color: var(--ink); }
.acc-kind { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--azure); }
.acc-venue { text-transform: none; }
.acc-meta { display: inline-flex; align-items: center; gap: 13px;
  font-family: var(--mono); font-size: .82rem; color: var(--ink-soft); white-space: nowrap; }
.acc-meta svg { width: 18px; height: 18px; transition: transform .26s ease; flex: none; }
.acc-item.open .acc-meta svg { transform: rotate(180deg); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.acc-item.open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; min-height: 0; }
.acc-inner { padding: 2px 24px 22px; }
.acc-days { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line-soft); }
.acc-days li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  padding: 11px 2px; border-bottom: 1px solid var(--line-soft); }
.acc-day { font-family: var(--mono); font-size: .85rem; color: var(--ink); min-width: 168px; }
.acc-hrs { font-family: var(--mono); font-size: .85rem; color: var(--ink-soft); }
.acc-where { font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); margin: 0 0 18px; }
.acc-where a { color: var(--azure); }

/* expanded card: days + "At venue" on the left, map-pin chip on the right;
   stacks on narrow viewports with the pin landing just under the At line */
.acc-loc { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; }
.acc-loc .acc-days { grid-column: 1; grid-row: 1; }
.acc-loc .acc-where { grid-column: 1; grid-row: 2; }
.acc-loc .acc-map-pin { grid-column: 2; grid-row: 1 / span 2;
  align-self: start; justify-self: end; }

.acc-map-pin { display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; color: var(--azure); font-family: var(--mono);
  font-size: .82rem; text-decoration: none;
  transition: border-color .2s, background .2s, transform .1s; }
.acc-map-pin:hover { border-color: var(--azure-bright); background: #fff;
  transform: translateY(-1px); }
.acc-map-pin svg { width: 16px; height: 16px; color: var(--azure-bright); flex: 0 0 auto; }

@media (max-width: 560px) {
  .acc-loc { display: flex; flex-direction: column; }
  .acc-loc .acc-map-pin { justify-self: start; align-self: flex-start; }
}

@media (max-width: 460px) {
  .topbar .bar { height: auto; min-height: 64px; flex-wrap: wrap; row-gap: 4px; padding: 9px 0; }
  .nav { gap: 16px; width: 100%; justify-content: flex-start; }
}


/* ---------------- dark homepage body (showcase) ---------------- */
body.dark {
  --paper:#0f2330; --paper-2:#16303f; --ink:#e9eef2; --ink-soft:#9fb2bf;
  --azure:#4fa3e6; --azure-bright:#79c0ff; --line:#2a3f4e; --line-soft:#213441;
  background:#0f2330;
}
body.dark .hero {
  background:
    radial-gradient(120% 80% at 80% -10%, rgba(79,163,230,.16), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, #0b1b26 100%);
}
body.dark .courses { background: linear-gradient(180deg, #16303f, var(--paper)); }
body.dark .depthscale { color: rgba(159,178,191,.5); }
body.dark .lede em { box-shadow: inset 0 -.42em 0 rgba(79,163,230,.24); }
body.dark .btn-primary, body.dark .btn-primary:hover { color:#0b1b26; }

/* FAQ page */
.faq-rule { background: var(--paper-2); border: 1px solid var(--azure);
  border-left: 4px solid var(--azure); border-radius: var(--radius);
  padding: 20px 24px; margin: 8px 0 14px; }
.faq-rule > summary { list-style: none; cursor: pointer; display: flex; align-items: center;
  gap: 12px; }
.faq-rule > summary::-webkit-details-marker { display: none; }
.faq-rule .faq-rule-tag, .faq-rule > summary { font: 600 11px/1.4 var(--mono); letter-spacing: .07em;
  text-transform: uppercase; color: var(--azure); margin: 0; }
.faq-rule > summary .faq-rule-chev { width: 15px; height: 15px; margin-left: auto; flex: none;
  transition: transform .2s ease; }
.faq-rule[open] > summary .faq-rule-chev { transform: rotate(180deg); }
.faq-rule > summary + p, .faq-rule > p:not(.faq-rule-soft) { margin-top: 12px; }
.faq-rule p { color: var(--ink); font-size: 1rem; line-height: 1.6; margin: 0 0 10px; }
.faq-rule p:last-child { margin-bottom: 0; }
.faq-rule p.faq-rule-soft { color: var(--ink-soft); font-size: .95rem; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-of-type { border-bottom: 1px solid var(--line); }
.faq-item > summary { list-style: none; cursor: pointer; display: flex; align-items: center;
  gap: 14px; padding: 20px 2px; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-q { flex: 1; min-width: 0; font-family: var(--serif); font-weight: 600;
  font-size: 1.22rem; color: var(--ink); }
.faq-item > summary:hover .faq-q { color: var(--azure); }
.faq-chev { width: 16px; height: 16px; color: var(--ink-soft); flex-shrink: 0;
  transition: transform .2s ease; }
.faq-item[open] > summary .faq-chev { transform: rotate(180deg); }
.faq-body { padding: 0 2px 26px; }
.faq-body p { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.68; margin: 0 0 16px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body strong { color: var(--ink); font-weight: 600; }
.faq-sub { font: 600 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--azure); margin: 38px 0 14px; padding-top: 26px; border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 10px; }
.faq-sub::before { content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--azure); flex: none; }
.faq-body > .faq-sub:first-child { margin-top: 14px; padding-top: 0; border-top: none; }
.faq-body > .faq-sub:first-child::before { display: none; }
.faq-body ol, .faq-body ul { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.6;
  margin: 0 0 16px; padding-left: 22px; }
.faq-body ol li, .faq-body ul li { margin: 0 0 8px; }
.faq-shop { font-style: italic; color: var(--ink-soft); font-size: .92rem;
  border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 4px; }
.faq-list { list-style: none; margin: 24px 0 0; padding: 0; }
.faq-list li { margin: 0; }
.faq-link { display: flex; align-items: center; gap: 14px; padding: 20px 2px;
  border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.faq-list li:last-child .faq-link { border-bottom: 1px solid var(--line); }
.faq-link:hover .faq-q { color: var(--azure); }
.faq-link:hover .faq-chev { color: var(--azure); transform: translateX(3px); }
.faq-link .faq-chev { width: 16px; height: 16px; color: var(--ink-soft); flex-shrink: 0;
  transition: transform .2s ease, color .2s ease; }
.faq-article { padding: 8px 0 0; }
.faq-article > p:first-child { margin-top: 22px; }
.faq-back { font-family: var(--mono); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--azure); text-decoration: none; }
.faq-back:hover { color: var(--azure-bright); }
.faq-back-bottom { margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--line-soft); }
