/* ============================================================
   Insight Bay Design System
   One family everywhere: Inter for body, UI and headings.
   Light + dark mode driven by [data-theme="dark"] on <html>.
   ============================================================ */

:root {
  /* Brand palette, LIGHT */
  --ib-bg:           #F5F1EB;   /* main warm cream */
  --ib-bg-soft:      #FAF7F2;   /* surface lighter */
  --ib-bg-deep:      #EEE9DD;   /* card / muted band */
  --ib-ink:          #20201E;   /* primary text */
  --ib-ink-soft:     #4A4742;   /* secondary text */
  --ib-ink-muted:    #807A72;   /* tertiary text */
  --ib-line:         #E2DCCF;   /* subtle border */
  --ib-line-strong:  #C9C0AE;
  --ib-accent:       #C96442;   /* Claude coral */
  --ib-accent-hover: #B25535;
  --ib-accent-soft:  #F3DDCF;
  --ib-gold:         #B58A3A;   /* premium accent for badges */
  --ib-success:      #4F7A4A;
  --ib-shadow:       0 1px 2px rgba(32,32,30,.04), 0 8px 24px -8px rgba(32,32,30,.12);
  --ib-shadow-lg:    0 4px 12px rgba(32,32,30,.06), 0 24px 48px -16px rgba(32,32,30,.18);

  /* Mode-aware surfaces for backgrounds, hero illustrations, nav, footer */
  --ib-bg-hero-top:    #FFFDF8;
  --ib-grid-line:      rgba(32,32,30,.05);
  --ib-nav-bg:         rgba(245,241,235,0.85);
  --ib-card-bg:        #FFFFFF;
  --ib-footer-bg:      #20201E;
  --ib-footer-text:    #F5F1EB;
  --ib-footer-text-soft:  rgba(245,241,235,.85);
  --ib-footer-text-faint: rgba(245,241,235,.55);
  --ib-footer-line:    rgba(245,241,235,.12);

  /* "Emphasis plate", dark card / marquee with cream text in BOTH modes */
  --ib-emphasis-bg:        #20201E;
  --ib-emphasis-text:      #F5F1EB;
  --ib-emphasis-text-soft: rgba(245,241,235,.85);
  --ib-emphasis-text-faint:rgba(245,241,235,.6);
  --ib-emphasis-line:      rgba(245,241,235,.15);

  --ib-radius-sm: 8px;
  --ib-radius:    14px;
  --ib-radius-lg: 22px;

  /* Unified type system: Inter for everything (body, UI, headings).
     The old variable names are kept so every component resolves to
     the same family without touching each rule. */
  --ib-font-serif: 'Inter','Helvetica Neue',Arial,system-ui,sans-serif;
  --ib-font-sans:  'Inter','Helvetica Neue',Arial,system-ui,sans-serif;
  --ib-font-mono:  'IBM Plex Mono',ui-monospace,'SFMono-Regular',Menlo,monospace;
  --ib-font-stamp: 'Inter','Helvetica Neue',Arial,system-ui,sans-serif;
}

/* ============================================================
   DARK MODE, every token redefined under [data-theme="dark"].
   Surfaces use deep warm-tinted darks; ink flips to soft creams.
   Accents brighten for contrast against dark backgrounds.
   ============================================================ */
[data-theme="dark"] {
  --ib-bg:           #161513;
  --ib-bg-soft:      #1A1917;
  --ib-bg-deep:      #1E1D1B;
  --ib-ink:          #F2EFE8;
  --ib-ink-soft:     #C9C4BB;
  --ib-ink-muted:    #8E8A82;
  --ib-line:         #2D2B27;
  --ib-line-strong:  #3F3C36;
  --ib-accent:       #E8845E;
  --ib-accent-hover: #F19770;
  --ib-accent-soft:  #3D2A20;
  --ib-gold:         #D9B265;
  --ib-success:      #7AAE73;
  --ib-shadow:       0 1px 2px rgba(0,0,0,.4), 0 8px 24px -8px rgba(0,0,0,.55);
  --ib-shadow-lg:    0 4px 12px rgba(0,0,0,.45), 0 24px 48px -16px rgba(0,0,0,.7);

  --ib-bg-hero-top:    #1F1D1A;
  --ib-grid-line:      rgba(242,239,232,.06);
  --ib-nav-bg:         rgba(22,21,19,0.85);
  --ib-card-bg:        #1E1D1B;
  --ib-footer-bg:      #0F0E0D;
  --ib-footer-text:    #F2EFE8;
  --ib-footer-text-soft:  rgba(242,239,232,.85);
  --ib-footer-text-faint: rgba(242,239,232,.55);
  --ib-footer-line:    rgba(242,239,232,.12);

  /* Emphasis plate in dark mode: even darker than body, coral border for pop */
  --ib-emphasis-bg:        #0E0D0C;
  --ib-emphasis-text:      #F2EFE8;
  --ib-emphasis-text-soft: rgba(242,239,232,.85);
  --ib-emphasis-text-faint:rgba(242,239,232,.6);
  --ib-emphasis-line:      rgba(242,239,232,.15);
}

html { color-scheme: light dark; }
[data-theme="dark"] { color-scheme: dark; }

/* Smooth the theme transition on common surfaces */
body, .ib-nav, .ib-mobile-menu, .ib-card, .ib-price-card,
.ib-blog-post, .ib-footer, .ib-hero-card,
input, textarea, select, button, a {
  transition: background-color .25s ease, color .2s ease, border-color .2s ease;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  background: var(--ib-bg);
  color: var(--ib-ink);
  font-family: var(--ib-font-sans);
  font-feature-settings: 'ss01','cv11';
  line-height: 1.6;
}

/* "body h1" (not bare "h1") so these always beat the Tailwind CDN
   preflight reset (h1 { font-size: inherit; font-weight: inherit; })
   regardless of stylesheet injection order. Without this, page
   headings collapse to body-text size. */
body h1, body h2, body h3, body h4, body h5 {
  font-family: var(--ib-font-sans);
  color: var(--ib-ink);
  letter-spacing: -0.015em;
  line-height: 1.15;
  font-weight: 700;
  text-transform: none;
}

body h1 { font-size: clamp(2.4rem, 4.8vw, 3.8rem); font-weight: 800; letter-spacing: -0.025em; }
body h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -0.02em; }
body h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); }

p  { color: var(--ib-ink-soft); }

a  { color: var(--ib-accent); text-decoration: none; }
a:hover { color: var(--ib-accent-hover); }

/* ---------- Layout ---------- */
.ib-container { max-width: 1180px; margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 768px) { .ib-container { padding-inline: 2rem; } }

.ib-section { padding-block: 5rem; }
@media (min-width: 768px) { .ib-section { padding-block: 6.5rem; } }

.ib-eyebrow {
  font-family: var(--ib-font-sans);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ib-accent);
  font-weight: 700;
}

/* ---------- Buttons ---------- */
.ib-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 500; font-size: .95rem;
  transition: all .18s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.ib-btn-primary {
  background: var(--ib-ink);
  color: var(--ib-bg);
}
.ib-btn-primary:hover {
  background: var(--ib-accent);
  color: #fff;
  transform: translateY(-1px);
}
.ib-btn-accent {
  background: var(--ib-accent);
  color: #fff;
}
.ib-btn-accent:hover {
  background: var(--ib-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}
.ib-btn-ghost {
  background: transparent;
  color: var(--ib-ink);
  border-color: var(--ib-line-strong);
}
.ib-btn-ghost:hover {
  background: var(--ib-bg-deep);
  color: var(--ib-ink);
}

/* ---------- Cards ---------- */
.ib-card {
  background: var(--ib-bg-soft);
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius);
  padding: 1.75rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.ib-card:hover {
  border-color: var(--ib-line-strong);
  box-shadow: var(--ib-shadow);
  transform: translateY(-2px);
}
.ib-card-feature {
  background: linear-gradient(180deg, var(--ib-bg-hero-top) 0%, var(--ib-bg-soft) 100%);
}

/* ---------- Nav ---------- */
.ib-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--ib-nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ib-line);
}
.ib-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.ib-logo {
  font-family: var(--ib-font-sans);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ib-ink);
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: .5rem;
}
.ib-logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--ib-accent);
  color: #fff;
  border-radius: 8px;
  font-family: var(--ib-font-sans);
  font-style: italic;
  font-weight: 700;
}
.ib-nav-links { display: none; gap: 2rem; }
.ib-nav-links a {
  color: var(--ib-ink-soft);
  font-size: .92rem;
  font-weight: 500;
  position: relative;
}
.ib-nav-links a:hover { color: var(--ib-ink); }
.ib-nav-links a.active { color: var(--ib-ink); }
.ib-nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 2px; background: var(--ib-accent);
}
@media (min-width: 880px) { .ib-nav-links { display: flex; } }

