/* SendCaravan: one stylesheet for the public site and the back office. PORTED from ClickCaravan public/cc.css (a95e14d):
   base, buttons, forms, cards, tables, auth, back-office sidebar, group pages, settings tabs, help; re-tokened to the
   SendCaravan brand (navy, rust, gold, cream; brand/sendcaravan/SPEC.md). Headlines use the sans stack, like the logo. */
:root {
  --bg: #f7f4ee; --surface: #ffffff; --surface-2: #efeae0; --ink: #152742; --ink-2: #3a4a60; --muted: #5d6878;
  --line: #e4ddd0; --accent: #b65c3b; --accent-ink: #fff; --teal: #8a6a2c; --gold: #c9a055;
  --good: #1f7a55; --good-bg: #e2f2ea; --warn: #8a5a00; --warn-bg: #fbefd6; --bad: #a63a2a; --bad-bg: #f8e2dd; --mute-bg: #ece6dc;
  --radius: 12px; --shadow: 0 1px 2px rgba(21, 41, 67, .06), 0 8px 24px rgba(21, 41, 67, .07);
  --serif: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
/* Dark: follows the computer, unless the page says otherwise. The back office writes <html data-theme="light|dark|system">
   from each operator's choice (B-11; PORTED from Generation Chest admin.css). The site and partner portal have no data-theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1d30; --surface: #152943; --surface-2: #1c3352; --ink: #f3efe6; --ink-2: #d3cdc0; --muted: #a3adbb;
    --line: #2a4163; --accent: #d9774f; --teal: #d8b56e; --gold: #d8b56e;
    --good: #6fd3a4; --good-bg: #183a2c; --warn: #f3c46a; --warn-bg: #3a2e14; --bad: #f19a88; --bad-bg: #42221c; --mute-bg: #22385a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1d30; --surface: #152943; --surface-2: #1c3352; --ink: #f3efe6; --ink-2: #d3cdc0; --muted: #a3adbb;
  --line: #2a4163; --accent: #d9774f; --teal: #d8b56e; --gold: #d8b56e;
  --good: #6fd3a4; --good-bg: #183a2c; --warn: #f3c46a; --warn-bg: #3a2e14; --bad: #f19a88; --bad-bg: #42221c; --mute-bg: #22385a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center-text { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--teal); margin-bottom: .6em; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.note { background: var(--warn-bg); color: var(--ink); border-left: 3px solid var(--gold); padding: .75em 1em; border-radius: 8px; }
.note.bad { background: var(--bad-bg); border-left-color: var(--bad); }
.empty { color: var(--muted); padding: 1em 0; margin: 0; }

/* Brand mark */
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-family: var(--sans); font-weight: 700; font-size: 1.15rem; }
.brand em { font-style: normal; color: var(--teal); font-family: var(--sans); font-size: .8em; font-weight: 600; }
.mark .mk-route { stroke: var(--ink); opacity: .55; }
.mark .mk-a { fill: var(--gold); } .mark .mk-b { fill: var(--accent); } .mark .mk-c { fill: var(--teal); }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .7em 1.2em; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; min-height: 44px; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.small { padding: .4em .9em; min-height: 34px; font-size: .85rem; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .6; cursor: wait; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0 .3em; font: inherit; text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1rem; }
.actions.center { justify-content: center; }
label { display: block; font-size: .9rem; font-weight: 600; margin: 0 0 .9rem; color: var(--ink-2); }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .65em .75em; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: 400 1rem var(--sans); min-height: 44px; }
textarea { min-height: 0; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; }
label.check input { width: auto; min-height: 0; margin-top: .25rem; }
.msg { color: var(--bad); font-size: .9rem; min-height: 1.2em; margin: .6rem 0 0; }
.msg.ok { color: var(--good); }
.row2, .row3, .row4 { display: grid; gap: 0 1rem; }
@media (min-width: 720px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); } .row4 { grid-template-columns: repeat(4, 1fr); } }
form.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin-top: 1rem; }
form.inline label { flex: 1 1 180px; margin: 0; }
pre.code, pre.secret, pre[data-field] { background: var(--ink); color: #f3ead9; padding: 1rem 1.1rem; border-radius: 10px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

/* Cards, tables, pills */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin: 0 0 1.25rem; box-shadow: var(--shadow); }
.card h2 { font-size: 1.2rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.card { overflow-x: auto; }
th, td { text-align: left; padding: .6rem .55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 700; border-top: 2px solid var(--ink-2); }
.actions-cell { display: flex; gap: .4rem; flex-wrap: wrap; border-bottom: 0; }
.actions-cell form { margin: 0; }
.pill { display: inline-block; padding: .12em .6em; border-radius: 999px; font-size: .78rem; font-weight: 600; text-transform: capitalize; background: var(--mute-bg); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; margin: 0 0 1.25rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.kpi span { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.kpi strong { display: block; font: 600 1.45rem var(--serif); margin-top: .2rem; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .6rem; }
.tab { padding: .35em .85em; border-radius: 999px; text-decoration: none; color: var(--ink-2); text-transform: capitalize; font-size: .9rem; border: 1px solid transparent; }
.tab.on { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 600; }
.todo { display: flex; gap: .5rem; flex-wrap: wrap; margin: -.4rem 0 1rem; }
.page-head { margin-bottom: 1.25rem; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.crumbs { margin: 0 0 .3rem; font-size: .9rem; }
input.copy { display: inline-block; width: min(320px, 100%); font-family: var(--mono); font-size: .85rem; min-height: 34px; padding: .3em .5em; }
details summary { cursor: pointer; font-weight: 600; margin: .5rem 0; }

/* Public site */
.site-top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-top .row { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; flex-wrap: wrap; padding: .4rem 0; }
.site-nav { display: flex; gap: 1.2rem; flex: 1; flex-wrap: wrap; }
.site-nav a, .site-cta a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.site-nav a[aria-current] { color: var(--ink); font-weight: 600; }
.site-cta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 860px) { .site-nav { order: 3; flex-basis: 100%; gap: .9rem; font-size: .9rem; } .site-cta a:not(.btn) { display: none; } }
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); background:
  radial-gradient(60rem 26rem at 85% -10%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 70%),
  radial-gradient(40rem 20rem at -10% 110%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 70%); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.25rem; box-shadow: var(--shadow); font-size: .92rem; }
.hc-cap { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin: 0 0 .6rem; }
.hc-row { display: flex; gap: .8rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.hc-step { min-width: 3.6rem; font-weight: 700; color: var(--teal); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.hc-ledger { margin: .7rem 0; padding: .75rem .9rem; background: var(--surface-2); border-radius: 10px; font-family: var(--mono); font-size: .82rem; }
.hc-ledger div { display: flex; gap: .6rem; } .hc-ledger strong { margin-left: auto; } .hc-ledger span { color: var(--accent); font-weight: 700; width: 1.6rem; }
.band { background: var(--surface); border-block: 1px solid var(--line); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.band.alt { background: var(--surface-2); }
.band h2, .section > h2 { text-align: center; margin-bottom: 1.6rem; }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.grid3, .grid4, .packs, .progs { display: grid; gap: 1rem; }
@media (min-width: 760px) { .grid3 { grid-template-columns: repeat(3, 1fr); } .grid4, .packs, .progs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid4 { grid-template-columns: repeat(4, 1fr); } .progs, .packs { grid-template-columns: repeat(3, 1fr); } }
.mode, .feat, .packs article, .prog { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.band .mode { background: var(--bg); }
.section .feat, .packs article, .prog { background: var(--surface); }
.prog { display: flex; flex-direction: column; } .prog .actions { margin-top: auto; padding-top: .4rem; }
.prog-logo { display: block; height: 40px; width: auto; max-width: 160px; object-fit: contain; margin-bottom: .7rem; }
.prog-pay { margin: .2rem 0 .6rem; color: var(--ink); }
div.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.3rem; } div.empty h2 { margin-top: 0; font-size: 1.2rem; }
.ico { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .6rem; }
.split { display: grid; gap: 2rem; align-items: center; }
.split h2 { text-align: left; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.checks { list-style: none; padding: 0; margin: 0 0 1rem; }
.checks li { padding-left: 1.6rem; position: relative; margin: .45rem 0; }
.checks li::before { content: ""; position: absolute; left: 0; top: .45em; width: .8rem; height: .45rem; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.compare { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; overflow-x: auto; }
.compare td { text-align: center; color: var(--muted); } .compare td:last-child { color: var(--good); font-weight: 700; } .compare th:last-child { color: var(--accent); }
.cta-band { text-align: center; } .cta-band .actions { justify-content: center; }
.steps { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1rem; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.steps li { display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.steps .n { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; }
.lifecycle { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; align-items: center; margin: 2rem 0 .8rem; }
.lifecycle .st { padding: .5em 1em; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.lifecycle .st.on { background: var(--teal); color: #fff; border-color: var(--teal); } .lifecycle .ar { color: var(--muted); }
.plans { display: grid; gap: 1rem; margin: 2rem 0 1.25rem; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.plan .price { font: 600 2.2rem var(--serif); margin: .2rem 0; } .plan .price span { font-size: 1rem; color: var(--muted); }
.plan .checks { flex: 1; font-size: .93rem; }
.enterprise { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; background: var(--ink); color: var(--bg); border-radius: 16px; padding: 1.4rem 1.6rem; margin-bottom: 1rem; }
.enterprise p { margin: 0; opacity: .85; max-width: 70ch; }
.tags { display: flex; gap: .4rem; flex-wrap: wrap; } .tags span { font-size: .78rem; background: var(--surface-2); padding: .15em .6em; border-radius: 999px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 1.5rem 0; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; }
.facts span { display: block; color: var(--muted); font-size: .8rem; } .facts strong { font-size: 1.05rem; }
.terms pre { white-space: pre-wrap; font-family: var(--sans); font-size: .92rem; background: var(--surface); border: 1px solid var(--line); padding: 1rem; border-radius: 10px; }
.join { margin-top: 1.5rem; }
.site-foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; margin-top: 2rem; }
.foot-grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; } }
.foot-grid h4 { margin: 0 0 .6rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.foot-grid a:not(.brand) { display: block; color: var(--ink-2); text-decoration: none; margin: .3rem 0; font-size: .93rem; }

/* Auth cards */
body.center { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 16px; }
.card.auth { width: min(440px, 100%); padding: 2rem; }
.card.auth .brand { margin-bottom: 1.2rem; } .card.auth h1 { font-size: 1.6rem; }
.key { font-family: var(--mono); font-size: 1.05rem; letter-spacing: .08em; background: var(--surface-2); padding: .6em .8em; border-radius: 8px; word-break: break-all; }

/* Partner portal */
.app .top { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: .7rem 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.app .top nav { display: flex; gap: .3rem; flex: 1; flex-wrap: wrap; }
.app .top nav a { color: var(--ink-2); text-decoration: none; padding: .45em .8em; border-radius: 8px; font-size: .95rem; }
.app .top nav a.on { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.who { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); margin: 0; }
.partner main { padding: 1.75rem 0 3rem; }
.checklist ol { margin: 0; padding-left: 1.2rem; } .checklist li { margin: .35rem 0; } .checklist li.done, .checklist li.done a { color: var(--good); }
form.tax { max-width: 560px; }

/* Back office (B-11): sidebar in groups with icons, top bar with the colour-scheme switch, drawer on phones */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.admin { display: grid; min-height: 100vh; }
@media (min-width: 900px) { .admin { grid-template-columns: 264px minmax(0, 1fr); } }
.admin .nav-cb { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.admin .side { background: var(--surface); border-right: 1px solid var(--line); padding: 1rem .75rem; display: flex; flex-direction: column; gap: .8rem; }
@media (min-width: 900px) { .admin .side { position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; } }
.admin .side-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .35rem; }
.admin .nav-close { display: none; }
.admin .who-net { margin: 0; padding: .55rem .7rem; border-radius: 10px; background: var(--surface-2); font-weight: 600; font-size: .92rem; overflow-wrap: anywhere; }
.admin .who-net span { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; text-transform: capitalize; }
.admin .side-nav { display: flex; flex-direction: column; gap: .15rem; }
.admin .nav-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.admin .side-nav a, .admin .nav-group summary { display: flex; align-items: center; gap: .65rem; padding: .5rem .7rem; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-size: .97rem; min-height: 40px; }
.admin .side-nav a:hover, .admin .nav-group summary:hover { background: var(--surface-2); color: var(--ink); }
.admin .side-nav a.on { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--ink); font-weight: 650; box-shadow: inset 3px 0 0 var(--accent); }
.admin .side-nav a.on .nav-ico { color: var(--accent); }
.admin .nav-group summary { list-style: none; cursor: pointer; font-weight: 650; color: var(--ink); font-size: 1rem; margin: 0; }
.admin .nav-group summary::-webkit-details-marker { display: none; }
.admin .nav-group summary .nav-ico { color: var(--teal); }
.admin .nav-chev { width: 16px; height: 16px; margin-left: auto; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.admin .nav-group[open] > summary .nav-chev { transform: rotate(90deg); }
.admin .nav-items { display: flex; flex-direction: column; gap: .1rem; margin: .1rem 0 .4rem 1.05rem; padding-left: .45rem; border-left: 1px solid var(--line); }
.admin .nav-items a { font-size: .94rem; min-height: 36px; padding: .4rem .6rem; }
.admin .nav-items a .nav-ico { width: 18px; height: 18px; }
.admin .side .who { margin-top: auto; flex-wrap: wrap; padding: .6rem .5rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.admin .main-col { min-width: 0; display: flex; flex-direction: column; }
.admin .topbar { display: flex; align-items: center; gap: .75rem; padding: .55rem clamp(16px, 3vw, 2.5rem); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; min-height: 56px; }
.admin .top-crumb { margin: 0; flex: 1; min-width: 0; display: flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin .top-crumb a { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink-2); text-decoration: none; }
.admin .top-crumb .nav-ico { color: var(--teal); }
.admin .top-tools { display: flex; align-items: center; gap: .6rem; }
.admin .top-account { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink-2); text-decoration: none; font-size: .92rem; padding: .35rem .55rem; border-radius: 8px; min-height: 36px; }
.admin .top-account:hover, .admin .top-account[aria-current] { background: var(--surface-2); color: var(--ink); }
.admin .theme-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg); gap: 2px; }
.admin .theme-switch form { margin: 0; display: flex; }
.admin .ts-btn { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: transparent; color: var(--ink-2); border-radius: 999px; min-height: 32px; min-width: 34px; padding: 0 .55rem; cursor: pointer; font: 500 .88rem var(--sans); justify-content: center; }
.admin .ts-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.admin .ts-btn[aria-pressed="true"] .nav-ico { color: var(--accent); }
.admin .theme-switch.with-labels .ts-btn { min-height: 40px; padding: 0 .9rem; }
.admin .theme-switch .msg { display: none; }
.admin .nav-btn, .admin .nav-scrim { display: none; }
.content { padding: 1.75rem clamp(16px, 3vw, 2.5rem) 3rem; min-width: 0; }
@media (max-width: 899px) {
  .admin .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-105%); transition: transform .2s ease; overflow-y: auto; box-shadow: var(--shadow); }
  .admin .nav-cb:checked ~ .side { transform: none; }
  .admin .nav-scrim { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / 38%); display: none; }
  .admin .nav-cb:checked ~ .nav-scrim { display: block; }
  .admin .nav-close { display: inline-flex; padding: .45rem; border-radius: 8px; cursor: pointer; color: var(--ink-2); }
  .admin .nav-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .65rem; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .92rem; min-height: 40px; }
  .admin .topbar { padding-inline: 16px; gap: .5rem; }
  .admin .top-crumb { display: none; }
  .admin .top-tools { margin-left: auto; }
  .admin .top-account span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .admin .side, .admin .nav-chev { transition: none; } }

/* Group landing pages and the dashboard */
.hub-head { display: flex; align-items: center; gap: 1rem; }
.hub-head h1 { margin-bottom: .2rem; }
.hub-ico { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hub-ico.big { width: 44px; height: 44px; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); stroke: var(--teal); }
.hub-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.hub-card { display: grid; gap: .35rem; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.hub-card:hover { border-color: var(--accent); }
.hub-t { font-weight: 650; font-size: 1.05rem; }
.hub-l { color: var(--ink-2); font-size: .93rem; }
.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin: 0 0 1rem; }
@media (max-width: 599px) { .tiles { grid-template-columns: 1fr 1fr; gap: .7rem; } .tile { grid-template-columns: 1fr; padding: .8rem .9rem; } .tile-ico { grid-row: auto; width: 32px; height: 32px; padding: 6px; } .tile strong { font-size: 1.3rem; } }
.tile { display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
a.tile:hover { border-color: var(--accent); }
.tile-ico { grid-row: span 3; width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: color-mix(in srgb, var(--teal) 14%, var(--surface)); fill: none; stroke: var(--teal); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile-l { color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.tile strong { font: 600 1.6rem var(--serif); font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile small { color: var(--muted); }
.dash-split { display: grid; gap: 0 1.25rem; align-items: start; }
@media (min-width: 1100px) { .dash-split { grid-template-columns: 1fr 1fr; } }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-list li { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.setup-list li:last-child { border-bottom: 0; }
.setup-list li div { display: grid; min-width: 0; overflow-wrap: anywhere; }
.setup-list a { font-weight: 600; }
.setup-ico { width: 22px; height: 22px; flex: none; margin-top: .1rem; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; border-radius: 50%; padding: 3px; border: 1px solid var(--line); }
.setup-list li.done .setup-ico { stroke: var(--good); background: var(--good-bg); border-color: transparent; }
.setup-list li.done a { color: var(--good); }
.facts-list dd.cap { text-transform: capitalize; }

/* Settings: a left sub-nav of tabs; one section at a time (the one the address points at, else Company) */
.settings-layout { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .settings-layout { grid-template-columns: 220px minmax(0, 1fr); } .set-nav { position: sticky; top: 72px; } }
.set-nav { display: flex; flex-direction: column; gap: .15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; }
@media (max-width: 1099px) { .set-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); } }
.set-nav a { display: flex; align-items: center; gap: .55rem; padding: .5rem .65rem; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .94rem; min-height: 40px; }
.set-nav a:hover { background: var(--surface-2); color: var(--ink); }
.set-nav a.on { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--ink); font-weight: 650; }
.set-nav .dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; background: var(--line); flex: none; }
.set-nav .dot.good { background: var(--good); } .set-nav .dot.warn { background: var(--gold); }
.set-pane { display: none; min-width: 0; }
.set-pane:has(:target), .set-panes:not(:has(:target)) .set-pane:first-child { display: block; }
.set-pane > .card { scroll-margin-top: 72px; overflow-x: visible; }
.set-pane h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 1.35rem; }
.set-pane h2 small { font: 400 .88rem var(--sans); }
.set-pane h2 .pill, .setup .pill { text-transform: none; font-family: var(--sans); }
.set-pane .what { display: flex; gap: .5rem; align-items: flex-start; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: .6rem .75rem; }
.set-pane .what .nav-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--teal); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-top: .1rem; }
.set-pane form > label, .set-pane .secret-field { max-width: 760px; }
.secret-field { margin: 0 0 .9rem; }
.secret-field > label { margin: 0 0 .3rem; }
.secret-field > label small { display: inline-block; font-family: var(--mono); font-size: .82rem; color: var(--ink-2); background: var(--surface-2); padding: .05em .45em; border-radius: 5px; overflow-wrap: anywhere; }
.secret-row { display: flex; gap: .5rem; align-items: center; }
.secret-row input { margin: 0; flex: 1; min-width: 0; font-family: var(--mono); }
.secret-row .btn { flex: none; min-height: 44px; }
.secret-field > p { margin: .35rem 0 0; overflow-wrap: anywhere; }
.set-pane pre[data-field] { max-width: 760px; }
.set-pane form.inline p { margin: 0; flex: 1 1 260px; }

/* Settings → Appearance */
.ap-grid { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 1200px) { .ap-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.ap-field { margin-bottom: .9rem; }
.ap-field label { margin-bottom: .3rem; }
.ap-row { display: flex; gap: .5rem; align-items: center; }
.ap-row input { margin: 0; }
.ap-row input[data-ap] { font-family: var(--mono); max-width: 12rem; }
.ap-swatch { width: 52px; min-width: 52px; height: 44px; padding: 3px; cursor: pointer; }
.ap-field p { margin: .3rem 0 0; }
.ap-preview { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-bottom: 1rem; }
.ap-mock { --p-bg: #f7f2ea; --p-surface: #fffdf9; --p-ink: #1d2a33; --p-muted: #6b7680; --p-line: #e3d8c6; --p-brand: #c8553d; --p-label: #fff; --p-accent: #2a8f86;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--p-bg); color: var(--p-ink); font-size: .85rem; }
.ap-mock.ap-dark { --p-bg: #11181d; --p-surface: #182229; --p-ink: #ede5d8; --p-muted: #95a0a8; --p-line: #2b3a44; --p-brand: #e06a50; --p-label: #fff; --p-accent: #3fb3a8; }
.ap-cap { margin: 0; padding: .3rem .7rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--p-muted); border-bottom: 1px solid var(--p-line); }
.ap-mock-in { display: grid; grid-template-columns: 80px 1fr; min-height: 150px; }
.ap-side { background: var(--p-surface); border-right: 1px solid var(--p-line); padding: .5rem .35rem; display: grid; gap: .2rem; align-content: start; }
.ap-side span { padding: .25rem .35rem; border-radius: 6px; color: var(--p-ink); opacity: .8; }
.ap-side .ap-on { opacity: 1; font-weight: 700; box-shadow: inset 2px 0 0 var(--p-brand); background: color-mix(in srgb, var(--p-brand) 14%, var(--p-surface)); }
.ap-main { padding: .6rem; min-width: 0; }
.ap-eyebrow { margin: 0 0 .35rem; color: var(--p-accent); font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.ap-card { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: 8px; padding: .55rem .6rem; }
.ap-card p { margin: .25rem 0 .5rem; }
.ap-card a { color: var(--p-brand); }
.ap-btn { display: inline-block; background: var(--p-brand); color: var(--p-label); border-radius: 999px; padding: .25em .8em; font-weight: 600; }
.ap-checks { list-style: none; padding: 0; margin: 0 0 1rem; font-size: .9rem; }
.ap-checks li { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; align-items: center; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.ap-checks strong { font-variant-numeric: tabular-nums; }
form.rule { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }

/* B-13 set-up wizard (/admin/welcome), back-office tour, Help, partner "Get started" */
.wz-steps { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(5, minmax(0, 1fr)); counter-reset: none; }
.wz-steps a { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: .92rem; min-height: 48px; }
.wz-steps a:hover { border-color: var(--ink-2); color: var(--ink); }
.wz-steps .on a { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--ink); font-weight: 650; }
.wz-n { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); font-weight: 700; font-size: .85rem; }
.wz-steps .done .wz-n { background: var(--good-bg); color: var(--good); }
.wz-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wz-l { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.wz-l small { display: block; font-weight: 400; color: var(--muted); }
@media (max-width: 899px) { .wz-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; } .wz-steps a { justify-content: center; padding: .45rem .3rem; }
  .wz-steps .wz-l { display: none; } .wz-steps .on .wz-l { display: none; } }
.wz-step { overflow-x: visible; }
.wz-count { margin: 0 0 .2rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); }
.wz-step h3 { font-size: 1.05rem; margin: 0 0 .7rem; }
.wz-step h3 small { font: 400 .85rem var(--sans); color: var(--muted); }
.wz-form { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.wz-step pre.code { margin: 0 0 1rem; }
.wz-step .setup-list { margin: 0 0 .5rem; }
.wz-foot { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1rem; }
.wz-foot form { margin: 0; }
.wz-later { margin-left: auto; }
.wz-links { list-style: none; padding: 0; margin: 0 0 .5rem; }
.wz-links li { display: grid; gap: .3rem; padding: .6rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.wz-links li:last-child { border-bottom: 0; }
.copy-row { display: flex; gap: .4rem; align-items: center; min-width: 0; }
.copy-row input.copy { width: 100%; max-width: 520px; min-width: 0; }
.wz-next { padding-left: 1.2rem; } .wz-next li { margin: .4rem 0; }
.note.good-note { background: var(--good-bg); border-left-color: var(--good); }
.wz-resume { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; justify-content: space-between; }
.help-list { list-style: none; margin: 0; padding: 0; }
.help-list li { display: grid; gap: .1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.help-list li:last-child { border-bottom: 0; }
.help-list a { font-weight: 600; }
.tour { position: fixed; z-index: 60; width: min(360px, calc(100vw - 32px)); right: 24px; bottom: 24px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: 0 12px 40px rgba(0, 0, 0, .28); }
.tour[style*="top"] { right: auto; bottom: auto; }
.tour h2 { font-size: 1.15rem; margin: 0 0 .4rem; }
.tour h2:focus { outline: none; }
.tour p { margin: 0 0 .8rem; font-size: .95rem; }
.tour-count { font-size: .75rem !important; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); margin-bottom: .3rem !important; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tour-nav { display: flex; gap: .4rem; }
.tour-on { outline: 3px solid var(--accent) !important; outline-offset: 3px; border-radius: 10px; scroll-margin: 90px; }
@media (max-width: 599px) { .tour { left: 16px; right: 16px; bottom: 16px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .tour, .tour-on { transition: none; animation: none; } }
.get-started .setup-list a { font-weight: 600; }

/* Fraud review cases (B-15) */
.cases { display: grid; gap: .9rem; }
.case { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.case header { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start; }
.case header .r { text-align: right; white-space: nowrap; }
.case .score { display: inline-grid; place-items: center; min-width: 2.6rem; height: 2.6rem; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--mute-bg); }
.case .score.shi { background: var(--bad-bg); color: var(--bad); } .case .score.smid { background: var(--warn-bg); color: var(--warn); }
.case .reasons { margin: .6rem 0; padding-left: 1.1rem; } .case .reasons li { margin: .2rem 0; }
.case .actions-cell form { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.case .actions-cell { align-items: center; }
.case .actions-cell form:last-child { flex: 1 1 18rem; }
.case .actions-cell input { min-width: 0; flex: 1 1 12rem; width: auto; margin: 0; }
.case code { word-break: break-all; }
@media (max-width: 520px) { .case header { grid-template-columns: auto 1fr; } .case header .r { grid-column: 2; text-align: left; } }

/* B-16: date range + Export CSV bar above list pages (src/ui/admin.js rangeBar). */
.range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .8rem; margin: 0 0 .4rem; }
.range label { margin: 0; font-size: .85rem; }
.range input[type=date] { min-height: 34px; padding: .25em .45em; }
.range .btn.primary { margin-left: auto; }
/* B-16 (C19): tables marked .stack become one block per row on a phone, each cell labelled with its column name. */
@media (max-width: 599px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border-bottom: 1px solid var(--line); padding: .6rem 0; }
  table.stack td { border: 0; padding: .2rem 0; overflow-wrap: anywhere; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
  table.stack td.r { display: inline-block; width: 50%; text-align: left; }
  table.stack td.none { display: none; }
  table.stack td.actions-cell { display: flex; padding-top: .4rem; }
  table.stack input.copy { width: calc(100% - 4.5rem); }
  .range .btn.primary { margin-left: 0; }
}


/* ── Wave 0 console pages (accounts, brands, domains, SES card), kept ── */
/* ── Console ─────────────────────────────────────────────── */
.console { background: var(--bg); }
.c-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.c-top .tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.c-nav { display: flex; gap: 6px; flex: 1; }
.c-nav a { text-decoration: none; color: var(--ink); padding: 6px 10px; border-radius: 8px; font-weight: 600; }
.c-nav a[aria-current] { background: var(--surface-2); color: var(--accent); }
.who { display: flex; gap: 10px; align-items: center; margin: 0; }
.who .msg { display: none; }
.console main { padding-top: 18px; padding-bottom: 40px; }
.crumb { margin: 0; font-size: .9rem; color: var(--muted); }
h2.sub { color: var(--muted); font-size: 1rem; font-weight: 600; margin-top: -4px; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #eceae4; color: var(--muted); text-transform: capitalize; white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.empty { color: var(--muted); font-style: italic; }
.row-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.row-form label { flex: 1 1 220px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.actions form { margin: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 12px; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; min-width: 0; }
.steps { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; color: var(--muted); font-size: .92rem; }
.steps li.done { color: var(--good); }
.note { border-radius: 10px; padding: 10px 14px; background: var(--surface-2); margin: 10px 0; }
.note p { margin: 0 0 4px; }
.note.good { background: var(--good-bg); }
.note.warn { background: var(--warn-bg); }
.note.bad { background: var(--bad-bg);  }
.plain { margin: 0; padding-left: 18px; }
.service-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.service { max-width: 760px; }
.test { display: grid; grid-template-columns: max-content 1fr; gap: 14px; align-items: start; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.test form { margin: 0; }
.guide { margin-top: 14px; }
.guide summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.copy { display: flex; gap: 6px; min-width: 0; }
.copy input { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; padding: 6px 8px; }
.records td:nth-child(2) { min-width: 260px; }
.records td:nth-child(3) { min-width: 300px; }
.shown-once { background: #0f1d30; color: #e8f5f1; padding: 14px; border-radius: 10px; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 640px) {
  h1 { font-size: 1.45rem; }
  .c-top { gap: 10px; }
  .c-nav { order: 3; flex-basis: 100%; }
  .test { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  /* DNS records: one card per record on phones, so every name and value is readable and copyable */
  .records thead { display: none; }
  .records, .records tbody, .records tr, .records td { display: block; width: 100%; }
  .records tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .records td { min-width: 0 !important; padding: 4px 0; border: 0; }
  .records td::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); }
  .records .copy input { flex: 1; min-width: 0; width: 100%; }
}


[hidden] { display: none !important; }
/* Logo (caravan-ecosystem/SPEC.md): inline SVG mark + HTML wordmark, "Send" navy (white on dark), "Caravan" rust, extra-bold. */
.logo { display: inline-flex; align-items: center; gap: .4rem; font: 800 1.2rem/1 var(--sans); letter-spacing: -.02em; white-space: nowrap; }
.logo-lg { font-size: 1.55rem; }
.logo .mark { width: 1.75em; height: auto; flex: none; }
.wordmark .wm-a { color: #152742; } .wordmark .wm-b { color: #B65C3B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wordmark .wm-a { color: #fff; } }
:root[data-theme="dark"] .wordmark .wm-a { color: #fff; }
.secret code { background: var(--surface); }
.enroll { background: var(--surface-2); border-radius: 10px; padding: 14px; }
.stack { display: grid; gap: 4px; }
.btn.danger { color: var(--bad); }
.copy { display: flex; gap: 6px; min-width: 0; }
.copy input { margin-top: 0; font-family: var(--mono); font-size: .82rem; padding: 6px 8px; min-height: 36px; }

/* ── R1a back office: search, bells, guides, tabs, results, pager ── */
.admin .top-search { flex: 0 1 280px; margin: 0; }
.admin .top-search input { margin: 0; min-height: 36px; padding: .35em .7em; border-radius: 999px; background: var(--bg); }
@media (max-width: 899px) { .admin .top-search { flex: 1 1 auto; min-width: 0; } }
.bells { position: relative; }
.bells summary { list-style: none; margin: 0; cursor: pointer; position: relative; }
.bells summary::-webkit-details-marker { display: none; }
.bell-n { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--muted); color: #fff; font: 700 .7rem/18px var(--sans); text-align: center; padding: 0 4px; }
.bell-n.fresh { background: var(--accent); }
.bell-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(300px, 86vw); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .5rem; }
.bell-list form { margin: 0; }
.bell-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .55rem .6rem; border-radius: 8px; color: var(--ink); font: 500 .92rem var(--sans); cursor: pointer; }
.bell-item:hover { background: var(--surface-2); }
.guide-box { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 10px; background: var(--surface-2); }
.guide-box h3 { font-size: 1rem; margin: 0 0 .5rem; }
.guide-box ol { margin: 0 0 .6rem; padding-left: 1.2rem; } .guide-box li { margin: .3rem 0; }
.guide-box .copy { margin-top: .3rem; }
.activity { margin-top: .8rem; }
h2.sub { margin-top: 1.8rem; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 1rem; }
.tabs a { padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: .9rem; }
.tabs a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.results { list-style: none; padding: 0; display: grid; gap: .5rem; }
.pager { display: flex; gap: 1rem; align-items: center; }
a.kpi { text-decoration: none; color: var(--ink); } a.kpi:hover { border-color: var(--accent); }
.pre { white-space: pre-wrap; background: var(--surface-2); padding: .8rem 1rem; border-radius: 10px; }
.links li { margin: .35rem 0; }
form.inline { display: flex; gap: .4rem; align-items: center; margin: 0; } form.inline select { margin: 0; min-height: 34px; width: auto; }
.service { max-width: 860px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* tables marked .stack: one block per row on a phone, each cell labeled (ClickCaravan B-16 C19) */
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
  table.stack td { border: 0; padding: .2rem 0; overflow-wrap: anywhere; }
  table.stack td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
}
@media (max-width: 640px) { table.stack td:empty { display: none; } }

/* ── R2b workspace console + Sending zone ── */
.brk { overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
.block { display: block; }
.ck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: .3rem .9rem; margin: .4rem 0 .8rem; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; margin: 0; min-width: 0; }
fieldset[disabled] { opacity: .75; }
legend { font-weight: 700; padding: 0 .3rem; }
.filter-grid { display: grid; gap: .6rem .9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); align-items: end; }
.ws-steps { display: grid; grid-template-columns: 1fr; gap: .5rem; margin: 1rem 0 0; color: var(--ink); }
.ws-steps li { display: flex; gap: .8rem; align-items: center; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.ws-steps .n { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; }
.ws-steps li.done .n { background: var(--good); }
.ws-steps li.done a { color: var(--good); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { padding: .35rem 0 .7rem 1rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .75rem; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.ramp { list-style: none; padding: 0; margin: .6rem 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.ramp li { padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.ramp li.done { background: var(--good-bg); color: var(--good); border-color: transparent; }
.ramp li.now { background: var(--warn-bg); color: var(--warn); border-color: var(--gold); font-weight: 700; }
.kpi.warn { border-color: var(--gold); } .kpi.bad { border-color: var(--bad); }
.kpi meter { width: 100%; margin-top: .4rem; }
.dns-full { display: none; }
.tpl-preview { width: 100%; min-height: 420px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
/* DNS records on a phone: each value gets its own full-width row, the Copy button stays beside it */
@media (max-width: 640px) {
  table.stack .copy-row { width: 100%; }
  table.stack .copy-row input.copy { width: auto; flex: 1 1 auto; min-width: 0; font-size: .78rem; }
  .tpl-preview { min-height: 320px; }
  /* the whole value, wrapped, under its box: long DKIM tokens stay readable on a phone */
  .dns-full { display: block; font-size: .74rem; margin: .25rem 0 .2rem; color: var(--ink-2); }
}

/* ── R3 marketing: block editor, segment builder, calendar, images, previews, public forms ── */
.mkt-editor { display: grid; gap: .8rem; }
.ed-palette { display: flex; flex-wrap: wrap; gap: .4rem; }
.ed-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; min-height: 3rem; }
.ed-block { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: .5rem .7rem; }
.ed-block.dragging { opacity: .5; } .ed-block.over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.ed-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ed-grip { cursor: grab; color: var(--muted); user-select: none; }
.ed-tools { margin-left: auto; display: flex; gap: .3rem; }
.ed-body summary, .ed-settings summary { cursor: pointer; color: var(--accent); font-weight: 600; margin: .3rem 0; }
.ed-body label, .ed-settings label { display: block; margin: .4rem 0; }
.seg-group { border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; padding: .5rem .7rem; margin: .4rem 0; display: grid; gap: .4rem; min-width: 0; }
.seg-group .seg-group { margin-left: .4rem; }
.seg-head, .seg-rule { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.seg-rule select, .seg-rule input, .seg-head select { width: auto; flex: 1 1 140px; min-width: 0; margin: 0; }
.cal { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-day { min-height: 84px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--surface); overflow: hidden; }
.cal-day.has { border-color: var(--gold); }
.cal-n { font-size: .8rem; color: var(--muted); display: block; }
.cal-item { display: block; font-size: .78rem; margin: 2px 0; overflow-wrap: anywhere; }
.asset-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: .8rem; }
.asset-grid li { border: 1px solid var(--line); border-radius: 10px; padding: .5rem; display: grid; gap: .35rem; background: var(--surface); min-width: 0; }
.asset-grid img { width: 100%; height: 120px; object-fit: contain; background: #fff; border-radius: 6px; }
.pv-frame { max-width: 100%; } .pv-frame.mobile { max-width: 390px; margin: 0 auto; }
textarea.code { font-family: var(--mono, ui-monospace, monospace); font-size: .85rem; }
.mkt-card { width: min(520px, 100%); }
.mkt-public fieldset label { margin: .25rem 0; }
@media (max-width: 640px) {
  .cal { grid-template-columns: 1fr; }
  .cal-pad { display: none; }
  .cal-day { min-height: 0; } .cal-day:not(.has) { display: none; }
  .ed-tools .btn.small { min-width: 40px; }
}

/* >>> R4: automation, integrations, pipeline >>> */
.aut-steps { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .5rem; }
.aut-step { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--surface); padding: .5rem .7rem; min-width: 0; }
.aut-step.aut-wait { border-left-color: var(--gold); } .aut-step.aut-branch, .aut-step.aut-split { border-left-color: var(--muted); }
.aut-step.aut-goal, .aut-step.aut-exit { border-left-color: var(--line); }
.aut-n { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--line); font-size: .8rem; }
.aut-step summary { cursor: pointer; color: var(--accent); font-weight: 600; margin: .3rem 0; }
.aut-body label { display: block; margin: .4rem 0; }
.aut-body textarea, .aut-body input, .aut-body select { width: 100%; max-width: 100%; }
.aut-path { border-top: 1px dashed var(--line); padding-top: .3rem; }
.aut-add { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.aut-add select { width: auto; flex: 1 1 160px; margin: 0; }
.aut-starters { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .8rem; }
.aut-starters li { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; background: var(--surface); min-width: 0; }
.aut-starters form { gap: .35rem; }
.checklist { list-style: none; padding: 0; display: grid; gap: .3rem; }
.checklist li { color: var(--bad, #b3261e); } .checklist li.done { color: var(--good, #1e7b34); }
.cal-item.cal-journey { font-style: italic; }
pre.secret { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .aut-step .ed-tools .btn.small { min-width: 40px; }
}
/* <<< R4 <<< */

/* >>> R5: pipeline board, signup address row, white-label logo, filters >>> */
.pipe-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; margin: 0 0 1.25rem; }
.pipe-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; min-width: 0; }
.pipe-col h3 { font-size: 1rem; margin: 0 0 .5rem; }
.pipe-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.pipe-card { display: flex; flex-direction: column; gap: .2rem; padding: .6rem .7rem; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; background: var(--bg, transparent); overflow-wrap: anywhere; }
.filters-box { margin: 0 0 1rem; } .filters-box > summary { cursor: pointer; font-weight: 600; padding: .4rem 0; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; align-items: end; }
.addr-row { display: flex; align-items: center; gap: .4rem; } .addr-row input { flex: 1; min-width: 0; } .addr-row span { white-space: nowrap; }
.wl-logo { max-height: 60px; max-width: 220px; }
@media (max-width: 520px) { .addr-row { flex-wrap: wrap; } }
/* <<< R5 <<< */
