/*
  :root — это "корень" стилей, здесь задаются переменные (переменные — это как ярлыки для разных цветов и отступов на сайте).
  Если вы хотите поменять какой-то цвет на сайте — например, основной зелёный (primary) — просто измените значение после двоеточия.
  Например, вместо "#1a6b4a" можно написать любой другой цвет, и все элементы, использующие primary, поменяют цвет.
  То же самое работает и с другими переменными: они дальше используются по сайту для цветов, фонов, линий и отступов.
  Менять можно любому человеку, не надо быть программистом, главное — следовать формату "#цвет" или "значение".
  Примеры:
    --primary: #ff0000;    // основной станет красным
    --accent: #0000ff;     // акцент сменится на синий
    --section-y: 2rem;     // уменьшится вертикальный отступ секций
*/
:root {
  --primary: #1a6b4a;           /* основной цвет сайта (зелёный) */
  --primary-dark: #145239;      /* более тёмный вариант основного цвета */
  --primary-soft: #ecfdf3;      /* очень светлый вариант основного цвета */
  --accent: #f5a623;            /* акцентный цвет (жёлтый/оранжевый) */
  --green: #20c13b;             /* дополнительный зелёный */
  --ink: #1f2937;               /* цвет основного текста (тёмно-серый) */
  --muted: #6b7280;             /* цвет для второстепенного текста */
  --line: #e5e7eb;              /* цвет линий/разделителей */
  --soft-bg: #f8fafc;           /* мягкий серый фон */
  --mobile-nav-height: calc(3.625rem + env(safe-area-inset-bottom, 0px)); /* высота меню в мобиле */
  --section-y: 3.5rem;          /* вертикальный отступ секций (обычно между блоками) */
  --section-y-lg: 4rem;         /* большой вертикальный отступ секций */
  --page-main-y: 3rem;          /* отступы сверху и снизу на основной части страницы */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: clip;
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
  transition: box-shadow 0.2s ease;
  overflow: visible;
}
#site-header.is-scrolled {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

html {
  height: 100%;
}

/* Плавное появление после загрузки partials (см. layout.js) */
html.partials-pending body { opacity: 0; }
html.partials-ready body {
  opacity: 1;
  transition: opacity 0.22s ease;
}
@media (prefers-reduced-motion: reduce) {
  html.partials-ready body { transition: none; }
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: 'Libre Franklin', sans-serif;
  color: var(--ink);
  background: #fff;
  overflow-x: clip;
  max-width: 100%;
}

#site-header {
  flex-shrink: 0;
}

#site-footer {
  margin-top: auto;
  width: 100%;
  flex-shrink: 0;
}

main,
.teacher-page,
.subject-page,
.subjects-page,
.catalog-page {
  flex: 1 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* Контент не выходит за viewport (iframe, grid, slider) */
main,
.page-hero,
section,
.site-footer,
.teachers-wrap,
.video-card,
.page-grid {
  min-width: 0;
  max-width: 100%;
}

img,
video,
iframe,
embed,
object {
  max-width: 100%;
}
.display { font-family: 'Fraunces', serif; }
.focus-ring:focus-visible { outline: 3px solid rgba(26, 107, 74, .35); outline-offset: 3px; }

.desktop-nav a[data-nav].nav-active,
.nav-dropdown .dropdown-menu a[data-nav].nav-active {
  color: var(--primary);
  font-weight: 600;
}

.hero-stats-bar {
  background: var(--primary-dark);
  color: #fff;
}

.hero-pattern {
  background-color: var(--primary);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.08) 0 2px, transparent 2px),
    radial-gradient(circle at 70% 45%, rgba(255,255,255,.08) 0 2px, transparent 2px);
  background-size: 42px 42px, 54px 54px;
}