.ib-menu-toggle { display: inline-flex; align-items: center; }
@media (min-width: 880px) { .ib-menu-toggle { display: none; } }

.ib-mobile-menu {
  display: none;
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid var(--ib-line);
  background: var(--ib-bg-soft);
}
.ib-mobile-menu.open { display: block; }
.ib-mobile-menu a {
  display: block; padding: .65rem 0;
  color: var(--ib-ink); font-weight: 500;
  border-bottom: 1px solid var(--ib-line);
}
.ib-mobile-menu a:last-of-type { border-bottom: none; }

/* ---------- Hero ---------- */
.ib-hero {
  position: relative;
  padding-top: 4.5rem; padding-bottom: 5rem;
  overflow: hidden;
}
.ib-hero-grid {
  display: grid; gap: 3rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 960px) {
  .ib-hero-grid { grid-template-columns: 1.15fr .85fr; gap: 4rem; }
  .ib-hero { padding-top: 6rem; padding-bottom: 7rem; }
}
.ib-hero h1 .accent {
  color: var(--ib-accent);
  font-style: italic;
}

/* Hero visual */
.ib-hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--ib-radius-lg);
  background:
    radial-gradient(circle at 30% 20%, rgba(201,100,66,.18), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(181,138,58,.12), transparent 45%),
    linear-gradient(160deg, var(--ib-bg-hero-top) 0%, var(--ib-bg-deep) 100%);
  border: 1px solid var(--ib-line);
  overflow: hidden;
  box-shadow: var(--ib-shadow-lg);
}
.ib-hero-visual::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg,  transparent 0 39px, var(--ib-grid-line) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--ib-grid-line) 39px 40px);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.ib-hero-formula {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 1rem;
  align-items: center; justify-content: center;
  font-family: var(--ib-font-serif);
  font-style: italic;
  color: var(--ib-ink);
  text-align: center;
  z-index: 2;
  padding: 2rem;
}
.ib-hero-formula .eq { font-size: clamp(1.6rem, 2.6vw, 2.4rem); }
.ib-hero-formula .label { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ib-accent); font-family: var(--ib-font-sans); font-style: normal;}

/* ---------- Trust band ---------- */
.ib-trust-band {
  border-top: 1px solid var(--ib-line);
  border-bottom: 1px solid var(--ib-line);
  background: var(--ib-bg-soft);
  padding-block: 1.5rem;
}
.ib-trust-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  text-align: center;
}
@media (min-width: 768px) { .ib-trust-grid { grid-template-columns: repeat(4, 1fr); } }
.ib-trust-item {
  font-family: var(--ib-font-serif);
  font-size: 1.6rem;
}
.ib-trust-item .lbl {
  display: block;
  font-family: var(--ib-font-sans);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ib-ink-muted);
  margin-top: .25rem;
}

/* ---------- Feature grid ---------- */
.ib-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .ib-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .ib-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .ib-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .ib-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.ib-icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--ib-accent-soft);
  color: var(--ib-accent);
  margin-bottom: 1rem;
}

/* ---------- Pricing ---------- */
.ib-price-card {
  position: relative;
  background: var(--ib-bg-soft);
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius-lg);
  padding: 1.6rem 1.4rem 1.5rem;
  display: flex; flex-direction: column;
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.ib-price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ib-shadow-lg);
  border-color: var(--ib-line-strong);
}

/* Featured: a refined coral-ringed light card — no heavy black slab,
   no height change, so all four cards stay perfectly aligned. */
.ib-price-card.featured {
  background:
    linear-gradient(180deg, rgba(201,100,66,.07), rgba(201,100,66,0) 60%),
    var(--ib-bg-soft);
  border: 1.5px solid var(--ib-accent);
  box-shadow: 0 18px 40px -22px rgba(201,100,66,.5);
}
.ib-price-card.featured:hover {
  transform: translateY(-4px);
  border-color: var(--ib-accent);
  box-shadow: 0 24px 50px -22px rgba(201,100,66,.6);
}

/* Top label: one small pill per card, inline, never floating or wrapping. */
.ib-price-card .ib-badge,
.ib-price-card .tag { align-self: flex-start; white-space: nowrap; }
.ib-price-card .tag {
  display: inline-flex; align-items: center;
  background: var(--ib-accent); color: #fff;
  padding: .32rem .75rem; border-radius: 999px;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600;
}

/* Reserve a fixed title height so 1- and 2-line names keep prices aligned. */
.ib-price-card h3 {
  font-size: 1.2rem; line-height: 1.25;
  min-height: 3rem;
  display: flex; align-items: flex-start;
  margin-top: .85rem;
}

/* Reserve a fixed price-row height so the description rows line up too. */
.ib-price {
  font-family: var(--ib-font-serif);
  font-size: 2.05rem; font-weight: 700; line-height: 1.1;
  min-height: 2.5rem;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .4rem;
}
.ib-price > [data-price] { white-space: nowrap; }
.ib-price .per {
  font-family: var(--ib-font-sans);
  color: var(--ib-ink-muted); font-size: .82rem; font-weight: 500;
}
.ib-price-card > p { min-height: 2.8em; }

/* Clean check-in-disc rows, no per-row divider lines. */
.ib-feat-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: .15rem; }
.ib-feat-list li {
  padding: .35rem 0 .35rem 1.7rem;
  position: relative;
  color: var(--ib-ink-soft);
  font-size: .875rem; line-height: 1.4;
}
.ib-feat-list li::before {
  content: '✓';
  position: absolute; left: 0; top: .42rem;
  width: 1.1rem; height: 1.1rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .66rem; font-weight: 700;
  color: var(--ib-accent);
  background: var(--ib-accent-soft);
  border-radius: 50%;
}

/* Defensive overrides so the full redesign renders correctly even against the
   previous services.html markup: the old featured card used a cream "Programme"
   badge and a cream description that would be invisible on the new light card —
   hide the redundant second label, restore readable description colour, and
   normalise the larger inline heading size. Harmless against the new markup. */
.ib-price-card h3 { font-size: 1.2rem !important; }
.ib-price-card.featured .ib-badge { display: none !important; }
.ib-price-card.featured > p { color: var(--ib-ink-soft) !important; }

/* ---------- College / university application assistance ---------- */
.ib-applic-card {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--ib-bg-soft);
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius-lg);
  padding: 2.5rem;
}
.ib-applic-feats {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem 1.75rem;
}
.ib-applic-feats > div {
  position: relative;
  padding-left: 1.6rem;
  font-size: .92rem;
  color: var(--ib-ink-soft);
  line-height: 1.4;
}
.ib-applic-tick {
  position: absolute; left: 0; top: 0;
  color: var(--ib-accent); font-weight: 700;
}
.ib-applic-side {
  background: var(--ib-bg-deep);
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.ib-applic-eyebrow {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ib-ink-muted);
}
/* Price is a flex row (left-aligned by default); center it inside the
   centered side panel so £450 lines up under the eyebrow and the "or" line. */
.ib-applic-side .ib-price { justify-content: center; }
.ib-applic-or { margin-top: .5rem; font-size: .9rem; color: var(--ib-ink-soft); }
.ib-applic-cta { width: 100%; justify-content: center; margin-top: 1.25rem; }
.ib-applic-fine { margin-top: .75rem; font-size: .78rem; color: var(--ib-ink-muted); }
@media (max-width: 880px) {
  .ib-applic-card { grid-template-columns: 1fr; gap: 1.75rem; padding: 1.75rem; }
  .ib-applic-feats { grid-template-columns: 1fr; }
}

/* ---------- Testimonials ---------- */
.ib-quote {
  background: var(--ib-bg-soft);
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius);
  padding: 1.75rem;
  position: relative;
}
.ib-quote::before {
  content: '“';
  position: absolute; top: -.4rem; left: 1rem;
  font-family: var(--ib-font-serif);
  font-size: 4rem;
  color: var(--ib-accent);
  line-height: 1;
}
.ib-quote blockquote {
  font-family: var(--ib-font-serif);
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--ib-ink);
  margin: 0 0 1rem; padding-top: .5rem;
}
.ib-quote .meta { display: flex; align-items: center; gap: .75rem; }
.ib-avatar {
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--ib-accent-soft);
  color: var(--ib-accent);
  font-family: var(--ib-font-serif);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.ib-meta-name { font-weight: 600; font-size: .9rem; color: var(--ib-ink); }
