:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1c1f23;
  --muted: #667085;
  --border: #e4e4e0;
  --primary: #2f5bea;
  --primary-dark: #2448c0;
  --ok: #0f7b4b;
  --ok-bg: #e5f5ec;
  --info: #1d4ed8;
  --info-bg: #e6edff;
  --warn: #9a5b00;
  --warn-bg: #fff3dc;
  --danger: #c4231a;
  --danger-bg: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
h3 { font-size: 1rem; margin: 0 0 0.5rem; }
ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.main { padding-top: 2rem; padding-bottom: 4rem; }
.narrow { max-width: 640px; }
.narrow--wide { max-width: 880px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; }
.hint { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
.lead { font-size: 1.1rem; color: #344054; }
.crumbs { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.9rem; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.topbar__nav { display: flex; align-items: center; gap: 1.25rem; font-size: 0.95rem; }
.topbar__nav form { margin: 0; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand__mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--primary); color: white; font-size: 0.8rem; letter-spacing: 0.02em;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--primary); color: white; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: #c8c8c2; }
.btn--danger { background: var(--danger-bg); color: var(--danger); border-color: #f5c6c3; }
.btn--sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.btn--block { width: 100%; }

.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; border: 1px solid; }
.flash--notice { background: var(--ok-bg); color: var(--ok); border-color: #b9e3cb; }
.flash--alert { background: var(--danger-bg); color: var(--danger); border-color: #f5c6c3; }

.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.section { margin-top: 2.25rem; }
.section__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.section__header h2 { margin: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card + .card, .form + .card, .card + .form { margin-top: 1.25rem; }
.card.subtle { background: transparent; box-shadow: none; margin-top: 2rem; }
.card.callout { border-left: 4px solid var(--primary); margin-bottom: 1.5rem; }
.card--link { display: block; color: inherit; }
.card--link:hover { text-decoration: none; border-color: var(--primary); }
.card__header { display: flex; justify-content: space-between; gap: 0.5rem; align-items: flex-start; }
.card__header h2 { margin: 0; }
.notes { margin-bottom: 1rem; }
.callout-text { background: var(--info-bg); color: var(--info); padding: 0.6rem 0.9rem; border-radius: 8px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1rem 0 0; }
.stats dt { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.stats dd { margin: 0; font-weight: 600; font-size: 1.05rem; }
.stats--row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.stats--row > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1rem; min-width: 140px; }
.stats--row dd { font-size: 1.5rem; }
.stat--good dd { color: var(--ok); }
.stat--info dd { color: var(--info); }
.stat--warn dd { color: var(--warn); }

.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: #eef0f3; color: #475467; vertical-align: middle; white-space: nowrap; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }

.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 0.93rem; }
.table th, .table td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: #fafaf8; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table--compact td, .table--compact th { padding: 0.4rem 0.6rem; font-size: 0.85rem; }
.table--form td { padding: 0.5rem 0.8rem; }
.table--form td label { font-weight: 600; }
.row-actions { text-align: right; }
.scroll { overflow-x: auto; }

.form { display: grid; gap: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.93rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"],
input[type="date"], input[type="search"], select, textarea {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid #d0d5dd; border-radius: 8px; font: inherit; background: white;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(47, 91, 234, 0.25); border-color: var(--primary); }
input[type="file"] { font: inherit; }

.auth { max-width: 400px; margin: 3rem auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.auth__links { margin-top: 1.25rem; font-size: 0.9rem; text-align: center; }

.empty { text-align: center; padding: 3rem 1rem; background: var(--surface); border: 1px dashed #cfd2d6; border-radius: var(--radius); }
.empty--inline { text-align: left; padding: 1rem 1.25rem; }
.danger-zone { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.search { display: flex; gap: 0.5rem; min-width: 320px; }
.pager { display: flex; gap: 1rem; justify-content: center; margin-top: 1rem; }

.attention { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.attention li { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.alerts .card { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.alerts .card p { margin: 0.35rem 0; }
.card--read { opacity: 0.7; }
.field--check { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.field--check input { width: auto; }
.field--check .hint { flex-basis: 100%; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { font-weight: 600; margin-bottom: 0.4rem; font-size: 0.93rem; padding: 0; }
.check { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.25rem 0; font-weight: 400 !important; }
.check input { width: auto; }
.notice-fixed { margin-top: 0.5rem; }
.notice-fixed ul { margin-bottom: 0.5rem; }
.email-preview { padding: 0; overflow: hidden; }
.email-preview__headers { margin: 0; padding: 1rem 1.25rem; background: #fafaf8; border-bottom: 1px solid var(--border); display: grid; gap: 0.25rem; font-size: 0.9rem; }
.email-preview__headers div { display: grid; grid-template-columns: 90px 1fr; }
.email-preview__headers dt { color: var(--muted); }
.email-preview__headers dd { margin: 0; }
.email-preview__body { padding: 1.5rem 1.25rem; max-width: 640px; }
.evidence-log td { vertical-align: top; }
.evidence-details { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 0.75rem; margin: 0.5rem 0; font-size: 0.85rem; }
.evidence-details dt { color: var(--muted); }
.evidence-details dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.email-copy { white-space: pre-wrap; overflow-wrap: anywhere; background: #fafaf8; border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; font-size: 0.8rem; max-width: 640px; }
.steps-compact { padding-left: 1.25rem; }
.steps-compact li { margin: 0.4rem 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; background: #eef0f3; padding: 0.05rem 0.3rem; border-radius: 4px; }
.row-actions { display: flex; gap: 0.5rem; justify-content: flex-end; align-items: center; }
.row-actions form { margin: 0; }

.guide .steps { padding-left: 1.25rem; }
.guide .steps > li { margin: 2rem 0; }
.guide .steps h2 { margin-bottom: 0.4rem; }
.screenshot { margin: 0.75rem 0 0; }
.screenshot__slot {
  display: grid; place-items: center; aspect-ratio: 16 / 9; border: 2px dashed #cfd2d6; border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, #fafaf8, #fafaf8 10px, #f2f2ef 10px, #f2f2ef 20px);
  color: var(--muted); font-size: 0.9rem; text-align: center; padding: 1rem;
}
.screenshot figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.35rem; }

.facts { display: grid; gap: 0.35rem; margin: 1rem 0 1.5rem; }
.facts > div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* Backer consent page: no app chrome, readable on a phone. */
.public__main { max-width: 34rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.public__main h1 { font-size: 1.4rem; line-height: 1.3; margin: 0 0 0.5rem; }
.consent__facts { margin: 1rem 0; padding: 0; }
.consent__facts div { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.consent__facts dt { color: var(--muted); font-size: 0.8rem; }
.consent__facts dd { margin: 0; }
.consent__choices { display: grid; gap: 0.75rem; margin: 1.25rem 0; }
.consent__choices .btn { width: 100%; padding: 0.9rem 1rem; font-size: 1.05rem; }
.consent__choices form { margin: 0; }
