
:root {
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8fafc; --text: #0e1a26; --muted: #5a6878; --border: #dfe5ec;
  --accent: #0a6c96; --accent-hover: #085a7e; --accent-ink: #ffffff; --accent-soft: #e5f2f8;
  --ok: #0f7a47; --ok-soft: #e2f4ea; --warn: #8f5600; --warn-soft: #fcefd7; --bad: #b3261e; --bad-soft: #fbe7e5;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 26, 38, .05), 0 2px 8px rgba(15, 26, 38, .05);
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c131b; --surface: #121c26; --surface-2: #0f1821; --text: #e6edf4; --muted: #97a6b6; --border: #233243;
    --accent: #4fb3e0; --accent-hover: #74c4e8; --accent-ink: #06202d; --accent-soft: #12303f;
    --ok: #5fd39a; --ok-soft: #12301f; --warn: #f0b65a; --warn-soft: #3a2a10; --bad: #ff8a80; --bad-soft: #3b1714;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 560px; }
main.wrap { flex: 1; padding-top: 28px; padding-bottom: 48px; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.brand .logo { width: 28px; height: 28px; color: var(--accent); }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand-by { color: var(--muted); font-size: 13px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--accent); background: var(--accent-soft); }
.who { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.who-email { color: var(--muted); font-size: 14px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who form { margin: 0; }
.footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; padding: 18px 0; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; margin: 0; }
.h1 { font-size: 28px; font-weight: 700; }
.h2 { font-size: 21px; font-weight: 650; }
.h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.mb-sm { margin-bottom: 10px; }
.small { font-size: 13px; }
.text-bad { color: var(--bad); }
.mono, code { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 28px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 600; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 18px 22px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.layout-2 { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .layout-2 { grid-template-columns: minmax(0, 1fr); } }

.site-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.site-card h3 a { color: var(--text); text-decoration: none; }
.site-card h3 a:hover { color: var(--accent); }
.site-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.org-block + .org-block { margin-top: 32px; }
.org-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge-plain::before { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-block { width: 100%; }

label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 6px; }
input[type=text], input[type=email], select { width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field + .field { margin-top: 14px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.form-row { display: grid; gap: 10px; grid-template-columns: 2fr 1fr 1fr auto; align-items: end; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }

.copyfield label { font-size: 13px; color: var(--muted); font-weight: 600; }
.copyfield-row { display: flex; gap: 8px; }
.copyfield-row input { font-family: var(--mono); font-size: 13px; background: var(--surface-2); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; margin-bottom: 18px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: var(--bad-soft); color: var(--bad); }
.alert-info { background: var(--accent-soft); color: var(--text); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 22px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px 22px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }
.table select { width: auto; padding: 5px 8px; font-size: 13px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 34px; margin-top: 10px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 23px; height: 23px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
details.client { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
details.client + details.client { margin-top: 10px; }
details.client summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
details.client summary::-webkit-details-marker { display: none; }
details.client summary::after { content: "+"; color: var(--muted); font-weight: 700; }
details.client[open] summary::after { content: "-"; }
details.client .client-body { padding: 0 16px 16px; }

.activity { list-style: none; margin: 0; padding: 0; }
.activity li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.activity li:last-child { border-bottom: none; }
.caps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.caps li { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.consent-head { display: flex; gap: 14px; align-items: center; }
.consent-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.devbox { border: 1px dashed var(--warn); background: var(--warn-soft); color: var(--text); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.site-pick { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-pick label { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 500; cursor: pointer; margin: 0; }
.site-pick input { accent-color: var(--accent); }