.ib-meta-role { font-size: .8rem; color: var(--ib-ink-muted); }

/* ---------- FAQ ---------- */
.ib-faq details {
  border-bottom: 1px solid var(--ib-line);
  padding: 1.25rem 0;
}
.ib-faq summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--ib-font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ib-ink);
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
}
.ib-faq summary::-webkit-details-marker { display: none; }
.ib-faq summary::after {
  content: '+';
  font-family: var(--ib-font-sans);
  font-size: 1.4rem;
  color: var(--ib-accent);
  transition: transform .2s ease;
}
.ib-faq details[open] summary::after { content: '−'; }
.ib-faq details p { margin-top: .8rem; }

/* ---------- Form ---------- */
.ib-form { display: grid; gap: 1rem; }
.ib-field label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: .35rem;
  color: var(--ib-ink);
}
.ib-field input,
.ib-field select,
.ib-field textarea {
  width: 100%;
  background: var(--ib-card-bg);
  border: 1px solid var(--ib-line-strong);
  border-radius: var(--ib-radius-sm);
  padding: .8rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ib-ink);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .25s ease;
}
/* Inputs and selects share one fixed height so every box in the form
   grid lines up perfectly, row by row. */
.ib-field input,
.ib-field select { height: 52px; }
/* Selects: strip the thin native chrome and restyle to match inputs,
   with a custom chevron. */
.ib-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23807A72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 1.05rem;
  padding-right: 2.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}
[data-theme="dark"] .ib-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9C4BB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.ib-field input:focus,
.ib-field select:focus,
.ib-field textarea:focus {
  outline: none;
  border-color: var(--ib-accent);
  box-shadow: 0 0 0 3px rgba(201,100,66,.18);
}
.ib-field textarea { min-height: 140px; resize: vertical; }

/* ---------- Footer ---------- */
.ib-footer {
  background: var(--ib-footer-bg);
  color: var(--ib-footer-text);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
.ib-footer h4 {
  color: var(--ib-footer-text);
  font-family: var(--ib-font-sans);
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1rem;
  opacity: .7;
}
.ib-footer a { color: var(--ib-footer-text-soft); display: block; padding: .25rem 0; font-size: .92rem; }
.ib-footer a:hover { color: var(--ib-accent); }
.ib-footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1.4fr repeat(3, 1fr);
}
@media (max-width: 768px) { .ib-footer-grid { grid-template-columns: 1fr 1fr; } }
.ib-footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  border-top: 1px solid var(--ib-footer-line);
  margin-top: 3rem; padding-top: 1.5rem;
  font-size: .82rem; color: var(--ib-footer-text-faint);
}

/* ---------- Utility ---------- */
.ib-divider {
  height: 1px;
  background: var(--ib-line);
  margin-block: 4rem;
}
.ib-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .8rem;
  background: var(--ib-accent-soft);
  color: var(--ib-accent);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 500;
}
.ib-badge.gold { background: rgba(181,138,58,.14); color: var(--ib-gold); }

.ib-stat-row {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .ib-stat-row { grid-template-columns: repeat(4, 1fr); } }
.ib-stat .num {
  font-family: var(--ib-font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--ib-ink);
}
.ib-stat .lbl {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ib-ink-muted);
  margin-top: .25rem;
}

/* Page hero (smaller hero used on subpages) */
.ib-page-hero {
  padding-top: 4rem; padding-bottom: 3rem;
  border-bottom: 1px solid var(--ib-line);
  background:
    radial-gradient(ellipse at top right, rgba(201,100,66,.07), transparent 50%),
    var(--ib-bg);
}
@media (min-width: 768px) { .ib-page-hero { padding-top: 5.5rem; padding-bottom: 4rem; } }
/* The page title is the single loudest element on a subpage: the
   visitor should know what the page is for at a glance. */
.ib-page-hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.1rem); }
.ib-page-hero .ib-eyebrow { font-size: 1rem; }
.ib-page-hero p { font-size: 1.1rem; }

/* Prose */
.ib-prose p { margin-bottom: 1.15rem; font-size: 1.05rem; }
.ib-prose h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.ib-prose h3 { margin-top: 1.75rem; margin-bottom: .75rem; }
.ib-prose ul { padding-left: 1.25rem; margin-bottom: 1.15rem; }
.ib-prose ul li { margin-bottom: .4rem; color: var(--ib-ink-soft); }

/* ---------- Animations ---------- */
@keyframes ib-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ib-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes ib-scale-in {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes ib-slide-right {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ib-pulse-coral {
  0%,100% { box-shadow: 0 0 0 0 rgba(201,100,66,.35); }
  50%     { box-shadow: 0 0 0 12px rgba(201,100,66,0); }
}
@keyframes ib-blink {
  0%,49% { opacity: 1; }
  50%,100% { opacity: 0; }
}
@keyframes ib-shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-2px); }
  75%     { transform: translateX(2px); }
}
@keyframes ib-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ib-anim { animation: ib-fade-up .7s cubic-bezier(.2,.7,.2,1) both; }
.ib-anim-delay-1 { animation-delay: .1s; }
.ib-anim-delay-2 { animation-delay: .22s; }
.ib-anim-delay-3 { animation-delay: .34s; }
.ib-anim-delay-4 { animation-delay: .46s; }

/* Reveal-on-scroll (set by IntersectionObserver in main.js) */
.ib-reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.ib-reveal.is-visible { opacity: 1; transform: translateY(0); }
.ib-reveal.from-left  { transform: translateX(-28px); }
.ib-reveal.from-left.is-visible  { transform: translateX(0); }
.ib-reveal.from-right { transform: translateX(28px); }
.ib-reveal.from-right.is-visible { transform: translateX(0); }
.ib-reveal.scale      { transform: scale(.96); opacity: 0; }
.ib-reveal.scale.is-visible { transform: scale(1); opacity: 1; }

/* Stagger via inline style: style="--d:.05s", read by .ib-reveal */
.ib-reveal { transition-delay: var(--d, 0s); }

/* Blinking terminal cursor used in hero */
.ib-cursor::after {
  content: '_';
  margin-left: .15em;
  color: var(--ib-accent);
  animation: ib-blink 1s steps(2,start) infinite;
}

/* Pulse around the primary CTA */
.ib-pulse { animation: ib-pulse-coral 2.4s ease-in-out infinite; }

/* Hover lift for interactive cards beyond the basic .ib-card lift */
.ib-card-interactive {
  position: relative;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.ib-card-interactive::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(201,100,66,.10) 50%, transparent 70%);
  opacity: 0;
  transition: opacity .4s ease;
}
.ib-card-interactive:hover { transform: translateY(-4px); border-color: var(--ib-accent); }
.ib-card-interactive:hover::after { opacity: 1; }

/* Button micro-interactions */
.ib-btn { position: relative; overflow: hidden; }
.ib-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,.18);
  transform: translateX(-100%) skewX(-20deg);
  transition: transform .55s ease;
}
.ib-btn:hover::before { transform: translateX(100%) skewX(-20deg); }
.ib-btn:active { transform: translateY(1px); }

/* Animated underline for nav links */
.ib-nav-links a { transition: color .2s ease; }
.ib-nav-links a::before {
  content: '';
  position: absolute; left: 0; bottom: -22px;
  height: 2px; width: 0;
  background: var(--ib-accent);
  transition: width .3s ease;
}
.ib-nav-links a:hover::before { width: 100%; }

/* Stat counter, visible by default, animates from 0 via JS */
.ib-stat .num,
.ib-trust-item { will-change: contents; }

/* Marquee strip (defense-document ticker) */
.ib-marquee {
  overflow: hidden;
  background: var(--ib-emphasis-bg);
  color: var(--ib-emphasis-text);
  padding: .85rem 0;
  border-top: 1px solid var(--ib-emphasis-line);
  border-bottom: 1px solid var(--ib-emphasis-line);
  white-space: nowrap;
}
.ib-marquee-track {
  display: inline-block;
  white-space: nowrap;
  animation: ib-marquee 38s linear infinite;
  will-change: transform;
  padding-left: 100%;
}
.ib-marquee-item {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ib-emphasis-text-soft);
  margin-right: 2.5rem;
}
.ib-marquee-item::before {
  content: '◆';
  color: var(--ib-accent);
  margin-right: 1rem;
  font-size: .7em;
  vertical-align: middle;
}

