:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #5a6776;
  --border: #e4e7eb;
  --brand: #2c3e50;
  --accent: #128c74;
  --accent-ink: #ffffff;
  --warn-bg: #fff8e6;
  --warn-text: #7a4f00;
  --ok-bg: #e6f7f2;
  --ok-text: #0b5e4d;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1720;
    --surface: #18222d;
    --text: #e4e7eb;
    --muted: #9aa5b1;
    --border: #2a3744;
    --brand: #0b1219;
    --accent: #1fd1ad;
    --accent-ink: #062a22;
    --warn-bg: #2e2510;
    --warn-text: #f0c36d;
    --ok-bg: #0f2d27;
    --ok-text: #7ee2c8;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: var(--accent); }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header {
  background: var(--brand);
  color: #fff;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header a { color: #fff; text-decoration: none; }
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
}
.nav { display: flex; gap: 16px; font-size: 0.95rem; }
.nav a { opacity: 0.85; }
.nav a:hover { opacity: 1; }

.inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}

.hero { padding: 32px 0 8px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.2; }
.hero p { margin: 0; color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
}

.card h2 { margin-top: 0; font-size: 1.15rem; }

.highlight {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.note { color: var(--muted); font-size: 0.9rem; margin: 8px 0 0; }

label { display: block; font-weight: 600; margin-bottom: 6px; }

input[type="date"] {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  max-width: 280px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
}

.status {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-weight: 600;
  margin: 16px 0 4px;
}
.status[data-kind="open"] { background: var(--ok-bg); color: var(--ok-text); }

.result-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.result-row .label { color: var(--muted); }
.result-row .value { font-weight: 700; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.faq dt { font-weight: 600; margin-top: 12px; }
.faq dd { margin: 4px 0 0; color: var(--muted); }

.prose h2 { margin-top: 28px; font-size: 1.15rem; }
.prose p, .prose li { color: var(--text); }

.site-footer {
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.site-footer p { margin: 4px 0; }
