/* Save Our Soil Run: light theme. Soil green for actions, earth brown for accents. */
:root {
  --bg: #ffffff;
  --soft: #f7f4ee;          /* sand: page bands, register page background */
  --surface: #ffffff;
  --text: #1f1c17;
  --muted: #625c52;
  --line: #e8e2d6;
  --field-line: #d6cebd;
  --accent: #2f7a3b;        /* soil green: buttons, links */
  --accent-dark: #24612e;
  --accent-soft: #e9f3e7;
  --accent-ink: #ffffff;
  --earth: #8a5a34;         /* soil brown: labels, badges */
  --earth-soft: #f5ece2;
  --ok: #2f7a3b;
  --warn: #a15c00;
  --bad: #b42318;
  --disabled: #e7e3db;
  --disabled-ink: #8f897d;
  --radius: 14px;
  --max: 1080px;
  --shadow: 0 1px 2px rgba(31, 28, 23, 0.05), 0 6px 20px rgba(31, 28, 23, 0.06);
  --shadow-lg: 0 2px 6px rgba(31, 28, 23, 0.06), 0 18px 40px rgba(31, 28, 23, 0.12);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
body.soft { background: var(--soft); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { color: var(--muted); font-size: 0.85rem; }

/* Header */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; flex: none; }

/* Buttons */
.btn {
  display: inline-block; text-align: center;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; font-size: 1.05rem;
  text-decoration: none; border: 1px solid transparent; border-radius: 999px; padding: 14px 28px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(47, 122, 59, 0.25);
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}
.btn:hover { background: var(--accent-dark); color: var(--accent-ink); transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(47, 122, 59, 0.35); outline-offset: 2px; }
.btn.small { padding: 9px 18px; font-size: 0.92rem; box-shadow: none; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--field-line); box-shadow: none; }
.btn.ghost:hover { background: var(--soft); color: var(--text); }
.btn:disabled, .btn:disabled:hover {
  background: var(--disabled); color: var(--disabled-ink); border-color: transparent;
  box-shadow: none; transform: none; cursor: not-allowed;
}

/* Home: hero */
.hero { display: grid; gap: 32px; align-items: center; padding: 40px 0 28px; }
@media (min-width: 880px) { .hero { grid-template-columns: 1.05fr 0.95fr; gap: 56px; padding: 64px 0 44px; } }
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 6px 12px; border-radius: 999px;
  background: var(--earth-soft); color: var(--earth);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.2rem); line-height: 1.02; letter-spacing: -0.035em; margin: 0; }
