/* Shared look for every page.
   Direction: crisp and quiet, like a well-made dev tool. Ink-black controls, generous radius,
   one loud colour (hot pink) for brand moments, a sunny yellow for highlights. Light and dark. */
:root {
  --bg: #f7f7f9;          /* page */
  --surface: #ffffff;     /* cards, inputs */
  --sunk: #f0f0f3;        /* wells, table heads */
  --ink: #0b0b10;         /* text and primary buttons */
  --muted: #6c6c78;
  --line: #e7e7ec;
  --brand: #ff2e7e;       /* hot pink: logo, selection, charts, focus */
  --brand-ink: #ffffff;
  --brand-soft: #ffe6ef;
  --marigold: #ffc93c;    /* sunny highlight and stickers */
  --primary: #0b0b10;     /* main buttons */
  --primary-ink: #ffffff;
  --glass: rgba(247, 247, 249, .78);
  --ok: #10a36b;
  --warn: #c27a00;
  --danger: #e5245e;
  --shadow: 0 1px 2px rgba(11, 11, 16, .04), 0 8px 24px -12px rgba(11, 11, 16, .12);
  --display: "Geist", "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090c; --surface: #131318; --sunk: #0e0e12; --ink: #f4f4f7; --muted: #a1a1ad; --line: #24242c;
    --brand: #ff4d91; --brand-ink: #ffffff; --brand-soft: #3a1426; --marigold: #ffd25e;
    --primary: #f4f4f7; --primary-ink: #0b0b10; --glass: rgba(9, 9, 12, .72);
    --ok: #34d399; --warn: #f5b041; --danger: #ff6b93;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090c; --surface: #131318; --sunk: #0e0e12; --ink: #f4f4f7; --muted: #a1a1ad; --line: #24242c;
  --brand: #ff4d91; --brand-ink: #ffffff; --brand-soft: #3a1426; --marigold: #ffd25e;
  --primary: #f4f4f7; --primary-ink: #0b0b10; --glass: rgba(9, 9, 12, .72);
  --ok: #34d399; --warn: #f5b041; --danger: #ff6b93;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; }
a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--brand) 60%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; text-wrap: balance; font-weight: 650; }
code, pre, .mono { font-family: var(--mono); font-size: 0.86em; }
::selection { background: var(--brand); color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.container { max-width: 1160px; margin: 0 auto; }

.btn { font: inherit; font-size: 14px; font-weight: 550; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s, transform .1s, opacity .15s; }
.btn:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { opacity: .88; color: var(--primary-ink); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--sunk); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn.big { padding: 12px 22px; font-size: 15.5px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }

.input, select.input, textarea.input { font: inherit; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
textarea.input { resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl { font-size: 13px; font-weight: 600; }
.hint { color: var(--muted); font-size: 13px; }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; font-family: var(--mono); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--sunk); color: var(--muted); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.published { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pill.published::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.pill.closed { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.sticker { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--marigold); color: #2a1d00; transform: rotate(-2deg); }

/* Logo: a pink tile with a stacked "form" mark */
.logo { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 9px; }
.logo:hover { color: var(--ink); }
.logo i { width: 26px; height: 26px; border-radius: 8px; background: var(--brand); position: relative; display: inline-block; transform: rotate(-6deg); }
.logo i::after { content: ""; position: absolute; left: 6px; top: 7px; width: 14px; height: 2.5px; background: var(--brand-ink); border-radius: 2px; box-shadow: 0 5px 0 var(--brand-ink), -0 10px 0 var(--marigold); }

.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--primary); color: var(--primary-ink); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 100; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast.err { background: var(--danger); color: #fff; }

pre.code { background: #0d0d12; color: #e3e3ea; padding: 16px 18px; border-radius: 14px; overflow-x: auto; line-height: 1.65; margin: 0; border: 1px solid #22222a; }
pre.code .c { color: #7d7d8c; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
