/* nkpfxx.cn: no external fonts or CDN. Everything uses system fonts so the site loads normally in mainland China. */

:root {
  --paper: #f6f8f4;
  --paper-2: #ecf2ed;
  --ink: #1d2b28;
  --ink-2: #4a5a55;
  --rule: #bfd6c9;
  --red: #c42b2b;
  --blue: #24497a;
  --todo-bg: #fff1a8;
  --todo-ink: #5a4500;

  --song: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "AR PL UKai CN", "Songti SC", serif;

  --measure: 38em;
  --gutter: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131a18;
    --paper-2: #1a2320;
    --ink: #e3ebe7;
    --ink-2: #a8b7b1;
    --rule: #2f4740;
    --red: #f0675e;
    --blue: #93b6e8;
    --todo-bg: #4a3f10;
    --todo-ink: #ffe9a0;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--song);
  font-size: 17px;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--paper); padding: 4px 10px; z-index: 10; }

/* Notice strip: keeps visitors from mistaking this for the school's official site */
.notice {
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.6;
  padding: 10px var(--gutter);
  text-align: center;
}
.notice strong { font-weight: 700; }

.wrap {
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap.wide { max-width: calc(60em + var(--gutter) * 2); }

/* ---------- Type ---------- */
h1, h2, h3 { font-weight: 700; line-height: 1.35; margin: 0; }
h1 { font-size: clamp(32px, 7.2vw, 52px); letter-spacing: 0.02em; line-height: 1.25; }
h2 { font-size: 27px; margin-top: 3.2em; margin-bottom: 0.7em; padding-bottom: 0.35em; border-bottom: 2px solid var(--ink); }
h3 { font-size: 21px; margin-top: 2em; margin-bottom: 0.5em; }
p { margin: 0 0 1em; }
.lede { font-size: 19px; color: var(--ink-2); margin-top: 0.8em; }
.muted { color: var(--ink-2); font-size: 15px; }
small, .small { font-size: 14px; }

ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }

/* Text the author must replace before going live. Deliberately loud so nothing gets published by accident */
.todo {
  background: var(--todo-bg);
  color: var(--todo-ink);
  outline: 1px dashed currentColor;
  padding: 0 4px;
  font-family: var(--kai);
}

/* ---------- Hero ---------- */
.hero { padding-top: 48px; padding-bottom: 8px; }
.hero h1 { margin-top: 0; }

/* Lab report form */
.report {
  margin: 36px 0 12px;
  border: 2px solid var(--ink);
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box;
  position: relative;
}
.report-title {
  text-align: center;
  font-size: 20px;
  letter-spacing: 0.6em;
  padding: 10px 0 10px 0.6em;
  border-bottom: 2px solid var(--ink);
}
.report table { width: 100%; border-collapse: collapse; }
.report th, .report td {
  border-bottom: 1px solid var(--rule);
  padding: 12px 14px;
  vertical-align: top;
  text-align: left;
}
.report tr:last-child th, .report tr:last-child td { border-bottom: 0; }
.report th {
  width: 6.2em;
  font-weight: 400;
  color: var(--ink-2);
  border-right: 1px solid var(--rule);
  white-space: nowrap;
}
.report td { font-family: var(--kai); font-size: 19px; color: var(--blue); }
.report .blank { display: inline-block; min-width: 7em; border-bottom: 1px solid var(--ink-2); color: var(--ink-2); font-size: 15px; font-family: var(--song); }

/* Red-pen annotation */
.redpen {
  position: absolute;
  right: 18px;
  bottom: 54px;
  color: var(--red);
  font-family: var(--kai);
  font-size: clamp(20px, 4.4vw, 26px);
  line-height: 1.3;
  transform: rotate(-6deg);
  text-align: center;
  pointer-events: none;
}
.redpen svg { display: block; width: 100%; height: 14px; margin-top: 2px; overflow: visible; }
.redpen path { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; }

