:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --ink: #1f2328;
  --muted: #5d6470;
  --line: #e4ddd2;
  --accent: #b83a2a;
  --accent-ink: #ffffff;
  --accent-soft: #fbe9e5;
  --good: #1f7a4d;
  --good-soft: #e5f4ec;
  --bad: #a3321f;
  --bad-soft: #fbe7e3;
  --warn-soft: #fff4d6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(31, 35, 40, 0.06), 0 4px 14px rgba(31, 35, 40, 0.05);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181b;
    --surface: #202226;
    --ink: #eceae6;
    --muted: #a6abb3;
    --line: #34373d;
    --accent: #e0705d;
    --accent-ink: #1b1b1b;
    --accent-soft: #3a2521;
    --good: #6fd09b;
    --good-soft: #1c3328;
    --bad: #f08a78;
    --bad-soft: #3b2220;
    --warn-soft: #3a3320;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0.2em 0 0.3em; }
h2 { font-size: 1.35rem; margin: 0 0 0.5em; }
h3 { font-size: 1.05rem; margin: 1.4em 0 0.3em; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { color: var(--ink); }
main { padding: 28px 16px 60px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; padding: 24px 0 40px; }
.site-footer a { color: var(--muted); }

.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 44em; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.note { color: var(--muted); font-size: 0.9rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  padding: 10px 18px; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button:hover { filter: brightness(1.05); }
.button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button.secondary:hover { border-color: var(--muted); }
.button.small { padding: 6px 12px; font-size: 0.92rem; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.link.danger { color: var(--bad); font-size: 0.9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0 0 18px; box-shadow: var(--shadow); }
.row-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 0 0 12px; }
.row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.grid .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; }
.field > span { font-weight: 600; font-size: 0.92rem; }
.field small { color: var(--muted); font-size: 0.82rem; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; margin: 0; }
input[type="text"], input[type="number"], input[type="date"], textarea, select {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; min-width: 0;
}
.field.inline select { width: auto; }
textarea { resize: vertical; }
::placeholder { color: var(--muted); opacity: 0.6; font-style: italic; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.sub { margin: 4px 0 10px; }
.sublabel { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 4px; }
.days { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.92rem; cursor: pointer; background: var(--bg); }
.chip input { margin: 0; }

.banner { border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; background: var(--accent-soft); }
.banner.good, .verified { background: var(--good-soft); }
.banner.bad { background: var(--bad-soft); }
.banner.warn { background: var(--warn-soft); }
.verified { border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
.report ol, .report ul { padding-left: 1.3em; }
.report li { margin: 0.3em 0; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.toolbar label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.toolbar select { width: auto; max-width: 70vw; }
.table-wrap { overflow-x: auto; }
table.schedule, table.fair { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.schedule th, table.schedule td, table.fair th, table.fair td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.schedule thead th, table.fair thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
table.schedule td:first-child { white-space: nowrap; }
tr.date-row th { background: var(--bg); padding-top: 14px; font-size: 0.95rem; }
details.rules { margin: 16px 0; }
details.rules summary { cursor: pointer; font-weight: 600; }

.hero { padding: 24px 0 8px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: step; padding: 0; list-style: none; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; counter-increment: step; }
.steps li::before { content: counter(step); display: flex; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); align-items: center; justify-content: center; font-weight: 700; margin-bottom: 8px; }
.features { columns: 2 260px; padding-left: 1.2em; }
.features li { margin: 0 0 0.5em; break-inside: avoid; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plan .price { font-size: 2rem; font-weight: 700; margin: 0.2em 0; }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.6em; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; z-index: 5; }
.sticky-actions .field.inline input { width: 90px; }

@media (max-width: 640px) {
  .card { padding: 16px; }
  table.schedule th, table.schedule td { padding: 6px 6px; font-size: 0.88rem; }
}
@media print {
  .site-header, .site-footer, .no-print, #form, .app-intro, .sticky-actions, .publish, details.rules, .stale { display: none !important; }
  body { background: #fff; color: #000; }
  main { padding: 0; }
  .card { border: 0; box-shadow: none; padding: 0; }
  .banner, .verified { background: none; border: 1px solid #999; }
  tr.date-row th { background: #eee; }
  tr { break-inside: avoid; }
}
