/* Onboarding app stylesheet. Started from docs/onboarding-app-mockups/assets/style.css (design tokens of
   capnamic.com, read 2026-12-03). Fonts are served locally (CSP 'self'); headings use Inter until the
   Bw Gradual licence is settled (docs/onboarding-app.md §9 point 8). No inline styles anywhere: the CSP
   forbids them, so every layout detail of the mockups is a class here. */


@font-face {
  font-family: Inter;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* brand (capnamic.com) */
  --black: #000;
  --ink: #01172b;          /* text on the electric button */
  --white: #fff;
  --cream: #f9f7f2;        /* --cream on the website */
  --cream-2: #efeae5;
  --cream-mid: #e3dbd3;    /* --cream-mid on the website */
  --electric: #e6ff2b;     /* --electric on the website, primary button */
  --electric-hover: #ecff5e;
  --electric-active: #dcf523;
  --muted: #515750;
  --subtle: #999c98;
  --dark: #262926;
  /* semantic, added for the app (the website has no status colours) */
  --ok: #1d6b3a;     --ok-bg: #e3f1e5;
  --warn: #8f3b00;   --warn-bg: #fcebd9;
  --wait: #5a4a32;   --wait-bg: #efeae5;
  --err: #a8221a;    --err-bg: #fbe7e5;
  --info-bg: #f3f7f2;

  --radius: 14px;
  --radius-sm: 8px;
  --pill: 25px;
  --font-head: Inter, Arial, sans-serif;
  --font-body: Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 22px;
  color: var(--black);
  background: var(--cream);
}
a { color: inherit; }

/* ---------- app shell ---------- */
.topbar {
  height: 72px; background: var(--white);
  display: flex; align-items: center; gap: 20px;
  padding: 0 40px; border-bottom: 1px solid var(--cream-mid);
}
.topbar .logo { height: 22px; }
.topbar .app-name {
  font: 400 16px/18px var(--font-head); color: var(--muted);
  padding-left: 20px; border-left: 1px solid var(--cream-mid);
}
.topbar .spacer { flex: 1; }
.topbar .who { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.topbar .who .mail { color: var(--muted); }
.topbar .switch { font-size: 13px; padding: 6px 14px; border: 1px solid var(--black); border-radius: var(--pill); text-decoration: none; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--black); color: var(--electric);
  display: grid; place-items: center; font: 500 13px var(--font-head);
}

.page { max-width: 880px; margin: 0 auto; padding: 48px 32px 72px; }
.page.wide { max-width: 1200px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumb a { text-decoration: none; border-bottom: 1px solid var(--cream-mid); }

h1, h2, h3 { font-family: var(--font-head); font-weight: 500; margin: 0; }
h1 { font-size: 44px; line-height: 50px; letter-spacing: -1.5px; }
h2 { font-size: 28px; line-height: 34px; letter-spacing: -.9px; }
h3 { font-size: 20px; line-height: 26px; letter-spacing: -.5px; }
.lead { font-size: 17px; line-height: 25px; color: var(--black); max-width: 640px; margin: 14px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 19px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 45px; padding: 0 26px; border-radius: var(--pill);
  font: 500 13px/18px var(--font-body); text-transform: uppercase; letter-spacing: .04em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--electric); color: var(--ink); }