@media (prefers-reduced-motion: no-preference) {
  .redpen { animation: pen-in 0.5s 0.6s both ease-out; }
  .redpen path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: pen-draw 0.6s 1s forwards ease-in-out; }
  @keyframes pen-in { from { opacity: 0; transform: rotate(-6deg) scale(1.15); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
  @keyframes pen-draw { to { stroke-dashoffset: 0; } }
}

@media (max-width: 520px) {
  .report th { width: 4.8em; padding: 10px; }
  .report td { padding: 10px; font-size: 17px; }
  .redpen { position: static; transform: rotate(-3deg); margin: 4px 14px 14px auto; width: max-content; }
  @media (prefers-reduced-motion: no-preference) {
    @keyframes pen-in { from { opacity: 0; transform: rotate(-3deg) scale(1.15); } to { opacity: 1; transform: rotate(-3deg) scale(1); } }
  }
}

.toc { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 16px; }
.toc li { margin: 0; }

/* ---------- Claim vs. reality ---------- */
.versus { display: grid; gap: 0; border: 1px solid var(--rule); margin: 1.2em 0 1.6em; }
.versus > div { padding: 16px 18px; }
.versus > div + div { border-top: 1px solid var(--rule); }
.versus h4 { margin: 0 0 6px; font-size: 15px; font-weight: 400; color: var(--ink-2); }
.versus .said { background: var(--paper-2); }
.versus .seen p:last-child, .versus .said p:last-child { margin-bottom: 0; }
@media (min-width: 760px) {
  .versus { grid-template-columns: 1fr 1fr; }
  .versus > div + div { border-top: 0; border-left: 1px solid var(--rule); }
}

/* ---------- Required-experiment checklist ---------- */
.checklist { width: 100%; border-collapse: collapse; margin: 0.6em 0 1.4em; font-size: 16px; }
.checklist caption { text-align: left; color: var(--ink-2); font-size: 14px; padding-bottom: 6px; }
.checklist th, .checklist td { border-bottom: 1px solid var(--rule); padding: 8px 6px; text-align: left; vertical-align: top; }
.checklist thead th { font-weight: 400; color: var(--ink-2); border-bottom: 2px solid var(--ink); font-size: 14px; }
.checklist td.state { color: var(--red); font-family: var(--kai); white-space: nowrap; width: 5.5em; }
.checklist td.mod { color: var(--ink-2); font-size: 14px; width: 6em; }

/* ---------- Government document quotes ---------- */
.docgroup { font-size: 17px; margin: 2em 0 0.4em; color: var(--ink-2); }
.doc {
  margin: 1.4em 0;
  padding: 14px 0 0;
  border-top: 3px double var(--red);
}
.doc blockquote { margin: 0; font-size: 17px; }
.doc blockquote p { margin-bottom: 0.6em; }
.doc mark { background: none; color: inherit; font-weight: 700; border-bottom: 2px solid var(--red); }
.doc figcaption { font-size: 14px; color: var(--ink-2); line-height: 1.7; margin-top: 4px; }
.doc .docno { color: var(--red); white-space: nowrap; }

/* ---------- Timeline (football) ---------- */
.steps { list-style: none; padding: 0; margin: 1em 0 1.6em; border-left: 2px solid var(--rule); }
.steps li { position: relative; padding: 0 0 1em 22px; margin: 0; }
.steps li::before { content: ""; position: absolute; left: -7px; top: 0.6em; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.steps li.ban::before { border-color: var(--red); background: var(--red); }
.steps b { display: block; font-size: 15px; color: var(--ink-2); font-weight: 400; }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 18px; grid-template-columns: 1fr; margin: 1.2em 0; }
@media (min-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery figure:first-child { grid-column: 1 / -1; } }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.gallery img { border: 1px solid var(--rule); }

.evidence { margin: 1.2em 0 1.6em; max-width: 340px; }
.evidence-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: start; }
.evidence-row .evidence { margin: 0; max-width: none; }
.evidence-row + p { margin-top: 1.4em; }
.evidence img { border: 1px solid var(--rule); }
.evidence figcaption { font-size: 14px; color: var(--ink-2); margin-top: 6px; }

/* ---------- Questions for open day ---------- */
.ask { counter-reset: q; list-style: none; padding: 0; }
.ask li { padding: 10px 0 10px 2.2em; border-bottom: 1px solid var(--rule); position: relative; margin: 0; }
.ask li::before { content: "□"; position: absolute; left: 0.2em; top: 10px; color: var(--ink-2); }

/* ---------- Document index (sources.html) ---------- */
.index { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1em 0 2em; }
.index th, .index td { text-align: left; border-bottom: 1px solid var(--rule); padding: 9px 6px; vertical-align: top; }
.index thead th { font-weight: 400; color: var(--ink-2); border-bottom: 2px solid var(--ink); }
.index .docno { color: var(--red); white-space: nowrap; }
@media (max-width: 620px) {
  .index thead { display: none; }
  .index tr { display: block; border-bottom: 1px solid var(--rule); padding: 8px 0; }
  .index td { display: block; border: 0; padding: 2px 0; }
}

/* ---------- Footer ---------- */
footer { margin-top: 72px; padding: 28px 0 48px; border-top: 2px solid var(--ink); font-size: 14px; color: var(--ink-2); line-height: 1.8; }
footer p { margin-bottom: 0.6em; }

@media print {
  .notice { background: none; color: #000; border-bottom: 2px solid #000; }
  .redpen, .redpen path { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1 !important; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 12px; word-break: break-all; }
}
