/* ----------------------------------------------------------------
 * Alternative Schools in Portugal — styles
 * Warm & natural palette: sage, cream, terracotta, soft brown.
 * ---------------------------------------------------------------- */

:root {
  --cream:        #faf6ef;
  --cream-soft:   #f3ecdf;
  --paper:        #fffdf7;
  --ink:          #2d2a24;
  --ink-soft:     #5a5448;
  --ink-mute:     #877f6f;
  --line:         #e6dfce;
  --sage:         #5b7553;
  --sage-dark:    #3f5639;
  --sage-soft:    #c7d3bf;
  --terracotta:   #c97b4f;
  --terracotta-d: #a85c33;
  --honey:        #b8923f;
  --olive:        #7a8b3c;
  --bark:         #8b6f47;
  --stone:        #8a8a8a;

  --radius:       6px;
  --radius-lg:    12px;
  --max-width:    1180px;
  --max-narrow:   780px;

  --font-serif:   'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --shadow-sm:    0 1px 2px rgba(45, 42, 36, 0.06);
  --shadow-md:    0 4px 16px rgba(45, 42, 36, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.15;
}
h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

p { margin: 0 0 1em; }
em { font-style: italic; }

a {
  color: var(--sage-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
a:hover { color: var(--terracotta-d); }

ul { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }

/* Layout ---------------------------------------------------------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow {
  max-width: var(--max-narrow);
}

.section {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.section-eyebrow,
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-d);
  margin: 0 0 12px;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 640px;
}

/* Header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-logo {
  width: 30px;
  height: 30px;
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.brand:hover .brand-logo {
  transform: rotate(-6deg) scale(1.05);
}
.site-nav {
  display: flex;
  gap: 22px;
}
.site-nav a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--sage-dark);
}

@media (max-width: 720px) {
  .site-nav { display: none; }
}

/* Hero ------------------------------------------------------------ */

.hero {
  position: relative;
  padding: 96px 0 80px;
  background:
    radial-gradient(ellipse at 80% -10%, rgba(199, 211, 191, 0.55), transparent 55%),
    radial-gradient(ellipse at 0% 30%, rgba(201, 123, 79, 0.10), transparent 50%),
    var(--cream);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 940px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 48px;
  }
}

.hero-text { min-width: 0; }
.hero h1 {
  max-width: none;
}
.hero .lead {
  max-width: 640px;
  font-size: 1.18rem;
  color: var(--ink-soft);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 0;
}

.hero-illustration-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}
.hero-illustration {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(63, 86, 57, 0.10));
}
@media (max-width: 940px) {
  .hero-illustration { max-width: 440px; }
}
@media (max-width: 540px) {
  .hero-illustration { max-width: 320px; }
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.08s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--sage);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--sage-dark);
  color: var(--paper);
}
.btn-ghost {
  background: transparent;
  color: var(--sage-dark);
  border-color: var(--sage);
}
.btn-ghost:hover {
  background: var(--sage-soft);
  color: var(--sage-dark);
}

.hero-caveat {
  margin-top: 56px;
  padding: 18px 22px;
  background: var(--paper);
  border-left: 4px solid var(--terracotta);
  border-radius: 4px;
  font-size: 0.97rem;
  color: var(--ink-soft);
  max-width: 760px;
  box-shadow: var(--shadow-sm);
}
.hero-caveat strong { color: var(--ink); }

/* Legal section --------------------------------------------------- */

.legal {
  background: var(--cream);
}
.legal h3 {
  margin-top: 36px;
  font-size: 1.3rem;
}
.legal-list li {
  color: var(--ink-soft);
}
.legal-list li::marker { color: var(--sage); }

.source-line {
  font-size: 0.9rem;
  color: var(--ink-mute);
}

/* Legend ---------------------------------------------------------- */

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 24px 0 36px;
}
.legend-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.legend-swatch {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 5px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line);
}
.legend-text {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.legend-text strong { display: block; color: var(--ink); margin-bottom: 2px; font-size: 0.97rem; }

/* Choosing guide -------------------------------------------------- */

.choosing {
  background: var(--cream);
}
.choosing h3 {
  margin-top: 32px;
  font-size: 1.25rem;
}
.choosing p {
  color: var(--ink-soft);
}

/* FAQ ------------------------------------------------------------- */

.faq {
  background: var(--cream-soft);
}
.faq-item {
  margin: 22px 0;
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-left: 4px solid var(--sage);
}
.faq-item h3 {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  margin: 0 0 8px;
  color: var(--ink);
}
.faq-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.99rem;
  line-height: 1.6;
}
.faq-item:hover {
  border-left-color: var(--terracotta);
}

/* Map ------------------------------------------------------------- */

.map-section {
  background: var(--cream-soft);
}
.map-wrap {
  margin-top: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  background: var(--paper);
}
#leaflet-map {
  width: 100%;
  height: 620px;
}
@media (max-width: 720px) {
  #leaflet-map { height: 460px; }
}

