/* ===================================================================
   RATIOMENTE — Design System
   Mathematics & Exam Preparation — Viktoriia Skripnikova
   =================================================================== */

/* -------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------- */
:root {
  /* Color */
  --navy: #1f2a44;
  --navy-deep: #141b2e;
  --navy-soft: #3a4666;
  --gold: #c9a96a;
  --gold-deep: #a9834a;
  --gold-pale: #e6d4ac;
  --cream: #f8f6f2;
  --cream-deep: #efe9e0;
  --lavender: #ece6f5;
  --lavender-deep: #d9cdec;
  --white: #ffffff;
  --ink: #262b3d;
  --ink-soft: #5c6278;
  --ink-faint: #8a90a3;
  --line: #e3ddd1;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Type scale (fluid) */
  --fs-h1: clamp(2.4rem, 3.6vw + 1.2rem, 4.4rem);
  --fs-h2: clamp(1.9rem, 2vw + 1.2rem, 2.75rem);
  --fs-h3: clamp(1.35rem, 0.9vw + 1rem, 1.75rem);
  --fs-lead: clamp(1.1rem, 0.4vw + 1rem, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;

  /* Layout */
  --page-max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius-s: 6px;
  --radius-m: 14px;
  --radius-l: 28px;
  --header-h: 84px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------------------------------------------------------------
   2. Reset & base
   ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); font-weight: 560; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0; }
.lead { font-size: var(--fs-lead); color: var(--ink-soft); line-height: 1.55; }

/* visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 3px;
}

.container {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-s);
  z-index: 200;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* -------------------------------------------------------------
   3. Section rhythm
   ------------------------------------------------------------- */
.section {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--cream-deep { background: var(--cream-deep); }
.section--navy { background: var(--navy); color: var(--cream); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--lavender { background: var(--lavender); }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.section-head.center { margin-inline: auto; text-align: center; }

.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold-deep);
  margin-bottom: 0.6rem;
}
.section--navy .kicker { color: var(--gold); }

/* -------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--gold {
  background: var(--gold);
  color: var(--navy-deep);
  box-shadow: 0 8px 20px -8px rgba(169, 131, 74, 0.55);
}
.btn--gold:hover { background: var(--gold-deep); box-shadow: 0 10px 24px -8px rgba(169, 131, 74, 0.65); }

.btn--outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn--outline:hover { background: var(--navy); color: var(--white); }

.btn--outline-light {
  background: transparent;
  border-color: rgba(248, 246, 242, 0.55);
  color: var(--cream);
}
.btn--outline-light:hover { background: var(--cream); color: var(--navy); border-color: var(--cream); }

.btn--ghost {
  background: transparent;
  color: var(--navy);
  padding-inline: 0.2rem;
  border-radius: 0;
  border-bottom: 1.5px solid var(--gold);
}
.btn--ghost:hover { color: var(--gold-deep); }

.btn--sm { padding: 0.6rem 1.2rem; font-size: 0.9rem; }

/* -------------------------------------------------------------
   5. Site header / navigation
   ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.brand img { width: 40px; height: 40px; }
.brand__word {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}
.nav__list {
  display: flex;
  align-items: center;
  gap: 2.1rem;
  list-style: none;
}
.nav__list > li { position: relative; }
.nav__link {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--navy);
  padding-block: 0.4rem;
  position: relative;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--gold);
  transition: right 0.22s var(--ease);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { right: 0; }
.nav__link[aria-current="page"] { color: var(--gold-deep); }

.nav__caret { margin-left: 0.3rem; font-size: 0.7em; opacity: 0.7; }

.dropdown__toggle {
  background: none;
  border: none;
  padding: 0.4rem 0;
  font: inherit;
}

.dropdown { position: relative; }
.dropdown__panel {
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 260px;
  background: var(--white);
  border-radius: var(--radius-m);
  box-shadow: 0 18px 40px -14px rgba(20, 27, 46, 0.28);
  padding: 0.6rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}
/* True mouse/trackpad devices only: hover and keyboard-focus reveal the
   panel via pure CSS. Scoping this to (hover:hover) and (pointer:fine)
   is deliberate — it keeps this rule from ever matching a touchscreen
   (phone or tablet, any orientation), where :focus-within can otherwise
   fire unpredictably on tap and fight with the JS-driven toggle below,
   which is what caused the panel to render off-screen on iPhone/iPad. */
