:root {
  --ink: #182018;
  --muted: #566154;
  --line: #c8d0c4;
  --paper: #ffffff;
  --soft: #edf1e9;
  --soft-deep: #dfe6da;
  --green: #3f4c3c;
  --green-dark: #293327;
  --sage: #71806c;
  --red: #a9342b;
  --yellow: #ebc23b;
  --max: 1180px;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 20px;
  line-height: 1.75;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 132px; }
html.large-text { font-size: 24px; }
body { margin: 0; padding-top: 118px; background: var(--paper); color: var(--ink); }
a { color: inherit; }
button, a { font: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .65rem 1rem;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 900;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: var(--green-dark);
  color: #fff;
  border-bottom: 5px solid var(--yellow);
  box-shadow: 0 4px 16px rgba(24, 32, 24, .2);
}
.header-inner {
  width: min(calc(100% - 2rem), var(--max));
  min-height: 113px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  line-height: 1.2;
}
.brand strong { display: block; font-size: 1.7rem; line-height: 1.15; }
.brand small { display: flex; align-items: center; gap: .22rem; margin-top: .3rem; color: #fff; font-size: 1.05rem; line-height: 1.3; }
.candidate-number {
  display: inline-grid;
  min-width: 1.4em;
  min-height: 1.4em;
  place-items: center;
  padding: .06em .18em;
  background: var(--red);
  color: #fff;
  font-weight: 950;
  line-height: 1;
  vertical-align: middle;
}
.brand .candidate-number { min-width: 1.55em; min-height: 1.55em; font-size: 1.28rem; }
.font-button {
  min-height: 54px;
  padding: .6rem 1rem;
  border: 2px solid #fff;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
}
.font-button:hover, .font-button:focus-visible { border-color: var(--yellow); background: var(--yellow); color: var(--ink); }

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--line);
  background-color: var(--soft);
  background-image:
    linear-gradient(90deg, #edf1e9 0%, #edf1e9 47%, rgba(237, 241, 233, .94) 55%, rgba(237, 241, 233, .25) 73%, rgba(237, 241, 233, 0) 100%),
    url("candidate-zhang-jing-tai.png");
  background-repeat: no-repeat;
  background-position: center, 96% center;
  background-size: 100% 100%, auto 100%;
}
.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 14px;
  content: "";
  background: linear-gradient(90deg, var(--green) 0 38%, var(--yellow) 38% 72%, var(--red) 72% 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), var(--max));
  min-height: 650px;
  margin: 0 auto;
  padding: 3.7rem 0 4.4rem;
  display: flex;
  align-items: center;
}
.hero-copy { width: min(64%, 730px); }
.eyebrow {
  margin: 0 0 .6rem;
  color: var(--green);
  font-size: 1rem;
  font-weight: 950;
}
.hero h1 {
  margin: 0;
  font-size: 4.65rem;
  line-height: 1;
  font-weight: 950;
}
.hero h1 span {
  display: block;
  margin-top: .7rem;
  font-size: 2.05rem;
  line-height: 1.25;
}
.hero .candidate-number {
  min-width: 1.45em;
  min-height: 1.45em;
  margin: 0 .08em;
}
.hero-lead { max-width: 680px; margin: 1.35rem 0 0; font-size: 1.28rem; font-weight: 800; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.55rem; }
.privacy-note { max-width: 700px; margin: .8rem 0 0; color: var(--muted); font-size: .98rem; }
.service-strip { background: var(--green-dark); color: #fff; border-bottom: 6px solid var(--yellow); }
.service-strip-inner {
  width: min(calc(100% - 2rem), var(--max));
  min-height: 116px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem 0;
}
.service-strip-kicker { display: block; margin-bottom: .1rem; color: var(--yellow); font-size: .8rem; font-weight: 950; }
.service-strip strong { display: block; font-size: 1.45rem; line-height: 1.25; }
.service-strip ul { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.service-strip li { padding: .35rem .75rem; border: 2px solid var(--sage); border-radius: 5px; font-size: .95rem; font-weight: 900; }

.button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: .72rem 1.2rem;
  border: 2px solid transparent;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover, .button-primary:focus-visible { background: var(--green-dark); }
.button-secondary { border-color: var(--ink); background: rgba(255, 255, 255, .88); color: var(--ink); }
.button-secondary:hover, .button-secondary:focus-visible { background: var(--ink); color: #fff; }
.button-light { background: #fff; color: var(--green-dark); }
.button-light:hover, .button-light:focus-visible { background: var(--yellow); color: var(--ink); }
.button-disabled { background: #dedede; color: #606060; cursor: not-allowed; }

.directory {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: 4.5rem 0 5.5rem;
}
.section-heading { max-width: 850px; margin: 0 auto 2.2rem; text-align: center; }
.section-heading h2, .contact-band h2 {
  margin: 0;
  font-size: 2.75rem;
  line-height: 1.2;
}
.section-heading > p:last-child { margin: .8rem 0 0; color: var(--muted); font-size: 1.08rem; }
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.topic-card:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - .5rem); justify-self: center; }
.topic-card {
  position: relative;
  min-height: 236px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 6px solid var(--sage);
  border-radius: 7px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(41, 51, 39, .07);
  cursor: pointer;
}
.topic-card:nth-child(3n + 1) { border-top-color: var(--green); }
.topic-card:nth-child(3n + 2) { border-top-color: var(--yellow); }
.topic-card:nth-child(3n) { border-top-color: var(--red); }
.topic-card:hover, .topic-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--green);
  background: var(--soft);
  outline: 3px solid var(--green);
  outline-offset: -3px;
  box-shadow: 0 12px 26px rgba(41, 51, 39, .13);
}
.topic-number { color: var(--red); font-size: 1.65rem; font-weight: 950; line-height: 1; }
.topic-body { display: flex; min-width: 0; flex-direction: column; }
.topic-category {
  align-self: flex-start;
  margin-bottom: .35rem;
  padding: .1rem .5rem;
  background: var(--soft-deep);
  color: var(--green-dark);
  font-size: .78rem;
  font-weight: 900;
}
.topic-body h3 { margin: 0; font-size: 1.38rem; line-height: 1.35; }
.topic-body p { margin: .55rem 0 .9rem; color: var(--muted); font-size: 1.02rem; line-height: 1.65; }
.topic-link { margin-top: auto; color: var(--green-dark); font-weight: 950; }

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3.2rem max(1rem, calc((100vw - var(--max)) / 2));
  background: var(--green);
  color: #fff;
  border-top: 12px solid var(--yellow);
}
.contact-band .eyebrow { color: var(--yellow); }
.contact-band p { max-width: 760px; margin-bottom: 0; font-size: 1.05rem; }
.site-footer {
  padding: 2rem max(1rem, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line);
  background: var(--green-dark);
  color: #dce4d9;
}
.site-footer p { margin: .2rem 0; }
.candidate-number-footer { min-width: 1.35em; min-height: 1.35em; margin: 0 .08em; font-size: .95em; }

