:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --ink: #111111;
  --muted: rgba(17, 17, 17, 0.55);
  --faint: rgba(17, 17, 17, 0.38);
  --accent: #2f6bff;
  --accent-deep: #1d4fd1;
  --accent-soft: rgba(47, 107, 255, 0.08);
  --hero-tint-a: #e9f1fb;
  --hero-tint-b: #f7fafe;
  --line: rgba(17, 17, 17, 0.08);
  --line-strong: rgba(17, 17, 17, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 1px 2px rgba(17, 17, 17, 0.04), 0 8px 24px rgba(17, 17, 17, 0.05);
  --shadow-lift: 0 2px 6px rgba(17, 17, 17, 0.05), 0 18px 44px rgba(17, 17, 17, 0.09);
  --shadow-video: 0 1px 2px rgba(17, 17, 17, 0.06), 0 30px 80px rgba(17, 17, 17, 0.16);
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-pm: cubic-bezier(0.2, 0.9, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-weight: 600;
  letter-spacing: -0.03em;
}

h1 {
  margin-bottom: 1.2rem;
  font-size: clamp(2.8rem, 5.6vw, 4.6rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 1rem;
  max-width: 720px;
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  line-height: 1.1;
}

h3 {
  margin: 0.15rem 0 0.5rem;
  font-size: 1.13rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.wrap {
  width: min(var(--max), calc(100vw - 48px));
  margin: 0 auto;
}

.skip {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 99;
  transform: translateY(-180%);
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1rem;
  font-weight: 500;
  transition: transform 0.2s var(--ease);
}

.skip:focus {
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ---------- Navbar ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(var(--max), calc(100vw - 48px));
  min-height: 68px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #5d8bff, var(--accent));
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.3);
}

nav {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

nav a:not(.nav-cta) {
  transition: color 0.2s var(--ease);
}

nav a:not(.nav-cta):hover {
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 0 1.2rem;
  font-weight: 550;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-cta:hover {
  background: #333;
  transform: translateY(-1px);
}

/* ---------- In-topbar search (instrument/city lesson pages) ---------- */

.topbar--search .topbar-inner {
  gap: 1.25rem;
  min-height: 72px;
}

.topbar--search nav {
  flex: none;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.headsearch {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 384px;
  height: 46px;
  margin: 0 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.headsearch .combo {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

.headsearch .combo-input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0 0.95rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  border-radius: 12px 0 0 12px;
}

.headsearch .combo-input:focus,
.headsearch .combo-input:focus-visible {
  outline: none;
}

.headsearch .combo-list {
  top: calc(100% + 10px);
}

.headsearch-divider {
  flex: none;
  width: 1px;
  height: 26px;
  background: var(--line-strong);
}

.headsearch-loc {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  padding: 0 0.35rem 0 0.9rem;
  color: var(--muted);
}

.headsearch-loc select {
  max-width: 150px;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding-right: 0.3rem;
}

.headsearch-loc select:focus,
.headsearch-loc select:focus-visible {
  outline: none;
}

.headsearch-btn {
  flex: none;
  width: 50px;
  height: 100%;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0 11px 11px 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.headsearch-btn:hover {
  background: var(--accent-deep);
}

@media (max-width: 760px) {
  /* Two-row topbar: brand + CTA on top, search on its own full-width row */
  .topbar--search .topbar-inner {
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    min-height: 0;
    padding: 0.7rem 0 0.8rem;
  }

  .topbar--search .brand b {
    display: none;
  }

  .topbar--search nav {
    margin-left: auto;
  }

  .headsearch {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    height: 46px;
    margin: 0;
  }

  .headsearch-loc {
    padding-left: 0.6rem;
  }

  .headsearch-loc select {
    max-width: 130px;
  }

  /* the taller two-row topbar needs more clearance on pages that use it */
  header.topbar--search ~ main > .section:first-child,
  header.topbar--search ~ main > article > .section:first-child {
    padding-top: 10.5rem;
  }
}

/* ---------- Hero ---------- */

/* Light-blue inset panel, Pixelia-style */
.hero {
  position: relative;
  margin: 84px 14px 0;
  padding: 56px 0 52px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 28px;
  background:
    radial-gradient(1100px 600px at 50% -12%, rgba(47, 107, 255, 0.1), transparent 65%),
    linear-gradient(180deg, var(--hero-tint-a), var(--hero-tint-b) 70%, #fff);
}


#note-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  justify-items: center;
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 860px;
  text-align: center;
}

.hero-copy h1 {
  max-width: 820px;
}

.accent {
  color: inherit;
}

/* ---------- Hero trust bar ---------- */

.hero-trust {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  padding: 0.3rem 1rem 0.3rem 0.3rem;
  border: 1px solid rgba(17, 17, 17, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(17, 17, 17, 0.06);
}

.trust-avatars {
  display: flex;
  align-items: center;
}

.trust-av {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(17, 17, 17, 0.15);
}

.trust-av + .trust-av {
  margin-left: -11px;
}

.trust-av img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trust-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
  white-space: nowrap;
}

.trust-needle {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
}

.trust-needle svg {
  display: block;
  width: 28px;
  height: 28px;
}

/* Note chip beside the eyebrow */
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

.note-chip {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(145deg, #5d8bff, var(--accent));
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.3);
}

.note-chip svg {
  width: 15px;
  height: 15px;
}

/* Typing word in the headline */
.type-word {
  display: inline-block;
  white-space: nowrap;
  text-align: left;
  vertical-align: bottom;
  transition: width 0.3s var(--ease);
}

.type-measure {
  position: absolute;
  visibility: hidden;
  white-space: nowrap;
  pointer-events: none;
}

/* Mirror the caret so the measured width includes it */
.type-measure::after {
  content: "";
  display: inline-block;
  width: 3px;
  margin-left: 0.06em;
}

.type-word::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.74em;
  margin-left: 0.06em;
  background: var(--accent);
  vertical-align: -0.04em;
  animation: caret-blink 1.1s steps(1) infinite;
}

@keyframes caret-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.lede {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.13rem;
  line-height: 1.65;
}

/* Entrance animation */

.rise {
  animation: rise 0.8s var(--ease) both;
  animation-delay: calc(var(--d, 0) * 110ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ---------- Hero video (aperture reveal) ---------- */

.hero-video {
  width: min(800px, 100%);
  margin-top: 2.4rem;
}

.video-stage {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.intro-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow-video);
  will-change: clip-path, opacity;
  animation: intro-aperture 1.7s var(--ease-pm) 500ms both;
}

.intro-media video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
  animation: intro-settle 2.6s var(--ease-pm) 500ms both;
}

/* Opens from a narrow centered slot, widens, then snaps full-frame */
@keyframes intro-aperture {
  0% {
    opacity: 0;
    clip-path: inset(44% 47% 44% 47% round 24px);
  }
  18% {
    opacity: 1;
  }
  55% {
    clip-path: inset(14% 26% 14% 26% round 22px);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 16px);
  }
}

/* Slow cinematic zoom-out inside the frame */
@keyframes intro-settle {
  0% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

/* ---------- Scroll cue (fixed, hides after scrolling) ---------- */

.scroll-cue {
  position: fixed;
  bottom: 22px;
  left: 0;
  right: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  margin: 0 auto;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  border: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(17, 17, 17, 0.06);
  color: rgba(17, 17, 17, 0.45);
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
}

.scroll-cue:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
}

.scroll-cue.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  pointer-events: none;
}

.scroll-cue-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  overflow: hidden;
}

.scroll-cue-icon svg {
  width: 15px;
  height: 15px;
}

.scroll-cue-icon svg {
  animation: note-drop 2.4s var(--ease) infinite;
}

@keyframes note-drop {
  0% {
    transform: translateY(-160%) rotate(-12deg);
    opacity: 0;
  }
  14% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  80% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  94% {
    transform: translateY(160%) rotate(10deg);
    opacity: 0;
  }
  100% {
    transform: translateY(160%);
    opacity: 0;
  }
}

/* ---------- Search form ---------- */

.search {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 0.7rem;
  align-items: end;
  width: min(680px, 100%);
  margin-top: 2rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-lift);
  text-align: left;
}

.search label,
.search .search-field {
  display: grid;
  gap: 0.35rem;
}

.search span,
.search .field-label {
  padding-left: 0.2rem;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search select,
.search .combo-input,
.search button {
  min-height: 52px;
  border-radius: 12px;
}

.search select,
.search .combo-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  padding: 0 0.9rem;
  font: inherit;
  font-weight: 500;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search select {
  cursor: pointer;
}

.search select:hover,
.search .combo-input:hover {
  border-color: rgba(17, 17, 17, 0.3);
}

.search select:focus-visible,
.search .combo-input:focus,
.search .combo-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.15);
}

/* Instrument autocomplete dropdown */
.combo {
  position: relative;
}

.combo-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  max-height: 264px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(17, 17, 17, 0.14);
}