@media (hover: hover) and (pointer: fine) {
  .dropdown:hover .dropdown__panel,
  .dropdown:focus-within .dropdown__panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}
/* Touch devices at any width above the mobile nav breakpoint (notably
   iPad landscape, which is wide enough to show the inline desktop nav
   but has no real hover): JS toggles this class on tap. */
@media (min-width: 861px) {
  .dropdown.is-open .dropdown__panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}
.dropdown__panel a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-s);
  font-size: 0.95rem;
  color: var(--ink);
}
.dropdown__panel a:hover { background: var(--cream-deep); color: var(--navy); }
.dropdown__panel a span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 0.1rem;
}
.dropdown__divider { height: 1px; background: var(--line); margin: 0.4rem 0.2rem; }

.header-actions { display: flex; align-items: center; gap: 1.1rem; flex-shrink: 0; }
.nav-cta { display: none; }
.nav .lang-switch { display: none; }

.lang-switch {
  display: flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch a {
  padding: 0.4rem 0.65rem;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.lang-switch a[aria-current="true"] { background: var(--navy); color: var(--white); }
.lang-switch a:not([aria-current="true"]):hover { background: var(--cream-deep); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.4rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------------
   6. Footer
   ------------------------------------------------------------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(248, 246, 242, 0.78);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(248, 246, 242, 0.12);
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.footer-brand img { width: 34px; height: 34px; }
.footer-brand span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
}
.footer-tagline { max-width: 320px; font-size: 0.95rem; color: rgba(248, 246, 242, 0.62); }
.footer-email {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: rgba(248, 246, 242, 0.72);
  border-bottom: 1px solid rgba(248, 246, 242, 0.28);
}
.footer-email:hover { color: var(--gold-pale); border-color: var(--gold-pale); }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-pale);
  margin-bottom: 0.9rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.6rem;
  font-size: 0.85rem;
  color: rgba(248, 246, 242, 0.5);
}
.footer-bottom a:hover { color: var(--gold-pale); }

/* -------------------------------------------------------------
   7. Responsive: tablet
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .nav__list { gap: 1.4rem; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 1.75rem; }
}

/* -------------------------------------------------------------
   8. Responsive: mobile nav
   ------------------------------------------------------------- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .header-actions .lang-switch,
  .header-actions .header-cta { display: none; }
  .nav-cta { display: block; }
  .nav .lang-switch { display: flex; }

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 0.5rem 0 1.5rem;
  }

  /* When open, the header itself expands to a full-screen panel.
     (Nav is a descendant of the sticky header, and position:sticky
     establishes a containing block for fixed children, so the panel
     is built by promoting the header — not the nav — to fixed/inset:0.) */
  body.nav-open { overflow: hidden; }
  .site-header.nav-open {
    position: fixed;
    inset: 0;
    height: 100dvh;
    overflow-y: auto;
    background: var(--cream);
    z-index: 200;
    animation: panel-in 0.22s var(--ease);
  }
  .site-header.nav-open .site-header__inner {
    height: auto;
    min-height: var(--header-h);
    flex-wrap: wrap;
    align-items: flex-start;
    padding-bottom: 1rem;
    position: relative;
  }
  .site-header.nav-open .nav { display: flex; }
  .site-header.nav-open .header-actions {
    position: absolute;
    top: calc(var(--header-h) / 2);
    right: var(--gutter);
    transform: translateY(-50%);
  }

  @keyframes panel-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav__list > li { border-bottom: 1px solid var(--line); }
  .nav__link { display: block; padding: 1.05rem 0.1rem; font-size: 1.05rem; }
  .nav__link::after { display: none; }

  .dropdown__panel {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background: var(--cream-deep);
    display: none;
    margin-bottom: 0.5rem;
  }
  .dropdown.is-open .dropdown__panel { display: block; }
  .dropdown__toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: none; text-align: left; }

  .nav-cta { margin-top: 1.5rem; }
  .nav-cta .btn { width: 100%; justify-content: center; }

  .lang-switch { margin-top: 1.25rem; align-self: flex-start; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  :root { --header-h: 72px; }
  .brand img { width: 34px; height: 34px; }
  .brand__word { font-size: 1.2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ===================================================================
   9. Homepage — Hero (text-only, no photo)
   =================================================================== */
.hero {
  padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(3.5rem, 8vw, 7rem);
}
.hero__grid {
  max-width: 800px;
  margin-inline: 0;
}
.hero__copy h1 { margin-bottom: 1.35rem; }
.hero__copy .lead { margin-bottom: 1rem; max-width: 52ch; }
.hero__scope {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-deep);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}
.hero__actions { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }

/* ===================================================================
   10. Areas of focus
   =================================================================== */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.focus-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-m);
  padding: 2.1rem 1.85rem 1.85rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.focus-card:hover { box-shadow: 0 20px 40px -20px rgba(20, 27, 46, 0.25); transform: translateY(-3px); }
