/* ============================================================================
   Vidyavo design system v3 — "Trust & Authority" for tier-2 India.
   Audience: teachers, parents and principals on budget Android phones.
   Navy = institutional trust (banks, govt, job portals). Saffron = the one
   action color. Light mode only in v1 — sunlight legibility and familiarity
   beat theme completeness. No external requests (system font stack).
   ========================================================================== */

:root {
  /* color */
  --navy: #1E3A8A;            /* brand / hero band */
  --primary: #1E40AF;         /* institutional blue — links, primary UI. 8:1 on white */
  --primary-strong: #1E3A8A;
  --on-primary: #FFFFFF;
  --cta: #C2410C;             /* saffron — THE action color. 4.9:1 with white */
  --cta-strong: #9A3412;
  --on-cta: #FFFFFF;
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --surface-2: #EFF4FB;
  --fg: #1F2937;
  --heading: #111827;
  --muted-fg: #5B6B7C;
  --border: #E2E8F0;
  --border-strong: #C7D2E0;
  --destructive: #DC2626;
  --warning: #B45309;
  --success: #15803D;
  --verified: #15803D;        /* claimed / verified badges — green means confirmed */
  --unclaimed: #6B7280;
  --star: #B45309;
  --sponsored-bg: #FFFBEB;
  --hero-grad: linear-gradient(135deg, #1E3A8A 0%, #1E40AF 60%, #2563EB 100%);

  /* shape & elevation */
  --radius-card: 10px;
  --radius-input: 8px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 3px rgb(15 23 42 / .08);
  --shadow-raised: 0 6px 20px rgb(15 23 42 / .12);

  /* type */
  --font-heading: "Lexend", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* spacing — 4px grid */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-6: 24px; --sp-8: 32px; --sp-12: 48px; --sp-16: 64px;

  --z-header: 100; --z-toast: 1000;
  --speed: 180ms;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--heading);
                 line-height: 1.2; margin: 0 0 var(--sp-3); font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 6vw, 40px); }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
h4 { font-size: 17px; }
p { margin: 0 0 var(--sp-3); }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

img, svg { max-width: 100%; vertical-align: middle; }
button { cursor: pointer; }

.container { max-width: 1024px; margin: 0 auto; padding: 0 var(--sp-4); }
@media (min-width: 768px) { .container { padding: 0 var(--sp-6); } }

/* escape the page container for full-bleed sections (hero) */
.hero-bleed { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: var(--z-toast);
  background: var(--surface); color: var(--fg); padding: var(--sp-3) var(--sp-4);
  border-radius: 0 0 var(--radius-card) 0; border: 1px solid var(--border);
}
.skip-link:focus { left: 0; }

/* ---------- icons ---------- */

.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; fill: none;
        stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

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

.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgb(15 23 42 / .04);
}
.site-header .container { display: flex; align-items: center; gap: var(--sp-4); min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: var(--sp-2);
         font-family: var(--font-heading); font-weight: 700; font-size: 21px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--navy);
              color: #fff; display: inline-flex; align-items: center; justify-content: center;
              font-size: 18px; font-weight: 700; }
.nav-links { display: flex; gap: var(--sp-2); margin-left: auto; align-items: center; }
.nav-links > a { color: var(--fg); font-size: 15px; font-weight: 600;
                 padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-input); }
.nav-links > a:hover { background: var(--surface-2); text-decoration: none; color: var(--primary); }
@media (max-width: 560px) { .nav-links > a.nav-secondary { display: none; } }

/* ---------- buttons — one saffron action per screen ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 12px 22px; min-height: 48px;
  border-radius: var(--radius-input); border: 1.5px solid var(--border-strong);
  background: var(--surface); color: var(--primary);
  font-size: 16px; font-family: var(--font-body); font-weight: 700;
  text-decoration: none; touch-action: manipulation;
  transition: background var(--speed) ease-out, border-color var(--speed) ease-out,
              transform 90ms ease-out, box-shadow var(--speed) ease-out;
}
.btn:hover { text-decoration: none; background: var(--surface-2); border-color: var(--primary); }
.btn:active { transform: scale(.98); }

.btn-cta { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.btn-cta:hover { background: var(--cta-strong); border-color: var(--cta-strong); }

.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }

.btn-danger { background: var(--destructive); border-color: var(--destructive); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; min-height: 40px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- hero (navy band, white text, white search) ---------- */

.hero { background: var(--hero-grad); color: #fff;
        padding: var(--sp-12) 0 72px; text-align: center; }
