/* forms.ftw.pw — one narrow column, a paper "sheet" per section, read top to bottom on a phone.
   System fonts only: the edge's CSP allows nothing from another origin. */
:root {
  --bg: #fbf5f8; --sheet: #ffffff; --ink: #2a1622; --muted: #7b5f6e; --line: #ead7e1;
  --accent: #c2186b; --accent-ink: #ffffff; --ok: #1f7a4d; --bad: #b3261e; --field: #fdf9fb;
  --display: ui-serif, Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1016; --sheet: #24161f; --ink: #f6e9f0; --muted: #bfa3b2; --line: #3d2833;
    --accent: #ff5ca8; --accent-ink: #1a1016; --ok: #5fd39a; --bad: #ff8a80; --field: #2b1b25;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1016; --sheet: #24161f; --ink: #f6e9f0; --muted: #bfa3b2; --line: #3d2833;
  --accent: #ff5ca8; --accent-ink: #1a1016; --ok: #5fd39a; --bad: #ff8a80; --field: #2b1b25;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 48px;
}
main { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
header h1 { font: 400 1.9rem/1.15 var(--display); margin: 0; text-wrap: balance; }
header p { margin: .4rem 0 0; color: var(--muted); }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
section { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
section h2 { font: 400 1.25rem/1.2 var(--display); margin: 0; }
.hint { color: var(--muted); font-size: .88rem; margin: -6px 0 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } }
label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; min-width: 0; }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
textarea { min-height: 72px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.label { font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.label.ok { color: var(--ok); } .label.bad { color: var(--bad); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 500; font-size: .9rem; cursor: pointer; background: var(--field); }
.chip input { width: auto; accent-color: var(--accent); }
.stmt { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: .95rem; }
.stmt input { width: auto; margin-top: 4px; accent-color: var(--accent); flex: none; }
.sig { border: 1px dashed var(--muted); border-radius: 10px; background: #fff; touch-action: none; width: 100%; height: 150px; display: block; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
button { font: inherit; font-weight: 600; border-radius: 999px; border: 1px solid var(--line); background: var(--field); color: var(--ink); padding: 10px 16px; cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); padding: 14px 22px; font-size: 1.05rem; }
.status { font-size: .92rem; overflow-wrap: anywhere; }
.status.bad { color: var(--bad); } .status.ok { color: var(--ok); }
.thumb { max-width: 100%; max-height: 180px; border-radius: 8px; border: 1px solid var(--line); align-self: flex-start; }
.link { font: .9rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }
footer { color: var(--muted); font-size: .8rem; }