.map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.filter-chip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.filter-chip:hover { border-color: var(--ink-mute); }
.filter-chip.active {
  background: var(--sage-dark);
  border-color: var(--sage-dark);
  color: var(--paper);
}
.filter-chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.filter-chip.active .filter-chip-dot {
  box-shadow: 0 0 0 2px var(--paper);
}

/* Leaflet popup styling override */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius);
  font-family: var(--font-sans);
}
.leaflet-popup-content {
  margin: 14px 16px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}
.leaflet-popup-content h4 {
  font-family: var(--font-serif);
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.2;
}
.leaflet-popup-content .popup-meta {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.leaflet-popup-content .popup-link {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.86rem;
}

/* Custom marker style */
.school-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid var(--paper);
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

/* Search bar ------------------------------------------------------ */

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

.search-row {
  margin: 24px 0 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.directory-search {
  flex: 1 1 320px;
  min-width: 240px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.directory-search:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(91, 117, 83, 0.18);
}
.directory-search::placeholder { color: var(--ink-mute); }
.search-status {
  font-size: 0.88rem;
  color: var(--ink-mute);
  font-style: italic;
}

/* Directory ------------------------------------------------------- */

.directory {
  background: var(--cream);
}
.category-block {
  margin-top: 56px;
}
.category-block:first-of-type {
  margin-top: 32px;
}
.category-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0 14px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
}
.category-color {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 9px;
}
.category-title h3 {
  margin: 0 0 4px;
  font-size: 1.45rem;
}
.category-title p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
  max-width: 760px;
}
.category-count {
  margin-left: auto;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--ink-mute);
}

.school-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.school-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  scroll-margin-top: 80px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}
.school-card:hover {
  border-color: var(--ink-mute);
  box-shadow: var(--shadow-md);
}

.school-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.school-card h4 {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.25;
  margin: 0;
  font-weight: 600;
}
.school-card h4 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}
.school-card h4 a:hover { color: var(--sage-dark); }
.category-title h3 a {
  color: inherit;
  text-decoration: none;
}
.category-title h3 a:hover { color: var(--sage-dark); }
.card-foot-primary {
  font-weight: 600;
  color: var(--sage-dark) !important;
}
.status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-pill.verified  { background: #e2ecdb; color: #3f5639; }
.status-pill.lead      { background: #f5e7d4; color: #8b6f1f; }
.status-pill.uncertain { background: #ece8e2; color: #6f6557; }

.school-area {
  font-size: 0.88rem;
  color: var(--ink-mute);
  margin: 4px 0 10px;
}

.school-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}
.school-tag {
  font-size: 0.75rem;
  background: var(--cream-soft);
  color: var(--ink-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

.school-desc {
  font-size: 0.96rem;
  color: var(--ink-soft);
  margin: 0 0 14px;
  line-height: 1.55;
}

.school-meta {
  font-size: 0.86rem;
  color: var(--ink-mute);
  margin: 0 0 10px;
}
.school-meta dt {
  display: inline;
  font-weight: 600;
  color: var(--ink-soft);
}
.school-meta dd {
  display: inline;
  margin: 0 0 0 4px;
}
.school-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.legal-note {
  font-size: 0.86rem;
  background: var(--cream-soft);
  border-left: 3px solid var(--bark);
  padding: 10px 14px;
  border-radius: 3px;
  margin: 10px 0 14px;
  color: var(--ink-soft);
}
.legal-note strong { color: var(--ink); }

/* Reviews block */
.reviews {
  margin: 14px 0 14px;
  padding: 12px 14px;
  background: var(--cream-soft);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.reviews-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.reviews-rating {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
}
.reviews-stars { color: var(--honey); letter-spacing: 0.05em; font-size: 0.95rem; }
.reviews-count { font-size: 0.82rem; color: var(--ink-mute); }
.reviews-label {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
}
.reviews-themes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--ink-soft);
}
.reviews-theme-row span:first-child {
  font-weight: 600;
  margin-right: 6px;
}
.reviews-theme-pos span:first-child { color: var(--sage-dark); }
.reviews-theme-con span:first-child { color: var(--terracotta-d); }

.school-card-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.86rem;
}
.school-card-foot a {
  color: var(--sage-dark);
  text-decoration: none;
  font-weight: 500;
}
.school-card-foot a:hover { color: var(--terracotta-d); text-decoration: underline; }

.network-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--sage-soft);
  color: var(--sage-dark);
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

/* Suggest --------------------------------------------------------- */

.suggest {
  background: var(--cream-soft);
}
.form-embed {
  margin-top: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.form-embed iframe {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  display: block;
}
.form-placeholder {
  text-align: center;
  padding: 24px 8px;
  color: var(--ink-soft);
}
.form-placeholder p { margin: 0 0 12px; }

/* Resources ------------------------------------------------------- */

.resources {
  background: var(--cream);
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.resource {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.resource h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}
.resource h3 a {
  color: var(--ink);
  text-decoration: none;
}
.resource h3 a:hover { color: var(--sage-dark); }
.resource p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

/* Footer ---------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: #d8d4cb;
  padding: 56px 0 36px;
}
.site-footer a { color: var(--sage-soft); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer-logo {
  width: 26px;
  height: 26px;
  display: block;
  flex-shrink: 0;
}
.footer-meta {
  font-size: 0.92rem;
  color: #b9b3a6;
  margin: 0 0 10px;
  max-width: 560px;
}
.footer-meta strong { color: #d8d4cb; }
.footer-method { font-size: 0.86rem; }
.footer-updated {
  font-size: 0.82rem;
  color: #918a7c;
  margin-top: 14px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.94rem;
}
.footer-credits {
  grid-column: 1 / -1;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #3a352d;
  font-size: 0.82rem;
  color: #918a7c;
}

/* ----------------------------------------------------------------
 * Per-school page (/schools/{slug}/)
 * ---------------------------------------------------------------- */

.breadcrumbs {
  padding-top: 28px;
  padding-bottom: 8px;
  font-size: 0.88rem;
  color: var(--ink-mute);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.breadcrumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--sage-dark);
  text-decoration: underline;
}
.breadcrumbs span[aria-current] {
  color: var(--ink);
  font-weight: 500;
}

.school-hero {
  background: var(--cream);
  padding: 32px 0 56px;
}
.hero-cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.cat-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.12s ease;
}
.cat-pill:hover { opacity: 0.85; color: #fff; }

.school-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 8px;
}
.hero-area {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.hero-cta-row {
  margin-top: 20px;
}

.school-body {
  padding: 56px 0 56px;
  background: var(--cream-soft);
}
.school-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 48px;
  align-items: start;
}
@media (max-width: 820px) {
  .school-body-grid { grid-template-columns: 1fr; gap: 32px; }
}
.school-article h2 {
  margin-top: 32px;
  font-size: 1.55rem;
}
.school-article h2:first-of-type { margin-top: 0; }
.school-article p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.school-sidebar {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 88px;
}
@media (max-width: 820px) {
  .school-sidebar { position: static; }
}

.quick-facts {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.quick-facts h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}
.quick-facts dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 16px;
  row-gap: 8px;
  font-size: 0.94rem;
}
.quick-facts dt {
  color: var(--ink-mute);
  font-weight: 500;
}
.quick-facts dd {
  margin: 0;
  color: var(--ink);
}
.quick-facts a { color: var(--sage-dark); text-decoration: none; }
.quick-facts a:hover { text-decoration: underline; }

