@charset "utf-8";
/* ==========================================================================
   Birsa Public School — design system
   Style      : restrained claymorphism (soft dual shadows, 16–20px radii)
   Palette    : light green institutional  (primary #8a5f0a / accent #0e6b7a)
   Typography : Crimson Pro (display) + Atkinson Hyperlegible (UI & body)
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root {
  /* brand ramp */
  --green-900: #3d2a04;
  --green-800: #6b4a08;
  --green-700: #8a5f0a;
  --green-600: #a8760d;
  --green-500: #c89116;
  --green-300: #f2d98b;
  --green-200: #f7e7b4;
  --green-100: #fbeecb;
  --green-50:  #fdf7e6;

  /* semantic */
  --bg:            #fefaec;
  --bg-alt:        #fbf2dc;
  --surface:       #ffffff;
  --surface-sunk:  #fdf7e6;
  --fg:            #2b2311;
  --fg-muted:      #5c5238;
  --fg-faint:      #7d7050;
  --brand:         var(--green-700);
  --brand-dark:    var(--green-800);
  --brand-darker:  var(--green-900);
  --on-brand:      #ffffff;
  --accent:        #0e6b7a;   /* teal fills; white-on-accent = 7.3:1 */
  --accent-text:   #0b5764;   /* accent text on light surfaces */
  --accent-bright: #f5c518;   /* decorative + text on DARK only */
  --border:        #eddfba;
  --border-strong: #dcc78a;
  --ring:          #6b4a08;
  --danger:        #b3261e;
  --danger-bg:     #fdeceb;
  --info-bg:       #eaf3fb;

  /* spacing — standard density */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
  --space-5: 24px;  --space-6: 32px;  --space-7: 48px;  --space-8: 64px;
  --space-9: 96px;

  /* radii */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-2xl: 28px;
  --r-pill: 999px;

  /* elevation — soft, double-layered (clay) */
  --shadow-sm:  0 1px 2px rgba(61,42,4,.06),  0 2px 8px rgba(61,42,4,.05);
  --shadow-md:  0 2px 4px rgba(61,42,4,.06),  0 10px 24px rgba(61,42,4,.08);
  --shadow-lg:  0 4px 8px rgba(61,42,4,.07),  0 20px 48px rgba(61,42,4,.12);
  --shadow-clay: inset 0 -3px 0 rgba(61,42,4,.07), 0 10px 22px rgba(61,42,4,.10);

  /* type */
  --font-display: "Crimson Pro", "Noto Sans Devanagari", Georgia,
                  "Times New Roman", serif;
  --font-ui: "Atkinson Hyperlegible", "Noto Sans Devanagari", "Segoe UI",
             system-ui, -apple-system, sans-serif;
  /* Text-size control. Every step in the type scale is in rem, so scaling
     the root font-size scales the whole page in proportion. */
  --font-scale: 1;
  --step--1: 0.875rem;
  --step-0:  1rem;
  --step-1:  1.125rem;
  --step-2:  clamp(1.25rem, 1.15rem + .4vw, 1.4rem);
  --step-3:  clamp(1.5rem, 1.3rem + .9vw, 1.9rem);
  --step-4:  clamp(1.85rem, 1.5rem + 1.6vw, 2.6rem);
  --step-5:  clamp(2.2rem, 1.6rem + 2.8vw, 3.6rem);

  /* motion */
  --dur-fast: 140ms;
  --dur: 220ms;
  --dur-slow: 380ms;
  --ease: cubic-bezier(.2, .7, .3, 1);

  --wrap: 1240px;
  --header-h: 64px;

  /* How far the quick-access cards ride up into the hero. Everything
     inside the hero must clear this band, so caption padding and the
     carousel controls are derived from it - never hard-code them. */
  --hero-overlap: 48px;
}

/* ------------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-size: calc(100% * var(--font-scale, 1));
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p  { margin: 0 0 var(--space-4); text-wrap: pretty; }
a  { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-600); }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25em; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-6) 0; }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: var(--space-3); top: -80px; z-index: 200;
  background: var(--brand-dark); color: #fff; padding: 12px 20px;
  border-radius: 0 0 var(--r-md) var(--r-md); font-weight: 700;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ------------------------------------------------------------------ layout */
.wrap { width: min(100% - 2 * var(--space-4), var(--wrap)); margin-inline: auto; }
.section { padding: var(--space-8) 0; }
.section--tight { padding: var(--space-7) 0; }
.section--alt { background: var(--bg-alt); }
.section--brand { background: var(--brand-darker); color: #fbf1da; }
.section--brand h2, .section--brand h3 { color: #fff; }

.section-head { max-width: 62ch; margin: 0 auto var(--space-6); text-align: center; }
.section-head--left { margin-inline: 0; text-align: left; }
.section-head p { color: var(--fg-muted); margin-bottom: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--step--1); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: var(--space-2);
}
.eyebrow::before {
  content: ""; width: 26px; height: 3px; border-radius: 2px;
  background: var(--accent-bright);
}
.section-head--left .eyebrow { justify-content: flex-start; }

.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  min-height: 44px; padding: 10px 22px;
  border: 2px solid transparent; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--step-0); line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow-clay); }