/* Checkbox group fix (booking page contact prefs) */
.ib-checkgroup {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: .6rem;
}
.ib-checkgroup label {
  display: inline-flex !important;
  align-items: center;
  gap: .55rem;
  font-size: .95rem;
  cursor: pointer;
  padding: .35rem .75rem .35rem .5rem;
  border-radius: 999px;
  background: var(--ib-bg-deep);
  border: 1px solid var(--ib-line);
  transition: background .15s ease, border-color .15s ease;
}
.ib-checkgroup label:hover { background: var(--ib-accent-soft); border-color: var(--ib-accent); }
.ib-checkgroup input[type="checkbox"] {
  width: 16px; height: 16px;
  margin: 0;
  accent-color: var(--ib-accent);
  flex-shrink: 0;
}

/* ============================================================
   Theme toggle button (sun ↔ moon)
   ============================================================ */
.ib-theme-toggle {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  margin-right: .35rem;
  background: transparent;
  border: 1px solid var(--ib-line);
  border-radius: 999px;
  color: var(--ib-ink-soft);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  flex: none;
}
.ib-theme-toggle:hover {
  background: var(--ib-bg-deep);
  color: var(--ib-ink);
  border-color: var(--ib-line-strong);
}
.ib-theme-toggle:focus-visible {
  outline: 2px solid var(--ib-accent);
  outline-offset: 2px;
}
/* Show only the icon that hints at the OTHER mode */
.ib-theme-toggle__sun  { display: none; }
.ib-theme-toggle__moon { display: block; }
[data-theme="dark"] .ib-theme-toggle__sun  { display: block; }
[data-theme="dark"] .ib-theme-toggle__moon { display: none; }

/* In light mode the nav background is cream; the toggle dims to soft ink.
   In dark mode, lift it slightly so it's still visible. */
[data-theme="dark"] .ib-theme-toggle { color: var(--ib-ink); }

/* Make sure the theme toggle in the .ib-nav header sits inline with the CTA */
.ib-nav .ib-theme-toggle { vertical-align: middle; }

/* ============================================================
   PERSISTENT MOBILE CTA
   Sticky "Book your free demo" button on small screens.
   Hides itself when the page's existing primary CTA is on screen
   (handled in main.js via IntersectionObserver).
   ============================================================ */
.ib-sticky-cta {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translate(-50%, 0);
  z-index: 60;
  display: none;
  padding: .95rem 1.4rem;
  background: var(--ib-accent);
  color: #fff;
  border-radius: 999px;
  font-family: var(--ib-font-sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 12px 32px -8px rgba(32,32,30,.35), 0 2px 4px rgba(32,32,30,.18);
  border: 1px solid color-mix(in srgb, var(--ib-accent) 70%, #000);
  transition: opacity .2s ease, transform .25s ease, background .15s ease;
  opacity: 1;
  text-decoration: none;
}
.ib-sticky-cta:hover { background: var(--ib-accent-hover); color: #fff; }
.ib-sticky-cta.is-hidden { opacity: 0; transform: translate(-50%, 120%); pointer-events: none; }
.ib-sticky-cta__arrow { width: 14px; height: 14px; }
[data-theme="dark"] .ib-sticky-cta {
  box-shadow: 0 12px 32px -8px rgba(0,0,0,.55), 0 2px 4px rgba(0,0,0,.4);
}
@media (max-width: 720px) {
  .ib-sticky-cta { display: inline-flex; align-items: center; gap: .45rem; }
}

/* ============================================================
   REVIEW WALL (testimonials / homepage social proof)
   ============================================================ */
.ib-review-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.ib-review {
  display: flex; flex-direction: column;
  gap: .85rem;
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--ib-card-bg);
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius);
  box-shadow: var(--ib-shadow);
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.ib-review:hover { transform: translateY(-2px); border-color: var(--ib-line-strong); }
.ib-review__stars {
  color: var(--ib-gold);
  letter-spacing: .12em;
  font-size: 1rem;
  line-height: 1;
}
.ib-review__body {
  color: var(--ib-ink);
  font-size: .98rem;
  line-height: 1.6;
  margin: 0;
}
.ib-review__meta {
  display: flex; align-items: center; gap: .75rem;
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px dashed var(--ib-line);
}
.ib-review__avatar {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--ib-accent-soft);
  color: var(--ib-accent);
  display: inline-grid; place-items: center;
  font-family: var(--ib-font-serif);
  font-weight: 700;
  font-size: .85rem;
  flex: none;
}
.ib-review__who {
  display: flex; flex-direction: column;
  font-size: .85rem;
  line-height: 1.35;
}
.ib-review__name {
  color: var(--ib-ink);
  font-weight: 600;
}
.ib-review__context {
  color: var(--ib-ink-muted);
  font-family: var(--ib-font-serif);
  font-size: .78rem;
  letter-spacing: .03em;
}
.ib-review__aggregate {
  display: flex; flex-wrap: wrap; align-items: center; gap: .85rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--ib-bg-deep);
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius);
  font-size: .92rem;
  color: var(--ib-ink-soft);
}
.ib-review__aggregate strong {
  color: var(--ib-ink);
  font-family: var(--ib-font-serif);
  font-weight: 700;
}
.ib-review__aggregate-stars { color: var(--ib-gold); letter-spacing: .1em; }

/* ============================================================
   MEET YOUR TUTOR, personal panel on homepage
   ============================================================ */
.ib-tutor-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.25rem;
  background: var(--ib-card-bg);
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius-lg);
  box-shadow: var(--ib-shadow);
}
@media (min-width: 760px) {
  .ib-tutor-card { grid-template-columns: 280px 1fr; gap: 2.5rem; }
}
.ib-tutor-card__portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--ib-radius);
  background:
    radial-gradient(circle at 30% 25%, rgba(201,100,66,.20), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(181,138,58,.14), transparent 50%),
    linear-gradient(155deg, var(--ib-bg-hero-top) 0%, var(--ib-bg-deep) 100%);
  border: 1px solid var(--ib-line);
  overflow: hidden;
  display: grid; place-items: center;
}
.ib-tutor-card__portrait::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, var(--ib-grid-line) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--ib-grid-line) 39px 40px);
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 75%);
}
.ib-tutor-card__initial {
  font-family: var(--ib-font-serif);
  font-size: 5rem;
  font-weight: 700;
  color: var(--ib-accent);
  font-style: italic;
  z-index: 1;
}
.ib-tutor-card__body { display: flex; flex-direction: column; gap: 1rem; }
.ib-tutor-card__quote {
  font-family: var(--ib-font-serif);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ib-ink);
  font-style: italic;
  margin: 0;
}
.ib-tutor-card__creds {
  display: flex; flex-wrap: wrap; gap: .4rem;
  list-style: none; padding: 0; margin: 0;
}
.ib-tutor-card__creds li {
  font-family: var(--ib-font-serif);
  font-size: .75rem;
  letter-spacing: .04em;
  padding: .35rem .7rem;
  background: var(--ib-bg-deep);
  color: var(--ib-ink-soft);
  border-radius: 999px;
  border: 1px solid var(--ib-line);
}
.ib-tutor-card__sign {
  display: flex; align-items: center; gap: 1rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--ib-line);
  font-size: .85rem;
  color: var(--ib-ink-muted);
}
.ib-tutor-card__sign strong { color: var(--ib-ink); }

/* ============================================================
   OUTCOMES BLOCK, specific, exam-board-aware numbers
   ============================================================ */
.ib-outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.ib-outcome {
  padding: 1.5rem;
  background: var(--ib-card-bg);
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius);
  display: flex; flex-direction: column; gap: .5rem;
}
.ib-outcome__figure {
  font-family: var(--ib-font-serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--ib-accent);
  letter-spacing: -.01em;
  line-height: 1;
}
.ib-outcome__label {
  color: var(--ib-ink);
  font-size: 1.02rem;
  font-weight: 500;
}
.ib-outcome__context {
  color: var(--ib-ink-muted);
  font-size: .82rem;
  font-family: var(--ib-font-serif);
  letter-spacing: .02em;
}

/* ============================================================
   HOMEPAGE FAQ ACCORDION
   ============================================================ */
