:root {
  --bg: oklch(0.975 0.006 215);
  --bg-panel: oklch(0.955 0.008 212);
  --bg-field: oklch(0.99 0.004 215);
  --ink: oklch(0.27 0.008 225);
  --ink-strong: oklch(0.23 0.01 225);
  --ink-body: oklch(0.29 0.009 225);
  --ink-quiet: oklch(0.43 0.011 220);
  --ink-muted: oklch(0.47 0.013 220);
  --ink-faint: oklch(0.56 0.016 218);
  --ink-fainter: oklch(0.61 0.013 218);
  --ink-ghost: oklch(0.65 0.011 218);
  --accent: oklch(0.47 0.055 205);
  --accent-deep: oklch(0.4 0.055 205);
  --rule: oklch(0.885 0.007 210);
  --rule-soft: oklch(0.895 0.006 210);
  --sans: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --display: 'Cormorant Garamond', 'Noto Serif SC', serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid oklch(0.45 0.055 205 / 0.3);
}
a:hover {
  color: oklch(0.36 0.058 205);
  border-bottom-color: oklch(0.45 0.055 205 / 0.7);
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 104px 48px 120px;
}

.masthead {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule);
}
.masthead__portrait {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 45%;
  flex: none;
  filter: saturate(0.95);
}
.masthead__names {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.masthead__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  letter-spacing: 0.06em;
  color: var(--ink-strong);
}
.masthead__role {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 56px 0 72px;
  border-bottom: 1px solid var(--rule);
}
.intro__lead {
  margin: 0;
  max-width: 34em;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.95;
  font-weight: 300;
  color: oklch(0.31 0.01 225);
}
.intro__note {
  margin: 0;
  max-width: 36em;
  font-size: 14px;
  line-height: 2.1;
  color: oklch(0.49 0.011 220);
}

.training {
  padding: 72px 0 0;
}
.training__head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 56px;
}
.training__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.14em;
  color: oklch(0.25 0.01 225);
}
.training__title-en {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.16em;
  color: oklch(0.6 0.016 218);
}
.training__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.entry {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--rule-soft);
}
.entry:last-child {
  border-bottom: 1px solid var(--rule-soft);
}
.entry__label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.entry__topic {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.7;
  color: var(--ink);
}
.entry__org {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
.entry__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.entry__issuer {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.entry__issuer-zh {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.entry__issuer-en {
  font-family: var(--display);
  font-style: italic;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-ghost);
}
.entry__course {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--ink-body);
}
.facts {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 22px;
  row-gap: 11px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-quiet);
}
.facts dt {
  margin: 0;
  letter-spacing: 0.1em;
  color: var(--ink-fainter);
}
.facts dd {
  margin: 0;
}
.facts dd.is-numeric {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.panel {
  margin-top: 80px;
  background: var(--bg-panel);
  border: 1px solid oklch(0.9 0.007 210);
}
.panel__tabs {
  display: flex;
  border-bottom: 1px solid oklch(0.9 0.007 210);
}
.panel__tab {
  padding: 22px 42px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  /* pull over the strip rule so the active underline replaces it */
  margin-bottom: -1px;
  cursor: pointer;
}
.panel__tab:hover {
  color: var(--ink-muted);
}
.panel__tab[aria-selected="true"] {
  background: var(--bg-field);
  color: var(--ink-strong);
  font-weight: 500;
  border-bottom-color: var(--accent);
}
.panel__body {
  padding: 44px 48px 48px;
}
/* panes set their own display, which would out-rank the UA [hidden] rule */
.panel__body [hidden] {
  display: none;
}

.field {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg-field);
  border: 1px solid var(--rule);
  border-radius: 2px;
  outline: none;
}
.field:focus {
  border-color: var(--accent);
}
.field::placeholder {
  color: var(--ink-ghost);
}
.button {
  padding: 14px 32px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 2px;
  cursor: pointer;
}
.button:hover {
  background: var(--accent-deep);
}
.fineprint {
  margin: 0;
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-fainter);
}