.btn--primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: var(--shadow-clay); }
.btn--accent:hover { background: #0a4f5b; color: #fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; border-color: var(--brand); color: var(--brand-dark); }
.btn--ghost:hover { background: var(--green-100); color: var(--brand-darker); }
.btn--light { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-sm); }
.btn--light:hover { background: var(--green-50); color: var(--brand-darker); transform: translateY(-2px); }
.btn--sm { min-height: 44px; padding: 8px 18px; font-size: var(--step--1); }
.btn--block { width: 100%; }
.masthead-aside .btn { white-space: nowrap; flex: none; }

/* ------------------------------------------------------------------- cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--green-300); }
.card > :last-child { margin-bottom: 0; }

.icon-badge {
  width: 56px; height: 56px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: var(--green-100); color: var(--brand-dark);
  box-shadow: inset 0 -3px 0 rgba(61,42,4,.07);
  margin-bottom: var(--space-4);
}
.icon-badge svg { width: 28px; height: 28px; }
.icon-badge--accent { background: #d6eff4; color: #0a4a55; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--green-100); color: var(--brand-darker);
  font-size: var(--step--1); font-weight: 700; white-space: nowrap;
}
.chip--accent { background: #d6eff4; color: #0a4a55; }
.chip--new { background: var(--danger-bg); color: #8c1d18; }

/* ------------------------------------------------------------- utility bar */
.topbar {
  background: var(--brand-darker); color: #f4e6c4;
  font-size: var(--step--1);
}
.topbar .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-2) var(--space-5); padding: 6px 0; min-height: 40px;
}
.topbar a {
  color: #f4e6c4; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 2px 0;
}
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar svg { width: 15px; height: 15px; flex: none; }
.topbar-spacer { margin-left: auto; }
.topbar .social { display: flex; gap: var(--space-1); }
.topbar .social a {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.1);
}
.topbar .social a:hover { background: var(--accent-bright); color: var(--brand-darker); }
.topbar .pill {
  border: 1px solid rgba(255,255,255,.3); border-radius: var(--r-pill);
  padding: 4px 14px; min-height: 32px;
}
.topbar .pill:hover { background: rgba(255,255,255,.14); text-decoration: none; }

/* --------------------------------------------------------------- masthead */
.masthead { background: var(--surface); border-bottom: 1px solid var(--border); }
.masthead .wrap {
  display: flex; align-items: center; gap: var(--space-5);
  padding: var(--space-4) 0;
}
.brand {
  display: flex; align-items: center; gap: var(--space-3);
  text-decoration: none; color: inherit; min-width: 0;   /* may shrink */
}
.brand img { width: 66px; height: 66px; flex: none; }
.brand-text strong {
  display: block; font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1.1vw, 1.85rem);
  line-height: 1.1; color: var(--brand-darker); letter-spacing: -.01em;
}
.brand-text span { font-size: var(--step--1); color: var(--fg-muted); }
.brand-text .brand-addr {
  display: block; max-width: 46ch; line-height: 1.35;
  font-size: 13px;            /* the full address is long - keep it compact */
}
.masthead-aside {
  margin-left: auto; display: flex; align-items: center; gap: var(--space-5);
  flex: none;                      /* never squeezed by the brand block */
}
.masthead-facts { display: flex; gap: var(--space-5); flex: none; }
.masthead-facts div { text-align: right; }
.masthead-facts dt {
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--fg-faint); white-space: nowrap;
}
.masthead-facts dd {
  margin: 0; font-weight: 700; color: var(--brand-dark);
  white-space: nowrap;             /* "+91 73689 62984" must not break */
}

/* ------------------------------------------------------------------- nav */
.navbar {
  background: var(--brand-dark); color: #fff;
  position: sticky; top: 0; z-index: 90;
  box-shadow: 0 2px 12px rgba(61,42,4,.18);
}
.navbar .wrap { display: flex; align-items: center; gap: var(--space-2); }
.nav-toggle {
  display: none; align-items: center; gap: 8px;
  background: transparent; border: 0; color: #fff; cursor: pointer;
  min-height: 48px; padding: 0 var(--space-2); font-weight: 700;
}
.nav-toggle svg { width: 24px; height: 24px; }

