/* ---- theme tokens: one set per theme, everything below reads only these ---- */
/* color-scheme: native parts (checkbox boxes, <select> lists, date pickers, scrollbars) follow the chosen
   theme, not the OS: light chosen at night otherwise drew them dark. "only" also keeps a browser's forced
   dark mode off the light theme. */
:root {
  color-scheme: only light;
  --bg: #F6F7F9; --surface: #FFFFFF; --surface-2: #EEF0F4; --line: #E1E4EA; --line-2: #D5D9E2;
  --ink: #14161B; --ink-2: #4B5260; --muted: #6B7280;
  --gold: #D9B14A; --gold-ink: #8A6A12; --gold-glow: rgba(217,177,74,.35);
  --card-bg: #FFFFFF; --card-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 10px 28px -22px rgba(20,22,27,.35);
  --card-hover: 0 0 0 1px rgba(217,177,74,.35), 0 24px 48px -28px rgba(20,22,27,.25);
  --ok: #166534; --danger: #9F1239; --focus: #1E4DB7;
  --tg-inst-bg: #E8F0FE; --tg-inst-fg: #1E4DB7;
  --tg-earth-bg: #DDF7F2; --tg-earth-fg: #0F766E; --tg-cs-bg: #F3E8FF; --tg-cs-fg: #6B21A8;
  --tg-phys-bg: #DBEAFE; --tg-phys-fg: #1E40AF; --tg-life-bg: #DCFCE7; --tg-life-fg: #166534;
  --tg-eng-bg: #FFEDD5; --tg-eng-fg: #9A3412; --tg-soc-bg: #FFE4E6; --tg-soc-fg: #9F1239; --tg-other-bg: #EEF0F4; --tg-other-fg: #4B5260;
  --tg-fund-bg: #DCFCE7; --tg-fund-fg: #166534; --tg-limit-bg: #FFE4E6; --tg-limit-fg: #9F1239;
  --tg-grant-bg: #FFEDD5; --tg-grant-fg: #9A3412; --tg-lang-bg: #E0E7FF; --tg-lang-fg: #3730A3;
  --report-bg: linear-gradient(160deg, #161A22, #0F1217); --report-ink: #E6E8EE; --report-muted: #7C8494; --report-tile: #0C0E12; --report-line: #242935;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C0E12; --surface: #12151B; --surface-2: #1B1F27; --line: #242935; --line-2: #2E3546;
  --ink: #E6E8EE; --ink-2: #A3AAB8; --muted: #7C8494;
  --gold: #F1C75B; --gold-ink: #F1C75B; --gold-glow: rgba(241,199,91,.25);
  --card-bg: linear-gradient(180deg, #1B2029, #14181F); --card-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 14px 34px -20px rgba(0,0,0,.9);
  --card-hover: 0 0 0 1px rgba(241,199,91,.3), 0 24px 48px -24px rgba(241,199,91,.25);
  --ok: #86EFAC; --danger: #FDA4AF; --focus: #F1C75B;
  --tg-inst-bg: rgba(96,165,250,.14); --tg-inst-fg: #93C5FD;
  --tg-earth-bg: rgba(45,212,191,.14); --tg-earth-fg: #5EEAD4; --tg-cs-bg: rgba(192,132,252,.16); --tg-cs-fg: #D8B4FE;
  --tg-phys-bg: rgba(96,165,250,.16); --tg-phys-fg: #BFDBFE; --tg-life-bg: rgba(74,222,128,.14); --tg-life-fg: #86EFAC;
  --tg-eng-bg: rgba(251,146,60,.14); --tg-eng-fg: #FDBA74; --tg-soc-bg: rgba(251,113,133,.14); --tg-soc-fg: #FDA4AF; --tg-other-bg: rgba(148,163,184,.16); --tg-other-fg: #CBD5E1;
  --tg-fund-bg: rgba(74,222,128,.14); --tg-fund-fg: #86EFAC; --tg-limit-bg: rgba(251,113,133,.14); --tg-limit-fg: #FDA4AF;
  --tg-grant-bg: rgba(251,146,60,.14); --tg-grant-fg: #FDBA74; --tg-lang-bg: rgba(129,140,248,.16); --tg-lang-fg: #A5B4FC;
}
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }

* { box-sizing: border-box; } html { overflow-x: hidden; } body { overflow-x: hidden; }
h1, h2, h3, p, dd, td, li, .meta span, .pos h3 a, .brief dd { overflow-wrap: anywhere; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; } .scroll-x > table { min-width: 560px; }
html.theming, html.theming * { transition: background-color .35s, color .35s, border-color .35s, box-shadow .35s !important; }
body { margin: 0; font-family: "Manrope", -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; } a:hover { color: var(--gold-ink); }
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }
.gold { color: var(--gold-ink); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* header */
header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
:root[data-theme="dark"] header { background: var(--bg); }
nav { display: flex; align-items: center; gap: 24px; height: 60px; }
nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: .02em; color: var(--ink); }
nav .brand i { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px var(--gold); }
nav .brand span { color: var(--muted); font-weight: 500; }
nav a.nl { color: var(--ink-2); font-size: 14px; } nav a.nl:hover, nav a.nl.on { color: var(--gold-ink); }
nav .sp { flex-grow: 1; } nav a, nav .brand, nav .btn { white-space: nowrap; }
nav a.lang { display: inline-flex; gap: 4px; align-items: center; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: .04em; color: var(--muted); padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; }
nav a.lang i { font-style: normal; color: var(--line-2); } nav a.lang span.on { color: var(--gold-ink); font-weight: 600; } nav a.lang:hover { border-color: var(--ink); color: var(--ink); }
.orig { font-size: 12px; color: var(--muted); margin: -4px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brief { background: var(--card-bg); border: 1px solid var(--gold); box-shadow: var(--card-shadow); border-radius: 14px; padding: 16px 18px; margin: 0 0 14px; }
.brief dl { display: grid; grid-template-columns: 84px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; } .brief dt { color: var(--gold-ink); font-weight: 600; } .brief dd { margin: 0; color: var(--ink); }
.kpi .vs { display: inline-block; margin-top: 2px; font-size: 11px; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); }
.kpi .vs.up { background: var(--tg-fund-bg); color: var(--tg-fund-fg); } .kpi .vs.down { background: var(--tg-limit-bg); color: var(--tg-limit-fg); }
form.notify { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
form.notify input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13px; width: 190px; }
.brief ul.checklist { margin: 0; padding-left: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.brief ul.checklist li { background: var(--surface-2); border-radius: 6px; padding: 2px 9px; font-size: 13px; }
.brief ul.checklist li::before { content: "☐ "; color: var(--gold-ink); }
.brief .ai { font-size: 12px; color: var(--muted); margin-top: 10px; }
details.orig-text > summary { cursor: pointer; color: var(--ink-2); font-size: 14px; font-weight: 600; margin: 22px 0 6px; list-style: none; }
details.orig-text > summary::before { content: "▸ "; color: var(--gold-ink); } details.orig-text[open] > summary::before { content: "▾ "; }
.theme-btn { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px; }
.theme-btn:hover { color: var(--ink); background: var(--surface-2); }
.theme-btn .sw { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); transition: background .3s; }
.theme-btn .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: left .3s cubic-bezier(.2,.8,.2,1), background .3s; }
.theme-btn[aria-pressed="true"] .sw::after { left: 20px; background: var(--gold); }
.theme-btn .sun, .theme-btn .moon { display: none; } :root[data-theme="dark"] .theme-btn .moon { display: block; } :root:not([data-theme="dark"]) .theme-btn .sun { display: block; }
main { padding: 28px 0 56px; }
nav .links { display: contents; }
nav .btn.cta { padding: 8px 14px; font-size: 13px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 0; margin-bottom: 8px; } .foot-links a { color: var(--ink-2); font-size: 13px; }
.foot-links a + a::before { content: "·"; color: var(--muted); margin: 0 10px; }
@media (max-width: 720px) {
  nav { flex-wrap: wrap; height: auto; padding: 8px 0 6px; gap: 6px 12px; }
  nav .brand { order: 0; } nav .sp { order: 1; } nav a.lang, nav .theme-btn, nav .btn.cta { order: 2; }
  nav .brand span { display: none; } .theme-btn .sw { display: none; } nav .btn.cta { padding: 6px 10px; font-size: 12px; }
  nav .links { display: flex; order: 3; flex-basis: 100%; gap: 16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav .links::-webkit-scrollbar { display: none; } nav a.nl { font-size: 14px; }
}
@media (max-width: 480px) { .wrap { padding: 0 14px; } nav { gap: 6px 10px; } nav .btn.cta { padding: 5px 9px; } }   /* the unlock button stays: invitees are told to tap it */

/* type */
h1 { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 14px; }
h1 .count { font-size: 18px; font-weight: 500; color: var(--gold-ink); }
h2 { font-size: 18px; font-weight: 700; margin: 26px 0 10px; }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; }