.newsletter {
  display: grid;
  /* pitch takes a third; the field gets the rest */
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
  align-items: start;
}
.newsletter__text {
  margin: 0;
  /* breaks the line after the comma, as designed */
  max-width: 10.2em;
  font-size: 14px;
  line-height: 2;
  color: var(--ink-muted);
}
.newsletter__signup {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.newsletter__form {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.newsletter__input {
  flex: 1;
}
.newsletter__button {
  flex: none;
}

.hollow {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.hollow__text {
  margin: 0;
  font-size: 14px;
  line-height: 2;
  color: var(--ink-muted);
}
.hollow__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hollow__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
.hollow__message {
  min-height: 170px;
  resize: vertical;
}
.hollow__button {
  align-self: flex-start;
  margin-top: 2px;
}
.hollow__turnstile {
  min-height: 65px;
}
.hollow__status {
  min-height: 1.9em;
}
.hollow__status[data-state="error"] {
  color: oklch(0.48 0.12 28);
}
.hollow__status[data-state="success"] {
  color: var(--accent-deep);
}

@media (max-width: 720px) {
  .page {
    padding: 56px 24px 72px;
  }

  .masthead {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    padding-bottom: 30px;
  }
  .masthead__portrait { width: 72px; height: 72px; }
  .masthead__names { align-items: center; gap: 8px; }
  .masthead__name { font-size: 27px; }
  .masthead__role { font-size: 12.5px; line-height: 1.7; letter-spacing: 0.08em; }

  .intro {
    gap: 16px;
    padding: 32px 0;
  }
  .intro__lead { font-size: 16.5px; }
  .intro__note { font-size: 12.5px; line-height: 2; }

  .training { padding: 34px 0 0; }
  .training__head { gap: 12px; margin-bottom: 8px; }
  .training__title { font-size: 18px; }
  .training__title-en { font-size: 13px; }

  .entry {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 26px 0;
    border-top: none;
    border-bottom: 1px solid var(--rule-soft);
  }
  .entry:last-child { border-bottom: none; }
  .entry__label { gap: 5px; }
  .entry__topic { font-size: 15px; line-height: 1.6; }
  .entry__org { font-size: 11px; }
  .entry__body { gap: 14px; }
  .entry__issuer { gap: 5px; }
  .entry__issuer-zh { font-size: 12px; letter-spacing: 0.08em; line-height: 1.7; }
  .entry__issuer-en { font-size: 10.5px; letter-spacing: 0.04em; line-height: 1.6; }
  .entry__course { font-size: 13.5px; line-height: 1.9; }
  .facts { column-gap: 16px; row-gap: 9px; font-size: 12px; }
  .facts dt { letter-spacing: 0.08em; }

  .panel { margin-top: 32px; }
  .panel__tab {
    flex: 1;
    padding: 16px 8px;
    font-size: 14px;
    letter-spacing: 0.12em;
  }
  .panel__body { padding: 22px 20px 24px; }

  .field { padding: 13px 14px; font-size: 13.5px; }
  .button { height: 48px; padding: 0 24px; font-size: 13.5px; }
  .button:active { background: var(--accent-deep); }
  .fineprint { font-size: 11.5px; }

  .newsletter { grid-template-columns: 1fr; gap: 16px; }
  .newsletter__text { max-width: none; font-size: 12.5px; line-height: 1.95; }
  .newsletter__form { flex-direction: column; gap: 10px; }
  /* form goes column here, so desktop's flex:1 would size height, not width */
  .newsletter__input { flex: none; height: 48px; padding: 0 14px; }
  .newsletter__button { width: 100%; }
  .newsletter__fineprint-long { display: none; }

  .hollow { gap: 18px; }
  .hollow__text { font-size: 12.5px; line-height: 1.95; }
  .hollow__form { gap: 12px; }
  .hollow__row { grid-template-columns: 1fr; gap: 12px; }
  .hollow__input { height: 48px; padding: 0 14px; }
  .hollow__message { min-height: 150px; padding: 13px 14px; }
  .hollow__button { align-self: stretch; margin-top: 0; }
}

.session {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule);
}
.session__back {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.session__back a {
  border-bottom: none;
  color: var(--ink-faint);
}
.session__back a:hover {
  color: var(--accent);
}
.session__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  letter-spacing: 0.1em;
  color: var(--ink-strong);
}
.session__lead {
  margin: 0;
  max-width: 32em;
  font-size: 14px;
  line-height: 2.1;
  color: var(--ink-muted);
}

.booking {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.booking__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.booking__placeholder {
  margin: 0;
  font-size: 13.5px;
  line-height: 2;
  color: var(--ink-faint);
}
.booking__placeholder a {
  white-space: nowrap;
}
.booking__fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}
.booking__email {
  max-width: 340px;
}
.booking__button {
  align-self: flex-start;
}
.booking__turnstile {
  min-height: 65px;
}
.booking__status {
  min-height: 1.9em;
}
.booking__status[data-state="error"] {
  color: oklch(0.48 0.12 28);
}
.booking__status[data-state="success"] {
  color: var(--accent-deep);
}

.slot {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 2px;
  border-bottom: 1px solid var(--rule-soft);
}
.slot:first-child {
  border-top: 1px solid var(--rule-soft);
}
.slot--open {
  cursor: pointer;
}
.slot__radio {
  flex: none;
  margin: 0;
  accent-color: var(--accent);
}
.slot__time {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.slot__note {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-faint);
}
.slot__state {
  margin-left: auto;
  padding-left: 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-fainter);
}
.slot--taken .slot__time {
  color: var(--ink-faint);
}

@media (max-width: 720px) {
  .session { gap: 14px; padding-bottom: 26px; }
  .session__back { font-size: 12px; }
  .session__title { font-size: 22px; }
  .session__lead { font-size: 12.5px; line-height: 1.95; }

  .booking { gap: 20px; }
  .booking__email { max-width: none; height: 48px; padding: 0 14px; }
  .booking__button { align-self: stretch; }
  .booking__placeholder { font-size: 12.5px; }

  .slot {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 16px 2px;
  }
  .slot__time { font-size: 15px; }
  .slot__note { flex-basis: 100%; }
}
