:root {
  --page: #f6f4ef;
  --surface: #ffffff;
  --surface-alt: #fcfbf8;
  --header-tint: #faf8f3;
  --row-hover: #faf7f1;
  --border-strong: #ece7dd;
  --border-input: #e2ddd2;
  --border-row: #f0ece3;
  --chip-border: #e7e3da;
  --ink: #2f3a36;
  --heading: #2c3a35;
  --secondary: #5d6863;
  --muted: #6f7a74;
  --faint: #9a938a;
  --fainter: #a8aaa2;
  --muted-row: #9aa39d;
  --accent: #3f8f86;
  --accent-soft: rgba(63, 143, 134, .12);
  --accent-border: rgba(63, 143, 134, .35);
  --urgent: #d9594a;
  --high: #e0913a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: "Nunito Sans", "Noto Sans HK", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

::-webkit-scrollbar { height: 9px; width: 9px; }
::-webkit-scrollbar-thumb { background: #dcd6ca; border-radius: 9px; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  display: inline-block;
}

.hero h1 {
  margin: 0 0 7px;
  color: var(--heading);
  font-family: "Nunito", "Noto Sans HK", sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero h1 span {
  color: var(--muted);
  font-weight: 700;
}

.hero p {
  max-width: 660px;
  margin: 0;
  color: var(--secondary);
  font-size: 14.5px;
  line-height: 1.5;
}

.hero p span { color: #86908a; }

.hero-meta {
  text-align: right;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.7;
}

.hero-meta strong {
  display: block;
  color: var(--secondary);
  font-weight: 700;
}

.hero-meta span { display: block; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--chip-border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--secondary);
  box-shadow: 0 1px 2px rgba(70, 55, 30, .04);
  cursor: pointer;
}

.chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
}

.chip-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.chip-count {
  font-family: "Nunito", sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.chip-label {
  font-size: 12.5px;
  font-weight: 700;
}

.reminders-section { margin-bottom: 26px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  color: var(--heading);
  font-family: "Nunito", "Noto Sans HK", sans-serif;
  font-size: 16px;
  font-weight: 800;
}

.section-head h2 span {
  color: #86908a;
  font-weight: 700;
}

.section-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.section-actions span {
  color: var(--faint);
  font-size: 12.5px;
  white-space: nowrap;
}

.reminders-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 3px 2px 10px;
  scroll-snap-type: x proximity;
}

.reminder-card {
  flex: 0 0 266px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--high);
  border-radius: 14px;
  padding: 14px 15px;
  box-shadow: 0 2px 6px rgba(70, 55, 30, .05);
}

.reminder-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.reminder-countdown {
  color: var(--high);
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}

.reminder-date {
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.reminder-card h3 {
  margin: 0 0 7px;
  color: var(--heading);
  font-family: "Nunito", "Noto Sans HK", sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.28;
}

.reminder-start {
  margin: -2px 0 8px;
  color: #6f8892;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.reminder-card p {
  min-height: 36px;
  margin: 0 0 13px;
  color: var(--secondary);
  font-size: 12.5px;
  line-height: 1.45;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(70, 55, 30, .04);
}

.filter-card input {
  flex: 1 1 240px;
  min-width: 200px;
}

.filter-card input,
.filter-card select {
  padding: 10px 13px;
  border: 1px solid var(--border-input);
  border-radius: 10px;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 14px;
}

.filter-card select {
  cursor: pointer;
}

.filter-card input:focus,
.filter-card select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(63, 143, 134, .16);
}

.reset-button {
  padding: 9px 14px;
  border: 1px solid rgba(63, 143, 134, .4);
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 3px 10px;
  color: var(--faint);
  font-size: 13px;
}

.results-row b { color: var(--secondary); }

.results-row div:last-child {
  color: var(--fainter);
  font-size: 12px;
}

.table-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(70, 55, 30, .05);
}

.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

th {
  padding: 12px 14px;
  background: var(--header-tint);
  border-bottom: 1px solid var(--border-strong);
  color: var(--faint);
  text-align: left;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

th.chevron-col {
  width: 30px;
  padding-left: 16px;
  padding-right: 8px;
}

.sort-head {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  user-select: none;
}

td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-row);
  vertical-align: top;
}

