/*
 * Shared styles for the guidelines page and the feedback form.
 * Uses only fonts already on the visitor's device: nothing is fetched from
 * third parties, so no outside service learns who visited.
 */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1d1d1b;
  --muted: #5f5e58;
  --border: #d8d5cc;
  --accent: #2f5d50;
  --accent-text: #ffffff;
  --notice-bg: #fbf1dc;
  --focus: #e0a526;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --surface: #201f1c;
    --text: #ecebe6;
    --muted: #a9a79f;
    --border: #3a3934;
    --accent: #7fb8a6;
    --accent-text: #10201b;
    --notice-bg: #2e2716;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: break-word;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 16px 64px;
}

h1 { font-size: 1.85rem; line-height: 1.2; margin: 0 0 12px; text-wrap: balance; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 14px; text-wrap: balance; }
a { color: var(--accent); }
a:focus-visible, textarea:focus, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.lede { color: var(--muted); margin: 0 0 24px; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 0 0 8px; }
.back { margin: 0 0 20px; font-size: 0.95rem; }

/* ---------- Guidelines page ---------- */
.doc header { margin-bottom: 28px; }
.doc .lede { margin-bottom: 8px; }
.meta-line { color: var(--muted); font-size: 0.9rem; margin: 0; }

.toc {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 40px;
}
.toc ol { margin: 0; padding-left: 1.4em; columns: 2 260px; column-gap: 32px; }
.toc li { margin: 0 0 4px; break-inside: avoid; }

.doc section { margin-bottom: 40px; scroll-margin-top: 16px; }
.doc section p { margin: 0 0 12px; }
.doc .intro { color: var(--muted); font-style: italic; }

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  scroll-margin-top: 16px;
}
.callout p { margin: 0 0 16px; }
.callout p:last-child { margin-bottom: 0; }

.button {
  display: inline-block;
  border-radius: 10px;
  padding: 12px 22px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}

.notice {
  background: var(--notice-bg);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 20px;
}

/* ---------- Feedback form ---------- */
label { display: block; font-weight: 600; margin-bottom: 4px; }

textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 20px;
  font-size: 0.85rem;
  color: var(--muted);
}
.meta .hint { margin: 0; }

#count { white-space: nowrap; font-variant-numeric: tabular-nums; }

button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 12px 22px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

#status { min-height: 1.5em; margin-top: 16px; }

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