.nav-list { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; padding: 0 14px;
  color: #fbf1da; text-decoration: none;
  font-size: var(--step--1); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: transparent; border: 0; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.nav-link:hover, .nav-item.is-open > .nav-link { background: var(--green-700); color: #fff; }
.nav-link[aria-current="page"] { background: var(--brand-darker); color: #fff; box-shadow: inset 0 -3px 0 var(--accent-bright); }
.nav-link .caret { width: 12px; height: 12px; transition: transform var(--dur) var(--ease); }
.nav-item.is-open > .nav-link .caret { transform: rotate(180deg); }

.mega {
  position: absolute; top: 100%; left: 0; z-index: 95;
  min-width: 280px; max-width: min(94vw, 720px);
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--border); border-top: 4px solid var(--accent-bright);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  display: none;
}
.mega[data-cols="2"] { min-width: 520px; }
.nav-item.is-open > .mega { display: block; }
.nav-item:last-child .mega, .nav-item:nth-last-child(2) .mega { left: auto; right: 0; }
.mega ul { list-style: none; margin: 0; padding: 0; columns: 1; }
.mega[data-cols="2"] ul { columns: 2; column-gap: var(--space-5); }
.mega a {
  display: block; padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--fg); text-decoration: none; font-size: var(--step--1);
  break-inside: avoid;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.mega a:hover { background: var(--green-100); color: var(--brand-darker); }

.nav-cta { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); padding: 6px 0; }
/* The nav bar is dark, so the ghost button cannot use its default dark ink:
   it rendered invisible until hover. Light it up inside the nav only -
   in the mobile drawer the panel is white and the default is correct. */
@media (min-width: 1101px) {
  .nav-cta .btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
  .nav-cta .btn--ghost:hover {
    background: rgba(255,255,255,.16); border-color: #fff; color: #fff;
  }
}
.nav-cta .btn { min-height: 40px; }

/* mobile drawer */
/* Lives inside .navbar on purpose: .navbar is sticky + z-indexed, so it forms a
   stacking context. A backdrop outside it would paint over the drawer no matter how
   high the drawer's z-index went, swallowing every tap. Keep these two together. */
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(61,42,4,.5);
  opacity: 0; visibility: hidden; z-index: 98;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

@media (max-width: 1320px) { .masthead-facts { display: none; } }

/* Phones: the masthead is a single row of crest + name + Admissions button,
   and .masthead-aside never shrinks, so every pixel the button needs was
   taken out of the brand block - squeezing "Birsa Public School" into three
   lines and the address into eight. Stack it instead, and drop the address:
   it is still in the footer and on the contact page. */
@media (max-width: 760px) {
  .masthead .wrap { flex-wrap: wrap; gap: var(--space-3); }
  .brand { flex: 1 1 100%; }
  .brand-text .brand-addr { display: none; }
  .masthead-aside { margin-left: 0; flex: 1 1 100%; }
  /* full width on a phone, but capped so it does not stretch to 700px
     on a small tablet */
  .masthead-aside .btn { width: 100%; max-width: 24rem; justify-content: center; }
}

@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .navbar .wrap { flex-wrap: wrap; }
  .nav-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 380px);
    background: var(--surface); color: var(--fg); z-index: 99;
    transform: translateX(100%); transition: transform var(--dur-slow) var(--ease);
    overflow-y: auto; overscroll-behavior: contain;
    box-shadow: var(--shadow-lg); padding: var(--space-4);
    display: flex; flex-direction: column; gap: var(--space-3);
  }
  body.nav-open .nav-panel { transform: translateX(0); }
  .nav-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: var(--space-3); border-bottom: 1px solid var(--border);
  }
  .nav-close {
    width: 44px; height: 44px; display: grid; place-items: center;
    border: 1px solid var(--border); border-radius: var(--r-md);
    background: var(--surface); cursor: pointer;
  }
  .nav-close svg { width: 22px; height: 22px; }
  .nav-list { flex-direction: column; width: 100%; }
  .nav-item { border-bottom: 1px solid var(--border); }
  .nav-link {
    width: 100%; justify-content: space-between; color: var(--fg);
    min-height: 52px; padding: 0 var(--space-2); text-transform: none;
    font-size: var(--step-0); letter-spacing: 0;
  }
  .nav-link:hover, .nav-item.is-open > .nav-link { background: var(--green-100); color: var(--brand-darker); }
  .nav-link[aria-current="page"] { background: var(--green-100); color: var(--brand-darker); box-shadow: inset 3px 0 0 var(--accent); }
  .mega {
    position: static; display: none; min-width: 0 !important; max-width: none;
    border: 0; border-left: 3px solid var(--green-300); border-radius: 0;
    box-shadow: none; padding: var(--space-2) 0 var(--space-3) var(--space-3);
    margin-bottom: var(--space-2);
  }
  .mega[data-cols="2"] ul { columns: 1; }
  .nav-cta { margin: 0; width: 100%; flex-direction: column; align-items: stretch; }
  .nav-cta .btn { width: 100%; }
}
@media (min-width: 1101px) { .nav-panel-head { display: none; } }

