/* ==========================================================================
   Schola design system
   One stylesheet for every page: hand-written pages in site/ and the generated
   directory (generator/templates). Sections:
     1. Tokens          5. Buttons, tags, chips   9.  Directory (hubs, city, school)
     2. Base            6. Forms + search         10. Compare
     3. Brand devices   7. Cards + sections       11. Articles (guides, legal, about)
     4. Header, footer  8. Data components        12. Utilities, motion
   Brand: the school-zone pentagon, blackboard green, highlighter lime,
   ruled-notebook paper. Display type Bricolage Grotesque, text Atkinson Hyperlegible Next.
   ========================================================================== */

/* 1. Tokens -------------------------------------------------------------- */
:root {
  --board: #12241D;        /* blackboard: primary text + dark surfaces */
  --board-2: #1C3529;
  --board-3: #2A4A3C;
  --ink-2: #3B4D44;        /* secondary text */
  --ink-3: #5E6E66;        /* muted text (4.9:1 on white) */
  --ink-4: #8A978F;        /* decorative only */
  --line: #DDE3D6;
  --line-2: #C8D1C1;
  --chalk: #F5F6EF;        /* page tint */
  --chalk-2: #ECEFE3;
  --paper: #FFFFFF;
  --lime: #D3F54B;         /* highlighter */
  --lime-2: #C3EA36;
  --lime-3: #A9D11C;
  --lime-soft: #EFFBC4;
  --rule: #DFE5D6;         /* notebook rules */
  --margin: #F0503A;       /* notebook margin red */
  --link: #2448E0;         /* ruled-paper blue */
  --link-soft: #E7ECFF;

  /* school types (map markers, tag dots) */
  --t-public: #2E5BFF;
  --t-charter: #FF7A1A;
  --t-magnet: #8A4DFF;
  --t-private: #E5397A;
  --t-special: #00A38A;

  --f-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --f-text: 'Atkinson Hyperlegible Next', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1200px;
  --measure: 700px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 68px;

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

  --pop: 4px 4px 0 var(--board);
  --pop-lime: 4px 4px 0 var(--lime);
  --lift: 0 1px 2px rgba(18, 36, 29, .06), 0 10px 30px -12px rgba(18, 36, 29, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: var(--f-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--board);
  background: var(--paper);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 750; line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
p, li { text-wrap: pretty; }
strong, b { font-weight: 700; }
[hidden] { display: none !important; }
::selection { background: var(--lime); color: var(--board); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -100px; z-index: 300; background: var(--lime); color: var(--board); padding: .6rem 1rem; border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: .75rem; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.wrap-mid { max-width: calc(960px + 2 * var(--gutter)); }

.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i-fill { fill: currentColor; stroke: none; }

/* 3. Brand devices -------------------------------------------------------- */
/* Highlighter swipe behind words */
.hl {
  background: linear-gradient(100deg, transparent .2em, var(--lime) .2em, var(--lime) calc(100% - .15em), transparent calc(100% - .15em)) 0 58% / 100% 78% no-repeat;
  padding-inline: .14em;
  margin-inline: -.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  border-radius: .2em .35em .15em .4em;
}
.hl-under { background: linear-gradient(var(--lime), var(--lime)) 0 88% / 100% .32em no-repeat; padding-inline: .05em; }
/* Ruled notebook paper */
.ruled {
  background-color: var(--chalk);
  background-image: linear-gradient(var(--rule) 1px, transparent 1px);
  background-size: 100% 34px;
}
.ruled-margin { position: relative; }
.ruled-margin::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: max(12px, calc((100vw - var(--wrap)) / 2 - 28px));
  width: 2px; background: color-mix(in srgb, var(--margin) 55%, transparent); pointer-events: none;
}
/* Pentagon shape (school sign) */
.pent { clip-path: polygon(50% 0, 100% 37%, 100% 100%, 0 100%, 0 37%); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font: 700 .78rem/1.2 var(--f-text); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow::before {
  content: ""; width: .8em; height: .8em; background: var(--lime); flex: none;
  clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%);
  box-shadow: inset 0 0 0 1.5px var(--board);
}
.on-dark .eyebrow, .eyebrow.on-dark { color: #C9D6CE; }
/* Icon on a lime pentagon tile */
.ico {
  --s: 3rem;
  position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; color: var(--board);
}
.ico::before {
  content: ""; position: absolute; inset: 0; background: var(--lime);
  clip-path: polygon(50% 2%, 98% 38%, 98% 98%, 2% 98%, 2% 38%);
  border-radius: 4px;
}
.ico .i { position: relative; width: 52%; height: 52%; margin-top: 12%; stroke-width: 1.9; }
.ico.soft::before { background: var(--lime-soft); }
.ico.dark { color: var(--lime); }
.ico.dark::before { background: var(--board); }
.ico.lg { --s: 4.25rem; }
.ico.sm { --s: 2.25rem; }

/* 4. Header + footer ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; gap: 1.5rem; }
.logo { display: inline-flex; align-items: center; gap: .42rem; text-decoration: none; color: var(--board); flex: none; }
.logo-mark { width: 30px; height: 30px; }
.logo-word { font: 800 1.72rem/1 var(--f-display); letter-spacing: -.055em; margin-top: -.12em; }
.logo-mark .mk-o { fill: var(--board); stroke: var(--board); stroke-width: 3; stroke-linejoin: round; }
.logo-mark .mk-i { fill: var(--lime); stroke: var(--lime); stroke-width: 2; stroke-linejoin: round; }
.logo-mark .mk-d { fill: var(--board); }
.site-footer .logo-mark .mk-o { fill: var(--lime); stroke: var(--lime); }
.site-footer .logo-mark .mk-i { fill: var(--board); stroke: var(--board); }
.site-footer .logo-mark .mk-d { fill: var(--lime); }
.nav { display: flex; align-items: center; gap: .25rem; list-style: none; padding: 0; }
.nav a {
  display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .8rem; border-radius: var(--pill);
  font-weight: 700; font-size: .97rem; text-decoration: none; color: var(--ink-2); transition: background .15s, color .15s;
}
.nav a:hover { color: var(--board); background: var(--chalk-2); }
.nav a[aria-current="page"] { color: var(--board); background: var(--lime-soft); }
.nav .count { min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: var(--pill); background: var(--board); color: var(--lime); font-size: .74rem; display: inline-grid; place-items: center; }
.header-search { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.header-search .searchbox { height: 44px; border-width: 1.5px; box-shadow: none; border-radius: var(--pill); padding-left: .95rem; }
.header-search .searchbox input { font-size: .95rem; }
.header-search .searchbox:focus-within { box-shadow: var(--pop); }
.header-cta { margin-left: auto; flex: none; }
.header-search + .header-cta { margin-left: 0; }
.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--paper);
  align-items: center; justify-content: center; flex: none;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: var(--board); border-radius: 2px; position: relative; transition: transform .25s var(--ease), background .2s; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
.site-header .search-btn { display: none; }

@media (max-width: 1020px) {
  .header-search { max-width: 300px; }
  .nav a { padding: .5rem .6rem; }
}
@media (max-width: 880px) {
  :root { --header-h: 62px; }
  .site-header .wrap { gap: .6rem; }
  .menu-btn { display: inline-flex; }
  .site-header .search-btn { display: inline-flex; margin-left: auto; width: 44px; padding: 0; }
  .site-header .header-search, .site-header .header-cta { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: .25rem;
    background: var(--paper); padding: 1rem var(--gutter) 1.5rem; border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 40px -20px rgba(18, 36, 29, .25);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s var(--ease), visibility 0s .2s;
  }
  .nav.open { opacity: 1; transform: none; visibility: visible; transition: opacity .2s, transform .25s var(--ease); }
  .nav a { font-size: 1.25rem; font-family: var(--f-display); padding: .75rem .9rem; border-radius: var(--r); justify-content: space-between; }
  .nav .nav-cta-item a { background: var(--board); color: var(--paper); justify-content: center; margin-top: .5rem; font-family: var(--f-text); font-size: 1.05rem; }
  .logo-word { font-size: 1.55rem; }
  .logo-mark { width: 27px; height: 27px; }
}
@media (min-width: 881px) { .nav .nav-cta-item { display: none; } }

.site-footer { background: var(--board); color: #DCE5DF; margin-top: 0; position: relative; overflow: hidden; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--lime); }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2.5rem; padding-block: 4rem 3rem; }
.footer-brand .logo { color: var(--paper); }
.footer-brand p { margin-top: 1rem; color: #A9BAB0; font-size: .95rem; max-width: 30ch; }
.footer-col h2 { font: 700 .78rem/1 var(--f-text); letter-spacing: .1em; text-transform: uppercase; color: var(--lime); margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: .55rem; font-size: .95rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 1.25rem 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; font-size: .85rem; color: #93A69B; }
.footer-word {
  font: 800 clamp(5rem, 21vw, 19rem)/.78 var(--f-display); letter-spacing: -.07em; color: var(--board-2);
  white-space: nowrap; user-select: none; margin: 0 0 -.04em -.04em; pointer-events: none;
}
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* 5. Buttons, tags, chips --------------------------------------------------- */
.btn {
  --bg: var(--board); --fg: var(--paper); --bd: var(--board);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.3rem; border-radius: var(--pill); border: 2px solid var(--bd);
  background: var(--bg); color: var(--fg); font-weight: 700; font-size: 1rem; line-height: 1.1; text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s, color .15s; white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--lime-3); }
.btn:active { transform: none; box-shadow: none; }
.btn .i { width: 1.15em; height: 1.15em; }
.btn-lime { --bg: var(--lime); --fg: var(--board); --bd: var(--board); }
.btn-lime:hover { box-shadow: var(--pop); }
.btn-ghost { --bg: transparent; --fg: var(--board); --bd: var(--line-2); }
.btn-ghost:hover { --bd: var(--board); box-shadow: var(--pop); background: var(--paper); }
.btn-light { --bg: var(--paper); --fg: var(--board); --bd: var(--paper); }
.btn-light:hover { box-shadow: var(--pop-lime); }
.btn-outline-light { --bg: transparent; --fg: var(--paper); --bd: rgba(255, 255, 255, .35); }
.btn-outline-light:hover { --bd: var(--lime); box-shadow: var(--pop-lime); }
.btn-sm { min-height: 38px; padding: .45rem .95rem; font-size: .9rem; }
.btn-lg { min-height: 56px; padding: .9rem 1.6rem; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.arrow { transition: transform .2s var(--ease); }
a:hover > .arrow, .btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(3px); }
.link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; text-decoration: none; color: var(--board); }
.link-arrow:hover { text-decoration: underline; text-decoration-color: var(--lime-3); text-decoration-thickness: 3px; }

.tag {
  --c: var(--t-public);
  display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .6rem .22rem .5rem; border-radius: var(--pill);
  background: var(--chalk-2); color: var(--board); font-size: .8rem; font-weight: 700; line-height: 1.3; white-space: nowrap;
}
.tag { padding-inline: .6rem; }  /* type labels are plain text: color is reserved for Schola Grades */
.t-public { --c: var(--t-public); }
.t-charter { --c: var(--t-charter); }
.t-magnet { --c: var(--t-magnet); }
.t-private { --c: var(--t-private); }
.t-special { --c: var(--t-special); }
.tag.lime { background: var(--lime); }
a.tag { text-decoration: none; }
a.tag:hover { text-decoration: underline; text-underline-offset: 2px; }
.tb-link { align-self: center; font-size: .85rem; font-weight: 700; color: var(--board); }
.type-def { margin-top: 1.5rem; }
.tag.dark { background: var(--board); color: var(--lime); }


.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: .4rem .9rem; border-radius: var(--pill);
  border: 1.5px solid var(--line-2); background: var(--paper); font-weight: 700; font-size: .9rem; color: var(--ink-2); text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--board); color: var(--board); }