.section-kicker {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  font-size: 14px;
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  transition: background .2s, transform .2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-accent:hover { background: #f59e0b; transform: translateY(-1px); }
.hero-pattern .btn-accent { background: #fff; color: var(--primary-dark); }
.hero-pattern .btn-accent:hover { background: var(--primary-soft); }

.hero-illustration {
  width: min(100%, 320px);
  height: auto;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, .12));
}

.site-brand__logo {
  display: block;
  width: auto;
  height: 2.75rem;
  max-width: min(208px, 48vw);
}

.site-brand__logo--inverse {
  height: 2.5rem;
  max-width: min(196px, 52vw);
}

.site-brand__logo--menu {
  height: 2.375rem;
  max-width: min(180px, 58vw);
}

.site-brand--footer {
  text-decoration: none;
}

.media-box--filled,
.article-img--photo,
.video-thumb--photo {
  overflow: hidden;
  position: relative;
}

.media-box--filled img,
.article-img--photo img,
.video-thumb--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.teacher-avatar--photo {
  background: #fff;
  overflow: hidden;
  padding: 0;
}

.teacher-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 82, 57, .25);
}


/* Catalog pages (subjects, teachers, articles, videos, reviews) */
.page-hero--catalog,
.page-hero--subjects {
  border-bottom: 1px solid var(--line);
}

.catalog-page-hero,
.subjects-page-hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .catalog-page-hero,
  .subjects-page-hero {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
  }
}

.catalog-page-hero__intro,
.subjects-page-hero__intro {
  min-width: 0;
}

.catalog-page-hero__aside,
.subjects-page-hero__aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.catalog-page-hero__stat,
.subjects-page-hero__stat {
  padding: 0.625rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.catalog-grid,
.subjects-catalog-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  min-width: 0;
}

@media (min-width: 640px) {
  .catalog-grid--2,
  .catalog-grid--3,
  .subjects-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .catalog-grid--3,
  .subjects-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.catalog-card__title {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.catalog-card__meta {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}

.catalog-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  transition: gap .2s ease;
}

.catalog-card__cta-arrow {
  display: inline-block;
  transition: transform .2s ease;
}

.catalog-page .filter-pills {
  justify-content: flex-start;
  margin-bottom: 1.5rem;
}

.catalog-page {
  padding-top: 2rem;
}

.subject-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: #fff;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}

.subject-card__visual {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  overflow: hidden;
}

.subject-card__visual.media-box--filled {
  padding: 0;
}

.subject-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 76% center;
  display: block;
  transition: transform .35s ease;
}

.subject-card:hover .subject-card__visual img,
.subject-card:focus-visible .subject-card__visual img {
  transform: scale(1.04);
}

.subject-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
  padding: 1.125rem 1.25rem 1.25rem;
}

.subject-card__title {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.subject-card__meta {
  margin: 0;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}

.subject-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  transition: gap .2s ease;
}

.subject-card__arrow {
  display: inline-block;
  transition: transform .2s ease;
}

.subject-card:hover .subject-card__cta,
.subject-card:focus-visible .subject-card__cta {
  gap: 0.5rem;
}

.subject-card:hover .subject-card__arrow,
.subject-card:focus-visible .subject-card__arrow {
  transform: translateX(2px);
}

.subject-card.hover-card:hover {
  border-color: #a7d7bc;
}

/* Article catalog cards */
.article-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: #fff;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}

.article-card__cover .article-img {
  height: auto;
  aspect-ratio: 16 / 10;
}

.article-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.375rem;
  padding: 1.125rem 1.25rem 1.25rem;
}

.article-card__cat {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.article-card__date {
  font-size: 0.8125rem;
  color: #95a094;
}

.article-card:hover .catalog-card__cta,
.article-card:focus-visible .catalog-card__cta {
  gap: 0.5rem;
}

.article-card:hover .catalog-card__cta-arrow,
.article-card:focus-visible .catalog-card__cta-arrow {
  transform: translateX(2px);
}

.article-card.hover-card:hover {
  border-color: #a7d7bc;
}

/* Teacher catalog cards */
.teacher-catalog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: #fff;
  overflow: hidden;
  min-height: 100%;
}

