:root {
  color-scheme: light;
  --bg: #f6f8f4;
  --surface: #ffffff;
  --surface-soft: #eef3eb;
  --ink: #16201c;
  --muted: #5f6e65;
  --line: #dbe3da;
  --green: #2f704f;
  --green-deep: #1f4e3a;
  --gold: #e7af45;
  --shadow: 0 18px 44px rgba(32, 48, 39, 0.12);
  --radius: 8px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-width: 320px;
  margin: 0;
  background: linear-gradient(180deg, #fbfcfa 0%, var(--bg) 42%, #eef4f1 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--green-deep); }
header, main {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}
header .brand { font-weight: 700; text-decoration: none; color: var(--ink); }
header .hint { color: var(--muted); font-size: 14px; }
h1 { font-size: 28px; margin: 8px 0 4px; }
.lede { color: var(--muted); margin: 0 0 24px; max-width: 60ch; }
fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
  margin: 0 0 18px;
}
legend { font-weight: 600; padding: 0 6px; }
label.field,
.field-label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 4px; }
.helper { font-weight: 400; color: var(--muted); display: block; font-size: 13px; margin-top: 2px; }
input[type="text"],
input[type="email"] {
  width: 100%;
  max-width: 340px;
  padding: 9px 12px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.choices label {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 7px 14px;
  font-size: 14px;
  cursor: pointer;
}
.choices label:has(input:checked) {
  border-color: var(--green);
  background: #e2efe6;
  font-weight: 600;
}
.choices input { accent-color: var(--green); margin: 0; }
#child-tabs:empty { display: none; }
#child-tabs button {
  min-height: 44px;
  font: inherit;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  cursor: pointer;
}
#child-tabs button.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.swatch {
  width: 14px; height: 14px; border-radius: 50%;
  display: inline-block; border: 1px solid rgba(0,0,0,0.15);
}
.consent {
  border-left: 3px solid var(--gold);
  background: var(--surface-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink);
  margin-top: 14px;
}
.consent-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.consent-check input { margin-top: 4px; }
.link-note { color: var(--muted); font-size: 13px; max-width: 70ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 10px; }
.actions button, .actions a.button {
  min-height: 44px;
  font: inherit;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.actions button:focus-visible,
.actions a.button:focus-visible,
.choices label:has(input:focus-visible),
#child-tabs button:focus-visible,
input:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.actions button:disabled {
  cursor: wait;
  opacity: 0.72;
}
.actions .primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.status { min-height: 22px; font-size: 14px; color: var(--green-deep); }
.phase-note { color: var(--muted); font-size: 13px; margin: 18px 0 40px; max-width: 70ch; }
code { background: var(--surface-soft); padding: 1px 5px; border-radius: 4px; }

@media (max-width: 620px) {
  header { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .actions { align-items: stretch; flex-direction: column; }
  .actions button,
  .actions a.button,
  .actions input { width: 100%; max-width: none; }
}