.chip[aria-pressed="true"], .chip.on { background: var(--board); border-color: var(--board); color: var(--paper); }
.chip .n { font-weight: 400; opacity: .7; font-size: .85em; }
.chip .dot { width: .6rem; height: .6rem; clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%); background: var(--c, var(--board)); }
.chip[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px var(--paper); }

/* 6. Forms + search ------------------------------------------------------ */
.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; min-width: 0; border: 0; padding: 0; }
.field > label, .field > legend { font-weight: 700; font-size: .92rem; color: var(--board); padding: 0; }
.field .optional { font-weight: 400; color: var(--ink-3); }
.field .hint { font-size: .82rem; color: var(--ink-3); }
.field input[type=file] { padding: .55rem .7rem; cursor: pointer; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin: .1rem 0 1.25rem; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--board); }
.input, .field input:not([type=radio]):not([type=checkbox]), .field select, .field textarea {
  width: 100%; min-height: 50px; padding: .75rem .95rem; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--paper);
  font-size: 1rem; color: var(--board); transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312241D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; background-size: 1.1rem; padding-right: 2.5rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--board); box-shadow: 3px 3px 0 var(--lime); }
.field ::placeholder { color: var(--ink-4); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: inline-flex; align-items: center; min-height: 42px; padding: .45rem 1rem; border-radius: var(--pill); border: 1.5px solid var(--line-2); font-weight: 700; font-size: .92rem; cursor: pointer; background: var(--paper); }
.choice input:checked + span { background: var(--board); color: var(--paper); border-color: var(--board); }
.choice input:focus-visible + span { outline: 3px solid var(--link); outline-offset: 2px; }
.form-note { font-size: .82rem; color: var(--ink-3); margin-top: .8rem; }
.form-note a { color: var(--link); }
.form-error { display: none; background: #FFECE8; border: 1.5px solid var(--margin); color: #8A2414; padding: .75rem 1rem; border-radius: 12px; font-size: .9rem; margin-bottom: 1rem; }
.form-error.show { display: block; }
.char-counter { font-size: .78rem; color: var(--ink-3); text-align: right; }
.char-counter.warning { color: #B5361F; }
.form-card { background: var(--paper); border: 2px solid var(--board); border-radius: var(--r-lg); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: 8px 8px 0 var(--board); }
.form-card h3 { font-size: 1.6rem; margin-bottom: .35rem; }
.form-card .form-intro { color: var(--ink-3); font-size: .95rem; margin-bottom: 1.4rem; }
.hp { position: absolute !important; left: -9999px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } .form-card { box-shadow: 5px 5px 0 var(--board); } }

/* Search box (hero, header, directory) */
.search { position: relative; }
.searchbox {
  display: flex; align-items: center; gap: .6rem; background: var(--paper); border: 2px solid var(--board); border-radius: 18px;
  padding: .4rem .4rem .4rem 1.1rem; min-height: 64px; box-shadow: var(--pop); transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
.searchbox:focus-within { box-shadow: 6px 6px 0 var(--board); transform: translate(-1px, -1px); }
.searchbox > .i { color: var(--ink-3); width: 1.35rem; height: 1.35rem; }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1.12rem; padding: .5rem 0; -webkit-appearance: none; appearance: none; }
.searchbox input::placeholder { color: var(--ink-3); }
.searchbox input::-webkit-search-cancel-button { -webkit-appearance: none; }
.searchbox .btn { min-height: 50px; border-radius: 12px; }
.search-pop {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 60; background: var(--paper); border: 2px solid var(--board);
  border-radius: 16px; box-shadow: 6px 6px 0 var(--board); overflow: hidden; max-height: min(70vh, 560px); overflow-y: auto; text-align: left;
}
.search-inline .search-pop { position: static; margin-top: 1rem; max-height: none; }
.sr-group { padding: .35rem 0; }
.sr-group + .sr-group { border-top: 1.5px solid var(--line); }
.sr-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: .5rem 1rem .25rem; }
.sr-item { display: flex; align-items: center; gap: .8rem; padding: .62rem 1rem; text-decoration: none; color: var(--board); }
.sr-item:hover, .sr-item[aria-selected="true"] { background: var(--lime-soft); }
.sr-item .sr-main { flex: 1; min-width: 0; }
.sr-item .sr-name { display: block; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-item .sr-meta { display: block; font-size: .84rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-item .sr-pin { width: 1.9rem; height: 1.9rem; display: grid; place-items: center; flex: none; background: var(--chalk-2); border-radius: 10px; }
.sr-item .sr-pin .i { width: 1.05rem; height: 1.05rem; }
.sr-item .sr-mark { width: .85rem; height: .85rem; flex: none; background: var(--c, var(--t-public)); clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%); margin-inline: .5rem; }
.sr-item .sr-go { color: var(--ink-3); }
.sr-note { padding: .8rem 1rem; color: var(--ink-3); font-size: .92rem; }
.sr-note a { color: var(--link); font-weight: 700; }
.sr-foot { padding: .65rem 1rem; background: var(--chalk); font-size: .85rem; color: var(--ink-3); border-top: 1.5px solid var(--line); }

/* 7. Cards + sections --------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-sm { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section.tint { background: var(--chalk); }
.section.dark { background: var(--board); color: var(--paper); }
.section.lime { background: var(--lime); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head > div { max-width: 640px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head.center > div { margin-inline: auto; }
.h-display { font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: .98; letter-spacing: -.045em; font-weight: 800; }
.h-1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.02; letter-spacing: -.04em; font-weight: 800; }
.h-2 { font-size: clamp(1.85rem, 3.6vw, 2.8rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; }
.h-3 { font-size: 1.35rem; letter-spacing: -.02em; }
.eyebrow + .h-1, .eyebrow + .h-2, .eyebrow + .h-display { margin-top: .8rem; }
.lede { font-size: clamp(1.06rem, 1.6vw, 1.22rem); color: var(--ink-2); line-height: 1.55; max-width: 60ch; }
.h-2 + .lede, .h-1 + .lede { margin-top: .9rem; }
.dark .lede, .on-dark .lede { color: #C3D0C8; }
.muted { color: var(--ink-3); }

.card {
  position: relative; display: block; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem;
  color: var(--board); text-decoration: none; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
a.card:hover, .card.is-link:hover { border-color: var(--board); transform: translate(-3px, -3px); box-shadow: var(--pop); }
.card h3 { font-size: 1.3rem; margin-block: .9rem .4rem; }
.card p { color: var(--ink-3); font-size: .97rem; line-height: 1.55; }
.card .more { margin-top: 1rem; display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .92rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .grid-4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.top { align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.feature-list { list-style: none; padding: 0; display: grid; gap: 1.25rem; margin-top: 2rem; }
.feature-list li { display: flex; gap: 1rem; align-items: flex-start; }
.feature-list h4 { font-size: 1.12rem; margin-bottom: .2rem; letter-spacing: -.015em; }
.feature-list p { color: var(--ink-3); font-size: .97rem; }
.dark .feature-list p { color: #B3C2B9; }

.checks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.checks li { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .95rem; }
.checks li::before { content: ""; width: 1.15rem; height: 1.15rem; flex: none; border-radius: 50%; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312241D' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat; }

/* Breadcrumbs */
.crumbs { font-size: .86rem; color: var(--ink-3); padding-top: 1.25rem; }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .45rem; align-items: center; }
.crumbs li { display: inline-flex; align-items: center; gap: .45rem; }
.crumbs li + li::before { content: ""; width: .38rem; height: .38rem; border-right: 1.6px solid var(--ink-4); border-top: 1.6px solid var(--ink-4); transform: rotate(45deg); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--board); text-decoration: underline; text-decoration-color: var(--lime-3); text-decoration-thickness: 3px; }
.crumbs [aria-current] { color: var(--ink-3); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 400; display: none; place-items: center; padding: 1.25rem; background: rgba(18, 36, 29, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal.show { display: grid; animation: fade .2s ease; }
.modal-box { width: min(440px, 100%); background: var(--paper); border: 2px solid var(--board); border-radius: var(--r-lg); box-shadow: 8px 8px 0 var(--board); padding: 2.2rem 2rem; text-align: center; }
.modal-box .ico { margin: 0 auto 1rem; }
.modal-box h3 { font-size: 1.7rem; margin-bottom: .5rem; }
.modal-box p { color: var(--ink-3); margin-bottom: 1.5rem; }
@keyframes fade { from { opacity: 0; } }

/* 8. Data components --------------------------------------------------- */
/* Grade ruler: PK K 1 … 12, served grades highlighted */
/* <div class="ruler bars"><i class="g on" style="--h:46px" data-n="397">7</i>…</div>: one element per grade;
   the enrollment bar (::before) and count (::after) sit above the cell */
.ruler { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; align-items: end; }
.ruler.bars { padding-top: 90px; }
.ruler .g {
  position: relative; height: 34px; display: grid; place-items: center; border-radius: 6px; background: var(--chalk-2); color: var(--ink-3);
  font-style: normal; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 0;
}
.ruler .g.on { background: var(--lime); color: var(--board); box-shadow: inset 0 -3px 0 var(--lime-3); }
.ruler .g[data-n]::before { content: ""; position: absolute; left: 15%; right: 15%; bottom: calc(100% + 20px); height: var(--h); background: var(--board); border-radius: 3px 3px 0 0; }
.ruler .g[data-n]::after { content: attr(data-n); position: absolute; left: -4px; right: -4px; bottom: calc(100% + 4px); text-align: center; font-size: .66rem; font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.ruler-legend { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-3); margin-top: .5rem; }

/* Mini grade ruler (city lists): one element, cells drawn with gradients from --lo/--hi */
.mini-ruler {
  --cell: calc(100% / 14);
  display: inline-block; width: 112px; height: 9px; border-radius: 3px; vertical-align: middle;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(var(--cell) - 2px), var(--paper) calc(var(--cell) - 2px) var(--cell)),
    linear-gradient(90deg, var(--chalk-2) calc(var(--lo) * var(--cell)), var(--board) 0 calc((var(--hi) + 1) * var(--cell)), var(--chalk-2) 0);
}
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.stat { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; min-width: 0; }
.stat .k { font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: .4rem; }
.stat .k .i { width: 1rem; height: 1rem; }
.stat .v { font: 800 clamp(1.6rem, 3vw, 2.1rem)/1.05 var(--f-display); letter-spacing: -.03em; margin-top: .35rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .v small { font: 700 .95rem var(--f-text); letter-spacing: 0; color: var(--ink-3); }
.stat .v.txt { font-size: 1.15rem; letter-spacing: -.01em; line-height: 1.25; }
.stat .s { font-size: .82rem; color: var(--ink-3); margin-top: .2rem; }
.stat.lime { background: var(--lime); border-color: var(--board); }
.stat.lime .k, .stat.lime .s { color: var(--board-3); }

.big-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.big-stats div { border-top: 2px solid var(--lime); padding-top: 1rem; }
.big-stats b { display: block; font: 800 clamp(2.2rem, 5vw, 3.6rem)/1 var(--f-display); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.big-stats span { display: block; margin-top: .4rem; color: #B9C8BF; font-size: .95rem; }
@media (max-width: 760px) { .big-stats { grid-template-columns: 1fr 1fr; } }

/* State tile map */
.tilemap { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: clamp(3px, .6vw, 7px); }
.tile {
  aspect-ratio: 1; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(4px, .7vw, 9px);
  border-radius: clamp(6px, .9vw, 12px); text-decoration: none; color: var(--board); background: var(--lv, var(--chalk-2));
  border: 1.5px solid rgba(18, 36, 29, .12); transition: transform .15s var(--ease), box-shadow .15s var(--ease); min-width: 0;
}
.tile b { font: 800 clamp(.8rem, 1.7vw, 1.35rem)/1 var(--f-display); letter-spacing: -.02em; }
.tile span { font-size: clamp(.55rem, .95vw, .78rem); font-weight: 700; opacity: .8; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.tile:hover, .tile:focus-visible { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--board); border-color: var(--board); z-index: 1; }
.tile.l1 { --lv: #F2FBD1; } .tile.l2 { --lv: #E3F79A; } .tile.l3 { --lv: var(--lime); } .tile.l4 { --lv: #9FC72A; } .tile.l5 { --lv: var(--board-3); color: var(--lime); } .tile.l6 { --lv: var(--board); color: var(--lime); }
.tilemap-legend { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--ink-3); margin-top: 1rem; flex-wrap: wrap; }
.tilemap-legend i { width: 1.1rem; height: .7rem; border-radius: 3px; display: inline-block; border: 1px solid rgba(18, 36, 29, .12); }
.territories { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
@media (max-width: 560px) { .tile span { display: none; } .tile { justify-content: center; align-items: center; } }

/* Dot map */
.dotmap { position: relative; }
.dotmap svg { width: 100%; height: auto; }
.dotmap circle { fill: var(--lime); }
.dotmap.light circle { fill: var(--board); }

/* 9. Directory ---------------------------------------------------------- */
.dir-head { padding-block: 1.5rem 2rem; border-bottom: 1.5px solid var(--line); }
.dir-head.ruled { border-bottom: 0; }
.dir-head h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); letter-spacing: -.045em; font-weight: 800; line-height: 1; margin-top: .9rem; }
.dir-head .lede { margin-top: .9rem; }
.dir-head .search { margin-top: 1.6rem; max-width: 760px; }
.dir-head .stat-row { margin-top: 1.6rem; }
.dir-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2.5rem; align-items: center; }
.dir-hero .dotmap { background: var(--board); border-radius: var(--r-lg); padding: 1.25rem; }
@media (max-width: 900px) { .dir-hero { grid-template-columns: 1fr; } }

.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.place {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem; background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--board); transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s;
}
.place:hover { border-color: var(--board); transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--board); }
.place b { font-weight: 700; font-size: .98rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place span { font-size: .8rem; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.place.big { padding: 1.1rem 1.15rem; flex-direction: column; align-items: flex-start; gap: .2rem; }
.place.big b { font: 750 1.25rem/1.15 var(--f-display); letter-spacing: -.02em; white-space: normal; }
.letter-nav { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1rem 0; position: sticky; top: var(--header-h); z-index: 5; background: rgba(255, 255, 255, .95); padding-block: .6rem; }
.letter-nav a { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: 8px; border: 1.5px solid var(--line); font-weight: 700; font-size: .85rem; text-decoration: none; color: var(--ink-2); }
.letter-nav a:hover { border-color: var(--board); background: var(--lime); color: var(--board); }
.letter-group { margin-top: 1.75rem; scroll-margin-top: calc(var(--header-h) + 70px); }
.letter-group h3 { font-size: 1.6rem; margin-bottom: .6rem; display: flex; align-items: center; gap: .6rem; }
.letter-group h3::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }
.empty-note { display: none; color: var(--ink-3); padding: 1.5rem 0; }
.tutor-photo { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); background: var(--chalk-2); }
.tutor-card h3 a { color: inherit; text-decoration: none; }
.tutor-meta { margin-top: .6rem; font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.tutor-head { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: clamp(1.25rem, 4vw, 2.5rem); align-items: center; }
@media (max-width: 620px) { .tutor-head { grid-template-columns: 1fr; } .tutor-head .tutor-photo { max-width: 220px; } }
.empty-note.show { display: block; }
.empty-note a { color: var(--link); font-weight: 700; }
.h-sec { font-size: clamp(1.45rem, 2.6vw, 1.9rem); letter-spacing: -.03em; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.h-sec small { font: 700 .9rem var(--f-text); letter-spacing: 0; color: var(--ink-3); }

/* City page: toolbar, list, map */
.toolbar {
  position: sticky; top: var(--header-h); z-index: 20; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--line); padding-block: .75rem;
}
.toolbar .wrap { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.toolbar .filter-input { flex: 0 1 230px; min-width: 180px; height: 42px; border-radius: var(--pill); border: 1.5px solid var(--line-2); padding: 0 1rem 0 2.4rem; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E6E66' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M16.5 16.5L21 21'/%3E%3C/svg%3E") .85rem center / 1.05rem no-repeat; font-size: .95rem; -webkit-appearance: none; appearance: none; }
.toolbar .filter-input:focus { outline: none; border-color: var(--board); box-shadow: 3px 3px 0 var(--lime); }
.toolbar select { flex: none; max-width: 190px; height: 42px; border-radius: var(--pill); border: 1.5px solid var(--line-2); padding: 0 2.2rem 0 1rem; font-weight: 700; font-size: .9rem; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312241D' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right .75rem center / 1rem no-repeat; -webkit-appearance: none; appearance: none; color: var(--board); }
.toolbar select:focus { outline: none; border-color: var(--board); }
.toolbar .chips { flex: 0 1 auto; flex-wrap: wrap; gap: .35rem; }  /* wraps rather than clipping: every chip stays reachable */
.toolbar .chip { min-height: 38px; white-space: nowrap; }
.toolbar .count { font-size: .88rem; color: var(--ink-3); margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; border: 1.5px solid var(--line-2); border-radius: var(--pill); padding: 3px; gap: 2px; background: var(--paper); }
.seg button { border: 0; background: transparent; border-radius: var(--pill); padding: .35rem .8rem; font-weight: 700; font-size: .88rem; display: inline-flex; gap: .35rem; align-items: center; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--board); color: var(--paper); }
.seg .i { width: 1rem; height: 1rem; }

.city-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 0; align-items: start; }
.city-list { padding: 1.25rem var(--gutter) 3rem max(var(--gutter), calc((100vw - var(--wrap)) / 2)); min-width: 0; }
.city-map { position: sticky; top: calc(var(--header-h) + var(--tools-h, 68px)); height: calc(100vh - var(--header-h) - var(--tools-h, 68px)); border-left: 1.5px solid var(--line); background: var(--chalk-2); }
.city-map .map { height: 100%; border-radius: 0; border: 0; }
@media (max-width: 1060px) {
  .city-layout { grid-template-columns: 1fr; }
  .city-list { padding-inline: var(--gutter); }
  .city-map { display: none; position: static; height: 70vh; border-left: 0; }
  .city-layout.show-map .city-map { display: block; }
  .city-layout.show-map .city-list { display: none; }
}
@media (min-width: 1061px) { .seg-view { display: none !important; } }
@media (max-width: 1060px) {
  .toolbar { position: static; }
  .toolbar .wrap { flex-wrap: wrap; }
  .toolbar .filter-input { flex: 1 1 100%; max-width: none; }
  .toolbar .chips { flex: 1 1 100%; }
  .toolbar select { flex: 1 1 28%; min-width: 0; max-width: none; padding-left: .8rem; padding-right: 1.9rem; font-size: .86rem; }
  .toolbar .seg-view { flex: 1 1 100%; }
  .toolbar .seg-view button { flex: 1; justify-content: center; }
  .toolbar .count { width: 100%; margin-left: 0; order: 9; }
}

.level-group { margin-top: 1.5rem; }
.level-group:first-child { margin-top: .25rem; }
.rows { display: grid; gap: .5rem; }
.row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; align-items: center;
  padding: .9rem 1rem .9rem 1.1rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper);
  transition: border-color .15s, box-shadow .15s, transform .15s var(--ease);
}
.row:hover, .row.hot { border-color: var(--board); box-shadow: 3px 3px 0 var(--board); transform: translate(-1px, -1px); }
.row .rname { font: 750 1.08rem/1.25 var(--f-display); letter-spacing: -.015em; color: var(--board); text-decoration: none; }
.row .rname::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.row .rname:hover { text-decoration: underline; text-decoration-color: var(--lime-3); text-decoration-thickness: 3px; }
.row .rsub { font-size: .87rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .rfacts { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; font-size: .85rem; color: var(--ink-2); margin-top: .35rem; }
.row .rfacts b { font-variant-numeric: tabular-nums; }
.row .rfacts .mini-ruler { margin-right: .1rem; }
.row .rside { display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; position: relative; z-index: 1; }
.cmp-toggle {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: .3rem .7rem; border-radius: var(--pill);
  border: 1.5px solid var(--line-2); background: var(--paper); font-weight: 700; font-size: .8rem; color: var(--ink-2); white-space: nowrap;
}
.cmp-toggle:hover { border-color: var(--board); color: var(--board); }
.cmp-toggle .i { width: .95rem; height: .95rem; }
.cmp-toggle[aria-pressed="true"] { background: var(--lime); border-color: var(--board); color: var(--board); }
[data-cmp]::before { content: ""; width: .8em; height: .8em; flex: none; transition: transform .2s var(--ease);
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat; }
[data-cmp]::after { content: "Compare"; }
[data-cmp][aria-pressed="true"]::before { transform: rotate(45deg); }
[data-cmp][aria-pressed="true"]::after { content: "Comparing"; }
.cmp-btn[aria-pressed="true"] { --bg: var(--board); --fg: var(--lime); }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } .row .rside { flex-direction: row; justify-content: space-between; align-items: center; } .row .rfacts .mini-ruler { width: 84px; } }