.teacher-catalog-card__profile {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem 1.25rem 1rem;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.teacher-catalog-card__avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.teacher-catalog-card__avatar {
  width: 7rem;
  height: 7rem;
  margin: 0;
  font-size: 2.25rem;
}

.teacher-catalog-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.teacher-catalog-card__body .catalog-card__meta {
  flex: 1;
}

.teacher-catalog-card__exp {
  margin: 0;
  font-size: 0.8125rem;
  color: #9ca3af;
}

.teacher-catalog-card__footer {
  padding: 0 1.25rem 1.25rem;
}

.teacher-catalog-card__footer .btn-accent {
  width: 100%;
  justify-content: center;
}

.teacher-catalog-card:hover .catalog-card__cta,
.teacher-catalog-card__profile:focus-visible .catalog-card__cta {
  gap: 0.5rem;
}

.teacher-catalog-card:hover .catalog-card__cta-arrow,
.teacher-catalog-card__profile:focus-visible .catalog-card__cta-arrow {
  transform: translateX(2px);
}

.teacher-catalog-card.hover-card:hover {
  border-color: #a7d7bc;
}

.teacher-catalog-card__profile:hover .catalog-card__title,
.teacher-catalog-card__profile:focus-visible .catalog-card__title {
  color: var(--primary);
}

/* Video catalog cards */
.catalog-video-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: #fff;
  overflow: hidden;
  min-height: 100%;
}

.catalog-video-card .video-thumb {
  aspect-ratio: 16 / 10;
  width: 100%;
}

.catalog-video-card .video-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
  padding: 1.125rem 1.25rem 1.25rem;
}

.catalog-video-card .video-card__soon {
  margin: 0;
  font-size: 0.8125rem;
  color: #9ca3af;
}

.catalog-video-card.hover-card:hover {
  border-color: #a7d7bc;
}

/* Review catalog cards */
.review-card--catalog {
  padding: 1.5rem;
}

.review-card--catalog .review-card__avatar {
  width: 3rem;
  height: 3rem;
  font-size: 1.125rem;
}

.review-card--catalog .review-card__name {
  font-family: 'Fraunces', serif;
  font-size: 1.0625rem;
  font-weight: 600;
}

.review-card--catalog .review-card__date {
  font-size: 0.8125rem;
  color: #9ca3af;
}

.review-card--catalog .review-card__text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink);
}

.review-card--catalog .review-card__stars {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: #fbbf24;
}

.btn-outline {
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
}
.btn-outline:hover { background: rgba(255,255,255,.15); }

.site-footer { background: var(--primary-dark); }

.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: .2s ease;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hover-card { transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease; }
.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(26, 107, 74, .1);
  border-color: #a7d7bc;
}
.footer-link:hover { opacity: .72; }

