/* ==========================================================================
   guide.css — the evergreen guide layer.

   Loaded AFTER style.css, exactly like article.css. It adds only what the
   guide pages need and overrides nothing: every rule below is scoped to a
   .guide-* / .answer / .breadcrumb / .related / .table-scroll class that does
   not exist anywhere else on the site.

   Two rules carried over from article.css, for the same reasons:
     - gutters, chrome and touch targets in px, never rem. In rem they grow
       with the reader's text size, and at 400% zoom that ate a 320px phone
       down to a 160px column.
     - overflow-wrap: break-word on every letterspaced uppercase line, because
       they cannot break at the tracking and overflow at high zoom otherwise.

   Full-bleed colour bands were trialled on this site in August 2026 and
   deliberately reverted — the centred block on a paper ground is the intended
   look. Do not reopen that.
   ========================================================================== */

.guide {
  /* Local tokens. If style.css later exposes its own custom properties,
     point these at them rather than duplicating the values. */
}

:root {
  /* Contrast is measured against the site's actual ground, #d8d4ca — the
     paper-grey the 1200px canvas sits on. That is considerably darker than a
     white page, and it is what every guide colour has to clear. The three text
     colours below were derived against it and re-checked against the two
     lighter grounds the guide also uses: #f4f1e7 (the answer panel) and #fff
     (inside tables). All three clear 4.5:1 on all three. */
  --g-ink: #1d2a22;           /* 10.1:1 on the paper ground */
  --g-muted: #4f5d53;         /* 4.7:1  — was #5d6b61, which failed at 3.8 */
  --g-forest: #142b20;        /* 10.2:1 */
  --g-gold: #a8813c;          /* decorative only: rules and hairlines. At
                                 2.4:1 on the ground it is not usable for text
                                 and not usable for a focus ring either. */
  --g-gold-text: #6e562b;     /* 4.7:1 — the brand hue darkened until it clears
                                 on the paper ground. Used for every gold text
                                 and for focus rings, which need 3:1 as
                                 non-text contrast. */
  --g-gold-soft: #d8c9a4;
  --g-rule: #d9d5c7;
  --g-panel: #f4f1e7;
  --g-panel-edge: #e2ddcc;
  --g-warn: #874827;          /* 4.8:1 on the paper ground */
  --g-max: 1200px;
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */

.breadcrumb {
  margin: 22px auto 0;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--g-muted);
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  overflow-wrap: break-word;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--g-gold-soft);
  margin-right: 10px;
}

.breadcrumb a { color: var(--g-muted); }
.breadcrumb [aria-current="page"] { color: var(--g-ink); }

/* --------------------------------------------------------------------------
   Page head
   -------------------------------------------------------------------------- */

.guide-head {
  margin: 30px auto 0;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--g-rule);
}

.guide-kicker {
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--g-gold-text);
  margin: 0 0 14px;
  overflow-wrap: break-word;
}

.guide-head h1 {
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-weight: 600;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--g-forest);
  text-wrap: balance;
  overflow-wrap: break-word;
}

.guide-standfirst {
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.55;
  color: var(--g-muted);
  max-width: 62ch;
  margin: 0;
}

.guide-updated {
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--g-muted);
  margin: 18px 0 0;
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   The answer box — the first thing on the page, and the passage that gets
   quoted by search engines and language models. Keep it short and factual.
   -------------------------------------------------------------------------- */

.answer {
  margin: 26px auto 0;
  padding: 20px 22px;
  background: var(--g-panel);
  border: 1px solid var(--g-panel-edge);
  border-left: 3px solid var(--g-gold);
}