/* ------------------------------------------------------------------- hero */
.hero { position: relative; background: var(--brand-darker); }
.hero-viewport { position: relative; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity var(--dur-slow) var(--ease), visibility var(--dur-slow) var(--ease);
}
.hero-slide.is-active { position: relative; opacity: 1; visibility: visible; }
.hero-slide img { width: 100%; height: clamp(320px, 52vh, 560px); object-fit: cover; }
/* A finished banner carries its own text, so it must never be cropped:
   contain it and letterbox against the banner's own ground colour. */
.hero-slide--banner img { object-fit: contain; background: var(--banner-bg, #14274E); }
.hero-slide--banner { background: var(--banner-bg, #14274E); }
.hero-slide--banner .hero-caption { display: none; }
.hero-caption {
  position: absolute; inset-inline: 0; bottom: 0;
  background: linear-gradient(to top, rgba(61,42,4,.94) 12%, rgba(61,42,4,.72) 55%, rgba(61,42,4,0));
  padding: var(--space-8) 0 calc(var(--hero-overlap) + var(--space-5));
  color: #fff;
}
.hero-caption .wrap { max-width: min(100% - 2 * var(--space-4), 860px); margin-inline: auto; }
.hero-caption .chip { background: var(--accent-bright); color: #3d2a04; }
.hero-caption h2 {
  color: #fff; font-size: var(--step-4); margin: var(--space-3) 0 var(--space-2);
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.hero-caption p { color: #f6ecd4; max-width: 62ch; margin-bottom: var(--space-4); }
.hero-controls {
  position: absolute; right: var(--space-4);
  bottom: calc(var(--hero-overlap) + var(--space-5));
  display: flex; align-items: center; gap: var(--space-2); z-index: 3;
}
.hero-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.55);
  background: rgba(61,42,4,.55); color: #fff; cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.hero-btn:hover { background: var(--brand); transform: scale(1.06); }
.hero-btn svg { width: 20px; height: 20px; }
.hero-dots { display: flex; gap: var(--space-2); align-items: center; }
.hero-dot {
  width: 44px; height: 44px; padding: 0; border: 0; background: transparent;
  cursor: pointer; display: grid; place-items: center;
}
.hero-dot::after {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.55); transition: all var(--dur) var(--ease);
}
.hero-dot[aria-selected="true"]::after { background: var(--accent-bright); width: 30px; border-radius: var(--r-pill); }

/* --------------------------------------------------------- quick-access */
.quick { margin-top: calc(-1 * var(--hero-overlap)); position: relative; z-index: 5; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); }
.quick-card {
  display: flex; gap: var(--space-3); align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--space-4);
  box-shadow: var(--shadow-md); text-decoration: none; color: inherit;
  border-top: 4px solid var(--brand);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.quick-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); color: inherit; }
.quick-card:nth-child(2) { border-top-color: var(--accent); }
.quick-card:nth-child(3) { border-top-color: var(--green-500); }
.quick-card:nth-child(4) { border-top-color: #6b4a08; }
.quick-card .icon-badge { width: 46px; height: 46px; margin: 0; border-radius: var(--r-md); }
.quick-card .icon-badge svg { width: 24px; height: 24px; }
.quick-card strong { display: block; font-size: var(--step-1); color: var(--brand-darker); font-family: var(--font-display); }
.quick-card span { font-size: var(--step--1); color: var(--fg-muted); }

/* --------------------------------------------------------- notice board */
.board { display: grid; grid-template-columns: 1fr; gap: var(--space-5); }
@media (min-width: 900px) { .board { grid-template-columns: 1.05fr .95fr; } }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-sm); overflow: hidden;
  display: flex; flex-direction: column;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--brand-dark); color: #fff;
}
.panel-head h2, .panel-head h3 { margin: 0; color: #fff; font-size: var(--step-2); }
.panel-head a {
  color: #f0e0bb; font-size: var(--step--1); font-weight: 700; text-decoration: none;
  white-space: nowrap; display: inline-flex; align-items: center; min-height: 40px;
}
.panel-head a:hover { color: #fff; text-decoration: underline; }
.panel-body { padding: var(--space-4) var(--space-5); }

.ticker { max-height: 360px; overflow: hidden; position: relative; }
.ticker-track { will-change: transform; }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-list li { border-bottom: 1px dashed var(--border); }
.notice-list li:last-child { border-bottom: 0; }
.notice-list a {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-3) var(--space-5); text-decoration: none; color: inherit;
  transition: background var(--dur-fast) var(--ease);
}
.notice-list a:hover { background: var(--green-50); }
.notice-date {
  flex: none; width: 54px; text-align: center; border-radius: var(--r-md);
  background: var(--green-100); color: var(--brand-darker); padding: 6px 2px; line-height: 1.1;
}
.notice-date b { display: block; font-size: var(--step-1); font-family: var(--font-display); }
.notice-date span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.notice-text { font-size: var(--step--1); }
.notice-text strong { display: block; font-weight: 700; color: var(--brand-darker); margin-bottom: 2px; }
.notice-text em { font-style: normal; color: var(--fg-muted); }

/* ------------------------------------------------------- message / about */
.media {
  display: grid; gap: var(--space-6); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .media { grid-template-columns: 1fr 1fr; }
  .media--narrow-img { grid-template-columns: 340px 1fr; }
  .media--reverse .media-figure { order: 2; }
}
.media-figure { position: relative; }
.media-figure img {
  width: 100%; border-radius: var(--r-2xl); box-shadow: var(--shadow-lg);
  border: 6px solid var(--surface);
}
.media-figure figcaption {
  margin-top: var(--space-3); font-size: var(--step--1); color: var(--fg-muted); text-align: center;
}
.media-figure .stamp {
  position: absolute; right: -12px; bottom: -18px;
  background: var(--accent); color: #fff; border-radius: var(--r-lg);
  padding: var(--space-3) var(--space-4); box-shadow: var(--shadow-md);
  font-weight: 700; line-height: 1.15; text-align: center; max-width: 170px;
}
.media-figure .stamp b { display: block; font-size: var(--step-3); font-family: var(--font-display); }

.quote {
  border-left: 5px solid var(--green-300); padding-left: var(--space-4);
  font-family: var(--font-display); font-size: var(--step-2);
  line-height: 1.5; color: var(--brand-darker); margin: 0 0 var(--space-4);
}
.signature { font-family: var(--font-display); font-size: var(--step-2); color: var(--brand-dark); margin: 0; }
.signature + span { color: var(--fg-muted); font-size: var(--step--1); }

/* ------------------------------------------------------------------ stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4); }
.stat {
  text-align: center; padding: var(--space-5) var(--space-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-clay);
}
.section--brand .stat { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); box-shadow: none; }
.stat b {
  display: block; font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  line-height: 1; color: var(--brand-dark);
}
.section--brand .stat b { color: var(--accent-bright); }
.stat span { font-size: var(--step--1); color: var(--fg-muted); }
.section--brand .stat span { color: #eddfb8; }

/* -------------------------------------------------------------- features */
.feature { text-align: left; height: 100%; }
.feature h3 { color: var(--brand-darker); }
.feature p { color: var(--fg-muted); font-size: var(--step--1); margin-bottom: 0; }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-bottom: var(--space-5); }
.tab {
  min-height: 44px; padding: 10px 22px; border-radius: var(--r-pill);
  border: 2px solid var(--border-strong); background: var(--surface);
  color: var(--brand-dark); font-weight: 700; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.tab:hover { background: var(--green-100); }
.tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-clay); }
.tabpanel[hidden] { display: none; }

