:root {
  color-scheme: light;
  font-family: system-ui, "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: #19342d;
  background: #f3f6f4;
  font-synthesis: none;
  --green: #185244;
  --muted: #52675e;
  --border: #d8e4dc;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: var(--green); text-underline-offset: .2em; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #397c6b; outline-offset: 3px; }
.shell { width: min(100% - 2rem, 58rem); margin-inline: auto; }

.site-header { background: #153c35; color: white; }
.site-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-block: 1rem .75rem;
}
.brand { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; color: white; text-decoration: none; font-weight: 800; }
.brand span { color: #b9d6ca; font-size: .75rem; font-weight: 500; white-space: nowrap; }
.offline-status { color: #d0ecdf; font-size: .75rem; text-align: right; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 58rem; }
.tabs a {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 48px;
  padding: .4rem .25rem;
  border-bottom: 3px solid transparent;
  border-radius: .5rem .5rem 0 0;
  color: #d4e5df;
  font-size: .95rem;
  font-weight: 650;
  text-decoration: none;
  text-align: center;
}
.tabs a:hover, .tabs a[aria-current] { background: #254f46; color: white; }
.tabs a[aria-current] { border-color: #92d7b6; }
.site-header :focus-visible { outline-color: #a1e7c4; outline-offset: -4px; }

main { padding-block: 1.75rem max(2rem, env(safe-area-inset-bottom)); }
.hero { margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.16; letter-spacing: -.025em; }
.hero p, .helper { margin-top: .55rem; color: var(--muted); line-height: 1.55; }
.radar-hero { display: flex; flex-wrap: wrap; gap: .75rem 1rem; justify-content: space-between; align-items: flex-end; }
.hero .date-chip { margin: 0; padding: .35rem .65rem; background: #e3eee8; border-radius: .45rem; color: #234f41; font-size: .82rem; font-weight: 650; }
.notice { background: #fff4d9; color: #624815; border: 1px solid #e5d6a8; border-radius: .65rem; padding: .75rem .9rem; margin-bottom: 1.25rem; line-height: 1.55; font-size: .9rem; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .7rem; }
.section-heading span { color: var(--muted); font-size: .82rem; font-weight: 650; text-align: right; }
h2 { font-size: 1.11rem; }
h3 { font-size: 1.04rem; line-height: 1.4; overflow-wrap: anywhere; }
.entries, .checklist-groups { display: grid; align-content: start; gap: .75rem; }
.card, .panel, .checklist-groups fieldset { background: white; border: 1px solid var(--border); border-radius: .8rem; padding: .9rem; min-width: 0; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.badge { display: inline-flex; align-items: center; padding: .2rem .52rem; border-radius: .33rem; background: #e9eeeb; color: #465951; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.badge.urgent { background: #fbe3e2; color: #882e27; }
.badge.soon { background: #faedcc; color: #704e12; }
.badge.later { background: #e1f1e8; color: #235942; }
.deadline-date { display: block; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; margin-top: .3rem; }
.source-info { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .65rem; margin-top: .55rem; color: var(--muted); font-size: .78rem; }
.source-info a { display: inline-flex; align-items: center; min-height: 44px; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .45rem .75rem;
  border: 1px solid #a8c2b6;
  border-radius: .47rem;
  background: white;
  color: #234f41;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { border-color: var(--green); background: var(--green); color: white; }
.button:hover { background: #eaf3ee; }
.button.primary:hover { background: #123e34; }
details { margin-top: 1rem; }
summary { min-height: 44px; padding: .6rem 0; font-weight: 700; cursor: pointer; }
summary span { margin-inline-start: .4rem; color: var(--muted); font-size: .82rem; }

.eligibility-layout { display: grid; gap: 1.25rem; align-items: start; }
.helper { font-size: .82rem; }
.option-group { border: 0; margin: .8rem 0 0; padding: 0; min-inline-size: 0; }
legend { font-size: .9rem; font-weight: 750; padding: 0; margin-bottom: .18rem; }
.check-row {
  display: flex;
  gap: .6rem;
  align-items: center;
  min-height: 44px;
  padding: .35rem .45rem;
  border-radius: .42rem;
  cursor: pointer;
  line-height: 1.45;
  font-size: .91rem;
}
.check-row:hover, .check-row:has(input:checked) { background: #edf5f0; }
.check-row input { width: 1.15rem; height: 1.15rem; flex: none; margin: 0; accent-color: var(--green); }
.missing-list { padding-inline-start: 1.25rem; margin: .55rem 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.progress-panel { margin-bottom: 1rem; }
progress { width: 100%; height: .7rem; display: block; accent-color: var(--green); }
.checklist-groups fieldset { margin: 0; }
.checklist-groups legend { padding: 0 .35rem; }

@media (min-width: 44rem) {
  .tabs { grid-template-columns: repeat(3, 8.5rem); }
  main { padding-block-start: 2.75rem; }
  .hero { margin-bottom: 1.65rem; }
  .card, .panel { padding: 1.1rem; }
  .eligibility-layout { grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); }
  .checklist-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