.banner { background: var(--tg-limit-bg); color: var(--tg-limit-fg); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 0 0 12px; }
.lede { font-size: 15px; color: var(--ink-2); margin: -4px 0 16px; max-width: 760px; } .lede a { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 3px; }
.filters .chk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; cursor: pointer; user-select: none; }
.filters .chk input { accent-color: var(--gold); margin: 0; }
.filters .chk:has(input:checked) { border-color: var(--gold); color: var(--gold-ink); }
/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 20px; }
.filters input, .filters select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: var(--surface); color: var(--ink); font-family: inherit; }
.filters input[type="text"] { min-width: 300px; }      /* the text box only: a bare `input` rule also hit the checkboxes (300 px wide squares) */
.filters select { max-width: 220px; }                    /* a long option label (学科) must not stretch the box on wide screens */
.filters button { padding: 9px 16px; border: 0; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 600; transition: transform .2s; }
.filters button:hover { transform: translateY(-1px); }

/* position card */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 18px; background: var(--card-bg); border: 1px solid var(--line-2); box-shadow: var(--card-shadow); border-radius: 14px; padding: 18px 20px; margin-bottom: 12px; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s; }
.pos:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: var(--card-hover); }
.pos h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.pos h3 a { color: var(--ink); } .pos h3 a:hover { color: var(--gold-ink); }
.chips { display: flex; gap: 6px; white-space: nowrap; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.tg { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 500; line-height: 1.5; flex: 0 0 auto; }
.tg i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.tg-inst { background: var(--tg-inst-bg); color: var(--tg-inst-fg); }
.tg-field-earth { background: var(--tg-earth-bg); color: var(--tg-earth-fg); } .tg-field-cs { background: var(--tg-cs-bg); color: var(--tg-cs-fg); }
.tg-field-phys { background: var(--tg-phys-bg); color: var(--tg-phys-fg); } .tg-field-life { background: var(--tg-life-bg); color: var(--tg-life-fg); }
.tg-field-eng { background: var(--tg-eng-bg); color: var(--tg-eng-fg); } .tg-field-soc { background: var(--tg-soc-bg); color: var(--tg-soc-fg); } .tg-field-other { background: var(--tg-other-bg); color: var(--tg-other-fg); }
.tg-fund { background: var(--tg-fund-bg); color: var(--tg-fund-fg); } .tg-limit { background: var(--tg-limit-bg); color: var(--tg-limit-fg); }
.tg-grant { background: var(--tg-grant-bg); color: var(--tg-grant-fg); } .tg-lang { background: var(--tg-lang-bg); color: var(--tg-lang-fg); }
.tg-report { border: 1px solid var(--gold); color: var(--gold-ink); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.meta .dl { font-weight: 500; } .meta .dl.soon { color: var(--gold-ink); }
.meta .st { color: var(--muted); }   /* 入职: to the month, in grey — never mistaken for the deadline */
.pos-side { border-left: 1px solid var(--line); padding-left: 16px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.pos-side .big { font-size: 21px; font-weight: 500; color: var(--ink); }
.pos-side .small { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.pos-side .save { margin-top: 10px; align-self: flex-start; }
@media (max-width: 720px) { .chips { flex-wrap: wrap; white-space: normal; -webkit-mask-image: none; mask-image: none; max-height: 58px; } .pos { grid-template-columns: minmax(0, 1fr); } .pos-main { min-width: 0; } .pos-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 10px; } .filters input[type="text"] { min-width: 0; width: 100%; } .filters select { max-width: none; } h1 { font-size: 26px; } }

/* generic card / facts / buttons */
.card { background: var(--card-bg); border: 1px solid var(--line-2); box-shadow: var(--card-shadow); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card h3 a { color: var(--ink); } .card h3 a:hover { color: var(--gold-ink); }
.tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 6px; background: var(--tg-other-bg); color: var(--tg-other-fg); }
.tag.warn { background: var(--tg-limit-bg); color: var(--tg-limit-fg); }
.deadline { font-weight: 600; color: var(--gold-ink); }
.btn { display: inline-block; padding: 9px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); text-decoration: none; font-size: 14px; font-weight: 600; border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: transform .2s, box-shadow .3s; }
.btn:hover { transform: translateY(-1px); color: var(--bg); box-shadow: 0 8px 24px -12px rgba(0,0,0,.5); }
.btn.gold { background: var(--gold); color: #0C0E12; } .btn.gold:hover { color: #0C0E12; box-shadow: 0 8px 24px -8px var(--gold-glow); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); } .btn.secondary:hover { color: var(--ink); border-color: var(--ink); }
.btn.gray { background: var(--surface); color: var(--muted); border-color: var(--line); } .btn.gray:hover { color: var(--ink); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .grid.one { grid-template-columns: 1fr; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } .card { overflow-x: auto; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi .v { font-size: 20px; } .chart { height: 240px; } }
@media (max-width: 480px) { dl.facts { grid-template-columns: 1fr; gap: 2px 0; } dl.facts dt { margin-top: 8px; font-size: 12px; } .brief dl { grid-template-columns: 1fr; gap: 2px 0; } .brief dt { margin-top: 8px; } .filters select { flex: 1 1 40%; min-width: 0; } }
dl.facts { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; }
pre.text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--ink-2); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kpi .v { font-size: 24px; font-weight: 500; font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--gold-ink); }
.kpi .l { font-size: 12px; color: var(--muted); }
.chart { height: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
table.t { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
table.t th, table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.t th { color: var(--muted); font-weight: 500; }
table.prices td:nth-child(-n+2) { white-space: nowrap; }   /* ¥68 / 单个导师 never break on a phone */
.bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--gold); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.pager { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 18px 0; }
.up { color: var(--ok); } .down { color: var(--danger); }
input, select, textarea { font-family: inherit; }

/* paywall (report page): the locked block is the one always-dark element in the light theme */
.locked { position: relative; border-radius: 14px; padding: 18px 16px; margin: 10px 0 18px; background: var(--report-bg); color: var(--report-ink); border: 1px solid var(--report-line); }
.locked .teaser { filter: blur(5px); user-select: none; pointer-events: none; opacity: .45; }
.locked .teaser .kpi, .locked .teaser .card { background: var(--report-tile); border-color: var(--report-line); color: var(--report-ink); }
.locked .cta { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; }
.locked .cta .muted { color: var(--report-muted); }
.locked .cta a.btn { background: var(--gold); color: #0C0E12; padding: 10px 18px; border-radius: 10px; font-weight: 700; }
@keyframes sweep { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* tracker */
.save { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; font-family: inherit; transition: all .2s; }
.save:hover { color: var(--ink); border-color: var(--ink); }
.save.on, .btn.on { background: var(--tg-fund-bg); color: var(--tg-fund-fg); border-color: transparent; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .06em; }
.tbl input, .tbl select { font-size: 13px; padding: 5px 7px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; }

/* tracker table becomes cards on phones */
@media (max-width: 720px) {
  .tbl.tracker thead { display: none; }
  .tbl.tracker, .tbl.tracker tbody, .tbl.tracker tr, .tbl.tracker td { display: block; width: 100%; }
  .tbl.tracker tr { background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; position: relative; }
  .tbl.tracker td { border: 0; padding: 4px 0; }
  .tbl.tracker td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 12px; margin-right: 8px; }
  .tbl.tracker td.act { position: absolute; top: 8px; right: 8px; width: auto; } .tbl.tracker td.act .btn { padding: 4px 10px; font-size: 12px; }
  .tbl.tracker td:first-child { padding-right: 56px; }
}