.combo-list li {
  padding: 0.62rem 0.75rem;
  border-radius: 9px;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
}

.combo-list li:hover,
.combo-list li.is-active {
  background: rgba(47, 107, 255, 0.08);
  color: var(--accent-deep, var(--ink));
}

.combo-list li[hidden] {
  display: none;
}

.search button {
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 0 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search button:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.2);
}

/* ---------- Top-of-page search bar (instrument/city lesson pages) ---------- */

.pagesearch {
  padding-top: 5.6rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.pagesearch-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.pagesearch-label {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.pagesearch-label small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.pagesearch .search {
  margin-top: 0;
  width: min(620px, 100%);
  box-shadow: var(--shadow-soft);
}

.pagesearch + .hero {
  margin-top: 1.5rem;
}

@media (max-width: 760px) {
  .pagesearch-inner {
    gap: 1rem;
  }

  .pagesearch .search {
    width: 100%;
  }
}

/* ---------- Chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.chips a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 1rem;
  font-size: 0.87rem;
  font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.chips a:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- Sections ---------- */

.section {
  padding: 4.8rem 0;
}

.band {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Answer / intro ---------- */

.answer {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
}

.answer-head {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.answer-copy {
  flex: 1 1 auto;
  max-width: 640px;
}

.answer-head p {
  color: var(--muted);
  font-size: 1.06rem;
}

.proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.proof-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.proof-item h3 {
  font-size: 1.02rem;
}

.proof-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.proof-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ---------- Cards (popular + instruments) ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.cards article {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.cards article > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
}

.cards article:not(:has(> a)) {
  padding: 1.5rem;
}

.cards article:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.cards p {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.cards small {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 0.3rem 0.68rem;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.cards article:hover .card-arrow {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  transform: translateX(3px);
}

.inst-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

/* ---------- View more instruments ---------- */

.instrument-cards .inst-extra {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  transition-delay: calc(var(--d, 0) * 55ms);
}

.instrument-cards .inst-extra.is-in {
  opacity: 1;
  transform: none;
}

.instrument-cards .inst-extra.is-settled {
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
  transition-delay: 0s;
}

.cards-more {
  display: flex;
  justify-content: center;
  margin-top: 1.6rem;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.cards-more.is-done {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.view-more {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.78rem 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.view-more:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.view-more-spinner {
  width: 0;
  height: 16px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: width 0.25s var(--ease), opacity 0.25s var(--ease);
}

.view-more.is-loading {
  pointer-events: none;
  border-color: var(--line);
  color: var(--muted);
}

.view-more.is-loading .view-more-spinner {
  width: 16px;
  opacity: 1;
  animation: view-more-spin 0.7s linear infinite;
}

@keyframes view-more-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Steps ---------- */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.steps::before {
  content: "";
  position: absolute;
  top: 52px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 18%, var(--line-strong) 82%, transparent);
}

.steps article {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 1.7rem 1.5rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.steps b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Step map preview ---------- */

.step-map-card {
  margin-top: 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.step-map-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.77rem;
  font-weight: 500;
  color: var(--ink);
}

.step-map-search svg {
  color: var(--muted);
  flex: none;
}

.step-map-zip {
  margin-left: auto;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.68rem;
  font-weight: 600;
}

.step-map-view {
  position: relative;
  flex: 1;
  min-height: 110px;
  overflow: hidden;
}

#step-map {
  position: absolute;
  inset: 0;
}

.mapboxgl-ctrl-logo { display: none !important; }

.step-map-pin-mb {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.25rem 0.5rem;
  background: #fff;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(17,17,17,0.22);
  white-space: nowrap;
  position: relative;
}

.step-map-pin-mb::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
}

/* ---------- Step profile preview ---------- */

/* ---------- Step instrument card ---------- */

.step-instr-card {
  margin-top: 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-soft);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.step-instr-feature {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.step-instr-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.step-instr-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-instr-name {
  font-size: 0.92rem;
  font-weight: 650;
  color: #fff;
}

.step-instr-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.step-instr-alts {
  padding: 0.35rem 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.step-instr-alt {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.step-instr-alt--more {
  border-color: transparent;
  color: var(--faint);
}

/* ---------- Step profile stack ---------- */

.step-profile-stack {
  flex: 1;
  margin-top: 0.9rem;
}

.step-profile-card {
  height: 100%;
  padding: 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  box-shadow: var(--shadow-soft);
  box-sizing: border-box;
}

.step-profile-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.step-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1.5px solid var(--line);
}

.step-profile-info {
  flex: 1;
  min-width: 0;
}

.step-profile-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--ink);
}

.step-profile-info span {
  font-size: 0.73rem;
  color: var(--muted);
}

.step-profile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.step-profile-price {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--ink);
}

.step-profile-price small {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
}

.step-profile-stars {
  font-size: 0.73rem;
  color: var(--muted);
}

.step-profile-stars span:first-child {
  color: #f59e0b;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.step-profile-reviews {
  color: var(--faint);
}

.step-profile-bio {
  margin: 0;
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Areas ---------- */

.areas {
  position: relative;
  overflow: hidden;
}

.areas-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  pointer-events: none;
}

.areas-pattern svg {
  width: 100%;
  height: 100%;
}

.areas-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 3.5rem;
  align-items: start;
}

.areas-copy {
  position: sticky;
  top: 110px;
}

.areas-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.02rem;
}

.cities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.cities a {
  display: block;
}

.cities span {
  display: grid;
  gap: 0.15rem;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 1.1rem 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.cities a:hover span {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.cities small {
  color: var(--faint);
  font-size: 0.81rem;
  font-weight: 400;
}

/* ---------- Teacher preview ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}

.split-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.02rem;
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 1.7rem;
  box-shadow: var(--shadow-lift);
}

.profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink);
}

.avatar-lg {
  width: 56px;
  height: 56px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.77rem;
  font-weight: 600;
}

.badge-teal {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.badge-gold {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge-plain {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.profile p {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.profile span {
  color: var(--faint);
  font-size: 0.85rem;
  font-weight: 500;
}

.profile b {
  font-weight: 550;
  font-size: 0.94rem;
}

/* ---------- Browse teachers + filter panel ---------- */

.browse {
  padding-top: 6.5rem;
}

.browse > .wrap:first-child {
  margin-bottom: 1.6rem;
}

.browse h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  line-height: 1.08;
}

.browse-grid {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.filter-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.filter-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.filter-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
}

.filter-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.filter-body {
  flex: 1;
  padding: 0 1.25rem;
}

.filter-group {
  margin: 0;
  padding: 1.15rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.filter-group:last-child {
  border-bottom: 0;
}

.filter-group legend {
  padding: 0;
  margin-bottom: 0.7rem;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.32rem 0;
  cursor: pointer;
}

.opt input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0.18rem 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.opt span {
  color: rgba(17, 17, 17, 0.72);
  font-size: 0.9rem;
  line-height: 1.4;
}

.opt:hover span {
  color: var(--ink);
}

.opt-more {
  margin-top: 0.35rem;
  padding: 0.2rem 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.opt-more:hover {
  color: var(--accent-deep);
}

.filter-foot {
  flex: none;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.filter-reset {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.filter-reset:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* results */

.browse-results {
  display: grid;
  gap: 1rem;
}

.teacher-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.teacher-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.teacher-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.teacher-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.teacher-top h3 {
  margin: 0;
  font-size: 1.08rem;
}

.teacher-meta {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.teacher-bio {
  margin: 0;
  color: rgba(17, 17, 17, 0.72);
  font-size: 0.92rem;
  line-height: 1.5;
}

.teacher-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.35rem;
  text-align: right;
  white-space: nowrap;
}

.teacher-rate {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.teacher-rate small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.teacher-stars {
  color: #f5a623;
  font-size: 0.82rem;
}

.teacher-stars b {
  color: var(--ink);
  font-weight: 650;
}

@media (max-width: 880px) {
  .browse-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    max-height: none;
  }

  .filter-body {
    overflow: visible;
  }

  /* Collapsed by default on mobile so teachers appear right away;
     the header row becomes a tap target (handler in search.js). */
  .filter-head {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .filter-head::after {
    content: "";
    flex: none;
    width: 9px;
    height: 9px;
    margin-left: 0.25rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s var(--ease);
  }

  .filter-panel.is-open .filter-head::after {
    transform: rotate(-135deg) translateY(-2px);
  }

  .filter-panel:not(.is-open) .filter-body,
  .filter-panel:not(.is-open) .filter-foot {
    display: none;
  }

  .filter-panel:not(.is-open) .filter-head {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .teacher-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .teacher-side {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.9rem;
    text-align: left;
    margin-top: 0.2rem;
  }
}

/* ---------- Teacher profile page ---------- */

.tp {
  padding-top: 6.5rem;
  padding-bottom: 4.8rem;
}

.tp-breadcrumb {
  margin-bottom: 1.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.tp-breadcrumb a:hover {
  color: var(--ink);
}

.tp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 332px;
  gap: 2.5rem;
  align-items: start;
}

.tp-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1.6rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.tp-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.tp-head h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.05;
}

.tp-sub {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 500;
}

.tp-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.tp-rating .stars {
  color: #f5a623;
}

.tp-rating b {
  font-weight: 650;
}

.tp-rating .muted {
  color: var(--muted);
}

.tp-section {
  margin-bottom: 2rem;
}

.tp-section h2 {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.tp-section p {
  margin: 0 0 0.8rem;
  color: rgba(17, 17, 17, 0.75);
  line-height: 1.65;
}

.tp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tp-tag {
  padding: 0.32rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(17, 17, 17, 0.72);
}

.tp-creds {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tp-creds li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.96rem;
  line-height: 1.5;
  color: rgba(17, 17, 17, 0.78);
}

.tp-creds svg {
  flex: none;
  margin-top: 0.18rem;
  color: var(--accent);
}

.tp-facts {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tp-facts li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.tp-fact-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.tp-fact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.tp-fact-value {
  font-size: 0.95rem;
  font-weight: 500;
}

/* contact sidebar */

.tp-aside {
  position: sticky;
  top: 92px;
}

.tp-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
}

.tp-price {
  font-size: 1.7rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.tp-price small {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.tp-card-facts {
  display: grid;
  gap: 0.55rem;
  margin: 1.1rem 0 1.3rem;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.tp-card-facts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.tp-card-facts span:first-child {
  color: var(--muted);
}

.tp-card-facts span:last-child {
  font-weight: 550;
  text-align: right;
}

.tp-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.tp-contact:hover {
  background: #333;
  transform: translateY(-1px);
}

.tp-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding: 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.tp-phone:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tp-contact + .tp-contact,
.tp-phone + .tp-contact,
.tp-contact + .tp-phone {
  margin-top: 0.75rem;
}

.tp-note {
  margin: 0.9rem 0 0;
  color: var(--faint);
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 860px) {
  /* Stack the profile: name/photo first, then the About section, then the
     pricing card, then everything else. display:contents lets the aside
     slot between the main column's own sections. */
  .tp-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .tp-main {
    display: contents;
  }

  .tp-head {
    order: -3;
  }

  .tp-main > .tp-section:first-of-type {
    order: -2;
  }

  .tp-aside {
    position: static;
    order: -1;
    margin-bottom: 2rem;
  }
}

@media (max-width: 560px) {
  .tp-head {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* ---------- Teacher profile reviews ---------- */

.tp-review {
  margin: 0.8rem 0 0;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.tp-review p {
  margin: 0 0 0.6rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.65;
}

.tp-review footer {
  font-size: 0.85rem;
  color: var(--faint);
  font-style: normal;
}

/* ---------- FAQ ---------- */

.faq-wrap {
  max-width: 860px;
}

.faq details {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.faq details:first-of-type {
  margin-top: 1.6rem;
}

.faq details:hover {
  border-color: var(--line-strong);
}

.faq details[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.3s var(--ease);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.6px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: background 0.25s var(--ease), transform 0.3s var(--ease);
}

.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq details[open] .faq-icon {
  background: var(--ink);
  border-color: var(--ink);
  transform: rotate(45deg);
}

.faq details[open] .faq-icon::before,
.faq details[open] .faq-icon::after {
  background: #fff;
}

.faq details > p {
  margin: 0;
  padding: 0 1.4rem 1.3rem;
  color: var(--muted);
  max-width: 700px;
}

/* ---------- CTA ---------- */

.cta-section {
  padding: 2rem 0 5rem;
}

.cta {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(700px 320px at 80% -10%, rgba(47, 107, 255, 0.3), transparent 60%),
    #0c0c0c;
  color: #fff;
  padding: 4.5rem 2rem;
  text-align: center;
}

.cta-wave {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 60%;
  opacity: 0.5;
  pointer-events: none;
}

.cta h2 {
  margin: 0 auto 0.6rem;
  max-width: 600px;
  color: #fff;
}

.cta p {
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.05rem;
}

.cta a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 1.9rem;
  font-weight: 600;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.cta a:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: 3.2rem 0 2rem;
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.footer-brand p {
  margin: 0.8rem 0 0;
  max-width: 320px;
  color: var(--muted);
  font-size: 0.92rem;
}

.brand-light {
  color: var(--ink);
}

footer nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem 1.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer nav a {
  transition: color 0.2s var(--ease);
}

footer nav a:hover {
  color: var(--ink);
}

.footer-copy {
  padding-top: 1.4rem;
  color: var(--faint);
  font-size: 0.81rem;
}

/* ---------- Focus states ---------- */

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(47, 107, 255, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

.nav-cta:focus-visible,
.chips a:focus-visible,
.search button:focus-visible,
.cta a:focus-visible {
  border-radius: 999px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .answer-copy {
    max-width: none;
  }

  .hero {
    padding: 48px 0 56px;
  }

  .topbar nav a:not(.nav-cta) {
    display: none;
  }

  .proof,
  .cards,
  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .steps::before {
    display: none;
  }

  .areas-grid,
  .split {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }

  .areas-copy {
    position: static;
  }
}

@media (max-width: 640px) {
  #note-field { display: none; }

  .wrap,
  .topbar-inner {
    width: calc(100vw - 32px);
  }

  .topbar-inner {
    min-height: 62px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .hero {
    margin: 74px 8px 0;
    padding: 40px 0 44px;
    border-radius: 20px;
  }


  .search {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 0.85rem;
  }

  .search button {
    width: 100%;
    min-height: 50px;
  }

  .hero-video {
    margin-top: 2.5rem;
  }

  .intro-media {
    border-radius: 12px;
  }

  .scroll-cue {
    bottom: 16px;
  }

  .section {
    padding: 3.6rem 0;
  }

  .answer {
    padding: 3rem 0;
  }

  .proof,
  .cards,
  .steps,
  .cities {
    grid-template-columns: 1fr;
  }

  .profile p {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .profile-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-tags {
    justify-content: flex-start;
  }

  .cta {
    padding: 3.2rem 1.4rem;
    border-radius: 20px;
  }

  .cta-section {
    padding: 1rem 0 4rem;
  }

  .footer-grid {
    flex-direction: column;
  }

  footer nav {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .rise {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .instrument-cards .inst-extra {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .view-more.is-loading .view-more-spinner {
    animation: none;
  }

  .intro-media,
  .intro-media video {
    opacity: 1;
    clip-path: none;
    transform: none;
  }

  .type-word::after {
    display: none;
  }
}

/* ---------- Guide articles ---------- */

.article-head {
  padding: 3.2rem 0 0;
}

.article-head h1 {
  max-width: 780px;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.byline .byline-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0c0c0c;
  color: #fff;
}

.byline b {
  color: var(--ink);
}

.byline .dot::before {
  content: "·";
  margin: 0 0.15rem;
}

.article-hero {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-md, 16px);
  display: block;
}

.quick-answer {
  margin: 2rem 0 0;
  padding: 1.5rem 1.6rem;
  border-left: 4px solid #2f6bff;
  border-radius: 12px;
  background: rgba(47, 107, 255, 0.06);
}

.quick-answer p {
  margin: 0;
}

.quick-answer p + p {
  margin-top: 0.75rem;
}

.quick-answer .qa-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2f6bff;
}

.rank-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 16px);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

table.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 560px;
}

table.rank-table th,
table.rank-table td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.rank-table thead th {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-soft, #fafafa);
}

table.rank-table tbody tr:last-child td {
  border-bottom: 0;
}

table.rank-table td a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(17, 17, 17, 0.25);
  text-underline-offset: 3px;
}

.rank-entry {
  margin-top: 2.4rem;
}

.rank-entry .rank-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.rank-entry .rank-num {
  flex: none;
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(17, 17, 17, 0.3);
}

.rank-entry h3 {
  margin: 0;
  font-size: 1.25rem;
}

.rank-entry .rank-label {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.1);
  color: #2f6bff;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .rank-entry .rank-head {
    flex-wrap: wrap;
  }
}

/* Guide articles: avatar fallback + prose */

.avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex: none;
}

.avatar-wrap .avatar-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(47, 107, 255, 0.1);
  color: #2f6bff;
  font-weight: 700;
  font-size: 1.1rem;
}

.avatar-wrap img.teacher-avatar {
  position: absolute;
  inset: 0;
}

.rank-why {
  margin: 0.85rem 0 0;
  color: rgba(17, 17, 17, 0.72);
  max-width: 720px;
}

.article-prose p {
  max-width: 760px;
}

.article-prose p + p {
  margin-top: 1rem;
}

.article-prose h3 {
  margin: 1.8rem 0 0.5rem;
  font-size: 1.08rem;
  max-width: 760px;
}

/* Footer link columns */

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3.5rem;
  justify-content: flex-end;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
  min-width: 150px;
}

.footer-col h4 {
  margin: 0 0 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-col a {
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--ink);
}

@media (max-width: 860px) {
  .footer-grid {
    flex-direction: column;
  }
  .footer-cols {
    justify-content: flex-start;
  }
}

.footer-mail {
  margin-top: 0.4rem;
  font-size: 0.92rem;
}

.footer-mail a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(17, 17, 17, 0.2);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}

.footer-mail a:hover {
  color: var(--ink);
}

/* Guide article FAQ: full-width Q&A for readability on desktop */

.faq-prose h3 {
  margin: 1.8rem 0 0.5rem;
  font-size: 1.08rem;
}

.faq-prose p + h3 {
  margin-top: 2.1rem;
}

/* Click-to-reveal teacher contact info */

.tp-reveal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  margin-top: 0.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.tp-reveal-btn:hover {
  background: #333;
  transform: translateY(-1px);
}

.tp-reveal-out {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.footer-mail a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