.focus-card h3 { margin-bottom: 0.7rem; }
.focus-card p { color: var(--ink-soft); flex-grow: 1; margin-bottom: 1.4rem; }

.focus-additional {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 1.75rem;
  row-gap: 0.3rem;
  margin-top: 1.75rem;
  padding: 1.5rem 1.85rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-m);
  background: var(--cream-deep);
}
.focus-additional__label {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.focus-additional__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
}
.focus-additional__desc { color: var(--ink-soft); font-size: 0.92rem; }

@media (max-width: 900px) {
  .focus-grid { grid-template-columns: 1fr; }
  .focus-additional { grid-template-columns: 1fr; }
}

/* ===================================================================
   11. Teaching approach
   =================================================================== */
.approach-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.approach-grid .section-head { margin-bottom: 0; }
.approach-list { list-style: none; display: flex; flex-direction: column; gap: 1.3rem; }
.approach-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid rgba(31, 42, 68, 0.12);
}
.approach-list li:last-child { border-bottom: none; padding-bottom: 0; }
.approach-list strong { font-family: var(--font-display); font-size: 1.08rem; color: var(--navy); font-weight: 600; }
.approach-list span { color: var(--ink-soft); font-size: 0.96rem; }

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

/* ===================================================================
   12. What you gain
   =================================================================== */
.gain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.gain-card {
  text-align: left;
  padding-top: 1.4rem;
  border-top: 2px solid var(--gold-pale);
}
.gain-card h3 { font-size: 1.15rem; margin-bottom: 0.55rem; }
.gain-card p { color: var(--ink-soft); font-size: 0.95rem; }

@media (max-width: 900px) {
  .gain-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .gain-grid { grid-template-columns: 1fr; }
}

/* ===================================================================
   13. About teaser (small link, replaces the old repeated About block)
   =================================================================== */
.about-teaser {
  text-align: center;
  padding-block: 0 clamp(1.5rem, 3vw, 2.5rem);
}
.about-teaser a {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--navy);
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 0.15rem;
  transition: color 0.18s var(--ease);
}
.about-teaser a:hover { color: var(--gold-deep); }

/* ===================================================================
   14. How it works (process)
   =================================================================== */
.process-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
  counter-reset: step;
}
.process-list li { display: flex; flex-direction: column; gap: 0.9rem; }
.process-list__num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--gold-deep);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--gold-pale);
  border-radius: 50%;
}
.process-list h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.process-list p { color: var(--ink-soft); font-size: 0.94rem; }

@media (max-width: 900px) {
  .process-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .process-list { grid-template-columns: 1fr; }
}

/* ===================================================================
   15. Final CTA
   =================================================================== */
.final-cta__inner { text-align: center; max-width: 620px; margin-inline: auto; }
.final-cta__inner h2 { margin-bottom: 1rem; }
.final-cta__inner .lead { color: rgba(248, 246, 242, 0.78); margin-bottom: 2rem; }
.section--navy .lead { color: rgba(248, 246, 242, 0.78); }

/* ===================================================================
   16. Interior page hero (About / Services / Service detail / Contact)
   =================================================================== */
.page-hero {
  padding-block: clamp(2.75rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 4rem);
}
.page-hero__eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-deep);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}
.page-hero h1 { margin-bottom: 1.1rem; }
.page-hero .lead { max-width: 60ch; margin-bottom: 1.75rem; }
.page-hero--with-actions .hero__actions { margin-top: 0.25rem; }

.page-hero--split {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.page-hero--split .page-hero__media {
  max-width: 300px;
  justify-self: center;
}
.page-hero--split .page-hero__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 1217;
  object-fit: cover;
  border-radius: var(--radius-l);
  box-shadow: 0 18px 40px -20px rgba(20, 27, 46, 0.28);
}
@media (max-width: 900px) {
  .page-hero--split { grid-template-columns: 1fr; }
  .page-hero--split .page-hero__media { order: -1; max-width: 230px; margin: 0 auto; }
}

