/* ==========================================================================
   AA KwaZulu-Natal - site stylesheet
   Palette keeps the AA South Africa blue identity, warmed with a coastal
   sand accent and set on a soft off-white ground.
   ========================================================================== */

:root {
  /* Brand */
  --blue-900: #06203f;
  --blue-800: #0a2d59;
  --blue-700: #0b3e82;
  --blue-600: #14509b;
  --blue-500: #2a68b8;
  --blue-100: #dbe7f6;
  --blue-50:  #eef4fc;

  --sand-600: #b47c1c;
  --sand-500: #d99a2b;
  --sand-400: #eab54f;
  --sand-100: #fbeed4;

  --teal-600: #0f766e;
  --teal-100: #d3ede9;

  /* Neutrals */
  --ink:      #10203a;
  --body:     #43526a;
  --muted:    #6b7a90;
  --line:     #dfe6ef;
  --line-soft:#edf1f7;
  --surface:  #ffffff;
  --ground:   #f6f8fb;

  /* Type */
  --display: "DM Serif Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Shape */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 32, 58, .06), 0 1px 3px rgba(16, 32, 58, .04);
  --shadow:    0 4px 16px rgba(16, 32, 58, .07), 0 1px 3px rgba(16, 32, 58, .05);
  --shadow-lg: 0 18px 48px rgba(10, 45, 89, .16), 0 4px 12px rgba(16, 32, 58, .07);

  --wrap: 1240px;
  --header-h: 74px;
}

/* --------------------------------------------------------------- reset -- */

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

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.22;
  letter-spacing: -.005em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(1.8rem, 1.3rem + 1.55vw, 2.55rem); }
h2 { font-size: clamp(1.42rem, 1.15rem + .95vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 1.02rem + .28vw, 1.24rem); }
h4 { font-size: 1rem; font-family: var(--sans); font-weight: 650; letter-spacing: -.005em; }

/* A card-level heading: an h3 in the document outline, sized like a label. */
.h-sm { font-size: 1rem; font-family: var(--sans); font-weight: 650; letter-spacing: -.005em; line-height: 1.35; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-700); text-decoration-color: rgba(11, 62, 130, .3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .45em; }
li:last-child { margin-bottom: 0; }

