:root {
  --ink: #16163a;
  --text: #2a2b45;
  --muted: #64667d;
  --line: #e4e5ef;
  --bg: #f4f5fb;
  --card: #ffffff;
  --gold: #ffcd3c;
  --c: #1e1b4b;                       /* page accent: set per subject on <body> */
  --focus: #2563eb;
  --display: "Unbounded", "Figtree", system-ui, sans-serif;
  --r-lg: 22px;
  --r-md: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  --tint: color-mix(in srgb, var(--c) 9%, white);
  --tint2: color-mix(in srgb, var(--c) 18%, white);
  --deep: color-mix(in srgb, var(--c) 82%, black);
  margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 "Figtree", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--c); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0 0 1rem; }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -0.01em; }
.block { margin-top: 3.5rem; }

/* Header */
header.site { background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .75rem; padding-bottom: .75rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.logo { width: 26px; height: 26px; fill: var(--c); }
.logo rect:nth-child(2) { fill: var(--gold); }
header nav { display: flex; gap: .3rem; }
header nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: .4rem .75rem; border-radius: 999px; }
header nav a:hover { background: var(--tint); }

/* Colour band hero */
.band { background: var(--c); color: #fff; position: relative; overflow: hidden; padding: 2.5rem 0 4.5rem; }
.band::before { content: ""; position: absolute; inset: auto -10% -60% auto; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), rgba(255,255,255,0) 65%); pointer-events: none; }
.band h1, .band h2 { color: #fff; }
.band a { color: #fff; }
.band .crumb { margin: 0 0 1rem; font-weight: 600; font-size: .95rem; opacity: .9; }
.band .lede { font-size: 1.15rem; line-height: 1.55; max-width: 38rem; color: rgba(255,255,255,.92); }
.subj { display: inline-block; background: var(--gold); color: var(--ink); padding: 0 .25em; border-radius: .18em; transform: rotate(-1.5deg); }
.stats { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.6rem 0 0; padding: 0; }
.stats span, .stats a { color: inherit; text-decoration: none; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: .35rem .9rem; font-size: .95rem; }
.stats b { font-weight: 700; }
.band.plain { padding-bottom: 3rem; }
.band.home { padding: 3.5rem 0 4.5rem; }
.band.home h1 { max-width: 16ch; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; position: relative; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 1.8rem; } }

/* Winner report card */
.winner { background: var(--card); color: var(--text); border-radius: var(--r-lg); padding: 1.5rem 1.5rem 1.2rem; box-shadow: 0 24px 50px -20px rgba(10, 10, 40, .45); position: relative; }
.winner .wtop { display: flex; justify-content: space-between; align-items: center; }
.winner h2 { color: var(--ink); font-size: 1.45rem; margin: .7rem 0 1rem; }
.badge { background: var(--gold); color: var(--ink); font-weight: 700; padding: .35rem .8rem; border-radius: 999px; font-size: .92rem; }
.meters { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.meters li { display: grid; grid-template-columns: 1fr auto; row-gap: .25rem; }
.meters .ml { font-weight: 600; color: var(--ink); font-size: .95rem; }
.meters .mv { font-weight: 700; color: var(--c); }
.meters .mb { grid-column: 1 / -1; height: 8px; background: var(--tint2); border-radius: 99px; overflow: hidden; }
.meters .mb span { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.meters .mn { grid-column: 1 / -1; color: var(--muted); font-size: .82rem; }
.wfoot { margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

/* Score ring */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring .trk { stroke: var(--tint2); }
.ring .val { stroke: var(--c); stroke-linecap: round; }
.ring b { position: absolute; font-family: var(--display); font-weight: 700; color: var(--ink); }
.ring-md { width: 52px; height: 52px; } .ring-md b { font-size: .95rem; }
.ring-lg { width: 76px; height: 76px; } .ring-lg b { font-size: 1.35rem; }

/* Runners-up overlap the band */
.runners-wrap { margin-top: -2.8rem; position: relative; }
.runners { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.runners li { background: var(--card); border-radius: var(--r-md); padding: 1rem 1.1rem; box-shadow: 0 10px 30px -18px rgba(10, 10, 40, .35); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; gap: .2rem .6rem; }
.runners .pos { font-family: var(--display); font-weight: 700; color: var(--c); font-size: 1.1rem; }
.runners .rn { grid-column: 1; font-weight: 700; color: var(--ink); line-height: 1.3; }
.runners .ring { grid-column: 2; grid-row: 1 / 3; align-self: start; }
.runners .rs { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; margin-top: .4rem; }
@media (max-width: 880px) { .runners { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .runners { grid-template-columns: 1fr; } }

/* Best-for tiles */
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.tiles li { background: var(--tint); border-radius: var(--r-md); padding: 1.2rem; display: flex; flex-direction: column; gap: .2rem; }
.tiles .ic { width: 34px; height: 34px; color: var(--c); background: #fff; border-radius: 10px; padding: 6px; margin-bottom: .5rem; }
.tiles .tl { font-size: .9rem; color: var(--deep); font-weight: 600; }
.tiles strong { color: var(--ink); font-size: 1.05rem; line-height: 1.3; }
.tiles .tv { font-family: var(--display); font-weight: 700; color: var(--c); font-size: 1.5rem; margin-top: .3rem; }
.tiles .td { color: var(--muted); font-size: .85rem; }

/* Search box */
.find { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: .5rem 1rem; min-width: 16rem; }
.find:focus-within { border-color: var(--c); box-shadow: 0 0 0 4px var(--tint2); }
.find .ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.find input { border: 0; outline: 0; font: inherit; color: var(--ink); width: 100%; background: transparent; }
.find.big { margin-top: 1.4rem; width: min(100%, 32rem); padding: .8rem 1.2rem; border: 0; box-shadow: 0 16px 40px -18px rgba(0,0,0,.5); }
.find.big:focus-within { box-shadow: 0 0 0 4px rgba(255,255,255,.35); }

/* Table */
.thead { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.thead h2 { margin-bottom: .4rem; }
.thead p { margin: 0; max-width: 40rem; }
.scroll { overflow-x: auto; background: var(--card); border-radius: var(--r-md); border: 1px solid var(--line); box-shadow: 0 10px 30px -22px rgba(10,10,40,.35); }
table.rank { border-collapse: collapse; width: 100%; min-width: 60rem; font-size: .95rem; }
table.rank th, table.rank td { padding: .7rem .75rem; text-align: right; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.rank tbody tr:last-child > * { border-bottom: 0; }
table.rank thead th { background: var(--tint); color: var(--deep); font-size: .82rem; font-weight: 700; vertical-align: bottom; position: sticky; top: 0; }
table.rank thead th:nth-child(2), table.rank th[scope=row] { text-align: left; }
table.rank thead button { all: unset; cursor: pointer; }
table.rank thead button:focus-visible { outline: 3px solid var(--focus); border-radius: 4px; }
table.rank thead th[aria-sort=ascending] button::after { content: " ▲"; font-size: .7em; }
table.rank thead th[aria-sort=descending] button::after { content: " ▼"; font-size: .7em; }
table.rank tbody tr:hover { background: color-mix(in srgb, var(--c) 4%, white); }
table.rank .rk { text-align: left; font-family: var(--display); font-weight: 700; color: var(--c); width: 3rem; }
table.rank th[scope=row] { font-weight: 700; color: var(--ink); min-width: 15rem; }
table.rank .crs { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
table.rank sup { color: var(--muted); }
.pill { display: inline-block; min-width: 2.6rem; text-align: center; font-weight: 700; border-radius: 999px; padding: .15rem .55rem; }
.pill.t1 { background: var(--c); color: #fff; }
.pill.t2 { background: var(--tint2); color: var(--deep); }
.pill.t3 { background: var(--tint); color: var(--deep); }
.pill.t4 { background: #f1f1f5; color: var(--muted); }
.bar { display: block; height: 5px; margin-top: .35rem; background: #eef0f6; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: color-mix(in srgb, var(--c) 55%, white); border-radius: 99px; }
.empty { padding: 1.2rem; color: var(--muted); margin: 0; }

/* Definitions */
.defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.defs div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.1rem; }
.defs dt { font-weight: 700; color: var(--ink); margin-bottom: .2rem; }
.defs dd { margin: 0; font-size: .95rem; color: var(--text); }

.note { background: var(--card); border: 1px dashed color-mix(in srgb, var(--c) 40%, white); border-radius: var(--r-md); padding: 1.3rem 1.4rem; }
.note p { margin: .3rem 0 0; }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chips a { display: inline-block; background: var(--c); color: #fff; text-decoration: none; font-weight: 700; padding: .55rem 1.1rem; border-radius: 999px; }
.chips a:hover { filter: brightness(1.15); }

/* Home grid */
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1rem; }
.grid a { display: flex; flex-direction: column; min-height: 11rem; background: var(--c); color: #fff; text-decoration: none; border-radius: var(--r-lg); padding: 1.3rem 1.4rem; position: relative; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.grid a::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.12); }
.grid a:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -18px color-mix(in srgb, var(--c) 80%, black); }
.grid .tn { font-family: var(--display); font-weight: 700; font-size: 1.45rem; }
.grid .tw { margin-top: auto; font-weight: 600; line-height: 1.3; position: relative; z-index: 1; }
.grid .tlab { display: block; font-weight: 400; font-size: .85rem; opacity: .85; }
.grid .tc { font-size: .85rem; opacity: .85; margin-top: .3rem; position: relative; z-index: 1; }

.trust { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.trust li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.3rem; display: flex; flex-direction: column; gap: .3rem; }
.trust .ic { width: 34px; height: 34px; color: #1e1b4b; background: #ffeeb0; border-radius: 10px; padding: 6px; margin-bottom: .4rem; }
.trust strong { color: var(--ink); font-size: 1.05rem; }
.trust span { color: var(--text); font-size: .95rem; }
@media (max-width: 760px) { .trust { grid-template-columns: 1fr; } }

/* Text pages */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.2rem; }
.weights { list-style: none; padding: 0; display: grid; gap: .6rem; max-width: 32rem; }
.weights li { display: grid; grid-template-columns: 11rem 1fr 3rem; align-items: center; gap: .8rem; }
.weights .wb { height: 10px; background: #e9eaf3; border-radius: 99px; overflow: hidden; }
.weights .wb span { display: block; height: 100%; background: #1e1b4b; border-radius: 99px; }
.weights b { text-align: right; color: var(--ink); }

/* Footer */
footer.site { margin-top: 5rem; background: #16163a; color: #c9cae0; font-size: .9rem; }
footer.site .wrap { padding-top: 2.2rem; padding-bottom: 2.5rem; }
footer.site .brand { color: #fff; margin-bottom: .6rem; }
footer.site .logo { fill: #fff; }
footer.site p { max-width: 46rem; }
footer.site a { color: #fff; }
footer .flinks { display: flex; gap: 1.2rem; }

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .band { padding-bottom: 4rem; }
  .find { min-width: 0; width: 100%; }
  header nav a { padding: .35rem .5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--c); color: #fff; border: 0; border-radius: 999px; padding: .75rem 1.4rem; font: 700 1rem "Figtree", system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--c); box-shadow: inset 0 0 0 2px var(--c); }
.btn.big { padding: 1rem 2rem; font-size: 1.1rem; background: var(--gold); color: var(--ink); }
header nav a.navcta { background: var(--gold); color: var(--ink); }
header nav a.navcta:hover { background: #ffd95e; }

/* ---------- Home promo ---------- */
.promo { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; flex-wrap: wrap; background: #1e1b4b; color: #fff; border-radius: var(--r-lg); padding: 1.8rem 2rem; position: relative; overflow: hidden; }
.promo::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 205, 60, .18); }
.promo h2 { color: #fff; margin-bottom: .4rem; }
.promo p { margin: 0; max-width: 36rem; color: rgba(255,255,255,.88); }
.promo .btn { position: relative; z-index: 1; }

/* ---------- Grade check on subject pages ---------- */
.gcheck { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 2.5rem; background: var(--card); border: 2px solid var(--tint2); border-radius: var(--r-lg); padding: 1.6rem 1.8rem; }
.gcheck h2 { margin-bottom: .5rem; }
.gcheck p { margin: 0 0 .8rem; }
.fitsum:empty { display: none; }
.fitsum { background: var(--tint); border-radius: 12px; padding: .7rem .9rem; }
.tog { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--ink); cursor: pointer; margin-bottom: .6rem; }
.tog input { width: 1.15rem; height: 1.15rem; accent-color: var(--c); }
@media (max-width: 820px) { .gcheck { grid-template-columns: 1fr; padding: 1.3rem; } }

/* Grade picker */
.seg { display: inline-flex; background: #eef0f6; border-radius: 999px; padding: 4px; gap: 2px; margin-bottom: 1rem; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; font: 600 .95rem "Figtree", system-ui, sans-serif; color: var(--muted); padding: .45rem 1rem; border-radius: 999px; cursor: pointer; }
.seg button[aria-checked=true] { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(20, 20, 60, .12); }
.gin { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; }
.grow { display: flex; gap: .5rem; }
.gsel { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.gsel select, .gsel input, .near input, .near select { font: 700 1.1rem "Figtree", system-ui, sans-serif; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: .55rem .6rem; min-width: 4.4rem; }
.gsel.wide select, .gsel.wide input { min-width: 13rem; }
.gsel select:focus, .gsel input:focus, .near input:focus, .near select:focus { outline: 0; border-color: var(--c); box-shadow: 0 0 0 4px var(--tint2); }
.gout { margin: 1rem 0 0 !important; color: var(--muted); }
.gout b { color: var(--c); font-family: var(--display); font-size: 1.15rem; }

/* Fit badges and table column */
.fb { display: inline-block; font-weight: 700; font-size: .82rem; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.fb.comfortable { background: #d9f5e5; color: #0b6b3a; }
.fb.match { background: #dbeafe; color: #1e40af; }
.fb.stretch { background: #fff1c2; color: #8a5a00; }
.fb.long { background: #fde2e2; color: #9b1c1c; }
table.rank .fitcol { display: none; }
table.rank.fit-on .fitcol { display: table-cell; }
table.rank td.fit { text-align: left; }
table.rank tr.nofit { display: none; }

/* ---------- Quiz ---------- */
.quizband { padding-bottom: 3.5rem; }
.quiz { max-width: 46rem; }
.qwrap, .qres { background: var(--card); border-radius: var(--r-lg); padding: 1.8rem; box-shadow: 0 20px 50px -30px rgba(10, 10, 40, .45); border: 1px solid var(--line); margin-top: -2.5rem; position: relative; }
.qbar { height: 8px; background: #eef0f6; border-radius: 99px; overflow: hidden; margin-bottom: 1.6rem; }
.qbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #1e1b4b, #4c1d95); border-radius: 99px; transition: width .35s ease; }
.qbody h2 { font-size: 1.45rem; outline: none; }
.opts { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.opts.stack { flex-direction: column; }
.opt { border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 14px; padding: .8rem 1.1rem; font: 600 1rem "Figtree", system-ui, sans-serif; cursor: pointer; text-align: left; }
.opt:hover { border-color: #b9bdd6; }
.opt[aria-pressed=true] { border-color: #1e1b4b; background: #eef0ff; box-shadow: inset 0 0 0 1px #1e1b4b; }
.opts.subj .opt { background: var(--c); color: #fff; border-color: transparent; font-family: var(--display); font-weight: 600; padding: 1rem 1.3rem; }
.opts.subj .opt[aria-pressed=true] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--c); }
.opts.stack .opt { display: flex; flex-direction: column; gap: .15rem; }
.opts.stack .opt span { font-weight: 400; color: var(--muted); font-size: .92rem; }
.near { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; }
.near label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; color: var(--muted); }
.near input { text-transform: uppercase; width: 9rem; }
.near p { flex-basis: 100%; margin: 0; }
.qerr { color: #b42318; font-weight: 600; min-height: 1.4em; margin: .6rem 0 0; }
.qnav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.qnav [data-next] { margin-left: auto; background: #1e1b4b; }
.rhead p { color: var(--muted); }
.matches { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .8rem; }
.matches > li { display: grid; grid-template-columns: 2.4rem 1fr auto; gap: .8rem; align-items: start; border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 14px; padding: 1rem 1.1rem; }
.matches > li:first-child { background: var(--tint, #f5f3ff); background: color-mix(in srgb, var(--c) 6%, white); }
.mpos { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--c); }
.mmain h3 { font-size: 1.1rem; margin: 0 0 .3rem; }
.mmeta { margin: 0; color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; }
.why { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .92rem; }
.mscore { text-align: center; }
.mscore b { display: block; font-family: var(--display); font-size: 1.5rem; color: var(--c); line-height: 1; }
.mscore small { color: var(--muted); }
.ractions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0 1rem; }
.qres .btn { background: #1e1b4b; }
.qres .btn.ghost { background: transparent; color: #1e1b4b; box-shadow: inset 0 0 0 2px #1e1b4b; }
@media (max-width: 560px) {
  .qwrap, .qres { padding: 1.2rem; }
  .matches > li { grid-template-columns: 1.8rem 1fr; }
  .mscore { grid-column: 2; text-align: left; display: flex; gap: .4rem; align-items: baseline; }
  header nav { flex-wrap: wrap; }
}

/* ---------- Shared cards & layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem 1.6rem; box-shadow: 0 10px 30px -24px rgba(10,10,40,.35); }
.card h2 { font-size: 1.3rem; margin-bottom: .6rem; }
.card h3 { font-size: 1rem; margin: 1rem 0 .4rem; font-family: "Figtree", system-ui, sans-serif; }
.twocol { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; }
.twocol.tight { gap: 1.5rem 2.5rem; margin-bottom: 1.5rem; }
@media (max-width: 820px) { .twocol { grid-template-columns: 1fr; } }
.promo.slim { padding: 1.3rem 1.8rem; background: var(--deep); }
.ulink { color: var(--ink); text-decoration: none; }
.ulink:hover { text-decoration: underline; color: var(--c); }
.h1c { font-size: clamp(1.8rem, 4.2vw, 3rem); }

/* Home tools */
.tools { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
.tools a { display: flex; flex-direction: column; gap: .2rem; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.2rem; text-decoration: none; color: var(--text); transition: transform .15s ease, box-shadow .15s ease; }
.tools a:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(10,10,40,.45); }
.tools .ic { width: 34px; height: 34px; color: #1e1b4b; background: #ffeeb0; border-radius: 10px; padding: 6px; margin-bottom: .4rem; }
.tools strong { color: var(--ink); }
.tools span { color: var(--muted); font-size: .92rem; }

/* Subject earnings */
.earn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.2rem 2.5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem 1.6rem; }
@media (max-width: 820px) { .earn { grid-template-columns: 1fr; } }
.stair { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; align-items: end; }
.stair li { display: flex; flex-direction: column; justify-content: flex-end; text-align: center; }
.stair .sb { height: 10rem; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; margin-bottom: .4rem; }
.stair .bar2 { display: block; width: 100%; background: var(--c); border-radius: 10px 10px 4px 4px; min-height: 6px; }
.stair b { font-family: var(--display); color: var(--ink); font-size: 1.1rem; margin-bottom: .35rem; }
.stair .sl { color: var(--muted); font-size: .85rem; }
.hbars { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .55rem; }
.hbars li { display: grid; grid-template-columns: minmax(0, 13rem) 1fr auto; gap: .7rem; align-items: center; font-size: .92rem; }
.hbars a { color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbars a:hover { text-decoration: underline; }
.hbars .hb { height: 10px; background: #eef0f6; border-radius: 99px; overflow: hidden; }
.hbars .hb span { display: block; height: 100%; background: var(--c); border-radius: 99px; }
@media (max-width: 560px) { .hbars li { grid-template-columns: 1fr auto; } .hbars .hb { grid-column: 1 / -1; grid-row: 2; } }

/* Course pages */
.cfitbox { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.cfitbox h2 { font-size: 1.05rem; margin: 0 0 .7rem; font-family: "Figtree", system-ui, sans-serif; font-weight: 700; }
.cfitbox .gsel select { min-width: 3.9rem; font-size: 1rem; }
.cfit:empty { display: none; }
.cfit { margin: .8rem 0 0; font-size: .95rem; }
.cmpbars { list-style: none; padding: 0; margin: .4rem 0 .6rem; display: grid; gap: .9rem; }
.cmpbars li { display: grid; grid-template-columns: minmax(0, 12rem) 5rem 1fr minmax(0, 16rem); gap: .8rem; align-items: center; }
.cmpbars .cl { font-weight: 600; color: var(--ink); }
.cmpbars b { font-family: var(--display); color: var(--c); text-align: right; }
.cbar { position: relative; height: 12px; background: #eef0f6; border-radius: 99px; }
.cbar .you { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.cbar .avg { position: absolute; top: -5px; width: 3px; height: 22px; background: var(--ink); border-radius: 2px; transform: translateX(-1px); }
.cmpbars .cv { font-size: .9rem; font-weight: 600; }
.cmpbars .cv small { font-weight: 400; color: var(--muted); }
.cmpbars .up .cv { color: #0b6b3a; } .cmpbars .down .cv { color: #9b1c1c; } .cmpbars .avg .cv, .cmpbars .na .cv { color: var(--muted); }
.cmpbars li.na b { color: var(--muted); }
@media (max-width: 720px) { .cmpbars li { grid-template-columns: 1fr auto; } .cbar { grid-column: 1 / -1; } .cmpbars .cv { grid-column: 1 / -1; } }
.dist, .ebars { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .55rem; }
.dist li { display: grid; grid-template-columns: 8.5rem 1fr 3rem; gap: .7rem; align-items: center; font-size: .93rem; }
.dist .db { height: 14px; background: #eef0f6; border-radius: 99px; overflow: hidden; }
.dist .db span { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.dist b { text-align: right; color: var(--ink); }
.ebars li { display: grid; grid-template-columns: 5.5rem 1fr 4rem; gap: .25rem .7rem; align-items: center; font-size: .93rem; }
.ebars .el { grid-row: span 2; font-weight: 600; color: var(--ink); }
.ebars .eb { height: 12px; background: #eef0f6; border-radius: 99px; overflow: hidden; }
.ebars .eb .you { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.ebars .eb .avg2 { display: block; height: 100%; background: color-mix(in srgb, var(--c) 30%, white); border-radius: 99px; }
.ebars b { color: var(--ink); text-align: right; }
.ebars small { color: var(--muted); text-align: right; white-space: nowrap; font-size: .78rem; }
.clist, .olist { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .45rem; }
.clist a, .olist a { font-weight: 600; }
.olist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; }

/* Compare */
.quiz.wide { max-width: 64rem; }
.cmp-top, .cmp-pick { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.2rem; }
table.cmp { border-collapse: collapse; width: 100%; min-width: 34rem; }
table.cmp th, table.cmp td { padding: .75rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.cmp thead th { background: var(--tint); font-size: 1rem; }
table.cmp thead a { color: var(--ink); }
table.cmp .crs { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: .2rem; }
table.cmp tbody th { font-weight: 600; color: var(--muted); font-size: .92rem; width: 30%; }
table.cmp td { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
table.cmp td.win { background: #fff6c7; }
table.cmp td.win::after { content: " ★"; color: #b88a00; font-size: .85em; }

/* Loan calculator */
.lform { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem 1.2rem; margin-bottom: 1.5rem; }
.lform .gsel input, .lform .gsel select { width: 100%; min-width: 0; }
.lform .gsel.wide select { min-width: 0; }
.lsum { background: var(--tint, #eef0ff); background: #eef0ff; border-radius: var(--r-md); padding: 1.2rem 1.3rem; }
.lhead { font-size: 1.2rem; margin: 0 0 1rem; color: var(--ink); }
.lstats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .8rem; }
.lstats li { background: #fff; border-radius: 12px; padding: .8rem 1rem; display: flex; flex-direction: column; }
.lstats span { color: var(--muted); font-size: .85rem; }
.lstats b { font-family: var(--display); color: #1e1b4b; font-size: 1.35rem; }
.lstats small { color: var(--muted); }
.lchart { margin: 1.2rem 0 .6rem; }
.lchart svg { width: 100%; height: auto; font: 12px "Figtree", system-ui, sans-serif; fill: var(--muted); }
.lchart .grid { stroke: #e7e8f1; }
.lchart path { fill: none; stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.lchart path.bal { stroke: #be185d; } .lchart path.paid { stroke: #1e40af; }
.lchart figcaption, .legend { font-size: .9rem; color: var(--muted); display: flex; gap: .4rem 1.2rem; flex-wrap: wrap; align-items: center; }
.k { display: inline-block; width: 14px; height: 6px; border-radius: 3px; margin-right: .3rem; vertical-align: middle; }
.k.bal { background: #be185d; } .k.paid { background: #1e40af; }

/* Salaries page */
.salaries { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .7rem; }
.salaries li { display: grid; grid-template-columns: minmax(0, 12rem) 1fr minmax(0, 9rem); gap: .8rem; align-items: center; }
.salaries a { font-weight: 700; color: var(--ink); text-decoration: none; }
.salaries a:hover { color: var(--c); text-decoration: underline; }
.sgrow { position: relative; height: 16px; background: #eef0f6; border-radius: 99px; overflow: hidden; }
.sgrow span { position: absolute; left: 0; top: 0; height: 100%; border-radius: 99px; }
.sgrow .s5 { background: color-mix(in srgb, var(--c) 35%, white); }
.sgrow .s15 { background: var(--c); z-index: 1; }
.sv { font-size: .92rem; text-align: right; color: var(--muted); }
.sv b { color: var(--ink); }
.k.s15 { background: #1e1b4b; } .k.s5 { background: #b8b6d9; }
@media (max-width: 600px) { .salaries li { grid-template-columns: 1fr auto; } .sgrow { grid-column: 1 / -1; grid-row: 2; } }

/* Clearing */
.grid.clr button { display: flex; flex-direction: column; width: 100%; min-height: 8rem; background: var(--c); color: #fff; border: 0; border-radius: var(--r-lg); padding: 1.1rem 1.2rem; text-align: left; cursor: pointer; font: inherit; position: relative; overflow: hidden; }
.grid.clr button[aria-pressed=true] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--c); }
.grid.clr .tn { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.grid.clr .tw { margin-top: auto; }
.grid.clr .big { font-family: var(--display); font-size: 1.6rem; margin-right: .3rem; }
.clr-list { margin-top: 2rem; scroll-margin-top: 5rem; }

/* ---------- Monetisation slots ---------- */
.ph { border: 2px dashed #b9bdd6; border-radius: var(--r-md); padding: 1rem 1.2rem; background: repeating-linear-gradient(45deg, #fafbff, #fafbff 10px, #f2f3fa 10px, #f2f3fa 20px); display: flex; flex-direction: column; gap: .15rem; color: var(--muted); }
.ph strong { color: var(--ink); }
.ph small { font-size: .78rem; }
.adwrap { text-align: center; }
.adlabel { display: block; font-size: .75rem; color: var(--muted); margin-bottom: .3rem; letter-spacing: .02em; }
.prod { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem 2rem; align-items: center; background: #fff8e1; border: 1px solid #ffe08a; border-radius: var(--r-lg); padding: 1.4rem 1.6rem; }
.prod h2 { margin-bottom: .3rem; }
.prod p { margin: 0; }
@media (max-width: 760px) { .prod { grid-template-columns: 1fr; } }
.plist { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.plist a, .plist .phi { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; text-decoration: none; color: var(--text); }
.plist a:hover { border-color: #e0b800; }
.plist strong { color: var(--ink); grid-column: 1; }
.plist span { grid-column: 1; color: var(--muted); font-size: .92rem; }
.plist .pp { grid-column: 2; grid-row: 1 / 3; align-self: center; font-weight: 700; color: var(--ink); font-size: 1rem; }
.plist .phi { border-style: dashed; }
.plist .phi small { grid-column: 1; color: #8a5a00; font-size: .78rem; }
.acc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; background: var(--card); border: 2px solid var(--tint2); border-radius: var(--r-lg); padding: 1.3rem 1.6rem; }
.acc h2 { margin-bottom: .2rem; }
.acc p { margin: 0; }
.aff { flex-basis: 100%; font-size: .8rem; color: var(--muted); margin: .4rem 0 0 !important; }
.mail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1rem 2rem; align-items: center; background: #1e1b4b; color: #fff; border-radius: var(--r-lg); padding: 1.6rem 1.8rem; }
.mail h2 { color: #fff; margin-bottom: .3rem; }
.mail p { margin: 0; color: rgba(255,255,255,.85); }
.mail .mf { display: flex; flex-wrap: wrap; gap: .6rem; }
.mail input[type=email] { flex: 1 1 14rem; font: 600 1rem "Figtree", system-ui, sans-serif; border: 0; border-radius: 999px; padding: .75rem 1.1rem; }
.mail .btn { background: var(--gold); color: var(--ink); }
.mail .consent { flex-basis: 100%; font-size: .85rem; color: rgba(255,255,255,.85); display: flex; gap: .5rem; align-items: flex-start; }
.mail .consent a { color: #fff; }
.mail .phnote { flex-basis: 100%; color: var(--gold); }
.mail [disabled] { opacity: .6; cursor: not-allowed; }
@media (max-width: 760px) { .mail { grid-template-columns: 1fr; } }
.spons { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.2rem 1.4rem; }
.spons ul { list-style: none; padding: 0; margin: .3rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; }
.spons a { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; text-decoration: none; color: var(--text); }
.spons strong { color: var(--ink); }

/* ---------- compare courses at this uni */
.cchead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cchead h2 { margin-bottom: .3rem; }
.cchead p { margin: 0; max-width: 46rem; }
.diffs { list-style: none; margin: 0 0 1.3rem; padding: 1rem 1.2rem; background: var(--tint); border-radius: var(--r-md); display: grid; gap: .45rem; }
.diffs li { position: relative; padding-left: 1.4rem; line-height: 1.45; }
.diffs li::before { content: ""; position: absolute; left: 0; top: .5em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--c); }
.diffs b { color: var(--ink); }
.cgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: 1rem; }
.cc { border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; background: #fff; }
.cc:hover { border-color: color-mix(in srgb, var(--c) 45%, white); }
.cch h3 { font-size: 1.05rem; margin: 0 0 .15rem; line-height: 1.3; }
.cch p { margin: 0; font-size: .9rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.tag { font-size: .78rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; background: var(--tint); color: var(--deep); border: 1px dashed color-mix(in srgb, var(--c) 40%, white); }
.tag.on { border-style: solid; background: var(--tint2); }
.tag.j { background: #f3f3f8; color: var(--muted); border-color: var(--line); }
.cst { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.2rem, 1fr)); gap: .4rem; margin: 0; }
.cst div { background: #f7f7fb; border-radius: .6rem; padding: .45rem .55rem; }
.cst div.win { background: color-mix(in srgb, #16a34a 12%, white); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #16a34a 45%, white); }
.cst dt { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.cst dd { margin: .1rem 0 0; font-weight: 700; color: var(--ink); font-size: .98rem; }
.cst dd.na { color: var(--muted); font-weight: 500; }
sup.sh { color: var(--muted); font-weight: 700; margin-left: .1rem; cursor: help; }
.accr { margin: 0; font-size: .85rem; color: var(--muted); }
.accr span { font-weight: 700; color: var(--ink); }
.ccf { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding-top: .5rem; border-top: 1px solid var(--line); min-height: 2.2rem; }
.ccf .go { font-weight: 700; color: var(--deep); text-decoration: none; font-size: .92rem; margin-left: auto; }
.ccf .go::after { content: " ↗"; }
.ccf .go:hover { text-decoration: underline; }
.cfb small { color: var(--muted); font-size: .78rem; margin-left: .25rem; }
.dist li { grid-template-columns: 9.5rem 1fr 3rem; }
.dist .dl { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; color: var(--ink); }
.dist .dl small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.cfnote { font-size: .82rem; color: var(--muted); margin: .6rem 0 0; line-height: 1.4; }
.offer { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; background: var(--tint); border-radius: .6rem; padding: .5rem .7rem; }
.offer span { font-size: .78rem; font-weight: 700; color: var(--deep); text-transform: uppercase; letter-spacing: .03em; }
.offer b { font-family: var(--display); font-size: 1.1rem; color: var(--ink); }
td.offcol, th.offcol { white-space: nowrap; font-weight: 600; }

/* ---------- phone fixes (round 1) */
.grow { display: grid; grid-template-columns: repeat(4, minmax(0, 4.6rem)); gap: .5rem; }
.grow .gsel select { min-width: 0; width: 100%; padding-left: .45rem; padding-right: .2rem; }
.gsel.wide { max-width: 100%; }
.gsel.wide select, .gsel.wide input { min-width: 0; width: min(13rem, 100%); }
.cmp-pick .gsel.wide { flex: 1 1 13rem; }
.cmp-pick .gsel.wide select, .cmp-top .gsel.wide select { width: 100%; }
.gin > * { min-width: 0; }
select { max-width: 100%; text-overflow: ellipsis; }
@media (max-width: 700px) {
  header.site { position: static; }
  header.site .wrap { gap: .4rem; padding-top: .6rem; padding-bottom: .5rem; }
  header nav { flex-wrap: nowrap !important; overflow-x: auto; width: 100%; margin: 0 -.25rem; padding: 0 .25rem .15rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  header nav::-webkit-scrollbar { display: none; }
  header nav a { white-space: nowrap; flex: none; font-size: .9rem; }
}
@media (max-width: 400px) {
  .grow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gcheck { padding: 1.1rem; }
}
.cgrid { grid-template-columns: repeat(auto-fill, minmax(min(17.5rem, 100%), 1fr)); }
td.offcol small.oth { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }

/* ---------- university pages */
.unihero { padding-bottom: 2.4rem; }
.unihero .stats span, .unihero .stats a { background: rgba(255,255,255,.14); }
.unihero .stats a { color: inherit; }
.morelink { margin-top: 1.2rem; font-weight: 700; }
.morelink a { color: var(--deep); }
h2.az { font-size: 1.4rem; margin: 2rem 0 .8rem; padding-bottom: .4rem; border-bottom: 2px solid var(--line); }
.unilist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: .7rem; }
.unilist a { display: flex; flex-direction: column; gap: .15rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: .85rem 1rem; text-decoration: none; color: var(--muted); height: 100%; }
.unilist a:hover { border-color: var(--c); }
.unilist strong { color: var(--ink); line-height: 1.3; }
.unilist .tc { font-size: .85rem; font-weight: 600; color: var(--deep); }
table.uni th[scope=row] { min-width: 12rem; text-align: left; }
table.uni thead th:first-child, table.uni thead th:first-child button { text-align: left; justify-content: flex-start; }

/* ---------- shortlist + planner */
.navlist .cnt { display: inline-block; min-width: 1.25rem; margin-left: .3rem; padding: 0 .35rem; border-radius: 999px; background: var(--c); color: #fff; font-size: .75rem; line-height: 1.25rem; text-align: center; }
.navlist .cnt[hidden] { display: none; }
.savebtn { font: 700 .85rem "Figtree", system-ui, sans-serif; color: var(--deep); background: #fff; border: 1.5px solid color-mix(in srgb, var(--c) 40%, white); border-radius: 999px; padding: .3rem .75rem; cursor: pointer; white-space: nowrap; }
.savebtn:hover { border-color: var(--c); }
.savebtn[aria-pressed=true] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.ccf { flex-wrap: wrap; }
.ccf .savebtn { order: 2; }
.ccf .go { order: 3; margin-left: 0; }
.ccf .cfb { order: 1; flex-basis: 100%; }
.ccf .cfb:empty { display: none; }
.wsave { display: flex; align-items: center; gap: .6rem; margin: .9rem 0 0; color: var(--muted); font-size: .88rem; }
.wsave span { line-height: 1.3; }
.savebtn.hero { font-size: .95rem; padding: .45rem 1rem; }
.matches .savebtn { float: right; margin-left: .5rem; }

.pl-grades { margin-bottom: 1.4rem; }
.pl-grades h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.pl-panel { background: var(--tint); border-radius: var(--r-md); padding: 1.1rem 1.2rem; margin-bottom: 1.4rem; }
.plcount { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .7rem; }
.plcount b { font-family: var(--display); font-size: 2rem; color: var(--ink); }
.plcount span { font-weight: 700; color: var(--deep); }
.bal { display: flex; border-radius: 999px; overflow: hidden; margin-bottom: .8rem; font-size: .8rem; font-weight: 700; }
.bseg { padding: .35rem .6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bseg.amb, .cat.amb { background: #fde2e1; color: #9b1c1c; }
.bseg.real, .cat.real { background: #dbe7ff; color: #1e3a8a; }
.bseg.safe, .cat.safe { background: #d9f5e3; color: #14532d; }
.bseg.unk { background: #ececf3; color: var(--muted); }
.plmsgs { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; gap: .45rem; }
.plmsgs li { padding: .55rem .8rem; border-radius: .6rem; background: #fff; border-left: 4px solid var(--line); line-height: 1.4; }
.plmsgs li.bad { border-color: #dc2626; }
.plmsgs li.warn { border-color: #f59e0b; }
.plmsgs li.good { border-color: #16a34a; }
.plmsgs li.tip { border-color: var(--c); }
.pl-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.plc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .4rem 1rem; align-items: start; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--r-md); padding: .9rem 1rem; }
.plc.on { border-left-color: var(--c); box-shadow: 0 8px 24px -18px rgba(10,10,40,.5); }
.plpick { display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: .72rem; font-weight: 700; color: var(--muted); text-align: center; width: 4.2rem; }
.plpick input { width: 1.3rem; height: 1.3rem; accent-color: var(--c); }
.plmain h3 { font-size: 1.05rem; margin: 0 0 .15rem; }
.plmain p { margin: 0; }
.pltags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem !important; }
.cat { font-size: .78rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; }
.plact { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; font-size: .88rem; font-weight: 700; }
.plact a { color: var(--deep); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
@media (max-width: 560px) {
  .plc { grid-template-columns: auto minmax(0, 1fr); }
  .plact { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 1rem; padding-top: .4rem; border-top: 1px solid var(--line); }
  .matches .savebtn { float: none; display: inline-block; margin: 0 0 .3rem; }
}
table.rank tr.nofilt { display: none; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem .7rem; margin: 0 0 1rem; }
.filters .gsel select { font-size: .95rem; padding: .45rem .5rem; min-width: 9rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: .45rem .85rem; font-weight: 600; font-size: .92rem; color: var(--ink); cursor: pointer; user-select: none; }
.chip:has(input:checked) { background: var(--tint2); border-color: var(--c); }
.chip input { accent-color: var(--c); width: 1rem; height: 1rem; margin: 0; }
.fcount { flex-basis: 100%; margin: .2rem 0 0; font-size: .92rem; color: var(--muted); }
.fcount:empty { display: none; }
.fcount b { color: var(--ink); }

/* ---------- estimated offers: always visibly different from published ones */
.offer.est { display: block; background: #fff; border: 1.5px dashed color-mix(in srgb, var(--c) 45%, white); }
.offer.est p { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.offer.est span { color: var(--muted); }
.offer.est b { color: var(--muted); font-style: italic; }
.offer.est small { display: block; margin-top: .3rem; font-size: .78rem; line-height: 1.35; color: var(--muted); }
.offer.est small a { color: var(--deep); font-weight: 700; }
td.offcol.est .estv, .estv { font-style: italic; color: var(--muted); font-weight: 600; }
td.offcol.est small.oth, .cmp small.oth { display: block; font-size: .72rem; font-weight: 700; color: #b45309; text-transform: uppercase; letter-spacing: .04em; font-style: normal; }
.fb.est { background: #fff !important; box-shadow: inset 0 0 0 1.5px currentColor; border: 0; }
.stats .estchip { border-style: dashed !important; }
.tag.estt { border-style: dashed; background: #fff; color: var(--muted); }

/* shortlist sharing + offer reports */
.pl-shared { margin-bottom: 1.4rem; }
.shnote { border-style: solid; border-color: var(--c); }
.shnote h2 { font-size: 1.15rem; }
.shl { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .45rem; }
.shl li { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: .55rem .8rem; line-height: 1.6; }
.shl a { font-weight: 700; color: var(--deep); white-space: nowrap; }
.pl-sharebox { background: var(--tint); border-radius: var(--r-md); padding: .9rem 1rem; margin-bottom: 1rem; }
.pl-sharebox label { display: block; font-weight: 700; margin-bottom: .35rem; }
.pl-sharebox input { width: 100%; font: .9rem ui-monospace, Menlo, monospace; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.okmsg { background: #ECFDF5; color: #065F46; border-radius: var(--r-md); padding: .6rem .9rem; font-weight: 700; margin: 0 0 1rem; }
.ccf .rep { order: 4; flex-basis: 100%; font-size: .8rem; color: var(--muted); }
.ccf .rep:hover { color: var(--deep); }

/* guides (articles) */
.guides { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.guides a { display: flex; flex-direction: column; gap: .35rem; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.15rem 1.25rem; text-decoration: none; color: var(--text); transition: transform .15s ease, box-shadow .15s ease; }
.guides a:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(10,10,40,.45); }
.guides strong { color: var(--ink); font-size: 1.08rem; line-height: 1.3; }
.guides span { color: var(--muted); font-size: .93rem; }
.guides .gcat { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--deep); }
.guides small { margin-top: auto; padding-top: .3rem; color: var(--muted); font-weight: 600; }
.h1a { font-size: clamp(1.7rem, 4.2vw, 2.6rem); line-height: 1.15; max-width: 46rem; }
.ameta { margin: .9rem 0 0; font-weight: 600; font-size: .92rem; opacity: .85; }
.article { font-size: 1.06rem; line-height: 1.7; }
.article h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.4rem 0 .7rem; scroll-margin-top: 5rem; }
.article h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }
.article ul, .article ol { padding-left: 1.3rem; }
.article li { margin: .35rem 0; }
.article a:not(.btn) { color: var(--deep); }
.callout { background: var(--tint); border-left: 4px solid var(--c); border-radius: 0 var(--r-md) var(--r-md) 0; padding: .9rem 1.15rem; margin: 1.4rem 0; }
.callout p { margin: .3rem 0; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.25rem; margin: 0 0 1.5rem; }
.toc h2 { font-size: 1rem; margin: 0 0 .4rem; }
.toc ol { margin: 0; padding-left: 1.2rem; font-size: .97rem; }
.sources { margin-top: 2.6rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .92rem; line-height: 1.55; }
.sources h2 { font-size: 1.1rem; margin-top: 0; }
.sources a { word-break: break-word; }

/* accommodation box: own page first, partner link clearly marked */
.acc { display: block; }
.acc h2 { margin: 0 0 .6rem; }
.accown { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 2rem; }
.accown p { flex: 1 1 22rem; }
.accaff { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.accaff > div { flex: 1 1 18rem; }
.accaff .aff { margin-top: .2rem !important; }
.adtag { flex: none; align-self: flex-start; font: 700 .72rem/1 "Figtree", system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: #5b5e78; border-radius: 6px; padding: .3rem .45rem; }
.acc .ph { margin-top: 1rem; }

/* Nav on mid-size screens (tablets, narrow laptop windows): keep each link on one line and let the
   row scroll sideways if needed, instead of squashing "Find your uni" and "How we rank" onto 2-3 lines. */
header nav a { white-space: nowrap; }
@media (max-width: 1000px) {
  header nav { flex-wrap: nowrap !important; overflow-x: auto; width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  header nav::-webkit-scrollbar { display: none; }
  header nav a { flex: none; }
}

/* Homepage subject search: matches drop down right under the box, so you don't have to scroll to the grid. */
.band.home { overflow: visible; z-index: 3; }
.band.home::before { display: none; }
.band.home .bandbg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.band.home .bandbg::before { content: ""; position: absolute; inset: auto -10% -60% auto; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), rgba(255,255,255,0) 65%); }
.band.home .wrap { position: relative; }
.hsearch { position: relative; width: min(100%, 32rem); }
.hsearch .find.big { width: 100%; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + .45rem); z-index: 30; list-style: none; margin: 0; padding: .4rem; background: #fff; border-radius: 1.1rem; box-shadow: 0 22px 50px -18px rgba(10,10,40,.55); }
.suggest a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .9rem; border-radius: .75rem; color: var(--ink) !important; text-decoration: none; font-weight: 700; }
.suggest a:hover, .suggest a:focus { background: #f1effa; outline: none; }
.suggest .sc { color: var(--muted); font-weight: 500; font-size: .85rem; white-space: nowrap; }
.suggest .none { padding: .7rem .9rem; color: var(--ink); line-height: 1.45; }
.suggest .none a { display: inline; padding: 0; font-weight: 700; text-decoration: underline; }

/* Ranking tables: keep the column headings in view while scrolling down.
   - Table fits the screen (laptops/desktops): the box stops scrolling sideways, so the headings stick
     to the top of the window, just under the site menu (--hdr is the menu height, set by site.js).
   - Table wider than the screen (phones/tablets): the table scrolls inside its own box, and the
     headings stick to the top of that box. */
.scroll.fits { overflow: visible; }
.scroll.fits table.rank thead th { top: var(--hdr, 0px); z-index: 2; }
.scroll.fits table.rank thead th:first-child { border-top-left-radius: var(--r-md); }
.scroll.fits table.rank thead th:last-child { border-top-right-radius: var(--r-md); }
.scroll.tall { max-height: 78vh; overflow: auto; overscroll-behavior: contain; }
.scroll.tall table.rank thead th { top: 0; z-index: 2; }
