/* Quickvee Outreach: "Clean" design
   Light canvas, white rounded cards with soft shadows, coloured icon tiles, one blue accent.
   Type: Manrope, self-hosted. Sidebar on wide screens; header plus bottom tab bar on phones. */

@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/static/fonts/manrope-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --bg: #f5f6fa; --card: #ffffff;
  --ink: #12162b; --ink-2: #4f5674; --ink-3: #7b83a0;
  --line: #e9ecf3; --line-2: #f1f3f8; --field: #f5f6fa;
  --brand: #2f54eb; --brand-dark: #2343c9; --brand-tint: #e8edff;
  --amber: #b45f04; --amber-tint: #fff1d6;
  --green: #0a7f55; --green-tint: #dcf7ea;
  --rose: #cf1743; --rose-tint: #ffe4e9;
  --violet: #6d3bd6; --violet-tint: #efe8ff;
  --slate-tint: #eef0f6;
  --shadow: 0 6px 20px rgba(18, 22, 43, 0.055);
  --shadow-lg: 0 16px 40px rgba(18, 22, 43, 0.12);
  --r-lg: 22px; --r: 16px; --r-sm: 12px;
  --side: 256px;
  --font: "Manrope", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 500 15px/1.55 var(--font); color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 17px; line-height: 1.3; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
b, strong { font-weight: 700; }
.icon { flex: none; vertical-align: -4px; }
:focus-visible { outline: 3px solid #9fb2ff; outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 16px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 800; font-size: 17px; letter-spacing: -0.01em; padding: 2px 8px 22px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(140deg, #4a6cff, #2343c9); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; flex: none; box-shadow: 0 6px 14px rgba(47, 84, 235, 0.32); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; color: var(--ink-2); font-weight: 700; }
.nav a:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--brand-tint); color: var(--brand); }
.nav .count { margin-left: auto; background: var(--brand); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 800; padding: 0 8px; line-height: 21px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; }
.me { display: flex; align-items: center; gap: 10px; padding: 0 6px 10px; min-width: 0; }
.me .who { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; background: none; color: var(--ink-2); font: 700 15px var(--font); cursor: pointer; text-align: left; }
.side-foot button:hover { background: var(--line-2); color: var(--ink); }