.btn-primary:hover { background: var(--electric-hover); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-ghost { background: transparent; color: var(--black); border-color: var(--black); }
.btn-text { background: none; border: 0; padding: 0 4px; height: auto; text-transform: none; letter-spacing: 0; font-size: 14px; border-bottom: 1px solid var(--black); border-radius: 0; }
.btn-sm { height: 34px; padding: 0 16px; font-size: 12px; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; }
.btn.is-busy { background: var(--cream-mid); color: var(--dark); cursor: progress; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  display: inline-block; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- cards ---------- */
.card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--cream-mid); padding: 24px 28px;
}
.card.flat { border-color: transparent; }
.card.dark { background: var(--black); color: var(--white); border-color: var(--black); }
.card.dark .muted { color: #b9bdb8; }

/* ---------- status chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 12px/16px var(--font-body); padding: 4px 10px 4px 8px; border-radius: var(--pill);
  white-space: nowrap;
}
.chip .i { font-size: 12px; line-height: 12px; }
.chip.open { background: transparent; border: 1px solid var(--cream-mid); color: var(--muted); }
.chip.run { background: var(--electric); color: var(--ink); }
.chip.action { background: var(--warn-bg); color: var(--warn); }
.chip.wait { background: var(--wait-bg); color: var(--wait); }
.chip.done { background: var(--ok-bg); color: var(--ok); }
.chip.na { background: transparent; border: 1px dashed var(--subtle); color: var(--subtle); }
.chip.err { background: var(--err-bg); color: var(--err); }
.chip.tag { background: var(--cream-2); color: var(--dark); }

/* ---------- task cards (E1) ---------- */
.progress-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.steps-meter { display: flex; gap: 6px; margin-top: 18px; }
.steps-meter span { height: 6px; flex: 1; border-radius: 3px; background: var(--cream-mid); }
.steps-meter span.on { background: var(--black); }
.steps-meter span.run { background: var(--electric); }
.task {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 18px; align-items: center;
  background: var(--white); border: 1px solid var(--cream-mid); border-radius: var(--radius);
  padding: 22px 24px;
}
.task + .task { margin-top: 12px; }
.task .num {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--black);
  display: grid; place-items: center; font: 500 17px var(--font-head);
}
.task.is-done .num { background: var(--black); color: var(--electric); border-color: var(--black); }
.task.is-run .num { background: var(--electric); border-color: var(--electric); }
.task.is-na { background: transparent; border-style: dashed; }
.task.is-na .num { border-style: dashed; color: var(--subtle); border-color: var(--subtle); }
.task h3 { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.task p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.task.is-action { border-color: #e9b98d; box-shadow: inset 4px 0 0 var(--warn); }

/* ---------- progress bars ---------- */
.bar { height: 10px; background: var(--cream-mid); border-radius: 5px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--black); border-radius: 5px; position: relative; }
.bar > i::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 18px;
  background: var(--electric); border-radius: 0 5px 5px 0;
}
.bar.thin { height: 6px; }
.bar.done > i::after { display: none; }

/* ---------- forms ---------- */
label.field { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.req::after { content: " *"; color: var(--warn); }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 16px;
  font: 400 15px var(--font-body); color: var(--black);
  background: var(--white); border: 1px solid var(--cream-mid); border-radius: var(--radius-sm);
}
textarea.input { height: 84px; padding: 12px 16px; resize: vertical; }
.input:focus, .input.focus { outline: 2px solid var(--black); outline-offset: 1px; }
.input.mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: .1em; }
.input.invalid { border-color: var(--warn); background: #fffaf5; }
.input-row { display: flex; gap: 12px; }
.input-row .input { flex: 1; }

.seg { display: inline-flex; border: 1px solid var(--black); border-radius: var(--pill); overflow: hidden; }
.seg button {
  font: 500 13px var(--font-body); padding: 8px 16px; background: var(--white);
  border: 0; border-right: 1px solid var(--black); cursor: pointer; color: var(--black);
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--black); color: var(--white); }
.seg button.on.migrate { background: var(--black); color: var(--electric); }
.seg.sm button { padding: 6px 12px; font-size: 12px; }
.seg.wide button { padding: 10px 22px; }

.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pills span {
  padding: 8px 14px; border: 1px solid var(--cream-mid); border-radius: var(--pill);
  background: var(--white); font-size: 14px;
}
.radio-pills span.on { border-color: var(--black); background: var(--black); color: var(--white); }
.radio-pills span.on::before { content: "● "; color: var(--electric); }

.save { font-size: 12px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.save.ok::before { content: "✓"; color: var(--ok); font-weight: 600; }
.save.fail { color: var(--err); }

/* ---------- check list (busy states) ---------- */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; gap: 12px; align-items: center; padding: 8px 0; font-size: 15px; }
.checks .s { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; flex: none; }
.checks .ok .s { background: var(--black); color: var(--electric); }
.checks .run .s { color: var(--black); }
.checks .todo { color: var(--subtle); }
.checks .todo .s { border: 1px solid var(--cream-mid); }