.article-img { height: 7rem; background: linear-gradient(135deg, #d1fae5, var(--primary-soft)); }
.article-img--2 { background: linear-gradient(135deg, #dcfce7, #f0fdf4); }
.article-img--3 { background: linear-gradient(135deg, #fef3c7, #fffbeb); }
.article-img--4 { background: linear-gradient(135deg, #ecfdf3, #d1fae5); }

.video-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.video-thumb--1 { background: linear-gradient(135deg, var(--primary), #145239); }
.video-thumb--2 { background: linear-gradient(135deg, #20c13b, #15803d); }
.map-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 9;
  min-height: 16rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft-bg);
  margin-bottom: 2rem;
  isolation: isolate;
}
.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: 0;
  display: block;
}
.map-embed--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .875rem;
  text-align: center;
  padding: 1rem;
}

.video-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  isolation: isolate;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: 0;
  display: block;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  padding: 2.5rem;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Algorithm */
.algo-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; position: relative; }
.algo-steps::before {
  content: '';
  position: absolute;
  top: 2.25rem;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--line);
}
.algo-step { text-align: center; position: relative; z-index: 1; }
.algo-sublist {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  max-width: 11rem;
  margin-inline: auto;
}
.algo-sublist li {
  font-size: .6875rem;
  color: var(--muted);
  line-height: 1.45;
  padding-left: .75rem;
  position: relative;
  margin-bottom: .375rem;
}
.algo-sublist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .45em;
  width: .25rem;
  height: .25rem;
  border-radius: 50%;
  background: var(--primary);
}
.algo-num {
  width: 4.5rem; height: 4.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.tab-btn {
  padding: .5rem 1.25rem;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: var(--soft-bg);
  color: var(--muted);
  transition: .2s;
}
.tab-btn.active, .tab-btn:hover { background: var(--primary); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Cities */
.city-card { transition: .2s; }
.city-card.active { border-color: var(--primary) !important; box-shadow: 0 0 0 1px var(--primary); }

/* Teachers slider */
.teachers-wrap { overflow: hidden; width: 100%; max-width: 100%; }
.teachers-track { display: flex; gap: 1.25rem; transition: transform .4s ease; }
.teacher-card { flex: 0 0 calc(25% - 0.94rem); min-width: 0; }
.teacher-avatar {
  width: 6rem;
  height: 6rem;
  margin: 0 auto .75rem;
  border-radius: 50%;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  font-size: 2rem;
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}
.filter-pill {
  padding: .4375rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.filter-pill:hover {
  border-color: #cbd5e1;
  color: var(--ink);
}
.filter-pill.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.slider-btn {
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  transition: .2s;
}
.slider-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Score list */
.score-row {
  display: flex;
  justify-content: space-between;
  padding: .875rem 1.25rem;
  background: var(--soft-bg);
  border-radius: 6px;
  margin-bottom: .5rem;
  font-size: .9375rem;
}
.score-row strong { color: var(--primary); }

.uni-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  max-width: 40rem;
  margin-inline: auto;
}
.uni-badge {
  display: grid;
  place-items: center;
  min-width: 4.5rem;
  padding: .625rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: .75rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .02em;
}

.section-block {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.page-main {
  padding-top: var(--page-main-y);
  padding-bottom: var(--page-main-y);
}
.review-card__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .section-block {
    padding-top: var(--section-y-lg);
    padding-bottom: var(--section-y-lg);
  }
  .page-main {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* Mobile bottom nav */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: end;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 85;
    height: var(--mobile-nav-height);
    padding: 0 .25rem env(safe-area-inset-bottom, 0);
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 24px rgba(15, 23, 42, .06);
    backdrop-filter: blur(10px);
    transition: transform .25s ease, opacity .25s ease;
  }

  body {
    padding-bottom: var(--mobile-nav-height);
  }

  .cookie-bar {
    bottom: var(--mobile-nav-height);
    z-index: 86;
  }

  body:has(.modal-overlay.open) .mobile-bottom-nav,
  body:has(.video-modal.open) .mobile-bottom-nav,
  body:has(.mobile-menu-panel.open) .mobile-bottom-nav {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }

  .mobile-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .1875rem;
    min-height: 3.625rem;
    padding: .375rem .25rem .4375rem;
    border: none;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .01em;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color .2s ease;
  }

  .mobile-bottom-nav__icon {
    width: 1.25rem;
    height: 1.25rem;
  }

  .mobile-bottom-nav__label {
    line-height: 1.1;
  }

  .mobile-bottom-nav__item.mobile-nav-active {
    color: var(--primary);
  }

  .mobile-bottom-nav__item.mobile-nav-active .mobile-bottom-nav__icon {
    stroke-width: 2.25;
  }

  .mobile-bottom-nav__item--cta {
    color: var(--ink);
    padding-top: 0;
  }

  .mobile-bottom-nav__cta-ring {
    display: grid;
    place-items: center;
    width: 2.625rem;
    height: 2.625rem;
    margin-top: -.6875rem;
    border-radius: 999px;
    background: var(--accent);
    color: #1f2937;
    box-shadow: 0 4px 14px rgba(251, 191, 36, .45);
  }

  .mobile-bottom-nav__item--cta .mobile-bottom-nav__icon {
    width: 1.3125rem;
    height: 1.3125rem;
  }

  .mobile-bottom-nav__item--cta:active .mobile-bottom-nav__cta-ring {
    transform: scale(.96);
  }

  .mobile-bottom-nav__cta-ring {
    transition: transform .15s ease;
  }
}

/* WhatsApp float */
.wa-float {
  position: fixed;
  bottom: 5.5rem;
  right: 1.25rem;
  z-index: 90;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  transition: transform .2s, bottom .25s ease;
}
.wa-float:hover { transform: scale(1.05); }
body:has(.cookie-bar.show) .wa-float { bottom: 6.75rem; }

@media (max-width: 1024px) {
  .wa-float {
    bottom: calc(var(--mobile-nav-height) + .75rem);
  }
  body:has(.cookie-bar.show) .wa-float {
    bottom: calc(var(--mobile-nav-height) + 5.5rem);
  }
}

@media (max-width: 640px) {
  body:has(.cookie-bar.show) .wa-float {
    bottom: calc(var(--mobile-nav-height) + 6.75rem);
  }
}

/* Mobile menu */
.mobile-menu-panel {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,23,42,.5);
  opacity: 0; visibility: hidden;
  transition: opacity .25s;
}
.mobile-menu-panel.open { opacity: 1; visibility: visible; }
.mobile-menu-panel__inner {
  position: absolute; top: 0; right: 0;
  width: min(100%, 320px); height: 100%;
  background: #fff; padding: 1.5rem;
  transform: translateX(100%);
  transition: transform .25s;
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
  box-sizing: border-box;
}
.mobile-menu-panel.open .mobile-menu-panel__inner { transform: translateX(0); }

.mobile-menu-subjects__link {
  display: block;
  padding: 0.5rem 0 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
  line-height: 1.4;
  color: #515a52;
  text-decoration: none;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mobile-menu-subjects__link:hover,
.mobile-menu-subjects__link:focus-visible {
  color: var(--primary);
}

.mobile-menu-nav {
  min-width: 0;
}

.mobile-menu-group {
  min-width: 0;
}

.mobile-menu-group__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0;
  border: none;
  background: none;
  font: inherit;
  font-size: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.mobile-menu-group__toggle--section {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.mobile-menu-group__title {
  font-weight: 600;
}

.mobile-menu-group__label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}

.mobile-menu-group__chevron {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform .2s ease;
}

.mobile-menu-group.is-open .mobile-menu-group__chevron {
  transform: rotate(180deg);
}

.mobile-menu-group__panel {
  min-width: 0;
  padding-bottom: 0.25rem;
}

.mobile-menu-group__link {
  display: block;
  padding: 0.5rem 0 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
  line-height: 1.4;
  color: #515a52;
  text-decoration: none;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mobile-menu-group__link:hover,
.mobile-menu-group__link:focus-visible {
  color: var(--primary);
}

.mobile-menu-subjects__link--all {
  font-weight: 600;
  color: var(--primary);
}

[data-subjects-nav] {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

.video-card__trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: inherit;
  font: inherit;
}

.video-card__trigger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.video-modal {
  backdrop-filter: blur(6px);
  padding: 1rem;
}

.video-modal__dialog {
  position: relative;
  width: min(100%, 960px);
  max-width: 960px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

.video-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .18);
  transition: background .2s, transform .2s;
}

.video-modal__close:hover {
  background: #fff;
  transform: scale(1.04);
}

.video-modal__close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.video-modal__stage {
  position: relative;
  background: #0f172a;
}

.video-modal__player:empty {
  display: none;
}

.video-modal__loading,
.video-modal__empty {
  width: 100%;
}

.video-modal__loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #0f172a;
  color: rgba(255, 255, 255, .78);
  font-size: 0.875rem;
}

.video-modal__loading[hidden],
.video-modal__empty[hidden] {
  display: none !important;
}

.video-modal__spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid rgba(255, 255, 255, .22);
  border-top-color: #fff;
  border-radius: 50%;
  animation: video-modal-spin .75s linear infinite;
}

@keyframes video-modal-spin {
  to { transform: rotate(360deg); }
}

.video-modal__empty {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
}

.video-modal__empty-icon {
  opacity: .85;
  margin-bottom: 0.25rem;
}

.video-modal__empty-title {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.video-modal__empty-text {
  margin: 0;
  max-width: 22rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .88);
}

.video-modal__empty-cta {
  margin-top: 0.5rem;
}

.video-modal__footer {
  padding: 1.125rem 1.5rem 1.375rem;
  padding-right: 3.25rem;
  border-top: 1px solid var(--line);
}

.video-modal__title {
  margin: 0 0 0.25rem;
  font-family: 'Fraunces', serif;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.video-modal__meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.video-modal__player .video-embed {
  border-radius: 0;
  overflow: hidden;
}

.modal-box--video {
  width: min(100%, 960px);
  max-height: min(92vh, 860px);
  overflow-y: auto;
}

@media (max-width: 640px) {
  .video-modal {
    padding: 0.75rem;
    align-items: flex-end;
  }

  .video-modal__dialog {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: 94vh;
  }

  .video-modal__footer {
    padding: 1rem 1.125rem 1.25rem;
    padding-right: 1.125rem;
  }

  .video-modal__close {
    top: 0.625rem;
    right: 0.625rem;
    width: 2.25rem;
    height: 2.25rem;
  }
}

.teacher-profile-hero {
  background: linear-gradient(135deg, var(--primary-soft) 0%, #fff 70%);
  border-bottom: 1px solid var(--line);
}

.teacher-profile-body {
  padding-top: 2rem;
}

.teacher-profile-hero__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  margin-bottom: 0;
}

.teacher-profile-hero__info {
  min-width: 0;
}

@media (min-width: 640px) {
  .teacher-profile-hero__layout {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
}

.teacher-profile-hero__avatar {
  width: 7.5rem;
  height: 7.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-soft);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 107, 74, .15);
}

.teacher-profile-hero__avatar--filled.teacher-avatar--photo,
.teacher-profile-hero__avatar.teacher-avatar--photo {
  width: 7.5rem;
  height: 7.5rem;
}

.teacher-profile-hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.teacher-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .teacher-highlights {
    justify-content: flex-start;
  }
}

.teacher-highlights__item {
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: #fff;
  border: 1px solid #a7d7bc;
  padding: .4375rem .875rem;
  border-radius: 999px;
}

.teacher-bio {
  max-width: none;
}

.teacher-bio p {
  margin-bottom: 1rem;
  line-height: 1.65;
  color: #374151;
}

.teacher-bio p:last-child {
  margin-bottom: 0;
}

.teacher-card__profile:hover h2,
.teacher-card__profile:hover h3 {
  color: var(--primary);
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,.6);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; visibility: hidden;
  transition: .25s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  background: #fff; border-radius: 12px;
  padding: 2rem; width: min(100%, 460px);
  max-height: 90vh; overflow-y: auto;
  transform: translateY(16px);
  transition: transform .25s;
  position: relative;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.form-group { margin-bottom: .875rem; }
.form-group label,
.form-group .form-label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  margin-bottom: .375rem;
}
.form-group input, .form-group textarea {
  width: 100%; padding: .625rem .875rem;
  border: 1px solid var(--line); border-radius: 6px; font: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.format-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.format-segment__item {
  position: relative;
  cursor: pointer;
}
.format-segment__item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.format-segment__item span {
  display: block;
  padding: .625rem .75rem;
  text-align: center;
  font-size: .875rem;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
}
.format-segment__item:hover span {
  border-color: #cbd5e1;
  color: var(--ink);
}
.format-segment__item input:focus-visible + span {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.format-segment__item input:checked + span {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.form-hidden { display: none !important; }

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .375rem .75rem;
  max-height: 9rem;
  overflow-y: auto;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft-bg);
}
.subject-check {
  display: flex;
  align-items: flex-start;
  gap: .375rem;
  font-size: .75rem;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.35;
}
.subject-check input { width: auto; margin-top: .125rem; flex-shrink: 0; accent-color: var(--primary); }

.form-status {
  font-size: .8125rem;
  margin-top: .5rem;
  min-height: 1.25rem;
}
.form-status--error { color: #dc2626; }

/* Subject pages — extended visual block (hero + benefits) */
.subject-visual-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.subject-visual-wrap__backdrop {
  position: absolute;
  inset: 0;
}

.subject-visual-wrap__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 76% 42%;
  transform: scale(1.02);
  opacity: 0;
  transition: opacity .5s ease, transform 12s ease;
}

.subject-visual-wrap--ready .subject-visual-wrap__bg {
  opacity: 1;
}

.subject-visual-wrap--ready:hover .subject-visual-wrap__bg {
  transform: scale(1.05);
}

.subject-visual-wrap__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(108deg,
      rgba(15, 45, 32, .94) 0%,
      rgba(20, 82, 57, .86) 32%,
      rgba(26, 107, 74, .48) 54%,
      rgba(26, 107, 74, .16) 74%,
      rgba(26, 107, 74, .1) 100%);
}

.subject-visual-wrap__grain {
  position: absolute;
  inset: 0;
  opacity: .32;
  background-image:
    radial-gradient(circle at 20% 24%, rgba(255, 255, 255, .14) 0 1px, transparent 1px),
    radial-gradient(circle at 82% 68%, rgba(255, 255, 255, .1) 0 1px, transparent 1px);
  background-size: 28px 28px, 36px 36px;
  pointer-events: none;
}

.subject-profile-hero {
  position: relative;
  z-index: 2;
}

.subject-profile-hero__content {
  position: relative;
}

.subject-profile-hero__back {
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
  transition: color .2s ease;
}

.subject-profile-hero__back:hover {
  color: #fff;
}

.subject-profile-hero__panel {
  max-width: 34rem;
  color: #fff;
}

.subject-profile-hero .section-kicker {
  color: #fde68a;
}

.subject-profile-hero__lead {
  color: rgba(255, 255, 255, .84);
  line-height: 1.65;
  max-width: 30rem;
}

.subject-profile-hero .display {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .18);
}

.subject-body.subject-body--over-visual {
  position: relative;
  z-index: 2;
  padding-top: 0;
}

.subject-section-title--on-visual {
  text-shadow: 0 2px 20px rgba(0, 0, 0, .2);
  max-width: 36rem;
}

.subject-body--over-visual .subject-benefits__grid li {
  background: rgba(255, 255, 255, .97);
  border-color: rgba(255, 255, 255, .65);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
  backdrop-filter: blur(6px);
}

@media (min-width: 640px) {
  .subject-body--over-visual .subject-benefits__grid li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.4375rem);
  }
}