.hero .subtitle { margin: 12px 0 10px; font-size: clamp(1.35rem, 3.2vw, 1.8rem); font-weight: 800; color: var(--accent); letter-spacing: -0.01em; }
.hero .lead { margin: 0 0 28px; max-width: 34ch; color: var(--muted); font-size: 1.15rem; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.hero-note { color: var(--muted); font-size: 0.92rem; }
.hero-media { position: relative; margin: 0; }
.hero-media img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; object-position: 36% 60%;
  border-radius: 24px; box-shadow: var(--shadow-lg);
}
@media (min-width: 880px) { .hero-media img { aspect-ratio: 1 / 1; } }
.hero-badge {
  position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow-lg);
}
@media (min-width: 880px) { .hero-badge { left: -22px; bottom: 28px; } }
.hero-badge strong { font-size: 1.9rem; line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.hero-badge span { font-size: 0.85rem; line-height: 1.3; color: var(--muted); }

/* Home: key facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0; padding: 0; }
.facts div { background: var(--soft); border-radius: var(--radius); padding: 16px 18px; }
.facts dt { color: var(--earth); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; font-weight: 700; }

/* Sections */
section { padding: 36px 0; }
section h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); letter-spacing: -0.02em; margin: 0 0 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.split { display: grid; gap: 16px; }
@media (min-width: 760px) { .split { grid-template-columns: 0.8fr 1.2fr; } }
.price-card { background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.price-card .price { font-size: 3rem; font-weight: 800; line-height: 1; color: var(--accent); letter-spacing: -0.03em; margin: 6px 0 10px; }
.price-card p { margin: 0; color: var(--muted); }
.label { color: var(--earth); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
ul.ticks { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; }
ul.ticks li { position: relative; padding-left: 30px; font-weight: 600; }
ul.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.75rem; background: var(--accent); color: #fff;
}
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { ol.steps { grid-template-columns: repeat(3, 1fr); } }
ol.steps li { counter-increment: step; background: var(--soft); border-radius: var(--radius); padding: 20px; }
ol.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px;
  border-radius: 50%; background: var(--earth); color: #fff; font-weight: 800;
}
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
details[open] { box-shadow: var(--shadow); }
summary { font-weight: 650; cursor: pointer; }
details p { margin: 10px 0 2px; color: var(--muted); }
.cta-band {
  margin: 12px 0 48px; padding: 36px 24px; text-align: center; border-radius: 22px;
  background: linear-gradient(135deg, var(--earth-soft), var(--accent-soft));
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { margin: 0 0 20px; color: var(--muted); }

/* Footer */
footer { background: var(--soft); border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 10px; }
footer a { color: var(--muted); }

/* Policy pages and success page */
.prose { max-width: 740px; padding-top: 40px; padding-bottom: 56px; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); letter-spacing: -0.02em; margin-top: 0; }
.prose h2 { font-size: 1.2rem; margin-top: 30px; }
.prose p { color: #3d3830; }
.center { text-align: center; padding-top: 56px; padding-bottom: 72px; }
.center .card { max-width: 520px; margin: 0 auto; padding: 32px 24px; }
.center h1 { margin: 8px 0 12px; letter-spacing: -0.02em; }
.big-tick {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 2rem; font-weight: 800;
}
.reg-no { color: var(--earth); white-space: nowrap; }
.bib-no { display: inline-block; margin-top: 6px; font-size: 3.2rem; line-height: 1; color: var(--accent); letter-spacing: -0.02em; }

/* Registration page */
.register { display: grid; gap: 22px; padding-top: 32px; padding-bottom: 56px; }
@media (min-width: 960px) {
  .register { grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
  .register aside { position: sticky; top: 88px; }
}
.register-head h1 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 6px; }
.register-head p { margin: 0 0 18px; color: var(--muted); }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px; box-shadow: var(--shadow); }
@media (min-width: 600px) { .form-card { padding: 30px 32px; } }
.form-card h2 { font-size: 1.05rem; margin: 30px 0 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-card h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.field { display: grid; gap: 6px; margin-bottom: 16px; align-content: start; }
.field label { font-weight: 600; }
.field small { color: var(--muted); font-size: 0.85rem; }
.form-card input:not([type="checkbox"]), .form-card select, .form-card textarea {
  font: inherit; color: var(--text); background: var(--surface); width: 100%;
  border: 1px solid var(--field-line); border-radius: 10px; padding: 11px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-card :is(input, select, textarea):focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 122, 59, 0.18); }
.form-card input:disabled { background: var(--soft); color: var(--muted); border-style: dashed; cursor: not-allowed; }
.form-card textarea { resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 4px; padding: 14px 16px; background: var(--soft); border-radius: 12px; cursor: pointer; }
.check input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--accent); flex: none; cursor: pointer; }
.pay-row { display: grid; gap: 8px; margin-top: 16px; }
.pay-row .btn { width: 100%; }
@media (min-width: 600px) { .pay-row .btn { width: auto; justify-self: start; } }
.msg { color: var(--muted); font-size: 0.95rem; margin: 12px 0 0; min-height: 1.2em; }
.msg.error { color: var(--bad); font-weight: 600; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.summary img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 36% 62%; }
@media (max-width: 959px) { .register aside { order: -1; } .summary img { display: none; } }
.summary-body { padding: 18px 20px 20px; }
.summary-body h2 { margin: 2px 0 0; font-size: 1.25rem; letter-spacing: -0.01em; }
.summary-body .subtitle { margin: 0; color: var(--accent); font-weight: 700; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 14px 0 0; font-size: 0.93rem; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.summary .total { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--field-line); display: flex; justify-content: space-between; align-items: baseline; }
.summary .total strong { font-size: 1.5rem; color: var(--accent); }

/* Admin page */
.wrap.wide { max-width: 1320px; }
.login { max-width: 380px; margin: 64px auto; display: grid; gap: 10px; }
.login h1 { font-size: 1.4rem; margin: 0 0 6px; }
input[type="password"], input[type="search"] {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--field-line); border-radius: 999px; padding: 10px 16px; min-width: 0;
}
input[type="search"] { flex: 1 1 260px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.stats .card span { color: var(--muted); }
.stats strong { display: block; font-size: 1.9rem; letter-spacing: -0.02em; }
.stats small { color: var(--muted); font-size: 0.8rem; }
.warn { color: var(--warn); }
.ok { color: var(--ok); }
ul.chips { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
ul.chips li { background: var(--soft); border-radius: 999px; padding: 3px 11px; font-size: 0.9rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.table-wrap { overflow: auto; max-height: 75vh; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
th { position: sticky; top: 0; background: var(--soft); color: var(--muted); font-weight: 600; box-shadow: inset 0 -1px var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfbf8; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
td.wrap-text { white-space: normal; min-width: 180px; }
