/* SpainJobs.works — one stylesheet, no framework, no build step.
   Theme tokens are defined light-first on :root and overridden under
   prefers-color-scheme, so a page renders correctly before any JS runs
   (there is barely any JS, which is the point). */

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f4f2ee;
  --ink: #16181d;
  --ink-soft: #4b5162;
  --ink-mute: #6f7686;
  --line: #e3e0d9;
  --line-soft: #efece6;
  --accent: #c8102e;          /* the red of the Spanish flag, used sparingly */
  --accent-ink: #ffffff;
  --accent-soft: #fdeef0;
  --gold: #b8860b;
  --ok: #1a7f4b;
  --ok-soft: #e7f5ed;
  --warn: #9a6b00;
  --warn-soft: #fdf3e0;
  --bad: #b3261e;
  --bad-soft: #fdedec;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1e222b;
    --ink: #e9ecf2;
    --ink-soft: #b3bac9;
    --ink-mute: #858da0;
    --line: #2a2f3a;
    --line-soft: #222630;
    --accent: #ff5c73;
    --accent-ink: #1a0508;
    --accent-soft: #2a1419;
    --gold: #d8a930;
    --ok: #56d394;
    --ok-soft: #12291e;
    --warn: #e0ae4a;
    --warn-soft: #2a2210;
    --bad: #ff8078;
    --bad-soft: #2c1614;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em;
  background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--ink-mute); }
.small { font-size: .875rem; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px;
}
.skip:focus { left: 0; }

/* ── header ───────────────────────────────────────────────────────── */
.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.head-inner { display: flex; align-items: center; gap: 20px; min-height: 62px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 1.12rem; letter-spacing: -.02em; }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--accent); color: var(--accent-ink);
  font-size: .72rem; font-weight: 800; letter-spacing: .04em;
}
.brand-text b { font-weight: 750; }
.brand-tld { color: var(--ink-mute); font-weight: 400; }
.main-nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; font-size: .94rem; }
.main-nav a { text-decoration: none; color: var(--ink-soft); padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.head-cta { white-space: nowrap; }
@media (max-width: 860px) {
  .head-inner { padding-top: 10px; padding-bottom: 10px; }
  .main-nav { order: 3; width: 100%; margin-left: 0; gap: 14px; overflow-x: auto; }
  .head-cta { margin-left: auto; }
}

/* ── buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: .94rem; font-weight: 550; text-decoration: none;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-mute); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-small { padding: 6px 12px; font-size: .875rem; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }

/* ── hero + search ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line-soft);
  padding: 48px 0 40px;
}
.hero h1 { max-width: 16ch; }
.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 62ch; }
.hero-stats { margin-top: 14px; font-size: .9rem; }

.jobsearch {
  display: flex; gap: 12px; align-items: end; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  margin: 22px 0;
}
.jobsearch .field { display: flex; flex-direction: column; gap: 5px; min-width: 150px; }
.jobsearch .field.grow { flex: 1 1 260px; }
.jobsearch label { font-size: .8rem; font-weight: 600; color: var(--ink-soft); }
.jobsearch input[type="search"], .jobsearch select {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); font: inherit; font-size: .94rem; width: 100%;
}
.jobsearch .field.check { flex-direction: row; align-items: center; gap: 7px; padding-bottom: 9px; }
.jobsearch .field.check label { font-size: .9rem; font-weight: 400; }
@media (max-width: 640px) {
  .jobsearch { padding: 14px; }
  .jobsearch .btn { width: 100%; }
}

/* ── discovery cards ──────────────────────────────────────────────── */
.disc { margin: 40px 0; }
.disc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }
.disc-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); text-decoration: none;
  transition: border-color .12s, transform .12s;
}
.disc-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.disc-name { font-weight: 600; }
.disc-meta { font-size: .84rem; color: var(--ink-mute); }
.disc-cat { background: var(--surface-2); }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.sec-head h2 { margin: 0; }
.more { font-size: .9rem; text-decoration: none; color: var(--accent); white-space: nowrap; }
.more:hover { text-decoration: underline; }