.hero h1 { color: #fff; margin-bottom: var(--sp-2); }
.hero .tagline { font-size: 18px; color: #DBEAFE; max-width: 620px; margin: 0 auto var(--sp-2); }
.hero .tagline-hi { font-size: 16px; color: #BFDBFE; margin: 0 auto var(--sp-6); }
.hero a { color: #fff; }

.search-bar {
  display: flex; gap: var(--sp-2); max-width: 600px; margin: 0 auto var(--sp-4);
  background: #fff; border: 2px solid transparent;
  border-radius: var(--radius-pill); padding: 5px;
  box-shadow: var(--shadow-raised);
}
.search-bar:focus-within { border-color: var(--cta); }
.search-bar .icon { margin-left: var(--sp-3); align-self: center; color: var(--muted-fg); }
.search-bar input {
  flex: 1; border: 0; background: transparent; color: var(--heading);
  font-size: 16px; font-family: var(--font-body); padding: var(--sp-2); min-width: 0;
}
.search-bar input:focus { outline: none; }
.search-bar .btn { border-radius: var(--radius-pill); }

.hero-chips { display: flex; gap: var(--sp-2); justify-content: center; flex-wrap: wrap; }
.hero-chips a {
  display: inline-block; padding: 6px 14px; border-radius: var(--radius-pill);
  background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .3);
  color: #fff; font-size: 14px; font-weight: 600;
}
.hero-chips a:hover { background: rgb(255 255 255 / .24); text-decoration: none; }

/* stats card overlapping the hero bottom */
.stats-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-raised);
  display: flex; justify-content: space-around; gap: var(--sp-4); flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-6); margin: -44px auto var(--sp-8); max-width: 640px;
  position: relative;
}
.stats-card .stat { text-align: center; min-width: 110px; }
.stats-card strong { display: block; font-size: 28px; font-family: var(--font-heading);
                     color: var(--navy); font-variant-numeric: tabular-nums; font-weight: 700; }
.stats-card span { font-size: 14px; color: var(--muted-fg); }

/* ---------- cards & layout ---------- */

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding: var(--sp-4); margin-bottom: var(--sp-3);
}
a.card { display: block; color: var(--fg);
         transition: border-color var(--speed) ease-out, box-shadow var(--speed) ease-out, transform var(--speed) ease-out; }
a.card:hover { text-decoration: none; border-color: var(--primary); box-shadow: var(--shadow-raised); transform: translateY(-1px); }
a.card h3 { color: var(--primary); }

.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.meta-row { display: flex; align-items: center; gap: var(--sp-2) var(--sp-4); flex-wrap: wrap;
            color: var(--muted-fg); font-size: 14px; }
.meta-row .icon { width: 15px; height: 15px; }

.grid { display: grid; gap: var(--sp-3); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.section { margin: var(--sp-8) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.section-head h2 { margin: 0; }

.muted { color: var(--muted-fg); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }

/* numbered steps — "How it works" */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 60px; margin-bottom: var(--sp-4); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 20px; font-weight: 700;
}
.step h3 { margin-bottom: 4px; }

/* tick list for the trust band */
.ticks { list-style: none; margin: 0 0 var(--sp-4); padding: 0; display: inline-block; text-align: left; }
.ticks li { display: flex; gap: var(--sp-2); align-items: flex-start; margin-bottom: var(--sp-2); }
.ticks .icon { color: var(--success); margin-top: 2px; }

/* ---------- chips & badges ---------- */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--fg); margin: 0 var(--sp-2) var(--sp-2) 0; white-space: nowrap;
  transition: border-color var(--speed) ease-out, color var(--speed) ease-out;
}
a.chip:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.chip-quiet { background: var(--surface-2); border-color: transparent; color: var(--muted-fg); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px;
         border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; }