.school-row {
  color: var(--ink);
  cursor: pointer;
}

.school-row.is-muted { color: var(--muted-row); }
.school-row:hover { background: var(--row-hover); }

.chevron-cell {
  padding-left: 16px;
  padding-right: 8px;
}

.chevron {
  display: inline-block;
  color: #bfc4bd;
  font-size: 11px;
  transition: transform .15s;
}

.school-row.is-expanded .chevron { transform: rotate(90deg); }

.school-name {
  min-width: 200px;
  max-width: 300px;
  color: inherit;
  font-family: "Nunito", "Noto Sans HK", sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
}

.mobile-tags,
.mobile-date-label { display: none; }

.nowrap { white-space: nowrap; }

.category-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 8px;
  background: #f1efe9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.district-pill {
  display: inline-block;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.deadline-main {
  color: inherit;
  font-size: 13.5px;
  font-weight: 600;
}

.date-main {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
}

.deadline-countdown {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
}

.link-button,
.calendar-button,
.ghost-link,
.export-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.link-button {
  padding: 6px 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.calendar-button {
  padding: 6px 11px;
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.ghost-link {
  padding: 6px 11px;
  border: 1px solid var(--accent-border);
  background: transparent;
  color: var(--accent);
}

.export-button {
  padding: 7px 12px;
  border: 1px solid rgba(63, 143, 134, .3);
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
}

.empty-cell {
  padding: 48px 20px;
  color: var(--faint);
  text-align: center;
  font-size: 14px;
}

.empty-cell .reset-button { margin-top: 12px; }

.detail-row td {
  padding: 0;
  background: var(--header-tint);
  border-bottom: 1px solid var(--border-strong);
}

.detail-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px 22px;
  padding: 16px 20px;
  animation: fade-up .2s ease;
}

.detail-full { grid-column: 1 / -1; }

.detail-label {
  margin-bottom: 4px;
  color: var(--fainter);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.detail-value {
  color: #4a544f;
  font-size: 13.5px;
  line-height: 1.55;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

footer {
  max-width: 820px;
  margin-top: 22px;
  color: var(--fainter);
  font-size: 12px;
  line-height: 1.65;
}

footer span { color: #b4b6ad; }

@media (max-width: 640px) {
  .page-shell { padding: 22px 14px 46px; }
  .hero h1 { font-size: 26px; }
  .hero-meta { text-align: left; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .filter-card input, .filter-card select, .reset-button { width: 100%; }

  .results-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .table-card {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .table-scroll { overflow-x: visible; }

  table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead { display: none; }

  tbody {
    display: grid;
    gap: 10px;
  }

  tr,
  td { display: block; }

  td {
    padding: 0;
    border-bottom: 0;
  }

  .school-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "school status"
      "start deadline"
      "link link";
    gap: 12px 14px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(70, 55, 30, .05);
  }

  .school-row:hover { background: var(--surface); }

  .school-row.is-expanded {
    border-bottom-color: transparent;
    border-radius: 12px 12px 0 0;
  }

  .chevron-cell,
  .category-cell,
  .district-cell { display: none; }

  .school-cell { grid-area: school; }
  .status-cell {
    grid-area: status;
    align-self: start;
    justify-self: end;
  }
  .start-cell { grid-area: start; }
  .deadline-cell { grid-area: deadline; }
  .link-cell {
    grid-area: link;
    display: flex;
    justify-content: flex-start;
  }

  .school-name {
    min-width: 0;
    max-width: none;
    font-size: 15px;
    line-height: 1.32;
  }

  .mobile-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 7px;
  }

  .status-badge {
    max-width: 138px;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .mobile-date-label {
    display: block;
    margin-bottom: 4px;
    color: var(--fainter);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .date-main,
  .deadline-main {
    font-size: 13px;
    line-height: 1.25;
  }

  .deadline-countdown {
    margin-top: 4px;
    font-size: 11.5px;
  }

  .link-button {
    width: 100%;
    justify-content: center;
    padding: 8px 11px;
  }

  .detail-row {
    display: block;
    margin-top: -10px;
  }

  .detail-row td {
    display: block;
    background: var(--surface-alt);
    border: 1px solid var(--border-strong);
    border-top: 0;
    border-radius: 0 0 12px 12px;
  }

  .detail-panel {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 14px;
  }

  .detail-actions .calendar-button,
  .detail-actions .ghost-link {
    width: 100%;
    justify-content: center;
  }

  .empty-cell {
    padding: 34px 18px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
  }
}


/* SEO/GEO preview additions. The production tracker stylesheet remains unchanged. */
:root {
  --page: #f4f7f6;
  --surface-alt: #f8faf9;
  --header-tint: #f7f9f8;
  --border-strong: #dfe6e3;
  --border-input: #d5dedb;
  --border-row: #e8edeb;
  --ink: #2b3734;
  --heading: #172824;
  --secondary: #586763;
  --muted: #687873;
  --faint: #7c8a85;
  --accent: #22675f;
  --accent-soft: rgba(34, 103, 95, .1);
  --accent-border: rgba(34, 103, 95, .3);
  --blue: #326f8a;
  --coral: #b85f52;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans HK", sans-serif;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid var(--border-strong);
  backdrop-filter: blur(10px);
}

.site-header-inner,
.site-footer-inner,
.site-footer-meta {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header-inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.brand img { flex: 0 0 auto; }

.brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
}

.site-nav a {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--accent); }

.tracker-hero {
  align-items: center;
  margin-top: 8px;
  margin-bottom: 18px;
}

.tracker-hero h1 { max-width: 720px; }

.tracker-hero h1 span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .55em;
  font-weight: 700;
}

.tracker-hero p { max-width: 760px; }

.trust-strip {
  margin: 0 0 18px;
  padding: 13px 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  color: var(--secondary);
  font-size: 13px;
}

.trust-strip strong { color: var(--heading); }
.trust-strip a { color: var(--accent); font-weight: 800; text-decoration: none; }

.tracker-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 30px 0 14px;
}

.tracker-heading h2,
.guide-band h2 { margin: 0; color: var(--heading); font-size: 22px; }

.tracker-heading > p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: right;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.table-card table { table-layout: fixed; }
.table-card th:nth-child(1) { width: 28px; }
.table-card th:nth-child(2) { width: 20%; }
.table-card th:nth-child(3) { width: 10%; }
.table-card th:nth-child(4) { width: 10%; }
.table-card th:nth-child(5) { width: 14%; }
.table-card th:nth-child(6) { width: 16%; }
.table-card th:nth-child(7) { width: 14%; }
.table-card th:nth-child(8) { width: 16%; }

.table-card .start-cell,
.table-card .deadline-cell,
.table-card .link-cell { white-space: normal; }

.table-card .link-cell { display: table-cell; }
.table-card .link-cell > * { margin: 2px; }

.compact-link {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 11px;
  text-decoration: none;
}

.status-open { background: #e3f3ea; color: #1d7050; }
.status-upcoming { background: #e6f1f6; color: #286b83; }
.status-pending { background: #eceef8; color: #505895; }
.status-closed { background: #edf0ee; color: #6c7771; }
.status-unpublished { background: #f0efec; color: #817b73; }

.guide-band {
  margin-top: 34px;
  padding: 26px 0 8px;
  border-top: 1px solid var(--border-strong);
}

.guide-band .section-head a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.guide-grid a,
.guide-index a {
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}

.guide-grid a:hover,
.guide-grid a:focus-visible,
.guide-index a:hover,
.guide-index a:focus-visible { border-color: var(--accent-border); }

.guide-grid strong { display: block; margin-bottom: 7px; color: var(--heading); font-size: 15px; }
.guide-grid span { color: var(--muted); font-size: 13px; line-height: 1.5; }

.school-guides-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--border-strong);
}

.school-guides-head h2 { margin: 0; }
.school-guides-head > p { max-width: 460px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; text-align: right; }

.school-guide-grid,
.school-guide-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.school-guide-grid a,
.school-guide-index a {
  min-width: 0;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}

.school-guide-grid a:hover,
.school-guide-grid a:focus-visible,
.school-guide-index a:hover,
.school-guide-index a:focus-visible { border-color: var(--accent-border); }

.school-guide-grid span,
.school-guide-index span { display: block; margin-bottom: 7px; color: var(--coral); font-size: 11px; font-weight: 800; }
.school-guide-grid strong,
.school-guide-index h2 { display: block; margin: 0 0 8px; color: var(--heading); font-size: 15px; line-height: 1.4; }
.school-guide-grid small,
.school-guide-index p { display: block; margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }

.tool-band {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border-strong);
}

.tool-band h2 { margin: 0; color: var(--heading); font-size: 22px; }
.tool-band .section-head a { color: var(--accent); font-size: 13px; font-weight: 800; text-decoration: none; }
.tool-intro { max-width: 760px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.tool-grid,
.tool-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.tool-grid a,
.tool-directory article {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
}

.tool-grid a { color: inherit; text-decoration: none; }
.tool-grid a:hover,
.tool-grid a:focus-visible { border-color: var(--accent-border); }
.tool-grid span { display: block; margin-bottom: 7px; color: var(--blue); font-size: 11px; font-weight: 800; }
.tool-grid strong { display: block; margin-bottom: 8px; color: var(--heading); font-size: 16px; }
.tool-grid small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.tool-directory article { display: flex; align-items: flex-start; flex-direction: column; }
.tool-directory h3 { font-size: 19px; }
.tool-directory .primary-link { margin-top: auto; }

.site-footer {
  max-width: none;
  margin-top: 56px;
  padding: 30px 0 18px;
  background: #1d2d29;
  color: #dce5e2;
}

.site-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.site-footer strong { color: #fff; font-size: 14px; }
.site-footer p { max-width: 560px; margin: 8px 0 0; color: #aebdb8; font-size: 12px; line-height: 1.6; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; }
.site-footer nav a { color: #dce5e2; font-size: 12px; font-weight: 700; text-decoration: none; }
.site-footer-meta { margin-top: 22px; padding-top: 14px; border-top: 1px solid #3a4a46; color: #8fa29c; font-size: 11px; }

.content-shell {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--faint);
  font-size: 12px;
}

.breadcrumb a { color: var(--accent); font-weight: 700; text-decoration: none; }

.school-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-strong);
}

.school-page-header h1,
.editorial-page h1,
.error-page h1 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.2;
  letter-spacing: 0;
}

.school-page-header p:not(.section-kicker) { margin: 10px 0 0; color: var(--muted); }

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--border-strong);
}

.fact-grid > div {
  min-width: 0;
  padding: 18px 16px 18px 0;
}

.fact-grid dt { color: var(--faint); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.fact-grid dd { margin: 7px 0 0; color: var(--heading); font-size: 14px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }

.content-section,
.editorial-page section {
  padding: 27px 0;
  border-bottom: 1px solid var(--border-strong);
}

.content-section h2,
.official-source-band h2,
.editorial-note h2,
.editorial-page h2 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: 20px;
  line-height: 1.3;
}

.content-section p,
.official-source-band p,
.editorial-note p,
.editorial-page p,
.editorial-page li {
  color: var(--secondary);
  font-size: 15px;
  line-height: 1.75;
}

.content-section p:last-child,
.editorial-page p:last-child { margin-bottom: 0; }

.source-context { color: var(--faint) !important; font-size: 13px !important; }

.official-source-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 28px 0;
  padding: 24px;
  background: #e9f1ef;
  border-left: 4px solid var(--accent);
}

.official-source-band p { max-width: 620px; margin: 0; font-size: 13px; }

.primary-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 5px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.editorial-note { padding: 24px 0 0; }
.inline-links { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 14px; }
.inline-links a, .editorial-page a { color: var(--accent); font-weight: 750; }
.editorial-page a.primary-link { color: #fff; }

.related-guide-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 28px 0;
  padding: 22px 0;
  border-top: 1px solid #cbdce3;
  border-bottom: 1px solid #cbdce3;
}

.related-guide-band h2 { margin: 0 0 8px; color: var(--heading); font-size: 20px; }
.related-guide-band p:not(.section-kicker) { max-width: 620px; margin: 0; color: var(--secondary); font-size: 14px; line-height: 1.6; }

.secondary-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--accent-border);
  border-radius: 5px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.editorial-page > header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-strong);
}

