:root {
  /* Sprouts Studios palette (from sprouts-studios.com) */
  --bg: #eef1ea;
  --fg: #1c2320;
  --muted: #5a6760;
  --card: #f7f9f4;
  --line: #c9d1c3;
  --brand: #2f7a4a;
  --brand-deep: #2f7a4a;
  --brand-soft: #cfe3d2;
  --accent: #2f7a4a;
  --accent-fg: #eef1ea;
  --err: #c92a2a;
  --display: "Young Serif", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a17;
    --fg: #e6ebe3;
    --muted: #96a39b;
    --card: #1d2420;
    --line: #2f3a34;
    --brand: #6cc28a;
    --brand-deep: #6cc28a;
    --brand-soft: #23382b;
    --accent: #6cc28a;
    --accent-fg: #151a17;
    --err: #ff8787;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  border-top: 4px solid var(--brand);
}
main { max-width: 600px; margin: 0 auto; padding: 32px 16px 32px; }
h1 { font: 400 30px/1.2 var(--display); margin: 0 0 8px; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-top: 16px; }
section[hidden] { display: none; }
.sub { margin: 0 0 12px; font-weight: 500; }
.hint { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.err { color: var(--err); font-size: 14px; margin: 12px 0 0; }
textarea, input, pre {
  width: 100%;
  font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
textarea { min-height: 180px; resize: vertical; }
pre { white-space: pre-wrap; word-break: break-word; margin: 0 0 12px; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 12px; }
label { color: var(--muted); font-size: 14px; }
select { font: inherit; padding: 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
  background: var(--accent); color: var(--accent-fg);
  border: 1px solid var(--accent); border-radius: 8px; padding: 10px 16px;
}
button.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
button:disabled { opacity: .5; cursor: default; }
footer { color: var(--muted); font-size: 13px; margin-top: 32px; text-align: center; }
footer p { margin: 0 0 8px; }
footer a { color: var(--brand-deep); font-weight: 600; text-decoration: none; }
footer a:hover, footer a:focus-visible { text-decoration: underline; }
.builtby {
  display: inline-block; background: var(--brand-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; margin-top: 8px !important;
}
.builtby .sep { margin: 0 4px; opacity: .5; }
.copy { font-size: 12px; margin-top: 12px !important; }
.terms { margin: 16px 0 0; text-align: left; }
.terms summary {
  cursor: pointer; text-align: center; list-style: none; color: var(--brand-deep);
  font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.terms summary::-webkit-details-marker { display: none; }
.terms summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.terms-body {
  margin-top: 12px; padding: 4px 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; font-size: 12.5px; line-height: 1.55;
}
.terms-body { max-height: 60vh; overflow-y: auto; }
.terms-body p { margin: 8px 0 12px; }
.terms-body h2 { font-size: 13px; margin: 16px 0 2px; color: var(--fg); }
.terms-body .updated { color: var(--muted); font-style: italic; margin: 12px 0 0; }
.terms-body code { font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.terms-body a { color: var(--brand-deep); }

/* Sprouts Studios brand bar */
.brandbar {
  max-width: 600px; margin: 0 auto; padding: 16px 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); text-decoration: none; }
.brand:hover .wordmark, .brand:focus-visible .wordmark { text-decoration: underline; }
.wordmark { color: var(--fg); font: 400 18px/1 var(--display); }
.wordmark b { font-weight: 400; color: var(--brand-deep); }
.tag {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--brand-deep); background: var(--brand-soft); border-radius: 999px; padding: 3px 10px;
}

/* Feedback dialog */
.linkbtn {
  background: none; border: 0; padding: 4px 8px; font: inherit; font-weight: 600; font-size: 13px;
  color: var(--brand-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.linkbtn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
dialog {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--card); color: var(--fg);
  border: 1px solid var(--line); border-radius: 12px; padding: 20px;
}
dialog::backdrop { background: rgba(21, 26, 23, .55); }
dialog h2 { font: 400 22px/1.2 var(--display); margin: 0 0 4px; }
dialog .hint { margin-top: 0; }
dialog .field { margin-top: 16px; }
dialog .label, dialog label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 14px; }
dialog .opt { opacity: .8; }
dialog .plain { font-family: inherit; }
dialog textarea.plain { min-height: 120px; }
.faces { display: flex; gap: 8px; flex-wrap: wrap; }
.faces button { padding: 8px 12px; font-size: 14px; font-weight: 500; }
.faces button[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--fg); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#fb-captcha { margin: 16px 0 0; font-size: 12px; }
#fb-captcha a { color: var(--brand-deep); }
