:root {
  --bg: #f3ecdf;
  --bg-accent: #e5d8bd;
  --panel: rgba(255, 251, 244, 0.94);
  --text: #1d2b1f;
  --muted: #5f6d5e;
  --line: #d4c6ac;
  --brand: #2f6d41;
  --brand-dark: #214f2f;
  --warn: #9b3d2d;
  --shadow: 0 18px 48px rgba(52, 38, 16, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(47, 109, 65, 0.16), transparent 32%),
    radial-gradient(circle at right 20%, rgba(140, 96, 42, 0.12), transparent 24%),
    linear-gradient(160deg, var(--bg), #f8f4eb 45%, var(--bg-accent));
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.landing-shell {
  width: min(1180px, calc(100% - 32px));
}

.hero { padding: 28px 0 18px; }

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: end;
}

.hero-copy {
  min-width: 0;
}

.landing-aside {
  display: grid;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
  color: var(--brand-dark);
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.96;
  max-width: 10ch;
}

.lede {
  max-width: 58ch;
  font-size: 1.05rem;
  color: var(--muted);
}

.status-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.status-card {
  display: inline-block;
  margin-top: 10px;
  padding: 14px 18px;
}

.panel { padding: 26px; }
.form { display: grid; gap: 18px; }

.landing-panel {
  margin-top: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

label,
fieldset {
  display: grid;
  gap: 8px;
}

span,
legend { font-weight: 700; }

input,
select,
button { font: inherit; }

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fffdf9;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}

.choice input { width: auto; }
.group-box,
.consent-box { background: rgba(255, 255, 255, 0.52); }

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--brand), #4a8c5b);
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(47, 109, 65, 0.28);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--brand), #4a8c5b);
  color: white;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(47, 109, 65, 0.28);
}

.button-link-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-dark);
  border: 1px solid var(--line);
  box-shadow: none;
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.result {
  min-height: 24px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: 0 10px 24px rgba(52, 38, 16, 0.08);
}
.result:not(.hidden) {
  display: block;
}
.result.loading {
  border-color: #cbb88d;
  background: #fff6de;
}
.result.error {
  border-color: #d8a398;
  background: #fff0ec;
  color: var(--warn);
}
.result.success {
  border-color: #9dc7a7;
  background: #eef9f0;
  color: var(--brand-dark);
}
.hidden { display: none; }
.required-marker { color: var(--warn); font-weight: 700; }
.legend-note { margin: 0; font-size: 0.92rem; color: var(--muted); }
.confirm-panel { max-width: 720px; }
.confirm-summary {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.summary-list {
  margin: 10px 0 0;
  padding-left: 18px;
}
.group-hint {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff6de;
  border: 1px solid #d9c18d;
}

.feature-card,
.landing-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 28px rgba(52, 38, 16, 0.08);
}

.feature-card-primary {
  background: linear-gradient(145deg, rgba(47, 109, 65, 0.92), rgba(77, 130, 86, 0.88));
  color: white;
  border-color: rgba(47, 109, 65, 0.4);
}

.feature-card strong,
.landing-card h2 {
  display: block;
  margin: 8px 0 8px;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.landing-kicker,
.feature-label {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.feature-card-primary .feature-label {
  color: rgba(255, 255, 255, 0.76);
}

.landing-card-muted {
  background: rgba(255, 255, 255, 0.45);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding: 10px 2px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-left,
.footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.site-footer a {
  color: var(--brand-dark);
  text-decoration: none;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.54);
}

.stat-card strong {
  display: block;
  font-size: 1.8rem;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: #ede7d8;
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1080px);
    padding-top: 20px;
  }

  .panel { padding: 18px; }
  .landing-hero {
    grid-template-columns: 1fr;
  }
}