/* ------------------------------------------------------------- news card */
.newscard { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.newscard img { width: 100%; aspect-ratio: 9 / 6; object-fit: cover; }
.newscard-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.newscard h3 { font-size: var(--step-1); margin: 0; }
.newscard h3 a { text-decoration: none; color: var(--brand-darker); }
.newscard h3 a:hover { color: var(--brand); text-decoration: underline; }
.newscard time { font-size: var(--step--1); color: var(--fg-faint); }
.newscard p { font-size: var(--step--1); color: var(--fg-muted); margin: 0; }

/* --------------------------------------------------------------- toppers */
.topper {
  text-align: center; padding: var(--space-5) var(--space-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.topper:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.topper img {
  width: 104px; height: 104px; border-radius: 50%; margin: 0 auto var(--space-3);
  border: 4px solid var(--green-200); background: var(--green-50);
}
.topper strong { display: block; font-family: var(--font-display); font-size: var(--step-2); color: var(--brand-darker); }
.topper .score {
  display: inline-block; margin-top: var(--space-2); padding: 4px 14px;
  border-radius: var(--r-pill); background: var(--accent); color: #fff; font-weight: 700;
}
.topper span.stream { display: block; font-size: var(--step--1); color: var(--fg-muted); }

/* --------------------------------------------------------------- gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-4); }
.gallery-item {
  position: relative; display: block; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--r-lg); overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-sm); text-align: left;
}
.gallery-item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute; inset-inline: 0; bottom: 0;
  background: linear-gradient(to top, rgba(61,42,4,.92), rgba(61,42,4,0));
  color: #fff; padding: var(--space-5) var(--space-3) var(--space-3);
  font-size: var(--step--1); font-weight: 700;
}
.gallery-item::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 0 var(--accent-bright);
  transition: box-shadow var(--dur) var(--ease); pointer-events: none;
}
.gallery-item:hover::after { box-shadow: inset 0 0 0 4px var(--accent-bright); }

.lightbox {
  position: fixed; inset: 0; z-index: 120; display: none;
  background: rgba(32,22,4,.94); padding: var(--space-5);
  place-items: center;
}
.lightbox.is-open { display: grid; }
.lightbox-inner { max-width: 1000px; width: 100%; text-align: center; }
.lightbox img {
  width: 100%; max-height: 74vh; object-fit: contain;
  border-radius: var(--r-lg); background: var(--surface);
}
.lightbox-cap { color: #fbf1da; margin-top: var(--space-3); font-weight: 700; }
.lightbox-count { color: #c9b384; font-size: var(--step--1); }
.lightbox-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.4);
  color: #fff; cursor: pointer; display: grid; place-items: center;
}
.lightbox-btn:hover { background: var(--brand); }
.lightbox-btn svg { width: 24px; height: 24px; }
.lightbox-prev { left: var(--space-4); }
.lightbox-next { right: var(--space-4); }
.lightbox-close { position: absolute; top: var(--space-4); right: var(--space-4); transform: none; }

/* ---------------------------------------------------------- testimonials */
.testimonial { display: flex; flex-direction: column; gap: var(--space-3); height: 100%; }
.testimonial p { font-size: var(--step-0); color: var(--fg); margin: 0; flex: 1; }
.testimonial .who { display: flex; align-items: center; gap: var(--space-3); }
.testimonial img { width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--green-200); }
.testimonial strong { display: block; color: var(--brand-darker); }
.testimonial span { font-size: var(--step--1); color: var(--fg-muted); }
.stars { color: var(--accent-bright); letter-spacing: 2px; }
.stars svg { width: 18px; height: 18px; display: inline-block; }

/* --------------------------------------------------------------- CTA band */
.cta-band {
  /* Lightest stop must still carry white body text: --brand is 5.6:1, the old
     --green-600 equivalent was only 4.0:1. Do not lighten the end stop. */
  background: linear-gradient(135deg, var(--brand-darker), var(--brand-dark) 55%, var(--brand));
  color: #fff; border-radius: var(--r-2xl); padding: var(--space-7);
  display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: center;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,.09);
}
.cta-band > div { position: relative; flex: 1 1 340px; }
.cta-band h2 { color: #fff; margin-bottom: var(--space-2); }
.cta-band p { color: #f8eed6; margin: 0; }
.cta-band .actions { position: relative; display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--brand-darker); color: #e9d8b0; margin-top: var(--space-8); }
.site-footer a { color: #e9d8b0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid; gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding: var(--space-8) 0 var(--space-6);
}
.footer-grid h3 { color: #fff; font-size: var(--step-1); margin-bottom: var(--space-4); position: relative; padding-bottom: var(--space-2); }
.footer-grid h3::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 42px; height: 3px;
  background: var(--accent-bright); border-radius: 2px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid li a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; }
.footer-grid svg { width: 16px; height: 16px; flex: none; color: var(--green-300); }
.footer-brand { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-4); }
.footer-brand img { width: 58px; height: 58px; flex: none; }
.footer-brand strong { color: #fff; font-family: var(--font-display); font-size: var(--step-2); display: block; line-height: 1.15; }
.footer-social { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.footer-social a {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-md);
  background: rgba(255,255,255,.09);
}
.footer-social a:hover { background: var(--accent-bright); color: var(--brand-darker); }
.footer-social svg { width: 20px; height: 20px; color: inherit; }
.map-embed {
  width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r-lg); border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06); display: grid; place-items: center; text-align: center;
  padding: var(--space-4); color: #dcc794; font-size: var(--step--1);
}
/* The card is a link to the campus on Google Maps. */
a.map-embed { text-decoration: none; transition: background .16s ease, border-color .16s ease; }
a.map-embed:hover, a.map-embed:focus-visible {
  background: rgba(255,255,255,.12); border-color: var(--accent-bright); color: #f6e7c2;
}
a.map-embed:hover span span, a.map-embed:focus-visible span span { text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14); padding: var(--space-4) 0;
  display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between;
  font-size: var(--step--1);
}
.visitors { display: inline-flex; gap: 4px; }
.visitors b {
  background: rgba(255,255,255,.12); border-radius: 4px; padding: 2px 7px;
  font-family: ui-monospace, "Courier New", monospace; color: #fff;
}

