:root {
  color-scheme: light;
  --ink: #191a17;
  --ink-soft: #34342f;
  --paper: #f5f1e8;
  --paper-deep: #ebe4d7;
  --surface: #fffdf8;
  --surface-soft: #faf7f0;
  --muted: #6f6c63;
  --line: #ddd6c8;
  --line-strong: #c9c0b0;
  --red: #c74a3a;
  --red-dark: #9f352a;
  --red-soft: #f6e3df;
  --gold: #e6b955;
  --gold-soft: #f7edcf;
  --green: #326c54;
  --green-soft: #e2efe8;
  --blue: #365f7d;
  --blue-soft: #e5edf2;
  --shadow-sm: 0 6px 18px rgba(49, 42, 30, 0.07);
  --shadow-lg: 0 22px 55px rgba(49, 42, 30, 0.14);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --content: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 12%, rgba(230, 185, 85, 0.14), transparent 26rem),
    radial-gradient(circle at 92% 22%, rgba(199, 74, 58, 0.09), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(54, 95, 125, 0.34);
  outline-offset: 3px;
}

a {
  color: inherit;
}

.page-shell {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.prototype-banner {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 20px;
  background: var(--ink);
  color: #fffaf1;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-align: center;
}

.prototype-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(230, 185, 85, 0.17);
}

.site-header {
  display: flex;
  width: min(calc(100% - 40px), var(--content));
  min-height: 82px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(25, 26, 23, 0.32);
  border-radius: 50%;
  background: linear-gradient(to bottom, #1c1c1a 0 33.33%, #c74a3a 33.33% 66.66%, #e6b955 66.66% 100%);
  box-shadow: var(--shadow-sm);
}

.brand-mark::after {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  content: "";
}

.brand-mark span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.93);
  font-family: "Iowan Old Style", "Songti TC", serif;
  font-size: 17px;
  font-weight: 750;
  line-height: 1;
}

.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 15px;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.text-link {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.text-link:hover {
  color: var(--red-dark);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 22px rgba(159, 53, 42, 0.2);
}

.button-primary:hover {
  background: var(--red-dark);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 253, 248, 0.76);
  color: var(--ink);
}

.button-quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--ink-soft);
}

.button-small {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
}

.hero {
  display: grid;
  min-height: 590px;
  align-items: center;
  gap: clamp(42px, 8vw, 110px);
  padding-block: 78px 90px;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Songti TC", "Noto Serif TC", serif;
  font-weight: 650;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 760px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.12;
}

h2 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.22;
}

h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.hero-lede {
  max-width: 690px;
  margin: 25px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 2vw, 20px);
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 28px;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 27px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.trust-list li::before {
  margin-right: 7px;
  color: var(--green);
  content: "✓";
  font-weight: 800;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow-lg);
}

.hero-panel::after {
  position: absolute;
  top: -70px;
  right: -65px;
  width: 160px;
  height: 160px;
  border: 22px solid var(--gold-soft);
  border-radius: 50%;
  content: "";
}

.panel-kicker {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hero-number {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  font-family: "Iowan Old Style", serif;
  font-size: 92px;
  font-weight: 700;
  line-height: 0.88;
}

.hero-number-label {
  margin: 12px 0 26px;
  color: var(--muted);
  font-size: 14px;
}

.summary-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.summary-list div {
  display: grid;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 90px 1fr;
}

.summary-list dt {
  color: var(--muted);
  font-size: 12px;
}

.summary-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.integrity-strip {
  border-block: 1px solid rgba(25, 26, 23, 0.13);
  background: var(--gold-soft);
}

.integrity-inner {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-block: 17px;
  font-size: 14px;
}

.integrity-inner strong {
  flex: 0 0 auto;
}

.integrity-inner p {
  margin: 0;
}

.catalogue {
  padding-block: 96px 110px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 34px;
  margin-bottom: 36px;
}

.section-heading > p {
  max-width: 470px;
  margin: 0 0 6px;
  color: var(--muted);
}

.section-heading.compact {
  margin-bottom: 30px;
}

.filter-panel {
  display: grid;
  align-items: end;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--shadow-sm);
  grid-template-columns: minmax(230px, 1.45fr) repeat(4, minmax(130px, 0.65fr)) auto;
}

.filter-panel label,
.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
}

input,
select {
  min-height: 46px;
  padding: 9px 12px;
}

textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #98948a;
}

.input-wrap {
  position: relative;
}

.input-wrap svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.7;
  transform: translateY(-50%);
}

.input-wrap input {
  padding-left: 40px;
}

.filter-reset {
  min-height: 46px;
  white-space: nowrap;
}

.catalogue-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 23px 1px 17px;
  color: var(--muted);
  font-size: 13px;
}

.catalogue-meta p {
  margin: 0;
}

.catalogue-meta strong {
  color: var(--ink);
}