/* Map */
.map { position: relative; width: 100%; height: 340px; border-radius: var(--r-lg); overflow: hidden; background: var(--chalk-2); border: 1.5px solid var(--line); }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1.5rem; color: var(--ink-3); font-size: .92rem;
  background: var(--chalk) radial-gradient(circle at 1px 1px, var(--line-2) 1px, transparent 1.5px) 0 0 / 18px 18px; }
.map-fallback .btn { margin-top: .75rem; }
.maplibregl-popup-content { font-family: var(--f-text) !important; border: 2px solid var(--board); border-radius: 12px !important; box-shadow: 4px 4px 0 var(--board) !important; padding: .7rem .9rem !important; }
.maplibregl-popup-tip { display: none; }
.map-pop a { font: 750 1rem/1.25 var(--f-display); color: var(--board); text-decoration: none; display: block; }
.map-pop a:hover { text-decoration: underline; }
.map-pop span { font-size: .8rem; color: var(--ink-3); }
.maplibregl-ctrl-attrib { font-size: 10px !important; }
.map-legend {
  position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; max-width: calc(100% - 64px);
  background: rgba(255, 255, 255, .94); border: 1.5px solid var(--board); border-radius: 10px; padding: .35rem .5rem; font-size: .76rem;
  box-shadow: 2px 2px 0 var(--board);
}
.map-legend b { font-weight: 700; margin-right: .15rem; }
.map-legend .gchip { font-style: normal; min-width: 1.3rem; height: 1.3rem; font-size: .7rem; }
.map-legend .me-key { display: inline-flex; align-items: center; gap: .3rem; margin-left: .35rem; font-weight: 700; }
.map-legend .me-key i { width: 14px; height: 15px; background: var(--board); clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%); position: relative; }
.map .maplibregl-ctrl-bottom-right { z-index: 3; }
.pin {
  width: 26px; height: 28px; cursor: pointer; filter: drop-shadow(2px 2px 0 var(--board));
}
.pin.me { width: 38px; height: 41px; }