.topbar, .tabbar { display: none; }
main { margin-left: var(--side); padding: 34px 40px 56px; max-width: calc(var(--side) + 1200px); }
body.bare { display: grid; min-height: 100vh; place-items: center; background: radial-gradient(900px 500px at 50% -10%, #dfe6ff 0%, var(--bg) 60%); }
body.bare main { margin: 0; width: 100%; max-width: 440px; padding: 28px 20px; }
body.bare .card { padding: 28px; box-shadow: var(--shadow-lg); }

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pagehead .sub { color: var(--ink-3); margin: 5px 0 0; }
.pagehead .tools { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border-radius: var(--r-lg); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.grid > *, .dash > *, .cols2 > * { min-width: 0; }
.grid > .card, .col > .card:last-child { margin-bottom: 0; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.col { min-width: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.empty { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty .ic { margin: 0 auto 12px; }
.empty b { display: block; color: var(--ink); font-size: 17px; font-weight: 800; margin-bottom: 4px; }

/* icon tiles and avatars */
.ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--brand-tint); color: var(--brand); }
.ic.amber { background: var(--amber-tint); color: var(--amber); }
.ic.green { background: var(--green-tint); color: var(--green); }
.ic.rose { background: var(--rose-tint); color: var(--rose); }
.ic.violet { background: var(--violet-tint); color: var(--violet); }
.ic.slate { background: var(--slate-tint); color: var(--ink-2); }
.avatar { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 16px; }
.avatar.round { border-radius: 50%; background: var(--ink); color: #fff; }
.av1 { background: var(--brand-tint); color: var(--brand); } .av2 { background: var(--amber-tint); color: var(--amber); }
.av3 { background: var(--green-tint); color: var(--green); } .av4 { background: var(--rose-tint); color: var(--rose); }
.av5 { background: var(--violet-tint); color: var(--violet); } .av6 { background: #dff3fb; color: #0a6a8f; }

/* ---------- dashboard ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.hello .date { color: var(--ink-3); font-size: 14px; }
.dash { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dash > .card { margin: 0; }
.hero { display: flex; gap: 22px; align-items: center; }
.ring { position: relative; width: 116px; height: 116px; flex: none; }
.ring svg { display: block; width: 100%; height: 100%; }
.ring span { position: absolute; inset: 0; display: grid; place-content: center; font-size: 12px; font-weight: 700; color: var(--ink-3); text-align: center; line-height: 1.25; }
.ring span b { display: block; font-size: 22px; font-weight: 800; color: var(--ink); }
.hero .big { font-size: 60px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; color: var(--brand); }
.hero .cap { color: var(--ink-3); margin: 6px 0 14px; }
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-content: stretch; }
.stat { background: var(--card); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); color: var(--ink); display: block; transition: transform 0.12s, box-shadow 0.12s; }
.stat:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(18, 22, 43, 0.09); }
.stat b { display: block; font-size: 28px; line-height: 1.1; font-weight: 800; margin-top: 12px; letter-spacing: -0.02em; }
.stat span { color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 44px; gap: 12px; align-items: center; color: var(--ink-2); }
.bar a { color: var(--ink-2); font-weight: 600; }
.bar .track { height: 10px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 99px; background: var(--brand); min-width: 6px; }
.bar b { text-align: right; color: var(--ink); font-weight: 800; }
.fill.amber { background: #f59e0b; } .fill.green { background: #10b981; } .fill.rose { background: #f43f5e; } .fill.slate { background: #a3abc0; } .fill.violet { background: #8b5cf6; }
.nextup { display: flex; align-items: center; gap: 14px; }
.nextup .t { min-width: 0; flex: 1; }
.nextup .t b { display: block; font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nextup .t span { color: var(--ink-3); font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list { display: grid; }
.list { min-width: 0; }
.list > * { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); color: var(--ink); min-width: 0; }
.list > *:first-child { border-top: 0; padding-top: 0; }
.list > *:last-child { padding-bottom: 0; }
.list .t { flex: 1; min-width: 0; }
.list .t b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .t span { color: var(--ink-3); font-size: 13px; font-weight: 500; }
.list .end { color: var(--ink-3); font-size: 13px; font-weight: 600; white-space: nowrap; }
.list .avatar, .list .ic { width: 36px; height: 36px; border-radius: 12px; font-size: 14px; }
a.list-row:hover { text-decoration: none; }
a.list-row:hover .t b { color: var(--brand); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfe; }
th { font-size: 13px; font-weight: 700; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; padding-top: 16px; }
table.plain td { padding: 9px 0; }
table.plain tr:hover td { background: none; }
table.plain td:last-child { text-align: right; }
table.kv td:first-child { color: var(--ink-3); width: 42%; }
td .co { display: flex; align-items: center; gap: 12px; min-width: 0; }
td .co .avatar { width: 36px; height: 36px; border-radius: 12px; font-size: 14px; }
td .co a { color: var(--ink); font-weight: 700; }
td .co small { display: block; color: var(--ink-3); font-weight: 500; font-size: 13px; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--slate-tint); color: var(--ink-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pill.hot { background: var(--amber-tint); color: var(--amber); }
.pill.ok { background: var(--green-tint); color: var(--green); }
.pill.bad { background: var(--rose-tint); color: var(--rose); }
.pill.brand { background: var(--brand-tint); color: var(--brand); }
.pills, .statline { display: flex; flex-wrap: wrap; gap: 6px; }
.statline { margin-bottom: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #c3c9d9; flex: none; margin: 0 4px; }
.dot.on { background: #10b981; box-shadow: 0 0 0 4px var(--green-tint); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: 700 15px/1.2 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background 0.12s, box-shadow 0.12s, transform 0.06s; }
.btn:hover { background: var(--line-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(47, 84, 235, 0.28); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.danger { color: var(--rose); }
.btn.danger:hover { background: var(--rose-tint); border-color: #ffc9d4; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.busy { opacity: 0.5; cursor: not-allowed; pointer-events: none; box-shadow: none; }
.seg { display: inline-flex; background: var(--card); border-radius: 14px; padding: 4px; box-shadow: var(--shadow); }
.seg a { padding: 8px 16px; border-radius: 11px; color: var(--ink-2); font-weight: 700; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg a.on { background: var(--ink); color: #fff; }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--brand); font: 700 14px var(--font); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- forms ---------- */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=file], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: 500 15px/1.4 var(--font);
}
select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234f5674' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
input[type=file] { padding: 9px 12px; }
textarea { resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #9aa1b8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
label { display: block; font-size: 14px; font-weight: 700; color: var(--ink-2); }
label > input, label > select, label > textarea { margin-top: 6px; }
.stack > * + * { margin-top: 16px; }
.stack > p { margin-bottom: 0; }
.stack > input[type=hidden] + * { margin-top: 0; }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; color: var(--ink); font-size: 15px; cursor: pointer; }
label.check input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; min-height: 0; margin: 0; padding: 0; flex: none; border: 0; border-radius: 99px; background: #cfd4e2; position: relative; cursor: pointer; transition: background 0.15s; box-shadow: none; }
label.check input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(18, 22, 43, 0.25); transition: transform 0.15s; }
label.check input:checked { background: var(--brand); }
label.check input:checked::after { transform: translateX(18px); }
label.check input:focus-visible { outline: 3px solid #9fb2ff; outline-offset: 2px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters input[name=q] { flex: 1 1 260px; width: auto; }
.filters select { width: auto; flex: 0 1 auto; }
.hint { font-size: 13px; color: var(--ink-3); font-weight: 500; }

/* ---------- messages ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; background: var(--green-tint); color: var(--green); border-radius: var(--r); padding: 13px 16px; margin-bottom: 16px; font-weight: 700; }
.flash.err { background: var(--rose-tint); color: var(--rose); }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--brand-tint); color: var(--brand-dark); border-radius: var(--r); padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.note { background: var(--amber-tint); color: #7d4303; border-radius: var(--r-sm); padding: 10px 14px; margin: 12px 0 0; font-size: 14px; font-weight: 600; }

/* ---------- an email, as it will be sent ---------- */
.mail { padding: 0; overflow: hidden; }
.mail-head { display: flex; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; align-items: center; padding: 18px 22px 14px; }
.mail-head .who { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 260px; }
.mail-head .who .t { min-width: 0; }
.mail-head .who .t a, .mail-head .who .t > b { font-weight: 800; color: var(--ink); font-size: 17px; letter-spacing: -0.01em; display: block; overflow-wrap: anywhere; }
.mail-head .who .t small { color: var(--ink-3); font-size: 13px; font-weight: 500; display: block; }
.mail-body { margin: 0 22px; padding: 4px 16px; background: var(--field); border-radius: var(--r); }
.mrow { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mrow.top { align-items: start; }
.mail-body > :last-child { border-bottom: 0; }
.mrow > .k { color: var(--ink-3); font-size: 13px; font-weight: 700; }
.mrow > .v { overflow-wrap: anywhere; min-width: 0; }
.mrow > .v.strong { font-weight: 700; }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 500 15px/1.6 var(--font); }
.mail-foot { padding: 16px 22px 20px; }
.mail-foot form { display: inline; }
.mail > .note { margin: 12px 22px 0; }
details.more { margin-top: 6px; }
details.more > summary { cursor: pointer; color: var(--ink-3); font-weight: 700; font-size: 14px; list-style: none; display: inline-block; padding: 10px 0; }
details.more > summary:hover { color: var(--brand); }
details.more > summary::-webkit-details-marker { display: none; }
.outcomes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding-top: 4px; }
.outcomes form { display: flex; gap: 8px; }
.outcomes input { min-width: 0; }
details.fold { border-bottom: 1px solid var(--line); }
details.fold > summary { cursor: pointer; font-weight: 700; padding: 13px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ""; width: 8px; height: 8px; border-right: 2.4px solid var(--ink-3); border-bottom: 2.4px solid var(--ink-3); transform: rotate(-45deg); transition: transform 0.15s; flex: none; margin: 0 6px 0 2px; }
details.fold[open] > summary::before { transform: rotate(45deg); }
details.fold > pre { margin: 0 0 16px; color: var(--ink-2); }
.card > details.fold:last-of-type { border-bottom: 0; }

/* ---------- small things ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border-radius: 20px; padding: 16px 18px; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.tile span { color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.tile.strong { background: var(--brand); color: #fff; box-shadow: 0 12px 26px rgba(47, 84, 235, 0.3); }
.tile.strong span { color: #dbe3ff; }
.err-text { color: var(--rose); }
.only-phone { display: none; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- phones and small tablets ---------- */
@media (max-width: 1080px) { .dash { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .side { display: none; }
  main { margin-left: 0; padding: 14px 16px calc(104px + env(safe-area-inset-bottom)); max-width: none; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: rgba(245, 246, 250, 0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
  .topbar .brand { padding: 0; font-size: 16px; flex: 1; min-width: 0; }
  .topbar .brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 16px; }
  .topbar details { position: relative; }
  .topbar summary { list-style: none; cursor: pointer; display: block; border-radius: 50%; }
  .topbar summary::-webkit-details-marker { display: none; }
  .topbar .menu { position: absolute; right: 0; top: 52px; width: 244px; background: var(--card); border-radius: 20px; padding: 8px; box-shadow: var(--shadow-lg); }
  .topbar .menu a, .topbar .menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; background: none; color: var(--ink); font: 700 15px var(--font); border-radius: 12px; text-align: left; cursor: pointer; }
  .topbar .menu a:hover, .topbar .menu button:hover { background: var(--line-2); text-decoration: none; }
  .topbar .menu .who { padding: 10px 12px; font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--line-2); margin-bottom: 6px; overflow-wrap: anywhere; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(18, 22, 43, 0.05); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: #8088a2; font-size: 11.5px; font-weight: 700; border-radius: 12px; position: relative; min-width: 0; min-height: 50px; justify-content: center; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.on { color: var(--brand); }
  .tabbar .count { position: absolute; top: 0; left: calc(50% + 5px); background: var(--rose); color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 800; padding: 0 5px; line-height: 17px; min-width: 17px; text-align: center; border: 2px solid var(--card); box-sizing: content-box; }
  h1 { font-size: 24px; }
  .pagehead { margin-bottom: 16px; align-items: flex-start; }
  .card { padding: 18px; border-radius: 20px; }
  .hero { gap: 16px; }
  .ring { width: 96px; height: 96px; }
  .hero .big { font-size: 52px; }
  .stat { padding: 14px; border-radius: 18px; }
  .stat b { font-size: 24px; }
  .bar { grid-template-columns: 112px minmax(0, 1fr) 36px; gap: 10px; font-size: 14px; }
  .grid, .grid.two, .cols2 { grid-template-columns: 1fr; }
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]), select, textarea { min-height: 48px; font-size: 16px; }
  .mail-head { padding: 16px 18px 12px; }
  .mail-body { margin: 0 14px; padding: 2px 14px; }
  .mail-foot { padding: 14px 18px 18px; }
  .mail > .note { margin: 12px 14px 0; }
  .mrow, .mrow.top { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
  .mrow > .k { grid-column: 1; grid-row: 1; }
  .mrow > .btn, .mrow > span:last-child { grid-column: 2; grid-row: 1; }
  .mrow > .v { grid-column: 1 / -1; grid-row: 2; }
  .mail-foot .btnrow .btn { flex: 1 1 150px; }
  .outcomes { grid-template-columns: 1fr; }
  .filters > * { flex: 1 1 100%; }
  .filters select, .filters input[name=q] { width: 100%; }
  .filters .btn { flex: 1 1 auto; }
  .seg { display: flex; width: 100%; }
  .seg a { flex: 1; text-align: center; padding: 10px 8px; min-height: 40px; }
  .pagehead .tools { width: 100%; }
  th.wide, td.wide { display: none; }
  th, td { padding: 12px 14px; }
  td .pill { white-space: normal; }
  .only-phone { display: block !important; }
  .fields { grid-template-columns: 1fr 1fr; }
  table.rows, table.rows tbody { display: block; }
  table.rows thead { display: none; }
  table.rows td.wide { display: none; }
  table.rows tr { display: block; padding: 4px 0; border-bottom: 1px solid var(--line-2); }
  table.rows tr:last-child { border-bottom: 0; }
  table.rows td:not(.wide) { display: block; border: 0; padding: 4px 16px; }
  table.rows td:first-child { padding-top: 10px; }
  table.rows td:nth-child(2) { padding: 2px 16px 12px 64px; }
}
@media (max-width: 420px) { .fields { grid-template-columns: 1fr; } .tiles3 { gap: 8px; } .stat { padding: 12px; } .stat span { font-size: 12.5px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .btn:active, .stat:hover { transform: none; } }
