/* admission.yada.hk — design system
   Navy + amber, institutional and calm. Mobile-first. */

:root {
  --navy: #0f2b46;
  --navy-2: #1b3f62;
  --amber: #c8892b;
  --amber-soft: #f2e2c6;
  --bg: #f7f5f1;
  --surface: #ffffff;
  --ink: #16202b;
  --muted: #5a6b7b;
  --line: #dde3e8;
  --ok: #1e7a46;
  --warn: #b4761a;
  --bad: #a33a2f;

  --radius: 10px;
  --radius-sm: 6px;
  --wrap: 1120px;
  --pad: clamp(1rem, 4vw, 2rem);

  --font: "Noto Sans HK", "Noto Sans SC", "PingFang HK", "Microsoft JhengHei",
          system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(15, 43, 70, 0.06), 0 4px 14px rgba(15, 43, 70, 0.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--navy-2); text-decoration: none; }
a:hover { color: var(--amber); }

h1, h2, h3 { line-height: 1.25; color: var(--navy); margin: 0 0 0.5em; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; }
h2 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2 * var(--pad), var(--wrap)); margin: 0 auto; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 0.6rem 1rem;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--navy); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
  color: var(--amber-soft); font-weight: 800; font-size: 1.1rem;
  display: grid; place-items: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1.02rem; }
.brand-tagline { font-size: 0.72rem; color: var(--muted); }

.main-nav { display: flex; gap: 0.25rem; justify-content: center; flex-wrap: wrap; }
.main-nav a {
  padding: 0.45rem 0.7rem; border-radius: var(--radius-sm);
  color: var(--ink); font-size: 0.94rem; font-weight: 500;
}
.main-nav a:hover { background: var(--bg); }
.main-nav a.is-active { color: var(--navy); background: var(--amber-soft); }