/* School profile */
.school-head { padding-block: 1.25rem 2.25rem; }
.school-head .tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
.school-head h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); line-height: 1; letter-spacing: -.045em; font-weight: 800; margin-top: .9rem; max-width: 22ch; }
.school-head .where { display: flex; align-items: center; gap: .45rem; margin-top: 1rem; color: var(--ink-2); font-size: 1.05rem; }
.school-head .where .i { color: var(--ink-3); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.school-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; padding-block: 2rem 3rem; }
.school-main { display: grid; gap: 1.5rem; min-width: 0; }
.panel { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 1.9rem); min-width: 0; }
.panel > h2 { font-size: 1.45rem; letter-spacing: -.03em; margin-bottom: 1.1rem; display: flex; align-items: center; gap: .6rem; }
.panel > h2 .i { width: 1.2rem; height: 1.2rem; color: var(--ink-3); }
.panel .about { font-size: 1.05rem; color: var(--ink-2); line-height: 1.65; }
.panel .about + .about { margin-top: .8rem; }
.dl { display: grid; grid-template-columns: minmax(140px, 40%) 1fr; }
.dl dt, .dl dd { padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .97rem; }
.dl dt { color: var(--ink-3); padding-right: 1rem; }
.dl dd { font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }
.school-side { display: grid; gap: 1rem; position: sticky; top: calc(var(--header-h) + 1rem); }
.contact-list { list-style: none; padding: 0; display: grid; gap: .9rem; }
.contact-list li { display: flex; gap: .75rem; align-items: flex-start; font-size: .97rem; line-height: 1.45; }
.contact-list .ico { --s: 2.1rem; }
.contact-list a { color: var(--link); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; }
.side-cta { background: var(--board); color: var(--paper); border-radius: var(--r-lg); padding: 1.5rem; }
.side-cta h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.side-cta p { color: #B9C8BF; font-size: .93rem; margin-bottom: 1rem; }
.side-lime { background: var(--lime); border: 2px solid var(--board); border-radius: var(--r-lg); padding: 1.4rem; text-decoration: none; color: var(--board); display: block; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.side-lime:hover { transform: translate(-2px, -2px); box-shadow: var(--pop); }
.side-lime h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.side-lime p { font-size: .93rem; color: var(--board-3); }
.side-lime .more { margin-top: .7rem; font-weight: 700; display: inline-flex; gap: .3rem; align-items: center; }
.nearby { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.nearby .row { grid-template-columns: 1fr; }
.nearby .row .rside { flex-direction: row; justify-content: space-between; align-items: center; }
.dist { font-size: .8rem; font-weight: 700; color: var(--ink-2); background: var(--chalk-2); border-radius: var(--pill); padding: .15rem .55rem; white-space: nowrap; }
.source-note { font-size: .84rem; color: var(--ink-3); line-height: 1.6; }
.source-note a { color: var(--link); }
@media (max-width: 980px) { .school-body { grid-template-columns: 1fr; } .school-side { position: static; } }
@media (max-width: 600px) {
  .actions { gap: .4rem; }
  .actions .btn { min-height: 42px; padding: .45rem .85rem; font-size: .92rem; }
  .school-stats { grid-template-columns: 1fr 1fr; }
}

.school-top { padding-bottom: 0; }
.school-stats { margin-top: -1.5rem; position: relative; }
.school-stats .stat { box-shadow: var(--lift); }
.nearby-sec { padding-top: 1rem; }
.state-dots { margin: 0; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; box-shadow: var(--lift); }
.state-dots img { width: 100%; height: auto; max-height: 360px; object-fit: contain; }
.state-dots figcaption { font-size: .8rem; color: var(--ink-3); margin-top: .5rem; text-align: right; }
/* Promo band */
.promo {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center; padding: 1.4rem 1.6rem; border-radius: var(--r-lg);
  background: var(--board); color: var(--paper); text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.promo:hover { transform: translate(-2px, -2px); box-shadow: var(--pop-lime); }
.promo strong { font: 750 1.3rem/1.2 var(--f-display); letter-spacing: -.02em; display: block; }
.promo span { color: #B9C8BF; font-size: .93rem; }
.promo em { font-style: normal; font-weight: 700; color: var(--lime); white-space: nowrap; display: inline-flex; gap: .35rem; align-items: center; }
@media (max-width: 640px) { .promo { grid-template-columns: 1fr; } }

/* Compare tray */
.cmp-tray {
  position: fixed; left: 50%; bottom: 1rem; z-index: 150; transform: translate(-50%, 140%); transition: transform .3s var(--ease);
  width: min(760px, calc(100% - 1.5rem)); background: var(--board); color: var(--paper); border-radius: 18px; padding: .65rem .65rem .65rem 1.1rem;
  display: flex; align-items: center; gap: .75rem; box-shadow: 0 20px 40px -10px rgba(18, 36, 29, .5), 4px 4px 0 var(--lime);
  visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s;
}
.cmp-tray.show { transform: translate(-50%, 0); visibility: visible; transition: transform .3s var(--ease); }
body.has-tray { padding-bottom: 84px; }
.cmp-tray .lbl { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.cmp-tray ul { flex: 1; min-width: 0; list-style: none; padding: 0; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.cmp-tray li { display: inline-flex; align-items: center; gap: .3rem; background: var(--board-2); border-radius: var(--pill); padding: .3rem .35rem .3rem .75rem; font-size: .85rem; white-space: nowrap; max-width: 200px; }
.cmp-tray li span { overflow: hidden; text-overflow: ellipsis; }
.cmp-tray li button { border: 0; background: transparent; color: #9FB3A8; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.cmp-tray li button:hover { background: rgba(255, 255, 255, .12); color: var(--paper); }
.cmp-tray li .i { width: .85rem; height: .85rem; }
.cmp-tray .btn { min-height: 42px; }
@media (max-width: 600px) { .cmp-tray ul { display: none; } .cmp-tray { justify-content: space-between; } }

/* 10. Compare page ------------------------------------------------------- */
.cmp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 640px; }
.cmp th, .cmp td { padding: .9rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: .97rem; }
.cmp thead th { vertical-align: bottom; background: var(--chalk); border-bottom: 1.5px solid var(--line-2); }
.cmp tbody th { width: 170px; color: var(--ink-3); font-weight: 700; font-size: .86rem; position: sticky; left: 0; background: var(--paper); z-index: 1; }
.cmp thead th:first-child { position: sticky; left: 0; z-index: 2; }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
.cmp .sname { font: 750 1.15rem/1.2 var(--f-display); letter-spacing: -.015em; color: var(--board); text-decoration: none; display: block; margin-top: .45rem; }
.cmp .sname:hover { text-decoration: underline; text-decoration-color: var(--lime-3); text-decoration-thickness: 3px; }
.cmp .scity { font-size: .85rem; color: var(--ink-3); font-weight: 400; }
.cmp .rm { border: 0; background: transparent; color: var(--ink-3); font-size: .8rem; font-weight: 700; padding: .2rem 0; margin-top: .4rem; display: inline-flex; gap: .25rem; align-items: center; }
.cmp .rm:hover { color: #B5361F; }
.cmp .num { font: 800 1.5rem/1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cmp .best { display: inline-block; margin-left: .35rem; vertical-align: middle; }
.cmp .ruler { min-width: 180px; }
.cmp-empty { text-align: center; padding: 3rem 1rem; }
.cmp-empty .ico { margin: 0 auto 1rem; }

/* 11. Articles (guides, legal, about) ---------------------------------- */
.post-head { padding-block: 1.25rem 2rem; text-align: left; }
.post-head h1, .article-header h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; margin-top: .9rem; }
.post-meta, .article-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: 1.1rem; color: var(--ink-3); font-size: .93rem; }
.article-meta span + span::before { content: "·"; margin-right: 1.2rem; color: var(--ink-4); }
.article-header { max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding: 1.25rem var(--gutter) 2rem; }
.article-tag { display: inline-flex; align-items: center; gap: .5em; font: 700 .78rem/1.2 var(--f-text); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.article-tag::before { content: ""; width: .8em; height: .8em; background: var(--lime); flex: none; clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%); box-shadow: inset 0 0 0 1.5px var(--board); }
.hero-image { max-width: calc(940px + 2 * var(--gutter)); margin: 0 auto 2.5rem; padding-inline: var(--gutter); }
.hero-image img { width: 100%; border-radius: var(--r-lg); border: 2px solid var(--board); box-shadow: 8px 8px 0 var(--board); }
.toc { max-width: var(--measure); margin: 0 auto 2.5rem; padding: 1.4rem 1.6rem; border: 2px solid var(--board); border-radius: var(--r-lg); background: var(--lime-soft); width: calc(100% - 2 * var(--gutter)); }
.toc-title { font: 750 1.15rem var(--f-display); margin-bottom: .6rem; letter-spacing: -.02em; }
.toc ol { padding-left: 1.3rem; display: grid; gap: .25rem; font-size: .97rem; }
.toc a { color: var(--board); text-decoration: none; }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--lime-3); text-decoration-thickness: 3px; }

.prose, .article-body { max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); font-size: 1.1rem; line-height: 1.75; color: var(--ink-2); }
.article-body { padding-bottom: 2rem; }
.prose > * + *, .article-body > * + * { margin-top: 1.25rem; }
.prose h2, .article-body h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--board); margin-top: 3rem; letter-spacing: -.035em; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3, .article-body h3 { font-size: 1.35rem; color: var(--board); margin-top: 2.2rem; letter-spacing: -.02em; }
.prose h4, .article-body h4 { font: 700 1.05rem var(--f-text); color: var(--board); margin-top: 1.6rem; }
.prose h2 + *, .prose h3 + *, .article-body h2 + *, .article-body h3 + *, .article-body h4 + * { margin-top: .75rem; }
.prose a, .article-body a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(36, 72, 224, .35); }
.prose a:hover, .article-body a:hover { text-decoration-color: var(--link); }
.prose ul, .prose ol, .article-body ul, .article-body ol { padding-left: 1.4rem; }
.prose li + li, .article-body li + li { margin-top: .45rem; }
.prose ul li::marker, .article-body ul li::marker { color: var(--lime-3); font-size: 1.2em; }
.prose strong, .article-body strong { color: var(--board); }
.prose blockquote, .article-body blockquote {
  margin: 2rem 0; padding: .4rem 0 .4rem 1.4rem; border-left: 5px solid var(--lime); font: 650 1.35rem/1.4 var(--f-display); color: var(--board); letter-spacing: -.02em;
}
.article-body hr, .prose hr { border: 0; height: 2px; background: var(--line); margin-block: 2.5rem; }
.article-body img { border-radius: var(--r); }
.info-card, .neighborhood, .callout, .decision-box, .border-note {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem 1.4rem; font-size: 1rem; line-height: 1.65;
}
.article-body .info-card p, .article-body .neighborhood p { margin-top: .4rem; }
.info-card h4, .neighborhood h4 { font: 750 1.2rem var(--f-display); letter-spacing: -.02em; margin: 0 0 .3rem; color: var(--board); }
.card-detail { font-size: .88rem; color: var(--ink-3); margin-top: .5rem; }
.neighborhood .subtitle { font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.neighborhood .stats { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.neighborhood .stat { font-size: .82rem; background: var(--chalk-2); border: 0; border-radius: var(--pill); padding: .25rem .7rem; color: var(--ink-2); }
.callout, .decision-box, .border-note { background: var(--lime-soft); border: 2px solid var(--board); }
.comparison { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.5; display: block; overflow-x: auto; }
.comparison th { text-align: left; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: .7rem .7rem; border-bottom: 2px solid var(--board); white-space: nowrap; }
.comparison td { padding: .7rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.comparison tr:hover td { background: var(--chalk); }
.timeline { display: grid; gap: .3rem; }
.timeline-item { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px dashed var(--line-2); }
.timeline-date { font-weight: 700; font-size: .88rem; color: var(--board); background: var(--lime); border-radius: var(--pill); padding: .1rem .6rem; align-self: start; justify-self: start; }
.timeline-content { font-size: .98rem; }
.faq-section { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 1rem auto 0; padding: 0 var(--gutter) 2rem; }
.faq-section > h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.035em; margin-bottom: 1rem; }
.faq-item { border-top: 1.5px solid var(--line); padding-block: 1.2rem; }
.faq-item h3 { font-size: 1.2rem; letter-spacing: -.02em; margin-bottom: .4rem; }
.faq-item p { color: var(--ink-2); }
.faq-list details { border-top: 1.5px solid var(--line); }
.faq-list details:last-child { border-bottom: 1.5px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 0; font: 750 1.18rem/1.3 var(--f-display); letter-spacing: -.02em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; width: 1.9rem; height: 1.9rem; flex: none; border-radius: 50%; border: 1.5px solid var(--line-2); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312241D' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 1rem no-repeat; transition: transform .2s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(45deg); background-color: var(--lime); border-color: var(--board); }
.faq-list details p { padding-bottom: 1.2rem; color: var(--ink-2); max-width: 65ch; }
.faq-list details a { color: var(--link); }
.article-cta { max-width: var(--measure); width: calc(100% - 2 * var(--gutter)); margin: 1rem auto 3rem; padding: 2rem; border-radius: var(--r-lg); background: var(--board); color: var(--paper); text-align: left; }
.article-cta h3 { font-size: 1.6rem; letter-spacing: -.03em; }
.article-cta p { color: #B9C8BF; margin: .5rem 0 1.25rem; }
.article-cta a { display: inline-flex; align-items: center; gap: .4rem; background: var(--lime); color: var(--board); border: 2px solid var(--lime); padding: .7rem 1.2rem; border-radius: var(--pill); font-weight: 700; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.article-cta a:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--paper); }
.article-cta a + a { margin-left: .5rem; background: transparent; color: var(--paper); border-color: rgba(255, 255, 255, .35); }
.related { max-width: var(--measure); width: calc(100% - 2 * var(--gutter)); margin: 0 auto 4rem; }
.related > h3 { font-size: 1.3rem; letter-spacing: -.02em; margin-bottom: .6rem; }
.related > a { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .95rem 0; border-top: 1.5px solid var(--line); text-decoration: none; font-weight: 700; color: var(--board); }
.related > a::after { content: "→"; color: var(--ink-3); transition: transform .2s var(--ease); }
.related > a:hover::after { transform: translateX(4px); color: var(--board); }
.related > a:hover { text-decoration: underline; text-decoration-color: var(--lime-3); text-decoration-thickness: 3px; }
.legal-meta { color: var(--ink-3); font-size: .95rem; margin-top: .8rem; }

/* Guides index */
.post-card { display: grid; grid-template-rows: auto 1fr; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--board); transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
.post-card:hover { border-color: var(--board); transform: translate(-3px, -3px); box-shadow: var(--pop); }
.post-card img { aspect-ratio: 1200 / 630; width: 100%; object-fit: cover; border-bottom: 1.5px solid var(--line); }
.post-card .pc-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.post-card h3 { font-size: 1.28rem; letter-spacing: -.025em; line-height: 1.15; }
.post-card p { font-size: .95rem; color: var(--ink-3); line-height: 1.55; }
.post-card .pc-meta { margin-top: auto; padding-top: .4rem; display: flex; gap: 1rem; font-size: .84rem; color: var(--ink-3); }
.post-card.feature { grid-template-columns: 1.15fr 1fr; grid-template-rows: auto; grid-column: 1 / -1; }
.post-card.feature img { height: 100%; border-bottom: 0; border-right: 1.5px solid var(--line); }
.post-card.feature .pc-body { padding: clamp(1.4rem, 3vw, 2.4rem); justify-content: center; }
.post-card.feature h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.035em; }
@media (max-width: 800px) { .post-card.feature { grid-template-columns: 1fr; } .post-card.feature img { border-right: 0; border-bottom: 1.5px solid var(--line); height: auto; } }

/* Home ------------------------------------------------------------------ */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5.5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero .h-display { margin-top: 1.1rem; }
.hero:has(> .wrap > .crumbs:first-child) { padding-top: .25rem; }
.hero > .wrap > .crumbs:first-child + .eyebrow { margin-top: 2rem; }
.hero .lede { margin-top: 1.25rem; }
.hero-search { margin-top: 2rem; max-width: 640px; }
.hero-search .searchbox { min-height: 70px; }
.hero-popular { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: 1.1rem; font-size: .95rem; color: var(--ink-3); }
.hero-popular a { color: var(--board); font-weight: 700; text-decoration: underline; text-decoration-color: var(--lime-3); text-decoration-thickness: 2px; }
.hero-popular a:hover { background: var(--lime); text-decoration: none; }
.hero-map { position: relative; margin: 0; background: var(--board); border-radius: 28px; padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 2.5vw, 2rem) clamp(2.5rem, 5vw, 3.5rem); box-shadow: 10px 10px 0 var(--lime); transform: rotate(1.2deg); }
.hero-map img { width: 100%; height: auto; }
.sticker { position: absolute; background: var(--paper); color: var(--board); border: 2px solid var(--board); border-radius: 12px; padding: .45rem .8rem; font-size: .88rem; font-weight: 700; box-shadow: 3px 3px 0 var(--board); white-space: nowrap; }
.sticker b { font: 800 1.2rem/1 var(--f-display); letter-spacing: -.03em; margin-right: .2rem; }
.sticker.s1 { left: -1.2rem; top: 12%; transform: rotate(-4deg); background: var(--lime); }
.sticker.s2 { right: -1rem; top: 46%; transform: rotate(3deg); }
.sticker.s3 { left: 22%; bottom: -1.1rem; transform: rotate(-2deg); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-map { transform: none; margin-inline: .5rem; }
  .sticker.s1 { left: -.4rem; } .sticker.s2 { right: -.4rem; }
}
.trust { background: var(--board); color: var(--paper); padding-block: 1rem; }
.trust .checks { justify-content: center; }
.trust .checks li { font-size: .92rem; }

.feature-card { padding: 1rem 1rem 1.5rem; }
.feature-card h3, .feature-card p, .feature-card .more { margin-inline: .5rem; }
.fc-art { height: 170px; border-radius: 14px; overflow: hidden; background: var(--chalk); border: 1.5px solid var(--line); position: relative; }
.fc-art svg { width: 100%; height: 100%; }
.fc-search { padding: 1.1rem; display: grid; gap: .55rem; align-content: start; }
.fs-box { display: flex; align-items: center; gap: .5rem; background: var(--paper); border: 2px solid var(--board); border-radius: 10px; padding: .45rem .7rem; box-shadow: 3px 3px 0 var(--board); font-weight: 700; margin-bottom: .3rem; }
.fs-box .i { width: 1rem; height: 1rem; color: var(--ink-3); }
.fs-box i { width: 2px; height: 1.05rem; background: var(--board); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.fs-row { display: flex; align-items: center; gap: .55rem; background: var(--paper); border-radius: 8px; padding: .38rem .6rem; border: 1px solid var(--line); }
.fs-row .gchip { font-style: normal; }
.fs-row span { height: .5rem; width: 70%; background: var(--chalk-2); border-radius: 4px; }
.fs-row em { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--ink-3); }
.fc-compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: 1rem; }
.fcol { background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: .6rem; display: grid; gap: .3rem; align-content: start; }
.fcol.on { border: 2px solid var(--board); box-shadow: 3px 3px 0 var(--board); }
.fcol .t { height: .5rem; width: 80%; background: var(--chalk-2); border-radius: 4px; margin-bottom: .3rem; }
.fcol .mini-ruler { width: 100%; height: 7px; }
.fcol b { font: 800 1.3rem/1 var(--f-display); letter-spacing: -.03em; margin-top: .45rem; }
.fcol small { font-size: .68rem; color: var(--ink-3); margin-top: -.2rem; }
.fcol em { font-style: normal; font-weight: 700; font-size: .8rem; justify-self: start; padding: .05rem .4rem; border-radius: 6px; background: var(--chalk-2); }
.fcol.on em { background: var(--lime); }

.fit-grid .card { padding: 1.4rem 1.3rem; }
.fit-grid .card h3 { font-size: 1.18rem; }
.fit-grid .card p { font-size: .93rem; }

.lessons-band { position: relative; overflow: hidden; }
.lessons-band::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 440px; background: var(--board-2); clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%); pointer-events: none; }
.lessons-band .wrap { position: relative; z-index: 1; }
.lessons-band .h-2 { color: var(--paper); }
.subject-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.subject-tiles a { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 14px; background: var(--board-2); border: 1.5px solid rgba(255, 255, 255, .08); color: var(--paper); text-decoration: none; font-weight: 700; transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s; }
.subject-tiles a:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--lime); border-color: var(--lime); }
.subject-tiles .ico { --s: 2.4rem; }