.programme-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.programme-card {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.programme-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 16px 36px rgba(49, 42, 30, 0.11);
  transform: translateY(-3px);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.programme-id {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.status-pill {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.status-pill.pending {
  background: var(--gold-soft);
  color: #795b16;
}

.programme-card h3 {
  font-size: 23px;
}

.programme-card .title-en {
  min-height: 40px;
  margin: 5px 0 18px;
  color: var(--muted);
  font-family: "Iowan Old Style", serif;
  font-size: 14px;
  line-height: 1.35;
}

.fact-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.fact-list div {
  display: grid;
  gap: 8px;
  grid-template-columns: 72px 1fr;
}

.fact-list dt {
  color: var(--muted);
  font-size: 11px;
}

.fact-list dd {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.card-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  grid-template-columns: 1fr 1.2fr;
}

.card-actions .button {
  min-height: 42px;
  padding-inline: 12px;
  font-size: 12px;
}

.empty-state {
  padding: 70px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.5);
  text-align: center;
}

.empty-state > span {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 44px;
}

.empty-state p {
  margin: 8px 0 20px;
  color: var(--muted);
}

.how-section {
  padding-block: 88px 96px;
  background: var(--ink);
  color: #fffaf1;
}

.how-section .eyebrow {
  color: var(--gold);
}

.step-grid {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.18);
  list-style: none;
  grid-template-columns: repeat(3, 1fr);
}

.step-grid li {
  min-height: 220px;
  padding: 28px;
  background: #23231f;
}

.step-grid li > span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-bottom: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.step-grid h3 {
  margin-bottom: 8px;
}

.step-grid p {
  margin: 0;
  color: rgba(255, 250, 241, 0.7);
  font-size: 14px;
}

.disclosure {
  padding-block: 104px;
}

.disclosure-card {
  display: grid;
  gap: clamp(40px, 8vw, 100px);
  padding: clamp(32px, 6vw, 70px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--surface), #f2eadc);
  box-shadow: var(--shadow-lg);
  grid-template-columns: 0.85fr 1.15fr;
}

.disclosure-copy {
  display: grid;
  gap: 18px;
}

.disclosure-copy p {
  margin: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.disclosure-copy p:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.site-footer {
  padding-block: 34px;
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner p {
  max-width: 520px;
  margin: 5px 0 0;
}

.modal {
  width: min(calc(100% - 30px), 900px);
  max-height: min(90vh, 940px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.28);
}

.modal::backdrop {
  background: rgba(21, 20, 17, 0.62);
  backdrop-filter: blur(5px);
}

.modal-shell {
  position: relative;
  max-height: min(90vh, 940px);
  padding: clamp(28px, 5vw, 52px);
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 25px;
  line-height: 1;
}

.modal-heading {
  max-width: 720px;
  padding-right: 42px;
}

.modal-heading > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
}

.detail-hero {
  padding-right: 45px;
}

.detail-hero h2 {
  margin-top: 8px;
}

.detail-hero .title-en {
  margin: 5px 0 22px;
  color: var(--muted);
  font-family: "Iowan Old Style", serif;
}

.detail-facts {
  display: grid;
  gap: 1px;
  margin: 30px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
  grid-template-columns: repeat(3, 1fr);
}

.detail-facts div {
  min-height: 94px;
  padding: 16px;
  background: var(--surface-soft);
}

.detail-facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.detail-facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.detail-columns {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 1fr;
}

.detail-columns h3 {
  margin-bottom: 12px;
}

.detail-columns ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

.detail-notice {
  margin: 28px 0 0;
  padding: 15px 17px;
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  color: #5e4b1d;
  font-size: 13px;
}

.selected-programme {
  margin: 24px 0 30px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.selected-programme span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.selected-programme strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

form {
  display: grid;
  gap: 28px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  width: 100%;
  margin-bottom: 14px;
  padding: 0 0 9px;
  border-bottom: 1px solid var(--line);
  font-family: "Iowan Old Style", "Songti TC", serif;
  font-size: 19px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid b {
  color: var(--red);
}

.span-two {
  grid-column: span 2;
}

.consent-row {
  display: grid;
  align-items: start;
  gap: 11px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--ink-soft);
  font-size: 12px;
  grid-template-columns: 18px 1fr;
}

.consent-row input {
  width: 17px;
  min-height: auto;
  height: 17px;
  margin: 2px 0 0;
}

.success-view {
  max-width: 590px;
  margin: 35px auto;
  text-align: center;
}

.success-mark {
  display: grid;
  width: 74px;
  height: 74px;
  margin: 0 auto 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 34px;
  font-weight: 800;
}

.success-view > p:not(.eyebrow) {
  color: var(--muted);
}

.success-view .form-actions {
  justify-content: center;
}

.reference-box {
  display: grid;
  gap: 4px;
  margin: 25px 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.reference-box span {
  color: var(--muted);
  font-size: 11px;
}

.reference-box strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 19px;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 22px;
  bottom: 22px;
  max-width: min(390px, calc(100% - 44px));
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
}

@media (max-width: 960px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 620px;
  }

  .filter-panel {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-field {
    grid-column: span 2;
  }

  .programme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .disclosure-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .page-shell,
  .site-header {
    width: min(calc(100% - 28px), var(--content));
  }

  .site-header {
    min-height: 74px;
  }

  .header-actions .text-link {
    display: none;
  }

  .header-actions .button {
    padding-inline: 12px;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    gap: 38px;
    padding-block: 50px 62px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .hero-lede {
    font-size: 16px;
  }

  .hero-panel {
    padding: 27px;
  }

  .integrity-inner,
  .section-heading,
  .footer-inner {
    display: block;
  }

  .integrity-inner strong {
    display: block;
    margin-bottom: 3px;
  }

  .catalogue {
    padding-block: 70px 82px;
  }

  .section-heading > p {
    margin-top: 15px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: auto;
  }

  .programme-grid,
  .step-grid {
    grid-template-columns: 1fr;
  }

  .programme-card {
    min-height: 0;
  }

  .catalogue-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .step-grid li {
    min-height: 0;
  }

  .step-grid li > span {
    margin-bottom: 28px;
  }

  .disclosure {
    padding-block: 72px;
  }

  .detail-facts {
    grid-template-columns: 1fr 1fr;
  }

  .detail-columns,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-two {
    grid-column: auto;
  }

  .modal {
    width: min(calc(100% - 16px), 900px);
    max-height: 94vh;
  }

  .modal-shell {
    max-height: 94vh;
    padding: 28px 21px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
  }

  .footer-inner > p {
    margin-top: 20px;
  }
}

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