/* ── two-column layout ────────────────────────────────────────────── */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 34px; margin: 34px 0; align-items: start; }
@media (max-width: 940px) { .cols { grid-template-columns: 1fr; gap: 26px; } }
.col-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 78px; }
@media (max-width: 940px) { .col-side { position: static; } }
.side-block {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
}
.side-block h2 { font-size: 1rem; margin-bottom: .7em; }
.cta-block { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.mini-job { margin-bottom: .8em; font-size: .92rem; line-height: 1.45; }
.mini-job a { font-weight: 550; text-decoration: none; }
.mini-job a:hover { text-decoration: underline; }
.mini-job span { display: block; font-size: .84rem; }

/* ── job cards ────────────────────────────────────────────────────── */
.job-list { display: flex; flex-direction: column; gap: 10px; }
.job-card {
  display: flex; gap: 18px; justify-content: space-between; align-items: start;
  padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .12s;
}
.job-card:hover { border-color: var(--ink-mute); }
.job-card.is-featured { border-left: 3px solid var(--gold); }
.job-card-main { min-width: 0; }
.job-title { font-size: 1.05rem; margin: 0 0 3px; }
.job-title a { text-decoration: none; }
.job-title a:hover { text-decoration: underline; }
.job-org { margin: 0 0 6px; font-size: .92rem; color: var(--ink-soft); }
.job-org.big { font-size: 1rem; margin-bottom: 12px; }
.job-snip { margin: 0 0 9px; font-size: .9rem; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.job-card-side { display: flex; flex-direction: column; align-items: end; gap: 9px; text-align: right; flex-shrink: 0; }
.job-card-side time { font-size: .84rem; white-space: nowrap; }
@media (max-width: 620px) {
  .job-card { flex-direction: column; gap: 12px; }
  .job-card-side { flex-direction: row; align-items: center; width: 100%;
    justify-content: space-between; text-align: left; }
}

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 100px;
  font-size: .78rem; font-weight: 550; line-height: 1.6;
  background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line-soft);
}
.badge.pay { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.remote { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.feat { background: color-mix(in srgb, var(--gold) 15%, transparent); color: var(--gold); border-color: transparent; }
.badge.sponsor { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.demo { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.muted-badge { opacity: .75; }

/* ── page furniture ───────────────────────────────────────────────── */
.crumbs { margin: 22px 0 4px; font-size: .875rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; color: var(--ink-mute); margin-right: 6px; }
.crumbs a { color: var(--ink-mute); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs li[aria-current] { color: var(--ink-soft); }

.page-head { margin: 12px 0 24px; }
.page-head h1 { margin-bottom: .25em; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block; padding: 5px 12px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: .875rem; text-decoration: none; color: var(--ink-soft);
}
.chip:hover { border-color: var(--ink-mute); color: var(--ink); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip b { font-weight: 600; opacity: .65; margin-left: 3px; }

.cloud { margin: 28px 0; }
.cloud h2 { font-size: 1rem; }

.empty {
  padding: 34px 22px; text-align: center; border: 1px dashed var(--line);
  border-radius: var(--radius); background: var(--surface);
}

.pagination { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 28px 0; }
.pg {
  padding: 7px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-decoration: none; font-size: .9rem; background: var(--surface);
}
.pg:hover { border-color: var(--ink-mute); }
.pg.current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pg-gap { color: var(--ink-mute); padding: 0 3px; }

.notice {
  padding: 14px 16px; border-radius: var(--radius); margin: 18px 0;
  background: var(--surface-2); border: 1px solid var(--line);
}
.notice p:last-child { margin-bottom: 0; }
.notice-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }

/* ── job detail ───────────────────────────────────────────────────── */
.job-detail { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; }
@media (max-width: 620px) { .job-detail { padding: 18px; } }
.job-head { border-bottom: 1px solid var(--line-soft); padding-bottom: 18px; margin-bottom: 18px; }
.apply-row { margin: 18px 0 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn-apply { font-size: 1rem; padding: 12px 24px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 26px; margin: 0 0 26px; }
.facts > div { min-width: 0; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); margin-bottom: 2px; }
.facts dd { margin: 0; font-size: .95rem; }
.job-body h2, .provenance h2 { font-size: 1.05rem; margin-top: 1.6em; }
.provenance { border-top: 1px solid var(--line-soft); margin-top: 26px; padding-top: 6px; }
.apply-block { text-align: center; }
.apply-block .btn { width: 100%; margin-bottom: 8px; }

/* ── notes ────────────────────────────────────────────────────────── */
.notes-block { background: var(--surface-2); }
.note { position: relative; padding: 12px 12px 12px 34px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  font-size: .9rem; }
.note:last-child { margin-bottom: 0; }
.note h3 { font-size: .92rem; margin-bottom: .3em; }
.note p { margin-bottom: .4em; }
.note p:last-child { margin-bottom: 0; }
.note-pin { position: absolute; left: 11px; top: 11px; font-size: .95rem; }

/* ── guides ───────────────────────────────────────────────────────── */
.guide-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.guide-card { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.guide-card h3 { margin-bottom: .3em; }
.guide-card h3 a { text-decoration: none; }
.guide-card h3 a:hover { text-decoration: underline; }
.guide-cat { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: .5em; }
.guide-card p { font-size: .9rem; margin-bottom: .5em; }

.article { max-width: 72ch; }
.article h2 { margin-top: 1.8em; font-size: 1.15rem; }
.article ul { margin-bottom: 1.2em; }
.article p { color: var(--ink-soft); }
.article .lede { color: var(--ink); }

/* Editorial prose is stored as plain text; ALL-CAPS lines are how the seeded
   guides mark a sub-heading, so they get a little air without becoming h2s. */
.article p:first-letter { }

/* ── forms ────────────────────────────────────────────────────────── */
.contact-form { max-width: 42rem; margin-top: 1.5em; }
.contact-form .field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.contact-form label { font-size: .9rem; font-weight: 600; }
.contact-form input, .contact-form textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: .95rem;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ad-slot { margin: 28px 0; min-height: 0; }

/* ── footer ───────────────────────────────────────────────────────── */
.site-foot { margin-top: 60px; border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0 0; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1.6fr repeat(3, 1fr); }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand { font-size: 1.05rem; margin-bottom: .4em; }
.site-foot h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.site-foot ul { list-style: none; padding: 0; font-size: .92rem; }
.site-foot li { margin-bottom: .4em; }
.site-foot a { text-decoration: none; color: var(--ink-soft); }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.foot-legal { border-top: 1px solid var(--line-soft); margin-top: 30px; padding: 18px 20px; }
.foot-legal p { margin: 0; font-size: .85rem; color: var(--ink-mute); }

/* ══ admin ════════════════════════════════════════════════════════════
   Deliberately plainer than the public site: denser, more table-shaped,
   and visually distinct enough that you always know which one you are in. */
body.admin { background: var(--surface-2); }
.admin-head { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 30; }
@media (prefers-color-scheme: dark) { .admin-head { background: #05070b; } }
.admin-bar { display: flex; align-items: center; gap: 20px; padding: 0 20px; min-height: 52px; flex-wrap: wrap; }
.admin-brand { color: #fff; text-decoration: none; font-weight: 650; }
.admin-brand span { opacity: .5; font-weight: 400; }
.admin-nav { display: flex; gap: 16px; font-size: .9rem; flex-wrap: wrap; }
.admin-nav a { color: rgba(255,255,255,.68); text-decoration: none; padding: 15px 0; border-bottom: 2px solid transparent; }
.admin-nav a:hover { color: #fff; }
.admin-nav a.on { color: #fff; border-bottom-color: var(--accent); }
.admin-right { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: .875rem; }
.admin-right a { color: rgba(255,255,255,.68); text-decoration: none; }
.admin-right a:hover { color: #fff; }
.admin-alert { background: var(--warn); color: #1a1200; padding: 10px 20px; font-size: .9rem; }
.admin-alert a { color: inherit; }
.admin-flash { background: var(--ok); color: #fff; padding: 9px 20px; font-size: .9rem; }
.admin-flash.bad { background: var(--bad); }
.admin-main { max-width: 1260px; margin: 0 auto; padding: 26px 20px 70px; }
.admin-main > h1 { font-size: 1.5rem; margin-bottom: .7em; }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-bottom: 24px; }
.tile { display: flex; flex-direction: column; padding: 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.tile:hover { border-color: var(--accent); }
.tile b { font-size: 1.7rem; font-weight: 650; line-height: 1.1; }
.tile span { font-size: .84rem; color: var(--ink-mute); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px; }
.card h2 { font-size: 1.05rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.admin-cols { display: grid; grid-template-columns: 1fr 380px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .admin-cols { grid-template-columns: 1fr; } }

.grid { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
.grid thead { text-align: left; }
.grid th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-mute); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.grid tr:last-child td { border-bottom: none; }
.grid .trunc { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { white-space: nowrap; display: flex; gap: 10px; align-items: baseline; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 100px; font-size: .76rem;
  background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line-soft); }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 24px; margin: 0; }
.kv dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); }
.kv dd { margin: 0; font-size: .93rem; word-break: break-word; }

.events { list-style: none; padding: 0; font-size: .875rem; }
.events li { padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.events li:last-child { border-bottom: none; }

.tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { padding: 7px 14px; border-radius: var(--radius-sm); text-decoration: none;
  font-size: .9rem; color: var(--ink-soft); border: 1px solid transparent; }
.tab:hover { background: var(--surface); }
.tab.on { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 550; }

.admin-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.admin-actions.sticky { position: sticky; bottom: 0; background: var(--surface-2);
  padding: 12px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.linkish { background: none; border: none; padding: 0; font: inherit; font-size: .9rem;
  color: var(--accent); cursor: pointer; text-decoration: underline; }

.admin-form label { display: block; margin-bottom: 14px; font-size: .84rem; font-weight: 600; color: var(--ink-soft); }
.admin-form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: .92rem; }
.admin-form input[type="text"], .admin-form input[type="url"], .admin-form input[type="password"],
.admin-form input[type="email"], .admin-form input[type="number"], .admin-form input[type="date"],
.admin-form input:not([type]), .admin-form select, .admin-form textarea {
  display: block; width: 100%; margin-top: 5px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); font: inherit; font-size: .93rem; font-weight: 400;
}
.admin-form textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; line-height: 1.55; resize: vertical; }
.admin-form fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 16px; }
.admin-form legend { font-size: .8rem; font-weight: 600; color: var(--ink-soft); padding: 0 5px; }
.admin-form .row { display: flex; gap: 10px; }
.admin-form .checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 4px; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; align-items: end; }

.danger-zone { margin-top: 22px; padding: 16px; border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line));
  border-radius: var(--radius); background: var(--bad-soft); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.msg-body { white-space: pre-wrap; font-family: var(--font); background: var(--surface-2);
  padding: 12px; border-radius: var(--radius-sm); font-size: .92rem; margin: 0 0 12px; }

.login-page { display: grid; place-items: center; min-height: 100vh; background: var(--ink); }
.login-box { background: var(--surface); padding: 32px; border-radius: var(--radius);
  width: min(380px, 92vw); box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.login-box h1 { font-size: 1.3rem; margin-bottom: .1em; }
.login-box label { display: block; margin: 18px 0 6px; font-size: .85rem; font-weight: 600; }
.login-box input { width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit; }
.login-box .btn { width: 100%; margin-top: 18px; }
.form-error { background: var(--bad-soft); color: var(--bad); padding: 9px 12px;
  border-radius: var(--radius-sm); font-size: .9rem; margin: 14px 0 0; }

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