.answer p {
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: clamp(16px, 2.1vw, 18px);
  line-height: 1.58;
  margin: 0;
  max-width: 66ch;
  color: var(--g-ink);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.guide-section {
  margin: 46px auto 0;
}

.guide-section > h2 {
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-weight: 600;
  font-size: clamp(25px, 3.6vw, 34px);
  line-height: 1.14;
  color: var(--g-forest);
  margin: 0 0 18px;
  padding-top: 14px;
  border-top: 1px solid var(--g-rule);
  text-wrap: balance;
  overflow-wrap: break-word;
}

.guide-section h3 {
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-weight: 600;
  font-size: clamp(20px, 2.6vw, 25px);
  line-height: 1.2;
  color: var(--g-forest);
  margin: 32px 0 10px;
  overflow-wrap: break-word;
}

.guide-section h3:first-child { margin-top: 0; }

.guide-section p,
.guide-section li {
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: clamp(15.5px, 2vw, 17px);
  line-height: 1.66;
  color: var(--g-ink);
}

.guide-section p { max-width: 66ch; margin: 0 0 14px; }
.guide-section ul,
.guide-section ol { max-width: 66ch; padding-left: 20px; margin: 0 0 16px; }
.guide-section li { margin-bottom: 9px; }
.guide-section li::marker { color: var(--g-gold-text); }

.guide-section ul.plain { list-style: none; padding-left: 0; }
.guide-section ul.plain li {
  padding: 11px 0;
  border-bottom: 1px solid var(--g-rule);
  margin-bottom: 0;
}
.guide-section ul.plain li:last-child { border-bottom: none; }

.muted { color: var(--g-muted); }

.note,
.source-note,
.src {
  font-size: 14px !important;
  line-height: 1.55;
  color: var(--g-muted);
}

.src { font-size: 13px !important; }

.warn {
  font-size: 14.5px !important;
  color: var(--g-warn);
  border-left: 2px solid var(--g-warn);
  padding-left: 14px;
}

.flag {
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g-warn);
  white-space: nowrap;
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   Tables — wide content scrolls inside its own container so the page body
   never scrolls sideways. This is the rule that keeps 0px horizontal overflow
   at 320px.
   -------------------------------------------------------------------------- */

/* A horizontally scrolling region has to be reachable by keyboard, otherwise a
   keyboard user cannot see the right-hand columns at all. tabindex="0" on the
   container (set in the markup) plus a visible focus ring is the fix. */
.table-scroll:focus-visible {
  outline: 2px solid var(--g-gold-text);
  outline-offset: 2px;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 20px;
  border: 1px solid var(--g-panel-edge);
  background: #fff;
}

.table-scroll table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 14.5px;
  line-height: 1.5;
}

.table-scroll th,
.table-scroll td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--g-rule);
  vertical-align: top;
  color: var(--g-ink);
}

.table-scroll thead th {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--g-muted);
  background: var(--g-panel);
  white-space: nowrap;
  overflow-wrap: break-word;
}

.table-scroll tbody tr:last-child td { border-bottom: none; }

.table-scroll td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table-scroll td.tight { white-space: nowrap; }

/* The facts table on a school profile has no visible header row. */
.table-scroll table.facts thead { display: none; }
.table-scroll table.facts td:first-child {
  width: 34%;
  color: var(--g-muted);
  font-size: 13px;
}

.conf {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid var(--g-rule);
  color: var(--g-muted);
  white-space: nowrap;
  overflow-wrap: break-word;
}
.conf-official { color: var(--g-forest); border-color: var(--g-gold-soft); }
.conf-unverified { color: var(--g-warn); border-color: var(--g-warn); }
.conf-third_party { color: var(--g-warn); border-color: var(--g-gold-soft); }

/* --------------------------------------------------------------------------
   School blocks on the fees page
   -------------------------------------------------------------------------- */

.school-fee {
  padding: 26px 0 6px;
  border-top: 1px solid var(--g-rule);
}
.school-fee:first-child { border-top: none; padding-top: 0; }

.school-fee h3 { margin-top: 0; }
.school-fee h3 a { color: var(--g-forest); }

/* --------------------------------------------------------------------------
   Question and answer blocks
   -------------------------------------------------------------------------- */

.qa {
  padding: 20px 0;
  border-bottom: 1px solid var(--g-rule);
}
.qa:last-child { border-bottom: none; }
.qa h3 { margin: 0 0 8px; }
.qa p { margin: 0; }

/* --------------------------------------------------------------------------
   Related links
   -------------------------------------------------------------------------- */

.related {
  margin: 56px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--g-rule);
}