.ib-faq-list {
  display: flex; flex-direction: column;
  gap: .5rem;
  max-width: 880px;
  margin: 2rem auto 0;
}
.ib-faq-item {
  background: var(--ib-card-bg);
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius);
  overflow: hidden;
}
.ib-faq-item[open] {
  border-color: var(--ib-line-strong);
  box-shadow: var(--ib-shadow);
}
.ib-faq-item summary {
  list-style: none;
  padding: 1.15rem 1.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--ib-font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ib-ink);
  transition: background-color .15s ease;
}
.ib-faq-item summary::-webkit-details-marker { display: none; }
.ib-faq-item summary:hover { background: var(--ib-bg-deep); }
.ib-faq-item summary::after {
  content: '';
  width: 12px; height: 12px;
  border-right: 2px solid var(--ib-accent);
  border-bottom: 2px solid var(--ib-accent);
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex: none;
}
.ib-faq-item[open] summary::after { transform: rotate(-135deg); }
.ib-faq-item__body {
  padding: 0 1.4rem 1.4rem;
  color: var(--ib-ink-soft);
  line-height: 1.65;
}

/* ============================================================
   DEMO TIMELINE (booking page)
   ============================================================ */
.ib-demo-timeline {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 2rem;
}
.ib-demo-step {
  position: relative;
  padding: 1.25rem 1.3rem;
  background: var(--ib-card-bg);
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius);
}
.ib-demo-step__num {
  font-family: var(--ib-font-serif);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--ib-accent);
  line-height: 1;
}
.ib-demo-step__title {
  font-size: 1rem; font-weight: 600;
  color: var(--ib-ink);
  margin: .5rem 0 .3rem;
}
.ib-demo-step__body {
  font-size: .88rem; color: var(--ib-ink-muted);
  line-height: 1.55;
}

/* ============================================================
   MOBILE-FIRST REFINEMENTS
   Layered after every other rule so they always win on small
   viewports. Audit covers: layout, spacing, typography, navigation,
   forms, buttons, touch interactions, performance.

   Breakpoints used:
     ≤ 480 px , small phones (iPhone SE / mini, narrow Androids)
     ≤ 720 px , phones generally (covers iPhone Pro Max, large Androids)
     768 px+  , tablet portrait sweet spot
     1024 px+ , laptop and up
   ============================================================ */

/* -------- Touch target minimums (44 × 44 per iOS HIG) -------- */
@media (max-width: 880px) {
  .ib-theme-toggle,
  .ib-menu-toggle { min-width: 44px; min-height: 44px; }
  .ib-btn { min-height: 44px; }
  .ib-nav-links a { min-height: 44px; display: inline-flex; align-items: center; }
  /* Mobile menu links must stay full-width stacked rows (display:flex,
     NOT inline-flex - inline-flex makes them wrap into a jumbled
     paragraph). One link per line, comfortable tap target. */
  .ib-mobile-menu a {
    min-height: 48px;
    display: flex;
    align-items: center;
    width: 100%;
  }
  /* Inline links inside body copy stay text-sized */
  p a, blockquote a { min-height: 0; display: inline; }
}

/* -------- Nav header, tighter chrome on phones ---------- */
@media (max-width: 720px) {
  .ib-nav-inner { height: 60px; gap: .5rem; }
  .ib-logo { font-size: 1.05rem; gap: .4rem; }
  .ib-logo-mark { width: 28px; height: 28px; font-size: .9rem; }
  /* The desktop "Book your free demo" pill already hides via
     Tailwind utility `hidden md:inline-flex`, nothing extra needed. */
}

/* -------- Hero, restrained padding, fluid h1, sized visual -------- */
@media (max-width: 720px) {
  .ib-hero { padding-top: 2.25rem; padding-bottom: 2.75rem; }
  .ib-hero-grid { gap: 1.5rem; }
  .ib-hero h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); line-height: 1.18; }
  /* Tame the math-illustration card: full-width with safe height */
  .ib-hero-visual {
    aspect-ratio: 5 / 4;
    max-height: 320px;
  }
  .ib-hero-formula .eq { font-size: clamp(1.45rem, 8vw, 1.85rem); }
  /* Make the hero lead readable without being shouty */
  .ib-hero p.text-lg { font-size: 1rem; line-height: 1.6; }
  /* The aggregate-stars line wraps cleanly on narrow widths */
  .ib-hero .ib-review__aggregate-stars { display: inline-block; margin-right: .25rem; }
}

/* -------- Section rhythm on small screens -------- */
@media (max-width: 720px) {
  .ib-section { padding-block: 2.75rem; }
  .ib-page-hero { padding-top: 2.5rem; padding-bottom: 1.25rem; }
  /* Mobile heading scale: still clearly headings, never body-sized */
  body h1 { font-size: clamp(2rem, 8.5vw, 2.6rem); }
  body h2 { font-size: clamp(1.5rem, 6vw, 1.9rem); }
  body h3 { font-size: clamp(1.08rem, 4.2vw, 1.22rem); }
  .ib-page-hero h1 { font-size: clamp(2.1rem, 9vw, 2.7rem); }
  /* Eyebrows stay readable on phones too */
  .ib-eyebrow { font-size: .84rem; letter-spacing: .16em; }
  .ib-page-hero .ib-eyebrow { font-size: .9rem; }
}

/* -------- Trust band and stat row, two columns on tiny phones,
            four only when wide enough -------- */
.ib-trust-grid,
.ib-stat-row {
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 380px) {
  .ib-trust-grid,
  .ib-stat-row { grid-template-columns: 1fr; gap: 1rem; }
}

/* -------- "Meet your tutor" card, friendlier on mobile -------- */
@media (max-width: 720px) {
  .ib-tutor-card {
    padding: 1.5rem;
    gap: 1.25rem;
    border-radius: var(--ib-radius);
  }
  .ib-tutor-card__portrait {
    aspect-ratio: 4 / 3;
    max-height: 220px;
  }
  .ib-tutor-card__initial { font-size: 3.5rem; }
  .ib-tutor-card__quote { font-size: 1.02rem; line-height: 1.5; }
  .ib-tutor-card__sign { flex-wrap: wrap; gap: .85rem; }
  .ib-tutor-card__sign .ib-btn { margin-left: 0; width: 100%; justify-content: center; }
}

/* -------- Outcomes, tighter on the smallest phones -------- */
@media (max-width: 480px) {
  .ib-outcomes { gap: .75rem; }
  .ib-outcome { padding: 1.2rem; }
  .ib-outcome__figure { font-size: 1.7rem; }
  .ib-outcome__label { font-size: .95rem; }
}

/* -------- Homepage FAQ, bigger touch surface -------- */
@media (max-width: 720px) {
  .ib-faq-item summary {
    padding: 1.1rem 1.2rem;
    font-size: 1rem;
    min-height: 56px;
  }
  .ib-faq-item__body { padding: 0 1.2rem 1.2rem; font-size: .95rem; }
}

/* -------- Booking demo timeline, tighter cards on tiny screens -------- */
@media (max-width: 480px) {
  .ib-demo-timeline { gap: .65rem; }
  .ib-demo-step { padding: 1rem 1.1rem; }
  .ib-demo-step__num { font-size: 1.4rem; }
  .ib-demo-step__title { font-size: .95rem; }
  .ib-demo-step__body { font-size: .82rem; }
}

/* -------- Forms, iOS zoom prevention + bigger touch targets -------- */
@media (max-width: 720px) {
  .ib-field input,
  .ib-field select,
  .ib-field textarea {
    font-size: 16px; /* prevents iOS Safari auto-zoom on focus */
    padding: .9rem 1rem;
  }
  .ib-field select { padding-right: 2.7rem; }
  /* Same fixed height for inputs + selects on phones too */
  .ib-field input,
  .ib-field select { height: 50px; }
  .ib-field textarea { min-height: 120px; }
  .ib-field label { font-size: .85rem; margin-bottom: .3rem; }
  .ib-checkgroup label { min-height: 44px; padding: .5rem .85rem .5rem .55rem; }
}

/* -------- Hero stats list on the practice / tutor cards on landing pages -------- */
@media (max-width: 720px) {
  .ib-hero__stats {
    grid-template-columns: 1fr 1fr;
    gap: .85rem 1rem;
    padding-top: 1rem;
  }
  .ib-hero__stats li { font-size: .82rem; }
  .ib-hero__stats strong { font-size: 1.35rem; }
}

/* -------- Footer, single column on the smallest phones -------- */
@media (max-width: 520px) {
  .ib-footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .ib-footer-bottom { justify-content: flex-start; gap: .65rem; flex-direction: column; align-items: flex-start; }
}