.mini-map-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.mini-map-wrap h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}
#mini-map {
  width: 100%;
  height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-soft);
}

.reviews-section,
.sources-section {
  padding: 40px 0 0;
}
.reviews-section h2,
.sources-section h2 {
  font-size: 1.4rem;
  margin: 0 0 16px;
}
.sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.sources-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.sources-list a {
  color: var(--sage-dark);
  text-decoration: none;
  font-weight: 500;
}
.sources-list a:hover { color: var(--terracotta-d); text-decoration: underline; }

.related-section {
  padding: 56px 0 0;
}
.related-section h2 {
  font-size: 1.5rem;
  margin: 0 0 20px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.related-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.08s ease;
}
.related-card:hover {
  border-color: var(--ink-mute);
  transform: translateY(-2px);
  color: var(--ink);
}
.related-card h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 0 0 6px;
  color: var(--ink);
}
.related-area {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin: 0 0 8px;
}
.related-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}

.prev-next-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 48px 0 0;
}
.prev-next-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.prev-next-nav a:hover {
  border-color: var(--sage);
}
.prev-next-nav .next-link {
  text-align: right;
  align-items: flex-end;
}
.prev-next-label {
  font-size: 0.78rem;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.prev-next-name {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}

.back-cta {
  padding: 56px 0 80px;
  text-align: center;
}

/* ----------------------------------------------------------------
 * Per-category page (/schools/{cat-slug}/)
 * ---------------------------------------------------------------- */

.cat-hero {
  background: var(--cream);
  padding: 28px 0 56px;
  position: relative;
}
.cat-color-bar {
  display: block;
  width: 60px;
  height: 5px;
  border-radius: 3px;
  margin-bottom: 18px;
}
.cat-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  margin: 0 0 16px;
  line-height: 1.1;
}
.cat-hero .lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 680px;
}
.cat-count {
  margin-top: 18px;
  color: var(--ink-mute);
  font-size: 0.95rem;
}
.cat-count strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-right: 4px;
}

.cat-list h2 {
  font-size: 1.45rem;
  margin: 0 0 28px;
}

.other-cats {
  background: var(--cream-soft);
}
.other-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.other-cat-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.08s ease;
}
.other-cat-link:hover {
  transform: translateY(-2px);
  color: var(--ink);
}
.other-cat-link strong {
  font-family: var(--font-serif);
  font-size: 1rem;
}
.other-cat-link span {
  font-size: 0.84rem;
  color: var(--ink-mute);
}