strong { color: var(--ink); font-weight: 650; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

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

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 200;
  background: var(--blue-700); color: #fff; padding: .7rem 1.1rem;
  border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

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

/* ------------------------------------------------------------- layout --- */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.wrap--narrow { max-width: 760px; }
.wrap--wide { max-width: 1420px; }

.section { padding-block: clamp(3.2rem, 7vw, 5.75rem); }
.section--tight { padding-block: clamp(2.4rem, 5vw, 3.75rem); }
.section--ground { background: var(--ground); }
.section--tint { background: linear-gradient(180deg, var(--blue-50), #fff); }

.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Two-column page sections.
   Everything top-aligns: a short block sitting beside a long one starts on the
   same line rather than floating in the middle of the taller column. One gap
   value across the whole site, so section rhythm stays even. */
.split {
  display: grid;
  gap: clamp(1.75rem, 3.5vw, 3.25rem);
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.split--sidebar { grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr); }
.split--feature { grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); }

/* The contact card follows the reader down a long page, so the helpline is
   always one glance away. Only where there is a real second column - once the
   layout stacks, the card sits after the article and sticking does nothing. */
@media (min-width: 901px) {
  .split--sidebar > aside,
  .split--feature > aside {
    position: sticky;
    top: calc(var(--header-h) + 1.25rem);
    /* Safety net if a card ever grows taller than the viewport. */
    max-height: calc(100dvh - var(--header-h) - 2.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

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

.stack > * + * { margin-top: 1.1rem; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* --------------------------------------------------------- typography --- */

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .775rem; font-weight: 680; letter-spacing: .13em; text-transform: uppercase;
  color: var(--blue-600); margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: var(--sand-500); border-radius: 2px;
}
.eyebrow--plain::before { display: none; }

.lede { font-size: clamp(1.05rem, 1rem + .35vw, 1.24rem); line-height: 1.6; color: var(--body); max-width: 62ch; }

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

.quote {
  font-family: var(--display); font-size: clamp(1.12rem, 1rem + .55vw, 1.45rem);
  line-height: 1.4; color: var(--ink); margin: 0;
}
.quote cite { display: block; margin-top: 1rem; font-family: var(--sans); font-size: .9rem; font-style: normal; color: var(--muted); letter-spacing: .02em; }

/* ------------------------------------------------------------ buttons --- */

.btn {
  --btn-bg: var(--blue-700);
  --btn-fg: #fff;
  --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .85rem 1.5rem;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1.5px solid var(--btn-bd); border-radius: var(--r-pill);
  font: inherit; font-size: .97rem; font-weight: 620; letter-spacing: .005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.05rem; }
.btn--sm { padding: .55rem 1rem; font-size: .875rem; }

.btn--sand { --btn-bg: var(--sand-400); --btn-fg: var(--blue-900); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--blue-700); --btn-bd: var(--blue-100); box-shadow: none; }
.btn--ghost:hover { --btn-bg: var(--blue-50); --btn-bd: var(--blue-500); }
.btn--onblue { --btn-bg: #fff; --btn-fg: var(--blue-800); }
.btn--onblue-ghost { --btn-bg: rgba(255,255,255,.08); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.42); box-shadow: none; }
.btn--onblue-ghost:hover { --btn-bg: rgba(255,255,255,.18); --btn-bd: rgba(255,255,255,.75); }

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn-row--center { justify-content: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 620; font-size: .95rem; text-decoration: none; color: var(--blue-700);
}
.link-arrow::after { content: "\2192"; transition: transform .18s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

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

.helpbar {
  background: var(--blue-900); color: #cddbee;
  font-size: .855rem; letter-spacing: .01em;
}
.helpbar .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .35rem 1.15rem; padding-block: .55rem; text-align: center;
}
.helpbar a { color: #fff; font-weight: 640; text-decoration: none; white-space: nowrap; }
.helpbar a:hover { text-decoration: underline; }
.helpbar .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--sand-400); flex: none; }
.helpbar__sep { color: rgba(255,255,255,.25); }

/* On phones and tablets the help bar keeps only the KZN number and WhatsApp.
   Showing all three wraps onto a second line and strands a separator. */
@media (max-width: 860px) {
  .helpbar { font-size: .8rem; }
  .helpbar .wrap { gap: .25rem .75rem; padding-block: .45rem; }
  .helpbar__sep,
  .helpbar > .wrap > span:not(.dot):not(.helpbar__sep),
  .helpbar a[href="tel:+27861435722"] { display: none; }
}

.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; margin-right: auto; }
.brand__mark { width: 44px; height: 44px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--display); font-size: 1.16rem; color: var(--blue-800); white-space: nowrap; }
.brand__sub { font-size: .68rem; font-weight: 640; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
@media (max-width: 420px) { .brand__name { font-size: 1.08rem; } .brand__mark { width: 38px; height: 38px; } }

.nav { display: flex; align-items: center; gap: .1rem; }
.nav a:not(.nav-cta) {
  padding: .6rem .72rem; border-radius: var(--r-sm);
  font-size: .93rem; font-weight: 560; color: var(--body); text-decoration: none;
  white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.nav a:not(.nav-cta):hover { background: var(--blue-50); color: var(--blue-700); }
.nav a:not(.nav-cta)[aria-current="page"] { color: var(--blue-700); font-weight: 660; background: var(--blue-50); }

.nav-cta { margin-left: .5rem; flex: none; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--ink); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

@media (max-width: 1250px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: calc(var(--header-h) + var(--helpbar-h, 0px)) 0 auto 0;
    display: none; flex-direction: column; align-items: stretch; gap: .1rem;
    padding: 1rem clamp(1.1rem, 4vw, 2rem) 1.6rem;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.nav-cta) { padding: .8rem .75rem; font-size: 1.02rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .nav-cta { margin: 1.1rem 0 0; justify-content: center; padding: .9rem 1.5rem; font-size: 1rem; }
}

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

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 520px at 78% -8%, rgba(42, 104, 184, .5), transparent 62%),
    radial-gradient(760px 420px at 8% 108%, rgba(15, 118, 110, .38), transparent 60%),
    linear-gradient(155deg, var(--blue-800) 0%, var(--blue-900) 58%, #04182f 100%);
  color: #e8f0fa;
  isolation: isolate;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 90px; z-index: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0 62c150 24 290 26 440 8 130-16 250-40 386-42 152-3 300 26 434 44 76 10 138 14 180 14v4H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(3rem, 6vw, 4.75rem) clamp(4.5rem, 8vw, 6.5rem); }

.hero__grid { display: grid; gap: clamp(1.75rem, 3.5vw, 3.25rem); align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

.hero h1 { color: #fff; margin-bottom: .6rem; font-size: clamp(1.95rem, 1.2rem + 2.5vw, 3.05rem); line-height: 1.15; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--sand-400); }
.hero__lede { font-size: clamp(1rem, .96rem + .3vw, 1.14rem); color: #c6d8ee; max-width: 46ch; margin-bottom: 1.75rem; }
.hero .eyebrow { color: var(--sand-400); }
.hero .eyebrow::before { background: var(--sand-400); }

.hero__note { margin-top: 1.15rem; font-size: .88rem; color: #9fb6d4; display: flex; align-items: center; gap: .5rem; }
.hero__note svg { width: 1.05em; height: 1.05em; flex: none; }

/* Hero call card */
.callcard {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-lg);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 60px rgba(2, 14, 30, .35);
}
.callcard__label { font-size: .78rem; font-weight: 680; letter-spacing: .14em; text-transform: uppercase; color: var(--sand-400); margin-bottom: .85rem; }
.callcard__number {
  display: block; font-family: var(--display); font-size: clamp(1.85rem, 1.3rem + 1.9vw, 2.5rem);
  color: #fff; text-decoration: none; line-height: 1.05; letter-spacing: -.02em;
}
.callcard__number:hover { color: var(--sand-400); }
.callcard__meta { font-size: .9rem; color: #b9cde6; margin-top: .5rem; }
.callcard hr { border-top: 1px solid rgba(255,255,255,.14); margin: 1.4rem 0; }
.callcard .btn-row { gap: .6rem; }

/* ---------------------------------------------------------- key cards --- */

.keycards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.keycard {
  position: relative; display: flex; flex-direction: column; gap: .65rem;
  padding: 1.65rem 1.5rem 1.5rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.keycard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--blue-100); }
.keycard__icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 13px; background: var(--blue-50); color: var(--blue-700); margin-bottom: .35rem;
}
.keycard__icon svg { width: 23px; height: 23px; }
.keycard--sand .keycard__icon { background: var(--sand-100); color: var(--sand-600); }
.keycard--teal .keycard__icon { background: var(--teal-100); color: var(--teal-600); }
.keycard h3 { margin: 0; font-size: 1.12rem; }
.keycard p { font-size: .95rem; color: var(--body); margin: 0; }
.keycard__more { margin-top: auto; padding-top: .6rem; font-weight: 620; font-size: .9rem; color: var(--blue-700); display: inline-flex; align-items: center; gap: .35rem; }
.keycard__more::after { content: "\2192"; transition: transform .18s ease; }
.keycard:hover .keycard__more::after { transform: translateX(4px); }

/* -------------------------------------------------------------- cards --- */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(1.4rem, 2.5vw, 1.9rem);
}
.card--flat { box-shadow: none; }
.card--tint { background: var(--blue-50); border-color: var(--blue-100); }
.card--sand { background: var(--sand-100); border-color: #f0dcb3; }
.card h3 { margin-top: 0; }

.fact { display: flex; gap: 1rem; align-items: flex-start; }
.grid--4 .fact { flex-direction: column; gap: .75rem; }
.fact__num {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: var(--blue-700); color: #fff;
  font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums;
}
.fact h4 { margin: .3rem 0 .35rem; }
.fact p { font-size: .96rem; margin: 0; }

.stat-row { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.stat { padding: 1.25rem 1.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.stat__n { font-family: var(--display); font-size: 1.8rem; color: var(--blue-700); line-height: 1; }
.stat__l { font-size: .88rem; color: var(--muted); margin-top: .35rem; }

/* --------------------------------------------------------- next-up ------ */

.nextup { display: grid; gap: .6rem; }
.nextup__item {
  display: grid; grid-template-columns: auto 1fr auto; gap: .5rem 1.1rem; align-items: center;
  padding: .95rem 1.15rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.nextup__item:hover { border-color: var(--blue-500); box-shadow: var(--shadow); transform: translateX(2px); }
.nextup__time {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.02rem;
  color: var(--blue-800); min-width: 4.6rem;
}
.nextup__body { min-width: 0; }
.nextup__name { font-weight: 620; color: var(--ink); font-size: 1rem; display: block; }
.nextup__where { font-size: .875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nextup__when { font-size: .8rem; font-weight: 640; color: var(--teal-600); white-space: nowrap; }
@media (max-width: 560px) {
  .nextup__item { grid-template-columns: auto 1fr; }
  .nextup__when { grid-column: 2; }
}

/* ------------------------------------------------------------ accordion - */

.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem .25rem; cursor: pointer; list-style: none;
  font-weight: 620; font-size: 1rem; color: var(--ink);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-top: .42rem;
  border-right: 2.2px solid var(--blue-600); border-bottom: 2.2px solid var(--blue-600);
  transform: rotate(45deg); transition: transform .2s ease;
}
.accordion details[open] summary { color: var(--blue-700); }
.accordion details[open] summary::after { transform: rotate(-135deg); margin-top: .75rem; }
.accordion summary:hover { color: var(--blue-700); }
.accordion__body { padding: 0 .25rem 1.5rem; max-width: 74ch; }
.accordion__body p { font-size: 1rem; }

/* ---------------------------------------------------------- page head --- */

.pagehead {
  background: linear-gradient(160deg, var(--blue-800), var(--blue-900));
  color: #dce8f6; padding-block: clamp(2.3rem, 4.5vw, 3.4rem);
}
.pagehead h1 { color: #fff; margin-bottom: .6rem; }
.pagehead .lede { color: #b9cde6; }
.pagehead .eyebrow { color: var(--sand-400); }
.pagehead .eyebrow::before { background: var(--sand-400); }

.crumbs { font-size: .85rem; color: #91abcd; margin-bottom: 1rem; }
.crumbs a { color: #cfe0f3; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { opacity: .5; margin-inline: .45rem; }

/* --------------------------------------------------------------- prose - */

.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2rem; }
.prose ul { padding-left: 1.15em; }
.prose li::marker { color: var(--blue-500); }
.prose blockquote {
  margin: 2rem 0; padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--sand-400); background: var(--blue-50);
  border-radius: 0 var(--r) var(--r) 0; color: var(--ink);
  font-family: var(--display); font-size: 1.06rem; line-height: 1.5;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 2rem; margin-bottom: .75rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .48em;
  width: 11px; height: 6px; border-left: 2.4px solid var(--teal-600); border-bottom: 2.4px solid var(--teal-600);
  transform: rotate(-45deg);
}

.crosslinks { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 3rem; }
.crosslink {
  display: block; padding: 1.25rem 1.4rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.crosslink:hover { border-color: var(--blue-500); box-shadow: var(--shadow); }
.crosslink strong { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: .25rem; }
.crosslink span { font-size: .9rem; color: var(--muted); }

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

.cta {
  background: linear-gradient(150deg, var(--blue-700), var(--blue-900));
  color: #d9e6f5; border-radius: var(--r-lg);
  padding: clamp(2rem, 4.5vw, 3.25rem);
  text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #bdd2ea; max-width: 55ch; margin-inline: auto; }
.cta .btn-row { justify-content: center; margin-top: 1.8rem; }

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

.site-footer { background: var(--blue-900); color: #a9bfdb; padding-block: clamp(2.8rem, 5vw, 4rem) 2rem; font-size: .93rem; }
.footer__head { color: #fff; font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; font-weight: 680; }
.site-footer a { color: #d6e3f2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
/* The track floors below add up to more than a small phone is wide, so the
   columns are collapsed explicitly rather than left to auto-fit. */
.footer__grid { display: grid; gap: 2.25rem; grid-template-columns: minmax(240px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr)); }

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
}
.footer__list { list-style: none; padding: 0; margin: 0; }
.footer__list li { margin-bottom: .55rem; }
.footer__brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.footer__brand .brand__name { color: #fff; }
.footer__brand .brand__sub { color: #7e9ac0; }
.footer__bottom {
  margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  font-size: .84rem; color: #8ba6c8;
}

/* ================================================== MEETINGS FINDER ====== */

.finder { background: var(--ground); }

.finder__bar {
  position: sticky; top: var(--header-h); z-index: 60;
  background: rgba(255,255,255,.95); backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.finder__bar .wrap { padding-block: .9rem; }

.searchrow { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }

@media (max-width: 720px) {
  /* The filter bar is too tall to pin on a phone - let it scroll away. */
  .finder__bar { position: static; }
  .searchrow { gap: .5rem; }
  .searchrow .search { flex: 1 1 100%; }
  .searchrow #near { flex: 1 1 100%; }
  .searchrow .selectwrap { flex: 1 1 calc(50% - .25rem); min-width: 0; }
  .searchrow .selectwrap select { width: 100%; }
  .searchrow .viewswitch { flex: 1 1 100%; }
  .searchrow .viewswitch button { flex: 1; justify-content: center; }
}

.search {
  position: relative; flex: 1 1 260px; min-width: 0;
}
.search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; padding: .8rem 2.6rem .8rem 2.85rem;
  font: inherit; font-size: .97rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-pill);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px var(--blue-50); }
.search__clear {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: none; place-items: center;
  background: var(--line-soft); border: 0; border-radius: 50%; cursor: pointer; color: var(--body);
}
.search__clear svg { position: static; transform: none; width: 13px; height: 13px; }
.search.has-value .search__clear { display: grid; }

.viewswitch { display: inline-flex; padding: 3px; background: var(--line-soft); border-radius: var(--r-pill); }
.viewswitch button {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1rem; border: 0; background: transparent; border-radius: var(--r-pill);
  font: inherit; font-size: .89rem; font-weight: 620; color: var(--body); cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.viewswitch button svg { width: 16px; height: 16px; }
.viewswitch button[aria-pressed="true"] { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }

.chiprow {
  display: flex; gap: .5rem; align-items: center; overflow-x: auto;
  margin-top: .75rem; padding-bottom: .2rem; scrollbar-width: thin;
}
.chiprow::-webkit-scrollbar { height: 5px; }
.chiprow::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.chip {
  flex: none; display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .95rem; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--r-pill); font: inherit; font-size: .875rem; font-weight: 580;
  color: var(--body); cursor: pointer; white-space: nowrap;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--blue-500); color: var(--blue-700); }
.chip[aria-pressed="true"] { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.chip--now { color: var(--teal-600); border-color: var(--teal-100); background: var(--teal-100); }
.chip--now[aria-pressed="true"] { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }
.chip svg { width: 14px; height: 14px; }
.chip__count { font-size: .78rem; opacity: .65; font-variant-numeric: tabular-nums; }

.chiprow__label {
  flex: none; font-size: .78rem; font-weight: 680; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); padding-right: .3rem;
}

.selectwrap { position: relative; flex: none; }
.selectwrap select {
  appearance: none; padding: .5rem 2.2rem .5rem .95rem;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-pill);
  font: inherit; font-size: .875rem; font-weight: 580; color: var(--body); cursor: pointer;
}
.selectwrap select:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px var(--blue-50); }
.selectwrap::after {
  content: ""; position: absolute; right: .95rem; top: 50%; width: 7px; height: 7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.selectwrap select.is-set { border-color: var(--blue-700); color: var(--blue-700); background: var(--blue-50); }

.finder__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  margin-top: .8rem; font-size: .875rem; color: var(--muted);
}
.finder__count strong { color: var(--ink); }
.reset {
  background: none; border: 0; padding: 0; font: inherit; font-size: .875rem;
  color: var(--blue-700); font-weight: 600; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}

/* Split layout */
.finder__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 0; align-items: start; }
@media (max-width: 1024px) { .finder__body { grid-template-columns: 1fr; } }

.finder__list {
  padding: 1.5rem clamp(1.1rem, 3vw, 2rem) 3rem;
  max-height: calc(100dvh - var(--header-h) - 120px);
  overflow-y: auto; scroll-behavior: smooth;
}
.finder__mapwrap {
  position: sticky; top: calc(var(--header-h) + 118px);
  height: calc(100dvh - var(--header-h) - 118px);
  border-left: 1px solid var(--line); background: #e8eef4;
}
@media (max-width: 1024px) {
  .finder__list { max-height: none; overflow: visible; }
  .finder__mapwrap { position: relative; top: 0; height: 62vh; min-height: 380px; border-left: 0; border-top: 1px solid var(--line); }
  .finder[data-view="list"] .finder__mapwrap { display: none; }
  .finder[data-view="map"] .finder__list { display: none; }
}
@media (min-width: 1025px) { .viewswitch { display: none; } }

#map { width: 100%; height: 100%; }

.daygroup + .daygroup { margin-top: 2rem; }
.daygroup__head {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: baseline; gap: .7rem;
  padding: .5rem 0 .6rem; margin-bottom: .75rem;
  background: linear-gradient(180deg, var(--ground) 72%, transparent);
  font-family: var(--display); font-size: 1.12rem; color: var(--ink);
}
.daygroup__head span { font-family: var(--sans); font-size: .82rem; font-weight: 600; color: var(--muted); }

.mcard {
  display: block; width: 100%; text-align: left;
  padding: 1rem 1.15rem; margin-bottom: .6rem;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r);
  font: inherit; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.mcard:hover { border-color: var(--blue-500); box-shadow: var(--shadow); transform: translateY(-1px); }
.mcard.is-active { border-color: var(--blue-700); box-shadow: 0 0 0 3px var(--blue-50); }
.mcard__top { display: flex; align-items: baseline; gap: .75rem; margin-bottom: .3rem; }
.mcard__time {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1rem; color: var(--blue-800);
  flex: none; min-width: 4.5rem;
}
.mcard__name { font-weight: 620; font-size: 1.02rem; color: var(--ink); line-height: 1.3; }
.mcard__where {
  display: flex; align-items: flex-start; gap: .4rem;
  font-size: .89rem; color: var(--muted); margin-left: 5.25rem;
}
.mcard__where svg { width: 14px; height: 14px; margin-top: .22em; flex: none; }
@media (max-width: 480px) {
  .mcard__top { flex-wrap: wrap; gap: .15rem .75rem; }
  .mcard__where { margin-left: 0; }
}
.mcard__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .55rem 0 0 5.25rem; }
@media (max-width: 480px) { .mcard__tags { margin-left: 0; } }

.tag {
  display: inline-flex; align-items: center; gap: .28rem;
  padding: .18rem .55rem; border-radius: var(--r-pill);
  font-size: .74rem; font-weight: 640; letter-spacing: .01em;
  background: var(--line-soft); color: var(--body);
}
.tag--open { background: var(--teal-100); color: var(--teal-600); }
.tag--closed { background: var(--blue-50); color: var(--blue-700); }
.tag--online { background: #ece5fb; color: #5b3fbe; }
.tag--live { background: var(--teal-600); color: #fff; }
.tag--soon { background: var(--sand-100); color: var(--sand-600); }
.tag--warn { background: #fde8e8; color: #a02525; }
.tag--dist { background: var(--sand-100); color: var(--sand-600); }

.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); }

.loading { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.spinner {
  width: 28px; height: 28px; margin: 0 auto 1rem;
  border: 3px solid var(--line); border-top-color: var(--blue-600);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Meeting detail dialog */
.sheet {
  width: min(560px, 100%); max-height: 88dvh; padding: 0;
  border: 0; border-radius: var(--r-lg); background: #fff;
  box-shadow: var(--shadow-lg); color: var(--body); overflow: hidden;
}
.sheet::backdrop { background: rgba(6, 32, 63, .55); backdrop-filter: blur(3px); }
.sheet__head {
  padding: 1.6rem 1.75rem 1.25rem; background: linear-gradient(150deg, var(--blue-700), var(--blue-900)); color: #d7e5f5;
  position: relative;
}
.sheet__head h2 { color: #fff; font-size: 1.32rem; margin: 0 2.5rem .35rem 0; }
.sheet__when { font-weight: 620; color: var(--sand-400); font-size: .98rem; }
.sheet__close {
  position: absolute; top: 1.15rem; right: 1.15rem;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: rgba(255,255,255,.12); border: 0; border-radius: 50%;
  color: #fff; cursor: pointer;
}
.sheet__close:hover { background: rgba(255,255,255,.24); }
.sheet__close svg { width: 15px; height: 15px; }
.sheet__body { padding: 1.5rem 1.75rem 1.75rem; overflow-y: auto; max-height: calc(88dvh - 130px); }
.sheet__row { display: flex; gap: .85rem; padding: .8rem 0; border-bottom: 1px solid var(--line-soft); }
.sheet__row:last-of-type { border-bottom: 0; }
.sheet__row svg { width: 18px; height: 18px; flex: none; color: var(--blue-600); margin-top: .15rem; }
.sheet__row dt { font-size: .78rem; font-weight: 680; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.sheet__row dd { margin: 0; color: var(--ink); font-size: .98rem; }
.sheet__notes { white-space: pre-line; }
.sheet .btn-row { margin-top: 1.4rem; }
.sheet dl { margin: 0; }

/* Leaflet tweaks */
.leaflet-container { font: inherit; }
.leaflet-popup-content-wrapper { border-radius: var(--r); box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: .9rem 1.1rem; font-size: .92rem; line-height: 1.5; }
.leaflet-popup-content b { color: var(--ink); font-size: 1rem; }
.leaflet-popup-content .pop-when { color: var(--blue-700); font-weight: 620; }
.leaflet-popup-content button {
  margin-top: .6rem; padding: .4rem .85rem; background: var(--blue-700); color: #fff;
  border: 0; border-radius: var(--r-pill); font: inherit; font-size: .82rem; font-weight: 620; cursor: pointer;
}
.marker-pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  background: var(--blue-700); transform: rotate(-45deg);
  border: 2.5px solid #fff; box-shadow: 0 3px 8px rgba(6, 32, 63, .35);
  display: grid; place-items: center;
}
.marker-pin span {
  transform: rotate(45deg); color: #fff; font-size: .68rem; font-weight: 700;
  font-family: var(--sans); line-height: 1;
}
.marker-pin.is-live { background: var(--teal-600); }
.marker-pin.is-active { background: var(--sand-500); transform: rotate(-45deg) scale(1.18); z-index: 500; }
.cluster {
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(11, 62, 130, .88); color: #fff; font-weight: 700; font-size: .85rem;
  border: 3px solid rgba(255,255,255,.85); box-shadow: 0 3px 10px rgba(6,32,63,.3);
}

/* ------------------------------------------------------------ self test - */

.quiz { max-width: 720px; }
.quiz__q {
  display: flex; align-items: flex-start; gap: 1rem; justify-content: space-between;
  padding: 1.15rem 0; border-bottom: 1px solid var(--line);
}
.quiz__q p { margin: 0; font-size: 1.02rem; color: var(--ink); flex: 1; }
.quiz__q .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; min-width: 1.8rem; }
.quiz__opts { display: inline-flex; padding: 3px; background: var(--line-soft); border-radius: var(--r-pill); flex: none; }
.quiz__opts label {
  padding: .38rem .95rem; border-radius: var(--r-pill); font-size: .85rem; font-weight: 620;
  color: var(--body); cursor: pointer; transition: background .14s ease, color .14s ease;
}
.quiz__opts input { position: absolute; opacity: 0; pointer-events: none; }
.quiz__opts input:checked + span { }
.quiz__opts label:has(input:checked) { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }
.quiz__opts label:has(input[value="yes"]:checked) { background: var(--blue-700); color: #fff; }
.quiz__result { margin-top: 2rem; padding: 1.6rem 1.75rem; border-radius: var(--r-lg); background: var(--blue-50); border: 1px solid var(--blue-100); }
.quiz__result h3 { margin-top: 0; }

/* --------------------------------------------------------- utilities ---- */

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.25rem; }
.mb-0 { margin-bottom: 0; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }

/* ==================================================== touch refinements ===
   Small-screen adjustments that are about the hand rather than the layout:
   comfortable tap targets, and controls that stop competing for width.
   ========================================================================= */

@media (max-width: 560px) {
  /* The question was being squeezed into a narrow ribbon beside the Yes/No
     control. Give it the full width and put the answer buttons underneath,
     stretched, so they are easy to hit. */
  .quiz__q { flex-wrap: wrap; gap: .35rem 1rem; padding: 1.05rem 0; }
  .quiz__q p { flex: 1 1 calc(100% - 2.9rem); }
  .quiz__opts { display: flex; flex: 1 1 100%; margin-top: .55rem; }
  .quiz__opts label { flex: 1; text-align: center; padding: .6rem 1rem; }
}

@media (max-width: 900px) {
  /* Standalone links need a tappable box. Links sitting inside a sentence are
     deliberately left alone - padding them would break the line. */
  .footer__list a,
  .helpbar a,
  .crumbs a,
  .keycard__more,
  a[href^="tel:"],
  a[href^="mailto:"] {
    display: inline-block;
    padding-block: .3rem;
  }

  .footer__list li { margin-bottom: .1rem; }

  /* Open / Closed / Online carry real meaning - keep them readable. */
  .tag { font-size: .8rem; padding: .22rem .6rem; }
}