/* ---------- alerts ---------- */
.alert {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px;
  padding: 18px 20px; border-radius: var(--radius-sm);
  background: var(--white); border: 1px solid var(--cream-mid);
}
.alert .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.alert.ok { background: var(--ok-bg); border-color: transparent; }
.alert.ok .ic { background: var(--ok); color: #fff; }
.alert.action { background: var(--warn-bg); border-color: transparent; }
.alert.action .ic { background: var(--warn); color: #fff; }
.alert.wait { background: var(--wait-bg); border-color: transparent; }
.alert.wait .ic { background: var(--wait); color: #fff; }
.alert.err { background: var(--err-bg); border-color: transparent; }
.alert.err .ic { background: var(--err); color: #fff; }
.alert.info { background: var(--info-bg); border-color: transparent; }
.alert.info .ic { background: var(--black); color: var(--electric); }
.alert strong { display: block; margin-bottom: 2px; }
.alert p { margin: 0; }
.alert .row { margin-top: 12px; }

.variants { display: grid; gap: 12px; }
.variant-label { font: 600 11px/14px var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 0 -4px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border: 1px solid var(--cream-mid); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.table th { text-align: left; font: 500 12px/16px var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 14px; background: var(--cream); border-bottom: 1px solid var(--cream-mid); white-space: nowrap; }
.table td { padding: 14px; border-bottom: 1px solid var(--cream-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.hl td { background: #fffdf0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td .chip { white-space: normal; }
.table td .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.icons { display: flex; gap: 6px; }
.icons span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.icons .done { background: var(--ok-bg); color: var(--ok); }
.icons .run { background: var(--electric); color: var(--ink); }
.icons .action { background: var(--warn-bg); color: var(--warn); }
.icons .wait { background: var(--wait-bg); color: var(--wait); }
.icons .open { border: 1px solid var(--cream-mid); color: var(--subtle); }
.icons .na { border: 1px dashed var(--subtle); color: var(--subtle); }

/* ---------- list review rows (E5) ---------- */
.lrow {
  background: var(--white); border: 1px solid var(--cream-mid); border-radius: var(--radius);
  padding: 18px 22px; display: grid; grid-template-columns: 1fr auto; gap: 10px 24px;
}
.lrow + .lrow { margin-top: 10px; }
.lrow .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.lrow .meta b { color: var(--black); font-weight: 500; }
.lrow .decide { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lrow .comment { grid-column: 1 / -1; }
.lrow.pending { opacity: .55; }
.lrow.is-open { box-shadow: inset 4px 0 0 var(--electric); }

/* ---------- admin shell ---------- */
.admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 760px; }
.side { background: var(--black); color: #fff; padding: 28px 0; display: flex; flex-direction: column; }
.side .logo { height: 18px; margin: 0 28px 6px; }
.side .tag { margin: 0 28px 28px; font: 400 13px var(--font-head); color: #b9bdb8; }
.side a { display: flex; justify-content: space-between; align-items: center; padding: 11px 28px; text-decoration: none; color: #d8dbd7; font-size: 14px; border-left: 3px solid transparent; }
.side a.on { color: #fff; border-left-color: var(--electric); background: #151715; }
.side a .count { font-size: 11px; background: var(--electric); color: var(--ink); border-radius: var(--pill); padding: 1px 8px; font-weight: 600; }
.side .sep { height: 1px; background: #2c302c; margin: 18px 28px; }
.side .foot { margin-top: auto; padding: 0 28px; font-size: 12px; color: #8c918b; }
.main { padding: 36px 40px 56px; background: var(--cream); min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0; }
.kpi { background: var(--white); border: 1px solid var(--cream-mid); border-radius: var(--radius); padding: 18px 20px; }
.kpi .v { font: 500 34px/38px var(--font-head); letter-spacing: -1px; }
.kpi .l { font-size: 13px; color: var(--muted); margin-top: 4px; }
.kpi.accent { background: var(--black); color: #fff; border-color: var(--black); }
.kpi.accent .v { color: var(--electric); }
.kpi.accent .l { color: #b9bdb8; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .f { padding: 7px 14px; border-radius: var(--pill); border: 1px solid var(--cream-mid); background: var(--white); font-size: 13px; }
.filters .f.on { background: var(--black); color: #fff; border-color: var(--black); }
.filters .search { margin-left: auto; width: 260px; height: 36px; font-size: 13px; }
.banner { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 20px; border-radius: var(--radius); background: var(--electric); color: var(--ink); margin-bottom: 18px; }
.banner.closed { background: var(--black); color: #fff; }

/* ---------- dialog ---------- */
.scrim { background: rgba(0,0,0,.45); padding: 80px 0; display: grid; place-items: center; }
.dialog { width: 520px; background: var(--white); border-radius: var(--radius); padding: 28px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.dialog .actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }

/* ---------- hero (E0) ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 620px; }
.hero .l { padding: 80px 64px; background: var(--white); }
.hero .r { background: var(--black); color: #fff; padding: 80px 56px; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-size: 64px; line-height: 70px; letter-spacing: -2.3px; }
.hero h1 em { font-style: normal; background: var(--electric); padding: 0 8px; }
.google { display: inline-flex; gap: 12px; align-items: center; height: 52px; padding: 0 28px; border-radius: var(--pill); background: var(--electric); color: var(--ink); font: 500 14px var(--font-body); text-transform: uppercase; letter-spacing: .04em; text-decoration: none; }
.google .g { width: 22px; height: 22px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 700 13px Arial; color: #4285f4; }
.olist { list-style: none; counter-reset: o; padding: 0; margin: 0; }
.olist li { counter-increment: o; display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid #2c302c; }
.olist li::before { content: counter(o); width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--electric); color: var(--electric); display: grid; place-items: center; font: 500 14px var(--font-head); }
.olist li:last-child { border-bottom: 0; }
.olist b { font-weight: 500; display: block; font-family: var(--font-head); font-size: 17px; }
.olist span { color: #b9bdb8; font-size: 14px; }

/* ---------- system pages ---------- */
.sys { min-height: 420px; display: grid; place-items: center; text-align: center; padding: 48px; }
.sys .badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 22px; font: 500 26px var(--font-head); }
.sys p { max-width: 460px; margin: 12px auto 0; }
.ref { font-family: ui-monospace, Menlo, monospace; background: var(--cream-2); padding: 2px 8px; border-radius: 4px; }

/* ---------- misc ---------- */
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 20px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.steps-howto { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.steps-howto li { counter-increment: s; background: var(--cream); border-radius: var(--radius-sm); padding: 14px; font-size: 13px; line-height: 18px; }
.steps-howto li::before { content: counter(s); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--black); color: var(--electric); font: 500 12px var(--font-head); margin-bottom: 10px; }
.shot { height: 70px; border-radius: 6px; margin-top: 10px; background: repeating-linear-gradient(135deg, #e9e4dc 0 8px, #f1ede6 8px 16px); display: grid; place-items: center; color: var(--subtle); font-size: 11px; }
.legend { background: var(--cream-2); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; }
.divider { height: 1px; background: var(--cream-mid); margin: 28px 0; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.footer-app { text-align: center; font-size: 12px; color: var(--subtle); padding: 20px; }
.footer-app a { color: var(--muted); }

/* phone layout: real breakpoint plus a scoped copy for the phone frames in the mockups */
@media (max-width: 640px) {
  .topbar { padding: 0 16px; height: 60px; }
  .topbar .app-name, .topbar .who .mail { display: none; }
  .page { padding: 28px 16px 48px; }
  h1 { font-size: 32px; line-height: 38px; }
  .task { grid-template-columns: 36px 1fr; padding: 16px; }
  .task > .btn { grid-column: 2; justify-self: start; }
}

/* ======================================================================================
   App additions: classes for what the mockups did with inline styles, plus real form
   controls behind the pill and segment designs.
   ====================================================================================== */
.m-0 { margin: 0; }
.mb-16 { margin-bottom: 16px; }
.ml-auto { margin-left: auto; }
.center { justify-content: center; }
.text-center { text-align: center; }
.text-white { color: #fff; }
.text-black { color: var(--black); }
.text-warn { color: var(--warn); }
.text-light { color: #d8dbd7; }
.nowrap { white-space: nowrap; }
.minw-0 { min-width: 0; }
.maxw-420 { max-width: 420px; }
.maxw-520 { max-width: 520px; }
.w-full { width: 100%; }
.w-240 { width: 240px; }
.gap-8 { gap: 8px; }
.align-end { align-items: flex-end; }
.bg-cream2 { background: var(--cream-2); }
.inline-form { display: inline; }
.plain-link { text-decoration: none; }
.plain-link:hover { text-decoration: underline; }
.plain-ol { margin: 10px 0 0; padding-left: 18px; line-height: 22px; }
.plain-ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.link-electric { color: var(--electric); }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.btn-dashed { border-style: dashed; }
.btn-quiet { border-color: var(--cream-mid); color: var(--muted); }
.btn-danger { color: var(--err); border-color: var(--err); }
.btn-on-dark { color: #fff; border-color: #fff; }
.btn-logout { font-size: 13px; color: var(--muted); border-color: var(--cream-mid); }
.logo-link { display: inline-flex; }
.topbar .switch { color: var(--black); }
.side .logo { align-self: flex-start; }
.side-form { margin: 0; }
.side-button { display: block; width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid transparent; padding: 11px 28px; color: #d8dbd7; font: 400 14px var(--font-body); cursor: pointer; }
.side-button:hover { color: #fff; }
.h1-admin { font-size: 36px; line-height: 42px; }
.h2-admin { font-size: 22px; line-height: 28px; }
.h2-lg { font-size: 28px; }
.counter { text-align: right; min-width: 160px; }
.counter-v { font: 500 34px/38px var(--font-head); letter-spacing: -1px; }
.spinner-sm { width: 10px; height: 10px; }
.key-mask { font-size: 18px; letter-spacing: .15em; }
.divider-tight { margin: 20px 0; }
.center-card { text-align: center; padding: 40px; }
.done-badge { width: 72px; height: 72px; border-radius: 50%; background: var(--electric); display: grid; place-items: center; font: 500 32px var(--font-head); }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.card-compact { padding: 18px 24px; }
.card-edit { border-color: var(--black); }
.card-warn { border-color: #e9b98d; }
.card-err { border-color: var(--err); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.card.grid-2 { gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.kv-narrow { grid-template-columns: 130px 1fr; }
.page-review { max-width: 1000px; }
.bar-dark { background: #2c302c; }
.bar-dark > i { background: #fff; }
.bar-err > i { background: var(--err); }
.bar-err > i::after { display: none; }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-wait { background: var(--cream-2); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-dark { background: var(--black); color: var(--electric); }
.icons .err { background: var(--err-bg); color: var(--err); }
.muted-row td { color: var(--muted); }
.mail-preview { background: var(--cream); font-size: 14px; }
.mail-text { white-space: pre-wrap; font: 400 14px/20px var(--font-body); margin-bottom: 0; }
.input-multi { height: auto; min-height: 96px; padding: 8px 12px; }
.checks .fail .s { background: var(--warn); color: #fff; }
.key-check .checks li { font-size: 15px; }
.decide-admin { margin-top: 6px; }
.decide-admin summary { list-style: none; display: inline-block; cursor: pointer; }
.decide-admin summary::-webkit-details-marker { display: none; }
.decide-admin[open] { background: #fffdf0; border-radius: var(--radius-sm); padding: 8px 10px 12px; min-width: 300px; }
.decision-cell .sub { max-width: 260px; }

/* Real radio inputs behind the pill design (§4.5 single choice as pills) */
.radio-pills label { position: relative; cursor: pointer; }
.radio-pills input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-pills label span { display: inline-block; padding: 8px 14px; border: 1px solid var(--cream-mid); border-radius: var(--pill); background: var(--white); font-size: 14px; }
.radio-pills label:has(input:checked) span { border-color: var(--black); background: var(--black); color: var(--white); }
.radio-pills label:has(input:checked) span::before { content: "● "; color: var(--electric); }
.radio-pills label:has(input:focus-visible) span { outline: 2px solid var(--black); outline-offset: 2px; }
.radio-pills.invalid { outline: 1px dashed var(--warn); outline-offset: 6px; border-radius: 6px; }
.radio-sm label span { padding: 5px 10px; font-size: 12px; }
form.seg { margin: 0; }
.seg button[disabled] { color: var(--subtle); cursor: not-allowed; }
.seg button:focus-visible { outline: 2px solid var(--electric); outline-offset: -4px; }

/* Native dialog element (htmx loads the content, app.js opens it) */
dialog.dialog { border: 0; padding: 28px 30px; width: min(520px, calc(100vw - 32px)); }
dialog.dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog.dialog:not([open]) { display: none; }

/* htmx indicator styles (htmx's own inline styles are switched off for the CSP) */
.htmx-indicator { opacity: 0; transition: opacity 200ms ease-in; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* Determinate progress bars without inline styles */
.bar > i.w-0{width:0%} .bar > i.w-2{width:2%} .bar > i.w-4{width:4%} .bar > i.w-6{width:6%} .bar > i.w-8{width:8%} .bar > i.w-10{width:10%} .bar > i.w-12{width:12%} .bar > i.w-14{width:14%} .bar > i.w-16{width:16%} .bar > i.w-18{width:18%} .bar > i.w-20{width:20%} .bar > i.w-22{width:22%} .bar > i.w-24{width:24%} .bar > i.w-26{width:26%} .bar > i.w-28{width:28%} .bar > i.w-30{width:30%} .bar > i.w-32{width:32%} .bar > i.w-34{width:34%} .bar > i.w-36{width:36%} .bar > i.w-38{width:38%} .bar > i.w-40{width:40%} .bar > i.w-42{width:42%} .bar > i.w-44{width:44%} .bar > i.w-46{width:46%} .bar > i.w-48{width:48%} .bar > i.w-50{width:50%} .bar > i.w-52{width:52%} .bar > i.w-54{width:54%} .bar > i.w-56{width:56%} .bar > i.w-58{width:58%} .bar > i.w-60{width:60%} .bar > i.w-62{width:62%} .bar > i.w-64{width:64%} .bar > i.w-66{width:66%} .bar > i.w-68{width:68%} .bar > i.w-70{width:70%} .bar > i.w-72{width:72%} .bar > i.w-74{width:74%} .bar > i.w-76{width:76%} .bar > i.w-78{width:78%} .bar > i.w-80{width:80%} .bar > i.w-82{width:82%} .bar > i.w-84{width:84%} .bar > i.w-86{width:86%} .bar > i.w-88{width:88%} .bar > i.w-90{width:90%} .bar > i.w-92{width:92%} .bar > i.w-94{width:94%} .bar > i.w-96{width:96%} .bar > i.w-98{width:98%} .bar > i.w-100{width:100%}

@media (max-width: 900px) {
  .grid-2, .card.grid-2, .form-grid { grid-template-columns: 1fr; }
  .grid-4, .kpis { grid-template-columns: 1fr 1fr; }
  .steps-howto { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero .l, .hero .r { padding: 40px 24px; }
  .hero h1 { font-size: 40px; line-height: 46px; }
  .admin { grid-template-columns: 1fr; }
  .side { padding: 16px 0; }
  .main { padding: 24px 16px 40px; }
  .table { display: block; overflow-x: auto; }
  .lrow { grid-template-columns: 1fr; }
  .lrow .decide { align-items: flex-start; }
}
@media (max-width: 640px) {
  .topbar .btn-logout { display: none; }
  .counter { min-width: 0; }
  .input-row { flex-direction: column; }
}
.filters a.f { text-decoration: none; }
