
*{box-sizing:border-box}body{margin:0;background:#f5f5ef;color:#16372f;font:16px/1.45 "Segoe UI",system-ui,sans-serif}header{background:#103d33;color:#fff}.mast,main{max-width:1100px;margin:auto;padding:16px 24px}.mast,nav,.actions,.chips,.controls,.row,.line{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.mast{justify-content:space-between}.brand{font:bold 26px Georgia,serif;letter-spacing:-1px;color:white;text-decoration:none}.brand b{color:#ffe5a1}nav a{padding:8px 12px;color:#fff;text-decoration:none;border-radius:7px;font-weight:600}nav [aria-current=page]{color:#153c31;background:#e0efd9}main{padding-top:26px;padding-bottom:64px}h1,h2,h3,p{margin:0}h1{font:normal clamp(36px,5vw,58px)/1.13 Georgia,serif;letter-spacing:-.045em}h2{font:normal 26px Georgia,serif;margin:12px 0}h3{font-size:17px}.meta,small,.hint{color:#50645b;font-size:14px}.eyebrow{font-size:12px;letter-spacing:.09em;text-transform:uppercase;font-weight:bold;color:#546749;margin-bottom:5px}.panel,article,dialog{border:1px solid #c3cfc1;border-radius:12px;background:#fff}.panel,article{padding:14px 16px;margin:9px 0}.tools{background:#e9efe4}.controls{align-items:end;gap:8px 15px;margin:8px 0}label{display:inline-grid;gap:3px;color:#345247;font-size:13px;font-weight:650}button,select,input,textarea,.btn{font:inherit;color:inherit;border:1px solid #9daf9e;background:#fff;border-radius:6px;padding:7px 10px}input,select{max-width:100%}button,.btn,summary{cursor:pointer}button:hover,.btn:hover{background:#edf3eb}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #b38323;outline-offset:2px}button[aria-pressed=true],.primary{background:#184f40;color:white}.primary:hover{background:#23634f}a{color:#13543f}button:disabled{opacity:.4;cursor:default}.row{display:grid;grid-template-columns:45px 46px minmax(130px,1fr) auto auto;gap:10px}.rank{font:normal 25px Georgia;color:#456e59}.crest{width:42px;height:42px;object-fit:contain}.name{background:transparent;border:0;text-align:left;font-weight:750;font-size:18px;padding:0}.name:hover{text-decoration:underline;background:none}.score{text-align:right;font-weight:700;font-size:21px}.score small{display:block;font-weight:400}.chip{border-radius:5px;padding:2px 6px;background:#e3efdf;color:#22533c;font-size:12px;font-weight:700;display:inline-block}.amber{background:#ffebc7;color:#704900}.neutral{background:#e8eaf0;color:#4c5060}.chips{margin-top:3px}.actions{gap:5px}.actions button{font-size:13px}.result{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px}.result h2{font-size:22px}.panel p+p{margin-top:6px}.panel summary{font-weight:650}dialog{width:min(780px,94vw);max-height:88dvh;padding:0;color:inherit}dialog::backdrop{background:#0d241fb3}dialog .inner,.inline{padding:16px}.inline{margin:10px -3px 0;background:#f4f8f2;border-top:1px solid #c3cfc1}.detailtop{display:flex;gap:9px;align-items:center;justify-content:space-between}.detailtop h2{flex:1}.strip{display:flex;gap:4px;flex-wrap:wrap}.strip span{padding:6px;background:#e6efe3;border-radius:5px;font-size:13px}.wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;vertical-align:top;padding:9px 6px;border-bottom:1px solid #d4dfd1}th{color:#284b3f}thead{background:#e6eee2}.compare{overflow:auto;max-height:68vh}.compare table{min-width:510px}.compare thead{position:sticky;top:0}.compare tbody th{width:20%}.note{width:100%;min-height:54px}.saved-extra{padding-top:10px;border-top:1px solid #d4dfd1;margin-top:10px}.empty{margin:18px 0}.source{margin:20px 0;font-size:13px;color:#52675b}#notice:not(:empty){position:fixed;bottom:15px;left:50%;transform:translateX(-50%);border-radius:8px;background:#123f33;color:white;padding:10px 16px;z-index:4}h3 a{text-decoration:none}.campus-map{width:100%;height:200px;border:0}button,summary,a{touch-action:manipulation}
@media(max-width:680px){.mast,main{padding:12px}.mast{gap:8px}nav{gap:2px}nav a{font-size:14px;padding:6px}.brand{font-size:24px}.row{grid-template-columns:29px 32px minmax(0,1fr) auto;gap:6px}.crest{width:32px;height:34px}.row .actions{grid-column:3/-1}.score{font-size:17px}.name{font-size:16px}.panel,article{padding:10px}.controls{gap:6px}.controls label{max-width:100%}.result{align-items:start}.rank{font-size:19px}.phasebar button{padding:6px}.score small{font-size:11px}.compare th,.compare td{font-size:14px}nav a[aria-current=page]{border-radius:4px}}

.trend{display:grid;gap:5px;margin:12px 0}.trend div{display:grid;grid-template-columns:44px minmax(60px,1fr) 56px;gap:8px;align-items:center;font-size:13px}.trend span{height:8px;border-radius:6px;background:#e4ede1}.trend i{display:block;border-radius:6px;height:100%;background:#38785d}.mast select{font-size:13px;color:#154336}.strip{margin:6px 0}#home-map circle,#home-map path{cursor:pointer}.source a{white-space:nowrap}@media(max-width:680px){.mast{display:grid;grid-template-columns:1fr auto}.mast nav{grid-column:1/-1;grid-row:2}.mast nav a{flex:1;text-align:center}.mast>div{grid-column:2;grid-row:1}.trend{max-width:420px}}
/* Use the school badge colours and typography from PSLE Compass. */
body { background: #f2f2f2; color: #142b31; font-family: "DM Sans", system-ui, sans-serif; }
header { background: #103d3a; }
.brand { font: 750 1.55rem/1 "DM Sans", system-ui, sans-serif; color: #bde9ce; }
h1, h2 { font-family: "Instrument Serif", Georgia, serif; }
.tools { background: #f5faf7; }
article .rank { justify-self: start; padding: 2px 5px; border-radius: 6px; background: #e2f3e9; color: #103d3a; font: 750 1rem/1.2 "DM Sans", system-ui, sans-serif; }
article .rank:empty { display: none; }
article .rank:empty + .crest { grid-column: 2; }
.school-labels, .admission-icon, .ranking-filters, .rank-filter { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.school-labels { margin: 2px 0 4px; min-width: 0; }
.school-badge, .school-zone { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: .72rem; font-weight: 750; line-height: 1.3; white-space: nowrap; }
.school-badge { box-shadow: inset 0 0 0 1.5px currentColor; }
.badge-sap, [data-choice="sap"] { background: #e7e2f2; color: #4d396d; }
.badge-gep, [data-choice="gep"] { background: #dcebf8; color: #214f88; }
.badge-two, [data-choice="two"] { background: #d9eee5; color: #155943; }
.school-zone { background: #eef1ee; color: #344c48; }
.school-zone::before { content: ""; display: inline-block; margin-inline-end: 4px; width: .55em; height: .55em; border-radius: 50%; background: var(--zone-colour, #456d62); }
[data-zone="North"] { --zone-colour: #2866a6; }
[data-zone="South"] { --zone-colour: #b95026; }
[data-zone="East"] { --zone-colour: #008261; }
[data-zone="West"] { --zone-colour: #6347a8; }
.boy-icon, .girl-icon { width: 13px; height: 16px; flex: none; }
.boy-icon { fill: #214f88; }
.girl-icon { fill: #8b3260; }
.ranking-filters { gap: 8px 16px; }
.rank-filter { gap: 4px; font-size: .79rem; }
.rank-filter b { margin-inline-end: 2px; }
.rank-filter button { display: inline-flex; align-items: center; padding: 4px 7px; font-weight: 700; }
.rank-filter [data-choice="boy"] { background: #e5effd; color: #214f88; }
.rank-filter [data-choice="girl"] { background: #fae8f0; color: #8b3260; }
.rank-filter button[aria-pressed="true"] { background: #103d3a; color: white; }
.rank-filter button[aria-pressed="true"] svg { fill: currentColor; }
.phase-comparison { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; color: #35534f; font-size: .8rem; }
.phase-comparison strong { color: #103d3a; }
@media (max-width: 680px) {
  .rank-filter button { min-height: 32px; }
  .school-badge, .school-zone { font-size: .68rem; }
}

.ranking-scroll { margin: 12px 0; overflow-x: auto; border: 1px solid #b7cdc2; border-radius: 12px; }
.ranking-table { min-width: 680px; background: #fff; }
.ranking-table thead { background: #103d3a; }
.ranking-table th[scope="col"] { padding: 0; }
.ranking-table th button {
  width: 100%; height: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 8px; padding: 10px; border: 0; border-radius: 0; background: transparent;
  color: #fff; font-size: .86rem; font-weight: 750; text-align: left;
}
.ranking-table th button[data-selected="true"], .ranking-table th button:hover { background: #256057; }
.ranking-table th button:focus-visible { outline-offset: -3px; }
.ranking-table th button span { opacity: .85; }
.ranking-table td { padding: 9px; vertical-align: middle; }
.ranking-table tbody tr:nth-child(even) { background: #f1f6f3; }
.ranking-table .rank { font: 750 .875rem/1.2 "DM Sans", system-ui, sans-serif; color: #103d3a; }
.ranking-school { min-width: 220px; }
.ranking-school .actions { margin-top: 5px; }
.ranking-school .actions button { padding: 3px 6px; }
.ranking-identity { display: flex; align-items: center; gap: 8px; }
.ranking-identity .crest { flex: none; }
.ranking-number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ranking-number[data-selected="true"] { background: #e4f2e9; font-weight: 750; }
@media (max-width: 680px) {
  .ranking-table .inline { width: calc(100vw - 46px); margin: 0; }
}

.crest { width: 50px; height: 50px; }
.crest-frame, .crest-initials { display: grid; place-items: center; flex: none; }
.crest-initials { border-radius: 8px; background: #e4f2e9; color: #103d3a; font-weight: 750; }
.crest-frame > span { position: relative; overflow: hidden; display: block; mix-blend-mode: multiply; }
.crest-frame img { position: absolute; max-width: none; max-height: none; }
.row { grid-template-columns: 45px 50px minmax(130px,1fr) auto auto; }
@media (max-width: 680px) {
  .crest { width: 40px; height: 40px; }
  .row { grid-template-columns: 29px 40px minmax(0,1fr) auto; }
}

.notice-heading, .notice-links, .pick-result-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
}
.rule-notice { background: #e9f4ed; border-color: #9dbfaf; }
.notice-heading h2 { margin: 0; font-size: clamp(1.35rem, 4vw, 1.8rem); line-height: 1.12; }
.notice-heading { margin-bottom: 7px; }
.rule-notice details, .notice-links { margin-top: 10px; }
.rule-notice p { max-width: 73ch; }
.track-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 9px 0; max-width: 570px; }
.track-split div { display: grid; padding: 8px 10px; border-radius: 8px; border: 1px solid #9dbfaf; background: #fff; }
.track-split div:nth-child(2) { border-color: #adbacd; background: #f5f8fc; }
.track-split span, .notice-links { font-size: .84rem; }
.track-schools { columns: 2; padding-inline-start: 20px; }
.track-schools button { padding: 2px 0; border: 0; background: transparent; text-align: left; text-decoration: underline; }
.pick-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 0 16px; background: #fff; }
.pick-controls h2 { grid-column: 1/-1; margin: 4px 0 6px; }
.pick-controls #home { align-items: end; }
.pick-controls .picker-map { margin: 4px 0; background: #edf5f2; align-self: start; }
.travel-filter { display: grid; gap: 5px; padding: 9px; margin: 9px 0; border-radius: 9px; background: #edf1f6; color: #24354d; }
.travel-filter .actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.travel-filter button { padding: 6px 4px; font-weight: 750; }
.pick-result-head { justify-content: space-between; }
.pick-result-head h2 { font-size: 2rem; }
.pick-group { margin: 12px 0; }
.pick-group h3 { font-size: .95rem; color: #365c53; }
.pick-cards { display: grid; gap: 8px; margin-top: 5px; }
.pick-cards article { margin: 0; min-width: 0; background: linear-gradient(140deg, #f2f7f7, #dfe8ed); border-color: #9fb3b5; }
.pick-cards article.recommend { background: linear-gradient(140deg, #e6f4e7, #c5e1cf); }
.pick-cards article.stretch { background: linear-gradient(140deg, #f2eaf6, #e2d8ee); }
.pick-cards .chip.recommend { background: #b0d6bb; color: #174831; }
.pick-cards .chip.stretch { background: #dcc8e9; color: #573671; }
.pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.pick-cards .row { grid-template-columns: max-content 50px minmax(0, 1fr); gap: 5px 7px; }
.pick-cards .score, .pick-cards .row .actions { grid-column: 3; text-align: start; }
.pick-cards .score { font-size: .88rem; }
.pick-cards .score small { font: 700 .8rem/1.2 "DM Sans", system-ui, sans-serif; color: #154336; }
.pick-cards .row button { padding: 4px 6px; }
.pick-cards .row button.name { padding: 0; }
.pick-stat, .pick-history { font-size: .82rem; margin-top: 5px; }
.school-details-button { width: 100%; margin-top: 7px; text-align: left; font-weight: 750; background: linear-gradient(100deg, #eaf5ee, #c4d5d2); }
.school-details-button::after { content: "⌄"; float: inline-end; }
.school-life-section { background: #eff7f1; }
.school-life-section summary { cursor: pointer; }
.school-life-section summary .chip { margin-inline-start: 4px; }
.school-life-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.school-life-grid section { background: #fff; border: 1px solid #c9dcd1; border-radius: 8px; padding: 8px; }
.school-life-grid h4 { margin: 0 0 4px; color: #103d3a; font-size: .91rem; }
.school-life-list { margin: 0; padding-inline-start: 17px; font-size: .88rem; }
.school-life-grid p { margin-top: 5px; font-size: .83rem; }
@media (min-width: 681px) {
  .pick-list .row { grid-template-columns: 36px 50px minmax(0, 1fr) auto auto; }
  .pick-list .score, .pick-list .row .actions { grid-column: auto; }
}
@media (max-width: 850px) {
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .pick-controls, .pick-grid { grid-template-columns: minmax(0, 1fr); }
  .pick-cards .row { grid-template-columns: max-content 40px minmax(0, 1fr); }
  .track-schools { columns: 1; }
}
