/* A school report book: green cloth cover, pale ruled page, near-black ink.
   The four greens double as the legend for the four levels of risk. */
:root {
  color-scheme: light;
  --ink: #091413;
  --cover: #285A48;
  --cover-deep: #1D4335;
  --mid: #408A71;
  --mint: #B0E4CC;
  --mint-soft: #D9F1E5;
  --paper: #F1F8F4;
  --field: #FCFEFD;
  --rule: #A9D2BF;
  --error: #9A2A1B;
  --pad: 18px;
  --display: "Besley", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --text: "Libre Franklin", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
    system-ui, sans-serif;
  --cloth:
    repeating-linear-gradient(0deg, rgba(9, 20, 19, 0.14) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(176, 228, 204, 0.05) 0 1px, transparent 1px 3px);
  --hatch: repeating-linear-gradient(135deg, transparent 0 4px, rgba(40, 90, 72, 0.26) 4px 5.5px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 700px) { :root { --pad: 44px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--cover);
  background-image: var(--cloth);
  font: 16px/1.55 var(--text);
  caret-color: var(--cover);
}
::selection { background: var(--cover); color: var(--mint); }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
.cover :focus-visible, .back :focus-visible, .lock :focus-visible { outline-color: var(--mint); }
.wrap { width: min(780px, 100% - 40px); margin: 0 auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 8.6vw, 58px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 5.6vw, 31px); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-size: 19px; font-weight: 700; line-height: 1.25; }
:lang(zh-Hans) h1 { line-height: 1.2; letter-spacing: 0; font-weight: 900; }
:lang(zh-Hans) h2, :lang(zh-Hans) h3 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0 0 12px; }
.small { font-size: 14px; color: var(--cover); }

/* ---------- cover ---------- */
.cover { color: var(--mint); padding-bottom: 64px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; }
.mark { font: 700 17px/1.2 var(--display); text-decoration: none; letter-spacing: 0.01em; }
.bar__right { display: flex; align-items: center; gap: 18px; }
.navlink { font-size: 15px; display: none; }
@media (min-width: 620px) { .navlink { display: inline; } }
.lang { display: flex; border: 1.5px solid var(--mid); border-radius: 3px; overflow: hidden; }
.lang button {
  border: 0; background: transparent; color: var(--mint); font: inherit; font-size: 14px;
  padding: 6px 11px; min-height: 34px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--mint); color: var(--ink); font-weight: 600; }