@media (max-width: 767px) {
  .subject-visual-wrap__bg {
    object-position: 62% 38%;
    transform: scale(1.01);
  }

  .subject-visual-wrap__scrim {
    background:
      linear-gradient(180deg,
        rgba(15, 45, 32, .9) 0%,
        rgba(20, 82, 57, .84) 42%,
        rgba(26, 107, 74, .58) 100%);
  }

  .subject-profile-hero .btn-outline {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .subject-visual-wrap__bg {
    transition: opacity .5s ease;
    transform: none !important;
  }

  .subject-visual-wrap--ready:hover .subject-visual-wrap__bg {
    transform: none;
  }
}

.subject-body {
  padding-top: 2rem;
}

.subject-section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.25rem, 3.5vw, 1.625rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.subject-section-title.subject-section-title--on-visual {
  color: #fff;
  margin-top: 0.25rem;
}

.subject-benefits__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.875rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .subject-benefits__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.subject-benefits__grid li {
  background: var(--soft-bg);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  padding: 1rem 1.125rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #374151;
}

.subject-benefits__grid strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.subject-org-section {
  background: var(--soft-bg);
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}

.subject-org__steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.subject-org__steps li {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 0.25rem;
  padding: 1.125rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #374151;
}

.subject-org__steps li strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.375rem;
}

