/* AcademicDude home page (v10)
   Loaded on the home page only, after style.css. Same tokens, same rules:
   colour from tokens, motion with transform and opacity, everything calmer
   for reduced motion, touch-first on phones (iPhone safe areas, 44px targets,
   16px inputs so iOS does not zoom). */

/* ==========================================================
   Hero "Marginalia": the hero is a manuscript page
   Light = ruled paper in daylight. Dark = the same page on a night desk, under a lamp.
   The copy and the form are plain HTML and paint at once; only decoration moves, and
   it moves with transform and opacity. The ink loop is drawn on a canvas by hero.js.
   ========================================================== */
.home-hero {
  --paper: #F8F6F0; --paper-fade: rgba(248, 246, 240, 0); --paper-rule: rgba(52, 96, 148, .16); --paper-margin: rgba(244, 119, 33, .6);
  --paper-shadow: 0 34px 60px -42px rgba(23, 25, 29, .5); --lamp: rgba(244, 119, 33, .1); --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); --grain-o: .2;
  --card-shadow: 0 1px 1px rgba(23, 25, 29, .05), 0 12px 24px -12px rgba(23, 25, 29, .2), 0 36px 70px -34px rgba(23, 25, 29, .38);
  --ink-stroke: rgba(23, 25, 29, .6); --ink-text: #17191D; --ink-num: #B5520F; --ink-mark: #F47721; --ink-glow: 0;
  --hang: 116px;
  position: relative; isolation: isolate; padding-bottom: clamp(18px, 2.6vw, 34px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-hero { --paper: #181B21; --paper-fade: rgba(24, 27, 33, 0); --paper-rule: rgba(255, 255, 255, .055); --paper-margin: rgba(244, 119, 33, .62);
  --paper-shadow: 0 40px 70px -40px rgba(0, 0, 0, .95); --lamp: rgba(244, 119, 33, .26); --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); --grain-o: .1;
  --card-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 30px 70px -24px rgba(0, 0, 0, .9);
  --ink-stroke: rgba(236, 237, 239, .52); --ink-text: #ECEDEF; --ink-num: #FF9A52; --ink-mark: #FF8A3D; --ink-glow: 1; }
}
:root[data-theme="dark"] .home-hero { --paper: #181B21; --paper-fade: rgba(24, 27, 33, 0); --paper-rule: rgba(255, 255, 255, .055); --paper-margin: rgba(244, 119, 33, .62);
  --paper-shadow: 0 40px 70px -40px rgba(0, 0, 0, .95); --lamp: rgba(244, 119, 33, .26); --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); --grain-o: .1;
  --card-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 30px 70px -24px rgba(0, 0, 0, .9);
  --ink-stroke: rgba(236, 237, 239, .52); --ink-text: #ECEDEF; --ink-num: #FF9A52; --ink-mark: #FF8A3D; --ink-glow: 1; }

.hero-page { position: relative; margin-inline: clamp(0px, 1vw, 14px); padding-top: calc(var(--header-h) + clamp(22px, 3vw, 44px)); }
.hero-media { position: absolute; inset: 0 0 var(--hang) 0; z-index: -1; overflow: hidden; border-radius: 0 0 clamp(26px, 3.4vw, 44px) clamp(26px, 3.4vw, 44px); background: var(--paper); box-shadow: var(--paper-shadow); }
.hero-media i { position: absolute; display: block; }
.hm-rules { inset: -40px 0 0; background: repeating-linear-gradient(180deg, transparent 0 33px, var(--paper-rule) 33px 34px); -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .4), #000 60%); mask-image: linear-gradient(90deg, rgba(0, 0, 0, .4), #000 60%); }
.hm-margin { top: 0; bottom: 0; left: clamp(10px, 2.2vw, 38px); width: 1.5px; background: var(--paper-margin); }
.hm-glow { width: 980px; height: 980px; right: -280px; top: -460px; border-radius: 50%; background: radial-gradient(circle, var(--lamp), transparent 62%); }
.hm-grain { inset: 0; background-image: var(--grain); background-size: 180px 180px; opacity: var(--grain-o); }
/* Optional video (see README): it fades in over the paper once it can play, and a scrim keeps the text at AA contrast */
.hm-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s var(--ease); }
.hm-scrim { inset: 0; opacity: 0; background: linear-gradient(90deg, var(--paper) 0%, var(--paper) 46%, var(--paper-fade) 88%); transition: opacity .9s var(--ease); }
.home-hero.is-video .hm-video { opacity: 1; }
.home-hero.is-video .hm-scrim { opacity: .94; }
.home-hero.is-video .hero-ink { opacity: 0; }

.hero-grid { max-width: 1400px; display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); grid-template-areas: "copy stage" "form stage" "side side"; column-gap: clamp(28px, 4vw, 64px); align-items: start; }
.hero-copy { grid-area: copy; min-width: 0; }
.hero-kicker { display: flex; align-items: baseline; gap: 10px; margin: 0; max-width: 620px; font-size: 14.5px; font-weight: 500; line-height: 1.45; color: var(--muted); }
.hk-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); transform: translateY(-1px); }
.hk-c { font-weight: 700; color: var(--ink); white-space: nowrap; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 2px no-repeat; }
.hero-title { margin: clamp(14px, 1.8vw, 22px) 0 clamp(16px, 1.8vw, 24px); font-size: clamp(54px, 6.1vw, 90px); font-weight: 500; line-height: .96; letter-spacing: -.035em; }
.ht-line { display: block; }
.ht-accent { position: relative; display: inline-block; white-space: nowrap; font-style: italic; padding-right: .05em; transform-origin: 0 85%; }
.ht-stroke { position: absolute; left: -1.5%; right: -1%; bottom: -.12em; height: .2em; overflow: hidden; color: var(--accent); pointer-events: none; }
.ht-stroke svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hero-lead { margin: 0; max-width: 34em; font-size: clamp(17px, 1.3vw, 19.5px); line-height: 1.6; color: var(--muted); }
.hl-own { padding: 0 .14em; margin: 0 -.14em; border-radius: 3px; font-weight: 600; color: var(--ink); background: linear-gradient(transparent 58%, var(--accent-line) 58% 94%, transparent 94%); }

