/* sivar-help editorial styling — CONVENTIONS §19 editorial mode.
   Self-contained (no build step, no framework). Fraunces (display) + Inter
   (body/UI), light + dark via prefers-color-scheme with a manual toggle, cool
   light surfaces. Mirrors the legal-page token approach but factored into one
   shared sheet because the three locale pages share identical chrome. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap');

:root {
  --paper: #f7f8fa;
  --surface: #ffffff;
  --ink: #181a1f;
  --ink-soft: #5b6066;
  --line: #e3e6eb;
  --accent: #1f6feb;
  --accent-soft: #eaf1fe;
  --shadow: 0 1px 3px rgba(20, 24, 31, 0.06), 0 8px 24px rgba(20, 24, 31, 0.04);
  --radius: 14px;
}

html[data-theme="dark"] {
  --paper: #0e1116;
  --surface: #161a21;
  --ink: #e7eaee;
  --ink-soft: #9aa1ab;
  --line: #262b33;
  --accent: #6ea8ff;
  --accent-soft: #19233a;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --paper: #0e1116;
    --surface: #161a21;
    --ink: #e7eaee;
    --ink-soft: #9aa1ab;
    --line: #262b33;
    --accent: #6ea8ff;
    --accent-soft: #19233a;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px 96px; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 760px; margin: 0 auto; padding: 18px 24px;
  font-size: 0.9em; color: var(--ink-soft);
}
.brand { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 1.15em; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
.controls { display: inline-flex; gap: 10px; align-items: center; }

.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-size: 12px; font-weight: 600; }
.lang-toggle a { background: var(--surface); padding: 5px 11px; color: var(--ink-soft); text-decoration: none; letter-spacing: 0.04em; }
.lang-toggle a.active { background: var(--ink); color: var(--paper); pointer-events: none; }
.lang-toggle a:not(.active):hover { background: var(--accent-soft); }

#theme-toggle {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: 999px; width: 34px; height: 28px; cursor: pointer; font-size: 14px; line-height: 1;
}
#theme-toggle:hover { background: var(--accent-soft); }

h1 { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 2.5em; letter-spacing: -0.02em; margin: 0.4em 0 0.1em; }
.lede { font-size: 1.15em; color: var(--ink-soft); margin: 0 0 1.5em; }
h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 1.5em; letter-spacing: -0.01em; margin: 2em 0 0.4em; }
h3 { font-size: 1.05em; font-weight: 600; margin: 1.4em 0 0.2em; }
a { color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
ul { padding-left: 1.3em; }
li { margin: 0.35em 0; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin: 14px 0; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 1em 0 2em; }
.toc a { font-size: 0.85em; text-decoration: none; border: 1px solid var(--line); background: var(--surface); padding: 5px 12px; border-radius: 999px; color: var(--ink-soft); }
.toc a:hover { background: var(--accent-soft); color: var(--accent); }

label { display: block; font-size: 0.85em; font-weight: 600; color: var(--ink-soft); margin: 14px 0 5px; }
input, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
textarea { resize: vertical; min-height: 120px; }
.btn {
  margin-top: 18px; background: var(--accent); color: #fff; border: 0; border-radius: 9px;
  padding: 11px 22px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: 0.6; cursor: default; }
.form-note { font-size: 0.85em; color: var(--ink-soft); margin-top: 10px; }
#form-status { margin-top: 14px; font-size: 0.92em; font-weight: 500; }
#form-status.ok { color: #1a7f37; }
#form-status.err { color: #c0392b; }
html[data-theme="dark"] #form-status.ok { color: #4ac26b; }

footer { margin-top: 3em; padding-top: 1.5em; border-top: 1px solid var(--line); font-size: 0.85em; color: var(--ink-soft); }
footer a { color: var(--ink-soft); }