/* -------- Sticky CTA, keep it from covering page content + footer -------- */
@media (max-width: 720px) {
  /* Reserve room so the floating button never sits on top of content */
  body { padding-bottom: 5.5rem; }
  /* But on pages with no sticky CTA (booking / thanks) we don't need it */
  body:not(:has([data-sticky-cta])) { padding-bottom: 0; }
  .ib-sticky-cta {
    min-height: 48px;
    padding: .9rem 1.25rem;
    font-size: .92rem;
  }
}

/* -------- Curricula landing pages, sharper tablet layout -------- */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Tailwind's lg breakpoint is 1024, give us a tablet 2-col layout at 768 */
  .ib-section .grid.lg\:grid-cols-2 {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* -------- Cards, slightly looser type for legibility on phones -------- */
@media (max-width: 720px) {
  .ib-card { padding: 1.5rem 1.4rem; }
  .ib-card-feature { padding: 1.6rem 1.4rem; }
  .ib-card h3 { font-size: 1.1rem; }
  .ib-card p { font-size: .95rem; line-height: 1.6; }
}

/* -------- Hero CTA strip, relax dark plate on mobile -------- */
@media (max-width: 720px) {
  .ib-cta-strip { padding: 2.5rem 1.5rem !important; }
  .ib-cta-strip h2 { font-size: 1.4rem; }
  .ib-cta-strip p { font-size: 1rem; }
}

/* -------- Marquee strip, keep it from feeling claustrophobic -------- */
@media (max-width: 720px) {
  .ib-marquee { padding: .65rem 0; }
  .ib-marquee-item { font-size: .72rem; margin-right: 1.75rem; }
}

/* -------- Quotes / testimonials on home + dedicated page -------- */
@media (max-width: 720px) {
  .ib-quote { padding: 1.4rem 1.4rem 1.2rem; }
  .ib-quote blockquote { font-size: 1rem; line-height: 1.55; }
  .ib-quote::before { font-size: 3rem; left: .7rem; }
  .ib-meta-name { font-size: .92rem; }
  .ib-meta-role { font-size: .8rem; }
}

/* -------- Block any horizontal scroll caused by overflow -------- */
html, body { overflow-x: hidden; }

/* -------- Image responsiveness, every <img> stays in its box -------- */
img { max-width: 100%; height: auto; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .ib-reveal { opacity: 1; transform: none; }
}

/* =====================================================================
   DARK-MODE READABILITY GUARD (added 2026-06)
   Inline-styled "inverted" panels use background: var(--ib-ink) with
   cream copy hardcoded as rgba(245,241,235,…). In dark mode --ib-ink
   flips to a light tone, washing that copy out completely (homepage CTA,
   booking sidebar, contact card, services/about/faq/testimonials CTAs).
   Pin those panels to a dark slab in dark mode, and re-pin any inline
   color: var(--ib-bg) text inside them, and in the footer logo, back
   to cream. One rule set fixes every page.
   ===================================================================== */
[data-theme="dark"] [style*="background: var(--ib-ink)"],
[data-theme="dark"] [style*="background:var(--ib-ink)"] {
  background: #24221E !important;
  color: var(--ib-footer-text) !important;
}
[data-theme="dark"] [style*="background: var(--ib-ink)"] [style*="color: var(--ib-bg)"],
[data-theme="dark"] [style*="background: var(--ib-ink)"] [style*="color:var(--ib-bg)"],
[data-theme="dark"] [style*="background:var(--ib-ink)"] [style*="color: var(--ib-bg)"],
[data-theme="dark"] [style*="background:var(--ib-ink)"] [style*="color:var(--ib-bg)"],
[data-theme="dark"] .ib-footer [style*="color: var(--ib-bg)"],
[data-theme="dark"] .ib-footer [style*="color:var(--ib-bg)"] {
  color: var(--ib-footer-text) !important;
}

/* =====================================================================
   RESPONSIVE & CONSISTENCY GUARD (UI audit, 2026-06)
   ===================================================================== */

/* 1) Global border-box, the missing reset behind several mobile
      overflows (any width:100% element with padding spilled out). */
*, *::before, *::after { box-sizing: border-box; }

/* 2) Buttons are pills, never let labels wrap into ovals. */
.ib-btn { white-space: nowrap; }

/* 3) Long headings/words never overflow small screens. */
h1, h2, h3, blockquote { overflow-wrap: break-word; }

/* 4) Sticky mobile CTA: one line, slimmer, always inside the viewport. */
.ib-sticky-cta {
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
  padding: .8rem 1.3rem;
}

/* 5) Tutor-card sign-off: stack on small screens so the "Read the full
      story" pill sits cleanly under the text instead of squeezing into
      an oval next to it. */
@media (max-width: 640px) {
  .ib-tutor-card__sign { flex-direction: column; align-items: flex-start; gap: .85rem; }
  .ib-tutor-card__sign .ib-btn { margin-left: 0 !important; }
}

/* 6) Slightly lighter buttons on phones, matches the premium feel. */
@media (max-width: 720px) {
  .ib-btn { padding: .75rem 1.2rem; font-size: .92rem; }
  .ib-hero .ib-btn, .ib-section .ib-btn { width: auto; }
}

/* 7) iOS: inputs under 16px trigger auto-zoom on focus. */
@media (max-width: 720px) {
  input, select, textarea { font-size: max(16px, 1em); }
}

/* =====================================================================
   PREMIUM DARK-MODE SYSTEM v2 + COMPONENT REFINEMENTS (UI audit 2026-06)
   Layered warm charcoals, subtle borders, calmer emphasis surfaces,
   compact nav CTA, visible focus states. Later block overrides tokens.
   ===================================================================== */
[data-theme="dark"] {
  /* layered surfaces: page → soft → deep → card, each a step lighter */
  --ib-bg:           #1A1916;
  --ib-bg-soft:      #1E1D1A;
  --ib-bg-deep:      #232220;
  --ib-card-bg:      #211F1C;
  --ib-line:         #343129;
  --ib-line-strong:  #45413A;
  --ib-nav-bg:       rgba(26,25,22,0.85);
  --ib-footer-bg:    #141311;
  /* emphasis plates become layered surfaces, not black holes */
  --ib-emphasis-bg:        #232120;
  --ib-emphasis-line:      rgba(242,239,232,.1);
}

/* Inverted (ink) panels: refined slab, soft elevation, subtle border. */
[data-theme="dark"] [style*="background: var(--ib-ink)"],
[data-theme="dark"] [style*="background:var(--ib-ink)"] {
  background: linear-gradient(180deg, #262420, #211F1C) !important;
  border: 1px solid rgba(242,239,232,.09);
  box-shadow: 0 18px 40px -24px rgba(0,0,0,.6);
}

/* Navigation CTA: refined and proportional to the nav bar. */
.ib-nav .ib-btn, .ib-nav a.ib-btn.ib-btn-primary {
  padding: .55rem 1.1rem !important;
  font-size: .875rem !important;
  font-weight: 500;
  box-shadow: none;
}

/* Consistent, accessible focus states everywhere. */
a:focus-visible, button:focus-visible, .ib-btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ib-accent);
  outline-offset: 2px;
}

/* =====================================================================
   CTA SLAB COMPONENT (design-system refactor, audit 2026-06)
   Replaces every inline "background: var(--ib-ink)" panel across the
   site. The slab is deliberately dark in BOTH themes - a consistent
   anchor moment - so no token flip can ever wash out its copy again.
   Light mode: deep ink slab. Dark mode: a layered charcoal surface one
   step above the page, with a soft border and copper glow.
   ===================================================================== */
.ib-cta-slab {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-radius: var(--ib-radius-lg);
  padding: clamp(2.75rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2.5rem);
  background: linear-gradient(180deg, #262320, #1C1B18);
  color: rgba(245, 241, 235, .8);
  border: 1px solid rgba(245, 241, 235, .07);
}
.ib-cta-slab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 18%, rgba(201, 100, 66, .28), transparent 52%);
  pointer-events: none;
}
.ib-cta-slab > * { position: relative; z-index: 1; }