.detail-main { width: min(calc(100% - 2rem), 980px); margin: 0 auto; padding: 2.5rem 0 5rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.4rem; color: var(--muted); font-size: 1rem; }
.breadcrumb a { color: var(--green); font-weight: 900; }
.detail-area { margin: 0 0 .2rem; color: var(--green); font-size: 1.25rem; font-weight: 950; }
.detail-article h1 { margin: 0 0 1rem; font-size: 3.35rem; line-height: 1.16; }
.detail-registration { color: var(--ink); font-size: 1em; line-height: 1.35; }
.detail-registration .candidate-number { margin: 0 .08em; font-size: .82em; }
.detail-status {
  display: inline-block;
  margin: 0 0 1rem;
  padding: .2rem .65rem;
  background: var(--soft-deep);
  color: var(--green-dark);
  font-size: .86rem;
  font-weight: 900;
}
.detail-intro {
  margin: 0;
  padding: 1.25rem 1.35rem;
  border-left: 9px solid var(--yellow);
  background: var(--soft);
  font-size: 1.25rem;
  font-weight: 750;
}
.detail-sections { margin-top: 1.5rem; border-top: 2px solid var(--ink); }
.detail-section {
  display: grid;
  grid-template-columns: minmax(190px, .85fr) 2fr;
  gap: 2rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}