/* The accent word: it starts a little askew and straightens, then the pen underlines it.
   The word is readable from the first frame; the underline is the only thing that waits. */
@keyframes ht-settle { from { transform: rotate(-2.4deg) skewX(-5deg) translateY(.07em); } to { transform: none; } }
@keyframes ht-wipe-a { from { transform: translateX(-101%); } to { transform: none; } }
@keyframes ht-wipe-b { from { transform: translateX(101%); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .ht-accent { animation: ht-settle 1s var(--spring) .3s backwards; }
  .ht-stroke { animation: ht-wipe-a .8s var(--ease) 1s backwards; }
  .ht-stroke svg { animation: ht-wipe-b .8s var(--ease) 1s backwards; }
  .ht-accent.is-redraw .ht-stroke { animation: ht-wipe-a .8s var(--ease) both; }
  .ht-accent.is-redraw .ht-stroke svg { animation: ht-wipe-b .8s var(--ease) both; }
  .home-hero.is-paused *, .home-hero.is-paused *::before, .home-hero.is-paused *::after { animation-play-state: paused !important; }
}

/* The enquiry form: an index card on a small stack. The stack fans out a little when the form is in use. */
.intake-stack { grid-area: form; position: relative; z-index: 1; margin-top: clamp(22px, 2.6vw, 34px); }
.intake-stack::before, .intake-stack::after { content: ""; position: absolute; inset: 0; border-radius: 18px; background: #FFFFFF; border: 1px solid #DDE1E7; transition: transform .5s var(--spring); }
.intake-stack::before { background: #EDEFF3; transform: rotate(-1.5deg) translate(-5px, 6px); }
.intake-stack::after { transform: rotate(1deg) translate(5px, 7px); }
.intake-stack:focus-within::before, .intake-stack:hover::before { transform: rotate(-2.4deg) translate(-9px, 9px); }
.intake-stack:focus-within::after, .intake-stack:hover::after { transform: rotate(1.8deg) translate(9px, 11px); }
.intake {
  --ink: #17191D; --muted: #5A606C; --surface: #FFFFFF; --surface-2: #F3F4F7; --line: #E3E6EB; --line-strong: #C9CED6;
  --accent-text: #B5520F; --accent-soft: rgba(244, 119, 33, .11); --accent-line: rgba(244, 119, 33, .42); --inverse-bg: #17191D; --inverse-fg: #FFFFFF;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B5520F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  position: relative; z-index: 1; padding: 14px 16px 14px; border-radius: 18px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--card-shadow);
}
.intake-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 0 2px 10px; border-bottom: 1.5px solid var(--accent-line); font-size: 15px; font-weight: 600; }
.intake-title svg { width: 20px; height: 20px; flex: none; color: var(--accent-text); }
.intake-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto; gap: 8px; align-items: stretch; }
.intake-field { position: relative; display: grid; align-content: center; gap: 2px; min-width: 0; min-height: 58px; padding: 8px 14px; border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.intake-field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.intake-field:hover { background: #ECEEF2; }
.intake-field:focus-within { background: #FFFFFF; outline: 2px solid var(--accent); outline-offset: 1px; }
.intake-field:focus-within::after { transform: scaleX(1); }
.intake-field label { justify-self: start; font-size: 12px; font-weight: 600; color: var(--muted); transform-origin: left; transition: transform .25s var(--ease); }
.intake-field:focus-within label { color: var(--accent-text); transform: translateY(-1px) scale(1.05); }
.intake-field select, .intake-field input { width: 100%; min-width: 0; min-height: 28px; padding: 2px 0; border: 0; background: transparent; font-size: 16px; font-weight: 500; outline: none; color: var(--ink); }
.intake-field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 22px; background: var(--select-arrow) right center / 16px no-repeat; text-overflow: ellipsis; }
.intake-field select option { background: var(--surface); color: var(--ink); }
.intake-btn { min-height: 58px; padding: 0 22px; border-radius: 12px; }
.intake-note { display: flex; align-items: center; gap: 8px; margin: 12px 2px 0; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--muted); }
.intake-note svg { width: 15px; height: 15px; flex: none; color: var(--accent-text); }
.intake.has-error .intake-note { padding: 9px 12px; border-radius: 12px; background: var(--inverse-bg); color: var(--inverse-fg); font-weight: 600; }

.hero-side { grid-area: side; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-height: 42px; margin-top: 18px; }
.hero-side .hero-actions { margin-top: 0; gap: 10px; }
.guide-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 15px 0 9px; border-radius: 999px; border: 1.5px dashed var(--line-strong); background: transparent; color: var(--muted); font: 600 13.5px/1 var(--font-body); cursor: pointer; transition: transform .3s var(--ease); }
.guide-toggle[hidden] { display: none; }
.guide-toggle:hover { transform: translateY(-2px); color: var(--ink); border-color: var(--ink); }
.guide-toggle:active { transform: scale(.96); transition-duration: .1s; }

/* The stage: the canvas draws notes becoming an outline; two cards sit on top for depth */
.hero-stage { grid-area: stage; position: relative; align-self: stretch; min-height: 400px; margin-bottom: 86px; }
.hero-ink { position: absolute; left: -24px; top: -24px; width: calc(100% + 48px); height: calc(100% + 48px); pointer-events: none; transition: opacity .6s var(--ease); }
.hs-card { position: absolute; z-index: 2; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.45; box-shadow: var(--card-shadow); }
.hs-card p { margin: 0; }
.hs-label { margin-bottom: 5px !important; font-size: 11.5px; font-weight: 600; }
.hs-strong { font-family: var(--font-head); font-weight: 500; font-size: 15.5px; line-height: 1.3; }
.hs-question { right: -2%; top: -6px; width: min(64%, 252px); background: #17191D; color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .1); rotate: 2deg; }
.hs-question .hs-label { color: #FF9A52; }
.hs-note { left: -9%; bottom: 42px; width: min(66%, 250px); border-radius: 14px 14px 14px 4px; background: #FFFFFF; color: #3B4049; rotate: -2.2deg; }
.hs-note .hs-label { color: #B5520F; }
.hs-caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; font-size: 12px; color: var(--muted); }

.hero-trust { list-style: none; margin: clamp(20px, 2.4vw, 30px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hero-trust li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.hero-trust svg { flex: 0 0 34px; width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.hero-trust b { display: block; margin-bottom: 2px; font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--ink); }

@media (min-width: 1081px) {
  .hero-side .btn { white-space: nowrap; }
}
/* One column: the whole hero sits on the page, text first, then the form, then the drawing */
@media (max-width: 1080px) {
  .home-hero { --hang: 0px; }
  .hero-page { padding-bottom: clamp(20px, 4vw, 32px); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "form" "side" "stage"; }
  .hero-title { font-size: clamp(42px, 9.9vw, 96px); text-wrap: balance; }
  .ht-line { display: inline; }
  .hm-scrim { background: var(--paper); }
  .home-hero.is-video .hm-scrim { opacity: .88; }
  .hero-stage { min-height: 0; height: clamp(250px, 44vw, 330px); margin: 26px 0 0; }
  .hs-question { right: 0; top: 0; }
  .hs-note { left: auto; right: 3%; bottom: 34px; rotate: 1.6deg; border-radius: 14px 14px 4px 14px; }
  .hero-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .wa-float { transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s; }
  .intake-on .wa-float { opacity: 0; visibility: hidden; transform: translateY(14px); }
}
@media (max-width: 760px) {
  .hero-page { margin-inline: 6px; padding-top: calc(var(--header-h) + 16px); }
  .hero-media { border-radius: 0 0 26px 26px; }
  .hm-margin { display: none; }
  .hero-kicker { font-size: 13px; gap: 8px; }
  .hero-title { margin: 12px 0 14px; }
  .intake-stack { margin-top: 20px; }
  .intake { padding: 12px; }
  .intake-row { grid-template-columns: minmax(0, 1fr); }
  .intake-field, .intake-btn { min-height: 54px; }
  .intake-btn { width: 100%; }
  .hero-side .hero-actions { flex: 1 1 100%; }
  .hero-side .hero-actions .btn { flex: 1 1 auto; }
  /* Tall enough for the question card, six outline lines and the caption, one under the other, down to 320px */
  .hero-stage { height: 310px; margin-top: 22px; }
  .hs-card { padding: 9px 11px; border-radius: 12px; font-size: 12px; }
  .hs-strong { font-size: 13.5px; }
  .hs-question { width: min(56%, 210px); }
  .hs-note { display: none; }
  .hero-trust { gap: 14px 12px; }
  .hero-trust li { font-size: 12.5px; }
  .hero-trust svg { flex-basis: 30px; width: 30px; height: 30px; padding: 6px; }
}
@media (hover: none) {
  .intake-stack:hover::before { transform: rotate(-1.5deg) translate(-5px, 6px); }
  .intake-stack:hover::after { transform: rotate(1deg) translate(5px, 7px); }
  .guide-toggle:hover { transform: none; }
}

/* His seat on the home page (touch screens and reduced motion): the top corner of the enquiry card.
   He sits here while the card is on screen, and the tip opens beside him, over the card's own title. */
.guide-perch { position: absolute; z-index: 3; right: 22px; top: -26px; width: 60px; height: 60px; pointer-events: none; }
.guide-perch[hidden] { display: none; }
/* The bubble grows upward from just above the first field, so it only ever covers the card's own title */
.guide-perch .guide-bubble { left: auto; right: calc(100% + 10px); top: auto; bottom: -14px; max-width: min(270px, calc(100vw - 122px)); }
.guide-perch .guide-bubble > span { border-radius: 14px 14px 4px 14px; transform-origin: 100% 100%; }
.guide-perch.is-tip .guide-bubble > span { opacity: 1; transform: none; }
@media (max-width: 760px) {
  .guide-perch { right: 10px; top: -22px; width: 54px; height: 54px; }
  .guide-perch .guide-bubble { bottom: -27px; }
  .guide-perch .guide-bubble > span { padding: 9px 12px; }
  .intake-title { padding-right: 52px; }
}

/* ==========================================================
   Running flag line: straight, between the hero and the services
   ========================================================== */
.flagline { position: relative; display: flex; align-items: center; gap: 18px; margin: clamp(22px, 2.6vw, 34px) clamp(8px, 1.4vw, 20px) 0; padding: 10px 10px 10px 22px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); overflow: hidden; }
.flagline-label { flex: none; display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.fl-pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.fl-pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.flagline-viewport { position: relative; flex: 1; min-width: 0; overflow: hidden; border-radius: 999px; background: var(--bg-tint); -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.flagline-track { list-style: none; margin: 0; padding: 0; display: flex; width: max-content; align-items: center; }
.fl-item { display: inline-flex; align-items: center; gap: 10px; padding: 12px 30px 12px 0; white-space: nowrap; }
.fl-item::after { content: ""; width: 5px; height: 5px; margin-left: 20px; border-radius: 50%; background: var(--accent); opacity: .7; }
.fl-flag { flex: none; width: auto; height: 22px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(23, 25, 29, .12), 0 4px 10px -4px rgba(23, 25, 29, .35); }
.fl-name { font: 600 16px/1 var(--font-body); color: var(--ink); }
.fl-term { font: italic 500 16px/1 var(--font-head); color: var(--accent-text); }
@media (prefers-reduced-motion: no-preference) {
  .flagline-track { animation: flag-run 38s linear infinite; }
  .flagline:hover .flagline-track { animation-play-state: paused; }
  .fl-pulse::after { animation: fl-ping 2.4s var(--ease) infinite; }
}
@keyframes flag-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fl-ping { 0% { opacity: .7; transform: scale(.4); } 80%, 100% { opacity: 0; transform: scale(1.4); } }

/* ==========================================================
   Academic services: filter tabs, spotlight cards, swipe rail
   ========================================================== */
.sv-section { position: relative; overflow: clip; }
.sv-aura { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(640px 420px at 88% 8%, var(--accent-soft), transparent 70%), radial-gradient(520px 380px at 4% 92%, var(--accent-softer), transparent 70%); }
.sv-section .section-head { margin-bottom: 28px; }

.sv-tabs { position: relative; display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 0 0 26px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sv-tabs::-webkit-scrollbar { display: none; }
.sv-tab { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 14.5px/1 var(--font-body); white-space: nowrap; cursor: pointer;  }
.sv-tab:hover { color: var(--ink); }
.sv-tab[aria-pressed="true"] { color: var(--inverse-fg); }
.sv-tabs:not(.is-ready) .sv-tab[aria-pressed="true"] { background: var(--inverse-bg); }
.sv-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sv-count { min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 12px; font-weight: 700;  }
.sv-tab[aria-pressed="true"] .sv-count { background: var(--accent); color: #17191D; }
.sv-tab-ink { position: absolute; z-index: 0; left: 0; top: 5px; bottom: 5px; width: 0; border-radius: 999px; background: var(--inverse-bg); box-shadow: 0 8px 20px -8px rgba(23, 25, 29, .55); transition: transform .5s var(--spring); }

.sv-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sv-card { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 280px; padding: 24px 24px 20px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .5s var(--ease); }
.sv-card[hidden] { display: none; }
/* Spotlight border: one light that spills across neighbouring cards */
.sv-card::before { content: ""; position: absolute; inset: 0; z-index: 3; padding: 1.5px; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease);
  background: radial-gradient(300px circle at var(--x, -300px) var(--y, -300px), rgba(244, 119, 33, .95), rgba(244, 119, 33, .25) 40%, transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.sv-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .4s var(--ease); background: radial-gradient(360px circle at var(--x, 50%) var(--y, 0%), var(--accent-soft), transparent 70%); }
/* A thin orange rule that grows along the top on hover */
.sv-card::after { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--accent), #FFB27A); transform: scaleX(0); transform-origin: left; transition: transform .55s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .sv-grid:hover .sv-card::before { opacity: 1; }
  .sv-card:hover, .sv-card:focus-within { --lift: -6px; border-color: var(--accent-line); box-shadow: var(--shadow-lg); }
  .sv-card:hover .sv-glow { opacity: 1; }
  .sv-card:hover::after, .sv-card:focus-within::after { transform: scaleX(1); }
}
.sv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sv-icon { position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); transition: transform .5s var(--spring); }
.sv-icon svg { width: 25px; height: 25px; }
.sv-num { font: 500 46px/.9 var(--font-head); letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px var(--line-strong); transition: transform .5s var(--ease); }
.sv-group { margin-top: 20px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--accent-text); }
.sv-title { margin-top: 6px; font-size: 22px; line-height: 1.18; letter-spacing: -.012em; text-wrap: balance; }
.sv-title a::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; }
.sv-title a:focus-visible { outline: none; }
.sv-card:has(a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.sv-text { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.sv-go { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.sv-go i { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink); transition: transform .5s var(--spring); }
.sv-go svg { width: 17px; height: 17px; transition: transform .45s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .sv-card:hover .sv-icon { transform: rotate(-8deg) scale(1.08); background: var(--accent); color: #17191D; }
  .sv-card:hover .sv-num { -webkit-text-stroke-color: var(--accent); color: var(--accent-softer); transform: translateY(-2px); }
  .sv-card:hover .sv-go i { background: var(--accent); border-color: var(--accent); color: #17191D; transform: rotate(-45deg); }
}
.sv-card:active { --lift: 0px; transform: scale(.985); transition-duration: .12s; }
.sv-rail-meta { display: none; }
/* Smooth re-layout when a filter changes (View Transitions; the browser falls back to an instant change) */
::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }

/* ==========================================================
   Service finder on a night band
   ========================================================== */
.band-night { position: relative; overflow: hidden; isolation: isolate; background: var(--night); color: var(--on-night);
  --ink: var(--on-night); --muted: var(--on-night-muted); --line: var(--night-line); --line-strong: rgba(255, 255, 255, .28); --accent-text: var(--accent-on-night); }
.band-night::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(760px 520px at 92% -10%, rgba(244, 119, 33, .32), transparent 62%), radial-gradient(560px 420px at -6% 110%, rgba(244, 119, 33, .16), transparent 62%); }
.band-night::after { content: "§"; position: absolute; z-index: -1; left: -2%; bottom: -20%; font: italic 400 clamp(280px, 34vw, 520px)/1 var(--font-head); color: rgba(255, 255, 255, .04); pointer-events: none; }
.band-night .finder-intro h2 em { color: var(--accent-on-night); }
.band-night .text-link { color: #FFFFFF; }
.band-night .text-link svg { color: var(--accent-on-night); }
.band-night .finder-facts li { background: rgba(255, 255, 255, .04); }
/* Paper panel on the night band */
.band-night .finder-panel { position: relative; --ink: #17191D; --muted: #5A606C; --surface: #FFFFFF; --surface-2: #F4F5F7; --line: #E3E6EB; --line-strong: #C9CED6; --accent-text: #B5520F; --inverse-bg: #17191D; --inverse-fg: #FFFFFF;
  color: var(--ink); background: #FFFFFF; border: 0; border-radius: 28px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06); }
.band-night .finder-panel::before { content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--accent), #FFB27A, var(--accent)); }


/* ==========================================================
   How guidance works: a journey driven by the scroll
   ========================================================== */
.hw { position: relative; }
.hw-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.hw-step { position: relative; }
/* Connector to the next step: a dashed track and an orange fill set by the scroll (--s, 0 to 1) */
.hw-step:not(:last-child)::before, .hw-step:not(:last-child)::after { content: ""; position: absolute; left: 68px; top: 29px; width: calc(100% - 56px); height: 2px; border-radius: 2px; }
.hw-step:not(:last-child)::before { background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }
.hw-step:not(:last-child)::after { background: linear-gradient(90deg, var(--accent), #FFB27A); box-shadow: 0 0 12px rgba(244, 119, 33, .6); transform: scaleX(1); transform-origin: left; }
.hw-js .hw-step:not(:last-child)::after { transform: scaleX(var(--s, 0)); }
.hw-node { position: relative; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #17191D; box-shadow: 0 0 0 6px var(--accent-soft); transition: transform .55s var(--spring); }
.hw-num { position: relative; z-index: 1; font: 500 24px/1 var(--font-head); }
.hw-ring { position: absolute; inset: -6px; width: 72px; height: 72px; transform: rotate(-90deg); overflow: visible; }
.hw-ring circle { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 170; stroke-dashoffset: 0; stroke-linecap: round; opacity: 0; }
.hw-card { margin-top: 20px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--accent-line); box-shadow: var(--shadow-md); transition: opacity .55s var(--ease), transform .6s var(--ease); }
.hw-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hw-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); transition: transform .5s var(--spring); }
.hw-icon svg { width: 22px; height: 22px; }
.hw-tag { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.hw-step-no { margin-top: 16px; font-size: 12.5px; font-weight: 600; color: var(--accent-text); }
.hw-title { margin-top: 4px; font-size: 20px; line-height: 1.22; text-wrap: balance; }
.hw-text { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--muted); }
/* Before a step is reached (JS only): quieter, lower */
.hw-js .hw-step:not(.is-on) .hw-node { background: var(--surface); color: var(--muted); box-shadow: 0 0 0 1.5px var(--line-strong) inset; transform: scale(.9); }
.hw-js .hw-step:not(.is-on) .hw-card { opacity: .45; transform: translateY(16px); border-color: var(--line); box-shadow: var(--shadow-sm); }
.hw-js .hw-step:not(.is-on) .hw-icon { background: var(--surface-2); color: var(--muted); }
.hw-js .hw-step.is-on .hw-icon { animation: hw-pop .6s var(--spring) both; }
.hw-js .hw-step.is-current .hw-node { transform: scale(1.06); }
.hw-js .hw-step.is-current .hw-ring circle { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hw-js .hw-step.is-current .hw-ring circle { animation: hw-ring 1.6s var(--ease) both, hw-breathe 2.4s ease-in-out 1.6s infinite; }
}
@keyframes hw-ring { from { stroke-dashoffset: 170; } to { stroke-dashoffset: 0; } }
@keyframes hw-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes hw-pop { 0% { transform: scale(.6) rotate(-12deg); } 100% { transform: none; } }

/* ==========================================================
   Trust and privacy
   ========================================================== */
.charter::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 85%) var(--my, 0%), rgba(244, 119, 33, .09), transparent 65%); }
.charter > * { position: relative; z-index: 1; }
.promise-chips { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; max-width: 440px; }
.promise-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; background: var(--accent-softer); border: 1px solid var(--accent-line); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.promise-chips svg { width: 20px; height: 20px; padding: 4px; border-radius: 50%; background: var(--accent); color: #17191D; }
.charter-list { counter-reset: charter; gap: 6px; }
.charter-item { counter-increment: charter; position: relative; padding: 20px 20px 20px 18px; border: 1px solid transparent; border-bottom-color: var(--line); border-radius: 0; transition: border-radius .35s, transform .45s var(--ease); }
.charter-item:first-child { padding-top: 20px; }
.charter-item::before { content: counter(charter, decimal-leading-zero); position: absolute; right: 18px; top: 18px; font: 500 15px/1 var(--font-head); color: var(--muted); opacity: .7; transition: opacity .3s; }
.charter-item::after { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--accent); transform: scaleY(0); transition: transform .45s var(--ease); }
.charter-item h3 { padding-right: 36px;  }
.charter-item .trust-icon { transition: transform .5s var(--spring); }
@media (hover: hover) and (pointer: fine) {
  .charter-item:hover { background: var(--surface); border-color: var(--accent-line); border-radius: 18px; box-shadow: var(--shadow-md); transform: translateX(6px); }
  .charter-item:hover::after { transform: scaleY(1); }
  .charter-item:hover::before { color: var(--accent-text); opacity: 1; }
  .charter-item:hover .trust-icon { background: var(--accent); color: #17191D; transform: rotate(-8deg) scale(1.06); }
  .charter-item:hover h3 { color: var(--accent-text); }
}
.charter-item .trust-link { }
.charter-item .trust-link:hover { color: var(--accent-text); }
/* Signature: AcademicDude with an orange "Dude" and a hand-drawn stroke */
.charter-sign .cs-name { position: relative; display: inline-block; font: italic 500 clamp(30px, 2.8vw, 38px)/1.1 var(--font-head); color: var(--ink); letter-spacing: -.01em; padding-bottom: 6px; }
.cs-name b { font-weight: 600; color: var(--accent); }
.cs-stroke { position: absolute; left: 0; bottom: -4px; width: 100%; height: 12px; color: var(--accent); overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .charter .cs-stroke path { stroke-dasharray: 240; stroke-dashoffset: 240;  }
  .charter.in .cs-stroke path, .charter:hover .cs-stroke path { stroke-dashoffset: 0; }
  @supports (animation-timeline: view()) {
    .charter .cs-stroke path { transition: none; animation: cs-draw linear both; animation-timeline: view(); animation-range: entry 40% cover 55%; }
  }
}
@keyframes cs-draw { from { stroke-dashoffset: 240; } to { stroke-dashoffset: 0; } }

/* ==========================================================
   Free tools: quick planner + tool list
   ========================================================== */
.tools-lab-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 18px; }
.tools-lab-head .h-small { margin-bottom: 18px; }
.tl-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.tl-badge span { width: 8px; height: 8px; border-radius: 50%; background: #2FA864; box-shadow: 0 0 0 3px rgba(47, 168, 100, .2); }
.tools-lab { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 18px; align-items: stretch; margin-bottom: 40px; }

/* Quick planner: a night card */
.qp { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; padding: clamp(20px, 2.4vw, 30px); border-radius: 28px; background: var(--night); color: var(--on-night);
  --ink: var(--on-night); --muted: var(--on-night-muted); --line: var(--night-line); --accent-text: var(--accent-on-night); box-shadow: var(--shadow-lg); }
.qp::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(520px 340px at 100% 0%, rgba(244, 119, 33, .3), transparent 65%), repeating-linear-gradient(180deg, transparent 0 35px, rgba(255, 255, 255, .035) 35px 36px); }
.qp-head { display: flex; align-items: center; gap: 14px; }
.qp-icon { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--accent); color: #17191D; box-shadow: var(--shadow-accent); }
.qp-icon svg { width: 26px; height: 26px; }
.qp-kicker { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.qp-title { font-size: clamp(22px, 2vw, 27px); line-height: 1.15; margin-top: 2px; }
.qp-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 22px; }
.qp-field { display: grid; gap: 4px; min-width: 0; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1.5px solid rgba(255, 255, 255, .1);  }
.qp-field:hover { border-color: rgba(255, 255, 255, .22); }
.qp-field:focus-within { border-color: var(--accent); background: rgba(244, 119, 33, .08); }
.qp-field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.qp-field select, .qp-field input { width: 100%; min-width: 0; min-height: 30px; padding: 0; border: 0; background: transparent; color: #FFFFFF; font: 500 16px/1.3 var(--font-body); outline: none; color-scheme: dark; }
.qp-field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF9A52' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right center / 16px no-repeat; }
.qp-field select option { background: #22262E; color: #FFFFFF; }
.qp-field input[type="date"] { -webkit-appearance: none; appearance: none; text-align: left; }
.qp-field input::-webkit-date-and-time-value { text-align: left; }
.qp-out { margin-top: 18px; min-height: 120px; }
.qp-empty, .qp-warn { padding: 16px; border-radius: 16px; border: 1px dashed rgba(255, 255, 255, .2); font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.qp-warn { margin-top: 10px; border-style: solid; border-color: rgba(244, 119, 33, .5); background: rgba(244, 119, 33, .08); color: #FFFFFF; }
.qp-example { display: inline-flex; margin-bottom: 10px; padding: 4px 12px; border-radius: 999px; background: rgba(244, 119, 33, .14); color: var(--accent-on-night); font-size: 12.5px; font-weight: 600; }
.qp-count { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.qp-days { font: 500 18px/1 var(--font-head); color: var(--muted); }
.qp-days b { font: 500 clamp(52px, 5vw, 68px)/.9 var(--font-head); letter-spacing: -.04em; color: var(--accent-on-night); }
.qp-weeks { font-size: 14px; font-weight: 600; color: var(--muted); }
.qp-bar { display: flex; gap: 3px; height: 12px; margin-top: 16px; }
.qp-bar i { min-width: 6px; border-radius: 4px; background: hsl(24 90% calc(54% + var(--k) * 5%)); transform-origin: left; }
.qp-bar i:last-child { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .35) 0 3px, rgba(255, 255, 255, .12) 3px 6px); }
.qp-stages { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 2px; }
.qp-stages li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 14px; }
.qp-dot { width: 10px; height: 10px; border-radius: 3px; background: hsl(24 90% calc(54% + var(--k) * 5%)); }
.qp-stages li:last-child .qp-dot { background: rgba(255, 255, 255, .35); }
.qp-name { font-weight: 600; color: #FFFFFF; min-width: 0; }
.qp-when { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .qp-bar i { animation: qp-grow .6s var(--ease) both; animation-delay: calc(var(--k) * 60ms); }
  .qp-stages li { animation: fade-up .45s var(--ease) both; animation-delay: calc(120ms + var(--k) * 45ms); }
  .qp-count { animation: fade-up .4s var(--ease) both; }
}
@keyframes qp-grow { from { transform: scaleX(0); } to { transform: none; } }
.qp-foot { margin-top: auto; padding-top: 16px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.qp-foot a { color: #FFFFFF; font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* Tool list */
.tl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.tl-item { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 38px; gap: 14px; align-items: center; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .4s var(--ease); }
.tl-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); transition: transform .5s var(--spring); }
.tl-icon svg { width: 23px; height: 23px; }
.tl-title { font: 500 18px/1.2 var(--font-head); }
.tl-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tl-title a:focus-visible { outline: none; }
.tl-item:has(a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.tl-body p { margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-go { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); transition: transform .45s var(--spring); }
.tl-go svg { width: 17px; height: 17px; }
@media (hover: hover) and (pointer: fine) {
  .tl-item:hover { transform: translateX(6px); border-color: var(--accent-line); box-shadow: var(--shadow-md); }
  .tl-item:hover .tl-icon { background: var(--accent); color: #17191D; transform: rotate(-8deg); }
  .tl-item:hover .tl-go { background: var(--accent); border-color: var(--accent); color: #17191D; transform: rotate(-45deg); }
}
.tl-item:active { transform: scale(.985); }
.tl-all a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 20px; border: 1.5px dashed var(--line-strong); font-size: 14.5px; font-weight: 600;  }
.tl-all a:hover { border-color: var(--accent); color: var(--accent-text); }
.tl-all svg { width: 16px; height: 16px; }

/* ==========================================================
   Tablet
   ========================================================== */
@media (max-width: 1180px) {
  .sv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools-lab { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1080px) {
  .hw-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
  .hw-step:nth-child(2)::before, .hw-step:nth-child(2)::after { display: none; }
}

/* ==========================================================
   Phones (iPhone first)
   ========================================================== */
@media (max-width: 760px) {
  .flagline { flex-direction: column; align-items: stretch; gap: 8px; margin-inline: 6px; padding: 12px 8px 8px; border-radius: 24px; }
  .flagline-label { justify-content: center; font-size: 12.5px; }
  .fl-item { padding: 11px 22px 11px 0; gap: 8px; }
  .fl-item::after { margin-left: 14px; }
  .fl-flag { height: 19px; }
  .fl-name, .fl-term { font-size: 15px; }

  /* Filters scroll sideways; cards become a swipe rail with snap, progress and a counter */
  .sv-tabs { width: auto; margin-inline: calc(var(--gutter) * -1); padding: 5px; border-radius: 0; border-inline: 0; scroll-padding-inline: var(--gutter); background: var(--surface); }
  .sv-tab { min-height: 42px; padding: 0 14px; font-size: 14px; }
  .sv-grid { display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter) 10px; scroll-padding-inline: var(--gutter); }
  .sv-grid::-webkit-scrollbar { display: none; }
  .sv-card { flex: 0 0 min(84%, 340px); min-height: 300px; scroll-snap-align: start; padding: 22px 20px 18px; transform: none; }
  .sv-card::after { transform: scaleX(1); }
  .sv-num { font-size: 40px; }
  .sv-title { font-size: 21px; }
  .sv-rail-meta { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
  .sv-progress { position: relative; flex: 1; height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
  .sv-progress i { position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform: scaleX(.08); transform-origin: left; transition: transform .2s linear; }
  .sv-counter { font-variant-numeric: tabular-nums; }
  .sv-counter b { color: var(--ink); }
  .sv-swipe { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); }
  .sv-swipe svg { width: 14px; height: 14px; }
  @media (prefers-reduced-motion: no-preference) { .sv-swipe svg { animation: nudge 1.6s var(--ease) infinite; } }

  .finder-facts li { font-size: 12.5px; padding: 6px 12px; }
  .band-night .finder-panel { border-radius: 24px; }
  .band-night .finder-panel::before { left: 20px; right: 20px; }

  /* Steps: a vertical timeline; each connector fills as you scroll to the next step */
  .hw-steps { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .hw-step { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; }
  .hw-step:nth-child(2)::before, .hw-step:nth-child(2)::after { display: block; }
  .hw-step:not(:last-child)::before, .hw-step:not(:last-child)::after { left: 25px; top: 60px; bottom: -14px; width: 2px; height: auto; }
  .hw-step:not(:last-child)::before { background: repeating-linear-gradient(180deg, var(--line-strong) 0 6px, transparent 6px 12px); }
  .hw-step:not(:last-child)::after { background: linear-gradient(180deg, var(--accent), #FFB27A); transform-origin: top; }
  .hw-js .hw-step:not(:last-child)::after { transform: scaleY(var(--s, 0)); }
  .hw-node { width: 52px; height: 52px; }
  .hw-ring { inset: -6px; width: 64px; height: 64px; }
  .hw-num { font-size: 21px; }
  .hw-card { margin-top: 0; padding: 18px; border-radius: 18px; }
  .hw-js .hw-step:not(.is-on) .hw-card { transform: translateX(10px); }
  .hw-title { font-size: 19px; }

  .promise-chips li { font-size: 12.5px; }
  .charter { padding: 26px 18px 22px; }
  .charter-item { grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; align-items: center; padding: 18px 6px; }
  .charter-item .trust-icon { grid-row: auto; width: 44px; height: 44px; }
  .charter-item p, .charter-item .trust-link { grid-column: 1 / -1; }
  .charter-item p { margin-top: 6px; }
  .charter-item::before { right: 4px; top: 16px; }
  .charter-item h3 { padding-right: 28px; font-size: 21px; }

  .qp { border-radius: 24px; }
  .qp-form { grid-template-columns: minmax(0, 1fr); }
  .qp-field { min-height: 62px; }
  .qp-stages li { grid-template-columns: 10px minmax(0, 1fr); row-gap: 2px; }
  .qp-when { grid-column: 2; }
  .tl-item { grid-template-columns: 44px minmax(0, 1fr) 34px; padding: 14px; gap: 12px; }
  .tl-icon { width: 44px; height: 44px; }
  .tl-go { width: 34px; height: 34px; }
}
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

/* Touch: no hover tilt or sticky lifts */
@media (hover: none) {
  .sv-card { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sv-card, .sv-tab-ink, .hw-card, .hw-node, .charter-item, .tl-item { transition: none !important; }
  ::view-transition-group(*) { animation: none; }
}

/* ==========================================================
   Questions: the open question turns into a night card and the
   answer arrives as a reply, line by line
   ========================================================== */
.qa-intro { margin-top: 10px; font-size: 15.5px; color: var(--muted); max-width: 360px; }
.qa-help { position: relative; overflow: hidden; margin-top: 26px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.qa-help::before { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none; }
.qa-help-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.qa-help-kicker span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.qa-help-title { margin-top: 6px; font: 500 22px/1.2 var(--font-head); }
.qa-help-text { margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.qa-help-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.qa-help-actions .btn { min-height: 46px; padding: 0 18px; font-size: 14.5px; }

.qa-list { display: grid; gap: 10px; counter-reset: qa; }
.qa { position: relative; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .45s var(--ease); }
.qa-q { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 18px 18px 20px; cursor: pointer; border-radius: 22px; -webkit-tap-highlight-color: transparent; }
.qa-q::-webkit-details-marker { display: none; }
.qa-q:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.qa-n { font: 500 15px/1 var(--font-head); color: var(--muted); font-variant-numeric: tabular-nums;  }
.qa-title { font: 600 17px/1.4 var(--font-body); letter-spacing: 0;  }
.qa-toggle { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); transition: transform .5s var(--spring); }
.qa-toggle i { position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; border-radius: 2px; background: var(--accent-text); transition: transform .45s var(--spring); }
.qa-toggle i + i { transform: rotate(90deg); }
@media (hover: hover) and (pointer: fine) {
  .qa:not([open]):hover { border-color: var(--accent-line); transform: translateX(4px); box-shadow: var(--shadow-md); }
  .qa:not([open]):hover .qa-title, .qa:not([open]):hover .qa-n { color: var(--accent-text); }
  .qa:not([open]):hover .qa-toggle { background: var(--accent-soft); transform: rotate(90deg); }
}
/* Open: a night card, the plus turns into a minus on an orange disc */
.qa[open]:not(.is-closing) { background: var(--night); border-color: var(--night); box-shadow: 0 30px 60px -28px rgba(23, 25, 29, .7);
  --ink: var(--on-night); --muted: var(--on-night-muted); color: var(--on-night); }
.qa[open]:not(.is-closing) .qa-n { color: var(--accent-on-night); }
.qa[open]:not(.is-closing) .qa-toggle { background: var(--accent); transform: rotate(180deg); }
.qa[open]:not(.is-closing) .qa-toggle i { background: #17191D; }
.qa[open]:not(.is-closing) .qa-toggle i + i { transform: rotate(0deg); }
.qa-a { overflow: hidden; }
.qa-reply { position: relative; margin: 0 14px 14px; padding: 18px 20px 16px 22px; border-radius: 6px 18px 18px 18px; background: #FFFFFF; color: #17191D; --ink: #17191D; --muted: #4A505B; }
.qa-reply::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent); }
.qa-from { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #17191D; }
.qa-from-note { font-weight: 500; color: #5A606C; }
.qa-avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #FFFFFF; border: 2px solid var(--accent); box-shadow: 0 4px 12px -4px rgba(244, 119, 33, .55); overflow: hidden; }
.qa-avatar img { width: 24px; height: 24px; object-fit: contain; }
.qa-body { margin-top: 10px; font-size: 16px; line-height: 1.7; color: #3A3F48; }
.qa-body p + p { margin-top: .7em; }
.qa-body a { font-weight: 600; color: #17191D; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.qa-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #D5D9E0; }
.qa-copy { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #D5D9E0; background: #F4F5F7; color: #17191D; font: 600 13px/1 var(--font-body); cursor: pointer;  }
.qa-copy svg { width: 15px; height: 15px; }
.qa-copy:hover { border-color: var(--accent); color: #B5520F; }
.qa-copy.is-done { background: var(--accent); border-color: var(--accent); color: #17191D; }
.qa-follow { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: #17191D; border-bottom: 1.5px solid var(--accent); }
.qa-follow svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.qa-follow:hover svg { transform: translateX(3px); }
/* The reply arrives: the bubble pops in, then each paragraph clears from a soft blur */
@media (prefers-reduced-motion: no-preference) {
  .qa[open]:not(.is-closing) .qa-reply { animation: qa-pop .5s var(--spring) both; transform-origin: 0 0; }
  .qa[open]:not(.is-closing) .qa-from { animation: qa-line .45s var(--ease) .12s both; }
  .qa[open]:not(.is-closing) .qa-body > * { animation: qa-line .55s var(--ease) both; }
  .qa[open]:not(.is-closing) .qa-body > :nth-child(1) { animation-delay: .2s; }
  .qa[open]:not(.is-closing) .qa-body > :nth-child(2) { animation-delay: .32s; }
  .qa[open]:not(.is-closing) .qa-body > :nth-child(3) { animation-delay: .44s; }
  .qa[open]:not(.is-closing) .qa-body > :nth-child(n+4) { animation-delay: .54s; }
  .qa[open]:not(.is-closing) .qa-actions { animation: qa-line .45s var(--ease) .5s both; }
}
@keyframes qa-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes qa-line { from { opacity: 0; transform: translateY(8px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@media (max-width: 760px) {
  .qa-q { gap: 12px; padding: 16px 14px 16px 16px; }
  .qa-title { font-size: 16px; }
  .qa-toggle { width: 34px; height: 34px; }
  .qa-reply { margin: 0 8px 8px; padding: 16px 16px 14px 18px; }
  .qa-body { font-size: 15.5px; }
  .qa-help { margin-top: 18px; }
}

/* ==========================================================
   Student reviews (hidden in home.html until real reviews are supplied)
   ========================================================== */
.review-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.review { height: 100%; margin: 0; padding: 24px; display: flex; flex-direction: column; gap: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.review blockquote { margin: 0; padding-left: 16px; border-left: 3px solid var(--accent); font: 500 19px/1.45 var(--font-head); }
.review blockquote p { margin: 0; }
.review figcaption { margin-top: auto; display: grid; gap: 2px; font-size: 14px; color: var(--muted); }
.review figcaption strong { font-size: 15px; font-weight: 600; color: var(--ink); }
.review-for { margin-top: 6px; font-size: 13px; color: var(--accent-text); font-weight: 600; }
@media (max-width: 900px) { .review-grid { grid-template-columns: minmax(0, 1fr); } }