.newsletter { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 1.5rem 3rem; align-items: center; }
.newsletter p { color: var(--board-3); margin-top: .5rem; font-weight: 500; }
.newsletter .searchbox { min-height: 62px; }
.newsletter .searchbox input { font-size: 1.05rem; }
@media (max-width: 800px) { .newsletter { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .searchbox { flex-wrap: wrap; padding: .5rem; }
  .searchbox > .i { display: none; }
  .searchbox input { padding-inline: .6rem; }
  .searchbox .btn { width: 100%; }
  .hero-search .searchbox, .header-search .searchbox { flex-wrap: nowrap; }
  .hero-search .searchbox .btn { width: auto; padding-inline: 1rem; }
}

/* Lessons ------------------------------------------------------------- */
.lesson-art { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: clamp(.6rem, 2vw, 1.2rem); transform: rotate(-4deg); }
.lesson-art .ico { --s: clamp(4rem, 9vw, 6.5rem); filter: drop-shadow(4px 4px 0 var(--board)); }
.lesson-art .ico:nth-child(2n) { transform: translateY(18%); }
.lesson-art .ico.soft::before { background: var(--paper); }
@media (max-width: 900px) { .lesson-art { display: none; } }
.subject-card { text-align: left; font: inherit; color: inherit; width: 100%; display: flex; flex-direction: column; align-items: flex-start; cursor: pointer; }
.subject-card h3 { margin-top: .9rem; }
.sc-formats { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: .9rem; }
.subject-card h3 + p { margin-top: 0; }
.sc-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .85rem; }
.sc-tags span { font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: var(--pill); background: var(--chalk-2); color: var(--ink-2); }
.subject-card .more { margin-top: auto; padding-top: 1rem; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; }
.steps li { counter-increment: step; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.6rem; height: 2.8rem; margin-bottom: 1rem; font: 800 1.3rem/1 var(--f-display); background: var(--lime); padding-top: .35rem; clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%); }
.steps h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.steps p { color: var(--ink-3); font-size: .97rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Articles + legal --------------------------------------------------- */
.post-top { padding-bottom: 1.5rem; }
.post-top .article-header { padding-bottom: 1.5rem; }
.post-top + .hero-image { margin-top: 0; padding-top: 2.5rem; }
.post-top + .article-body, .post-top + .toc { margin-top: 2.5rem; }
.legal { padding-block: 2.5rem 4.5rem; }
.legal h2 { font-size: 1.5rem; }

/* About: the mark --------------------------------------------------- */
.brand-mark-art { background: var(--lime-soft); border: 2px solid var(--board); border-radius: 28px; display: grid; place-items: center; padding: clamp(2rem, 6vw, 4.5rem); box-shadow: 8px 8px 0 var(--board); }
.brand-mark-art svg { width: min(220px, 60%); height: auto; }

/* 404 ---------------------------------------------------------------- */
.not-found { padding-block: clamp(3rem, 8vw, 6rem); }
.nf-sign { width: 150px; height: 160px; background: var(--board); clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%); display: grid; place-items: center; padding-top: 2.5rem; }
.nf-sign span { font: 800 2.6rem/1 var(--f-display); color: var(--lime); letter-spacing: -.04em; }

