/* ==========================================================================
   SSI Course Help Desk — production styles
   Palette adapted from the printed SSI brochures (plum, amber, warm paper).
   ========================================================================== */

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-latin-var.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Marcellus";
  src: url("/assets/fonts/marcellus-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f3f7;
  --surface: #ffffff;
  --surface-2: #fbfafc;
  --sunk: #ece8f2;
  --ink: #221d2b;
  --muted: #5b5368;
  --line: #dcd5e6;
  --line-strong: #c6bcd5;
  --plum: #5b3f8c;
  --plum-ink: #ffffff;
  --plum-soft: #ebe4f6;
  --plum-dark: #452e6e;
  --amber: #a35d00;
  --amber-soft: #fdf0dc;
  --amber-line: #e7c28a;
  --ok: #2f6b4f;
  --ok-soft: #e7f3ec;
  --danger: #a3231b;
  --danger-soft: #fbe9e7;
  --focus: #5b3f8c;
  --shadow-sm: 0 1px 2px rgba(34, 29, 43, 0.06);
  --shadow-md: 0 14px 40px rgba(34, 29, 43, 0.16);
  --radius: 14px;
  --radius-sm: 10px;
  --f-display: "Marcellus", "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  --f-body: "Figtree", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17141d;
    --surface: #211d29;
    --surface-2: #251f2e;
    --sunk: #2a2534;
    --ink: #efeaf6;
    --muted: #b4aac4;
    --line: #3a3347;
    --line-strong: #4a4159;
    --plum: #b39ae0;
    --plum-ink: #1b1524;
    --plum-soft: #30284a;
    --plum-dark: #cbb7ef;
    --amber: #f2b45a;
    --amber-soft: #3a2d18;
    --amber-line: #6b5127;
    --ok: #7cc6a0;
    --ok-soft: #1f3328;
    --danger: #ff9b91;
    --danger-soft: #3a201e;
    --focus: #cbb7ef;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.modal-open { overflow: hidden; }

body {
  margin: 0;
  padding: env(safe-area-inset-top, 0px) 18px env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea { font-family: var(--f-body); }

img { display: block; max-width: 100%; height: auto; }
a { color: var(--plum); text-underline-offset: 2px; }
a:hover { color: var(--plum-dark); }
button { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.14;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.15rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.95rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.2em; }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--plum);
  color: var(--plum-ink);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.skip-link:focus { transform: translateY(0); outline: 3px solid var(--focus); outline-offset: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.zh { color: var(--muted); }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.note { color: var(--muted); font-size: 0.9rem; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 28px;
  padding-block: 18px 12px;
}
.brand {
  display: grid;
  flex: 0 1 auto;
  max-width: 520px;
  gap: 1px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: var(--ink); }
.brand-name {
  font-family: var(--f-display);
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}
.brand-sub { font-size: 0.86rem; color: var(--muted); }
.brand-meta {
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.header-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
  font-size: 0.88rem;
  padding-top: 3px;
}
.header-contact a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.header-contact a:hover { color: var(--plum); }
.header-contact .wa { color: var(--ok); font-weight: 600; }

.header-actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 15px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: nowrap;
}

.lang-switch a {
  color: var(--plum);
  font-weight: 650;
  text-decoration: none;
}

.lang-switch a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-current {
  color: var(--ink);
  font-weight: 700;
}

.lang-sep {
  color: var(--line-strong);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-block: 0 12px;
  font-size: 0.88rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
}
.site-nav a:hover { color: var(--plum); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* --------------------------------------------------------------------------
   Hero and search
   -------------------------------------------------------------------------- */

.hero { padding-block: clamp(30px, 6vw, 58px) 6px; }
.hero h1 { max-width: 20ch; }
.hero h1 .hero-zh {
  display: block;
  margin-top: 10px;
  font-size: 0.55em;
  color: var(--muted);
  letter-spacing: 0;
  font-family: var(--f-body);
  font-weight: 500;
}
.lede {
  max-width: 64ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.03rem;
}
.search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.search input {
  flex: 1 1 280px;
  min-width: 0;
  padding: 13px 15px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.02rem;
}
.search input::placeholder { color: var(--muted); opacity: 0.85; }
.search input:focus {
  border-color: var(--plum);
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}
.search .btn { flex: 0 0 auto; }
.search-help {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.chip:hover { border-color: var(--plum); }
.chip[aria-pressed="true"] {
  background: var(--plum);
  border-color: var(--plum);
  color: var(--plum-ink);
}
.chip .count { margin-left: 3px; opacity: 0.78; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Sections, results and cards
   -------------------------------------------------------------------------- */

.section { padding-block: clamp(30px, 5vw, 52px) 0; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 18px;
  margin-bottom: 10px;
}
.section-head h2 { margin: 0; }
.section-note { max-width: 75ch; margin-bottom: 12px; }
.link-btn {
  align-self: center;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--plum);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover { color: var(--plum-dark); }

.results-section { padding-top: clamp(28px, 4vw, 42px); scroll-margin-top: 16px; }
.results-head { margin-bottom: 8px; }
.status {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.results { display: grid; gap: 14px; }
.results .grid { margin-top: 2px; }

.answer,
.bundle {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.answer .label,
.bundle .label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.answer h3,
.bundle h3 {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}
.answer p,
.bundle p { color: var(--ink); }
.answer .zh { color: var(--muted); }
.answer .row,
.bundle .row,
.faq-links { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.answer .row a { font-size: 0.88rem; }
.bundle {
  border-color: var(--amber-line);
  background: var(--amber-soft);
}
.bundle .label { color: var(--amber); }
.answer.ai {
  border-color: var(--plum);
  background: var(--plum-soft);
}
.answer.ai .ai-body { white-space: pre-wrap; line-height: 1.55; }
.answer.ai .ai-note { font-size: 0.8rem; color: var(--muted); }
.empty {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-2);
}
.empty strong { color: var(--ink); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 6px 20px rgba(34, 29, 43, 0.09); }
.card h3 {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.32;
}
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--plum); text-decoration: underline; }
.card .zhname {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.card .price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  padding-block: 2px;
  font-variant-numeric: tabular-nums;
}
.price-item { display: grid; gap: 1px; }
.price-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.price .full { color: var(--muted); font-size: 0.92rem; }
.price .full s { text-decoration-thickness: 1px; }
.price .nett {
  color: var(--amber);
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.15;
}
.tag {
  align-self: flex-start;
  padding: 3px 7px;
  border: 1px solid var(--amber-line);
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.subsidy-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}
.card .learn {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.card .learn.zh { color: var(--muted); }
.card .code {
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}
.card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 2px;
}

.count {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
}
.filters { margin-bottom: 4px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1.5px solid transparent;
  border-radius: 11px;
  background: var(--plum);
  color: var(--plum-ink);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover { background: var(--plum-dark); color: var(--plum-ink); }
.btn.ghost {
  background: transparent;
  border-color: var(--plum);
  color: var(--plum);
}
.btn.ghost:hover { background: var(--plum-soft); color: var(--plum); }
.btn.soft {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn.soft:hover { border-color: var(--plum); color: var(--plum); }
.btn.small { min-height: 38px; padding: 8px 12px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }

/* --------------------------------------------------------------------------
   FAQ, links, contact
   -------------------------------------------------------------------------- */

.faq-list { display: grid; gap: 8px; }
details.faq {
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
details.faq + details.faq { margin-top: 0; }
details.faq summary {
  padding: 14px 0;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.4;
}
details.faq summary .zh { font-weight: 500; }
details.faq[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.faq-body { display: grid; gap: 8px; padding-bottom: 14px; }
.faq-body p { font-size: 0.94rem; }
.faq-body .zh { color: var(--muted); }
.faq-links a { font-size: 0.88rem; }

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.link-card {
  display: block;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.link-card:hover { border-color: var(--plum); color: var(--plum); }
.link-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.contact {
  margin-top: clamp(30px, 5vw, 52px);
  padding: 20px;
  border-radius: var(--radius);
  background: var(--sunk);
}
.contact h2 { font-size: 1.35rem; margin-bottom: 12px; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px 26px;
}
.contact dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.contact dt { color: var(--muted); font-size: 0.88rem; }
.contact dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.contact a { color: var(--ink); }
.contact a:hover { color: var(--plum); }

.page-fine { padding-block: 22px 8px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(36px, 6vw, 64px);
  border-top: 1px solid var(--line);
  padding-block: 26px 36px;
  color: var(--muted);
  font-size: 0.86rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 18px 28px;
}
.footer-brand {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 1.1rem;
}
.footer-title {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-grid a {
  display: block;
  padding: 2px 0;
  color: var(--muted);
  text-decoration: none;
}
.footer-grid a:hover { color: var(--plum); text-decoration: underline; }
.footer-bottom {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.footer-bottom p { margin: 0; }

/* --------------------------------------------------------------------------
   Dialogs
   -------------------------------------------------------------------------- */

dialog.dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  max-width: none;
  max-height: none;
}
dialog.dialog::backdrop {
  background: rgba(10, 8, 14, 0.78);
  backdrop-filter: blur(2px);
}
html.modal-open { overflow: hidden; }

.viewer-dialog {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
}
.viewer-shell {
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: 100%;
  max-width: 980px;
  margin-inline: auto;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px calc(10px + env(safe-area-inset-bottom, 0px));
}
.dialog-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.dialog-title {
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.dialog-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.viewer-hint {
  padding: 0 4px;
  color: #ddd6e8;
  font-size: 0.8rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.viewer-scroll {
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  overscroll-behavior: contain;
}
.viewer-scroll img {
  width: 100%;
  max-width: 760px;
  height: auto;
  margin-inline: auto;
  border-radius: 6px;
}
.viewer-loading {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.reg-dialog {
  width: min(640px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.reg-shell {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
}
.reg-scroll {
  overflow: auto;
  padding: 0 20px 20px;
  overscroll-behavior: contain;
}
.reg-intro { margin: 12px 0 16px; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 640px) {
  .reg-dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .reg-shell {
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .reg-scroll { padding: 0 16px 24px; }
  .dialog-bar { border-radius: 0; }
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field { display: grid; gap: 6px; min-width: 0; }
.field > label,
.field legend { color: var(--ink); font-size: 0.9rem; font-weight: 600; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: 6px; }
.field small { color: var(--muted); font-size: 0.78rem; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.96rem;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--plum);
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}
.field [aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
}
.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.88rem;
  cursor: pointer;
}
.opts label:hover { border-color: var(--plum); }
.opts input { width: auto; accent-color: var(--plum); }
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.consent input { width: auto; margin-top: 3px; accent-color: var(--plum); }
.consent a { color: var(--plum); }
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-left: 4px solid var(--danger);
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--ink);
  font-size: 0.88rem;
}
.form-fallback { color: var(--muted); font-size: 0.84rem; }
.form-fallback a { color: var(--plum); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-note { color: var(--muted); font-size: 0.78rem; }
.fee-line {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.fee-line strong { color: var(--amber); }
.form-success {
  display: grid;
  gap: 10px;
  padding: 4px 0 10px;
}
.form-success h3 { font-family: var(--f-display); font-size: 1.45rem; }
.form-success p { color: var(--ink); }
.form-success .reference {
  padding: 10px 12px;
  border: 1px dashed var(--amber-line);
  border-radius: 10px;
  background: var(--amber-soft);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.form-success .reference strong { letter-spacing: 0.04em; }
.form-success .row { display: flex; flex-wrap: wrap; gap: 8px; }

/* --------------------------------------------------------------------------
   Course pages
   -------------------------------------------------------------------------- */

.breadcrumbs {
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.84rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--plum); }

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: clamp(20px, 4vw, 38px);
  align-items: start;
  padding-block: 22px 8px;
}
.course-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.course-hero h1 { max-width: 18ch; }
.course-zh-title {
  margin-top: 8px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
}
.course-summary {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1rem;
  max-width: 62ch;
}
.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}
.course-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.fee-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.fee-panel h2 { font-size: 1.15rem; }
.fee-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.fee-row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.fee-row .label { color: var(--muted); font-size: 0.82rem; }
.fee-row .full { color: var(--muted); font-size: 1rem; }
.fee-row .nett { color: var(--amber); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fee-panel .fine { margin: 0; }
.fee-panel .tag { justify-self: start; }

.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: clamp(20px, 4vw, 38px);
  align-items: start;
  padding-block: 22px 8px;
}
.course-content { display: grid; gap: 26px; min-width: 0; }
.course-section h2 { font-size: 1.3rem; margin-bottom: 8px; }
.course-section p { margin: 0 0 8px; }
.course-section .zh { color: var(--muted); }
.course-section ul { display: grid; gap: 4px; }
.course-aside { display: grid; gap: 14px; min-width: 0; }
.brochure-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.brochure-card a { display: block; }
.brochure-card img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.brochure-card .row { display: flex; flex-wrap: wrap; gap: 8px; }
.brochure-card .fine { margin: 0; }

.register-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.register-card h2 { font-size: 1.3rem; margin-bottom: 6px; }
.register-card .intro { color: var(--muted); font-size: 0.88rem; margin-bottom: 14px; }
.register-card form { display: grid; gap: 14px; }
.register-card .fine { margin: 0; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.related-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.related-card:hover { border-color: var(--plum); }
.related-card .title { font-weight: 700; line-height: 1.35; }
.related-card .fees { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.related-card .zhname { display: block; margin-top: 2px; color: var(--muted); font-size: 0.82rem; font-weight: 500; }

/* --------------------------------------------------------------------------
   Prose pages (privacy, thank you, 404)
   -------------------------------------------------------------------------- */

.prose {
  max-width: 74ch;
  padding-block: 28px 12px;
}
.prose h1 { margin-bottom: 8px; }
.prose .updated { margin-bottom: 22px; color: var(--muted); font-size: 0.86rem; }
.prose h2 { font-size: 1.3rem; margin-top: 28px; margin-bottom: 8px; }
.prose h3 { font-size: 1.08rem; margin-top: 20px; margin-bottom: 6px; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; display: grid; gap: 5px; }
.prose li { line-height: 1.55; }
.prose a { text-decoration: underline; }
.prose .callout {
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--ink);
  font-size: 0.92rem;
}

.message-page {
  max-width: 62ch;
  padding-block: clamp(36px, 7vw, 70px) 20px;
}
.message-page h1 { margin-bottom: 10px; }
.message-page h1 .hero-zh {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--f-body);
  font-size: 0.55em;
  font-weight: 500;
}
.message-page .lede { margin-top: 0; }
.message-page .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.message-page .reference {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px dashed var(--amber-line);
  border-radius: 10px;
  background: var(--amber-soft);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--amber-line);
  border-radius: 12px;
  background: var(--amber-soft);
  font-size: 0.9rem;
}
.notice strong { color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.stack { display: grid; gap: 10px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }

@media (max-width: 760px) {
  .course-hero,
  .course-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  body { padding-inline: 14px; }
  .header-inner { padding-block: 14px 8px; }
  .header-actions {
    width: 100%;
    flex: 1 1 100%;
    justify-content: space-between;
    gap: 6px 10px;
  }
  .brand-meta { display: none; }
  .header-contact { font-size: 0.8rem; gap: 4px 10px; }
  .lang-switch { font-size: 0.76rem; padding: 3px 9px; }
  .search .btn { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact dl { grid-template-columns: 1fr; gap: 2px; }
  .contact dd { margin-bottom: 8px; }
  .dialog-actions .btn { min-height: 40px; padding: 8px 11px; font-size: 0.84rem; }
  .course-hero h1 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body { background: #fff; color: #000; padding: 0; }
  .site-header, .site-footer, .search, .chips, .filters, .card .actions,
  .course-cta, .brochure-card .row, .register-card, .skip-link, dialog {
    display: none !important;
  }
  .card, .answer, .bundle, .fee-panel, .brochure-card {
    box-shadow: none;
    border-color: #bbb;
    break-inside: avoid;
  }
  a { color: #000; text-decoration: underline; }
}
