/* Shikshak Kalyaan Foundation
   Visual language: the Indian school exercise notebook (blue ruled lines, red margin rule)
   and the school notice board, on a blackboard green field. */

:root {
  --board: #13392C;
  --board-2: #0E2C22;
  --board-3: #1D4A3A;
  --chalk: #F5F6F1;
  --paper: #FFFFFF;
  --marigold: #F2A007;
  --marigold-2: #D98E00;
  --margin: #C7372F;
  --rule: #24408E;
  --rule-soft: rgba(36, 64, 142, .14);
  --ink: #15191E;
  --ink-2: #4A5058;
  --line: #DADDD3;
  --ok: #1F7A4D;
  --warn: #B26B00;

  --f-head: "Zilla Slab", "Rockwell", Georgia, serif;
  --f-body: "Hind", "Segoe UI", system-ui, sans-serif;

  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 40px);
  --r: 4px;
  --shadow: 0 1px 2px rgba(19, 57, 44, .08), 0 8px 24px rgba(19, 57, 44, .08);
}

*, *::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: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--f-body); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--chalk); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rule); text-underline-offset: 3px; }
a:hover { color: var(--margin); }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.12; margin: 0 0 .5em; color: inherit; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: 8px; top: -60px; background: var(--marigold); color: var(--ink); padding: 8px 14px; z-index: 100; font-weight: 600; }
.skip:focus { top: 8px; }
.ico { flex: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5em; font: 600 1rem/1 var(--f-body); padding: .95em 1.4em .85em; border-radius: var(--r); border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn-primary { background: var(--marigold); color: var(--ink); }
.btn-primary:hover { background: var(--marigold-2); color: var(--ink); }
.btn-dark { background: var(--board); color: var(--chalk); }
.btn-dark:hover { background: var(--board-2); color: #fff; }
.btn-line { border-color: currentColor; color: var(--board); background: transparent; }
.btn-line:hover { background: var(--board); color: var(--chalk); border-color: var(--board); }
.on-board .btn-line { color: var(--chalk); }
.on-board .btn-line:hover { background: var(--chalk); color: var(--board); border-color: var(--chalk); }
.btn-sm { font-size: .9rem; padding: .7em 1em .6em; }
.btn-block { width: 100%; justify-content: center; }
.link { font-weight: 600; text-decoration: none; display: inline-flex; gap: .35em; align-items: center; color: var(--board); border-bottom: 2px solid var(--marigold); padding-bottom: 1px; }
.link:hover { color: var(--margin); }

/* ---------- Top strip + header ---------- */
.strip { background: var(--board-2); color: #CFD8D2; font-size: .88rem; }
.strip .wrap { display: flex; gap: 22px; align-items: center; min-height: 38px; flex-wrap: wrap; }
.strip a { color: inherit; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.strip a:hover { color: var(--marigold); }
.strip .hindi { margin-left: auto; font-weight: 500; color: var(--marigold); }
@media (max-width: 760px) { .strip .hide-sm { display: none; } }

.site-head { background: var(--chalk); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-head .wrap { display: flex; align-items: center; gap: 18px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--board); flex: none; }
.brand img { width: 50px; height: 50px; }
.brand .name { font-family: var(--f-head); font-weight: 700; font-size: 1.32rem; line-height: 1; display: block; white-space: nowrap; }
.brand .sub { display: block; font-size: .78rem; color: var(--ink-2); margin-top: 4px; letter-spacing: .02em; white-space: nowrap; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 8px 10px; border-radius: var(--r); font-size: .97rem; white-space: nowrap; }
.nav a:hover { background: rgba(19, 57, 44, .07); color: var(--board); }
.nav a[aria-current="page"] { color: var(--board); box-shadow: inset 0 -3px 0 var(--marigold); border-radius: 0; }
.nav .more { position: relative; }
.nav .more > button { background: none; border: 0; font: 500 .97rem var(--f-body); padding: 8px 10px; cursor: pointer; white-space: nowrap; color: var(--ink); display: inline-flex; gap: 4px; align-items: center; }
.nav .more-menu { position: absolute; top: 100%; right: 0; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 240px; padding: 8px; display: none; border-radius: var(--r); }
.nav .more.open .more-menu, .nav .more:focus-within .more-menu { display: block; }
.nav .more-menu a { display: block; padding: 9px 12px; }
.head-cta { display: flex; gap: 8px; align-items: center; }
.icon-btn { background: none; border: 1px solid var(--line); border-radius: var(--r); width: 42px; height: 42px; display: inline-grid; place-items: center; color: var(--board); cursor: pointer; text-decoration: none; }
.icon-btn:hover { border-color: var(--board); }
.menu-btn { display: none; }
@media (max-width: 1440px) { .brand .sub { display: none; } }

@media (max-width: 1240px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; margin-left: auto; }
  .head-cta .btn { display: none; }
}
.drawer { position: fixed; inset: 0; z-index: 90; background: rgba(14, 44, 34, .55); display: none; }
.drawer.open { display: block; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(360px, 88vw); background: var(--chalk); padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.drawer-panel a { padding: 12px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; font-size: 1.05rem; }
.drawer-panel .btn { margin-top: 14px; justify-content: center; border-bottom: 0; }
.drawer-close { align-self: flex-end; }

/* ---------- Board (dark) sections ---------- */
.on-board { background: var(--board); color: var(--chalk); position: relative; }
.on-board a:not(.btn) { color: var(--marigold); }
.chalk-dust { background-image:
  radial-gradient(1200px 500px at 15% -10%, rgba(255,255,255,.07), transparent 60%),
  radial-gradient(800px 400px at 100% 110%, rgba(255,255,255,.05), transparent 60%),
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-hindi { font-family: var(--f-body); font-weight: 600; color: var(--marigold); font-size: 1.15rem; margin-bottom: 18px; display: flex; gap: 12px; align-items: center; }
.hero-hindi::before { content: ""; width: 34px; height: 2px; background: var(--marigold); }
.hero h1 { color: #fff; max-width: 14ch; margin-bottom: 22px; text-wrap: balance; }
.hero-lead { font-size: 1.15rem; color: #D5DDD8; max-width: 52ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-photo { margin-top: 40px; display: flex; gap: 14px; align-items: center; color: #BFCBC4; font-size: .95rem; }
.hero-photo img { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; border: 3px solid var(--board-3); }

/* Notice board: a ruled exercise-book sheet pinned to the board */
.notice { position: relative; background: var(--paper); color: var(--ink); padding: 34px 26px 26px 58px; border-radius: 2px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); transform: rotate(-1.4deg);
  background-image: linear-gradient(var(--paper) 52px, transparent 52px), repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule-soft) 31px 32px); }
.notice::before { content: ""; position: absolute; left: 40px; top: 0; bottom: 0; width: 2px; background: var(--margin); opacity: .75; }
.notice .pin { position: absolute; top: -12px; left: 50%; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffd36b, var(--marigold) 45%, #a76a00); box-shadow: 0 3px 6px rgba(0,0,0,.35); }
.notice-head { font-family: var(--f-head); font-weight: 700; font-size: 1.05rem; color: var(--margin); margin-bottom: 14px; display: flex; justify-content: space-between; gap: 10px; }
.notice-head time { color: var(--ink-2); font-family: var(--f-body); font-weight: 500; font-size: .9rem; }
.notice ol { list-style: none; margin: 0; padding: 0; }
.notice li { padding: 0 0 14px; margin-bottom: 14px; border-bottom: 1px dashed #C9CED8; }
.notice li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.notice li h3 { font-size: 1.12rem; margin: 0 0 4px; }
.notice li p { font-size: .95rem; color: var(--ink-2); margin: 0 0 6px; line-height: 1.5; }
.notice li a { font-weight: 600; font-size: .95rem; }
.notice .deadline { display: inline-block; font-size: .82rem; font-weight: 600; color: var(--margin); margin-left: 8px; }
.notice li.pinned h3::before { content: "★ "; color: var(--marigold); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .notice { transform: rotate(-.8deg); }
}

/* ---------- Sections ---------- */
.sec { padding: clamp(56px, 8vw, 104px) 0; }
.sec-tight { padding: clamp(40px, 6vw, 72px) 0; }
.sec-white { background: var(--paper); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; max-width: 22ch; }
.sec-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 60ch; }
.on-board .sec-head p { color: #C9D3CD; }

/* The red margin rule: content sits right of it on wide screens */
.margin-rule { position: relative; padding-left: 36px; }
.margin-rule::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--margin); }
@media (max-width: 640px) { .margin-rule { padding-left: 20px; } }

/* ---------- Register (stats) ---------- */
.register { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); }
.register caption { text-align: left; font-family: var(--f-head); font-weight: 600; font-size: 1.05rem; padding: 0 0 10px; color: var(--board); }
.register th, .register td { padding: 18px 22px; border-bottom: 1px solid var(--rule-soft); text-align: left; vertical-align: middle; }
.register td.num { font-family: var(--f-head); font-weight: 700; font-size: 2.1rem; color: var(--board); width: 1%; white-space: nowrap; border-right: 2px solid var(--margin); }
.register th { font-weight: 500; color: var(--ink-2); font-size: 1rem; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border: 1px solid var(--line); background: var(--paper); }
.stats-row > div { padding: 22px 24px; border-right: 1px solid var(--line); margin-right: -1px; }
.stats-row > div:last-child { border-right: 0; }
.stats-row strong { display: block; font-family: var(--f-head); font-size: 2.3rem; line-height: 1; color: var(--board); margin-bottom: 6px; }
.stats-row span { color: var(--ink-2); font-size: .95rem; }
@media (max-width: 760px) { .stats-row { grid-template-columns: 1fr 1fr; } .stats-row > div { border-bottom: 1px solid var(--line); margin-bottom: -1px; } }

/* ---------- About split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-media { position: relative; }
.split-media img { width: 100%; aspect-ratio: 4/3.2; object-fit: cover; border-radius: var(--r); }
.split-media .years { position: absolute; right: -14px; bottom: -22px; background: var(--marigold); color: var(--ink); padding: 16px 20px; border-radius: var(--r); font-weight: 600; line-height: 1.2; box-shadow: var(--shadow); }
.split-media .years strong { font-family: var(--f-head); font-size: 2.6rem; display: block; line-height: 1; }
.ticks { list-style: none; padding: 0; margin: 0 0 26px; }
.ticks li { display: flex; gap: 10px; padding: 6px 0; }
.ticks li .ico { color: var(--ok); margin-top: 3px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split-media .years { right: 12px; } }

/* ---------- Focus areas ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.pillar { padding: 28px 26px 30px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 44px 1fr; gap: 14px; }
.pillar:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.pillar:not(:nth-child(3n+1)) { padding-left: 26px; }
.pillar .ico { color: var(--margin); margin-top: 2px; }
.pillar h3 { font-size: 1.2rem; margin-bottom: 6px; }
.pillar p { margin: 0; color: var(--ink-2); font-size: .98rem; }
@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar, .pillar:not(:nth-child(3n+1)) { padding: 24px 20px 24px 0; border-right: 0 !important; }
  .pillar:nth-child(odd) { border-right: 1px solid var(--line) !important; }
  .pillar:nth-child(even) { padding-left: 20px; }
}
@media (max-width: 600px) { .pillars { grid-template-columns: 1fr; } .pillar, .pillar:nth-child(even) { padding: 22px 0; border-right: 0 !important; } }

/* ---------- Events ---------- */
.event-list { display: grid; gap: 0; border-top: 2px solid var(--board); }
.event-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: center; }
.date-tab { text-align: center; border: 2px solid var(--board); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.date-tab .m { display: block; background: var(--board); color: var(--chalk); font-size: .8rem; font-weight: 600; padding: 4px 0 2px; letter-spacing: .04em; }
.date-tab .d { display: block; font-family: var(--f-head); font-size: 2.1rem; font-weight: 700; line-height: 1.1; padding: 6px 0 0; color: var(--board); }
.date-tab .y { display: block; font-size: .78rem; color: var(--ink-2); padding-bottom: 6px; }
.event-row h3 { margin-bottom: 6px; font-size: 1.3rem; }
.event-row h3 a { color: var(--ink); text-decoration: none; }
.event-row h3 a:hover { color: var(--margin); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: .93rem; margin-bottom: 6px; }
.meta span { display: inline-flex; gap: 6px; align-items: center; }
.event-row p { margin: 0; color: var(--ink-2); max-width: 70ch; }
.event-row.past { opacity: .75; }
@media (max-width: 720px) { .event-row { grid-template-columns: 72px 1fr; gap: 16px; } .event-row .actions { grid-column: 2; } .date-tab .d { font-size: 1.6rem; } }

/* ---------- Campaigns ---------- */
.campaigns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.campaign { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.campaign img { aspect-ratio: 16/8; object-fit: cover; width: 100%; }
.campaign-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.campaign h3 { margin: 0; }
.campaign p { margin: 0; color: var(--ink-2); }
.progress { height: 10px; background: #E8EBE3; border-radius: 10px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--marigold), var(--margin)); border-radius: 10px; }
.money { display: flex; justify-content: space-between; font-size: .95rem; color: var(--ink-2); }
.money strong { color: var(--ink); font-family: var(--f-head); font-size: 1.15rem; }
.campaign .actions { margin-top: auto; display: flex; gap: 10px; padding-top: 6px; }
@media (max-width: 800px) { .campaigns { grid-template-columns: 1fr; } }

/* ---------- Video + involve ---------- */
.involve { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; background: #000; }
.video iframe, .video button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button { cursor: pointer; padding: 0; background: #000 center/cover no-repeat; }
.video button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--marigold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%2315191E'/%3E%3C/svg%3E") center/34px no-repeat; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
@media (max-width: 860px) { .involve { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid rgba(255,255,255,.15); }
.quote { padding: 32px 32px 32px 0; margin: 0; }
.quote + .quote { border-left: 1px solid rgba(255,255,255,.15); padding-left: 32px; }
.quote blockquote { margin: 0 0 22px; font-family: var(--f-head); font-weight: 500; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.35; color: #fff; }
.quote blockquote::before { content: "\201C"; display: block; font-size: 3.6rem; line-height: .6; color: var(--marigold); margin-bottom: 10px; }
.quote figcaption { display: flex; gap: 12px; align-items: center; color: #C9D3CD; }
.quote figcaption img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--board-3); }
.quote figcaption strong { display: block; color: var(--chalk); }
@media (max-width: 760px) { .quotes { grid-template-columns: 1fr; } .quote + .quote { border-left: 0; border-top: 1px solid rgba(255,255,255,.15); padding-left: 0; } }

/* ---------- Gallery ---------- */
.gallery { columns: 4 220px; column-gap: 12px; }
.gallery a { display: block; margin-bottom: 12px; break-inside: avoid; border-radius: var(--r); overflow: hidden; position: relative; background: #e3e6dd; }
.gallery img { width: 100%; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 10px; color: #fff; font-size: .9rem; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.strip-gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.strip-gallery a { aspect-ratio: 1; overflow: hidden; border-radius: var(--r); }
.strip-gallery img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .strip-gallery { grid-template-columns: repeat(3, 1fr); } }
.albums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.album { text-decoration: none; color: var(--ink); }
.album .cover { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--r); margin-bottom: 12px; position: relative; }
.album .cover img { width: 100%; height: 100%; object-fit: cover; }
.album .count { position: absolute; right: 10px; bottom: 10px; background: rgba(19,57,44,.9); color: #fff; font-size: .85rem; padding: 3px 10px; border-radius: 20px; display: inline-flex; gap: 5px; align-items: center; }
.album h3 { margin: 0 0 4px; }
.album p { color: var(--ink-2); margin: 0; font-size: .95rem; }
@media (max-width: 860px) { .albums { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .albums { grid-template-columns: 1fr; } }

.lightbox { position: fixed; inset: 0; background: rgba(8, 20, 15, .94); z-index: 200; display: none; align-items: center; justify-content: center; padding: 50px 60px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 84vh; max-width: 100%; width: auto; border-radius: 2px; }
.lightbox p { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #ddd; margin: 0; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 26px; }
.lightbox .lb-close { top: 14px; right: 14px; }
.lightbox .lb-prev { left: 10px; top: 50%; margin-top: -24px; }
.lightbox .lb-next { right: 10px; top: 50%; margin-top: -24px; }

/* ---------- News ---------- */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.news-item a.thumb { display: block; aspect-ratio: 16/10; overflow: hidden; border-radius: var(--r); margin-bottom: 14px; background: #e3e6dd; }
.news-item a.thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-item .cat { font-size: .85rem; font-weight: 600; color: var(--margin); }
.news-item h3 { margin: 4px 0 8px; font-size: 1.25rem; }
.news-item h3 a { color: var(--ink); text-decoration: none; }
.news-item h3 a:hover { color: var(--margin); }
.news-item p { color: var(--ink-2); font-size: .97rem; margin: 0; }
@media (max-width: 900px) { .news { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .news { grid-template-columns: 1fr; } }

/* ---------- Join band ---------- */
.join { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.join h2 { color: #fff; }
.join p { color: #D5DDD8; max-width: 56ch; }
.join-actions { display: flex; flex-direction: column; gap: 12px; }
.join-actions a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.22); border-radius: var(--r); color: var(--chalk) !important; text-decoration: none; font-weight: 600; }
.join-actions a span { font-weight: 400; color: #BFCBC4; font-size: .92rem; display: block; }
.join-actions a:hover { border-color: var(--marigold); background: rgba(242, 160, 7, .08); }
.join-actions .ico { color: var(--marigold); }
@media (max-width: 860px) { .join { grid-template-columns: 1fr; } }

/* ---------- Page header ---------- */
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 60px); }
.page-head h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.3rem); margin: 0; max-width: 22ch; }
.page-head p { color: #C9D3CD; margin: 14px 0 0; max-width: 62ch; font-size: 1.08rem; }
.crumbs { font-size: .9rem; color: #A9B8B0; margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: #D5DDD8 !important; text-decoration: none; }
.crumbs a:hover { color: var(--marigold) !important; }

/* ---------- Prose (CMS content) ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; font-size: 1.9rem; scroll-margin-top: 100px; }
.prose h3 { margin-top: 1.5em; color: var(--board); scroll-margin-top: 100px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--margin); }
.prose blockquote { border-left: 3px solid var(--marigold); margin: 1.5em 0; padding: .2em 0 .2em 1.2em; font-family: var(--f-head); font-size: 1.25rem; color: var(--board); }
.prose img { border-radius: var(--r); margin: 1.5em 0; }
.prose a { font-weight: 500; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2em 0; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 12px; }
.prose > :first-child { margin-top: 0; }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 64px); align-items: start; }
.side-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; position: sticky; top: 100px; }
.side-card h3 { font-size: 1.15rem; }
.side-card + .side-card { margin-top: 20px; position: static; }
.toc { list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: 7px 0 7px 12px; border-left: 2px solid var(--line); text-decoration: none; color: var(--ink); }
.toc a:hover { border-color: var(--margin); color: var(--margin); }
@media (max-width: 960px) { .layout-side { grid-template-columns: 1fr; } .side-card { position: static; } }

/* ---------- Forms (notebook sheet) ---------- */
.sheet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 4vw, 40px); position: relative; }
.sheet.ruled { padding-left: clamp(40px, 6vw, 64px); }
.sheet.ruled::before { content: ""; position: absolute; left: clamp(22px, 3.5vw, 36px); top: 0; bottom: 0; width: 2px; background: var(--margin); opacity: .55; }
.sheet h2 { font-size: 1.6rem; }
.fieldset { border: 0; padding: 0; margin: 0 0 28px; }
.fieldset legend { font-family: var(--f-head); font-weight: 600; font-size: 1.15rem; color: var(--board); padding: 0; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 20px; }
@media (max-width: 680px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label, .field .lbl { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field .req { color: var(--margin); }
.field .hint { font-size: .87rem; color: var(--ink-2); margin-top: 5px; display: block; }
.input, .field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=number], .field input[type=date], .field input[type=password], .field input[type=search], .field select, .field textarea {
  width: 100%; font: 400 1rem var(--f-body); padding: 12px 14px; border: 1.5px solid #C5CABF; border-radius: var(--r); background: #fff; color: var(--ink); }
.field textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--board); outline: 3px solid rgba(242, 160, 7, .4); outline-offset: 0; }
.field input[type=file] { width: 100%; padding: 12px; border: 1.5px dashed #C5CABF; border-radius: var(--r); background: #FAFBF8; font: inherit; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .97rem; margin-bottom: 10px; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--board); flex: none; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-row label { border: 1.5px solid #C5CABF; border-radius: var(--r); padding: 10px 14px; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 500; background: #fff; }
.choice-row input { accent-color: var(--board); }
.choice-row label:has(input:checked) { border-color: var(--board); background: rgba(19,57,44,.06); }
.amounts label { min-width: 92px; justify-content: center; }

.alert { padding: 14px 18px; border-radius: var(--r); margin-bottom: 20px; border-left: 4px solid; background: #fff; }
.alert-success { border-color: var(--ok); background: #E8F4EC; }
.alert-error { border-color: var(--margin); background: #FCEBE9; }
.alert-info { border-color: var(--rule); background: #EAF0FB; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

/* Success "receipt" panel */
.done { text-align: left; }
.done .code { font-family: var(--f-head); font-size: 2rem; font-weight: 700; color: var(--board); letter-spacing: .03em; background: #FFF8E6; border: 2px dashed var(--marigold); display: inline-block; padding: 8px 18px; border-radius: var(--r); margin: 6px 0 14px; }

/* ---------- Generic list blocks ---------- */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .cards3 { grid-template-columns: 1fr; } }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.tile .ico { color: var(--margin); }
.tile h3 { margin: 6px 0 0; }
.tile p { margin: 0; color: var(--ink-2); }
a.tile:hover { border-color: var(--board); }
a.tile:hover h3 { color: var(--margin); }
.roles { display: grid; gap: 0; border-top: 1px solid var(--line); }
.role { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; }
.role h3 { margin: 0; font-size: 1.15rem; }
.role .tag { font-size: .85rem; color: var(--margin); font-weight: 600; }
.role p { margin: 0; color: var(--ink-2); grid-column: 1 / -1; font-size: .97rem; }

.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.member img { aspect-ratio: 1; object-fit: cover; border-radius: var(--r); margin-bottom: 12px; width: 100%; background: #e3e6dd; }
.member h3 { margin: 0; font-size: 1.15rem; }
.member .role-t { color: var(--margin); font-size: .93rem; font-weight: 500; }
.member p { font-size: .93rem; color: var(--ink-2); margin: 6px 0 0; }
@media (max-width: 900px) { .team { grid-template-columns: 1fr 1fr; } }

details.faq { border-bottom: 1px solid var(--line); }
details.faq summary { cursor: pointer; padding: 18px 40px 18px 0; font-weight: 600; font-size: 1.08rem; list-style: none; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.6rem; color: var(--margin); font-weight: 400; }
details.faq[open] summary::after { content: "−"; }
details.faq .a { padding: 0 0 18px; color: var(--ink-2); max-width: 70ch; }

.pager { display: flex; gap: 6px; margin-top: 36px; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); background: var(--paper); }
.pager span { background: var(--board); color: #fff; border-color: var(--board); }

.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: #E8EBE3; color: var(--ink); }
.badge-approved, .badge-verified, .badge-resolved, .badge-shortlisted, .badge-winner, .badge-active, .badge-closed { background: #DDEFE4; color: #155C38; }
.badge-pending, .badge-received, .badge-open, .badge-new { background: #FFF1D1; color: #7A4B00; }
.badge-in_progress, .badge-under_review, .badge-contacted { background: #E3EAFB; color: #1E3576; }
.badge-rejected, .badge-expired { background: #F9E0DD; color: #8F241E; }

.thread { display: grid; gap: 14px; }
.msg { padding: 16px 18px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); }
.msg.admin { border-left: 4px solid var(--board); }
.msg.user { border-left: 4px solid var(--marigold); }
.msg .who { font-weight: 600; font-size: .92rem; margin-bottom: 4px; display: flex; justify-content: space-between; gap: 10px; }
.msg .who time { font-weight: 400; color: var(--ink-2); }
.msg p { margin: 0; white-space: pre-wrap; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 500; }

/* ---------- Donate ---------- */
.pay-box { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: center; }
.qr { width: 180px; height: 180px; background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); display: grid; place-items: center; }
.qr img, .qr canvas { width: 100%; height: auto; }
.copy { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-head); font-weight: 600; font-size: 1.15rem; background: #F2F4EE; padding: 6px 12px; border-radius: var(--r); }
.copy button { font: 600 .82rem var(--f-body); background: var(--board); color: #fff; border: 0; border-radius: 3px; padding: 4px 10px; cursor: pointer; }
@media (max-width: 560px) { .pay-box { grid-template-columns: 1fr; } }

/* ---------- Membership card ---------- */
.idcard { width: 100%; max-width: 520px; aspect-ratio: 1.586; border-radius: 14px; overflow: hidden; background: var(--board); color: var(--chalk); position: relative; box-shadow: 0 20px 40px rgba(0,0,0,.25); display: grid; grid-template-rows: auto 1fr auto; font-size: 14px; }
.idcard::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 22px solid rgba(242,160,7,.12); }
.idcard-top { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--board-2); border-bottom: 3px solid var(--marigold); }
.idcard-top img { width: 34px; height: 34px; }
.idcard-top strong { font-family: var(--f-head); font-size: 1.05rem; display: block; line-height: 1.1; }
.idcard-top span { font-size: .75rem; color: #BFCBC4; }
.idcard-body { display: grid; grid-template-columns: 100px 1fr 92px; gap: 14px; padding: 16px 18px; align-items: center; position: relative; z-index: 1; }
.idcard-photo { width: 100px; height: 120px; object-fit: cover; border-radius: 6px; background: var(--board-3); border: 2px solid rgba(255,255,255,.25); }
.idcard-body h2 { font-size: 1.25rem; margin: 0 0 4px; color: #fff; line-height: 1.15; }
.idcard-body .r { color: #C9D3CD; font-size: .82rem; line-height: 1.4; }
.idcard-body .id { font-family: var(--f-head); color: var(--marigold); font-weight: 700; font-size: 1.05rem; margin-top: 8px; display: block; }
.idcard-qr { background: #fff; padding: 5px; border-radius: 6px; width: 92px; height: 92px; }
.idcard-qr img, .idcard-qr canvas { width: 100% !important; height: 100% !important; }
.idcard-foot { display: flex; justify-content: space-between; padding: 8px 18px; font-size: .74rem; color: #A9B8B0; border-top: 1px solid rgba(255,255,255,.1); }
@media (max-width: 480px) { .idcard { aspect-ratio: auto; } .idcard-body { grid-template-columns: 80px 1fr; } .idcard-photo { width: 80px; height: 96px; } .idcard-qr { grid-column: 1 / -1; } }

/* ---------- Footer ---------- */
.site-foot { background: var(--board-2); color: #BFCBC4; padding: 64px 0 0; font-size: .97rem; }
.site-foot a { color: #DCE3DF; text-decoration: none; }
.site-foot a:hover { color: var(--marigold); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
.foot-grid h3 { color: #fff; font-size: 1.1rem; margin-bottom: 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { padding: 4px 0; }
.foot-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.foot-brand img { width: 46px; height: 46px; }
.foot-brand strong { font-family: var(--f-head); color: #fff; font-size: 1.2rem; display: block; line-height: 1.1; }
.foot-brand span { color: var(--marigold); font-size: .9rem; }
.contact-list li { display: flex; gap: 10px; }
.contact-list .ico { color: var(--marigold); margin-top: 3px; }
.socials { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.socials a { border: 1px solid rgba(255,255,255,.2); padding: 6px 12px; border-radius: 20px; font-size: .88rem; }
.subscribe { display: flex; gap: 8px; margin-top: 10px; }
.subscribe input { flex: 1; min-width: 0; padding: 11px 12px; border-radius: var(--r); border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff; font: inherit; }
.subscribe input::placeholder { color: #9FB0A7; }
.foot-bottom { margin-top: 48px; border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .88rem; }
.foot-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.wa-float:hover { color: #fff; background: #1ebe5b; }

.empty { padding: 36px; border: 1.5px dashed #C5CABF; border-radius: var(--r); text-align: center; color: var(--ink-2); background: var(--paper); }
.muted { color: var(--ink-2); }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; } .mt2 { margin-top: 2rem; } .mt1 { margin-top: 1rem; }
.center { text-align: center; }
.flex { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.map { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--r); }
.search-hit { padding: 18px 0; border-bottom: 1px solid var(--line); }
.search-hit .type { font-size: .82rem; font-weight: 600; color: var(--margin); }
.search-hit h3 { margin: 2px 0 4px; font-size: 1.2rem; }

/* ---------- Print (receipts, cards) ---------- */
@media print {
  .strip, .site-head, .site-foot, .wa-float, .no-print, .page-head { display: none !important; }
  body { background: #fff; }
  .sec { padding: 0; }
  .idcard { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .receipt { border: 1px solid #999 !important; }
}
.receipt { background: #fff; border: 1px solid var(--line); max-width: 760px; margin: 0 auto; padding: 40px; border-top: 6px solid var(--board); }
.receipt-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 20px; }
.receipt-head img { width: 56px; height: 56px; }
.receipt table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.receipt td { padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.receipt td:first-child { color: var(--ink-2); width: 40%; }
.receipt .amt { font-family: var(--f-head); font-size: 1.8rem; font-weight: 700; color: var(--board); }

/* Prevent long emails and links from widening grids on small screens */
.foot-grid > div, .layout-side > *, .split > *, .grid2 > *, .grid3 > * { min-width: 0; }
.contact-list a, .contact-list span, .kv dd, .copy { overflow-wrap: anywhere; }

/* =====================================================================
   Educator marketplace
   ===================================================================== */
.mk-hero { padding: clamp(44px, 6vw, 84px) 0; }
.mk-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.mk-hero h1 { color: #fff; max-width: 15ch; }
.mk-hero p.lead { color: #D5DDD8; font-size: 1.12rem; max-width: 52ch; }
.ask-box { background: var(--paper); color: var(--ink); border-radius: 6px; padding: 22px; box-shadow: 0 18px 40px rgba(0,0,0,.3); }
.ask-box label { font-weight: 600; display: block; margin-bottom: 8px; font-family: var(--f-head); font-size: 1.15rem; }
.ask-box textarea { width: 100%; min-height: 110px; padding: 12px; border: 1.5px solid #C5CABF; border-radius: 4px; font: inherit; resize: vertical; }
.ask-box .hint { font-size: .88rem; color: var(--ink-2); margin: 8px 0 14px; }
@media (max-width: 900px) { .mk-hero .wrap { grid-template-columns: 1fr; } }

.steps-line { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: s; border-top: 2px solid var(--board); }
.steps-line li { list-style: none; padding: 20px 18px 0 0; }
.steps-line li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--marigold); color: var(--ink); font-weight: 700; font-family: var(--f-head); margin: -38px 0 12px; }
.steps-line h3 { font-size: 1.1rem; margin-bottom: 4px; }
.steps-line p { color: var(--ink-2); font-size: .95rem; margin: 0; }
@media (max-width: 860px) { .steps-line { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--board); padding-left: 24px; } .steps-line li { padding: 0 0 22px; } .steps-line li::before { margin: 0 0 8px -42px; } }

/* Guided requirement form */
.stepper { display: flex; gap: 4px; margin-bottom: 22px; flex-wrap: wrap; }
.stepper span { flex: 1; min-width: 18px; height: 6px; border-radius: 3px; background: #E2E5DD; }
.stepper span.on { background: var(--marigold); }
.stepper span.done { background: var(--board); }
.step-pane { display: none; }
.step-pane.on { display: block; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.step-pane h2 { font-size: 1.6rem; margin-bottom: 6px; }
.step-pane .q-help { color: var(--ink-2); margin-bottom: 18px; }
.step-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.big-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.big-choice label { border: 1.5px solid #C5CABF; border-radius: 6px; padding: 14px 16px; cursor: pointer; background: #fff; display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.big-choice label small { display: block; color: var(--ink-2); font-weight: 400; font-size: .86rem; }
.big-choice input { accent-color: var(--board); margin-top: 4px; }
.big-choice label:has(input:checked) { border-color: var(--board); background: rgba(19,57,44,.06); box-shadow: inset 3px 0 0 var(--marigold); }
.summary-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.summary-list dt { color: var(--ink-2); } .summary-list dd { margin: 0; font-weight: 500; }
.prefill-note { background: #FFF8E6; border: 1px solid #F3DDA5; border-radius: 4px; padding: 10px 14px; margin-bottom: 18px; font-size: .95rem; }

/* Educator cards */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.edu-card { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.edu-card.is-featured { border-color: #F1CF7E; box-shadow: inset 0 3px 0 var(--marigold); }
.edu-head { display: flex; gap: 14px; align-items: center; }
.edu-head img, .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #E3E6DD; flex: none; }
.avatar { display: grid; place-items: center; font-family: var(--f-head); font-weight: 700; font-size: 1.4rem; color: var(--board); }
.edu-head h3 { margin: 0; font-size: 1.15rem; }
.edu-head h3 a { color: var(--ink); text-decoration: none; }
.edu-head h3 a:hover { color: var(--margin); }
.edu-head .sub { color: var(--ink-2); font-size: .92rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .8rem; padding: 3px 9px; border-radius: 20px; background: #EEF0EA; color: var(--ink); white-space: nowrap; }
.tag.verified { background: #DDEFE4; color: #155C38; font-weight: 600; }
.tag.featured { background: #FFF1D1; color: #7A4B00; font-weight: 600; }
.tag.premium { background: #E3EAFB; color: #1E3576; font-weight: 600; }
.tag.member { background: #F3E6E5; color: #8F241E; }
.edu-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .93rem; color: var(--ink-2); flex-wrap: wrap; }
.edu-meta strong { color: var(--ink); }
.edu-card .actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.stars { color: var(--marigold); letter-spacing: 1px; }
.stars .off { color: #D7DAD2; }

/* Match cards with score */
.match-card { display: grid; grid-template-columns: 92px 1fr; gap: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
.match-card + .match-card { margin-top: 14px; }
.score-ring { --p: 80; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--board) calc(var(--p) * 1%), #E6E9E1 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 8px; background: var(--paper); border-radius: 50%; }
.score-ring b { position: relative; font-family: var(--f-head); font-size: 1.35rem; color: var(--board); line-height: 1; text-align: center; }
.score-ring b small { display: block; font-family: var(--f-body); font-size: .68rem; font-weight: 500; color: var(--ink-2); margin-top: 2px; }
.why { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 3px; font-size: .94rem; }
.why li { display: flex; gap: 6px; align-items: flex-start; }
.why li.good::before { content: "✓"; color: var(--ok); font-weight: 700; }
.why li.gap::before { content: "!"; color: var(--warn); font-weight: 700; width: 10px; text-align: center; }
@media (max-width: 560px) { .match-card { grid-template-columns: 1fr; } }

.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin-bottom: 24px; }
.filters-bar .field { margin: 0; min-width: 150px; flex: 1; }
.filters-bar .field label { font-size: .85rem; }

.profile-top { display: grid; grid-template-columns: 140px 1fr; gap: 26px; align-items: center; }
.profile-top img, .profile-top .avatar { width: 140px; height: 140px; border-radius: 8px; border: 4px solid rgba(255,255,255,.15); }
.profile-top .avatar { font-size: 3rem; background: var(--board-3); color: #fff; }
.profile-top h1 { margin: 0 0 6px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 6px; overflow: hidden; }
.facts div { padding: 14px 16px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts span { display: block; font-size: .82rem; color: var(--ink-2); }
.facts strong { font-family: var(--f-head); font-size: 1.15rem; }
.review { padding: 16px 0; border-bottom: 1px solid var(--line); }
.review .reply { margin: 10px 0 0 18px; padding: 10px 14px; background: #F2F7F4; border-left: 3px solid var(--board); border-radius: 0 4px 4px 0; font-size: .95rem; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.slot-grid label { border: 1.5px solid #C5CABF; border-radius: 4px; padding: 8px 10px; cursor: pointer; background: #fff; font-size: .92rem; display: flex; gap: 6px; align-items: center; }
.slot-grid label:has(input:checked) { border-color: var(--board); background: rgba(19,57,44,.07); }
.slot-day { font-weight: 600; margin: 14px 0 6px; color: var(--board); }
@media (max-width: 600px) { .profile-top { grid-template-columns: 1fr; } .profile-top img, .profile-top .avatar { width: 100px; height: 100px; } }

/* Auth */
.auth-wrap { max-width: 520px; margin: 0 auto; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.auth-tabs a { flex: 1; text-align: center; padding: 11px; text-decoration: none; color: var(--ink-2); font-weight: 600; }
.auth-tabs a[aria-current="page"] { background: var(--board); color: #fff; }
.otp-input { font-size: 1.6rem !important; letter-spacing: 10px; text-align: center; font-family: var(--f-head) !important; }
.dev-note { background: #EAF0FB; border: 1px dashed var(--rule); padding: 8px 12px; border-radius: 4px; font-size: .9rem; margin-bottom: 14px; }

/* Pay */
.gw-list { display: grid; gap: 10px; }
.gw-list label { display: flex; gap: 12px; align-items: center; border: 1.5px solid #C5CABF; border-radius: 6px; padding: 14px 16px; cursor: pointer; background: #fff; }
.gw-list label:has(input:checked) { border-color: var(--board); background: rgba(19,57,44,.05); box-shadow: inset 3px 0 0 var(--marigold); }
.gw-list strong { display: block; } .gw-list small { color: var(--ink-2); }
.demo-pay { background: #EAF0FB; border: 1px dashed var(--rule); border-radius: 6px; padding: 16px; margin-top: 14px; }

/* =====================================================================
   Account portal
   ===================================================================== */
.portal { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 116px); }
.portal-side { background: var(--paper); border-right: 1px solid var(--line); padding: 20px 12px; }
.portal-user { display: flex; gap: 10px; align-items: center; padding: 0 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.portal-user .avatar { width: 42px; height: 42px; font-size: 1rem; }
.portal-user strong { display: block; line-height: 1.2; }
.portal-user span { font-size: .82rem; color: var(--ink-2); }
.portal-nav a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 4px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .96rem; }
.portal-nav a:hover { background: #F2F4EE; }
.portal-nav a[aria-current="page"] { background: rgba(19,57,44,.08); color: var(--board); box-shadow: inset 3px 0 0 var(--marigold); }
.portal-nav a .ico { color: var(--ink-2); }
.portal-nav .count { margin-left: auto; background: var(--marigold); color: var(--ink); font-size: .74rem; font-weight: 700; padding: 0 8px; border-radius: 10px; }
.portal-nav .grp { font-size: .78rem; color: var(--ink-2); padding: 14px 10px 4px; font-weight: 600; }
.portal-main { padding: 26px clamp(16px, 3vw, 36px) 60px; min-width: 0; }
.portal-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.portal-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }
.portal-head .crumb { font-size: .9rem; color: var(--ink-2); margin-bottom: 4px; }
.portal-head .crumb a { color: var(--ink-2); }
@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; }
  .portal-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .portal-user { display: none; }
  .portal-nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .portal-nav a { white-space: nowrap; }
  .portal-nav .grp { display: none; }
}
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .card + .card { margin-top: 0; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.kpi strong { display: block; font-family: var(--f-head); font-size: 1.8rem; line-height: 1.1; color: var(--board); }
.kpi span { font-size: .88rem; color: var(--ink-2); }
.kpi.hot { box-shadow: inset 4px 0 0 var(--marigold); border-color: #F1CF7E; }
a.kpi:hover { border-color: var(--board); }
.ptbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ptbl th { text-align: left; font-size: .82rem; font-weight: 600; color: var(--ink-2); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptbl tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain > li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.list-plain > li:last-child { border-bottom: 0; }
.list-plain .t { font-weight: 600; }
.list-plain .s { font-size: .9rem; color: var(--ink-2); }
.ptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.ptabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.ptabs a[aria-current="page"] { color: var(--board); border-color: var(--marigold); }
.meter { height: 8px; background: #E8EBE3; border-radius: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--board); }
.checklist2 { list-style: none; padding: 0; margin: 0; }
.checklist2 li { padding: 6px 0; display: flex; gap: 8px; align-items: center; }
.checklist2 .y { color: var(--ok); } .checklist2 .n { color: #B9BFB4; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { margin: 0; }
.btn-xs { font-size: .82rem; padding: .55em .8em .45em; }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 6px 2px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 12px; background: #EEF0EA; align-self: flex-start; }
.bubble.me { background: var(--board); color: #fff; align-self: flex-end; }
.bubble .tm { display: block; font-size: .74rem; opacity: .7; margin-top: 4px; }
.bubble.flag { outline: 2px dashed var(--marigold); }
.notif { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.notif.unread .t { font-weight: 700; }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--marigold); margin-top: 8px; flex: none; }
.notif.read .dot { background: transparent; }
.ai-box { background: linear-gradient(180deg, #FFF8E6, #fff); border: 1px solid #F3DDA5; border-radius: 6px; padding: 16px 18px; white-space: pre-wrap; }
.rating-input { display: flex; gap: 6px; flex-wrap: wrap; }
.rating-input label { border: 1.5px solid #C5CABF; border-radius: 4px; padding: 6px 12px; cursor: pointer; background: #fff; }
.rating-input label:has(input:checked) { background: var(--marigold); border-color: var(--marigold); font-weight: 700; }
.rating-input input { position: absolute; opacity: 0; width: 1px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; }
.week .col { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; min-height: 140px; }
.week .col h4 { margin: 0; padding: 8px 10px; font-size: .88rem; border-bottom: 1px solid var(--line); background: #FAFBF8; }
.week .col.today h4 { background: var(--board); color: #fff; }
.week .ev { margin: 6px; padding: 6px 8px; border-radius: 4px; background: #E3EAFB; font-size: .82rem; }
.week .ev.trial { background: #FFF1D1; }
.bell { position: relative; }
.bell .count { position: absolute; top: -4px; right: -4px; background: var(--margin); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 10px; padding: 0 5px; }
/* Signed in: the menu already has Find an educator, so drop the duplicate button on laptops */
@media (max-width: 1500px) { .head-cta.signed-in .cta-main { display: none; } }