.badge .icon { width: 14px; height: 14px; }
.badge-unclaimed { color: var(--unclaimed); border: 1.5px dashed var(--unclaimed); }
.badge-claimed { background: var(--verified); color: #fff; }
.badge-pending { color: var(--warning); border: 1.5px solid var(--warning); }

/* ---------- stat bar (entity pages) ---------- */

.stat-bar { display: flex; gap: var(--sp-4) var(--sp-6); flex-wrap: wrap; padding: var(--sp-3) 0 0; }
.stat-bar .stat { display: flex; flex-direction: column; font-size: 13px; color: var(--muted-fg); }
.stat-bar .stat strong { color: var(--navy); font-size: 22px; font-family: var(--font-heading);
                         font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- forms ---------- */

label { display: block; font-weight: 600; margin: var(--sp-3) 0 6px; font-size: 14px; color: var(--heading); }
input, select, textarea {
  width: 100%; padding: 12px 14px; min-height: 48px; font-size: 16px; font-family: var(--font-body);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-input);
  background: var(--surface); color: var(--fg);
  transition: border-color var(--speed) ease-out;
}
textarea { min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
.field-error { color: var(--destructive); font-size: 14px; margin-top: 5px; display: flex; gap: 5px; align-items: center; }
.form-narrow { max-width: 460px; }
.form-hint { font-size: 13px; color: var(--muted-fg); margin-top: 4px; }

/* ---------- ad slot ---------- */

.ad-slot {
  background: var(--sponsored-bg); border: 1px solid #FDE68A;
  border-radius: var(--radius-card); min-height: 120px; margin: var(--sp-4) 0;
  padding: 30px var(--sp-4) var(--sp-4); position: relative;
}
.ad-slot::before {
  content: "Sponsored"; position: absolute; top: 8px; left: 14px;
  font-size: 12px; color: #92600A; letter-spacing: .04em; text-transform: uppercase; font-weight: 600;
}
.ad-slot a { color: var(--fg); }

/* ---------- tables ---------- */

table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 15px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; color: var(--muted-fg); font-size: 13px; letter-spacing: .02em; }
tr:last-child td { border-bottom: 0; }
.facts-table th { width: 38%; }

/* ---------- breadcrumbs ---------- */

.breadcrumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
               font-size: 14px; color: var(--muted-fg); margin: var(--sp-4) 0; }
.breadcrumbs a { color: var(--muted-fg); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .icon { width: 14px; height: 14px; opacity: .6; }

/* ---------- banners, empty states, provenance ---------- */

.banner { display: flex; gap: var(--sp-2); align-items: flex-start;
          border: 1.5px solid var(--warning); color: #7C4A02;
          border-radius: var(--radius-card); padding: var(--sp-3) var(--sp-4);
          margin: var(--sp-3) 0; font-size: 14px; background: #FFFBEB; }
.banner-success { border-color: var(--success); color: #14532D; background: #F0FDF4; }
.banner-error { border-color: var(--destructive); color: #7F1D1D; background: #FEF2F2; }

.empty { text-align: center; color: var(--muted-fg); padding: var(--sp-8) var(--sp-4); }
.empty .icon { width: 36px; height: 36px; opacity: .4; margin-bottom: var(--sp-2); }

.provenance { border-top: 1px dashed var(--border-strong); margin-top: var(--sp-8);
              padding-top: var(--sp-4); font-size: 14px; color: var(--muted-fg); }

/* ---------- page hero (school page) ---------- */

.page-hero { background: var(--surface); border: 1px solid var(--border);
             border-top: 4px solid var(--navy);
             border-radius: var(--radius-card); box-shadow: var(--shadow-card);
             padding: var(--sp-6); margin-bottom: var(--sp-4); }
.page-hero h1 { font-size: clamp(22px, 4.5vw, 30px); margin-bottom: var(--sp-1); }

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

.site-footer { border-top: 1px solid var(--border); margin-top: var(--sp-16);
               padding: var(--sp-8) 0; background: #0F1E45; color: #C7D2E8; font-size: 14px; }
.site-footer .brand, .site-footer h4 { color: #fff; }
.site-footer .brand-mark { background: #fff; color: var(--navy); }
.footer-grid { display: grid; gap: var(--sp-6); grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 { font-size: 14px; margin-bottom: var(--sp-2); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: var(--sp-2); }
.footer-grid a { color: #C7D2E8; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .15); margin-top: var(--sp-6);
                 padding-top: var(--sp-4); display: flex; justify-content: space-between;
                 gap: var(--sp-3); flex-wrap: wrap; }

/* ---------- article typography (content hub, §7) ---------- */

.article-body { max-width: 68ch; font-size: 17px; line-height: 1.7; }
.article-body h2 { margin: var(--sp-8) 0 var(--sp-3); font-size: 22px; }
.article-body h3 { margin: var(--sp-6) 0 var(--sp-2); font-size: 18px; }
.article-body p { margin: 0 0 var(--sp-4); }
.article-body ul, .article-body ol { margin: 0 0 var(--sp-4); padding-left: 24px; }
.article-body li { margin-bottom: var(--sp-2); }
.article-body strong { color: var(--heading); }
.article-lede { font-size: 15px; color: var(--muted-fg); margin-bottom: var(--sp-6); }

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

.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.flex { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