.ib-cta-slab__kicker {
  font-family: var(--ib-font-sans);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #E8845E;
}
.ib-cta-slab h2, .ib-cta-slab h3, .ib-cta-slab strong { color: #F5F1EB; }
.ib-cta-slab h2 { max-width: 700px; margin-inline: auto; }
.ib-cta-slab p { color: rgba(245, 241, 235, .78); max-width: 640px; margin-inline: auto; }
.ib-cta-slab a:not(.ib-btn) { color: #E8845E; }

/* Ghost button that lives on dark slabs (both themes). */
.ib-btn-ghost-invert {
  background: transparent;
  color: #F5F1EB;
  border: 1px solid rgba(245, 241, 235, .3);
}
.ib-btn-ghost-invert:hover {
  background: rgba(245, 241, 235, .07);
  border-color: rgba(245, 241, 235, .55);
  color: #F5F1EB;
}

/* Aside / compact variants (booking sidebar, contact card). */
.ib-cta-slab--aside { text-align: left; padding: 2rem; }
.ib-cta-slab--aside h3, .ib-cta-slab--aside p { margin-inline: 0; max-width: none; }
.ib-cta-slab--compact { padding: 1.5rem; border-radius: var(--ib-radius); }

/* Numbered steps list (booking sidebar). */
.ib-cta-slab__steps { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.ib-cta-slab__steps li { margin-bottom: 1.25rem; padding-left: 2.4rem; position: relative; }
.ib-cta-slab__steps li:last-child { margin-bottom: 0; }
.ib-cta-slab__steps .num {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--ib-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ib-font-serif);
  font-weight: 700;
}
.ib-cta-slab__steps strong { display: block; }
.ib-cta-slab__steps .desc { font-size: .92rem; color: rgba(245, 241, 235, .72); }
.ib-cta-slab hr { border: 0; border-top: 1px solid rgba(245, 241, 235, .14); margin: 1.5rem 0; }
.ib-cta-slab .fineprint { font-size: .85rem; color: rgba(245, 241, 235, .7); }

[data-theme="dark"] .ib-cta-slab {
  background: linear-gradient(180deg, #272521, #211F1C);
  border-color: rgba(242, 239, 232, .10);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .6);
}



/* =====================================================================
   MOBILE + DARK-MODE VISUAL-WEIGHT REFINEMENT (audit v3, 2026-06)
   Dark mode is its own design system, not an inversion. Filled accent
   surfaces step DOWN in brightness on dark (links/text keep the
   brighter coral for contrast). The floating mobile CTA becomes a
   compact, safe-area-aware pill instead of a promotional blob, and
   mobile sections tighten their rhythm so pages read as one product.
   ===================================================================== */

/* 1) Filled accent surfaces: deeper copper in dark mode, calm, not loud. */
[data-theme="dark"] .ib-btn-accent { background: #B95F41; }
[data-theme="dark"] .ib-btn-accent:hover { background: #C96442; }
[data-theme="dark"] .ib-cta-slab .ib-btn-accent { background: #BD5F40; }
[data-theme="dark"] .ib-cta-slab .ib-btn-accent:hover { background: #C96442; }

/* 2) Sticky mobile CTA: refined pill, 44px tap target, quiet shadow,
      never wraps, never collides with the iOS home indicator. */
.ib-sticky-cta {
  bottom: calc(.9rem + env(safe-area-inset-bottom, 0px));
  min-height: 44px;
  padding: .6rem 1.15rem;
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
  box-shadow: 0 8px 24px -10px rgba(32, 32, 30, .35);
}
.ib-sticky-cta__arrow { width: 13px; height: 13px; flex: 0 0 auto; }
@media (max-width: 720px) {
  body { padding-bottom: 4.5rem; }
  body:not(:has([data-sticky-cta])) { padding-bottom: 0; }
  .ib-sticky-cta { min-height: 44px; padding: .6rem 1.15rem; font-size: .875rem; }
}
[data-theme="dark"] .ib-sticky-cta {
  background: #B95F41;
  border: 1px solid rgba(242, 239, 232, .16);
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .55);
}
[data-theme="dark"] .ib-sticky-cta:hover { background: #C96442; }

/* 3) Mobile rhythm: sections stop being desktop-sized posters. */
@media (max-width: 720px) {
  .ib-section { padding-block: 3.5rem; }
  .ib-cta-slab { border-radius: var(--ib-radius); }
  .ib-cta-slab .ib-btn {
    width: min(100%, 320px);
    justify-content: center;
  }
}

/* =====================================================================
   MOTION SYSTEM v3 — "CONSTELLATION OF LEARNING" (experience pass 2026-06)
   Signature idea: knowledge as points plotted on the brand's coordinate
   grid, connecting into constellations. Every motion uses one easing
   family ("settle") so the whole product moves like one material.
   Rules: transform/opacity only, 44px touch logic untouched, all
   ambient motion pauses under prefers-reduced-motion (guard at end).
   ===================================================================== */

:root {
  --ibe-out:    cubic-bezier(.22,.61,.21,1);   /* signature settle */
  --ibe-pop:    cubic-bezier(.3,1.25,.4,1);    /* gentle overshoot, micro only */
  --ibe-spring: cubic-bezier(.34,1.45,.5,1);   /* entrances of small chips */
  --ib-dur-1: .16s;  /* press / hover color */
  --ib-dur-2: .3s;   /* hovers, underlines */
  --ib-dur-3: .55s;  /* reveals */
}

/* ---------- 1) Cross-page transitions (progressive enhancement) ----- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: .18s; }
::view-transition-new(root) { animation-duration: .26s; animation-timing-function: var(--ibe-out); }

/* ---------- 2) Reading progress hairline ---------------------------- */
.ib-scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 70;
  background: linear-gradient(90deg, var(--ib-accent), var(--ib-gold));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- 3) Navigation ------------------------------------------- */
.ib-nav { transition: box-shadow .35s ease, background-color .25s ease; }
.ib-nav.is-scrolled { box-shadow: 0 10px 30px -18px rgba(32,32,30,.28); }
[data-theme="dark"] .ib-nav.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.65); }

/* Logo mark: quiet tilt-and-settle on hover */
.ib-logo-mark { transition: transform var(--ib-dur-2) var(--ibe-pop), background var(--ib-dur-1) ease; }
.ib-logo:hover .ib-logo-mark { transform: rotate(-6deg) scale(1.06); }

/* Active page underline: grows from center instead of sitting static */
.ib-nav-links a.active::after {
  animation: ib-underline-in .45s var(--ibe-out) both;
  transform-origin: 50% 50%;
}
@keyframes ib-underline-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Mobile menu: settle in, items cascade */
.ib-mobile-menu.open { animation: ib-menu-in .32s var(--ibe-out) both; }
@keyframes ib-menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.ib-mobile-menu.open a { animation: ib-fade-up .42s var(--ibe-out) both; }
.ib-mobile-menu.open a:nth-child(1) { animation-delay: .03s; }
.ib-mobile-menu.open a:nth-child(2) { animation-delay: .06s; }
.ib-mobile-menu.open a:nth-child(3) { animation-delay: .09s; }
.ib-mobile-menu.open a:nth-child(4) { animation-delay: .12s; }
.ib-mobile-menu.open a:nth-child(5) { animation-delay: .15s; }
.ib-mobile-menu.open a:nth-child(6) { animation-delay: .18s; }
.ib-mobile-menu.open a:nth-child(7) { animation-delay: .21s; }
.ib-mobile-menu.open a:nth-child(8) { animation-delay: .24s; }

/* ---------- 4) Buttons: one tactile grammar ------------------------- */
/* Magnet (JS sets `translate`) and press (scale) compose with the
   existing hover transform without overwriting it. */
.ib-btn {
  translate: 0 0;
  transition:
    background-color var(--ib-dur-1) ease,
    color var(--ib-dur-1) ease,
    border-color var(--ib-dur-1) ease,
    box-shadow var(--ib-dur-2) var(--ibe-out),
    transform var(--ib-dur-2) var(--ibe-out),
    translate .4s var(--ibe-out),
    scale var(--ib-dur-1) var(--ibe-out);
}
.ib-btn:active { scale: .97; }
.ib-btn-primary:hover, .ib-btn-accent:hover { box-shadow: 0 10px 24px -10px rgba(201,100,66,.45); }
[data-theme="dark"] .ib-btn-primary:hover,
[data-theme="dark"] .ib-btn-accent:hover { box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); }

/* Sheen: slower, softer, only on filled buttons */
.ib-btn::before { transition: transform .8s var(--ibe-out); opacity: .7; }
.ib-btn-ghost::before { display: none; }

/* Trailing arrows nudge toward the destination */
.ib-btn svg, .ib-sticky-cta__arrow { transition: transform var(--ib-dur-2) var(--ibe-out); }
.ib-btn:hover svg { transform: translateX(3px); }
.ib-sticky-cta:hover .ib-sticky-cta__arrow { transform: translateX(3px); }

/* Submitting state: label dims, a node orbits */
.ib-btn.is-loading { pointer-events: none; opacity: .85; }
.ib-btn.is-loading::after {
  content: '';
  width: 13px; height: 13px; flex: none;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: ib-spin .65s linear infinite;
}
@keyframes ib-spin { to { transform: rotate(360deg); } }

/* ---------- 5) Cards: cursor-aware spotlight ------------------------ */
/* JS adds data-spot + tracks --mx/--my. Touch devices never see it. */
[data-spot] { position: relative; }
[data-spot]::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
  background: radial-gradient(230px circle at var(--mx, 50%) var(--my, 50%),
              color-mix(in srgb, var(--ib-accent) 8%, transparent), transparent 68%);
}
[data-spot]:hover::after { opacity: 1; }
[data-theme="dark"] [data-spot]::after {
  background: radial-gradient(250px circle at var(--mx, 50%) var(--my, 50%),
              rgba(232,132,94,.09), transparent 68%);
}
/* The interactive card's old sheen becomes the same spotlight */
.ib-card-interactive::after {
  background: radial-gradient(230px circle at var(--mx, 50%) var(--my, 50%),
              color-mix(in srgb, var(--ib-accent) 9%, transparent), transparent 68%);
  transform: none;
}
@media (hover: none) { [data-spot]::after, .ib-card-interactive::after { display: none; } }

/* Icon chips inside cards: settle-tilt when the card is hovered */
.ib-card .ib-icon-wrap { transition: transform var(--ib-dur-2) var(--ibe-pop), background var(--ib-dur-2) ease; }
.ib-card:hover .ib-icon-wrap { transform: translateY(-2px) rotate(-3deg); }

/* ---------- 6) Reveals: settle with a touch of focus ---------------- */
/* Hero entrance gains a subtle defocus→sharp settle (compositable). */
@keyframes ib-fade-up {
  from { opacity: 0; transform: translateY(20px); filter: blur(5px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.ib-reveal { transition-timing-function: ease, var(--ibe-out); }

/* ---------- 7) Constellation primitives ----------------------------- */
@keyframes ib-node-in {
  from { opacity: 0; transform: scale(.2); }
  60%  { opacity: 1; transform: scale(1.25); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes ib-twinkle {
  0%, 100% { opacity: .95; }
  50%      { opacity: .45; }
}
@keyframes ib-line-draw { to { stroke-dashoffset: 0; } }

.ib-constellation { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.ib-constellation circle {
  fill: var(--ib-accent);
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation:
    ib-node-in .6s var(--ibe-pop) both,
    ib-twinkle 7s ease-in-out infinite;
  animation-delay: var(--d, 0s), calc(var(--d, 0s) + 2.2s);
}
.ib-constellation circle.is-gold { fill: var(--ib-gold); }
.ib-constellation line {
  stroke: var(--ib-accent);
  stroke-width: 1;
  stroke-opacity: .3;
  stroke-dasharray: var(--len, 120);
  stroke-dashoffset: var(--len, 120);
  animation: ib-line-draw .9s var(--ibe-out) both;
  animation-delay: var(--d, 0s);
}
[data-theme="dark"] .ib-constellation line { stroke-opacity: .4; }

/* ---------- 8) Marquee: respect the reading hand --------------------- */
.ib-marquee:hover .ib-marquee-track { animation-play-state: paused; }

/* ---------- 9) FAQ: answers settle into place ------------------------ */
.ib-faq-item[open] .ib-faq-item__body,
.ib-faq details[open] p { animation: ib-faq-in .38s var(--ibe-out) both; }
@keyframes ib-faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.ib-faq-item summary::after { transition: transform .3s var(--ibe-pop); }

/* ---------- 10) Forms: quiet, confident feedback --------------------- */
.ib-field { transition: transform var(--ib-dur-2) var(--ibe-out); }
.ib-field label { transition: color var(--ib-dur-1) ease; }
.ib-field:focus-within label { color: var(--ib-accent); }

/* Positive-only validation: a small check plots in once a field is sound */
.ib-field.is-valid input,
.ib-field.is-valid textarea {
  border-color: color-mix(in srgb, var(--ib-success) 50%, var(--ib-line-strong));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F7A4A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: .95rem;
  padding-right: 2.6rem;
}
.ib-field.is-valid textarea { background-position: right .9rem top .95rem; }
[data-theme="dark"] .ib-field.is-valid input,
[data-theme="dark"] .ib-field.is-valid textarea {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237AAE73' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}
/* Never decorate selects (they own a chevron) */
.ib-field.is-valid select { background-image: none; }
[data-theme="dark"] .ib-field.is-valid select { background-image: none; }
.ib-field.is-valid select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23807A72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
[data-theme="dark"] .ib-field.is-valid select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9C4BB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

/* Submission confirmed: a constellation check draws itself */
.ib-form-success { text-align: center; padding: 2.5rem 1rem; }
.ib-form-success__mark { width: 72px; height: 72px; margin: 0 auto 1.1rem; display: block; }
.ib-form-success__mark .ring {
  fill: none; stroke: var(--ib-accent); stroke-width: 2;
  stroke-dasharray: 195; stroke-dashoffset: 195;
  animation: ib-line-draw .8s var(--ibe-out) .1s forwards;
}
.ib-form-success__mark .tick {
  fill: none; stroke: var(--ib-success); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 50; stroke-dashoffset: 50;
  animation: ib-line-draw .5s var(--ibe-out) .75s forwards;
}
.ib-form-success__mark .node {
  fill: var(--ib-gold);
  transform-box: fill-box; transform-origin: center;
  opacity: 0;
  animation: ib-node-in .5s var(--ibe-pop) both;
  animation-delay: var(--d, 1s);
}
.ib-form-success h3, .ib-form-success .headline {
  font-size: 1.6rem; font-weight: 700; color: var(--ib-ink);
  animation: ib-fade-up .6s var(--ibe-out) .35s both;
}
.ib-form-success p { animation: ib-fade-up .6s var(--ibe-out) .5s both; }

/* ---------- 11) Sticky CTA: springs in, never lurches ---------------- */
.ib-sticky-cta { transition: opacity .25s ease, transform .5s var(--ibe-spring), background .15s ease; }

/* ---------- 12) Footer: links answer the hand ------------------------ */
.ib-footer a { transition: color var(--ib-dur-1) ease, transform var(--ib-dur-2) var(--ibe-out); }
.ib-footer a:hover { transform: translateX(3px); }
.ib-footer-bottom { transition: none; }

/* ---------- 13) 404 / empty state art -------------------------------- */
.ib-lost-constellation {
  position: static; inset: auto;
  width: min(280px, 70vw); height: auto;
  margin: 0 auto 1.5rem; display: block;
}

/* ---------- Reduced motion: ambient layers stand still --------------- */
@media (prefers-reduced-motion: reduce) {
  .ib-scroll-progress { display: none; }
  .ib-constellation circle { opacity: .9; animation: none; }
  .ib-constellation line { stroke-dashoffset: 0; animation: none; }
  .ib-form-success__mark .ring,
  .ib-form-success__mark .tick { stroke-dashoffset: 0; animation: none; }
  .ib-form-success__mark .node { opacity: 1; animation: none; }
  [data-spot]::after, .ib-card-interactive::after { display: none; }
  .ib-btn { translate: none !important; }
}

/* =================================================================
   Card-network acceptance marks (Visa / Mastercard / Amex /
   Discover / PayPal). Rendered by assets/js/cardbrand.js into any
   [data-cardmarks] container. Decorative only — no card data.
   ================================================================= */
.ib-cardmarks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin-top: 1rem;
}
.ib-cardmark {
  display: inline-flex;
  width: 42px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 5px;
  box-shadow: 0 1px 2.5px rgba(16, 24, 40, .13);
}
.ib-cardmark svg { display: block; width: 100%; height: 100%; border-radius: 5px; }
/* Caption always sits on its own centered line beneath the marks. */
.ib-cardmarks__lbl {
  flex: 0 0 100%;
  text-align: center;
  margin-top: .5rem;
  font-size: .72rem;
  line-height: 1.35;
  color: var(--ib-ink-muted, #9a8f82);
  letter-spacing: .02em;
}
@media (prefers-reduced-motion: no-preference) {
  .ib-cardmark { transition: transform .15s ease, box-shadow .15s ease; }
  .ib-cardmark:hover { transform: translateY(-1px); box-shadow: 0 2px 5px rgba(16, 24, 40, .16); }
}