.related h2 {
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--g-gold-text);
  margin: 0 0 16px;
  font-weight: 400;
  overflow-wrap: break-word;
}

.related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

@media (min-width: 720px) {
  .related ul { grid-template-columns: repeat(2, 1fr); gap: 2px 26px; }
}

.related a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--g-rule);
  text-decoration: none;
  color: var(--g-ink);
}

.related a strong {
  display: block;
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--g-forest);
  line-height: 1.2;
}

.related a span {
  display: block;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 14px;
  color: var(--g-muted);
  line-height: 1.45;
  margin-top: 3px;
}

.related a:hover strong,
.related a:focus-visible strong { color: var(--g-gold-text); }

/* --------------------------------------------------------------------------
   Focus — visible everywhere, gold so it reads over both the paper ground and
   the dark green footer.
   -------------------------------------------------------------------------- */

.breadcrumb a:focus-visible,
.guide-section a:focus-visible,
.related a:focus-visible,
.answer a:focus-visible {
  outline: 2px solid var(--g-gold-text);
  outline-offset: 2px;
}

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

/* --------------------------------------------------------------------------
   States used in the comparison tables.

   Colour is never the only carrier — each state also reads as a word, so the
   table works in greyscale, for a screen reader, and for anyone who does not
   distinguish the hues.
   -------------------------------------------------------------------------- */

.yes,
.no,
.unk,
.on-request {
  font-size: 13px;
  white-space: nowrap;
  overflow-wrap: break-word;
}

.yes { color: var(--g-forest); }
.no { color: var(--g-warn); }
.unk,
.on-request { color: var(--g-muted); font-style: italic; }

/* The note explaining why figures are withheld. Same panel as .answer but
   quieter, so it reads as a caveat rather than as the answer itself. */
.answer.policy-note {
  background: transparent;
  border-left-color: var(--g-gold-soft);
  margin-top: 14px;
}

.answer.policy-note p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--g-muted);
}

/* Comparison tables carry long prose in narrow columns, so they need a
   comfortable measure rather than the compact treatment used elsewhere. */
.table-scroll table.compare-table { min-width: 620px; }
.table-scroll table.compare-table td:first-child {
  width: 22%;
  color: var(--g-muted);
  font-size: 13px;
}
.table-scroll table.compare-table thead th:first-child { width: 22%; }

.table-scroll table.includes-table { min-width: 640px; }
.table-scroll table.includes-table td:first-child { white-space: nowrap; }

/* --------------------------------------------------------------------------
   The homepage band that points at the guide.
   Lives here rather than in style.css so the guide layer stays self-contained:
   guide.css can be dropped in or pulled out without touching the site's own
   stylesheet. Colours come from the tokens above, which were derived against
   the site's real paper ground.
   -------------------------------------------------------------------------- */

.guide-band {
  margin: 56px auto 0;
  padding: 30px 0 0;
  border-top: 1px solid var(--g-rule);
  display: grid;
  gap: 22px;
  align-items: end;
}

@media (min-width: 860px) {
  .guide-band { grid-template-columns: minmax(0, 1fr) auto; gap: 40px; }
}

.guide-band-kicker {
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--g-gold-text);
  margin: 0 0 10px;
  overflow-wrap: break-word;
}

.guide-band h2 {
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.1;
  color: var(--g-forest);
  margin: 0 0 10px;
  text-wrap: balance;
}

.guide-band-copy p:not(.guide-band-kicker) {
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: clamp(15.5px, 2vw, 17px);
  line-height: 1.6;
  color: var(--g-muted);
  max-width: 54ch;
  margin: 0;
}

.guide-band-link {
  display: inline-block;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--g-forest);
  text-decoration: none;
  padding: 16px 22px;
  border: 1px solid var(--g-gold-text);
  white-space: normal;
  overflow-wrap: break-word;
  min-height: 44px;   /* touch target */
}

.guide-band-link span { letter-spacing: 0; margin-left: 6px; }

.guide-band-link:hover,
.guide-band-link:focus-visible { background: var(--g-panel); }

.guide-band-link:focus-visible {
  outline: 2px solid var(--g-gold-text);
  outline-offset: 2px;
}