/* ------------------------------------------------------------ page header */
.page-header {
  background: linear-gradient(135deg, var(--brand-darker), var(--brand-dark) 65%, var(--green-700));
  color: #fff; padding: var(--space-8) 0; position: relative; overflow: hidden;
}
.page-header::after {
  content: ""; position: absolute; right: -80px; bottom: -110px;
  width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.07);
}
.page-header h1 { color: #fff; margin-bottom: var(--space-2); position: relative; }
.page-header p { color: #f5e9cd; max-width: 68ch; margin: 0; position: relative; }
.breadcrumbs { font-size: var(--step--1); margin-bottom: var(--space-3); position: relative; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumbs a { color: #f7ecd0; }   /* 4.8:1 on the header gradient */
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: #c4ad78; }
.breadcrumbs [aria-current="page"] { color: #fff; }

/* ------------------------------------------------------------------ prose */
.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--space-7); }
.prose h3 { margin-top: var(--space-5); color: var(--brand-dark); }
.prose li { margin-bottom: var(--space-2); }
.prose > :first-child { margin-top: 0; }
.lead { font-size: var(--step-1); color: var(--fg-muted); }

.layout-aside { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 960px) { .layout-aside { grid-template-columns: minmax(0,1fr) 320px; } }
.sidebar { display: grid; gap: var(--space-4); align-content: start; }
.sidebar-nav { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li + li { border-top: 1px solid var(--border); }
.sidebar-nav a {
  display: flex; justify-content: space-between; gap: var(--space-2);
  padding: 12px var(--space-3); text-decoration: none; color: var(--fg);
  border-radius: var(--r-sm); min-height: 44px; align-items: center;
}
.sidebar-nav a:hover { background: var(--green-100); color: var(--brand-darker); }
.sidebar-nav a[aria-current="page"] { background: var(--brand); color: #fff; font-weight: 700; }

/* ------------------------------------------------------------------ table */
.table-scroll { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; font-size: var(--step--1); }
table.data caption { text-align: left; padding: var(--space-3) var(--space-4); color: var(--fg-muted); font-size: var(--step--1); }
table.data th, table.data td { padding: 12px var(--space-4); text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data thead th { background: var(--brand-dark); color: #fff; font-weight: 700; white-space: nowrap; }
table.data tbody tr:nth-child(even) { background: var(--surface-sunk); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data th[scope="row"] { font-weight: 700; color: var(--brand-darker); }

/* -------------------------------------------------------------- accordion */
.accordion { display: grid; gap: var(--space-3); }
.acc-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4); min-height: 56px; background: transparent; border: 0;
  cursor: pointer; text-align: left; font-weight: 700; color: var(--brand-darker);
  font-family: var(--font-display); font-size: var(--step-1);
}
.acc-trigger:hover { background: var(--green-50); }
.acc-trigger svg { width: 22px; height: 22px; flex: none; transition: transform var(--dur) var(--ease); color: var(--brand); }
.acc-trigger[aria-expanded="true"] { background: var(--green-100); }
.acc-trigger[aria-expanded="true"] svg { transform: rotate(45deg); }
.acc-panel { padding: var(--space-4); border-top: 1px solid var(--border); }
.acc-panel > :last-child { margin-bottom: 0; }
.acc-panel[hidden] { display: none; }

/* ------------------------------------------------------------------ forms */
.form-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: var(--step--1); color: var(--brand-darker); }
.field .hint { font-size: 13px; color: var(--fg-muted); }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 12px 14px;
  border: 2px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--fg);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--green-500); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-dark);
  box-shadow: 0 0 0 4px rgba(138,95,10,.18);
}
.field .error { color: var(--danger); font-size: 13px; font-weight: 700; display: none; align-items: center; gap: 6px; }
.field .error svg { width: 15px; height: 15px; flex: none; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--danger); background: var(--danger-bg); }
.field.is-invalid .error { display: flex; }
.form-status {
  border-radius: var(--r-md); padding: var(--space-3) var(--space-4);
  font-weight: 700; display: none; margin-bottom: var(--space-4);
}
.form-status.is-ok { display: block; background: var(--green-100); color: var(--brand-darker); border-left: 5px solid var(--brand); }
.form-status.is-pending { display: block; background: var(--info-bg); color: #1c4e80; border-left: 5px solid #3d6fb4; }
.form-status.is-err { display: block; background: var(--danger-bg); color: #8c1d18; border-left: 5px solid var(--danger); }

/* --------------------------------------------------------------- timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 var(--space-6); position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px;
  width: 3px; background: var(--green-200); border-radius: 2px;
}
.timeline li { position: relative; padding-bottom: var(--space-5); }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1 * var(--space-6) + 3px); top: 6px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--surface); border: 4px solid var(--brand);
}
.timeline b { display: block; color: var(--brand-darker); font-family: var(--font-display); font-size: var(--step-1); }
.timeline time { font-size: var(--step--1); color: var(--accent-text); font-weight: 700; }

/* ------------------------------------------------------------ back to top */
.to-top {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 80;
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--brand-dark); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease),
              transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--brand); transform: translateY(-3px); }