.editorial-page .lede {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--secondary);
  font-size: 18px;
  line-height: 1.6;
}

.byline { margin-top: 18px; color: var(--faint); font-size: 12px; font-weight: 700; }
.editorial-page ol { padding-left: 22px; }
.editorial-page h3 { margin: 0 0 7px; color: var(--heading); font-size: 16px; }

.change-log article {
  padding: 17px 0;
  border-top: 1px solid var(--border-row);
}

.change-log article:last-child { padding-bottom: 0; }
.change-log article p { margin: 0; }

.strategy-guide .quick-answer {
  margin: 26px 0 0;
  padding: 22px;
  background: #edf4f6;
  border-top: 0;
  border-bottom: 0;
  border-left: 4px solid var(--blue);
}

.strategy-guide .quick-answer p:last-child { margin: 0; color: var(--heading); font-size: 16px; line-height: 1.7; }

.milestone-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0 0;
  border-top: 1px solid var(--border-strong);
}

.milestone-list > div { min-width: 0; padding: 15px 14px 15px 0; border-bottom: 1px solid var(--border-row); }
.milestone-list dt { color: var(--faint); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.milestone-list dd { margin: 6px 0 0; color: var(--heading); font-size: 14px; font-weight: 750; line-height: 1.45; }

.source-actions { display: flex; flex: 0 0 auto; flex-direction: column; gap: 8px; }
.source-actions .secondary-link { background: #fff; }
.editorial-disclosure { border-bottom: 0 !important; }

.guide-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.guide-index a { display: block; }
.guide-index h2 { font-size: 17px; }
.guide-index p { margin: 0; font-size: 13px; }

.error-page { min-height: 56vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.error-page p { color: var(--muted); }

@media (max-width: 860px) {
  .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-grid, .guide-index, .school-guide-grid, .school-guide-index, .tool-grid, .tool-directory { grid-template-columns: 1fr; }
  .tracker-heading { align-items: flex-start; flex-direction: column; }
  .tracker-heading > p { text-align: left; }
  .school-guides-head { align-items: flex-start; flex-direction: column; }
  .school-guides-head > p { text-align: left; }
}

@media (max-width: 640px) {
  .site-header-inner,
  .site-footer-inner,
  .site-footer-meta,
  .content-shell { width: min(100% - 28px, 920px); }

  .site-header-inner { min-height: 58px; gap: 14px; }
  .brand span { display: none; }
  .site-nav { max-width: calc(100vw - 76px); gap: 16px; overflow-x: auto; }
  .site-nav a { font-size: 12px; }

  .chips {
    flex-wrap: nowrap;
    margin-right: -14px;
    padding-right: 14px;
    padding-bottom: 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }

  .trust-strip { grid-template-columns: 1fr; gap: 5px; }
  .trust-strip a { margin-top: 4px; }

  .school-row .link-cell {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .school-row .link-cell > * { width: 100%; justify-content: center; text-align: center; }

  .school-page-header { flex-direction: column; }
  .school-page-header .status-badge { max-width: none; }
  .fact-grid { grid-template-columns: 1fr; }
  .fact-grid > div { padding: 14px 0; border-bottom: 1px solid var(--border-row); }
  .fact-grid > div:last-child { border-bottom: 0; }

  .official-source-band { align-items: stretch; flex-direction: column; padding: 18px; }
  .official-source-band .primary-link { width: 100%; }
  .related-guide-band { align-items: stretch; flex-direction: column; }
  .related-guide-band .secondary-link { width: 100%; }
  .milestone-list { grid-template-columns: 1fr; }
  .source-actions { width: 100%; }
  .source-actions .primary-link,
  .source-actions .secondary-link { width: 100%; }
  .site-footer-inner { flex-direction: column; }
  .site-footer nav { justify-content: flex-start; }
}