.detail-section h2 { margin: 0; color: var(--green-dark); font-size: 1.35rem; line-height: 1.4; }
.detail-section p { margin: 0; font-size: 1.08rem; line-height: 1.8; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.draft-note { margin-top: 3rem; padding: 1.2rem; border-left: 7px solid var(--yellow); background: var(--soft); }
.draft-note p { margin: .25rem 0 0; }
.detail-nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; padding-top: 2rem; border-top: 2px solid var(--ink); }
.loading { min-height: 400px; }

@media (max-width: 920px) {
  .hero {
    background-image:
      linear-gradient(90deg, #edf1e9 0%, #edf1e9 56%, rgba(237, 241, 233, .8) 72%, rgba(237, 241, 233, .2) 100%),
      url("candidate-zhang-jing-tai.png");
  }
  .hero-copy { width: 70%; }
  .hero { background-position: center, 94% center; }
  .hero h1 { font-size: 4rem; }
  .hero h1 span { font-size: 1.75rem; }
}

@media (max-width: 760px) {
  :root { font-size: 19px; }
  html { scroll-padding-top: 116px; }
  html.large-text { font-size: 22px; }
  body { padding-top: 102px; }
  .header-inner { min-height: 97px; }
  .brand strong { font-size: 1.4rem; }
  .brand small { margin-top: .2rem; font-size: .82rem; }
  .brand .candidate-number { font-size: 1.02rem; }
  .font-button { min-height: 48px; padding: .45rem .65rem; font-size: .92rem; }
  .hero {
    background-image:
      linear-gradient(180deg, rgba(237, 241, 233, 0) 0%, rgba(237, 241, 233, .08) 36%, #edf1e9 55%, #edf1e9 100%),
      url("candidate-zhang-jing-tai.png");
    background-position: center, center top;
    background-size: 100% 100%, auto 500px;
  }
  .hero-inner { min-height: auto; padding: 24rem 0 3.5rem; align-items: flex-start; }
  .hero-copy { width: 100%; }
  .hero h1 { font-size: 3.25rem; }
  .hero h1 span { font-size: 1.55rem; }
  .hero-lead { font-size: 1.15rem; }
  .hero-actions .button { width: 100%; }
  .service-strip-inner { min-height: 0; align-items: flex-start; flex-direction: column; gap: .8rem; padding: 1.2rem 0; }
  .service-strip ul { width: 100%; }
  .service-strip li { flex: 1 1 30%; text-align: center; }
  .section-heading h2, .contact-band h2 { font-size: 2.2rem; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card:last-child:nth-child(odd) { grid-column: auto; width: 100%; }
  .topic-card { min-height: 220px; grid-template-columns: 52px minmax(0, 1fr); padding: 1.25rem 1rem; }
  .contact-band { align-items: stretch; flex-direction: column; }
  .contact-band .button { width: 100%; }
  .detail-article h1 { font-size: 2.45rem; }
  .detail-section { grid-template-columns: 1fr; gap: .5rem; }
  .detail-nav .button, .detail-actions .button { width: 100%; }
}

@media (max-width: 430px) {
  .header-inner { width: min(calc(100% - 1rem), var(--max)); gap: .45rem; }
  .brand strong { font-size: 1.2rem; }
  .brand small { font-size: .7rem; }
  .brand .candidate-number { font-size: .9rem; }
  .font-button { padding-inline: .5rem; }
  .hero { background-size: 100% 100%, auto 460px; }
  .hero-inner { padding-top: 22rem; }
  .hero h1 { font-size: 2.9rem; }
  .hero h1 span { font-size: 1.35rem; }
  .topic-card { grid-template-columns: 44px minmax(0, 1fr); padding-inline: .75rem; }
  .service-strip li { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topic-card:hover, .topic-card:focus-visible { transform: none; }
}

@media print {
  .site-header, .hero-actions, .font-button, .detail-nav { display: none; }
  body { padding-top: 0; font-size: 12pt; }
  .hero { background-image: none; }
  .hero-inner, .directory, .detail-main { width: 100%; min-height: auto; padding: 1rem 0; }
  .hero-copy { width: 100%; }
  .topic-card { break-inside: avoid; box-shadow: none; }
}