.to-top svg { width: 22px; height: 22px; }

/* ----------------------------------------------------------- scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

/* ---------------------------------------------------------------- helpers */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.stack > * + * { margin-top: var(--space-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.cluster--center { justify-content: center; }

/* On narrow screens the quick cards stack into a column; overlapping them onto a
   short hero crowds the caption, so the band collapses to zero. Setting the token
   re-flows the caption padding and controls automatically. */
@media (max-width: 760px) {
  :root { --hero-overlap: 0px; }
  .quick { margin-top: var(--space-5); }
}

/* --------------------------------------------- touch pointers: 44px min */
@media (pointer: coarse) {
  .topbar a, .panel-head a, .footer-grid li a, .sidebar-nav a { min-height: 44px; }
  .topbar .social a { width: 44px; height: 44px; }
  .notice-list a { padding-block: var(--space-4); }
  .mega a { padding-block: 13px; }
}

/* ------------------------------------------------------- reduced motion  */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .gallery-item:hover img { transform: none; }
}

/* ------------------------------------------------------------------ print */
@media print {
  .topbar, .navbar, .hero-controls, .to-top, .site-footer, .quick, .nav-backdrop { display: none !important; }
  body { background: #fff; }
  .card, .panel { box-shadow: none; border: 1px solid #999; }
}


/* ---------------------------------------------------------------- toolbar --
   Text-size and language controls in the top bar. Both are real buttons so
   they are reachable by keyboard and announced by a screen reader. */
.topbar .tools { display: inline-flex; align-items: center; gap: 2px; }

.tool {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; min-height: 34px; padding: 0 8px;
  /* .48 alpha puts the control boundary above the 3:1 WCAG 1.4.11 minimum
     against the top bar; .28 measured 2.43:1 and failed it. */
  border: 1px solid rgba(255,255,255,.48); border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06); color: inherit;
  font: inherit; font-weight: 700; line-height: 1; cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.tool:hover  { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.72); }
.tool:active { transform: translateY(1px); }
.tool[aria-disabled="true"] { opacity: .42; cursor: default; }
.tool[aria-disabled="true"]:hover {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.48);
}
.tool--lang { margin-left: 6px; padding: 0 12px; letter-spacing: .01em; }
.tool[data-font="dec"] { font-size: 12px; }
.tool[data-font="inc"] { font-size: 17px; }

/* The toolbar sits on the dark top bar; keep the focus ring visible there. */
.topbar .tool:focus-visible {
  outline: 3px solid var(--accent-bright); outline-offset: 2px;
}

@media (pointer: coarse) {
  .tool { min-width: 44px; min-height: 44px; }
}

/* Devanagari sits taller than Latin at the same size, so give it room. */
:root[data-lang="hi"] body { line-height: 1.8; }
:root[data-lang="hi"] .btn,
:root[data-lang="hi"] .nav-link { line-height: 1.35; }

/* When the top bar runs out of room, the things to drop are the ones repeated
   elsewhere on the page - the email address and the second phone number are
   both in the footer and on the contact page. The text-size and language
   controls are NOT repeated anywhere, so they stay. */
@media (max-width: 860px) {
  .topbar a[href^="mailto:"] { display: none; }
}
@media (max-width: 600px) {
  .topbar a[href^="tel:"] + a[href^="tel:"] { display: none; }
}

/* Same reasoning at the two largest text sizes: main.js stamps the step on
   the root element, because a media query cannot see --font-scale. */
:root[data-fontstep="3"] .topbar a[href^="mailto:"],
:root[data-fontstep="4"] .topbar a[href^="mailto:"] { display: none; }

/* An email address or a URL has no break opportunities, so at the larger text
   sizes it pushes its own column past the edge of a phone screen. Let those
   strings break. Scoped to the places that actually hold them - applying it
   site-wide would let Devanagari break mid-word. */
.site-footer ul span,
.site-footer .footer-brand span,
.brand-addr { overflow-wrap: anywhere; }


/* ------------------------------------------------------------- map frame --
   The embedded Google map on the contact page. The iframe is lazy-loaded: it
   pulls roughly a megabyte from Google, and it sits well below the fold. */
.map-frame { margin: 0; }
.map-frame iframe {
  display: block; width: 100%; aspect-ratio: 16 / 7; border: 1px solid var(--border);
  border-radius: var(--r-lg); background: var(--surface);
}
.map-frame figcaption {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  justify-content: space-between;
  margin-top: var(--space-3); font-size: var(--step--1); color: var(--fg-muted);
}
.map-frame figcaption a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

/* A 16:7 letterbox is unusable on a phone - give the map real height. */
@media (max-width: 700px) {
  .map-frame iframe { aspect-ratio: 4 / 3; }
}
