/* Static pages (/p/, /s/, /agent/): the app's tokens, header, footer and reading components, without the app.
   Values follow styles.css and DESIGN.md; change both together. Light is the default; html[data-theme] overrides. */
:root {
  color-scheme: light;
  --background: #ffffff;
  --ink: #171a1d;
  --muted: #5d6269;
  --rule: #d7dadd;
  --rule-strong: #828891;
  --accent: #214dc5;
  --accent-fill: #214dc5;
  --accent-hover: #173b9d;
  --on-accent: #ffffff;
  --surface: #f6f7f9;
  --scrollbar: #bac0cc;
  --brand-filter: none;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --background: #111316;
    --ink: #e8eaed;
    --muted: #a0a6ae;
    --rule: #2e3238;
    --rule-strong: #686e77;
    --accent: #8ea8ff;
    --accent-fill: #3a5fd0;
    --accent-hover: #4b6edb;
    --on-accent: #ffffff;
    --surface: #181b1f;
    --scrollbar: #3d424a;
    --brand-filter: invert(1) hue-rotate(190deg);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --background: #111316;
  --ink: #e8eaed;
  --muted: #a0a6ae;
  --rule: #2e3238;
  --rule-strong: #686e77;
  --accent: #8ea8ff;
  --accent-fill: #3a5fd0;
  --accent-hover: #4b6edb;
  --on-accent: #ffffff;
  --surface: #181b1f;
  --scrollbar: #3d424a;
  --brand-filter: invert(1) hue-rotate(190deg);
}
* {
  box-sizing: border-box;
  scrollbar-color: var(--scrollbar) var(--background);
  scrollbar-width: thin;
}
body {
  margin: 0;
  background: var(--background);
}
h1,
h2,
h3,
p,
dl,
dd,
ul {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.4;
  text-wrap: balance;
}
h1 {
  font-family: YantuDisplay, 'PingFang SC', sans-serif;
  font-weight: 900;
  font-size: 48px;
  line-height: 1.25;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
h1.plain-display {
  font-family: inherit;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.015em;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
@media (hover: hover) {
  a:hover {
    color: var(--accent);
  }
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
::selection {
  background: var(--accent-fill);
  color: var(--on-accent);
}
[hidden] {
  display: none !important;
}
.skip-link:not(:focus),
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  background: var(--background);
  padding: 12px 18px;
  z-index: 100;
}
.site-header {
  max-width: 1440px;
  margin: auto;
  min-height: 96px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  gap: 38px;
  border-bottom: 1px solid var(--ink);
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 44px;
}
.brand-art {
  display: block;
  width: 186px;
  aspect-ratio: 2066 / 355;
}
/* The files are cut to the artwork's content box and exported at twice the desktop display width. */
.brand-art img {
  display: block;
  width: 100%;
  height: 100%;
  filter: var(--brand-filter);
}
.brand-stacked .brand-art {
  width: 126px;
  aspect-ratio: 1202 / 741;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 29px;
  margin-left: auto;
}
.primary-nav > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
@media (hover: hover) {
  .primary-nav > a:hover {
    color: var(--accent);
  }
}
.primary-nav > a[aria-current] {
  color: var(--ink);
}
.primary-nav > a[aria-current]::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--ink);
}
.page-shell {
  max-width: 1440px;
  padding: 0 48px;
  margin: auto;
}
main {
  max-width: 880px;
  min-height: 55vh;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  padding: 28px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumbs > a {
  text-decoration: none;
}
@media (hover: hover) {
  .breadcrumbs > a:hover {
    text-decoration: underline;
  }
}
.page-heading {
  padding: 48px 0 34px;
}
.breadcrumbs + .page-heading {
  padding-top: 25px;
}
.page-heading.profile h1 {
  font-size: 42px;
  line-height: 1.4;
  letter-spacing: -0.025em;
}
.page-heading > p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 14px;
  max-width: 72ch;
}
.page-heading > .profile-english {
  font-size: 18px;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.name-note {
  margin-left: 10px;
  font-size: 12px;
  white-space: nowrap;
}
.name-note::before {
  content: '·';
  margin-right: 8px;
}
.page-heading > .profile-context {
  font-size: 14px;
  margin-top: 14px;
}
.profile-context > a {
  text-decoration: none;
}
@media (hover: hover) {
  .profile-context > a:hover {
    text-decoration: underline;
  }
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 19px;
  margin-top: 26px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  transition: background 0.16s;
}
.button.primary {
  background: var(--accent-fill);
  color: var(--on-accent);
}
@media (hover: hover) {
  .button.primary:hover {
    background: var(--accent-hover);
    color: var(--on-accent);
  }
}
.section-note {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 75ch;
}
.page-heading + .section-note {
  margin-bottom: 34px;
}
main > section {
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
main h2 {
  font-size: 28px;
  line-height: 1.5;
}
main h3 {
  font-size: 18px;
  margin-top: 28px;
}
main section > p,
main section > ul:not(.row-list):not(.school-index) {
  font-size: 15px;
  line-height: 1.95;
  margin-top: 16px;
  max-width: 75ch;
}
main section > p:first-child {
  margin-top: 0;
}
main section > h3 + p {
  margin-top: 6px;
}
main section > ul:not(.row-list):not(.school-index) {
  padding-left: 20px;
}
/* One field per row: the label in a 150px column, then the value and a line with its year mark and sources.
   The markup is bare (dt, dd > p, p) because every programme page repeats it. */
.claim-list {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  margin-top: 20px;
}
.claim-list > dt,
.claim-list > dd {
  min-width: 0;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.claim-list > dt {
  padding-right: 24px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.9;
}
.claim-list > dd > p:first-child {
  font-size: 15px;
  line-height: 1.95;
  white-space: pre-line;
  overflow-wrap: anywhere;
  max-width: 75ch;
}
.claim-list > dd > p + p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin-top: 8px;
}
.claim-list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  color: var(--accent);
}
.claim-list small,
.year-mark {
  display: inline-block;
  padding: 0 6px;
  font-size: 12px;
  line-height: 20px;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  white-space: nowrap;
}
.claim-list small {
  padding: 0;
  border: 0;
  color: var(--muted);
}
.year-mark.current {
  color: var(--accent);
  border-color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.row-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}
.row-list > li {
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.8;
}
.row-title {
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
@media (hover: hover) {
  .row-title:hover {
    text-decoration: underline;
  }
}
.row-list .english-name,
.row-list .brief {
  display: block;
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.row-list .brief {
  color: var(--ink);
}
.row-list .source-link {
  margin-left: 12px;
}
.school-index {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 36px;
}
.school-index > li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--rule);
}
.school-index a {
  text-decoration: none;
}
@media (hover: hover) {
  .school-index a:hover {
    text-decoration: underline;
  }
}
.count {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}
code {
  overflow-wrap: anywhere;
}
:not(pre) > code {
  padding: 1px 5px;
  background: var(--surface);
}
pre {
  margin: 16px 0 0;
  padding: 14px 16px;
  line-height: 1.7;
  background: var(--surface);
  overflow-x: auto;
}
pre.address {
  font-size: 16px;
  font-weight: 600;
}
.table-scroll {
  margin-top: 20px;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 14px 14px 14px 0;
  border-bottom: 1px solid var(--rule);
}
thead th {
  font-weight: 500;
  color: var(--muted);
  border-block: 1px solid var(--ink);
}
.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 80px;
  border-top: 1px solid var(--ink);
  padding: 44px 0 64px;
  margin-top: 80px;
}
.site-footer > nav {
  display: flex;
  justify-content: flex-end;
  gap: 90px;
}
.site-footer nav > div {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 120px;
}
.site-footer nav a {
  display: flex;
  align-items: center;
  min-height: 28px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
@media (hover: hover) {
  .site-footer nav a:hover {
    color: var(--accent);
  }
}
.theme-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-top: 22px;
  font-size: 14px;
}
.theme-switch button {
  min-height: 36px;
  color: var(--muted);
}
@media (hover: hover) {
  .theme-switch button:hover {
    color: var(--accent);
  }
}
.theme-switch button[aria-pressed='true'] {
  color: var(--ink);
  text-decoration: underline 2px;
  text-underline-offset: 7px;
}
.footer-note {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  max-width: 95ch;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
/* Tap areas, as in styles.css. These links sit in a line of text or a compact list, so their line height stays and
   a centred pseudo-element extends what can be tapped to 24px, or 44px on phones; neighbours sit at least that far apart. */
.breadcrumbs > a,
.profile-context > a,
.claim-list a,
.source-link,
.row-title,
.school-index a,
.theme-switch button {
  position: relative;
}
.breadcrumbs > a::after,
.profile-context > a::after,
.claim-list a::after,
.source-link::after,
.row-title::after,
.school-index a::after,
.theme-switch button::after {
  content: '';
  position: absolute;
  inset: calc(50% - var(--tap, 24px) / 2) 0 auto;
  height: var(--tap, 24px);
}
@media (max-width: 1200px) {
  .site-header {
    gap: 22px;
    padding-inline: 32px;
  }
  .page-shell {
    padding-inline: 32px;
  }
  .primary-nav {
    gap: 20px;
  }
  h1 {
    font-size: 42px;
  }
  .page-heading.profile h1 {
    font-size: 36px;
  }
  .site-footer > nav {
    gap: 55px;
  }
}
@media (max-width: 920px) {
  .site-header {
    min-height: 86px;
    gap: 20px;
  }
  .primary-nav {
    gap: 18px;
  }
  h1 {
    font-size: 36px;
  }
  .school-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Phones keep the primary navigation visible on a second row: static pages run no menu script. */
@media (max-width: 680px) {
  :root {
    --tap: 44px;
  }
  .site-header {
    flex-wrap: wrap;
    padding: 16px 20px 0;
    min-height: 0;
    gap: 4px 0;
  }
  .site-header .brand-art {
    width: 156px;
  }
  .primary-nav {
    flex-basis: 100%;
    margin-left: 0;
    gap: 14px;
  }
  .primary-nav > a {
    font-size: 15px;
    min-height: 44px;
  }
  .page-shell {
    padding-inline: 20px;
  }
  .breadcrumbs {
    gap: 8px;
    padding-top: 23px;
  }
  .page-heading {
    padding: 33px 0 26px;
  }
  .breadcrumbs + .page-heading {
    padding-top: 22px;
  }
  h1 {
    font-size: 35px;
    line-height: 1.4;
  }
  .page-heading.profile h1 {
    font-size: 32px;
    line-height: 1.5;
  }
  .page-heading > p {
    font-size: 15px;
    line-height: 1.9;
    margin-top: 12px;
  }
  .page-heading > .profile-english {
    font-size: 15px;
    line-height: 1.85;
  }
  .name-note {
    display: block;
    margin-left: 0;
  }
  .name-note::before {
    content: none;
  }
  .page-heading > .profile-context {
    margin-top: 12px;
  }
  .button {
    margin-top: 20px;
  }
  main h2 {
    font-size: 24px;
  }
  main section > p,
  main section > ul:not(.row-list):not(.school-index) {
    font-size: 14px;
  }
  .claim-list {
    grid-template-columns: 1fr;
  }
  .claim-list > dt {
    padding: 18px 0 0;
  }
  .claim-list > dd {
    padding: 6px 0 18px;
    border-top: 0;
  }
  .claim-list > dd > p:first-child {
    font-size: 14px;
  }
  .claim-list > dd > p + p {
    row-gap: 12px;
  }
  .school-index {
    grid-template-columns: 1fr;
  }
  pre.address {
    font-size: 15px;
  }
  .site-footer {
    display: block;
    padding-top: 32px;
    margin-top: 52px;
  }
  .site-footer > nav {
    justify-content: flex-start;
    gap: 55px;
    margin-top: 32px;
  }
  .site-footer nav > div {
    min-width: 110px;
    gap: 0;
  }
  .site-footer nav a {
    min-height: 44px;
  }
  .footer-note {
    margin-top: 30px;
  }
}
/* Programme page: the app's facts bar and two-column layout (styles.css .profile-facts, .detail-layout). */
main:has(.detail-layout) {
  max-width: none;
}
.profile-facts {
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px;
  padding: 28px 0 33px;
}
.fact dt {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 9px;
}
.fact dd {
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.fact .year-mark {
  margin-left: 8px;
}
.fact-missing {
  color: var(--muted);
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 72px;
  padding-top: 34px;
  align-items: start;
  border-top: 1px solid var(--ink);
}
.detail-content {
  min-width: 0;
  max-width: 880px;
}
.detail-content > .section-note {
  margin-bottom: 8px;
}
.detail-aside > section {
  border-top: 1px solid var(--ink);
  padding: 23px 0 26px;
}
.detail-aside > .official-action {
  border: 0;
  padding-top: 0;
  display: grid;
  gap: 12px;
}
.official-action .button {
  margin-top: 0;
}
.detail-aside h2 {
  font-size: 18px;
}
.detail-aside p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
}
.inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.inline-link::after {
  content: '→';
  margin-left: 8px;
}
.button.secondary {
  border: 1px solid var(--rule);
  background: var(--background);
  color: var(--ink);
}
@media (hover: hover) {
  .button.secondary:hover {
    border-color: var(--rule-strong);
    color: var(--ink);
  }
}
.school-index a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
/* 404: one search field that opens the app's programme list. */
.site-search {
  display: flex;
  gap: 12px;
  max-width: 560px;
}
.site-search input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
  background: var(--background);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
}
.site-search input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.site-search .button {
  margin-top: 0;
}
.next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 24px;
  font-size: 14px;
}
.next-links > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
/* Install page: a copy button on each command block (static.js). */
.copy-block {
  position: relative;
}
.copy-block > pre {
  padding-right: 88px;
}
.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  background: var(--background);
  border: 1px solid var(--rule);
}
@media (hover: hover) {
  .copy-button:hover {
    border-color: var(--rule-strong);
    color: var(--accent);
  }
}
.example-chat {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.8;
}
.example-chat > p {
  padding: 12px 16px;
  border-left: 2px solid var(--rule-strong);
}
.example-chat > p.you {
  border-left-color: var(--accent);
}
.example-chat b {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
/* /agent/: one block per assistant, closed until the reader opens theirs. */
.assistants {
  margin-top: 16px;
  border-bottom: 1px solid var(--rule);
}
.assistants details {
  border-top: 1px solid var(--rule);
}
.assistants summary {
  padding: 12px 0;
  font-weight: 600;
  cursor: pointer;
}
.assistants summary span {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.assistants details[open] {
  padding-bottom: 16px;
}
.assistants details > p,
.assistants details > pre {
  margin-top: 8px;
}
.assistants ol {
  margin: 8px 0 0;
  padding-left: 20px;
}
.assistants li + li {
  margin-top: 4px;
}
@media (max-width: 1200px) {
  .profile-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 48px;
  }
}
@media (max-width: 920px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  /* The official page button comes first on narrow screens; the school and AI notes follow the facts. */
  .detail-aside {
    display: contents;
  }
  .detail-aside > .official-action {
    order: -1;
    padding-bottom: 26px;
  }
}
@media (max-width: 680px) {
  .profile-facts {
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    padding: 22px 0 26px;
  }
  .site-search {
    flex-wrap: wrap;
  }
  /* 16px keeps iOS Safari from zooming the page when the field gets focus. */
  .site-search input {
    font-size: 16px;
  }
  .site-search .button {
    flex: 1;
  }
  .copy-button {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
