:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #69707a;
  --line: #dde1e6;
  --surface: #ffffff;
  --paper: #f7f5f0;
  --field: #fbfaf7;
  --green: #256f5a;
  --green-strong: #17513f;
  --gold: #c79630;
  --red: #b6423c;
  --shadow: 0 18px 50px rgba(32, 33, 36, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(247, 245, 240, 0.94);
  border-bottom: 1px solid rgba(221, 225, 230, 0.8);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--green);
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav-link {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--green-strong);
  background: rgba(37, 111, 90, 0.1);
}

main {
  min-height: calc(100vh - 150px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 80px) 40px;
}

.hero-copy,
.form-intro,
.section-heading {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(38px, 7vw, 74px);
  line-height: 1.04;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.lede {
  max-width: 660px;
  color: var(--muted);
  font-size: 18px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.button.primary {
  color: #fff;
  background: var(--green);
}

.button.primary:hover {
  background: var(--green-strong);
}

.button.secondary {
  color: var(--green-strong);
  background: #fff;
  border-color: var(--line);
}

.full {
  grid-column: 1 / -1;
  width: 100%;
}

.service-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
  background: var(--field);
  border-radius: 7px;
}

.metric strong {
  display: block;
  color: var(--green-strong);
  font-size: 34px;
  line-height: 1;
}

.metric span {
  color: var(--muted);
}

.band,
.split-section,
.form-shell,
.admin-shell,
.login-shell,
.empty {
  padding: clamp(38px, 6vw, 72px) clamp(18px, 5vw, 80px);
}

.band {
  background: #fff;
  border-block: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.steps article {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.steps span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  color: #fff;
  background: var(--green);
  border-radius: 50%;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 36px;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 7px;
}

.form-shell {
  display: grid;
  grid-template-columns: minmax(240px, 0.5fr) minmax(320px, 0.9fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}

.form-card,
.login-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(20px, 3vw, 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-shell {
  display: grid;
  place-items: center;
}

.login-card {
  width: min(440px, 100%);
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}

textarea {
  resize: vertical;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

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

.choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-grid.districts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 240px;
  overflow: auto;
  padding: 2px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.choice input {
  width: auto;
  min-height: 0;
  margin: 0;
}

.inline-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  padding: 14px;
  background: #fff7e5;
  border: 1px solid #ead39c;
  border-radius: 7px;
}

.inline-check input {
  width: auto;
  min-height: 0;
  margin-top: 5px;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(37, 111, 90, 0.16);
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--green-strong);
  font-weight: 700;
}

.form-message.is-error {
  color: var(--red);
}

.admin-shell {
  display: grid;
  gap: 18px;
}

.admin-heading,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-heading h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
}

.admin-tabs {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-tabs button {
  min-height: 38px;
  padding: 8px 14px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.admin-tabs button.is-active {
  color: #fff;
  background: var(--green);
}

.admin-table {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  background: var(--field);
  font-size: 12px;
  text-transform: uppercase;
}

td select,
td input {
  min-width: 150px;
}

.pill {
  display: inline-flex;
  padding: 3px 8px;
  color: var(--green-strong);
  background: rgba(37, 111, 90, 0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.is-hidden {
  display: none;
}

.site-footer {
  padding: 20px clamp(18px, 4vw, 56px);
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong,
.site-footer span {
  display: block;
}

@media (max-width: 820px) {
  .site-header,
  .admin-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero,
  .split-section,
  .form-shell {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

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

  .choice-grid.two,
  .choice-grid.three,
  .choice-grid.four,
  .choice-grid.districts {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }
}