/* Schola Grade ------------------------------------------------------------
   A is the brand highlighter; every grade keeps blackboard text (>9:1) and always shows its letter. */
:root { --g-a: #D3F54B; --g-b: #9FE3B4; --g-c: #FFE873; --g-d: #FFC27A; --g-f: #FF8A80; --g-n: #ECEFE3; }
.g-a { --g: var(--g-a); } .g-b { --g: var(--g-b); } .g-c { --g: var(--g-c); } .g-d { --g: var(--g-d); } .g-e, .g-f { --g: var(--g-f); } .g-n { --g: var(--g-n); }
.gchip {
  display: inline-grid; place-items: center; min-width: 1.85rem; height: 1.85rem; padding: 0 .3rem; border-radius: 8px;
  background: var(--g, var(--g-n)); color: var(--board); border: 1.5px solid var(--board); font: 800 .95rem/1 var(--f-display); flex: none;
}
.gchip.none { border-color: var(--line-2); color: var(--ink-3); font-weight: 700; }
.gchip.sm { min-width: 1.5rem; height: 1.5rem; font-size: .78rem; border-radius: 6px; border-width: 1.2px; }
.grade-sticker { display: grid; justify-items: center; gap: .35rem; text-decoration: none; color: var(--board); flex: none; }
.grade-sticker .gm { width: 104px; height: 112px; padding: 5px; background: var(--board); clip-path: polygon(50% 0, 100% 37%, 100% 100%, 0 100%, 0 37%); }
.grade-sticker .gm i {
  display: grid; place-items: center; width: 100%; height: 100%; padding-top: 26%; background: var(--g); font: 800 3.2rem/1 var(--f-display);
  font-style: normal; letter-spacing: -.04em; clip-path: polygon(50% 0, 100% 37%, 100% 100%, 0 100%, 0 37%);
}
.grade-sticker span { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.grade-sticker:hover span { text-decoration: underline; text-decoration-color: var(--lime-3); text-decoration-thickness: 3px; }
.school-head-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 2.5rem; align-items: end; }
@media (max-width: 640px) { .school-head-grid { grid-template-columns: 1fr; } .grade-sticker { justify-items: start; grid-auto-flow: column; align-items: center; gap: .8rem; } .grade-sticker .gm { width: 72px; height: 78px; padding: 4px; } .grade-sticker .gm i { font-size: 2.2rem; } }

.grade-panel .gp-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.4rem; }
.grade-panel .gp-head .gchip { min-width: 3.6rem; height: 3.6rem; font-size: 1.9rem; border-radius: 14px; border-width: 2px; box-shadow: 3px 3px 0 var(--board); }
.grade-panel .gp-title { font: 750 1.3rem/1.2 var(--f-display); letter-spacing: -.02em; }
.grade-panel .gp-sub { font-size: .9rem; color: var(--ink-3); margin-top: .2rem; }
.grade-panel .gp-sub a, .grade-note a { color: var(--link); font-weight: 700; }
.gbars { display: grid; gap: .9rem; }
.gbar { display: grid; grid-template-columns: minmax(150px, 1.15fr) 2fr 5.5rem; gap: .9rem; align-items: center; font-size: .95rem; }
.gbar .gl { font-weight: 700; }
.gbar .gl small { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-3); }
.gbar .gt { height: 12px; border-radius: 6px; background: var(--chalk-2); position: relative; overflow: hidden; }
.gbar .gt::after { content: ""; position: absolute; inset: 0 auto 0 50%; width: 2px; background: rgba(18, 36, 29, .18); }
.gbar .gf { height: 100%; border-radius: 6px; background: var(--board); }
.gbar .gv { text-align: right; font: 800 1.1rem/1 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gbar .gv small { display: block; font: 400 .7rem var(--f-text); letter-spacing: 0; color: var(--ink-3); margin-top: .15rem; }
.grade-note { font-size: .84rem; color: var(--ink-3); margin-top: 1.2rem; line-height: 1.55; }
@media (max-width: 600px) { .gbar { grid-template-columns: 1fr auto; } .gbar .gt { grid-column: 1 / -1; order: 3; } }

.embed { border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 1rem 1.2rem; }
.embed summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.embed summary::-webkit-details-marker { display: none; }
.embed summary::before { content: "</>"; font: 700 .8rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--chalk-2); border-radius: 6px; padding: .3rem .4rem; }
.embed p { font-size: .88rem; color: var(--ink-3); margin: .7rem 0; }
.embed p a { color: var(--link); font-weight: 700; }
.embed code { display: block; font: .74rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--chalk); border: 1px solid var(--line); border-radius: 10px; padding: .7rem; word-break: break-all; color: var(--ink-2); }

