/* piligrim — school catalogue. */

:root {
  --paper: #fcfcfb;
  --surface: #ffffff;
  --ink: #1a1c20;
  --ink-soft: #5f656d;
  --ink-faint: #949aa2;
  --line: #e6e4df;
  --line-soft: #f2f1ec;
  --accent: #1a5cb0;
  --accent-soft: #edf3fb;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 22, 26, 0.04), 0 12px 30px -14px rgba(20, 22, 26, 0.16);
  --wrap: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue",
    "Noto Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
dl, dd, p { margin: 0; }
img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.num, .facts dd, .rows dd { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.muted { color: var(--ink-faint); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.micro, .filter-label, .facts dt, .rows dt, .eyebrow, .breadcrumb {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}
.micro { display: block; margin-bottom: 18px; }

/* ---------- header ---------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; }
.logo img { display: block; height: 38px; width: auto; }
.logo:hover { text-decoration: none; opacity: 0.75; }

.header-right { display: flex; align-items: center; gap: 16px; }
.staff-link {
  font-size: 13.5px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px;
}
.staff-link:hover { color: var(--ink); border-color: var(--ink-faint); text-decoration: none; }

.lang-switch { display: flex; align-items: center; gap: 2px; }
.lang {
  background: none; border: 0; padding: 6px 10px; cursor: pointer; border-radius: 7px;
  font: inherit; font-size: 13.5px; letter-spacing: 0.06em; color: var(--ink-faint);
}
.lang:hover { color: var(--ink); background: var(--line-soft); text-decoration: none; }
.lang.is-active { color: var(--ink); font-weight: 600; }

/* ---------- messages ---------- */

.messages { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.message {
  padding: 13px 16px; border-radius: var(--radius-sm); font-size: 15px;
  background: var(--accent-soft); border: 1px solid #d5e2f4;
}
.message.error { background: #fdf0ef; border-color: #f0cfcc; }

/* ---------- hero ---------- */

.hero { padding: 64px 0 44px; text-align: center; }
.hero h1 {
  font-size: clamp(32px, 4.6vw, 50px);
  letter-spacing: -0.028em;
  /* Wide enough for two lines; balance evens them out. */
  max-width: 24ch;
  text-wrap: balance;
  margin-inline: auto;
}
.lead {
  color: var(--ink-soft); margin: 18px auto 0;
  max-width: 64ch; font-size: 18px; text-wrap: balance;
}
/* Kazakh runs longer than Russian in both hero lines. */
html[lang="kk"] .hero h1 { max-width: 29ch; }
html[lang="kk"] .lead { max-width: 74ch; }

/* ---------- quick links ---------- */

.quick-links {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px; padding: 30px 0 2px;
}
.quick-link {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
a.quick-link:hover {
  text-decoration: none; border-color: #d8d5cd; box-shadow: var(--shadow);
}
.quick-link-title { display: block; font-weight: 600; font-size: 16px; }
.quick-link-sub { display: block; color: var(--ink-faint); font-size: 14px; margin-top: 3px; }
.quick-link .arrow { flex: 0 0 auto; color: var(--accent); font-size: 18px; }
.quick-link.is-soon { background: transparent; border-style: dashed; }
.quick-link.is-soon .quick-link-title { color: var(--ink-soft); }
.soon {
  font-style: normal; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px;
}

/* ---------- filter toolbar ---------- */

.toolbar {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.filters-row {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 14px 0;
}

.icon {
  width: 16px; height: 16px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

.search-pill {
  display: flex; align-items: center; gap: 9px;
  /* Gives up width first when the filter pills need more. */
  flex: 1 1 160px; min-width: 128px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 15px; background: var(--surface); color: var(--ink-faint);
}
.search-pill:focus-within { border-color: var(--accent); color: var(--accent); }
.search-pill input {
  font: inherit; font-size: 15px; color: var(--ink);
  border: 0; background: transparent; width: 100%; padding: 0;
}
.search-pill input:focus { outline: none; }
.search-pill input::-webkit-search-cancel-button { cursor: pointer; }

.filter {
  /* Baseline, not centre: label and value are different sizes. */
  display: inline-flex; align-items: baseline; gap: 7px; min-width: 0;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 11px 8px; background: var(--surface);
}
.filter:hover { border-color: var(--ink-faint); }
.filter:focus-within { border-color: var(--accent); }
.filter .filter-label { font-size: 11px; line-height: 1; }
.filter select {
  font: inherit; font-size: 14.5px; color: var(--ink); line-height: 1;
  background: transparent; border: 0; padding: 0 13px 0 0; cursor: pointer;
  appearance: none; max-width: 170px; text-overflow: ellipsis;
  /* Arrow painted at the right edge; filters.js keeps the box tight. */
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%),
                    linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%);
  background-position: right 4px center, right 0 center;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
.filter select:focus { outline: none; }

/* Styleable dropdown, Chromium 135+. Elsewhere the native menu stays. */
@supports (appearance: base-select) {
  .filter select,
  .filter select::picker(select) { appearance: base-select; }

  /* Restore the flat pill: .filter draws the border, we paint the caret. */
  .filter select { border: 0; background-color: transparent; padding: 0 13px 0 0; }
  .filter select::picker-icon { display: none; }

  .filter select::picker(select) {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 6px;
    margin-top: 8px;
    min-width: 190px;
    opacity: 0;
    translate: 0 -6px;
    transition: opacity 0.14s ease, translate 0.14s ease,
                display 0.14s allow-discrete, overlay 0.14s allow-discrete;
  }
  .filter select:open::picker(select) { opacity: 1; translate: 0 0; }
  /* Without a starting style there is nothing to transition from. */
  @starting-style {
    .filter select:open::picker(select) { opacity: 0; translate: 0 -6px; }
  }

  .filter option {
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 14.5px; line-height: 1.3;
    color: var(--ink); background: transparent; cursor: pointer;
  }
  /* Selection is shown by colour, so the reserved tick column is dead space. */
  .filter option::checkmark { display: none; }
  .filter option:hover { background: var(--line-soft); }
  .filter option:checked { color: var(--accent); background: var(--accent-soft); }

  @media (prefers-reduced-motion: reduce) {
    .filter select::picker(select) { transition: none; }
  }
}

/* ---------- catalogue ---------- */

.catalogue { padding: 36px 32px 96px; }
.page-title { font-size: 30px; margin-bottom: 24px; }

.about { max-width: 780px; }
.about-lead { font-size: 20px; color: var(--ink); margin-bottom: 20px; max-width: 60ch; }
.about-body { color: var(--ink-soft); font-size: 17px; max-width: 68ch; }

.result-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 22px; font-size: 14px; color: var(--ink-faint);
}
.chip-filter {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 14px; color: var(--ink); font-size: 14px;
}
.chip-filter:hover { border-color: var(--ink-faint); text-decoration: none; }
.chip-filter span[aria-hidden] { color: var(--ink-faint); font-size: 15px; line-height: 1; }
.reset { font-size: 14px; }
.empty { color: var(--ink-soft); padding: 72px 0; text-align: center; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 28px;
}

.school-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.school-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #d8d5cd;
}

.media { position: relative; aspect-ratio: 16 / 10; background: var(--line-soft); }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-fallback {
  display: grid; place-items: center;
  background-color: var(--c); /* flat fallback where color-mix is unsupported */
  background-image: linear-gradient(
    155deg,
    color-mix(in srgb, var(--c) 84%, #ffffff),
    color-mix(in srgb, var(--c) 92%, #000000)
  );
}
.monogram {
  color: #fff; font-size: 46px; font-weight: 600; letter-spacing: 0.04em; opacity: 0.95;
}
.monogram-lg { font-size: clamp(56px, 8vw, 84px); }

.media-tags { position: absolute; top: 13px; left: 13px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag-overlay {
  background: rgba(255, 255, 255, 0.93);
  color: var(--ink);
  border-radius: 999px; padding: 4px 11px;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
}

.tag-draft { background: var(--ink); color: #fff; }
.draft-note {
  display: inline-block; margin-bottom: 14px;
  background: #fdf6e3; border: 1px solid #eadfbd; border-radius: var(--radius-sm);
  padding: 8px 14px; font-size: 14px; color: #7a6420;
}

.card-body { padding: 20px 22px 8px; display: flex; flex-direction: column; flex: 1; }
.card-head { margin-bottom: 14px; }
.school-name { font-size: 20px; }
.school-sub { color: var(--ink-faint); font-size: 14px; margin-top: 4px; }
.price { font-weight: 600; }

/* shared label/value rows — cards and school page */
.rows { display: grid; }
.row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.row:last-child { border-bottom: 0; }
.rows dt { flex: 0 0 auto; }
.rows dd { margin-left: auto; text-align: right; font-size: 15px; }

.pagination {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 40px; font-size: 14px;
}

/* ---------- school page ---------- */

.detail { padding: 26px 32px 96px; max-width: 1000px; }
.breadcrumb { display: flex; gap: 8px; margin-bottom: 22px; }
.breadcrumb a { color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span[aria-current] {
  color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 13px;
}

.banner {
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 6; background: var(--line-soft);
}
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-fallback {
  display: grid; place-items: center;
  background-color: var(--c); /* flat fallback where color-mix is unsupported */
  background-image: linear-gradient(
    155deg,
    color-mix(in srgb, var(--c) 84%, #ffffff),
    color-mix(in srgb, var(--c) 92%, #000000)
  );
}

.detail-top {
  display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.25fr);
  gap: 32px; align-items: start; margin-bottom: 32px;
}
/* order, not markup order, so the <h1> keeps its place for screen readers. */
.detail-top .banner { order: 2; }
.detail-facts h1 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 18px; }
.detail-facts .btn { margin-top: 18px; }
.detail-top .banner { aspect-ratio: 16 / 10; }

.panel + .panel { margin-top: 20px; }
.panel .description { margin: 0; max-width: 70ch; }
.note {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  color: var(--ink-soft); font-size: 14px; max-width: 70ch;
}
.rows dd.strong { font-weight: 600; }

.grade-fees { margin-top: 6px; }
.grade-fees summary {
  list-style: none; cursor: pointer; color: var(--accent);
  font-size: 14px; padding: 10px 0;
}
.grade-fees summary::-webkit-details-marker { display: none; }
.grade-fees .less { display: none; }
.grade-fees[open] .more { display: none; }
.grade-fees[open] .less { display: inline; }
.grade-fees .rows { border-top: 1px solid var(--line-soft); }

.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.school-head { margin-top: 32px; }
.school-head h1 { font-size: clamp(32px, 4.6vw, 46px); margin-top: 6px; }
.eyebrow { margin-bottom: 2px; }
.tagline { color: var(--ink-soft); margin-top: 8px; font-size: 17px; }

.facts {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 36px 0; padding: 22px 0;
}
.fact { padding-right: 16px; }
.fact + .fact { border-left: 1px solid var(--line-soft); padding-left: 22px; }
.facts dt { margin-bottom: 6px; }
.facts dd { font-size: 17px; font-weight: 500; }
.facts .num { text-align: left; }

.description { color: var(--ink-soft); max-width: 68ch; margin-bottom: 44px; font-size: 17px; }

.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px 10px;
}

/* ---------- shared form bits ---------- */

.hint { color: var(--ink-faint); font-size: 14px; }
.error { color: #b0453d; font-size: 14px; font-style: normal; }

.btn {
  display: inline-block; font: inherit; font-size: 15px; font-weight: 500;
  padding: 10px 22px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; cursor: pointer;
}
.btn:hover { text-decoration: none; opacity: 0.88; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); opacity: 1; }
.btn-sm { padding: 6px 14px; font-size: 14px; }
.btn-danger { background: #b0453d; border-color: #b0453d; }

/* ---------- cost calculator ---------- */

.calc { padding: 40px 32px 96px; }
.calc-head { max-width: 60ch; margin-bottom: 36px; }
.calc-head h1 { font-size: clamp(28px, 3.8vw, 40px); }
.calc-head .lead { margin-top: 14px; font-size: 17px; }

.calc-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 32px; align-items: start;
}

.calc-step {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px;
}
/* Unavailable steps are dimmed, not hidden. */
.calc-step.is-locked { opacity: 0.45; pointer-events: none; }

.step-title { display: flex; align-items: center; gap: 11px; font-size: 17px; margin-bottom: 18px; }
.step-n {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
}

.calc-search { margin-bottom: 14px; }
.calc-cities { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.pill-toggle {
  font: inherit; font-size: 14px; cursor: pointer;
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 15px;
}
.pill-toggle:hover { border-color: var(--ink-faint); color: var(--ink); }
.pill-toggle.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.calc-schools { display: grid; gap: 8px; max-height: 340px; overflow-y: auto; }
.school-option {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  font: inherit; cursor: pointer; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 12px;
}
.school-option:hover { border-color: var(--ink-faint); }
.school-option.is-active { border-color: var(--accent); background: var(--accent-soft); }
.school-option-thumb {
  flex: 0 0 auto; width: 46px; height: 34px; border-radius: 5px; overflow: hidden;
  display: grid; place-items: center; background: var(--line-soft);
}
.school-option-thumb img { width: 100%; height: 100%; object-fit: cover; }
.school-option-thumb.is-empty { color: #fff; font-size: 12px; font-weight: 600; }
.school-option-name { display: block; font-size: 14.5px; font-weight: 500; }
.school-option-city { display: block; font-size: 12.5px; color: var(--ink-faint); }

.grade-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.grade-btn {
  font: inherit; font-size: 15px; cursor: pointer; min-width: 44px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 0;
}
.grade-btn:hover:not(:disabled) { border-color: var(--ink-faint); }
.grade-btn:disabled { color: var(--ink-faint); opacity: 0.4; cursor: not-allowed; }
/* Every year of the span is filled; the first one is outlined as its start. */
.grade-btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.grade-btn.is-start { box-shadow: 0 0 0 2px var(--accent); }

.grade-span { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; }
.check-inline { display: flex; align-items: center; gap: 8px; font-size: 14.5px; cursor: pointer; }
.check-inline input { width: 16px; height: 16px; }
.span-to { display: flex; align-items: center; gap: 8px; }
.span-to select {
  font: inherit; font-size: 14.5px; color: var(--ink); cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 10px; background: var(--surface);
}

.extras-group + .extras-group { margin-top: 22px; }
.extras-group .micro { margin-bottom: 6px; }
.extras-group .block-hint { margin: 0 0 6px; }
.extras-list { display: grid; gap: 2px; }
.extra-row {
  display: flex; align-items: center; gap: 11px; cursor: pointer;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.extra-row:last-child { border-bottom: 0; }
.extra-row.is-static { cursor: default; color: var(--ink-soft); }
.extra-row input { width: 17px; height: 17px; flex: 0 0 auto; }
.extra-label { flex: 1 1 auto; font-size: 15px; }
.extra-value { font-variant-numeric: tabular-nums; font-size: 15px; color: var(--ink-soft); }

.calc-result {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 26px 24px;
  position: sticky; top: 24px;
}
.calc-placeholder { color: var(--ink-faint); font-size: 15px; }
.calc-identity { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.calc-thumb {
  width: 56px; height: 42px; border-radius: 7px; overflow: hidden; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--line-soft);
}
.calc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.calc-thumb.is-empty { color: #fff; font-size: 13px; font-weight: 600; }
.calc-school-name { display: block; font-size: 18px; font-weight: 600; }
.calc-grade-name { display: block; color: var(--ink-faint); font-size: 14px; }
.calc-total {
  font-size: clamp(28px, 3.4vw, 38px); font-weight: 600;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.calc-total-caption { color: var(--ink-faint); font-size: 13.5px; margin-top: 6px; }
.period-toggle { display: flex; gap: 8px; margin: 20px 0 6px; }
.calc-breakdown { margin-top: 8px; }
.calc-grand-total { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 600; }
.calc-grand-total dt { color: var(--ink); }
.calc-second-year {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 14.5px; font-variant-numeric: tabular-nums;
}
.calc-cta { margin-top: 22px; display: block; text-align: center; }

@media (max-width: 940px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-result { position: static; }
}

/* ---------- programme guide ---------- */

.guide { padding: 44px 32px 96px; }
.guide-head h1 {
  font-size: clamp(34px, 5vw, 62px); letter-spacing: -0.045em;
  line-height: 1.02; margin: 16px 0 24px; max-width: 18ch;
}
.guide-lead { max-width: 78ch; font-size: 20px; line-height: 1.55; color: var(--ink-soft); }

.guide-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 40px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.guide-stat { padding: 26px 30px 26px 0; }
.guide-stat + .guide-stat { border-left: 1px solid var(--line); padding-left: 30px; }
.guide-stat b {
  display: block; font-size: clamp(28px, 3.6vw, 40px); line-height: 1;
  letter-spacing: -0.04em; margin-bottom: 8px;
}
.guide-stat span { font-size: 14px; line-height: 1.35; color: var(--ink-faint); }

.guide-overview {
  display: grid; grid-template-columns: 1fr 1.35fr; gap: 60px;
  align-items: start; padding: 36px 0;
}
.guide-intro { font-size: 18px; line-height: 1.5; color: var(--ink-soft); max-width: 52ch; }
.guide-index {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.guide-index a {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  min-height: 76px; padding: 15px 17px; color: var(--ink); background: var(--surface);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.guide-index a:hover { background: var(--accent-soft); text-decoration: none; }
.guide-index small { font-size: 11px; color: var(--ink-faint); letter-spacing: 0.06em; }
.guide-index strong { font-size: 15px; line-height: 1.15; letter-spacing: -0.01em; }

.guide-programs { display: flex; flex-direction: column; gap: 22px; }
.guide-program {
  display: grid; grid-template-columns: 40% 60%;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; scroll-margin-top: 24px;
}

.guide-photo { position: relative; min-height: 380px; background: var(--line-soft); }
.guide-photo img {
  width: 100%; height: 100%; display: block; object-fit: cover;
  filter: saturate(0.85) contrast(0.97);
}
.guide-photo-label {
  position: absolute; left: 24px; right: 24px; bottom: 21px; color: #fff;
  font-size: 15px; line-height: 1.35; font-weight: 600;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.guide-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0) 47%);
}

.guide-copy { padding: 40px 46px; display: flex; flex-direction: column; justify-content: center; }
.guide-name {
  font-size: clamp(26px, 3vw, 34px); font-weight: 600;
  letter-spacing: -0.035em; line-height: 1.04; margin-bottom: 8px;
}
.guide-headline {
  margin: 0 0 20px; font-size: 16px; line-height: 1.35;
  font-weight: 600; color: var(--ink-soft); max-width: 60ch;
}
.guide-summary { font-size: 16.5px; line-height: 1.62; max-width: 70ch; }
.guide-facts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.guide-facts span {
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12.5px; color: var(--ink-soft); background: var(--paper);
}

.guide-cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line);
}
.guide-cta p { font-size: 20px; letter-spacing: -0.018em; }
.guide-cta a { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--ink); }
.guide-cta a:hover { text-decoration: none; color: var(--accent); border-color: var(--accent); }

@media (max-width: 940px) {
  .guide-overview { grid-template-columns: 1fr; gap: 24px; }
  .guide-program { grid-template-columns: 1fr; }
  .guide-photo { min-height: 240px; }
  .guide-copy { padding: 28px 24px; }
  .guide-stats { grid-template-columns: 1fr; }
  .guide-stat + .guide-stat {
    border-left: 0; padding-left: 0; border-top: 1px solid var(--line-soft);
  }
  .guide-index { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .guide { padding: 32px 18px 72px; }
  .guide-index { grid-template-columns: 1fr; }
  .guide-lead { font-size: 17px; }
  .guide-intro { font-size: 16px; }
}

/* ---------- compare ---------- */

.compare { padding: 40px 32px 96px; }
.cmp-counter { margin-left: auto; font-size: 13px; color: var(--ink-faint); font-weight: 400; }

.cmp-picklist { display: grid; gap: 2px; margin-top: 14px; }
.cmp-pick {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 9px 10px; border-radius: var(--radius-sm); border: 1px solid transparent;
}
.cmp-pick:hover { background: var(--line-soft); }
.cmp-pick.is-picked { border-color: var(--accent); background: var(--accent-soft); }
.cmp-pick input { width: 17px; height: 17px; flex: 0 0 auto; }
.cmp-pick:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }

/* The table is the point of the page, so it scrolls rather than wraps. */
.cmp-scroll { overflow-x: auto; margin-top: 18px; }
.cmp-table { border-collapse: collapse; width: 100%; min-width: 620px; }
.cmp-table th, .cmp-table td {
  padding: 14px 16px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
.cmp-table tbody th {
  font-weight: 500; font-size: 13px; color: var(--ink-faint);
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
.cmp-table td { font-size: 16px; font-variant-numeric: tabular-nums; }
.cmp-table td.is-empty { color: var(--ink-faint); font-size: 14.5px; }
.cmp-row-cost td { font-weight: 600; }
.cmp-row-about td {
  font-size: 14.5px; line-height: 1.5; font-variant-numeric: normal;
  color: var(--ink-soft); min-width: 220px; white-space: pre-line;
}
.cmp-table tfoot td, .cmp-table tfoot th { border-bottom: 0; }

.cmp-head { position: relative; min-width: 160px; border-bottom: 1px solid var(--line); }
.cmp-thumb {
  display: grid; place-items: center; overflow: hidden;
  width: 100%; height: 78px; border-radius: var(--radius-sm);
  background: var(--line-soft); margin-bottom: 10px;
}
.cmp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cmp-thumb.is-empty { color: #fff; font-size: 18px; font-weight: 600; }
.cmp-name { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.cmp-meta { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-faint); }
.cmp-remove {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  border: 0; background: rgba(255, 255, 255, 0.92); color: var(--ink);
  font: inherit; font-size: 17px; line-height: 1;
}
.cmp-remove:hover { background: var(--ink); color: #fff; }

/* ---------- staff editor (/manage/) ---------- */

.manage-bar { background: var(--ink); color: #fff; }
.manage-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 46px; font-size: 14px;
}
.manage-brand { color: #fff; font-weight: 600; letter-spacing: -0.01em; }
.manage-bar-right { display: flex; align-items: center; gap: 18px; }
.manage-bar-right a { color: rgba(255, 255, 255, 0.72); }
.manage-bar-right a:hover { color: #fff; }
.manage-bar-right form { margin: 0; }
.manage-user { color: rgba(255, 255, 255, 0.5); }
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: rgba(255, 255, 255, 0.72);
}
.linkish:hover { color: #fff; text-decoration: underline; }

.manage-page { padding-top: 40px; padding-bottom: 80px; }
.manage-narrow { max-width: 760px; }
.manage-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 24px;
}
.manage-head h1 { font-size: 30px; }
.manage-title { font-size: 30px; margin: 6px 0 28px; }

.manage-search { margin-bottom: 20px; }
.manage-search input {
  font: inherit; font-size: 15px; width: 100%; max-width: 340px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 13px; background: var(--surface);
}

.manage-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.manage-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  align-items: center; gap: 18px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
}
.manage-row:last-child { border-bottom: 0; }
.manage-row:hover { background: #fafaf8; text-decoration: none; }

.manage-thumb {
  width: 64px; height: 48px; border-radius: 6px; overflow: hidden;
  display: grid; place-items: center; background: var(--line-soft);
}
.manage-thumb img { width: 100%; height: 100%; object-fit: cover; }
.manage-thumb.is-empty {
  background: var(--c); color: #fff; font-size: 13px; font-weight: 600;
}
.manage-row-name { display: block; font-weight: 500; }
.manage-row-sub { display: block; color: var(--ink-faint); font-size: 13px; }
.manage-row-sub em { font-style: normal; color: #b08b4f; }
.manage-row-action { color: var(--accent); font-size: 14px; }

.status {
  font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.status.is-live { background: #e9f4ec; color: #2b6b41; }
.status.is-draft { background: var(--line-soft); color: var(--ink-soft); }

/* --- the form --- */

.editor { display: grid; gap: 4px; }
.editor-block {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px;
}
.editor-field { display: grid; gap: 6px; margin-bottom: 18px; }
.editor-field:last-child { margin-bottom: 0; }
.editor-field label { font-size: 14px; font-weight: 500; }
.editor-field input[type="text"],
.editor-field input[type="password"],
.editor-field input[type="number"],
.editor-field input[type="url"],
.editor-field input[type="email"],
.editor-field textarea,
.editor-field select {
  font: inherit; font-size: 15px; width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; background: var(--paper); color: var(--ink);
}
.editor-field textarea { resize: vertical; line-height: 1.55; }
.editor-field input:focus, .editor-field textarea:focus, .editor-field select:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
}
.editor-field.has-error input,
.editor-field.has-error textarea,
.editor-field.has-error select { border-color: #c9635c; }

.block-hint { margin: -6px 0 16px; }

/* Fields that belong together sit on one line and stack on narrow screens. */
.field-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px;
}
.field-row .editor-field { margin-bottom: 18px; }

.checkbox-grid > div {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px;
}
.checkbox-grid label { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 400; }
.checkbox-grid input { width: 16px; height: 16px; }

.grade-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px 14px; margin-bottom: 20px;
}
.grade-grid .editor-field { margin-bottom: 0; }
.grade-grid label { font-size: 12px; color: var(--ink-faint); }

.check-row { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 18px; }
.check-row label { display: flex; align-items: center; gap: 8px; font-size: 14.5px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; }

.photo-field { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.photo-preview {
  aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--line-soft); display: grid; place-items: center;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview.is-empty span { color: var(--ink-faint); font-size: 13px; }
.photo-input input[type="file"] { font: inherit; font-size: 14px; }

.publish-toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.publish-toggle input { margin-top: 5px; width: 17px; height: 17px; }
.publish-toggle strong { display: block; font-weight: 600; font-size: 15px; }

.form-error {
  background: #fdf0ef; border: 1px solid #f0cfcc; color: #a3453d;
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; font-size: 14px;
}
.form-error ul { margin: 0; padding-left: 18px; }

.editor-actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.editor-view { margin-left: auto; font-size: 14px; }
.editor-delete { font-size: 14px; color: #b0453d; }

/* --- login --- */

.login-page { display: grid; place-items: center; padding: 80px 20px; }
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px;
}
.login-card h1 { font-size: 24px; }
.login-card .muted { margin: 8px 0 24px; font-size: 14px; }

@media (max-width: 780px) {
  .manage-row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; }
  .manage-row-action { display: none; }
  .manage-thumb { width: 52px; height: 40px; }
  .photo-field { grid-template-columns: 1fr; }
  .photo-preview { max-width: 260px; }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line); margin-top: 48px;
  padding: 32px 0; color: var(--ink-faint); font-size: 14px;
}
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(150px, 1fr));
  gap: 32px; align-items: start;
}
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer-col .micro { margin-bottom: 2px; font-weight: 600; }
.footer-col a { color: var(--ink); }
.footer-name { font-weight: 600; color: var(--ink); }

/* ---------- narrow screens ---------- */

@media (max-width: 940px) {
  .facts { grid-template-columns: repeat(3, 1fr); gap: 20px 0; }
  .fact:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
  .panels { grid-template-columns: 1fr; gap: 20px; }
  .detail-top { grid-template-columns: 1fr; gap: 22px; }
  /* Stacked: the photo goes back on top. */
  .detail-top .banner { order: 0; }
}

@media (max-width: 780px) {
  .wrap { padding: 0 20px; }
  .catalogue, .detail { padding-left: 20px; padding-right: 20px; }
  .catalogue { padding-top: 52px; }
  .hero { padding: 48px 0 36px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .quick-links { grid-template-columns: 1fr; gap: 14px; }
  .toolbar { position: static; }
  .search-pill { flex-basis: 100%; }
  .grid { grid-template-columns: 1fr; gap: 22px; }
  .banner { aspect-ratio: 16 / 9; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact:nth-child(even) { border-left: 1px solid var(--line-soft); padding-left: 22px; }
}

.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.description-more { margin-top: 18px; }

/* ---------- currency switcher ---------- */

.currency-switch { position: relative; display: flex; align-items: center; }
.currency-toggle {
  display: flex; align-items: center; justify-content: center;
  min-width: 34px; height: 30px; padding: 0 9px;
  font: inherit; font-size: 14px; color: var(--ink-soft);
  background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.currency-toggle:hover { color: var(--ink); border-color: var(--ink-faint); }
.currency-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  min-width: 178px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.currency-option {
  display: flex; align-items: baseline; gap: 10px; width: 100%;
  padding: 7px 10px; font: inherit; font-size: 14.5px; color: var(--ink);
  background: none; border: 0; border-radius: 7px; cursor: pointer; text-align: left;
}
.currency-option:hover { background: var(--line-soft); }
.currency-option.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.currency-symbol { min-width: 26px; font-variant-numeric: tabular-nums; }
.currency-code { font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.04em; }
.currency-option.is-active .currency-code { color: var(--accent); }
.currency-note {
  margin: 6px 4px 2px; padding-top: 8px; border-top: 1px solid var(--line-soft);
  font-size: 12px; line-height: 1.4; color: var(--ink-faint);
}

/* ---------- photo carousel ---------- */

.carousel { position: relative; }
.carousel-track {
  display: flex; height: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track img {
  flex: 0 0 100%; width: 100%; height: 100%;
  object-fit: cover; display: block; scroll-snap-align: start;
}
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  font: inherit; font-size: 22px; line-height: 1; color: var(--ink);
  background: rgba(255, 255, 255, 0.88); border: 0; border-radius: 999px;
  cursor: pointer; opacity: 0; transition: opacity 0.16s ease;
}
.carousel:hover .carousel-arrow,
.carousel-arrow:focus-visible { opacity: 1; }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-dots {
  position: absolute; left: 0; right: 0; bottom: 12px;
  display: flex; justify-content: center; gap: 6px;
}
.carousel-dot {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.55); cursor: pointer;
  transition: background 0.16s ease, width 0.16s ease;
}
.carousel-dot.is-active { background: #fff; width: 18px; }

@media (max-width: 780px) {
  .carousel-arrow { display: none; }
}

.money-original {
  display: block; margin-top: 2px;
  font-size: 13px; font-weight: 400; color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