/* Breadcrumb-style small nav under header on interior pages (optional) */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 1.25rem;
}
.breadcrumb a:hover { color: var(--navy); }

/* ===================================================================
   17. About page
   =================================================================== */
.philosophy-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.philosophy-grid .lead { margin-bottom: 1.1rem; }
.philosophy-grid .lead:last-child { margin-bottom: 0; }
@media (max-width: 900px) {
  .philosophy-grid { grid-template-columns: 1fr; }
}

.credentials {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.credentials li {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line);
}
.credentials li:last-child { border-bottom: 1px solid var(--line); }
.credentials__org {
  font-size: 0.9rem;
  color: var(--ink-faint);
}
.credentials h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.credentials p { color: var(--ink-soft); font-size: 0.96rem; }
@media (max-width: 700px) {
  .credentials li { grid-template-columns: 1fr; gap: 0.4rem; }
}

.facts-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.facts-strip div { border-top: 2px solid var(--gold-pale); padding-top: 1.1rem; }
.facts-strip h3 { font-size: 0.95rem; text-transform: none; color: var(--ink-faint); font-family: var(--font-body); font-weight: 600; margin-bottom: 0.4rem; }
.facts-strip p { font-family: var(--font-display); font-size: 1.2rem; color: var(--navy); }
@media (max-width: 700px) {
  .facts-strip { grid-template-columns: 1fr; }
}

/* ===================================================================
   18. Services hub — how lessons work
   =================================================================== */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.how-card {
  padding: 1.75rem;
  background: var(--white);
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
}
.how-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.how-card p { color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 900px) {
  .how-grid { grid-template-columns: 1fr; }
}

.support-note {
  margin-top: 2rem;
  padding: 2rem clamp(1.5rem, 4vw, 2.5rem);
  background: var(--lavender);
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.support-note p { max-width: 52ch; color: var(--ink-soft); }
.support-note h3 { margin-bottom: 0.4rem; }

/* ===================================================================
   19. Service detail pages (IB / SAT / GMAT / University Entrance)
   =================================================================== */
.exam-section + .exam-section { margin-top: clamp(2.5rem, 5vw, 4rem); }

.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.75rem;
  list-style: none;
}
.skill-grid li {
  padding-block: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.97rem;
  color: var(--ink-soft);
}
.skill-grid li strong { display: block; color: var(--navy); font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; margin-bottom: 0.2rem; }
@media (max-width: 620px) {
  .skill-grid { grid-template-columns: 1fr; }
}

.check-list { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }
.check-list li {
  display: flex;
  gap: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.check-list li::before {
  content: "";
  flex-shrink: 0;
  width: 7px; height: 7px;
  margin-top: 0.55rem;
  border-radius: 50%;
  background: var(--gold);
}

.tip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.tip-card {
  padding: 1.6rem;
  border-radius: var(--radius-m);
  background: var(--cream-deep);
}
.tip-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.tip-card p { font-size: 0.92rem; color: var(--ink-soft); }
@media (max-width: 900px) {
  .tip-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .tip-grid { grid-template-columns: 1fr; }
}

.exam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.exam-meta span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--gold-pale);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

/* Cross-links to the other two primary exam pages */
.related-exams {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.related-exams a {
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.related-exams a:hover { border-color: var(--gold); transform: translateY(-2px); }
.related-exams span { display: block; }
.related-exams .related-exams__label { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 0.25rem; }
.related-exams .related-exams__name { font-family: var(--font-display); font-size: 1.1rem; color: var(--navy); }
@media (max-width: 700px) {
  .related-exams { grid-template-columns: 1fr; }
}

/* ===================================================================
   20. Contact page
   =================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.contact-card {
  padding: 2rem 1.75rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.contact-card__icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  flex-shrink: 0;
}
.contact-card__icon svg { width: 22px; height: 22px; }
.contact-card h3 { font-size: 1.1rem; }
.contact-card p { color: var(--ink-soft); font-size: 0.94rem; flex-grow: 1; }
.contact-card .btn { align-self: flex-start; }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.calendly-panel {
  margin-top: 3rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--navy);
  border-radius: var(--radius-l);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.calendly-panel h3 { color: var(--white); margin-bottom: 0.5rem; }
.calendly-panel p { color: rgba(248, 246, 242, 0.72); max-width: 46ch; }