.lang-switch { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang-switch a {
  padding: 0.2rem 0.55rem; border-radius: 999px; font-size: 0.8rem;
  color: var(--muted);
}
.lang-switch a.is-active { background: var(--navy); color: #fff; }

.nav-toggle {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.5rem; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--navy); display: block; }

/* ---------------------------------------------------------------- hero */
.hero {
  background:
    radial-gradient(1100px 400px at 88% -20%, rgba(200, 137, 43, 0.18), transparent 60%),
    linear-gradient(160deg, var(--navy), var(--navy-2));
  color: #fff;
  padding: clamp(2.2rem, 6vw, 4.2rem) 0;
}
.hero-inner { max-width: 780px; }
.hero-title { color: #fff; margin-bottom: 0.6rem; }
.hero-sub { color: #d7e2ec; font-size: 1.05rem; max-width: 62ch; }
.hero-search {
  display: flex; gap: 0.5rem; margin: 1.6rem 0 1rem;
  background: #fff; padding: 0.4rem; border-radius: 12px;
  box-shadow: var(--shadow);
}
.hero-search input {
  flex: 1; border: 0; padding: 0.75rem 0.9rem; font-size: 1rem;
  font-family: inherit; background: transparent; color: var(--ink); min-width: 0;
}
.hero-search input:focus { outline: 2px solid var(--amber); border-radius: 8px; }
.hero-search button {
  border: 0; background: var(--amber); color: #23180a;
  font-weight: 700; font-size: 0.95rem; padding: 0.75rem 1.4rem;
  border-radius: 9px; cursor: pointer; font-family: inherit;
}
.hero-search button:hover { filter: brightness(1.05); }
.hero-search--compact { margin-top: 0; box-shadow: none; border: 1px solid var(--line); background: var(--surface); }
.hero-stats { color: #c3d3e0; font-size: 0.92rem; }
.hero-stats a { color: var(--amber-soft); }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(1.8rem, 4vw, 3rem) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { margin-bottom: 1.1rem; }

.level-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.level-card {
  display: flex; flex-direction: column; gap: 0.25rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.level-card:hover { transform: translateY(-2px); border-color: var(--amber); }
.level-card-icon { font-size: 1.6rem; }
.level-card-title { font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.level-card-desc { color: var(--muted); font-size: 0.92rem; }
.level-card-count { margin-top: 0.5rem; font-size: 0.82rem; color: var(--amber); font-weight: 600; }

.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-block; padding: 0.4rem 0.85rem; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); font-size: 0.9rem; color: var(--ink);
}
.chip:hover { border-color: var(--amber); color: var(--navy); }

.district-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.5rem;
}
.district-tile {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 0.6rem 0.8rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.district-tile:hover { border-color: var(--amber); }
.district-name { font-size: 0.92rem; color: var(--ink); font-weight: 500; }
.district-links { display: flex; gap: 0.65rem; font-size: 0.78rem; }
.district-links a { color: var(--muted); }
.district-links a:hover { color: var(--amber); }
.district-links b { color: var(--navy); font-weight: 600; }
.district-count { color: var(--muted); font-size: 0.78rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { position: relative; padding: 1rem 1rem 1rem 3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step-num {
  position: absolute; left: 1rem; top: 1rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--amber-soft); color: var(--navy);
  font-weight: 700; font-size: 0.85rem; display: grid; place-items: center;
}
.step h3 { margin: 0 0 0.3rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.steps-stacked { grid-template-columns: 1fr; }

.text-link { color: var(--amber); font-weight: 600; }

.ask-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; background: var(--navy); color: #fff;
  border-radius: var(--radius); padding: 1.6rem;
}
.ask-banner h2 { color: #fff; margin-bottom: 0.3rem; }
.ask-banner p { margin: 0; color: #cfdbe6; }

/* ---------------------------------------------------------------- buttons */
.btn-primary, .btn-ghost {
  display: inline-block; font-family: inherit; font-size: 0.92rem; font-weight: 600;
  padding: 0.6rem 1.05rem; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent; text-align: center;
}
.btn-primary { background: var(--amber); color: #23180a; border-color: var(--amber); }
.btn-primary:hover { filter: brightness(1.06); color: #23180a; }
.btn-ghost { background: var(--surface); color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--amber); color: var(--navy); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* ---------------------------------------------------------------- page frame */
.page { padding: clamp(1.2rem, 3vw, 2rem) 0 3rem; }
.page-narrow { max-width: 780px; }
.page-head { margin: 0.5rem 0 1.4rem; }
.page-head p { color: var(--muted); }
.page-title { margin-bottom: 1rem; }
.page-count { color: var(--muted); font-size: 0.9rem; }

.crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.9rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--amber); }

/* ---------------------------------------------------------------- directory */
.directory { display: grid; grid-template-columns: 240px 1fr; gap: 1.6rem; align-items: start; }
.filters {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; position: sticky; top: 5rem;
}
.filter-group { margin-bottom: 1.1rem; }
.filter-group h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.4rem; }
.filter-opt { display: flex; align-items: center; gap: 0.5rem; padding: 0.28rem 0; font-size: 0.9rem; cursor: pointer; }
.filter-opt input { accent-color: var(--navy); }
.filter-actions { display: flex; gap: 0.5rem; }
.filters-toggle { display: none; margin-bottom: 0.8rem; }

.school-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.school-table th, .school-table td { text-align: left; padding: 0.7rem 0.9rem; font-size: 0.92rem; border-bottom: 1px solid var(--line); }
.school-table thead th { background: var(--navy); color: #fff; font-weight: 600; font-size: 0.84rem; letter-spacing: 0.02em; }
.school-table tbody tr:nth-child(even) { background: #fbfaf8; }
.school-table tbody tr:hover { background: var(--amber-soft); }
.sortable { cursor: pointer; user-select: none; }
.sortable::after { content: "↕"; opacity: 0.5; margin-left: 0.35rem; font-size: 0.8em; }
.school-link { font-weight: 600; color: var(--navy); }
.school-sub { display: block; font-size: 0.78rem; color: var(--muted); }

.school-cards { display: none; list-style: none; margin: 0; padding: 0; gap: 0.6rem; }
.school-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.school-card a { display: flex; flex-direction: column; padding: 0.85rem 1rem; }
.card-name { font-weight: 600; color: var(--navy); }
.card-sub { font-size: 0.78rem; color: var(--muted); }
.card-meta { margin-top: 0.35rem; font-size: 0.8rem; color: var(--muted); }

.empty-state { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.4rem; text-align: center; }

/* ---------------------------------------------------------------- school page */
.school-hero {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.6rem); margin-bottom: 1rem;
}
.school-name { margin-bottom: 0.15rem; }
.school-alt { color: var(--muted); margin-bottom: 0.6rem; }
.badge-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.badge {
  display: inline-block; padding: 0.22rem 0.6rem; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); font-size: 0.78rem; color: var(--muted);
}
.school-hero-actions { display: flex; flex-direction: column; gap: 0.5rem; justify-content: center; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.6rem); margin-bottom: 1rem;
}
.panel h2 { margin-bottom: 0.9rem; }

.school-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.school-columns .panel { margin-bottom: 0; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.timeline-item {
  display: grid; grid-template-columns: auto 1fr; gap: 0.9rem;
  padding: 0.9rem; border: 1px solid var(--line); border-left-width: 4px;
  border-radius: var(--radius-sm); background: #fcfbf9;
}
.timeline-item.is-open { border-left-color: var(--ok); background: #f2faf5; }
.timeline-item.is-upcoming { border-left-color: var(--warn); background: #fdf8ee; }
.timeline-item.is-closed { border-left-color: var(--bad); background: #fbf3f2; }
.timeline-body h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.timeline-dates { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 0 0 0.4rem; }
.timeline-dates div { display: flex; gap: 0.4rem; }
.timeline-dates dt { color: var(--muted); font-size: 0.85rem; }
.timeline-dates dd { margin: 0; font-weight: 600; font-size: 0.9rem; }
.timeline-note { color: var(--muted); font-size: 0.88rem; margin: 0 0 0.4rem; }
.source-link { font-size: 0.82rem; color: var(--amber); font-weight: 600; }

.status-pill {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}
.status-pill.is-open { background: #d6f0e0; color: var(--ok); }
.status-pill.is-upcoming { background: #f7e6c4; color: var(--warn); }
.status-pill.is-closed { background: #f3d9d6; color: var(--bad); }

.as-of { font-size: 0.8rem; color: var(--muted); margin: 0.8rem 0 0; }

.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; margin: 0; }
.fact { border-left: 3px solid var(--amber-soft); padding-left: 0.7rem; }
.fact dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.fact dd { margin: 0.15rem 0 0; font-weight: 500; }
.fee-line { display: block; font-size: 0.9rem; }

.doc-list, .related-list, .guide-list, .result-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { padding: 0.35rem 0; }
.related-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.related-list a { padding: 0.35rem 0.7rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; font-size: 0.88rem; }

.result-list { display: flex; flex-direction: column; gap: 0.5rem; }
.result-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1rem; }
.result-name { font-weight: 600; color: var(--navy); display: block; }
.result-sub { font-size: 0.78rem; color: var(--muted); }
.result-meta { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }

.guide-list { display: flex; flex-direction: column; gap: 0.7rem; }
.guide-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.guide-item h2 { margin-bottom: 0.2rem; font-size: 1.1rem; }

.prose { color: var(--ink); }
.prose h2, .prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose-lg { font-size: 1.02rem; }
.prose-lg h1 { margin-bottom: 1rem; }

.compare-scroll { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); min-width: 520px; }
.compare-table th, .compare-table td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 0.9rem; }
.compare-table thead th { background: var(--navy); color: #fff; }
.compare-table tbody th { background: var(--bg); font-weight: 600; color: var(--muted); font-size: 0.82rem; }
.mini-timeline { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; display: flex; flex-direction: column; gap: 0.3rem; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--navy); color: #cfdbe6; margin-top: 2rem; padding: 2rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.4rem; justify-content: space-between; align-items: flex-start; }
.footer-brand strong { color: #fff; font-size: 1.05rem; }
.footer-brand p { margin: 0.3rem 0 0; font-size: 0.88rem; max-width: 46ch; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: #cfdbe6; font-size: 0.9rem; }
.footer-links a:hover { color: var(--amber-soft); }
.footer-fine { width: 100%; margin: 0; font-size: 0.78rem; color: #8fa6bb; }

/* ---------------------------------------------------------------- widget */
.ada-widget { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60; }
.ada-launcher {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--navy); color: #fff; box-shadow: var(--shadow);
  font-size: 1.4rem; display: grid; place-items: center;
}
.ada-launcher:hover { background: var(--navy-2); }
.ada-panel {
  position: absolute; right: 0; bottom: 70px; width: min(370px, calc(100vw - 2rem));
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 43, 70, 0.22); display: none; flex-direction: column;
  overflow: hidden; max-height: min(560px, calc(100vh - 7rem));
}
.ada-panel.is-open { display: flex; }
.ada-head { background: var(--navy); color: #fff; padding: 0.8rem 1rem; display: flex; justify-content: space-between; align-items: center; }
.ada-head strong { font-size: 0.95rem; }
.ada-close { background: none; border: 0; color: #fff; font-size: 1.2rem; cursor: pointer; line-height: 1; }
.ada-log { flex: 1; overflow-y: auto; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; background: var(--bg); }
.ada-msg { max-width: 88%; padding: 0.6rem 0.8rem; border-radius: 12px; font-size: 0.9rem; white-space: pre-wrap; word-break: break-word; }
.ada-msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 3px; }
.ada-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.ada-msg.bot a { color: var(--amber); }
.ada-starters { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.6rem 0.9rem 0; }
.ada-starter { font-size: 0.78rem; padding: 0.3rem 0.6rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); cursor: pointer; font-family: inherit; }
.ada-starter:hover { border-color: var(--amber); }
.ada-form { display: flex; gap: 0.4rem; padding: 0.6rem 0.9rem; border-top: 1px solid var(--line); }
.ada-form input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.7rem; font-family: inherit; font-size: 0.9rem; min-width: 0; }
.ada-form button { border: 0; background: var(--amber); color: #23180a; font-weight: 700; border-radius: 8px; padding: 0 1rem; cursor: pointer; font-family: inherit; }
.ada-disclaimer { font-size: 0.68rem; color: var(--muted); padding: 0 0.9rem 0.6rem; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .nav-toggle { display: flex; }
  .main-nav {
    display: none; grid-column: 1 / -1; flex-direction: column; align-items: stretch;
    padding: 0.4rem 0; border-top: 1px solid var(--line);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 0.6rem 0.4rem; }
  .lang-switch { grid-row: 1; grid-column: 2; }
  .main-nav.is-open ~ .lang-switch { display: none; }

  .directory { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.is-open { display: block; }
  .filters-toggle { display: inline-block; }
  .school-table { display: none; }
  .school-cards { display: flex; flex-direction: column; }

  .school-columns { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .brand-tagline { display: none; }
  .hero-search { flex-direction: column; }
  .hero-search button { width: 100%; }
  .school-hero-actions { width: 100%; }
  .school-hero-actions .btn-primary, .school-hero-actions .btn-ghost { width: 100%; }
  .result-item { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .ask-banner { flex-direction: column; align-items: flex-start; }
  .ada-widget { right: 0.8rem; bottom: 0.8rem; }
  .ada-panel { width: calc(100vw - 1.2rem); right: -0.3rem; }
}

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

/* ----- compare picker ----- */
.compare-picker { margin-bottom: 1.4rem; }
.compare-picker-title { font-size: 1.05rem; margin: 0 0 0.2rem; color: var(--navy); }
.cmp-search { width: 100%; max-width: 26rem; padding: 0.5rem 0.7rem; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; margin: 0.4rem 0 0.6rem; background: #fff; }
.cmp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.15rem 1rem; max-height: 15rem; overflow: auto; padding: 0.2rem 0.1rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fcfcfd; }
.cmp-option { display: flex; gap: 0.45rem; align-items: center; padding: 0.32rem 0.45rem;
  border-radius: 6px; font-size: 0.9rem; cursor: pointer; }
.cmp-option:hover { background: var(--amber-soft, #fdf3dd); }
.cmp-option .muted { margin-left: auto; font-size: 0.78rem; }
.cmp-option.is-disabled { opacity: 0.45; cursor: not-allowed; }
.cmp-option input { flex: none; }
.cmp-actions { margin-top: 0.7rem; }
@media (max-width: 640px) {
  .cmp-list { grid-template-columns: 1fr; max-height: 12rem; }
  .compare-picker { padding: 0.85rem; }
}

/* ----- claim your school ----- */
.badge-unclaimed { border-style: dashed; }
.badge-school { background: #eef7f1; border-color: #bfe0cb; color: #235c3a; }
.claim-cta { margin: 0.7rem 0 0; font-size: 0.88rem; }
.claim-cta a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.claim-cta a:hover { color: var(--amber); }

.claim-panel form { margin: 0.8rem 0; }
.claim-form label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.35rem; }
.claim-form input {
  width: 100%; max-width: 26rem; padding: 0.6rem 0.75rem; font: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.claim-form input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.claim-form .btn-primary, .claim-form .btn-ghost { margin-top: 0.7rem; }
.field-hint { color: var(--muted); font-size: 0.82rem; margin: 0.35rem 0; }
.form-error {
  background: #fdecec; border: 1px solid #f0c2c2; color: #8a2020;
  padding: 0.6rem 0.8rem; border-radius: 8px; font-size: 0.88rem;
}
.claim-address { font-family: ui-monospace, monospace; background: var(--bg); padding: 0.45rem 0.7rem;
  border-radius: 7px; display: inline-block; font-size: 0.88rem; }
.claim-dev-link { word-break: break-all; font-size: 0.85rem; }
.claim-picker { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.claim-candidates { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex;
  flex-direction: column; gap: 0.45rem; }
.claim-candidates .btn-ghost { width: 100%; text-align: left; }
.claim-privacy { color: var(--muted); font-size: 0.78rem; border-top: 1px solid var(--line);
  padding-top: 0.8rem; margin-top: 1rem; }

/* ----- school portal ----- */
.portal-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; }
.portal-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.portal-schools { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.portal-schools a { display: block; padding: 0.85rem 1rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fcfbf9; }
.portal-schools a:hover { border-color: var(--amber); background: var(--amber-soft); }
.portal-field { border-bottom: 1px solid var(--line); padding-bottom: 0.9rem; margin-bottom: 0.9rem; }
.portal-field:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.portal-field label { display: block; font-weight: 600; font-size: 0.86rem; margin-bottom: 0.35rem; }
.portal-field textarea {
  width: 100%; padding: 0.6rem 0.7rem; font: inherit; font-size: 0.9rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; resize: vertical;
}
.portal-field-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.45rem; }
.portal-history td { font-size: 0.85rem; }
@media (max-width: 760px) {
  .school-columns { grid-template-columns: 1fr; }
  .portal-head { flex-direction: column; }
}