.subject-org__details {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: #374151;
}

.subject-org__note {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0.25rem;
  padding: 1.125rem 1.25rem;
  margin-bottom: 1.25rem;
}

.subject-org__monitoring {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #374151;
  margin: 0;
}

.subject-cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-soft) 0%, #fff 100%);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
}

.subject-cta-bar__text {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  max-width: 36rem;
}
.subject-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* Cookie */
.cookie-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  background: #fff; border-top: 1px solid var(--line);
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  transform: translateY(100%);
  transition: transform .3s;
}
.cookie-bar.show { transform: translateY(0); }

/* Page inner */
.page-hero {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  background: linear-gradient(135deg, var(--primary-soft) 0%, #fff 70%);
}
.prose h2 { font-family: 'Fraunces', serif; font-size: 1.5rem; margin: 2rem 0 .75rem; }
.prose p, .prose li { line-height: 1.75; color: #374151; }
.prose ul { padding-left: 1.5rem; list-style: disc; }

.page-grid { display: grid; gap: 1.25rem; min-width: 0; }
.page-grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.page-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.page-grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.sitemap-list { list-style: none; padding: 0; margin: 0; }
.sitemap-list li { margin-bottom: .5rem; }
.sitemap-list a { color: var(--primary); text-decoration: none; font-size: .9375rem; }
.sitemap-list a:hover { text-decoration: underline; }

@media (max-width: 1024px) {
  .desktop-nav, .desktop-contact { display: none !important; }
  .algo-steps { grid-template-columns: repeat(2, 1fr); }
  .algo-steps::before { display: none; }
  .teacher-card { flex: 0 0 calc(50% - 0.625rem); }

  .site-footer .max-w-7xl > .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-footer .max-w-7xl > .grid > div:first-child {
    grid-column: 1 / -1;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
@media (max-width: 768px) {
  .algo-steps { grid-template-columns: 1fr; }
  .teacher-card { flex: 0 0 100%; }
  .cta-banner { text-align: center; justify-content: center; }
}
@media (min-width: 1025px) {
  .mobile-menu-btn { display: none !important; }
}

/* Mobile polish — 320 / 640px */
@media (max-width: 640px) {
  html { scroll-padding-top: 72px; }

  .page-hero {
    padding-top: 2rem;
    padding-bottom: 2.25rem;
  }

  .page-hero .display,
  section .display.text-3xl {
    font-size: clamp(1.625rem, 7vw, 2rem);
    line-height: 1.2;
  }

  .cta-banner {
    padding: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: .75rem;
    padding: .4375rem .875rem;
  }

  #teachers .flex.flex-wrap.justify-between.items-end {
    flex-direction: column;
    align-items: stretch;
  }
  #teachers .flex.flex-wrap.items-center.gap-3.shrink-0 {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  #teachers .btn-accent { width: 100%; }

  .score-row {
    font-size: .8125rem;
    padding: .6875rem .875rem;
    gap: .625rem;
  }
  .score-row span {
    min-width: 0;
    padding-right: .25rem;
  }

  .uni-badge {
    min-width: 3.75rem;
    padding: .5rem .75rem;
    font-size: .6875rem;
  }

  .modal-overlay { padding: .75rem; }
  .modal-box { padding: 1.25rem; width: 100%; }

  .cookie-bar { padding: .875rem 1rem; }

  .filter-pill {
    font-size: .8125rem;
    padding: .375rem .875rem;
  }

  .section-kicker { font-size: .6875rem; }
}

@media (max-width: 380px) {
  .hero-pattern h1.display { font-size: 1.75rem; }
}