/* Long-form generated pages (/grades/, /developers/) ----------------------- */
.prose code { font: .86em ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--chalk-2); padding: .1rem .35rem; border-radius: 5px; color: var(--board); }
.prose pre { background: var(--board); color: #DCE5DF; border-radius: var(--r); padding: 1.1rem 1.25rem; overflow-x: auto; font-size: .82rem; line-height: 1.6; max-height: 440px; box-shadow: 5px 5px 0 var(--lime); }
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.api-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; line-height: 1.5; border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.api-table th { text-align: left; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: .75rem .9rem; background: var(--chalk); border-bottom: 1.5px solid var(--line); }
.api-table td { padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.api-table tr:last-child td { border-bottom: 0; }
@media (max-width: 700px) { .api-table { display: block; overflow-x: auto; } }
.badge-demo { margin-block: 1rem; }
.partner-form { background: var(--paper); border: 2px solid var(--board); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 1.75rem); box-shadow: 6px 6px 0 var(--board); }
.pf-status { font-weight: 700; color: var(--board-3); margin-top: .75rem; }

/* 12. Utilities + motion ---------------------------------------------- */
.center { text-align: center; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; } .mt-6 { margin-top: 3rem; }
.stack > * + * { margin-top: 1rem; }
.row-wrap { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.nowrap { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer, .cmp-tray, .toolbar, .city-map, .actions { display: none !important; }
  body { font-size: 11pt; }
}

/* Home: Schola Grades band */
.grades-band { background: var(--lime-soft); border-block: 2px solid var(--board); }
.grade-demo { background: var(--paper); border: 2px solid var(--board); border-radius: var(--r-lg); padding: 1.25rem; box-shadow: 8px 8px 0 var(--board); display: grid; gap: .55rem; }
.gd-row { display: grid; grid-template-columns: auto 9.5rem 1fr auto; gap: .8rem; align-items: center; font-weight: 700; font-size: .95rem; }
.gd-row i { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--board) var(--w), var(--chalk-2) var(--w)); }
.gd-row b { font-size: .82rem; color: var(--ink-3); min-width: 5.5rem; text-align: right; }
@media (max-width: 520px) { .gd-row { grid-template-columns: auto 1fr auto; } .gd-row i { display: none; } }
.prose > h2:first-child, .article-body > h2:first-child { margin-top: 0; }
.rtags { display: inline-flex; align-items: center; gap: .4rem; }