.hero { padding-top: clamp(26px, 6vw, 56px); }
.hero h1 { max-width: 16ch; }
.hero p { margin: 16px 0 0; max-width: 46ch; font-size: 17px; color: #DDF3E8; }
.hero .more { display: none; margin-top: 12px; font-size: 15px; color: var(--mint); }

/* ---------- the page ---------- */
.page {
  position: relative; width: min(780px, 100% - 20px); margin: -44px auto 0;
  background: var(--paper); border-radius: 3px 3px 0 0; padding: 22px var(--pad) 44px;
  box-shadow: 0 -10px 28px rgba(9, 20, 19, 0.3);
}
.part { border-top: 3px double var(--cover); margin-top: 44px; padding-top: 26px; }
.part > h2 { margin-bottom: 12px; }
.page > #results:first-child > .part:first-child { border-top: 0; margin-top: 0; padding-top: 6px; }
.part > p { max-width: 62ch; }
.banner {
  background: var(--mint-soft); border: 1.5px dashed var(--cover); border-radius: 3px;
  padding: 8px 12px; font-size: 14px; margin: 0 0 18px;
}
.partner { font-weight: 600; color: var(--cover); margin: 0 0 14px; }

/* ---------- form ---------- */
.field { margin-bottom: 20px; min-width: 0; }
.field > label, .field > .label { display: block; font-weight: 600; margin-bottom: 4px; }
.help { font-size: 14px; color: var(--cover); margin: 0 0 8px; }
.error { font-size: 14px; font-weight: 600; color: var(--error); margin: 6px 0 0; }
input[type="number"], input[type="text"], input[type="search"], select {
  width: 100%; font: inherit; color: inherit; background: var(--field);
  border: 1.5px solid var(--cover); border-radius: 3px; padding: 11px 12px; min-height: 48px;
}
input::placeholder { color: var(--cover); opacity: 1; }
input.short { max-width: 170px; }
.top { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.top .help { display: none; }
input.scorebox {
  width: 116px; height: 78px; padding: 0; text-align: center; border: 2px solid var(--ink);
  font: 800 46px/1 var(--display); appearance: textfield;
  -moz-appearance: textfield;
}
input.scorebox::-webkit-outer-spin-button, input.scorebox::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.seg { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.seg--tight { grid-template-columns: 1fr 1fr; }
.seg--three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.seg--three label { padding: 9px 8px; font-size: 14px; line-height: 1.25; display: flex; align-items: center; min-width: 0; }
.top .seg label { min-height: 78px; display: flex; align-items: center; }
.seg label {
  position: relative; display: block; border: 1.5px solid var(--cover); border-radius: 3px;
  padding: 10px 12px; cursor: pointer; background: var(--field); min-height: 48px;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label:hover { background: var(--mint-soft); }
.seg label:has(input:checked) { background: var(--cover); color: var(--mint); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.seg b { display: block; font-weight: 600; }
.seg span { display: block; font-size: 13px; line-height: 1.35; margin-top: 2px; color: var(--cover); }
.seg label:has(input:checked) span { color: var(--mint); }

.chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; max-height: 212px; overflow: auto;
  padding: 3px; scrollbar-color: var(--cover) transparent;
}
.chip {
  border: 1.5px solid var(--cover); background: var(--field); border-radius: 3px; padding: 7px 11px;
  font: inherit; font-size: 14px; cursor: pointer; color: var(--ink);
}
.chip:hover { background: var(--mint-soft); }
.chip[aria-pressed="true"] { background: var(--cover); color: var(--mint); }
.chip:disabled { opacity: 0.45; cursor: default; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 0; border-radius: 3px; background: var(--ink); color: var(--mint); cursor: pointer;
  font: 600 17px/1.2 var(--text); padding: 14px 22px; min-height: 56px; text-decoration: none;
  transition: background-color 0.18s var(--ease), transform 0.12s var(--ease);
}
.btn:hover { background: var(--cover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn--mint { background: var(--mint); color: var(--ink); }
.btn--mint:hover { background: #fff; }
.btn--line {
  background: transparent; color: var(--ink); border: 1.5px solid var(--ink); width: auto;
  font-size: 15px; min-height: 46px; padding: 10px 16px;
}
.btn--line:hover { background: var(--mint-soft); }
.note { font-size: 14px; color: var(--cover); margin: 10px 0 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 0; }

.more { border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule); margin: 4px 0 16px; }
.more summary { cursor: pointer; padding: 13px 0; font-weight: 600; }
.more summary:hover { color: var(--cover); }
.more[open] summary { margin-bottom: 8px; }

/* ---------- the four levels ---------- */
.t-reach { background-image: var(--hatch); color: var(--ink); }
.t-line { background-color: var(--mint); color: var(--ink); }
.t-comfortable { background-color: var(--cover); color: var(--mint); }
.t-safe { background-color: var(--ink); color: var(--mint); }

.ledgerbox { margin: 4px 0 18px; }
.ledger {
  display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--ink);
  border-radius: 3px; overflow: hidden; background: var(--field);
}
.ledger > div { padding: 11px 3px 9px; text-align: center; min-width: 0; }
.ledger > div + div { border-left: 1.5px solid var(--ink); }
.ledger b { display: block; font: 800 30px/1 var(--display); }
.ledger span { display: block; font-size: 11.5px; font-weight: 600; line-height: 1.2; margin-top: 5px; letter-spacing: -0.01em; }
.ledgerbox .small { margin: 8px 0 0; }

.stamp {
  display: inline-block; flex: none; border: 1.5px solid var(--ink); border-radius: 2px; padding: 3px 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
}
.stamp.t-reach { border-style: dashed; border-color: var(--cover); }
.stamp.t-comfortable { border-color: var(--cover); }

/* ---------- the report ---------- */
.insights { margin: 0; padding: 0; list-style: none; max-width: 64ch; }
.insights li { padding: 12px 0; border-top: 1.5px solid var(--rule); }
.insights li:first-child { border-top: 0; padding-top: 0; }

.stripbox { margin-top: 30px; }
.stripbox h3 { margin-bottom: 4px; }
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin: 12px 0 16px; }
.sq { width: 11px; height: 11px; border-radius: 1px; }
.sq.t-reach { box-shadow: inset 0 0 0 1px var(--cover); }
.sq--pick {
  width: 25px; height: 25px; margin: 3px 4px; outline: 1.5px solid var(--ink); outline-offset: 2px;
  font: 800 14px/25px var(--display); text-align: center;
}
.legend { display: grid; gap: 8px; margin: 0; font-size: 14px; }
.legend div { display: grid; grid-template-columns: 124px 1fr; gap: 10px; align-items: baseline; }
.legend dd { margin: 0; color: var(--cover); }
.legend .stamp { justify-self: start; }

.entries { list-style: none; margin: 26px 0 0; padding: 0; border-bottom: 1.5px solid var(--rule); }
.entry { display: grid; grid-template-columns: 46px 1fr; gap: 0 8px; padding: 18px 0 20px; border-top: 1.5px solid var(--rule); }
.entry__n { font: 800 42px/0.95 var(--display); color: var(--cover); }
.entry__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.entry h3 { font-size: 20px; }
.entry__meta { font-size: 14px; color: var(--cover); margin: 5px 0 10px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 3px 18px; font-size: 15px; font-variant-numeric: tabular-nums; }
.facts .strong { font-weight: 700; }
.remarks { margin: 12px 0 0; padding: 10px 12px 11px; background: var(--mint-soft); border-radius: 2px; font-size: 14.5px; }
.remarks h4 { margin: 0 0 3px; font: 700 13px/1.3 var(--text); color: var(--cover); }
.remarks p { margin: 0 0 6px; }
.remarks p:last-child { margin: 0; }
.entry .moe { display: inline-block; margin-top: 10px; font-size: 14px; color: var(--cover); }
.entry--locked .entry__n { color: var(--mid); }
.entry--locked .entry__meta { margin-bottom: 0; }
.ghost { display: block; width: min(62%, 300px); height: 16px; margin-top: 5px; border-radius: 2px; background-image: var(--hatch); box-shadow: inset 0 0 0 1px var(--rule); }

.lock {
  margin: 28px calc(-1 * var(--pad)) 0; padding: 30px var(--pad) 32px;
  background-color: var(--cover); background-image: var(--cloth); color: var(--mint);
}
.lock h2 { margin-bottom: 8px; }
.lock p { max-width: 54ch; color: #DDF3E8; }
.lock .small { color: var(--mint); margin: 12px 0 0; }
.lock .error { color: #FFD9D0; }
.ticks { list-style: none; margin: 14px 0 20px; padding: 0; display: grid; gap: 8px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; }
.ico { margin-top: 3px; flex: none; }

.alts { margin: 0; padding: 0; list-style: none; }
.alts li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1.5px solid var(--rule); font-size: 15px; }
.alts li:first-child { border-top: 0; }
.alts .meta { color: var(--cover); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.how { padding-left: 22px; margin: 0; font-size: 15px; max-width: 64ch; }
.how li { margin-bottom: 8px; }

/* The six lines are written in, top to bottom, when the list is first built. */
@media (prefers-reduced-motion: no-preference) {
  .inked .entries > li { animation: ink 0.7s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 120ms); }
  @keyframes ink {
    from { clip-path: inset(0 100% 0 0); opacity: 0.2; }
    to { clip-path: inset(0 0 0 0); opacity: 1; }
  }
}

/* ---------- schools the parent has in mind ---------- */
.chips--picked { max-height: none; margin: 0 0 10px; padding: 0; }
.chip--x { display: inline-flex; align-items: center; gap: 6px; background: var(--cover); color: var(--mint); text-align: left; }
.chip--x:hover { background: var(--ink); }
.chip--x .ico { margin: 0; width: 14px; height: 14px; }
.stamp.t-out { border-style: dashed; border-color: var(--ink); background: transparent; color: var(--ink); }
.mind { margin: 22px 0 6px; }
.mind > h3 { margin-bottom: 4px; }
.mindlist { list-style: none; margin: 12px 0 0; padding: 0; }
.mindlist > li { padding: 14px 0 16px; border-top: 1.5px solid var(--rule); }
.mindlist > li:last-child { border-bottom: 1.5px solid var(--rule); }
.mindlist h4 { margin: 0 0 6px; font: 700 18px/1.25 var(--display); }
.mindlist .remarks h4 { font: 700 13px/1.3 var(--text); margin: 0 0 3px; }
.mindrow + .mindrow { margin-top: 14px; }
.mindrow__track { font-size: 14px; color: var(--cover); }
.mindrow .facts { margin-top: 6px; }
.mindrow__status { margin: 8px 0 0; font-size: 14.5px; }

/* ---------- notes on the sample report ---------- */
.gloss { background: var(--mint); border-radius: 3px; padding: 12px 14px 13px; margin: 14px 0 16px; font-size: 14.5px; max-width: 64ch; }
.gloss h4 { margin: 0 0 4px; font: 700 13px/1.3 var(--text); letter-spacing: 0.02em; }
.gloss p { margin: 0; }
.gloss ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.stripbox + .gloss { margin-top: 18px; }

/* ---------- share image ---------- */
.disc { margin: 14px 0 0; }
.share__grid { display: grid; gap: 22px; margin-top: 14px; }
@media (min-width: 620px) { .share__grid { grid-template-columns: 250px 1fr; align-items: start; } }
.cardprev { display: block; width: min(100%, 250px); height: auto; border-radius: 4px; box-shadow: 0 10px 24px rgba(9, 20, 19, 0.28); }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--cover); }
.check:has(input:disabled) { color: var(--mid); cursor: default; }

/* ---------- landing sections ---------- */
.timeline { list-style: none; margin: 16px 0 10px; padding: 0; max-width: 62ch; }
.timeline li { display: grid; gap: 2px 18px; padding: 13px 0; border-top: 1.5px solid var(--rule); }
.timeline li:last-child { border-bottom: 1.5px solid var(--rule); }
.timeline b { font: 700 18px/1.3 var(--display); }
@media (min-width: 620px) { .timeline li { grid-template-columns: 250px 1fr; align-items: baseline; } }
.rules { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: rule; max-width: 62ch; }
.rules li { counter-increment: rule; display: grid; grid-template-columns: 46px 1fr; gap: 0 8px; padding: 14px 0; border-top: 1.5px solid var(--rule); }
.rules li::before { content: counter(rule); font: 800 34px/1 var(--display); color: var(--cover); }
.rules p { margin: 3px 0 0; }
.also { margin: 18px 0 14px; padding: 14px 16px; background: var(--mint-soft); border-radius: 2px; list-style: none; display: grid; gap: 8px; max-width: 62ch; }
.sample { margin-top: 6px; }
.sample .entries { margin-top: 12px; }

.compare { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 15px; }
.compare th, .compare td { padding: 12px 6px; border-top: 1.5px solid var(--rule); vertical-align: middle; }
.compare thead th { border-top: 0; font: 700 15px/1.2 var(--display); text-align: center; white-space: nowrap; padding-bottom: 8px; }
.compare tbody th { text-align: left; font-weight: 400; padding-left: 0; }
.compare tbody td, .compare thead th { text-align: center; width: 76px; }
.compare thead td { border-top: 0; }
.compare tbody td:last-child, .compare thead th:last-child { background: var(--mint-soft); }
.compare .ico { margin: 0; vertical-align: middle; }
.compare .no { color: var(--mid); }

.checks { list-style: none; margin: 14px 0 18px; padding: 0; display: grid; gap: 10px; max-width: 62ch; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.checks .ico { color: var(--cover); }
.go { font-weight: 600; }

/* ---------- back cover ---------- */
.back { color: var(--mint); padding: 46px 0 44px; font-size: 14px; }
.close { margin-bottom: 40px; }
.close h2 { max-width: 18ch; }
.close p { margin: 10px 0 20px; font-size: 17px; color: #DDF3E8; max-width: 44ch; }
.close .btn { width: auto; min-width: 220px; }
.is-built .close { display: none; }
.foot p { margin: 0 0 5px; color: #CFEBDD; }
.foot a { color: var(--mint); }

/* ---------- why page ---------- */
.toc { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 0; counter-reset: toc; }
.toc li { counter-increment: toc; border-top: 1.5px solid var(--rule); }
.toc li:last-child { border-bottom: 1.5px solid var(--rule); }
.toc a { display: grid; grid-template-columns: 40px 1fr; align-items: baseline; padding: 12px 0; text-decoration: none; font: 700 19px/1.2 var(--display); }
.toc a::before { content: counter(toc); font-weight: 800; font-size: 26px; color: var(--cover); }
.toc a:hover { background: var(--mint-soft); }
.prose p, .prose li { max-width: 64ch; }
.prose h3 { margin: 26px 0 6px; }
.prose ul { margin: 6px 0 14px; padding: 0; list-style: none; display: grid; gap: 8px; }
.prose ul li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.prose ul.plain li::before { content: ""; width: 7px; height: 7px; margin-top: 9px; background: var(--cover); border-radius: 1px; }
.faq { margin: 4px 0 0; }
.faq dt { font: 700 18px/1.3 var(--display); padding-top: 16px; margin-top: 16px; border-top: 1.5px solid var(--rule); }
.faq dt:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.faq dd { margin: 6px 0 0; max-width: 64ch; }
.pagecta { margin-top: 40px; }

@media (max-width: 420px) {
  .legend div { grid-template-columns: 1fr; gap: 4px; }
  .compare tbody td, .compare thead th { width: 64px; }
  .ledger b { font-size: 27px; }
}

@media print {
  body { background: #fff; font-size: 11.5pt; }
  .cover, .back, .no-print, .lock { display: none !important; }
  .page { width: 100%; margin: 0; padding: 0; box-shadow: none; background: #fff; }
  .part { margin-top: 18px; padding-top: 14px; }
  .entry { break-inside: avoid; padding: 10px 0; }
  .stamp, .sq, .remarks, .ledger > div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
