/* CarrierHive Orbit foundation: midnight navy, electric blue, orange, and accessible white. */

:root {
  --bg: #061225;
  --surface: #102641;
  --surface-2: #142f50;
  --ink: #f4f8ff;
  --ink-2: #dceafa;
  --muted: #b2c8df;
  --faint: #8fb2d3;
  --line: #355b80;
  --line-2: #274767;
  --brand: #ff964b;
  --brand-2: #ffb77c;
  --brand-ink: #ffc28d;
  --brand-wash: #3a2b2a;
  --grad: linear-gradient(115deg,#ffc183,#ff964b 64%,#ff7c42);
  --grad-soft: linear-gradient(140deg,#162e4c,#0b1d34);
  --go: #a3f5ce; --go-wash: #113c31;
  --stop: #ffc0c7; --stop-wash: #472936;
  --warn: #ffdc9a; --warn-wash: #473724;
  --info: #9bdfff; --info-wash: #103657;
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px;
  --shadow-sm: 0 2px 7px rgba(0,0,0,.18);
  --shadow: 0 7px 24px rgba(0,0,0,.22);
  --shadow-lg: 0 12px 38px rgba(0,0,0,.34);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.15rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
.muted { font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
:focus-visible { outline: 3px solid rgba(69, 186, 253, .7); outline-offset: 2px; border-radius: 6px; }
code, .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 500; font-size: .875rem; color: var(--ink-2); margin: 0 0 .35rem; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: .3rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=date], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: .6rem .8rem; font: inherit; font-size: .94rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
input[type=file] { font: inherit; font-size: .9rem; }
textarea { min-height: 8rem; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(69, 186, 253, .15); outline: none; }
.field { margin-bottom: 1.1rem; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; color: var(--ink-2); margin-bottom: .45rem; }
.check input { margin-top: .3rem; accent-color: var(--brand); }
fieldset { border: 0; padding: 0; margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1.1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 1.1rem; }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .6rem 1.05rem; border-radius: var(--r-sm); border: 1px solid transparent;
  font: 600 .9rem/1.2 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--surface-2); color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .1s, box-shadow .15s, background .15s;
}
.btn:hover { background: #1e293b; color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-amber, .btn-primary { background: var(--grad); color: #061225; box-shadow: 0 6px 18px rgba(255, 150, 75, .22); }
.btn-amber:hover, .btn-primary:hover { background: var(--grad); color: #061225; box-shadow: 0 8px 24px rgba(255, 150, 75, .34); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-ghost-dark { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-ghost-dark:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--stop); border-color: #fecaca; }
.btn-danger:hover { background: var(--stop-wash); color: var(--stop); }
.btn-sm { padding: .38rem .7rem; font-size: .82rem; border-radius: 7px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
form.inline { display: inline; }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .6rem; border-radius: 999px;
  font-size: .76rem; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; vertical-align: middle;
}
.tag.good { background: var(--go-wash); color: var(--go); }
.tag.bad { background: var(--stop-wash); color: var(--stop); }
.tag.warn { background: var(--warn-wash); color: var(--warn); }
.tag.info { background: var(--brand-wash); color: var(--brand-ink); }
.tag.good::before, .tag.bad::before, .tag.warn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Notices ---------- */
.notice { padding: .8rem 1rem; border-radius: var(--r); margin-bottom: 1.1rem; border: 1px solid; font-size: .93rem; }
.notice.success { border-color: #247e6b; background: var(--go-wash); color: #a3f5ce; }
.notice.error { border-color: #ae4d60; background: var(--stop-wash); color: #ffc0c7; }
.notice.warning { border-color: #9c753e; background: var(--warn-wash); color: #ffdc9a; }
.notice.info { border-color: #4088b3; background: var(--info-wash); color: #c3ebff; }

/* ---------- Panels & tables ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-head h2, .panel-head h3 { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 -1.5rem; padding: 0 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .91rem; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: .78rem; padding: .55rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
th:first-child { border-top-left-radius: 8px; } th:last-child { border-top-right-radius: 8px; }
td { padding: .7rem .7rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tbody tr:hover td { background: #173451; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 1.1rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.stat b { display: block; font: 700 1.7rem/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-bottom: .2rem; }
.stat span { color: var(--muted); font-size: .84rem; }
.stat a { color: inherit; text-decoration: none; display: block; }
.stat a:hover b { color: var(--brand); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 1.1rem .8rem 2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; padding: .2rem .5rem 1.1rem; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-name { font: 700 1.08rem/1.1 var(--display); letter-spacing: -.02em; }
.brand-sub { display: block; font: 500 .74rem/1.3 var(--font); color: var(--muted); margin-top: .1rem; }
.side nav { display: flex; flex-direction: column; gap: 1px; }
.side .group { font-size: .72rem; font-weight: 600; color: var(--faint); padding: 1.1rem .7rem .35rem; letter-spacing: .02em; }
.side a.nav {
  display: flex; justify-content: space-between; align-items: center; padding: .48rem .7rem; color: var(--ink-2);
  text-decoration: none; border-radius: 9px; font-size: .9rem; font-weight: 500;
}
.side a.nav:hover { background: var(--line-2); color: var(--ink); }
.side a.nav.on { background: var(--brand-wash); color: var(--brand-ink); font-weight: 600; }
.side a.nav.locked { color: var(--faint); }
.side a.nav .count { background: var(--grad); color: #061225; border-radius: 999px; padding: .05rem .5rem; font-size: .72rem; font-weight: 700; }
.side .lock { font-size: .68rem; font-weight: 600; color: var(--brand); background: var(--brand-wash); padding: .05rem .45rem; border-radius: 999px; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .75rem 2rem; background: rgba(9, 26, 47, .96); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar form.quick { flex: 1; max-width: 560px; display: flex; position: relative; }
.topbar form.quick input { padding-left: 2.3rem; padding-right: 5.5rem; border-radius: 999px; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m14 14-3.2-3.2'/%3E%3C/svg%3E") no-repeat .85rem center; box-shadow: none; }
.topbar form.quick button { position: absolute; right: 4px; top: 4px; bottom: 4px; border-radius: 999px; padding: 0 .9rem; font-size: .82rem; }
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-size: .86rem; color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.menu-toggle { display: none; }
.content { padding: 2rem 2rem 4rem; max-width: 1300px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .3rem 0 0; color: var(--muted); }
.banner { padding: .6rem 2rem; font-size: .88rem; border-bottom: 1px solid var(--line); }
.banner.info { background: var(--brand-wash); color: var(--brand-ink); }
.banner.warning { background: var(--warn-wash); color: #92400e; }
.banner.success { background: var(--go-wash); color: #065f46; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 20; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: .6rem 1rem; }
  .content { padding: 1.25rem 1rem 3rem; }
  .topbar .who .email, .topbar .who .avatar { display: none; }
}

/* ---------- Carrier card header ---------- */
.plate {
  background: var(--grad); color: #061225; border-radius: var(--r-xl); padding: 1.8rem 2rem;
  display: grid; grid-template-columns: 1fr auto; gap: 1.25rem 2rem; margin-bottom: 1.1rem; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.plate::after { content: ""; position: absolute; right: -80px; top: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); pointer-events: none; }
.plate .legal { font: 800 2rem/1.1 var(--display); letter-spacing: -.03em; margin: 0; color: #fff; }
.plate .dba { color: rgba(255,255,255,.8); margin: .35rem 0 0; }
.plate .where { color: rgba(255,255,255,.85); margin: .6rem 0 0; font-size: .93rem; }
.plate .numbers { display: flex; gap: .75rem; align-items: flex-start; position: relative; z-index: 1; }
.plate .door { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: var(--r); padding: .7rem 1rem; font: 600 .72rem/1 var(--font); color: rgba(255,255,255,.8); letter-spacing: .04em; min-width: 132px; backdrop-filter: blur(6px); }
.plate .door b { display: block; font: 700 1.55rem/1.1 var(--display); color: #fff; letter-spacing: -.01em; margin-top: .35rem; font-variant-numeric: tabular-nums; }
.plate .roles { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; }
.plate .roles .tag { background: rgba(255,255,255,.18); color: #fff; }
@media (max-width: 760px) {
  .plate { grid-template-columns: 1fr; padding: 1.3rem; }
  .plate .numbers { flex-wrap: wrap; }
  .plate .legal { font-size: 1.55rem; }
}
.flags { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.4rem; }
.flags .tag { font-size: .8rem; padding: .3rem .75rem; }

.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
@media (max-width: 1000px) { .card-grid { grid-template-columns: 1fr; } }
dl.facts { display: grid; grid-template-columns: minmax(130px, 36%) 1fr; margin: 0; font-size: .92rem; }
dl.facts dt { color: var(--muted); padding: .55rem 0; border-bottom: 1px solid var(--line-2); }
dl.facts dd { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--line-2); overflow-wrap: anywhere; font-weight: 500; }
dl.facts dt:last-of-type, dl.facts dd:last-of-type { border-bottom: 0; }

.coverage { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; margin-bottom: 1rem; }
.coverage > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; }
.coverage h4 { font: 600 .78rem/1.2 var(--font); color: var(--muted); margin: 0 0 .5rem; letter-spacing: .02em; }
.coverage .insurer { font-weight: 700; font-family: var(--display); letter-spacing: -.01em; }
.coverage .none { color: var(--stop); font-weight: 600; }
.coverage .na { color: var(--muted); }
@media (max-width: 760px) { .coverage { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 7rem 1fr; gap: .9rem; font-size: .9rem; }
.timeline li span { padding: .55rem 0 .55rem 1.2rem; border-left: 2px solid var(--line); position: relative; }
.timeline li span::before { content: ""; position: absolute; left: -7px; top: .85rem; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; padding: .55rem 0; }

details.raw summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
details.raw dl { margin-top: .9rem; font-size: .85rem; }

.insp { width: 100%; }
.bar { height: 6px; background: var(--line-2); border-radius: 999px; position: relative; margin-top: .35rem; min-width: 80px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand); border-radius: 999px; }
.bar i.over { background: var(--stop); }
.bar s { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .45; text-decoration: none; }

.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.doc-list li:last-child { border-bottom: 0; }
.doc-list .doc { display: flex; align-items: center; min-width: 0; }
.doc-icon { display: inline-flex; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-wash); color: var(--brand); align-items: center; justify-content: center; font: 700 .66rem var(--font); flex: none; margin-right: .75rem; }

/* ---------- Search ---------- */
.search-layout { display: grid; grid-template-columns: 272px 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 1000px) { .search-layout { grid-template-columns: 1fr; } }
.filters { position: sticky; top: 78px; }
.filters .field { margin-bottom: .9rem; }
.bigsearch { display: flex; gap: .5rem; margin-bottom: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .4rem; box-shadow: var(--shadow); }
.bigsearch input { font-size: 1.02rem; padding: .7rem .9rem; border: 0; box-shadow: none; }
.bigsearch input:focus { box-shadow: none; }
.result { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; padding: 1rem .75rem; margin: 0 -.75rem; border-bottom: 1px solid var(--line-2); border-radius: 12px; }
.result:hover { background: var(--surface-2); }
.result:last-child { border-bottom: 0; }
.result h3 { margin: 0 0 .1rem; font-size: 1.02rem; }
.result h3 a { color: var(--ink); }
.result h3 a:hover { color: var(--brand); text-decoration: none; }
.result .ids { text-align: right; font-weight: 600; font-size: .92rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.result .ids span { display: block; color: var(--muted); font-weight: 500; font-size: .86rem; }
.result .meta { color: var(--muted); font-size: .86rem; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .75rem; font-size: .85rem; color: var(--muted); }
.pager-nums { display: flex; gap: .25rem; align-items: center; }
.pager .pg { min-width: 2rem; height: 2rem; padding: 0 .45rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 500; }
.pager button.pg { cursor: pointer; font: inherit; }
.pager a.pg:hover, .pager button.pg:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pager .pg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .pg.off { opacity: .4; }
.pager .pg.gap { border: 0; background: none; min-width: 1rem; }
.pager-per a, .pager-per b { margin-left: .35rem; }
.pager-per b { color: var(--ink); }

/* ---------- Public site ---------- */
.pub-nav { display: flex; align-items: center; gap: 1.75rem; padding: .9rem clamp(1rem, 4vw, 3rem); background: rgba(255,255,255,.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.pub-nav .brand { padding: 0; }
.pub-nav a.link { color: var(--ink-2); font-weight: 500; font-size: .93rem; }
.pub-nav a.link:hover { color: var(--ink); text-decoration: none; }
.pub-nav .right { margin-left: auto; display: flex; gap: 1rem; align-items: center; }
.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 9vw, 6rem) clamp(1rem, 4vw, 3rem) 0; text-align: center;
  background:
    radial-gradient(55% 50% at 15% 0%, rgba(69, 186, 253, .17), transparent 70%),
    radial-gradient(50% 45% at 90% 5%, rgba(37, 99, 235, .16), transparent 70%),
    linear-gradient(180deg, #0d2440 0%, #091a31 100%); }
.hero-inner { max-width: 980px; margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .85rem .3rem .35rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; color: var(--ink-2); box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; }
.eyebrow b { background: var(--grad); color: #fff; padding: .1rem .55rem; border-radius: 999px; font-size: .74rem; }
.hero h1 { font: 800 clamp(2.4rem, 6vw, 4.1rem)/1.05 var(--display); letter-spacing: -.045em; margin: 0 auto 1.1rem; max-width: 16ch; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { font-size: 1.12rem; color: var(--muted); max-width: 40rem; margin: 0 auto; }
.hero-search { display: flex; gap: .5rem; max-width: 620px; margin: 2rem auto 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .45rem; box-shadow: var(--shadow-lg); }
.hero-search input { border: 0; box-shadow: none; font-size: 1.05rem; padding: .75rem 1rem; }
.hero-search input:focus { box-shadow: none; }
.hero .cta { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; margin: 1rem 0 0; }
.hero-stats { display: flex; gap: 3rem; justify-content: center; flex-wrap: wrap; margin: 2.5rem 0 3rem; color: var(--muted); font-size: .88rem; }
.hero-stats b { display: block; color: var(--ink); font: 800 1.7rem/1.1 var(--display); letter-spacing: -.03em; }
.hero .sample { max-width: 900px; margin: 0 auto; text-align: left; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 1.2rem 1.2rem 0; box-shadow: var(--shadow-lg); }
.hero .sample .plate { margin: 0 0 1rem; box-shadow: none; }
.hero .sample .sheet { padding: 0 .4rem 1.2rem; }
.section { max-width: 1160px; margin: 0 auto; padding: 4.5rem clamp(1rem, 4vw, 3rem); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head p { color: var(--muted); }
.section h2 { font-size: 2.05rem; letter-spacing: -.035em; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: var(--shadow); }
.feature .icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-wash); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.feature h3 { font-size: 1.08rem; }
.feature p { color: var(--muted); margin: 0; font-size: .94rem; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 1.8rem; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; }
.plan.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; box-shadow: var(--shadow-lg); }
.plan.featured::before { content: "Most popular"; position: absolute; top: -12px; left: 1.8rem; background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; }
.plan h3 { font-size: 1.15rem; margin: 0; }
.plan .price { font: 800 2.6rem/1 var(--display); letter-spacing: -.04em; margin: 1rem 0 .4rem; }
.plan .price small { font: 500 .9rem var(--font); color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; flex: 1; font-size: .92rem; }
.plan li { padding: .3rem 0 .3rem 1.6rem; position: relative; color: var(--ink-2); }
.plan li::before { content: ""; position: absolute; left: 0; top: .55rem; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='%234f46e5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 5.2 2 2L8 3'/%3E%3C/svg%3E") no-repeat center; }
.plan li.off { color: var(--faint); text-decoration: line-through; }
.plan li.off::before { background: var(--line-2); }
.plan li.plan-plus { padding-left: 0; color: var(--ink); margin-top: .2rem; }
.plan li.plan-plus::before { display: none; }
.foot { border-top: 1px solid var(--line); padding: 2rem clamp(1rem, 4vw, 3rem); color: var(--muted); font-size: .86rem; display: flex; gap: 1.5rem; flex-wrap: wrap; background: var(--surface); }
.foot a { color: var(--ink-2); }
.auth-wrap { min-height: calc(100vh - 140px); display: flex; align-items: center; justify-content: center; padding: 3rem 1rem;
  background: radial-gradient(50% 50% at 50% 0%, rgba(69, 186, 253, .12), transparent 70%), var(--bg); }
.auth { width: 100%; max-width: 440px; margin: 0 auto; }
.auth .panel { padding: 2.2rem; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.auth h1 { font-size: 1.6rem; }
.prose { max-width: 70ch; }

/* ---------- Misc ---------- */
.kbd { background: var(--line-2); border: 1px solid var(--line); border-radius: 6px; padding: .05rem .4rem; font-size: .86em; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
.preview-frame { border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; background: var(--surface); max-height: 520px; overflow: auto; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .2rem 1.5rem; }
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--go); margin-right: .4rem; box-shadow: 0 0 0 3px var(--go-wash); }
.dot-live.stale { background: var(--stop); box-shadow: 0 0 0 3px var(--stop-wash); }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: .5rem; }
.spark div { flex: 1; background: var(--grad); min-height: 2px; border-radius: 5px 5px 2px 2px; position: relative; }
.spark div span { position: absolute; bottom: -1.5rem; left: 50%; transform: translateX(-50%); font-size: .68rem; color: var(--muted); white-space: nowrap; }
.mail-body { white-space: pre-wrap; font-size: .94rem; background: var(--surface-2); border: 1px solid var(--line); padding: 1.1rem; border-radius: var(--r); overflow-wrap: anywhere; }
.progress { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-top: .3rem; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.option { display: flex; gap: .7rem; border: 1px solid var(--line); border-radius: var(--r); padding: .85rem 1rem; margin-bottom: .55rem; cursor: pointer; font-weight: 400; transition: border-color .15s, background .15s; }
.option:hover { border-color: #c7d2fe; }
.option:has(input:checked) { border-color: var(--brand); background: var(--brand-wash); }
.option input { margin-top: .3rem; accent-color: var(--brand); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.card-grid > *, .split > *, .search-layout > *, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }

/* ===================== Compact density: less scrolling ===================== */
body { font-size: 14px; line-height: 1.5; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.02rem; }
h3 { font-size: .95rem; }
.content { padding: 1.1rem 1.5rem 2rem; max-width: 1480px; }
.page-head { margin-bottom: .9rem; align-items: center; }
.page-head p { margin-top: .1rem; font-size: .88rem; }
.panel { padding: .95rem 1.1rem; margin-bottom: .85rem; border-radius: 14px; }
.panel-head { margin-bottom: .6rem; }
.table-wrap { margin: 0 -1.1rem; padding: 0 1.1rem; }
.stats { gap: .65rem; margin-bottom: .85rem; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.stat { padding: .65rem .9rem; border-radius: 12px; }
.stat b { font-size: 1.3rem; margin-bottom: 0; }
.stat span { font-size: .78rem; }
th { padding: .4rem .55rem; font-size: .74rem; }
td { padding: .42rem .55rem; }
.field { margin-bottom: .7rem; }
label { font-size: .8rem; margin-bottom: .2rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=date], input[type=url], input[type=tel], select, textarea { padding: .42rem .6rem; font-size: .88rem; }
textarea { min-height: 5.5rem; }
.btn { padding: .45rem .85rem; font-size: .84rem; }
.btn-sm { padding: .28rem .55rem; font-size: .78rem; }
.notice { padding: .55rem .8rem; margin-bottom: .75rem; font-size: .86rem; }
.topbar { padding: .5rem 1.5rem; }
.side { padding: .8rem .6rem 1.5rem; }
.brand { padding-bottom: .6rem; }
.side .group { padding: .7rem .7rem .2rem; }
.side a.nav { padding: .32rem .7rem; font-size: .85rem; }
.empty { padding: 1.6rem 1rem; }
dl.facts dt, dl.facts dd { padding: .32rem 0; }
dl.facts { font-size: .86rem; }
.timeline li span, .timeline time { padding-top: .35rem; padding-bottom: .35rem; }
.doc-list li { padding: .45rem 0; }
.grid-2, .grid-3, .grid-4 { gap: 0 .8rem; }
.check { margin-bottom: .25rem; }
.flags { margin-bottom: .8rem; }

/* Single-line rows: long names truncate instead of wrapping the whole table. */
.t-compact td { white-space: nowrap; }
.t-compact td.wrap { white-space: normal; }
.t-compact .clip { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.t-compact .clip-sm { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.t-compact small { font-size: .78rem; }

/* Filter bar: key filters in one row, the rest folded away. */
.filterbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.filterbar .fb { flex: 1 1 130px; min-width: 120px; }
.filterbar .fb.wide { flex: 2 1 240px; }
.filterbar .fb.narrow { flex: 0 1 105px; min-width: 95px; }
.filterbar label { margin-bottom: .15rem; }
.filterbar .fb-actions { display: flex; gap: .4rem; align-items: center; }
details.more { margin-top: .6rem; border-top: 1px dashed var(--line); padding-top: .5rem; }
details.more > summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--brand); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: .5rem; }

/* Dropdown multi-select (equipment). */
details.dropdown { position: relative; }
details.dropdown > summary { list-style: none; cursor: pointer; padding: .42rem .6rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: var(--shadow-sm); }
details.dropdown > summary::-webkit-details-marker { display: none; }
details.dropdown > summary::after { content: "▾"; float: right; color: var(--muted); margin-left: .4rem; }
details.dropdown .menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .5rem; display: grid; grid-template-columns: 1fr 1fr; gap: .1rem .6rem; }
details.dropdown .menu label { display: flex; gap: .4rem; align-items: center; font-weight: 400; font-size: .84rem; color: var(--ink-2); padding: .2rem .25rem; margin: 0; border-radius: 6px; cursor: pointer; white-space: nowrap; }
details.dropdown .menu label:hover { background: var(--line-2); }

/* Tabs: one section visible at a time instead of a long page. */
.tab-nav { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin: 0 0 .85rem; overflow-x: auto; scrollbar-width: none; }
.tab-nav button { background: none; border: 0; border-bottom: 2px solid transparent; padding: .5rem .8rem; font: 600 .85rem var(--font); color: var(--muted); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tab-nav button:hover { color: var(--ink); }
.tab-nav button.on { color: var(--brand); border-bottom-color: var(--brand); }
.tab-nav button .count { background: var(--line-2); color: var(--ink-2); border-radius: 999px; padding: 0 .4rem; font-size: .72rem; margin-left: .25rem; }
.js-tabs .tab-pane[hidden] { display: none; }

/* Carrier card header, compact. */
.plate { padding: 1.05rem 1.35rem; gap: .8rem 1.5rem; margin-bottom: .75rem; border-radius: 18px; }
.plate .legal { font-size: 1.5rem; }
.plate .where { margin-top: .3rem; font-size: .86rem; }
.plate .roles { margin-top: .55rem; }
.plate .door { padding: .45rem .75rem; min-width: 112px; }
.plate .door b { font-size: 1.2rem; margin-top: .2rem; }
.coverage { gap: .6rem; }
.coverage > div { padding: .7rem .85rem; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 .85rem; }
@media (max-width: 1100px) { .three { grid-template-columns: 1fr; } }
.result { padding: .6rem .75rem; }
.search-layout { grid-template-columns: 1fr; }
dl.facts.raw4 { grid-template-columns: minmax(120px, 20%) minmax(0, 30%) minmax(120px, 20%) minmax(0, 30%); column-gap: .8rem; }
@media (max-width: 900px) { dl.facts.raw4 { grid-template-columns: minmax(120px, 40%) 1fr; } }
.three dl.facts { grid-template-columns: minmax(100px, 38%) 1fr; }
.t-compact .clip { max-width: 220px; }
.t-compact .clip-sm { max-width: 150px; }

/* Inline row actions with a small pop-over for settings */
.row-actions { display: flex; gap: .35rem; align-items: center; justify-content: flex-end; white-space: nowrap; }
.row-actions form.inline { display: inline-flex; gap: .35rem; }
details.pop { position: relative; }
details.pop > summary { list-style: none; }
details.pop > summary::-webkit-details-marker { display: none; }
details.pop .pop-body { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 20; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem; box-shadow: 0 12px 32px rgba(15, 23, 42, .14); white-space: normal; }

/* List tables: one line per row so a full page fits on screen */
table.t-compact td { padding-top: .38rem; padding-bottom: .38rem; vertical-align: middle; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
table.t-compact td br { display: none; }
table.t-compact td br + small, table.t-compact td br + span, table.t-compact td br + a { margin-left: .45rem; }
table.t-compact td small { color: var(--muted); }
table.t-compact .tag { padding-top: .05rem; padding-bottom: .05rem; }
.send-pop .pop-body { width: 340px; }
.send-pop label.choice { display: flex; gap: .5rem; align-items: flex-start; margin: .55rem 0 .25rem; cursor: pointer; font-weight: 400; }
.send-pop label.choice input { margin-top: .2rem; }
.send-pop .choice-body { margin-left: 1.5rem; }
.send-pop .choice-body input, .send-pop .choice-body select { width: 100%; }

/* ===================== Overflow guard: nothing may push a page sideways ===================== */
.shell { grid-template-columns: 252px minmax(0, 1fr); }
@media (max-width: 900px) { .shell { grid-template-columns: minmax(0, 1fr); } }
.main, .content, .panel, .plate, .tab-pane, section { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.coverage { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .card-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .coverage { grid-template-columns: minmax(0, 1fr); } }
.stats > *, .coverage > *, .plans > *, .features > *, .card-grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .split > *, .search-layout > *, .result > * { min-width: 0; }
dl.facts { grid-template-columns: minmax(110px, 36%) minmax(0, 1fr); }
dl.facts dd, .panel p, .panel li, .notice, .plate h1, .plate p { overflow-wrap: anywhere; }
.tag { white-space: normal; max-width: 100%; line-height: 1.35; text-align: left; }
table.t-compact .tag, .pager .tag { white-space: nowrap; }
dl.facts dd .tag { margin: 0 .25rem .2rem 0; }
.page-head { flex-wrap: wrap; gap: .75rem; }
.page-head > div:first-child { min-width: 0; }
.page-head h1 { overflow-wrap: anywhere; }
.actions > * { max-width: 100%; }
input, select, textarea { max-width: 100%; }
img, svg, video { max-width: 100%; }
pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }
.banner, .flash, .notice, .empty, .hint, h1, h2, h3, dd, p { overflow-wrap: anywhere; }
td, li { overflow-wrap: break-word; }
.banner { min-width: 0; }

/* Less important columns step aside on narrower screens instead of pushing the table sideways */
@media (max-width: 2000px) { .col-opt { display: none; } }
@media (max-width: 1500px) { .col-opt2 { display: none; } }
.t-compact .clip { max-width: 210px; }
.t-compact .clip-sm { max-width: 140px; }
details.dropdown .menu { width: max-content; max-width: min(360px, calc(100vw - 2rem)); }
details.dropdown .menu label { white-space: normal; }
.table-wrap.auto { margin: 0; padding: 0; }
details.dropdown .menu.flip { left: auto; right: 0; }
table.t-compact td, table.t-compact th { padding-left: .5rem; padding-right: .5rem; }
dl.facts dt { padding-right: .75rem; overflow-wrap: break-word; }
.tab-nav { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; } .tab-nav::-webkit-scrollbar { display: none; } .tab-nav button { flex: 0 0 auto; }

/* ===================== Announcement ticker ===================== */
.ticker { position: relative; display: flex; align-items: center; height: 34px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #fff; font-size: .84rem; font-weight: 500; overflow: hidden; z-index: 40; }
.ticker[hidden] { display: none; }
.ticker-viewport { flex: 1; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: inline-flex; white-space: nowrap; animation: ticker var(--dur, 30s) linear infinite; will-change: transform; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-run { display: inline-flex; }
.ticker-item { padding: 0 2.5rem 0 0; }
.ticker-item::before { content: "●"; font-size: .55rem; margin-right: .6rem; vertical-align: middle; opacity: .8; }
.ticker-item.warning::before { color: #fde68a; opacity: 1; }
.ticker-item.success::before { color: #86efac; opacity: 1; }
.ticker-close { flex: 0 0 auto; width: 34px; height: 34px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.1rem; cursor: pointer; }
.ticker-close:hover { background: rgba(255,255,255,.25); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker { height: auto; min-height: 34px; }
  .ticker-track { animation: none; white-space: normal; padding: .4rem 1rem; }
  .ticker-run[aria-hidden] { display: none; }
}

/* ===================== Ad slots ===================== */
.ad-slot { margin: 1rem 0; padding: .5rem; border: 1px dashed var(--line); border-radius: 12px; text-align: center; overflow: hidden; min-height: 60px; }
.ad-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .25rem; }

/* ===================== Free search ===================== */
.find-wrap { max-width: 1100px; margin: 1.5rem auto 2.5rem; padding: 0 clamp(1rem, 4vw, 2rem); }
.find-box { display: flex; gap: .5rem; margin-bottom: 1rem; }
.find-box input { flex: 1; min-width: 0; font-size: 1.02rem; padding: .8rem 1rem; border-radius: 12px; }
.find-hint { text-align: center; margin: 1.5rem auto; max-width: 560px; }
.find-cta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: center; margin-top: 1.25rem; padding: .9rem 1rem; border-radius: 14px; background: var(--brand-wash); color: var(--brand-ink); font-size: .9rem; }
.card-public { max-width: 1240px; margin: 1.25rem auto 2rem; padding: 0 clamp(1rem, 3vw, 2rem); }
.plans:has(> .plan:only-child) { grid-template-columns: minmax(0, 460px); justify-content: center; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; width: 100%; }
.serp { display: grid; gap: .15rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; margin: 1.35rem 0 .9rem; background: var(--surface); }
.serp-url { font-size: .78rem; color: #4d5156; }
.serp-title { font-size: 1.1rem; color: #1a0dab; overflow-wrap: anywhere; }
.serp-desc { font-size: .84rem; color: #4d5156; overflow-wrap: anywhere; }
/* Visitors chart and rankings */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 170px; padding-top: 1.2rem; }
.bar-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bar-col i { display: block; width: 100%; max-width: 38px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); }
.bar-n { font-size: .68rem; color: var(--muted); margin-bottom: 2px; }
.bar-d { font-size: .68rem; color: var(--muted); margin-top: 4px; }
.rank { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .38rem 0; border-bottom: 1px solid var(--line-2); font-size: .88rem; color: var(--ink); }
a.rank { grid-template-columns: minmax(90px, 140px) minmax(0, 1fr) auto; }
a.rank:hover { text-decoration: none; background: var(--line-2); }
.rank-bar { height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }

/* ===================== Admin dashboard ===================== */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: .9rem; }
.kpi { position: relative; display: grid; gap: .15rem; padding: .9rem 1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); overflow: hidden; min-width: 0; }
.kpi:hover { text-decoration: none; border-color: var(--brand); box-shadow: 0 6px 20px rgba(79, 70, 229, .10); }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--k, var(--brand)); }
.kpi span { font-size: .78rem; color: var(--muted); font-weight: 500; }
.kpi b { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 1.55rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.kpi small { font-size: .74rem; color: var(--muted); overflow-wrap: anywhere; }
.k-money { --k: #16a34a; } .k-subs { --k: #4f46e5; } .k-users { --k: #7c3aed; } .k-visits { --k: #0891b2; } .k-pay { --k: #d97706; } .k-data { --k: #0f766e; }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; align-items: start; }
.dash-grid > .panel { margin: 0; min-width: 0; }
.dash-grid .span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-grid .span-2 { grid-column: auto; } }
@media (max-width: 700px) {
  .pub-nav { gap: .6rem; padding-left: 1rem; padding-right: 1rem; }
  .pub-nav > a.link { display: none; }
  .pub-nav .right { gap: .6rem; }
  .pub-nav .right .btn { padding-left: .8rem; padding-right: .8rem; white-space: nowrap; }
  .pub-nav .brand b, .pub-nav .brand strong { white-space: nowrap; }
}

/* ===================== Phones and tablets ===================== */
/* iOS zooms into any field with text under 16px; keep fields at 16px on touch screens */
@media (max-width: 900px) {
  input, select, textarea, .topbar form.quick input { font-size: 16px; }
  .side { z-index: 80; padding-top: .9rem; }
  body.menu-open { overflow: hidden; }
  body.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 70; }
  .topbar { flex-wrap: wrap; gap: .5rem; row-gap: .55rem; }
  .topbar form.quick { order: 3; flex: 1 0 100%; max-width: none; }
  .topbar .who { margin-left: auto; }
}
@media (max-width: 700px) {
  .brand-name { white-space: nowrap; }
  .pub-nav .brand { padding: 0; }
  .pub-nav .right a.link { white-space: nowrap; }
  h1 { font-size: 1.35rem; }
  .page-head { margin-bottom: 1rem; }
  .page-head .actions { width: 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .kpi { padding: .75rem .8rem; }
  .kpi b { font-size: 1.25rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: .85rem .9rem; border-radius: 14px; }
  .tab-nav button { padding-left: .6rem; padding-right: .6rem; }
  .find-box .btn, .hero-search .btn { padding-left: 1rem; padding-right: 1rem; }
  .pager { justify-content: center; }
  .pager-info { width: 100%; text-align: center; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }
}

/* Tables become easy-to-read cards on phones (labels come from the column headings) */
@media (max-width: 640px) {
  .table-wrap:has(table.t-compact, table.stack) { margin: 0; padding: 0; overflow: visible; }
  table:is(.t-compact,.stack), table:is(.t-compact,.stack) tbody { display: block; width: 100%; }
  table:is(.t-compact,.stack) thead { display: none; }
  table:is(.t-compact,.stack) tr { display: block; padding: .6rem .1rem; border-bottom: 1px solid var(--line); }
  table:is(.t-compact,.stack) tr:last-child { border-bottom: 0; }
  table:is(.t-compact,.stack) td { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .18rem 0 !important; border: 0; max-width: none; white-space: normal; text-align: right; }
  table:is(.t-compact,.stack) td::before { content: attr(data-label); flex: 0 0 auto; max-width: 42%; color: var(--muted); font-size: .76rem; font-weight: 500; text-align: left; }
  table:is(.t-compact,.stack) td:not([data-label])::before, table:is(.t-compact,.stack) td[data-label=""]::before { display: none; }
  table:is(.t-compact,.stack) td:first-child { font-size: .98rem; }
  table:is(.t-compact,.stack) td[colspan] { justify-content: flex-start; text-align: left; }
  table:is(.t-compact,.stack) td br { display: inline; }
  table:is(.t-compact,.stack) td br + small, table:is(.t-compact,.stack) td br + span, table:is(.t-compact,.stack) td br + a { margin-left: 0; }
  table:is(.t-compact,.stack) td > .cell { min-width: 0; text-align: right; overflow-wrap: anywhere; }
  table:is(.t-compact,.stack) .clip, table:is(.t-compact,.stack) .clip-sm { max-width: 62vw; }
  table:is(.t-compact,.stack) td.n { text-align: right; }
  table:is(.t-compact,.stack) .row-actions { justify-content: flex-end; flex-wrap: wrap; }
  table:is(.t-compact,.stack) details.pop .pop-body { right: auto; left: 50%; transform: translateX(-50%); width: min(300px, 90vw); }
}
@media (max-width: 700px) {
  .pub-nav { gap: .9rem; }
  .pub-nav .brand-name { font-size: 1rem; }
  .pub-nav .right a.link { font-size: .9rem; }
}
@media (min-width: 2001px) { .content { max-width: 1960px; } }

/* ===================== Home search: pick MC / USDOT / name, then type ===================== */
.lookup { width: 100%; max-width: 640px; margin: 1.6rem auto .9rem; text-align: left; scroll-margin-top: 96px; }
.lookup-types { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin-bottom: .6rem; }
.lookup-types .lt { margin: 0; cursor: pointer; }
.lookup-types .lt input { position: absolute; opacity: 0; pointer-events: none; }
.lookup-types .lt span { display: inline-flex; align-items: center; height: 38px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .9rem; transition: background .15s, color .15s, border-color .15s; }
.lookup-types .lt:hover span { border-color: var(--brand); color: var(--brand); }
.lookup-types .lt input:checked + span { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .25); }
.lookup-types .lt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.lookup-row { display: flex; gap: .5rem; padding: .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
.lookup-row input { flex: 1; min-width: 0; border: 0; box-shadow: none; font-size: 1.02rem; padding: .7rem .8rem; background: transparent; }
.lookup-row input:focus { outline: none; box-shadow: none; }
.lookup-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-wash), 0 10px 30px rgba(15, 23, 42, .08); }
.lookup-results { max-width: 1100px; margin: 0 auto 1.5rem; text-align: left; }
.lookup-error { max-width: 640px; margin: 0 auto 1rem; }
@media (max-width: 700px) {
  .lookup-types .lt span { height: 36px; padding: 0 .8rem; font-size: .85rem; }
  .lookup-row input { font-size: 16px; }
}
.card-public .lookup { margin-top: .4rem; }
@media (max-width: 700px) {
  .lookup-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; padding: .25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
  .lookup-types .lt span { width: 100%; justify-content: center; height: 36px; padding: 0 .3rem; font-size: .8rem; border: 0; border-radius: 10px; background: transparent; white-space: nowrap; }
  .lookup-types .lt input:checked + span { box-shadow: none; }
}

/* Background progress + campaign timing */
.spinner{display:inline-block;width:.85em;height:.85em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-.1em;animation:spin .8s linear infinite;opacity:.7}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spinner{animation:none}}
.estimate{display:flex;gap:.9rem;align-items:flex-start;padding:.85rem 1rem;border:1px solid var(--line-2);border-radius:10px;background:var(--panel-2,rgba(0,0,0,.02));margin:.8rem 0}
.estimate b.big{font-size:1.15rem;display:block}
.estimate .muted{display:block;margin-top:.15rem}
.when-choice{display:grid;gap:.5rem;margin:.4rem 0 .8rem}
.when-choice .choice-body{margin-left:1.6rem}
.inbox-bar{justify-content:space-between;margin-bottom:.6rem}
.inbox-table td.pick{width:2rem;padding-right:0}
.btn-link.danger{color:var(--stop,#b91c1c)}
.ann-row{display:flex;gap:.8rem;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:.8rem 0}
.ann-head{flex:1 1 260px;min-width:0;overflow-wrap:anywhere}
.ann-edit{order:3}
.ann-edit[open]{flex-basis:100%}
.ann-edit-body{margin-top:.6rem;padding:.8rem;border:1px solid var(--line);border-radius:10px;max-width:560px}
.tag{white-space:nowrap}

/* ---------- Support tickets ---------- */
.tk-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.tk-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-open { background: var(--info-wash); color: var(--info); border-color: #bfdbfe; }
.st-progress { background: var(--warn-wash); color: var(--warn); border-color: #fde68a; }
.st-waiting { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.st-resolved { background: var(--go-wash); color: var(--go); border-color: #a7f3d0; }
.st-closed { background: var(--line-2); color: var(--muted); border-color: var(--line); }
.tk-tag.pri-low { background: var(--line-2); color: var(--muted); border-color: var(--line); }
.tk-tag.pri-normal { background: var(--info-wash); color: var(--info); border-color: #bfdbfe; }
.tk-tag.pri-high { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.tk-tag.pri-urgent { background: var(--stop); color: #fff; border-color: var(--stop); }
.tk-tag.pri-urgent::before { background: #fff; }
.tk-row td:first-child { border-left: 4px solid transparent; }
.tk-row.pri-high td:first-child { border-left-color: #fb923c; }
.tk-row.pri-urgent td:first-child { border-left-color: var(--stop); }
.tk-row.pri-low td:first-child { border-left-color: var(--line); }
.tk-attn td { background: #fafaff; }
.tk-attn td:nth-child(2) a { color: var(--brand-ink) !important; }
.tk-new { display: inline-block; margin-left: .3rem; padding: .05rem .45rem; border-radius: 6px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; vertical-align: middle; }
.tk-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tk-tabs a { padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .86rem; font-weight: 600; text-decoration: none; }
.tk-tabs a span { margin-left: .25rem; color: var(--muted); font-weight: 500; }
.tk-tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tk-tabs a.on span { color: rgba(255,255,255,.7); }
.tk-steps { list-style: none; display: flex; margin: .4rem 0 0; padding: 0; counter-reset: s; }
.tk-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; position: relative; color: var(--muted); font-size: .85rem; font-weight: 600; text-align: center; }
.tk-steps li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.tk-steps li:first-child::before { display: none; }
.tk-steps b { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); color: var(--muted); font-size: .85rem; }
.tk-steps li.done { color: var(--go); }
.tk-steps li.done b { background: var(--go); border-color: var(--go); color: #fff; }
.tk-steps li.done::before, .tk-steps li.now::before { background: var(--go); }
.tk-steps li.now { color: var(--brand-ink); }
.tk-steps li.now b { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-wash); }
.tk-steps li.wait { color: #6d28d9; }
.tk-steps li.wait b { border-color: #7c3aed; color: #7c3aed; box-shadow: 0 0 0 4px #f5f3ff; }
.tk-thread { display: flex; flex-direction: column; gap: .8rem; }
.tk-msg { max-width: 88%; padding: .8rem 1rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.tk-msg.mine { align-self: flex-end; background: var(--brand-wash); border-color: #c7d2fe; }
.tk-msg.staff { align-self: flex-start; background: var(--surface); }
.tk-msg.note { align-self: stretch; max-width: none; background: #fffbeb; border: 1px dashed #f59e0b; }
.tk-meta { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); margin-bottom: .35rem; }
.tk-meta time { color: var(--muted); }
.tk-body { white-space: pre-wrap; word-wrap: break-word; font-size: .93rem; color: var(--ink); line-height: 1.55; }
.tk-event { align-self: center; font-size: .8rem; color: var(--muted); background: var(--line-2); padding: .25rem .75rem; border-radius: 999px; }
.tk-event time { margin-left: .3rem; }
.tk-edit { margin-top: .5rem; font-size: .82rem; }
.tk-edit summary { cursor: pointer; color: var(--muted); }
.tk-edit form { margin-top: .5rem; }
.tk-reply { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.tk-howto { margin: .5rem 0 1rem 1.1rem; padding: 0; color: var(--ink-2); }
.tk-howto li { margin: .45rem 0; }
.tk-others { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.tk-others li { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--line-2); }
@media (max-width: 640px) { .tk-msg { max-width: 100%; } .tk-steps li { font-size: .75rem; } }

/* ---------- Homepage motion ---------- */
.fx-hero { isolation: isolate; }
.fx-orbs { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fx-orbs i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: .55; animation: fxdrift 22s ease-in-out infinite alternate; }
.fx-orbs i:nth-child(1) { background: radial-gradient(circle, rgba(99,102,241,.55), transparent 65%); top: -22vmax; left: -12vmax; }
.fx-orbs i:nth-child(2) { background: radial-gradient(circle, rgba(168,85,247,.45), transparent 65%); top: -18vmax; right: -16vmax; animation-duration: 26s; animation-delay: -6s; }
.fx-orbs i:nth-child(3) { background: radial-gradient(circle, rgba(56,189,248,.32), transparent 65%); top: 18vmax; left: 22vmax; animation-duration: 30s; animation-delay: -12s; }
.fx-orbs i:nth-child(4) { background: radial-gradient(circle, rgba(251,191,36,.22), transparent 65%); top: 30vmax; right: 6vmax; width: 30vmax; height: 30vmax; animation-duration: 24s; }
@keyframes fxdrift { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(6vmax,3vmax,0) scale(1.12); } 100% { transform: translate3d(-4vmax,5vmax,0) scale(.95); } }
.fx-gridbg { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(79,70,229,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(79,70,229,.07) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 70%); }
.fx-rise { animation: fxrise .9s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0s); }
@keyframes fxrise { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.fx-shine { background-size: 200% auto !important; animation: fxshine 5s linear infinite; background-image: linear-gradient(110deg, #4f46e5 0%, #8b5cf6 30%, #ec4899 50%, #8b5cf6 70%, #4f46e5 100%) !important; }
@keyframes fxshine { to { background-position: 200% center; } }
.fx-reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.fx-reveal.in { opacity: 1; transform: none; }

.fx-live { display: inline-flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: center; margin: 1.4rem auto 0; padding: .55rem 1rem; border-radius: 999px;
  background: #0b1026; color: #e0e7ff; text-decoration: none; font-size: .88rem; box-shadow: 0 10px 30px rgba(79,70,229,.3); border: 1px solid rgba(139,92,246,.4); }
.fx-live b { color: #fbbf24; font-variant-numeric: tabular-nums; }
.fx-live .sep { color: #6366f1; }
.fx-live .go { color: #c4b5fd; font-weight: 600; }
.fx-live:hover { transform: translateY(-1px); box-shadow: 0 14px 40px rgba(124,58,237,.45); }
.fx-dot { width: 9px; height: 9px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: fxping 1.6s infinite; }
@keyframes fxping { 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.fx-stream { max-width: 900px; margin: 1rem auto 0; overflow: hidden; opacity: 0; transition: opacity .6s; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.fx-stream.on { opacity: 1; }
.fx-stream .track { display: inline-flex; gap: .5rem; white-space: nowrap; animation: fxscroll 60s linear infinite; }
.fx-stream .chip { padding: .3rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .78rem; color: var(--ink-2); }
.fx-stream .chip b { color: var(--brand-ink); margin-right: .2rem; }
.fx-stream .chip.gold { border-color: #fde68a; background: #fffbeb; }
@keyframes fxscroll { to { transform: translateX(-50%); } }

.fx-road { position: relative; height: 64px; max-width: 900px; margin: -1.2rem auto .4rem; overflow: hidden; }
.fx-road::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 3px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, rgba(99,102,241,.45) 0 26px, transparent 26px 46px); animation: fxlane 1.2s linear infinite; }
@keyframes fxlane { to { background-position: -46px 0; } }
.fx-truck { position: absolute; bottom: 4px; left: -140px; animation: fxdrive 14s linear infinite; }
.fx-truck svg { display: block; filter: drop-shadow(0 8px 14px rgba(79,70,229,.35)); animation: fxbump .35s ease-in-out infinite alternate; }
@keyframes fxdrive { to { left: 105%; } }
@keyframes fxbump { to { transform: translateY(-1.5px); } }
.fx-packet { position: absolute; width: 10px; height: 10px; border-radius: 3px; background: #fbbf24; box-shadow: 0 0 10px #fbbf24; top: 8px; left: 14px; opacity: 0; animation: fxpacket 2.4s ease-out infinite; }
.fx-packet.p2 { animation-delay: .8s; background: #a78bfa; box-shadow: 0 0 10px #a78bfa; }
.fx-packet.p3 { animation-delay: 1.6s; }
@keyframes fxpacket { 0% { opacity: 0; transform: translate(0,0) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-60px,-34px) scale(1); } }

.fx-tilt { transition: transform .25s ease, box-shadow .25s ease; transform-style: preserve-3d; position: relative; }
.fx-tilt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(500px circle at var(--gx, 50%) var(--gy, 0%), rgba(139,92,246,.12), transparent 40%); }
.fx-tilt:hover::before { opacity: 1; }
.fx-tilt:hover { box-shadow: 0 30px 80px rgba(79,70,229,.22); }

.fx-how .section-head { text-align: center; }
.fx-pipe { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.fx-step { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem 1.2rem; box-shadow: var(--shadow); }
.fx-step .n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; margin-bottom: .8rem; box-shadow: 0 8px 20px rgba(79,70,229,.35); }
.fx-step h3 { font-size: 1rem; margin: 0 0 .35rem; }
.fx-step p { margin: 0; color: var(--muted); font-size: .9rem; }
.fx-step:hover { transform: translateY(-4px); border-color: #c7d2fe; transition: transform .25s, border-color .25s; }
.fx-flow { position: absolute; left: 8%; right: 8%; top: 38px; height: 3px; background: linear-gradient(90deg, #c7d2fe, #ddd6fe); border-radius: 3px; z-index: 0; }
.fx-flow i { position: absolute; top: -4px; width: 11px; height: 11px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 12px #fbbf24; animation: fxflow 4s linear infinite; }
.fx-flow i:nth-child(2) { animation-delay: -1s; background: #a78bfa; box-shadow: 0 0 12px #a78bfa; }
.fx-flow i:nth-child(3) { animation-delay: -2s; }
.fx-flow i:nth-child(4) { animation-delay: -3s; background: #34d399; box-shadow: 0 0 12px #34d399; }
@keyframes fxflow { from { left: 0; } to { left: 100%; } }
.fx-glow { box-shadow: 0 10px 30px rgba(124,58,237,.35); }
.fx-glow:hover { box-shadow: 0 14px 40px rgba(124,58,237,.5); }
.feature { transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
.feature:hover .icon { animation: fxwiggle .5s ease; }
@keyframes fxwiggle { 30% { transform: rotate(-10deg) scale(1.1); } 60% { transform: rotate(8deg) scale(1.1); } }
@media (max-width: 860px) { .fx-pipe { grid-template-columns: 1fr 1fr; } .fx-flow { display: none; } }
@media (max-width: 520px) { .fx-pipe { grid-template-columns: 1fr; } .fx-road { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .fx-orbs i, .fx-rise, .fx-shine, .fx-stream .track, .fx-truck, .fx-truck svg, .fx-packet, .fx-flow i, .fx-dot, .fx-road::after { animation: none !important; }
  .fx-reveal { opacity: 1; transform: none; transition: none; }
  .fx-truck { left: 40%; }
}

.option img.qr { display: block; width: 128px; height: 128px; object-fit: contain; margin-top: .5rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 4px; }

.refer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1rem; }
.refer-stats div { background: var(--brand-wash); border-radius: var(--r); padding: .7rem; text-align: center; }
.refer-stats b { display: block; font: 800 1.4rem var(--display); color: var(--brand-ink); }
.refer-stats span { font-size: .78rem; color: var(--muted); }

.address-ask { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb, var(--surface)); }
.address-ask h3 { margin-top: 0; }

.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.state-grid a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .8rem 1rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .2s, border-color .2s; }
.state-grid a:hover { transform: translateY(-2px); border-color: #c7d2fe; }
.state-grid span { font-size: .8rem; color: var(--brand-ink); background: var(--brand-wash); border-radius: 99px; padding: .1rem .55rem; white-space: nowrap; }
.state-cta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-color: #c7d2fe; background: linear-gradient(135deg, var(--brand-wash), var(--surface)); }
.state-cta > div { flex: 1 1 320px; }

.tk-send { flex-wrap: nowrap; }
.tk-send select { width: auto; }
@media (max-width: 560px) { .tk-send { flex-wrap: wrap; width: 100%; } .tk-send select { flex: 1 1 100%; width: 100%; } .tk-send .btn { flex: 1 1 100%; } }
/* Phones: 16px text in form fields, so iOS doesn't zoom the page when a field is tapped */
@media (max-width: 760px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
}

/* Inbox on phones: each email becomes a card (sender, subject, time) instead of squeezed columns */
@media (max-width: 700px) {
  .inbox-table, .inbox-table tbody { display: block; }
  .inbox-table tr { display: grid; grid-template-columns: 2rem 1fr auto; gap: .15rem .5rem; padding: .7rem .2rem; border-bottom: 1px solid var(--line); }
  .inbox-table td { display: block; border: 0 !important; padding: 0 !important; width: auto !important; min-width: 0; overflow-wrap: anywhere; }
  .inbox-table td.pick { grid-row: span 2; padding-top: .2rem !important; }
  .inbox-table td:nth-child(2) { grid-column: 2; }
  .inbox-table td:nth-child(3) { grid-column: 2 / 4; grid-row: 2; }
  .inbox-table td:nth-child(4) { grid-column: 3; grid-row: 1; text-align: right; }
  .inbox-table td:nth-child(5) { grid-column: 2 / 4; text-align: left; }
}
/* Homepage live strip on phones: a tidy rounded card */
@media (max-width: 600px) {
  .fx-live { display: grid; grid-template-columns: auto 1fr; gap: .2rem .6rem; border-radius: 18px; text-align: left; padding: .7rem 1rem; }
  .fx-live .fx-dot { grid-row: span 2; align-self: center; }
  .fx-live .sep { display: none; }
  .fx-live .go { grid-column: 1 / 3; text-align: center; margin-top: .3rem; padding-top: .4rem; border-top: 1px solid rgba(139,92,246,.3); }
}

/* Two-step sign-in */
.twofa-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 1.1rem; }
.twofa-steps li { line-height: 1.55; }
.qr-box { background: #fff; border-radius: 12px; padding: 0; overflow: hidden; display: inline-block; margin: .7rem 0 .3rem; box-shadow: 0 1px 4px rgba(15,23,42,.12); }
.qr-box svg { display: block; width: 240px; height: 240px; max-width: 70vw; max-height: 70vw; }
code.secret { word-break: break-all; font-size: .95em; letter-spacing: .04em; }
.twofa-confirm { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.twofa-confirm input { width: 10rem; }
.code-input { font-size: 1.25rem !important; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.recovery .codes { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem; }
.recovery .codes code { display: block; padding: .5rem .7rem; border-radius: 8px; background: var(--wash, #f1f5f9); font-size: 1.05rem; text-align: center; }
.idle-warn { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; max-width: calc(100% - 32px);
  display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; justify-content: center; background: #0f172a; color: #fff;
  padding: .75rem 1rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(15,23,42,.35); font-size: .95rem; }
.idle-warn button { flex: none; }

/* System health */
.hc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.hc-item { display: flex; gap: .8rem; align-items: center; justify-content: space-between; padding: .7rem .85rem; border-radius: 10px;
  border: 1px solid var(--line, #e2e8f0); border-left: 4px solid #94a3b8; min-width: 0; }
.hc-item > div { display: grid; gap: .15rem; min-width: 0; }
.hc-item.ok { border-left-color: #16a34a; } .hc-item.warn { border-left-color: #d97706; } .hc-item.bad { border-left-color: #dc2626; }
.hc-item .muted { overflow-wrap: anywhere; }
.hc-item form { flex: none; }
.hc-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.hc-bar { height: 10px; border-radius: 6px; background: var(--wash, #eef2f7); overflow: hidden; margin: .4rem 0 .6rem; }
.hc-bar span { display: block; height: 100%; } .hc-bar .ok { background: #16a34a; } .hc-bar .warn { background: #d97706; } .hc-bar .bad { background: #dc2626; }
.hc-pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .78rem; max-height: 18rem; overflow: auto; background: #0f172a; color: #e2e8f0; padding: .7rem; border-radius: 8px; }
@media (max-width: 600px) { .hc-item { flex-direction: column; align-items: stretch; } .hc-item form .btn { width: 100%; } }

/* Hot leads */
.heat { display: inline-grid; place-items: center; min-width: 2.4rem; height: 1.7rem; padding: 0 .5rem; border-radius: 99px; font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; }
.heat-hot { background: #fef2f2; color: #dc2626; box-shadow: inset 0 0 0 1px #fecaca; }
.heat-warm { background: #fffbeb; color: #b45309; box-shadow: inset 0 0 0 1px #fde68a; }
.heat-cool { background: var(--brand-wash); color: var(--brand-ink); }
.heat-chip { text-decoration: none; height: auto; padding: .25rem .7rem; font-size: .8rem; }
.hl-filters { display: flex; gap: .8rem 1.1rem; align-items: flex-end; flex-wrap: wrap; }
.hl-filters .field { margin: 0; min-width: 9rem; }
.hl-filters .check { margin: 0 0 .55rem; }
.hl-states .pop-body { width: min(30rem, 86vw); }
.state-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.2rem, 1fr)); gap: .2rem .4rem; max-height: 16rem; overflow: auto; }
.state-checks .check { margin: 0; font-size: .9rem; }
.blurred { filter: blur(5px); user-select: none; color: var(--muted); }
tr.masked td, .hot-row.masked { opacity: .75; }
.unlock { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between; margin-top: .9rem; padding: 1rem 1.1rem;
  border-radius: var(--r-lg); background: var(--grad-soft); border: 1px solid #c7d2fe; }
.unlock b { flex: 1 1 100%; font-size: 1.02rem; } .unlock span { flex: 1 1 18rem; color: var(--muted); }
.hl-how { margin: 0; padding-left: 1.1rem; line-height: 1.8; } .hl-how b { color: var(--brand-ink); }
.hot-panel .panel-head { flex-wrap: wrap; gap: .3rem 1rem; }
.hot-rows { display: grid; gap: .35rem; }
.hot-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .55rem .7rem; border-radius: 10px;
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.hot-row:hover { border-color: #c7d2fe; background: var(--brand-wash); }
.hot-row .hr-main { display: grid; min-width: 0; } .hot-row .hr-mail { color: var(--warn); max-width: 16rem; }
@media (max-width: 640px) { .hot-row { grid-template-columns: auto minmax(0, 1fr); } .hot-row .hr-mail { grid-column: 2; max-width: none; } }
/* Pipeline */
.pl-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.pl-tab { display: grid; padding: .8rem 1rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); }
.pl-tab b { font: 800 1.5rem/1.1 var(--display); } .pl-tab span { color: var(--muted); font-size: .85rem; }
.pl-tab.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }
.pl-tab.due b { color: var(--stop); } .pl-tab.t-good b { color: var(--go); } .pl-tab.t-warn b { color: var(--warn); } .pl-tab.t-info b { color: var(--info); } .pl-tab.t-bad b { color: var(--faint); }
tr.is-due td { background: #fff7ed; }
.lead-panel .panel-head { gap: .6rem; }
.lead-status { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.lead-pill input { position: absolute; opacity: 0; pointer-events: none; }
.lead-pill span { display: inline-block; padding: .4rem .85rem; border-radius: 99px; border: 1px solid var(--line); font-weight: 600; font-size: .88rem; cursor: pointer; background: var(--surface); }
.lead-pill input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.lead-pill.t-good input:checked + span { background: var(--go); border-color: var(--go); }
.lead-pill.t-bad input:checked + span { background: #64748b; border-color: #64748b; }
.lead-pill input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.lead-tl { list-style: none; margin: 1rem 0 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); display: grid; gap: .7rem; }
.lead-tl li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: .1rem; }
.lead-tl li::before { content: ""; position: absolute; left: calc(-1rem - 6px); top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.lead-tl .tl-reply::before { background: var(--warn); } .lead-tl .tl-status::before { background: var(--brand); } .lead-tl .tl-email::before { background: var(--info); }
.lead-tl .tl-note::before { background: var(--go); }
/* Email packs */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1rem; }
.pack { display: flex; flex-direction: column; gap: .5rem; } .pack h2 { margin: 0; }
.pack-list { margin: .2rem 0 .4rem; padding-left: 1.2rem; line-height: 1.7; }
.pack-pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border-radius: 10px; padding: .8rem; font: inherit; font-size: .88rem; }
.pack form { margin-top: auto; }
/* Call list */
.call-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: .9rem; }
.call-card { display: grid; gap: .7rem; margin: 0; }
.call-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .7rem; align-items: center; }
.call-head > div { display: grid; min-width: 0; }
.call-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.call-actions .btn { flex: 1 1 9rem; justify-content: center; }
.btn-wa { background: #25d366; color: #fff; border-color: #25d366; } .btn-wa:hover { background: #1eb956; color: #fff; }
.call-outcomes { display: flex; gap: .35rem; flex-wrap: wrap; } .call-outcomes .good { color: var(--go); }
.touch-row { display: flex; gap: .5rem; flex-wrap: wrap; margin: .2rem 0 .8rem; }
.kind-tabs { display: inline-flex; gap: .3rem; padding: .25rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 1rem; }
.kind-tabs a { padding: .4rem 1rem; border-radius: 99px; text-decoration: none; color: var(--muted); font-weight: 600; }
.kind-tabs a.on { background: var(--brand); color: #fff; }

/* 3.5: watchlist, AI writer, phone app */
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.card-actions form { margin: 0; }
.watch-on { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-wash); }
.watch-grid { align-items: start; }
.watch-grid textarea { width: 100%; font-family: inherit; }
.watch-events { list-style: none; margin: 0; padding: 0; max-height: 22rem; overflow: auto; }
.watch-events li { display: flex; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--line, #eef0f6); font-size: .9rem; }
.watch-events li:first-child { border-top: 0; }
.watch-events li > i { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: .4rem; background: var(--warn); }
.watch-events li.lvl-bad > i { background: var(--stop); }
.watch-events li.lvl-good > i { background: var(--go); }
.watch-events a { font-weight: 600; color: var(--ink); }
small.lvl-bad { color: var(--stop); } small.lvl-good { color: var(--go); }
.ai-panel select, .ai-panel textarea { width: 100%; }
.ai-status:empty { display: none; }
.ai-status { margin: .6rem 0 0; }
.ai-body { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .92rem; line-height: 1.55; background: var(--brand-wash);
  padding: .9rem 1rem; border-radius: 10px; margin: .6rem 0 0; }
.ai-body:empty { display: none; }
.push-box .actions { gap: .5rem; flex-wrap: wrap; }
.push-status:empty { display: none; }

/* 3.7: load board and carrier packets */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.load-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .4rem 1rem; align-items: end; }
.load-filters .field { margin: 0; }
.load-table .lane { color: var(--ink); text-decoration: none; }
.load-table .lane:hover b { text-decoration: underline; }
.plain-list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--line-2, #f1f3f8); flex-wrap: wrap; }
.plain-list li:first-child { border-top: 0; }
.plain-list form { margin: 0; }
.alert-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .4rem .8rem; align-items: end; }
.alert-form .field { margin: 0; }
.alert-form select[multiple] { min-height: 6.5rem; }
.board-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .6rem; }
.board-link { display: grid; gap: .2rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r-lg, 12px); color: var(--ink); text-decoration: none; }
.board-link:hover { border-color: var(--brand); }
.board-link span { color: var(--muted); font-size: .85rem; }
.kv { display: grid; grid-template-columns: minmax(6rem, 9rem) 1fr; gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.packet-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.packet-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem 0; border-top: 1px solid var(--line-2, #f1f3f8); }
.packet-list li:first-child { border-top: 0; }
.packet-list a { display: grid; color: var(--ink); text-decoration: none; min-width: 0; }
.packet-list a span { font-size: .85rem; }
.row-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.row-form input { flex: 1; min-width: 12rem; }
.share-panel .row-form { margin: .4rem 0 .8rem; }
.checks { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; padding: 0; margin: 0 0 .6rem; }
.checks .ok { color: var(--go); font-weight: 600; } .checks .todo { color: var(--muted); }
.sign-box { display: flex; align-items: flex-end; gap: .6rem; flex-wrap: wrap; margin: .4rem 0 .8rem; }
.sign-box canvas { width: 100%; max-width: 560px; height: auto; aspect-ratio: 560 / 160; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .8rem; }
.doc { display: flex; flex-direction: column; gap: .4rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; margin: 0; }
.doc input[type=file] { font-size: .85rem; max-width: 100%; }
.doc a { overflow-wrap: anywhere; }
.notice-panel { border-color: var(--warn); }
.packet-public { max-width: 1100px; margin: 1.5rem auto; padding: 0 1rem; }

/* ---------- 3.8 lead forms & Slack ---------- */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .1rem .9rem; margin: .3rem 0 .4rem; }
fieldset.field, .lead-form fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
fieldset legend { font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: .35rem; padding: 0; }
.steps-list { margin: .2rem 0 0; padding-left: 1.2rem; display: grid; gap: .55rem; font-size: .92rem; }
.filter-row { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.filter-row .field { margin: 0; flex: 1; min-width: 12rem; }
.builder-table td { vertical-align: top; }
.builder-table input:not([type=checkbox]), .builder-table select, .builder-table textarea { display: block; width: 100%; min-width: 9rem; }
.builder-table textarea { min-height: 2.4rem; }
.builder-table input.num-in { width: 3.4rem; min-width: 3.4rem; text-align: center; }
.builder-table input.sub-in { margin-top: .3rem; font-size: .82rem; }
.builder-table .new-row td { background: var(--brand-wash); }
.form-actions { display: flex; justify-content: flex-end; margin-top: .9rem; }
.danger-zone { display: flex; justify-content: flex-end; margin: 1rem 0; }
tr.unread td { background: #fffbeb; }
.share-box .row-form { margin: .3rem 0 .6rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.req { color: #dc2626; }
body.lead-form-page { background: linear-gradient(180deg, var(--brand-wash), var(--bg) 320px); min-height: 100vh; margin: 0; }
.lead-form { max-width: 640px; margin: 0 auto; padding: 2rem 16px 3rem; }
.lf-brand { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-weight: 800; font-size: 1.05rem; color: var(--brand-ink); text-align: center; margin: 0 0 1rem; }
.lf-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.lf-card h1 { font-size: 1.5rem; margin: 0 0 .4rem; }
.lf-intro { color: var(--muted); margin: 0 0 1.3rem; white-space: pre-line; }
.lf-card input:not([type=checkbox]):not([type=radio]), .lf-card select, .lf-card textarea { width: 100%; }
.lf-yesno { display: flex; gap: 1.4rem; }
.lf-submit { width: 100%; padding: .85rem; font-size: 1rem; margin-top: .4rem; }
.lf-done { text-align: center; padding: 2.4rem 1.6rem; }
.lf-check { width: 64px; height: 64px; border-radius: 50%; background: var(--go-wash); color: #059669; font-size: 2rem; font-weight: 700; display: grid; place-items: center; margin: 0 auto 1rem; }
.lf-foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 1.4rem; }
.lf-foot a { color: inherit; }
@media (max-width: 560px) { .lf-card { padding: 1.1rem; } .check-grid { grid-template-columns: 1fr 1fr; } }
.builder-table textarea.opt-empty { height: 2.4rem; resize: vertical; }

/* ---------- 3.9 seller tools ---------- */
.sell-bar { display: grid; gap: .8rem; }
.sell-product { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.seg { display: flex; flex-wrap: wrap; gap: .35rem; }
.seg button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .38rem .8rem; font: inherit; font-size: .86rem; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.sell-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.sell-tabs a { display: flex; flex-direction: column; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; text-decoration: none; color: var(--ink); min-width: 9rem; }
.sell-tabs a span { color: var(--muted); font-size: .82rem; }
.sell-tabs a.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-wash); }
.score-pill { display: inline-grid; place-items: center; min-width: 2.4rem; height: 2rem; border-radius: 999px; font-weight: 700; font-size: .9rem; background: #f1f5f9; color: var(--ink-2); }
.score-pill.hot { background: #fee2e2; color: #b91c1c; }
.score-pill.warm { background: #fef3c7; color: #92400e; }
.diesel-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.diesel-grid tr.avg td { background: var(--brand-wash); font-weight: 600; }
.tile-map { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; width: 100%; max-width: 560px; margin: 0 auto .6rem; }
.tile { aspect-ratio: 1 / 1; border-radius: 6px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .72rem; color: #0f172a; background: #e2e8f0; }
.tile b { font-size: .74rem; line-height: 1.1; }
.tile span { font-size: .62rem; opacity: .85; line-height: 1.1; }
.tile.lvl0 { background: #bbf7d0; } .tile.lvl1 { background: #d9f99d; } .tile.lvl2 { background: #fef08a; } .tile.lvl3 { background: #fed7aa; } .tile.lvl4 { background: #fecaca; }
.tile-legend { display: flex; align-items: center; gap: 4px; justify-content: center; font-size: .78rem; color: var(--muted); }
.tile-legend span { margin: 0 .3rem; }
.tile-legend .tile { width: 16px; height: 16px; aspect-ratio: auto; border-radius: 3px; display: inline-block; }
.broker-score .bs-top { display: flex; gap: 1rem; align-items: center; margin-bottom: .8rem; }
.broker-score .bs-top h2 { margin: 0 0 .2rem; }
.bs-num { flex: 0 0 auto; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; font-weight: 800; background: #f1f5f9; }
.broker-score.good .bs-num { background: var(--go-wash); color: #047857; }
.broker-score.warn .bs-num { background: var(--warn-wash); color: #92400e; }
.broker-score.bad .bs-num { background: var(--stop-wash); color: #b91c1c; }
.bs-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .35rem; }
.bs-list li { padding-left: 1.5rem; position: relative; font-size: .92rem; }
.bs-list li::before { position: absolute; left: 0; font-weight: 700; }
.bs-list li.ok::before { content: "✓"; color: #059669; }
.bs-list li.no::before { content: "!"; color: #dc2626; left: .3rem; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: .4rem 0 .6rem; }
.stat-row div { background: var(--bg); border-radius: var(--r); padding: .7rem .8rem; display: grid; }
.stat-row b { font-size: 1.25rem; }
.stat-row span { color: var(--muted); font-size: .8rem; }
.grid-2.tight { gap: 0 .8rem; }
tr.best td { background: var(--go-wash); }
.card-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .3rem .8rem; align-items: end; margin-top: 1rem; }
.card-form .field { margin: 0; }
.card-form .btn, .card-form .check { margin-bottom: .2rem; }
.draft textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; }
@media (max-width: 980px) { .diesel-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .stat-row { grid-template-columns: 1fr; } .tile b { font-size: .6rem; } .tile span { display: none; } .tile { border-radius: 4px; } }
.stat-row.stat-4 { grid-template-columns: repeat(4, 1fr); } @media (max-width: 640px) { .stat-row.stat-4 { grid-template-columns: 1fr 1fr; } }
.slack-btn { display: inline-flex; align-items: center; gap: .6rem; background: #fff; color: #1d1c1d; border: 1px solid #ddd; border-radius: 8px; padding: .7rem 1.2rem; font-weight: 700; font-size: 1rem; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.06); margin: .4rem 0 .6rem; }
.slack-btn:hover { border-color: #bbb; box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.sc-state { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: .8rem; }
.sc-state h2 { margin: 0 0 .2rem; }
.sc-dot { width: 12px; height: 12px; border-radius: 50%; background: #10b981; margin-top: .45rem; box-shadow: 0 0 0 4px #d1fae5; flex: 0 0 auto; }
.sc-manual { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.sc-manual summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.sc-manual form { margin-top: .7rem; }
span.lvl-bad, b.lvl-bad { color: var(--stop); } span.lvl-good, b.lvl-good { color: var(--go); } b.lvl-warn { color: #b45309; }
.service-grid .svc { border: 1px solid var(--line); border-radius: var(--r); padding: .5rem .7rem; margin: 0; }
.service-grid .svc.on, .service-grid .svc:has(input:checked) { border-color: var(--brand); background: var(--brand-wash); }
.service-grid { gap: .5rem; }
.slug-in { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: #fff; }
.slug-in span { background: var(--bg); color: var(--muted); padding: .55rem .6rem; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.slug-in input { border: 0 !important; flex: 1; min-width: 6rem; box-shadow: none !important; }
.wants { display: flex; flex-wrap: wrap; gap: .4rem; } .wants .tag { font-size: .9rem; padding: .35rem .7rem; }
.slack-setup ol { margin: .4rem 0 .6rem; padding-left: 1.2rem; display: grid; gap: .45rem; } .slack-setup .row-form { margin-top: .35rem; } .slack-setup input { background: #fff; font-size: .85rem; }
.warn-text { color: var(--warn, #b45309); }

/* ---- load calculator ---- */
.lc-grid { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.lc-side .panel, .lc-main .panel { margin-bottom: 16px; }
.lc-side h2 { font-size: 16px; margin: 0 0 10px; }
.btn-block { width: 100%; justify-content: center; }
.lc-result { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 16px; align-items: center; border-left: 6px solid #cbd5e1; }
.lc-result.gain { border-left-color: #16a34a; } .lc-result.loss { border-left-color: #dc2626; }
.lc-big span { display: block; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.lc-big b { display: block; font-size: 38px; line-height: 1.1; font-weight: 800; }
.lc-result.gain .lc-big b { color: #15803d; } .lc-result.loss .lc-big b { color: #b91c1c; }
.lc-big small { color: #64748b; }
.lc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lc-stats div { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 10px; }
.lc-stats b { display: block; font-size: 17px; } .lc-stats span { font-size: 12px; color: #64748b; }
.lc-mapbox { padding: 8px; }
.lc-map { height: 440px; border-radius: 10px; overflow: hidden; background: #e8eef5; }
.lc-map.off { display: grid; place-items: center; color: #64748b; }
.lc-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; padding: 8px 4px 0; color: #475569; }
.lc-legend i { display: inline-block; width: 22px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.l-load { background: #4f46e5; } .l-dead { background: repeating-linear-gradient(90deg, #64748b 0 5px, transparent 5px 9px); }
.lc-pin { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer; }
.lc-break td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.lc-break tr.tot td { border-top: 2px solid #e2e8f0; font-weight: 600; }
.lc-first { font-weight: 600; }
.lc-hw { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lc-hw li { display: inline-flex; align-items: center; gap: 6px; background: #f1f5f9; border-radius: 8px; padding: 4px 8px; font-size: 13px; }
.lc-hw li + li::before { content: "→"; color: #94a3b8; margin-right: 2px; }
.lc-hw b { padding: 1px 6px; border-radius: 5px; color: #fff; font-size: 12px; }
.hw-interstate { background: #1d4ed8; } .hw-us { background: #111827; } .hw-state { background: #047857; }
.cmp-table th.best, .cmp-table td.best { background: #f0fdf4; }
.cmp-table tr.tot td { font-weight: 700; border-top: 2px solid #e2e8f0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { margin: 0; min-width: 160px; }
@media (max-width: 1000px) { .lc-grid { grid-template-columns: 1fr; } .lc-result { grid-template-columns: 1fr; } .lc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lc-map { height: 320px; } }
.lc-paste textarea { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line, #dbe1ea); border-radius: 8px; resize: vertical; }
.lc-paste-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
tr.is-booked td { opacity: .55; } tr.is-booked td:nth-last-child(2) { opacity: 1; }
.lc-size { margin: 4px 0 12px; } .lc-size summary { cursor: pointer; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.lc-lane { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 10px; margin: 0 0 12px; font-size: 13.5px; display: grid; gap: 3px; }
.lc-eta { font-weight: 700; margin: 10px 0 6px; }
.hos-list, .wx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.hos-list li, .wx-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: #f8fafc; font-size: 13.5px; border-left: 4px solid #cbd5e1; }
.hos-list span, .wx-list span { color: #475569; text-align: right; }
.hos-drive, .hos-deadhead { border-left-color: #4f46e5 !important; } .hos-rest, .hos-restart { border-left-color: #0f172a !important; background: #eef2f7 !important; }
.hos-break { border-left-color: #f59e0b !important; } .hos-pickup, .hos-delivery { border-left-color: #16a34a !important; }
.wx-list li { flex-direction: column; } .wx-list span { text-align: left; }
.wx-extreme, .wx-severe { border-left-color: #dc2626 !important; background: #fef2f2 !important; } .wx-moderate { border-left-color: #f59e0b !important; background: #fffbeb !important; }
.wx-clear { border-left-color: #16a34a !important; background: #f0fdf4 !important; }
/* dispatch board */
.db-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); gap: 16px; align-items: start; }
.db-cards { display: grid; gap: 10px; }
.db-card { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; background: #fff; border-left: 5px solid #94a3b8; }
.db-card.available { border-left-color: #16a34a; } .db-card.loaded { border-left-color: #4f46e5; } .db-card.off { border-left-color: #94a3b8; }
.db-card h3 { margin: 0; font-size: 16px; } .db-card .meta { color: #475569; font-size: 13px; }
.db-card .next { grid-column: 1 / -1; font-size: 13px; background: #f8fafc; border-radius: 8px; padding: 6px 8px; }
.db-card .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: start; }
.db-map { height: 520px; border-radius: 12px; overflow: hidden; background: #e8eef5; position: sticky; top: 12px; }
.db-pin { padding: 3px 7px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 12px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); white-space: nowrap; }
@media (max-width: 1000px) { .db-grid { grid-template-columns: 1fr; } .db-map { height: 320px; position: static; } }
/* printable documents */
div.doc { background: #fff; max-width: 820px; margin: 0 auto; padding: 32px 36px; border: 1px solid #e2e8f0; border-radius: 12px; color: #0f172a; }
.doc h1 { font-size: 26px; margin: 0; } .doc .doc-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.doc .doc-meta { text-align: right; font-size: 14px; } .doc table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.doc th, .doc td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #e2e8f0; font-size: 14px; vertical-align: top; }
.doc td.n, .doc th.n { text-align: right; font-variant-numeric: tabular-nums; } .doc tr.tot td { font-weight: 800; border-top: 2px solid #0f172a; font-size: 16px; }
.doc .two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .doc .box { white-space: pre-line; font-size: 14px; }
.doc .stamp { display: inline-block; border: 3px solid #16a34a; color: #16a34a; font-weight: 800; padding: 4px 12px; border-radius: 8px; transform: rotate(-6deg); }
.no-print { margin: 0 auto 14px; max-width: 820px; display: flex; gap: 8px; flex-wrap: wrap; }
@media print { .shell > aside, .topbar, .no-print, .flashes, header, nav { display: none !important; } div.doc { border: 0; padding: 0; } main, .content { padding: 0 !important; margin: 0 !important; } }
.score-big { font-size: 44px; font-weight: 800; line-height: 1; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list li { padding: 10px 12px; border-radius: 10px; border-left: 5px solid #16a34a; background: #f0fdf4; }
.check-list li.bad { border-left-color: #dc2626; background: #fef2f2; } .check-list li.warn { border-left-color: #f59e0b; background: #fffbeb; } .check-list li.info { border-left-color: #3b82f6; background: #eff6ff; }
.check-list small { display: block; color: #475569; margin-top: 2px; overflow-wrap: anywhere; }
.lang-switch { padding: 6px 10px; } .lang-switch .btn { width: 100%; justify-content: center; }
.lc-lane[hidden] { display: none; }
@media (max-width: 640px) { div.doc { padding: 18px 14px; } .doc .two { grid-template-columns: 1fr; } .doc .doc-head { flex-direction: column; } .doc .doc-meta { text-align: left; } }

/* ---------------- 4.0: team, chat, phone ---------------- */
.chat { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; align-items: start; }
.chat-rooms ul { list-style: none; margin: 0 0 .8rem; padding: 0; }
.chat-rooms li a { display: flex; justify-content: space-between; align-items: center; padding: .35rem .5rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.chat-rooms li a.on, .chat-rooms li a:hover { background: var(--line-2); }
.chat-rooms h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: .2rem 0 .3rem; }
.chat-rooms .badge { background: var(--brand, #5b4ae8); color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 .45rem; }
.chat-main { display: flex; flex-direction: column; height: min(72vh, 760px); padding: 0; overflow: hidden; }
.chat-head { padding: .7rem 1rem; border-bottom: 1px solid var(--line-2); }
.chat-log { flex: 1; overflow-y: auto; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .55rem; }
.chat-msg { max-width: 78%; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-meta small { color: var(--muted); }
.chat-body { display: inline-block; background: var(--line-2); padding: .45rem .7rem; border-radius: 12px; white-space: pre-wrap; text-align: left; word-break: break-word; }
.chat-msg.mine .chat-body { background: var(--brand-wash); }
.chat-card { margin-top: .3rem; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; text-align: left; background: var(--surface); display: inline-flex; flex-direction: column; gap: .2rem; }
.chat-card small { color: var(--muted); }
.mention { color: var(--brand, #5b4ae8); }
.chat-send { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line-2); }
.chat-send input[name="body"] { flex: 1; min-width: 0; }
@media (max-width: 760px) { .chat { grid-template-columns: 1fr; } .chat-main { height: 70vh; } .chat-msg { max-width: 92%; } }
.assign-list { display: grid; gap: .1rem; max-height: 220px; overflow-y: auto; margin-bottom: .4rem; }
.assign-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: 0 0 .6rem; font-size: .92rem; }
.section-title { font-size: 1.05rem; margin: 1.1rem 0 .6rem; }
/* phone */
.softphone-body { background: var(--bg); margin: 0; }
.sp { max-width: 420px; margin: 0 auto; padding: .8rem; display: flex; flex-direction: column; gap: .7rem; font-family: var(--font); }
.sp-head { display: flex; align-items: center; gap: .6rem; }
.sp-head .sp-from { flex: 1; font-size: .85rem; }
.sp-state { border: 0; border-radius: 99px; padding: .35rem .9rem; font-weight: 700; cursor: pointer; }
.sp-state.off { background: var(--line-2); color: var(--muted); }
.sp-state.on { background: var(--go); color: #fff; }
.sp-msg { background: var(--info-wash); color: var(--info); padding: .5rem .7rem; border-radius: 10px; font-size: .9rem; }
.sp-msg.bad { background: var(--stop-wash); color: var(--stop); }
.sp-msg:empty { display: none; }
.sp-who { display: flex; flex-direction: column; gap: .15rem; }
.sp-who b { font-size: 1.15rem; }
.sp-timer { font-size: 2rem; font-variant-numeric: tabular-nums; text-align: center; }
.sp-actions { display: flex; gap: .5rem; justify-content: center; }
.sp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; }
.sp-keys button { padding: .5rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 1.05rem; cursor: pointer; }
.sp-transcript { max-height: 230px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; font-size: .9rem; }
.sp-transcript p { margin: .25rem 0; }
.sp-transcript p.carrier b { color: var(--brand); }
.sp-outcomes { display: flex; flex-wrap: wrap; gap: .35rem; }
.sp-summary { background: var(--brand-wash); border-radius: 10px; padding: .6rem .8rem; font-size: .9rem; white-space: pre-wrap; }
.sp-dial { display: flex; gap: .4rem; } .sp-dial input { flex: 1; min-width: 0; }
.panel.inset { box-shadow: none; border: 1px solid var(--line); }
code.copyable { word-break: break-all; cursor: copy; }
.tx-carrier b { color: var(--brand); }
.msg-threads { list-style: none; margin: 0; padding: 0; }
.msg-threads li a { display: grid; grid-template-columns: auto auto 1fr auto; gap: .6rem; align-items: center; padding: .55rem .3rem; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.msg-threads li a:hover { background: var(--surface-2); }
.msg-thread { display: flex; flex-direction: column; gap: .5rem; max-height: 60vh; overflow-y: auto; }
@media (max-width: 640px) { .msg-threads li a { grid-template-columns: auto 1fr; } }
.vendor-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.vendor-cats ul { list-style: none; margin: 0; padding: 0; }
.vendor-cats li { padding: .3rem 0; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-2); }
.vendor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.vendor-card { display: flex; flex-direction: column; gap: .35rem; }
.vendor-card.featured { border-color: var(--amber, #f59e0b); }
.vendor-top { display: flex; align-items: center; gap: .4rem; }
.vendor-top form { margin-left: auto; }
.btn-link.fav { font-size: 1.2rem; background: none; border: 0; cursor: pointer; color: var(--amber, #f59e0b); }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .25rem 0; }
.invoice-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); margin-bottom: .8rem; }
.driver-page { max-width: 30rem; }
.driver-status { display: grid; gap: .5rem; }
.driver-status .btn { padding: .9rem; font-size: 1.05rem; }
details.inline-edit { display: inline-block; }
details.inline-edit[open] form { margin-top: .4rem; min-width: 18rem; }
@media print { .no-print, .side, .topbar, .site-header, .site-footer { display: none !important; } .invoice-sheet { border: 0; box-shadow: none; } }
.agreement-text { white-space: pre-wrap; font-family: inherit; font-size: .95rem; line-height: 1.55; background: none; border: 0; padding: 0; margin: 0 0 1rem; }
.sign-pad { width: 100%; max-width: 600px; height: 180px; border: 1px dashed var(--line); border-radius: 8px; background: #fff; touch-action: none; display: block; }
.sig-img { max-width: 260px; height: auto; border-bottom: 1px solid var(--line); background: #fff; }
.signed-block { margin-top: 1rem; }
.slot-days { display: grid; gap: .6rem; margin-bottom: 1rem; max-height: 22rem; overflow-y: auto; }
.slot-day { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.slot-day legend { font-weight: 600; margin-bottom: .3rem; width: 100%; }
.slot input { position: absolute; opacity: 0; }
.slot span { display: inline-block; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-size: .9rem; }
.slot input:checked + span { background: var(--amber, #f59e0b); color: #111; border-color: transparent; }
.slot input:focus-visible + span { outline: 2px solid var(--ink); }
.option-card { display: flex; flex-direction: column; gap: .35rem; border: 1px solid var(--line); border-radius: 10px; padding: .9rem; }
.option-card .big { font-size: 1.4rem; font-weight: 700; }
.module-list { display: grid; gap: .2rem; margin-bottom: 1rem; }
.module-row { padding: .45rem 0; border-bottom: 1px solid var(--line-2); }
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filter-row input[type=search], .filter-row input:not([type]) { flex: 1 1 12rem; width: auto; }
.filter-row select { flex: 0 1 14rem; width: auto; }
.audience-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; max-width: 70rem; margin: 0 auto; }
.audience-grid .feature h3 { margin: .3rem 0; }
.audience-grid .icon { font-size: 1.6rem; }
.coach-obj { padding: .4rem 0; border-bottom: 1px solid var(--line-2); }
.coach-obj p { margin: .2rem 0 0; }
/* ---- 4.1.1 layout fixes: nothing spills out of its box ---- */
td.actions { display: table-cell; white-space: normal; }
td.actions > .cell, td.actions { vertical-align: middle; }
td.actions > .cell { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; align-items: center; }
td.actions form.inline, td.actions details { display: inline-flex; }
label.check { overflow-wrap: anywhere; min-width: 0; }
.panel, .stat, .plan, .option-card, .vendor-card { min-width: 0; overflow-wrap: anywhere; }
.panel small.muted, .panel .hint { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  table:is(.t-compact,.stack) td { min-width: 0; overflow-wrap: anywhere; }
  table:is(.t-compact,.stack) td > * { min-width: 0; }
  table:is(.t-compact,.stack) td.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }
  .stat-row { flex-wrap: wrap; }
}
td.actions .btn { white-space: normal; }
details.pop .pop-body { max-width: calc(100vw - 16px); }
.topbar form.quick button { min-height: 0; max-height: calc(100% - 8px); }
@media (max-width: 900px) { .topbar form.quick input { min-height: 44px; } }
/* Compact tables: never cut text off; a wide table scrolls sideways inside its panel instead */
@media (min-width: 641px) {
table.t-compact td { white-space: nowrap; overflow: visible; text-overflow: clip; max-width: none; }
table.t-compact td br { display: block; content: ""; margin: 0; }
table.t-compact td br + small, table.t-compact td br + span, table.t-compact td br + a { margin-left: 0; }
table.t-compact td.wrap { white-space: normal; min-width: 14rem; }
table.t-compact .clip, table.t-compact .clip-sm { display: inline; max-width: none; overflow: visible; text-overflow: clip; }
}
@media (max-width: 640px) {
  table:is(.t-compact,.stack) td, table:is(.t-compact,.stack) td * { white-space: normal !important; }
  table:is(.t-compact,.stack) td { overflow: visible; max-width: none; text-overflow: clip; overflow-wrap: anywhere; }
  table:is(.t-compact,.stack) .clip, table:is(.t-compact,.stack) .clip-sm { display: inline; max-width: none; overflow: visible; overflow-wrap: anywhere; }
  table:is(.t-compact,.stack) td > .cell, table:is(.t-compact,.stack) td > a, table:is(.t-compact,.stack) td > b, table:is(.t-compact,.stack) td > small { min-width: 0; }
  table:is(.t-compact,.stack) td .tag { white-space: nowrap !important; }
  .sig-img { max-width: 100%; }
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* soft shadows at the edges show there is more to scroll */
.table-wrap, .tab-nav { background:
  linear-gradient(to right, var(--surface) 30%, rgba(255,255,255,0)), linear-gradient(to left, var(--surface) 30%, rgba(255,255,255,0)) 100% 0,
  radial-gradient(farthest-side at 0 50%, rgba(15,23,42,.14), transparent), radial-gradient(farthest-side at 100% 50%, rgba(15,23,42,.14), transparent) 100% 0;
  background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }
.filter-row > .field { flex: 1 1 10rem; min-width: 0; margin-bottom: 0; }
.filter-row > * { max-width: 100%; }
.filter-row > .field input, .filter-row > .field select { width: 100%; }
/* load calculator: never squeeze the result tiles (laptops with the side menu open) */
@media (max-width: 1250px) { .lc-grid { grid-template-columns: 1fr; } }
.lc-main { container-type: inline-size; min-width: 0; }
@container (max-width: 620px) { .lc-result { grid-template-columns: 1fr; } .lc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 360px) { .lc-stats { grid-template-columns: 1fr; } }
/* dispatch board cards: details keep their width; buttons move under them on narrow cards */
.db-cards { container-type: inline-size; }
.db-card { grid-template-columns: minmax(10rem, 1fr) auto; }
.db-card .acts { max-width: 15rem; }
@container (max-width: 560px) { .db-card { grid-template-columns: 1fr; } .db-card .acts { max-width: none; justify-content: flex-start; } }
.watch-health span, .stat span { overflow-wrap: normal; word-break: normal; }
.stat-row, .stat-row.stat-4 { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
@media (max-width: 760px) { .grid-2 > *, .grid-3 > *, .grid-4 > * { grid-column: auto !important; } }

/* 4.2 branded forms: editor */
.fd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.4rem; align-items: start; }
@media (max-width: 980px) { .fd-grid { grid-template-columns: minmax(0, 1fr); } }
.fd-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.fd-ok { color: #059669; } .fd-bad { color: #dc2626; }
.fd-logo-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.fd-logo-row input { min-width: 0; max-width: 100%; }
.fd-logo-now { max-height: 44px; max-width: 140px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.fd-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .55rem; }
.fd-theme { position: relative; display: flex; flex-direction: column; gap: .4rem; padding: .55rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: .85rem; font-weight: 600; }
.fd-theme input { position: absolute; opacity: 0; pointer-events: none; }
.fd-theme:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }
.fd-theme:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.fd-sw { display: flex; height: 34px; border-radius: 8px; overflow: hidden; }
.fd-sw i { flex: 1; }
.fd-t-classic .fd-sw i:nth-child(1) { background: #f5f7fb } .fd-t-classic .fd-sw i:nth-child(2) { background: #c7d2fe } .fd-t-classic .fd-sw i:nth-child(3) { background: #4f46e5 }
.fd-t-midnight .fd-sw i:nth-child(1) { background: #0b1020 } .fd-t-midnight .fd-sw i:nth-child(2) { background: #06b6d4 } .fd-t-midnight .fd-sw i:nth-child(3) { background: #8b5cf6 }
.fd-t-sunset .fd-sw i:nth-child(1) { background: #fff7ed } .fd-t-sunset .fd-sw i:nth-child(2) { background: #fda4af } .fd-t-sunset .fd-sw i:nth-child(3) { background: #ea580c }
.fd-t-ocean .fd-sw i:nth-child(1) { background: #ecfeff } .fd-t-ocean .fd-sw i:nth-child(2) { background: #67e8f9 } .fd-t-ocean .fd-sw i:nth-child(3) { background: #0284c7 }
.fd-t-forest .fd-sw i:nth-child(1) { background: #f0fdf4 } .fd-t-forest .fd-sw i:nth-child(2) { background: #bef264 } .fd-t-forest .fd-sw i:nth-child(3) { background: #15803d }
.fd-t-graphite .fd-sw i:nth-child(1) { background: #111113 } .fd-t-graphite .fd-sw i:nth-child(2) { background: #ef4444 } .fd-t-graphite .fd-sw i:nth-child(3) { background: #f59e0b }
.fd-motions { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .3rem .8rem; }
.fd-accent { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.fd-accent input[type=color] { width: 48px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.fd-preview { position: sticky; top: 1rem; }
.fd-device { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 20px 50px -24px rgba(15,23,42,.35); }
.fd-bar { display: flex; align-items: center; gap: 6px; padding: .5rem .7rem; background: var(--bg); border-bottom: 1px solid var(--line); min-width: 0; }
.fd-bar span { width: 9px; height: 9px; border-radius: 50%; background: #e2e8f0; flex: none; }
.fd-bar em { font-style: normal; font-size: .75rem; color: var(--muted); margin-left: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#fd-frame { display: block; width: 100%; height: 640px; border: 0; background: #fff; }
@media (max-width: 640px) { #fd-frame { height: 540px; } }
.fd-tabs { display: flex; gap: .4rem; justify-content: center; margin-top: .6rem; }
.fd-tabs button[aria-pressed=true] { background: var(--brand); color: #fff; border-color: var(--brand); }
.fd-tabs button[aria-pressed=false] { background: #fff; color: var(--ink); border: 1px solid var(--line); }

/* 4.3 reply sorter chips */
.kind-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .9rem; }
.kind-chips .chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .85rem; font-weight: 600; text-decoration: none; }
.kind-chips .chip b { background: var(--brand); color: #fff; border-radius: 99px; padding: 0 .45rem; font-size: .75rem; }
.kind-chips .chip.on { border-color: var(--brand); background: var(--brand-wash); color: var(--brand-ink); }
.kind-chips .chip.tone-good b { background: var(--go); } .kind-chips .chip.tone-bad b { background: var(--stop); } .kind-chips .chip.tone-warn b { background: var(--warn); }

/* 4.3 white label brand mark */
.brand-logo { max-width: 120px; object-fit: contain; border-radius: 8px; }
.brand-mono { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font: 800 .95rem var(--display); flex: none; }

/* 4.3 carrier scorecard */
.score-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border-radius: 99px; font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.score-badge b { font-family: var(--display); }
.score-badge.g-a { background: var(--go-wash); color: var(--go); border-color: #a7f3d0; }
.score-badge.g-b { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.score-badge.g-c { background: var(--warn-wash); color: var(--warn); border-color: #fde68a; }
.score-badge.g-d, .score-badge.g-f { background: var(--stop-wash); color: var(--stop); border-color: #fecaca; }
.sc-head { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.sc-head > div:last-child { flex: 1 1 220px; min-width: 0; }
.score-ring small { font-size: .8rem; display: block; margin-top: .2rem; }
.score-ring { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--line) 0); flex: none; }
.score-ring > div { width: 96px; height: 96px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.score-ring b { font: 800 2rem/1 var(--display); display: block; } .score-ring small { color: var(--muted); }
.score-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.score-parts li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; align-items: center; }
.score-parts .bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.score-parts .bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* 4.3 My Day */
.myday-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1rem; align-items: start; }
.myday-card { margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.myday-card h2 { font-size: 1rem; margin: 0; }
.count-pill { background: var(--brand); color: #fff; border-radius: 99px; padding: .1rem .6rem; font-weight: 700; font-size: .85rem; flex: none; }
.myday-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.myday-list a { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .4rem; border-radius: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.myday-list a:hover { background: var(--bg); }
.md-main { display: flex; flex-direction: column; min-width: 0; }
.md-main b { overflow-wrap: anywhere; font-weight: 600; }
.md-main small { color: var(--muted); overflow-wrap: anywhere; }
.myday-list .tag { flex: none; }
.myday-done .chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-done { background: var(--go-wash); color: var(--go); border-radius: 99px; padding: .25rem .7rem; font-size: .85rem; font-weight: 600; }
.myday-clear { text-align: center; }
.big-check { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto .6rem; display: grid; place-items: center; background: var(--go-wash); color: var(--go); font-size: 2rem; font-weight: 800; }
/* 4.3 onboarding */
.ob-steps-preview { list-style: none; padding: 0; margin: .4rem 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.ob-steps-preview li { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: .3rem .7rem; font-size: .85rem; }
.ob-steps-preview b { color: var(--brand); margin-right: .2rem; }
.label-like { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.ob-bar { height: 8px; min-width: 120px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: .2rem; }
.ob-bar i { display: block; height: 100%; background: var(--grad); }
.ob-track { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.ob-track li { display: flex; gap: .8rem; align-items: center; padding: .5rem 0; position: relative; }
.ob-track li span:last-child { display: flex; flex-direction: column; } .ob-track small { color: var(--muted); }
.ob-track .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--bg); border: 2px solid var(--line); color: var(--muted); flex: none; }
.ob-track .st-done .dot { background: var(--go); border-color: var(--go); color: #fff; }
.ob-track .st-now .dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-wash); }
.ob-track .st-skip { opacity: .55; }
.ob-log { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.ob-log li { overflow-wrap: anywhere; } .ob-log time { color: var(--muted); font-size: .8rem; margin-right: .4rem; font-variant-numeric: tabular-nums; }
/* 4.3 white label */
.wl-color { display: flex; align-items: center; gap: .7rem; }
.wl-color input[type=color] { width: 52px; height: 38px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.wl-preview { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .9rem 1rem; border: 1px dashed var(--line); border-radius: 14px; margin: .2rem 0 1rem; }
.wl-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--wl); color: #fff; display: grid; place-items: center; font-weight: 800; overflow: hidden; }
.wl-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.wl-btn { margin-left: auto; background: var(--wl); color: #fff; border-radius: 10px; padding: .45rem 1rem; font-weight: 700; font-size: .9rem; }
.dns-table code { overflow-wrap: anywhere; }

/* 4.3.1 home dashboard */
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: .8rem; margin: 0 0 1rem; }
.dash-tile { position: relative; display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; overflow: hidden; min-width: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.dash-tile:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }
.dash-tile.alert { border-color: #fcd34d; background: linear-gradient(180deg, var(--warn-wash), var(--surface) 70%); }
.dt-label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dt-value { font: 800 1.7rem/1.1 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.dt-sub { font-size: .82rem; color: var(--muted); position: relative; z-index: 1; }
.dt-trend.up { color: var(--go); } .dt-trend.down { color: var(--stop); }
.dt-spark { position: absolute; right: .9rem; top: 2.4rem; width: 70px; height: 26px; opacity: .9; }
.dt-spark polyline { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dash-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1rem; margin-bottom: 1rem; align-items: start; }
.dash-row > .panel { margin: 0; min-width: 0; }
.dash-row .panel-head { align-items: flex-start; gap: .6rem; }
.dash-row .panel-head h2 { margin: 0; }
.dash-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.dash-todo a { display: flex; align-items: center; gap: .7rem; padding: .55rem .5rem; border-radius: 10px; color: var(--ink); text-decoration: none; }
.dash-todo a:hover { background: var(--bg); }
.dash-todo .td-t { flex: 1; min-width: 0; font-weight: 600; }
.dash-clear { display: flex; align-items: center; gap: .9rem; }
.dash-clear .big-check { margin: 0; width: 48px; height: 48px; font-size: 1.4rem; flex: none; }
.dash-clear p { margin: 0; }
.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.funnel a { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; padding: .15rem 0; }
.fn-label { font-size: .88rem; font-weight: 600; }
.fn-bar { height: 14px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.fn-bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.fn-bar i.st-signed { background: var(--go); } .fn-bar i.st-lost { background: #cbd5e1; }
.fn-n { font-variant-numeric: tabular-nums; min-width: 2.5ch; text-align: right; }
.bar-chart { width: 100%; height: auto; display: block; margin-top: .3rem; overflow: visible; }
.bar-chart .axis { stroke: var(--line); stroke-width: 1; }
.bar-chart .fill { fill: var(--brand); opacity: .85; transition: opacity .15s; }
.bar-chart .hit { fill: transparent; }
.bar-chart .bar:hover .fill { opacity: 1; }
.bar-chart .bar:hover .hit { fill: var(--brand-wash); opacity: .6; }
.bar-chart text { font: 500 11px var(--font); fill: var(--muted); }
.chart-table { margin-top: .4rem; font-size: .85rem; } .chart-table summary { color: var(--muted); cursor: pointer; }
.dash-camps { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.dash-camps a { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(80px, 1fr) auto; gap: .9rem; align-items: center; padding: .55rem .4rem; border-radius: 10px; color: var(--ink); text-decoration: none; }
.dash-camps a:hover { background: var(--bg); }
.dc-name { display: flex; align-items: center; gap: .5rem; min-width: 0; } .dc-name b { overflow-wrap: anywhere; }
.dash-camps .ob-bar { margin: 0; min-width: 0; }
.dash-tile, .dash-tile:hover, .dash-tile * { text-decoration: none; }
.fn-label { white-space: nowrap; }
@media (max-width: 640px) {
  .dash-tiles { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .dash-tile { padding: .8rem .8rem .75rem; }
  .dt-label { font-size: .7rem; }
  .dash-camps a { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .dt-value { font-size: 1.3rem; }
  .dt-spark { display: none; }
  .bar-chart text { font-size: 19px; }
  .funnel a { grid-template-columns: 96px minmax(0, 1fr) auto; gap: .5rem; }
  .fn-label { font-size: .8rem; }
}
.score-ring2 { position: relative; width: 132px; height: 132px; flex: none; }
.score-ring2 svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring2 circle { fill: none; stroke-width: 11; }
.score-ring2 .track { stroke: var(--line); }
.score-ring2 .val { stroke-linecap: round; }
.score-ring2 .sr-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.score-ring2 .sr-in b { font: 800 2.6rem/1 var(--display); }
.score-ring2 .sr-in span { margin-top: .25rem; font-weight: 700; font-size: .95rem; color: var(--ink); }
.score-ring2 .sr-in small { color: var(--muted); font-weight: 500; }
.score-ring2 { position: relative; width: 132px; height: 132px; flex: none; }
.score-ring2 svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.score-ring2 circle { fill: none; stroke-width: 11; }
.score-ring2 .track { stroke: var(--line); }
.score-ring2 .val { stroke-linecap: round; }
.score-ring2 .sr-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.score-ring2 .sr-in b { font: 800 2.6rem/1 var(--display); }
.score-ring2 .sr-in span { margin-top: .3rem; font-weight: 700; font-size: .95rem; color: var(--ink); white-space: nowrap; }
.score-ring2 .sr-in small { color: var(--muted); font-weight: 500; }

/* 4.3.1 email-first dashboard */
.email-hero { margin-bottom: 1.4rem; }
.eh-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin: .2rem 0 .7rem; }
.eh-head h2, .dash-sub { margin: 0; font-size: 1.15rem; }
.dash-sub { margin: .4rem 0 .7rem; }
.dash-tile.good .dt-value { color: var(--go); }
.dash-row.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .dash-row.wide-left { grid-template-columns: minmax(0, 1fr); } }
.dash-camps li + li { border-top: 1px solid var(--line); }
.dash-camps a { grid-template-columns: minmax(0, 1.3fr) minmax(110px, 1fr) auto; }
.dc-prog { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.dc-nums { display: flex; gap: .9rem; }
.dc-nums span { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.dc-nums small { color: var(--muted); font-size: .72rem; }
.dc-note { grid-column: 1 / -1; overflow-wrap: anywhere; }
.dash-replies, .dash-boxes { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.dash-replies a { display: flex; flex-direction: column; gap: .15rem; padding: .5rem .45rem; border-radius: 10px; color: var(--ink); text-decoration: none; align-items: flex-start; }
.dash-replies a:hover { background: var(--bg); }
.dr-top { display: flex; justify-content: space-between; gap: .6rem; width: 100%; min-width: 0; }
.dr-top b { font-weight: 500; overflow-wrap: anywhere; } .dr-top b.unread { font-weight: 700; }
.dr-top small { flex: none; } .dr-snip { overflow-wrap: anywhere; }
.dash-boxes { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: .9rem 1.4rem; }
.dash-boxes li { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.db-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-width: 0; }
.db-top b { overflow-wrap: anywhere; font-weight: 600; font-size: .92rem; }
.db-top .tag { flex: none; }
.dash-boxes .ob-bar { margin: 0; }
.dash-boxes small { overflow-wrap: anywhere; }
.first-campaign h3 { margin: 0 0 .2rem; }
.fc-steps { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .7rem; }
.fc-steps li { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.fc-steps li > b { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.fc-steps li.done > b { background: var(--go); }
.fc-steps span { display: flex; flex-direction: column; } .fc-steps a { font-weight: 700; } .fc-steps small { color: var(--muted); }
@media (max-width: 640px) {
  .dash-camps a { grid-template-columns: minmax(0, 1fr) auto; }
  .dc-prog { grid-column: 1 / -1; grid-row: 2; }
}

.dash-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.dash-col > .panel { margin: 0; }
.dash-col .dash-boxes { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* ======================================================================== 4.4 */
/* premium admin sidebar */
.shell.is-staff .side { background: linear-gradient(180deg, #0f172a 0%, #111b33 60%, #161f3d 100%); border-right-color: #1e293b; }
.shell.is-staff .side .brand, .shell.is-staff .side .brand-name { color: #f8fafc; }
.shell.is-staff .side .brand-sub { color: #94a3b8; }
.shell.is-staff .side .group { color: #64748b; text-transform: uppercase; font-size: .66rem; letter-spacing: .08em; }
.shell.is-staff .side a.nav { color: #cbd5e1; }
.shell.is-staff .side a.nav:hover { background: rgba(148, 163, 184, .12); color: #fff; }
.shell.is-staff .side a.nav.on { background: linear-gradient(90deg, rgba(99, 102, 241, .35), rgba(139, 92, 246, .18)); color: #fff; box-shadow: inset 3px 0 0 #818cf8; }
.adm-hero { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
@media (max-width: 1280px) { .adm-hero { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .adm-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.adm-stat { position: relative; display: grid; gap: .15rem; padding: 1rem 1.1rem; border-radius: 16px; min-width: 0; overflow: hidden;
  background: linear-gradient(145deg, #1e1b4b 0%, #312e81 55%, #4c1d95 100%); color: #e0e7ff; box-shadow: 0 10px 30px rgba(49, 46, 129, .25); }
.adm-stat span { font-size: .78rem; color: #c7d2fe; }
.adm-stat b { font: 800 1.65rem/1.1 var(--display); color: #fff; letter-spacing: -.02em; }
.adm-stat small { font-size: .74rem; color: #a5b4fc; }
.adm-stat.warn { background: linear-gradient(145deg, #451a03, #9a3412); }
.adm-spark { width: 100%; height: 26px; margin-top: .2rem; }
.adm-spark polyline { fill: none; stroke: #a5b4fc; stroke-width: 2; vector-effect: non-scaling-stroke; }
.adm-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.adm-row > .panel { margin: 0; }
.adm-feed .feed-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .45rem .2rem; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.adm-feed .feed-item:hover { background: var(--line-2); }
.feed-ico { font-size: 1.05rem; text-align: center; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: livepulse 2s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.adm-watch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; align-content: start; }
.watch-card { display: grid; gap: .1rem; padding: .85rem .9rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; }
.watch-card b { font: 800 1.4rem/1.1 var(--display); }
.watch-card span { font-size: .78rem; color: var(--muted); }
.watch-card:hover { border-color: var(--brand); text-decoration: none; }
.watch-card.warn { border-color: #fcd34d; background: var(--warn-wash); } .watch-card.bad { border-color: #fca5a5; background: var(--stop-wash); } .watch-card.info { border-color: #a5b4fc; background: var(--brand-wash); }
@media (max-width: 900px) { .adm-row { grid-template-columns: 1fr; } }

/* topbar: bell, theme, Ctrl+K */
.bell { position: relative; text-decoration: none; font-size: 1.05rem; line-height: 1; padding: .3rem; border-radius: 8px; }
.bell:hover { background: var(--line-2); text-decoration: none; }
.bell span { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #ef4444; color: #fff; font: 700 .66rem/18px var(--font); text-align: center; }
.cmdk-open span { font: 600 .74rem var(--font); letter-spacing: .02em; }
.theme-btn { font-size: 1rem; line-height: 1; min-width: 2rem; }
.banner.danger { background: var(--stop-wash); color: #991b1b; }
.incident-banner b { margin-right: .3rem; }
dialog.cmdk { width: min(620px, calc(100vw - 32px)); max-height: min(70vh, 560px); padding: 0; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); margin: 12vh auto auto; overflow: hidden; }
dialog.cmdk::backdrop, dialog.wn-modal::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
#cmdk-q { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 1rem 1.1rem; font-size: 1.02rem; background: transparent; color: var(--ink); outline: none; box-shadow: none; }
#cmdk-list { list-style: none; margin: 0; padding: .35rem; max-height: calc(min(70vh, 560px) - 100px); overflow-y: auto; }
#cmdk-list li a { display: grid; gap: .05rem; padding: .55rem .75rem; border-radius: 10px; color: var(--ink); text-decoration: none; }
#cmdk-list li a small { color: var(--muted); font-size: .78rem; }
#cmdk-list li.on a { background: var(--brand-wash); }
#cmdk-list .cmdk-empty { padding: .9rem; color: var(--muted); }
.cmdk-hint { margin: 0; padding: .5rem 1rem; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
.cmdk-hint kbd { font: 600 .7rem var(--font); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem; margin-right: .15rem; background: var(--surface-2); }
dialog.wn-modal { width: min(460px, calc(100vw - 32px)); border: 0; border-radius: 20px; padding: 1.6rem; box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); }
.wn-badge { display: inline-block; background: var(--grad); color: #fff; font: 700 .72rem var(--font); padding: .2rem .6rem; border-radius: 999px; }
.wn-modal h2 { margin: .6rem 0 .4rem; }
.wn-list { padding-left: 1.1rem; margin: 0 0 1rem; display: grid; gap: .35rem; }
.tour-tip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: start; padding: .9rem 1rem; margin-bottom: 1rem; border-radius: 14px; background: linear-gradient(135deg, #162b25, #0c1b1a); color:#f7f7f0; border: 1px solid #997e53; }
.tour-tip ol { margin: .3rem 0 0; padding-left: 1.1rem; display: grid; gap: .2rem; font-size: .9rem; }
.tour-ico { font-size: 1.4rem; }
@media (max-width: 640px) { .tour-tip { grid-template-columns: minmax(0, 1fr); } .tour-ico { display: none; } }

/* dashboard: away, goals, saved search alerts */
.away-card .away-items { display: flex; flex-wrap: wrap; gap: .5rem; }
.away-items a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 999px; background: var(--brand-wash); color: var(--brand-ink); font-weight: 600; font-size: .88rem; text-decoration: none; }
.away-items a:hover { filter: brightness(.97); }
.goal-list { display: grid; gap: .55rem; }
.goal { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr) auto; gap: .7rem; align-items: center; font-size: .9rem; }
.goal-bar { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.goal-bar i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width .4s; }
.goal.done .goal-bar i { background: linear-gradient(90deg, #10b981, #059669); }
.goal.done b { color: var(--go); }
.streak { font-weight: 700; color: #c2410c; background: #fff7ed; border: 1px solid #fed7aa; padding: .2rem .6rem; border-radius: 999px; font-size: .82rem; }
.goal-win { margin: .6rem 0 0; font-weight: 600; color: var(--go); }
.goal-edit { margin-top: .6rem; font-size: .86rem; } .goal-edit summary { cursor: pointer; color: var(--muted); }
.goal-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-top: .5rem; }
.goal-form label { display: grid; gap: .2rem; font-size: .8rem; color: var(--muted); }
.goal-form input { width: 6rem; }
.saved-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.saved-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.alert-toggle { background: none; border: 0; cursor: pointer; font-size: .95rem; opacity: .55; padding: .1rem .3rem; border-radius: 6px; }
.alert-toggle.on, .alert-toggle:hover { opacity: 1; background: var(--line-2); }

/* quick launch */
.ql-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line-2); }
.ql-step h2 { margin-top: .2rem; }
.ql-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; }
.ql-states { display: flex; flex-wrap: wrap; gap: .3rem; max-height: 9.5rem; overflow-y: auto; padding: .2rem 0; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; }
.chip-check span { display: inline-block; min-width: 2.6rem; text-align: center; padding: .25rem .4rem; border: 1px solid var(--line); border-radius: 8px; font-size: .8rem; font-weight: 600; cursor: pointer; background: var(--surface); }
.chip-check input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip-check input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.ql-cards, .seg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .6rem; }
.ql-card { position: relative; display: block; cursor: pointer; }
.ql-card input { position: absolute; opacity: 0; }
.ql-card > span { display: grid; gap: .15rem; height: 100%; padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.ql-card small { font-size: .8rem; }
.ql-card input:checked + span { border-color: var(--brand); background: var(--brand-wash); box-shadow: 0 0 0 3px rgba(69, 186, 253, .15); }
.ql-card input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.ql-go { display: flex; flex-wrap: wrap; gap: .6rem; padding-top: 1rem; }

/* calendar */
.cal-grid { display: grid; gap: 4px; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head span { font-size: .75rem; font-weight: 600; color: var(--muted); text-align: center; }
.cal-cell { min-height: 88px; padding: .35rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; }
.cal-cell.out { opacity: .45; }
.cal-cell.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-cell.holiday { background: #fff7ed; }
.cal-d { font-weight: 700; font-size: .82rem; }
.cal-h { font-size: .68rem; color: #c2410c; line-height: 1.15; }
.cal-pill { display: block; font-size: .7rem; font-weight: 600; padding: .05rem .35rem; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.cal-pill.sent { background: var(--go-wash); color: #065f46; } .cal-pill.due { background: var(--info-wash); color: #1e40af; } .cal-pill.start { background: var(--brand-wash); color: var(--brand-ink); }
.cal-legend { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; align-items: center; }
.cal-legend .cal-pill { display: inline-block; }
@media (max-width: 640px) { .cal-cell { min-height: 58px; padding: .2rem; } .cal-pill { font-size: .6rem; padding: 0 .2rem; } .cal-h { display: none; } .cal-head span { font-size: .65rem; } }

/* preview */
.pv-nav { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; }
.pv-nav .disabled { pointer-events: none; opacity: .4; }
.pv-head { display: grid; gap: .3rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; font-size: .92rem; }
.pv-head small { display: inline-block; width: 4.5rem; }
.pv-body { white-space: pre-wrap; font-size: .95rem; line-height: 1.6; max-width: 68ch; }

/* template report, spam check */
.tr-bar { display: block; height: 4px; background: var(--line-2); border-radius: 4px; margin-top: 3px; overflow: hidden; min-width: 60px; }
.tr-bar i { display: block; height: 100%; background: var(--grad); }
.spam-live { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .55rem .8rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); margin: -.3rem 0 .9rem; font-size: .86rem; }
.sl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; }
.spam-live.good .sl-dot { background: #10b981; } .spam-live.warn .sl-dot { background: #f59e0b; } .spam-live.bad .sl-dot { background: #ef4444; }
.spam-live.bad { background: var(--stop-wash); border-color: #fecaca; }
.sl-words { flex: 1 1 100%; font-size: .8rem; }

/* quick replies, macros */
.qr-item { border-bottom: 1px solid var(--line-2); padding: .5rem 0; }
.qr-item summary { cursor: pointer; display: grid; gap: .1rem; }
.qr-item form { margin-top: .6rem; }
.qr-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .3rem 0 .5rem; font-size: .85rem; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .25rem .7rem; font-size: .82rem; cursor: pointer; }
.chip-btn:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-wash); }
.row-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.qr-grid { align-items: start; }

/* tags, lanes, map */
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .6rem 0; font-size: .85rem; }
.tag-chip { display: inline-block; padding: .15rem .55rem; border-radius: 999px 0 0 999px; background: var(--brand-wash); color: var(--brand-ink); font-weight: 600; font-size: .8rem; text-decoration: none; }
.tag-x { border: 0; background: var(--brand-wash); color: var(--brand-ink); border-radius: 0 999px 999px 0; padding: .15rem .45rem .15rem .2rem; cursor: pointer; font-size: .7rem; }
.tag-x:hover { background: #fecaca; color: #991b1b; }
.tag-add input { width: 11rem; padding: .25rem .5rem; font-size: .82rem; }
.chip-x { display: inline-block; padding: .3rem .6rem; border-radius: 999px; background: var(--brand-wash); color: var(--brand-ink); font-size: .82rem; font-weight: 600; text-decoration: none; }
.filter-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; }
.filter-row .field { margin: 0; min-width: 9rem; }
.tile.pm { color: #0f172a; text-decoration: none; }
.tile.pm.lvl0 { background: #eef2f7; color: #94a3b8; } .tile.pm.lvl1 { background: #e0e7ff; } .tile.pm.lvl2 { background: #a5b4fc; } .tile.pm.lvl3 { background: #6366f1; color: #fff; } .tile.pm.lvl4 { background: #4338ca; color: #fff; }
.tile.pm:hover { outline: 2px solid var(--brand); }
.pm-grid { align-items: start; }

/* blacklist, devices, fix pages */
.bl-row, .dev-row, .fix-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .6rem; padding: .75rem 0; border-bottom: 1px solid var(--line-2); }
.bl-row > div, .fix-row > div:first-child, .dev-main { min-width: 0; flex: 1 1 260px; }
.bl-list { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .85rem; }
.dev-ico { font-size: 1.5rem; }
.fix-grid, .srv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.fix-grid > .panel, .srv-grid > .panel { margin: 0; min-width: 0; }
.fix-grid .span-2 { grid-column: 1 / -1; }
.fix-diag { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .84rem; color: var(--warn); }
.fix-form { border-top: 1px solid var(--line-2); padding-top: .8rem; margin-top: .8rem; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: .2rem .8rem; margin: .5rem 0 .9rem; }
.srv-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .5rem 0; }
.srv-form input, .srv-form select { width: auto; flex: 1 1 8rem; min-width: 0; }
.srv-form button { flex: none; }
.srv-out { max-height: 320px; overflow: auto; background: #0f172a; color: #e2e8f0; padding: .8rem; border-radius: 10px; font-size: .76rem; white-space: pre-wrap; word-break: break-all; }
.srv-job { border-bottom: 1px solid var(--line-2); padding: .5rem 0; } .srv-job summary { cursor: pointer; }
.meter { display: block; height: 6px; background: var(--line-2); border-radius: 6px; overflow: hidden; margin: .2rem 0; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #059669); }
.meter.warn i { background: linear-gradient(90deg, #f59e0b, #d97706); } .meter.bad i { background: linear-gradient(90deg, #ef4444, #b91c1c); }
@media (max-width: 900px) { .fix-grid, .srv-grid { grid-template-columns: 1fr; } }

/* alerts, errors, content */
.nt-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .6rem .3rem; border-bottom: 1px solid var(--line-2); }
.nt-row.unread { background: linear-gradient(90deg, var(--brand-wash), transparent 70%); }
.nt-row.unread .nt-main b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-right: .4rem; vertical-align: middle; }
.nt-ico { font-size: 1.1rem; text-align: center; }
.nt-main { all: unset; cursor: pointer; display: grid; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.nt-main small { color: var(--muted); font-size: .82rem; }
.nt-main:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.err-row { border-bottom: 1px solid var(--line-2); padding: .55rem 0; }
.err-row summary { cursor: pointer; display: flex; gap: .6rem; align-items: flex-start; }
.err-main { display: grid; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.err-row.done { opacity: .6; }
.pill-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.pill-tabs a { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .86rem; text-decoration: none; }
.pill-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.em-edit { border-bottom: 1px solid var(--line-2); padding: .55rem 0; } .em-edit summary { cursor: pointer; }
.em-edit[open] summary { margin-bottom: .5rem; }
.input-suffix { display: flex; align-items: center; gap: .4rem; } .input-suffix input { max-width: 7rem; }
.tk-wait { display: inline-block; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }
.tk-wait.warn { background: var(--warn-wash); color: #92400e; } .tk-wait.bad { background: var(--stop-wash); color: #991b1b; }
ul.plain { list-style: none; padding: 0; margin: 0; font-size: .86rem; min-width: 12rem; }
.btn.on { background: var(--brand-wash); color: var(--brand-ink); border-color: var(--brand); }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .kpis-3 { grid-template-columns: 1fr; } }

/* receipt */
.receipt { max-width: 720px; }
.rc-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: .8rem; margin-bottom: 1rem; }
.rc-meta { text-align: right; }
.rc-to { margin-bottom: 1rem; }
.rc-table { width: 100%; margin-bottom: 1rem; }
.rc-table tfoot th { border-top: 2px solid var(--ink); font-size: 1.05rem; }
@media print { .side, .topbar, .no-print, .banner, .flash, .tour-tip { display: none !important; } .shell { display: block; } .main { margin: 0; } .panel { box-shadow: none; border: 0; } }

/* dark mode */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120; --surface: #111a2e; --surface-2: #0f172a; --ink: #e2e8f0; --ink-2: #cbd5e1; --muted: #94a3b8; --faint: #64748b;
  --line: #1f2a44; --line-2: #18223a; --brand: #ff964b; --brand-ink: #ffc28d; --brand-wash: rgba(255, 150, 75, .14);
  --go-wash: rgba(16, 185, 129, .14); --stop-wash: rgba(239, 68, 68, .14); --warn-wash: rgba(245, 158, 11, .14); --info-wash: rgba(59, 130, 246, .14);
  --grad-soft: linear-gradient(180deg, #111a2e 0%, #0b1120 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .3); --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .45);
}
:root[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: #0f172a; color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .topbar { background: rgba(17, 26, 46, .92); border-color: var(--line); }
:root[data-theme="dark"] .banner.warning, :root[data-theme="dark"] .notice.warning { color: #fcd34d; }
:root[data-theme="dark"] .banner.success, :root[data-theme="dark"] .notice.success { color: #6ee7b7; }
:root[data-theme="dark"] .banner.danger, :root[data-theme="dark"] .notice.error { color: #fca5a5; }
:root[data-theme="dark"] table th { color: var(--muted); }
:root[data-theme="dark"] .tag { background: #1e293b; color: #cbd5e1; }
:root[data-theme="dark"] .tag.good { background: rgba(16, 185, 129, .18); color: #6ee7b7; } :root[data-theme="dark"] .tag.bad { background: rgba(239, 68, 68, .18); color: #fca5a5; }
:root[data-theme="dark"] .tag.warn { background: rgba(245, 158, 11, .18); color: #fcd34d; } :root[data-theme="dark"] .tag.info { background: rgba(59, 130, 246, .18); color: #93c5fd; }
:root[data-theme="dark"] .tour-tip { background: linear-gradient(135deg, #1e1b4b, #1a1f3a); border-color: #3730a3; }
:root[data-theme="dark"] .cal-cell.holiday { background: rgba(194, 65, 12, .12); }
:root[data-theme="dark"] .streak { background: rgba(194, 65, 12, .15); border-color: #7c2d12; color: #fdba74; }
:root[data-theme="dark"] .btn-ghost { color: var(--ink-2); border-color: var(--line); }
:root[data-theme="dark"] .side { background: #0d1528; border-color: var(--line); }
:root[data-theme="dark"] .kpi, :root[data-theme="dark"] .dash-tile { background: var(--surface); }
:root[data-theme="dark"] code { background: #1e293b; color: #e2e8f0; }

/* 4.4.1: the side menu always shows its scrollbar, so every link is reachable */
.side { overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c7cbe0 transparent; scrollbar-gutter: stable; }
.side::-webkit-scrollbar { width: 8px; }
.side::-webkit-scrollbar-track { background: transparent; }
.side::-webkit-scrollbar-thumb { background: #c7cbe0; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.side::-webkit-scrollbar-thumb:hover { background-color: #9aa1c2; }
.shell.is-staff .side { scrollbar-color: #3b4766 transparent; }
.shell.is-staff .side::-webkit-scrollbar-thumb { background-color: #3b4766; }
.shell.is-staff .side::-webkit-scrollbar-thumb:hover { background-color: #56638a; }
.side-more { position: sticky; bottom: -2rem; margin: .4rem -.8rem -2rem; padding: 1.4rem 0 .6rem; text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted);
  background: linear-gradient(180deg, transparent, var(--surface) 55%); pointer-events: none; transition: opacity .2s; }
.shell.is-staff .side-more { background: linear-gradient(180deg, transparent, #161f3d 55%); color: #94a3b8; }
.side-more.gone { opacity: 0; }
@media (min-width: 901px) {
  .shell { background: linear-gradient(90deg, var(--surface) 0 251px, var(--line) 251px 252px, transparent 252px); }
  .shell.is-staff { background: linear-gradient(90deg, #111b33 0 252px, transparent 252px); }
}
:root[data-theme="dark"] .side-more { background: linear-gradient(180deg, transparent, #0d1528 55%); }
@media (min-width: 901px) { :root[data-theme="dark"] .shell:not(.is-staff) { background: linear-gradient(90deg, #0d1528 0 252px, transparent 252px); } }
dialog.wn-modal { max-height: 85vh; overflow-y: auto; }
.srv-job .srv-out, .err-row .srv-out { max-width: 100%; }
.kpis.kpis-row.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis.kpis-row.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1280px) { .kpis.kpis-row.kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .kpis.kpis-row.kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpis.kpis-row.kpis-6, .kpis.kpis-row.kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 4.4.3: guide video on the home and help pages */
.guide-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.2rem; align-items: start; }
.guide-player { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #0b0d22; box-shadow: 0 24px 60px rgba(15, 23, 42, .18), 0 0 0 1px var(--line); }
.guide-player iframe, .guide-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.guide-poster { all: unset; position: absolute; inset: 0; cursor: pointer; display: block; overflow: hidden; }
.guide-poster img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: 100%; object-fit: cover; display: block; transition: transform .4s; }
.guide-poster:hover img { transform: scale(1.02); }
.guide-poster:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.guide-play { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--grad); box-shadow: 0 0 0 10px rgba(255, 255, 255, .18), 0 16px 40px rgba(79, 70, 229, .5); transition: transform .2s; }
.guide-poster:hover .guide-play { transform: scale(1.08); }
.guide-play svg { margin-left: 5px; }
.guide-len { position: absolute; right: 14px; bottom: 12px; padding: .25rem .6rem; border-radius: 8px; background: rgba(0, 0, 0, .7); color: #fff; font: 700 .82rem/1.2 var(--font); }
.guide-chapters { list-style: none; margin: 0; padding: .4rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); max-height: 100%; overflow-y: auto; display: grid; gap: 2px; }
.guide-chapters button { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: .7rem; align-items: center; padding: .5rem .6rem; border-radius: 10px; cursor: pointer; font-size: .9rem; color: var(--ink-2); }
.guide-chapters button:hover, .guide-chapters button.on { background: var(--brand-wash); color: var(--brand-ink); }
.guide-chapters button:focus-visible { outline: 2px solid var(--brand); }
.gc-time { flex: none; min-width: 2.8rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand); }
@media (max-width: 900px) { .guide-wrap { grid-template-columns: minmax(0, 1fr); } .guide-chapters { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); max-height: none; } .guide-play { width: 70px; height: 70px; margin: -35px 0 0 -35px; } }
.guide-link { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem; padding: .5rem 1rem .5rem .55rem; border-radius: 99px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-sm); }
.guide-link span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: .7rem; }
.guide-link small { color: var(--muted); font-weight: 500; }
.guide-link:hover { text-decoration: none; border-color: var(--brand); }
:root[data-theme="dark"] .guide-link { background: var(--surface); }

/* 4.5: plans and sign-up choice */
.plan { position: relative; }
.plan-badge { position: absolute; top: -12px; right: 18px; padding: .25rem .7rem; border-radius: 99px; background: var(--grad); color: #fff; font: 700 .75rem/1.2 var(--font); letter-spacing: .02em; box-shadow: 0 6px 16px rgba(79, 70, 229, .3); }
.plan-trial { margin: .4rem 0 .2rem; padding: .45rem .7rem; border-radius: 10px; background: var(--go-wash); color: #065f46; font-weight: 600; font-size: .86rem; }
.kind-pick { border: 0; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.kind-pick legend { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; padding: 0; }
.kind-opt { position: relative; cursor: pointer; }
.kind-opt input { position: absolute; opacity: 0; }
.kind-opt span { display: grid; gap: .1rem; padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.kind-opt small { color: var(--muted); }
.kind-opt input:checked + span { border-color: var(--brand); background: var(--brand-wash); box-shadow: 0 0 0 3px rgba(69, 186, 253, .15); }
.kind-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
:root[data-theme="dark"] .plan-trial { color: #6ee7b7; }
.name-status { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .35rem; font-size: .85rem; min-height: 1.2em; }
.name-status.ok { color: var(--go); font-weight: 600; }
.name-status.taken { color: var(--stop); font-weight: 600; }
.name-status .chip-btn { font-weight: 500; }
/* 4.5: get the app */
.install .inst-card { max-width: 760px; margin: 0 auto 1.2rem; padding: 1.4rem 1.5rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.install .inst-card h2 { margin-top: 0; }
.inst-done { max-width: 760px; margin: 0 auto 1.2rem; }
.inst-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.inst-steps li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: .8rem; align-items: start; }
.inst-steps small { display: block; color: var(--muted); margin-top: .15rem; }
.inst-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; }
.inst-ico { display: inline-grid; place-items: center; vertical-align: middle; width: 30px; height: 30px; border-radius: 8px; background: var(--brand-wash); color: #007aff; margin-left: .2rem; }
.inst-copy { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .6rem 0; }
.inst-copy code { padding: .4rem .6rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.app-bar { display: flex; align-items: center; gap: .6rem; padding: .5rem 1rem; background: var(--brand-wash); color: var(--brand-ink); font-weight: 600; font-size: .88rem; border-bottom: 1px solid var(--line); }
.app-bar span { flex: 1; min-width: 0; }
.app-bar-x { border: 0; background: none; color: inherit; font-size: 1rem; cursor: pointer; padding: .2rem .4rem; }
.app-bar[hidden] { display: none; }
/* 5.0 */
.perm-table th span { display: inline-block; max-width: 7.5rem; white-space: normal; font-size: .74rem; line-height: 1.2; }
.perm-table td { text-align: center; } .perm-table td:first-child { text-align: left; min-width: 12rem; }

/* ---------- 5.0: website leads, team pages, office TV, client portal ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 0 1rem; }
.lead-new td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.kv { display: grid; grid-template-columns: minmax(6rem, max-content) 1fr; gap: .35rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .85rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.lead-grid { align-items: start; }
.sf-row { display: grid; grid-template-columns: 1fr 9rem auto auto; gap: .5rem; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.sf-row:last-child { border-bottom: 0; }
.blk { border-left: 3px solid var(--brand); }
.agent-chat { display: flex; flex-direction: column; gap: .75rem; }
.ac-log { min-height: 16rem; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .5rem; background: var(--surface-2); border-radius: var(--r); }
.ac-msg { max-width: 78%; padding: .5rem .75rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.ac-msg small { display: block; color: var(--muted); font-size: .72rem; margin-top: .2rem; }
.ac-msg.me { align-self: flex-end; background: var(--brand-wash); border-color: transparent; }
.ac-form { display: flex; gap: .5rem; }
.ac-form input { flex: 1; min-width: 0; }
.v-timeline { list-style: none; margin: 0; padding: 0; }
.v-timeline li { display: flex; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; overflow-wrap: anywhere; }
.v-timeline li:last-child { border-bottom: 0; }
.v-timeline .t-time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 3.4rem; flex-shrink: 0; }
.team-ann { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.shift-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .45rem .9rem; margin: 0 0 .75rem; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); font-size: .9rem; }
.shift-bar span { margin-right: auto; }
.shift-bar.s-in { background: var(--go-wash); border-color: transparent; }
.shift-bar.s-break { background: var(--warn-wash); border-color: transparent; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .9rem; margin-bottom: 1rem; }
.wall-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .9rem; display: flex; flex-direction: column; gap: .55rem; box-shadow: var(--shadow-sm); border-top: 4px solid var(--line-2); min-width: 0; }
.wall-card.st-call { border-top-color: var(--info); }
.wall-card.st-active { border-top-color: var(--go); }
.wall-card.st-break { border-top-color: var(--warn); }
.wall-card.st-away { border-top-color: var(--faint); }
.wc-top { display: flex; gap: .6rem; align-items: center; min-width: 0; }
.wc-top div { min-width: 0; }
.wc-top b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-top small { color: var(--muted); }
.wc-state { font-size: .85rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.wc-state i, .tv-live i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--faint); display: inline-block; flex-shrink: 0; }
.st-call .wc-state i, .tv-live .st-call i { background: var(--info); }
.st-active .wc-state i, .tv-live .st-active i { background: var(--go); }
.st-break .wc-state i, .tv-live .st-break i { background: var(--warn); }
.wc-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; text-align: center; }
.wc-nums span { font-size: .7rem; color: var(--muted); display: flex; flex-direction: column; }
.wc-nums b { font-size: 1.15rem; color: var(--ink); }
.wc-goal { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.wc-goal span { display: block; height: 100%; background: var(--go); }
.wc-link { font-size: .82rem; }
.hour-bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 7rem; align-items: end; }
.hour-bars span { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.hour-bars i { display: block; background: var(--brand); border-radius: 2px 2px 0 0; min-height: 1px; }
.hour-bars small { font-size: .62rem; color: var(--muted); height: 1rem; }
.qa-table td:not(:first-child), .qa-table th:not(:first-child) { text-align: center; width: 6rem; }
.qa-item { border-bottom: 1px solid var(--line); padding: .6rem 0; }
.qa-item summary { cursor: pointer; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.qa-scores { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .25rem; }
.qa-scores li { display: flex; gap: .5rem; font-size: .9rem; }
.qa-comment { background: var(--surface-2); padding: .6rem .8rem; border-radius: var(--r); white-space: pre-wrap; }
.kb-list { list-style: none; margin: 0; padding: 0; }
.kb-list li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.kb-list li p { margin: .2rem 0; }
.kb-body, .script-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.task-list li > div { min-width: 0; overflow-wrap: anywhere; }
.task-list .tick { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); cursor: pointer; color: var(--go); font-weight: 700; padding: 0; line-height: 1; flex-shrink: 0; }
.task-list li.done b { text-decoration: line-through; color: var(--muted); }
.task-list li.done .tick { border-color: var(--go); }
.task-list li.late small { color: var(--stop); }
.objections dt { font-weight: 600; margin-top: .6rem; }
.objections dd { margin: .2rem 0 0 1rem; color: var(--ink-2); }
.client-card .cc-top { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; align-items: flex-start; }
.client-card h2 { margin: 0; }
.kbd-help { border: 0; border-radius: var(--r-lg); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); max-width: min(26rem, calc(100vw - 2rem)); }
.kbd-help dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
.kbd-help dd { margin: 0; }
kbd { font-family: inherit; font-size: .8rem; padding: .05rem .4rem; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); }
/* office TV */
body.tv { background: #0b1020; color: #f3f5fb; min-height: 100vh; padding: 2vw; font-size: clamp(14px, 1.4vw, 28px); }
.tv-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2vw; }
.tv-head h1 { margin: 0; font-size: 2em; color: #fff; }
.tv-clock { font-size: 2em; font-variant-numeric: tabular-nums; color: #fbbf24; }
.tv-main { display: grid; grid-template-columns: 2fr 1fr; gap: 2vw; }
.tv h2 { color: #9aa4c4; font-size: .9em; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .8em; }
.tv-board ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .6em; }
.tv-board li { display: grid; grid-template-columns: 2.5em 1fr repeat(3, 5.5em); gap: .6em; align-items: center; background: #151b33; border-radius: 14px; padding: .6em 1em; }
.tv-rank { font-size: 1.4em; text-align: center; }
.tv-name { font-size: 1.3em; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-n { display: flex; flex-direction: column; align-items: center; font-size: .7em; color: #9aa4c4; }
.tv-n b { font-size: 1.9em; color: #fff; }
.tv-live { list-style: none; padding: 0; margin: 0 0 2em; display: grid; gap: .4em; }
.tv-live li { display: flex; align-items: center; gap: .5em; }
.tv-live small { margin-left: auto; color: #9aa4c4; }
.tv-week { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; }
.tv-week span { background: #151b33; border-radius: 14px; padding: .8em; display: flex; flex-direction: column; align-items: center; color: #9aa4c4; font-size: .8em; }
.tv-week b { font-size: 2.2em; color: #fff; }
@media (max-width: 800px) { .tv-main { grid-template-columns: 1fr; } .tv-board li { grid-template-columns: 2em 1fr repeat(3, 3.6em); } }
/* client portal */
body.portal { background: var(--bg); min-height: 100vh; }
.portal-wrap { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.portal-head h1 { margin: .2rem 0 1rem; }
.portal-foot { text-align: center; }
@media (max-width: 640px) {
  .sf-row { grid-template-columns: 1fr 1fr; }
  .wc-nums b { font-size: 1rem; }
  .hour-bars { height: 5rem; }
  .ac-msg { max-width: 90%; }
}
/* right-to-left languages */
[dir="rtl"] .ac-msg.me { align-self: flex-start; }
[dir="rtl"] .lead-new td:first-child { box-shadow: inset -3px 0 0 var(--brand); }
[dir="rtl"] .shift-bar span { margin-right: 0; margin-left: auto; }
/* 5.0 growth pages */
.ft-tabs { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin: 0 0 1.2rem; }
.ft-tabs a { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.ft-tabs a.on { background: var(--brand); color: #fff; border-color: transparent; }
.ft-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin: 1rem 0; }
.ft-card { display: flex; flex-direction: column; gap: .4rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm); }
.ft-card:hover { border-color: var(--brand); }
.ft-card span { color: var(--muted); font-size: .92rem; }
.ft-form { display: flex; gap: .5rem; max-width: 32rem; margin: 0 auto 1rem; }
.ft-form input { flex: 1; min-width: 0; }
.ft-result { max-width: 46rem; margin: 1rem auto; padding: 1.2rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--line-2); }
.ft-result.lvl-good { border-top-color: var(--go); } .ft-result.lvl-warn { border-top-color: var(--warn); } .ft-result.lvl-bad { border-top-color: var(--stop); }
.ft-head { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; flex-wrap: wrap; }
.ft-head h2 { margin: 0; overflow-wrap: anywhere; }
.ft-badge { padding: .3rem .8rem; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: .9rem; }
.lvl-good .ft-badge { background: var(--go-wash); color: var(--go); } .lvl-warn .ft-badge { background: var(--warn-wash); color: var(--warn); } .lvl-bad .ft-badge { background: var(--stop-wash); color: var(--stop); }
.ft-list { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .3rem; }
.ft-list.good li { color: var(--go); } .ft-list.bad li { color: var(--stop); }
.ft-calc { max-width: 52rem; margin: 0 auto; }
.ft-cta { text-align: center; margin: 2.5rem auto 0; max-width: 36rem; }
.guide-wrap { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.guide-side h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .3rem; }
.guide-side ul { list-style: none; padding: 0; margin: 0; }
.guide-side a { display: block; padding: .3rem .5rem; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.guide-side a.on, .guide-side a:hover { background: var(--brand-wash); color: var(--brand-ink); }
.guide-steps { counter-reset: g; list-style: none; padding: 0; display: grid; gap: .8rem; margin: 1.2rem 0; }
.guide-steps li { counter-increment: g; position: relative; padding: .8rem 1rem .8rem 3.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); line-height: 1.55; }
.guide-steps li::before { content: counter(g); position: absolute; left: .9rem; top: .75rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
@media (max-width: 800px) { .guide-wrap { grid-template-columns: 1fr; } .guide-side { order: 2; } }
.coach-card .cc-top { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; }
.coach-card h2 { margin: 0; overflow-wrap: anywhere; font-size: 1.1rem; }
.coach-score { flex-shrink: 0; width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; background: var(--surface-2); }
.coach-score.good { background: var(--go-wash); color: var(--go); } .coach-score.warn { background: var(--warn-wash); color: var(--warn); } .coach-score.bad { background: var(--stop-wash); color: var(--stop); }
.coach-tips { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: .35rem; }
.coach-tips li.good { color: var(--go); } .coach-tips li.warn { color: var(--ink-2); } .coach-tips li.bad { color: var(--stop); }
.fc-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; height: 11rem; align-items: end; }
.fc-bars span { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; gap: .2rem; min-width: 0; }
.fc-bars b { font-size: .72rem; overflow: hidden; text-overflow: ellipsis; }
.fc-bars i { display: block; background: var(--grad, var(--brand)); border-radius: 4px 4px 0 0; min-height: 2px; }
.fc-bars small { color: var(--muted); font-size: .72rem; }
.churn-bars { display: grid; gap: .45rem; }
.churn-bars div { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr 5rem; gap: .6rem; align-items: center; font-size: .9rem; }
.churn-bars i { height: .7rem; background: var(--surface-2); border-radius: 4px; overflow: hidden; display: block; }
.churn-bars b { display: block; height: 100%; background: var(--stop); }
.churn-bars small { color: var(--muted); text-align: right; }
@media (max-width: 640px) { .churn-bars div { grid-template-columns: 1fr 4.5rem; } .churn-bars i { grid-column: 1 / -1; grid-row: 2; } }
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.testi-card { margin: 0; padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: .6rem; }
.testi-stars { color: #f59e0b; letter-spacing: .1em; }
.testi-card blockquote { margin: 0; line-height: 1.55; }
.testi-card figcaption { display: flex; flex-direction: column; font-size: .9rem; }
.testi-card figcaption span { color: var(--muted); }
.exit-pop { border: 0; border-radius: var(--r-xl); padding: 1.6rem; max-width: min(28rem, calc(100vw - 2rem)); box-shadow: var(--shadow-lg); background: var(--surface); color: var(--ink); }
.exit-pop::backdrop { background: rgba(10, 14, 30, .55); }
.exit-pop h2 { margin-top: 0; }
.exit-x { position: absolute; top: .6rem; right: .7rem; border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.badge-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.badge-chip { display: inline-flex; gap: .4rem; align-items: center; padding: .35rem .8rem; border-radius: 999px; background: var(--warn-wash); font-size: .9rem; font-weight: 600; }
.ref-top { margin: .3rem 0 0; padding-left: 1.4rem; }
.ref-top li { padding: .15rem 0; }
.ref-top li.me { font-weight: 700; color: var(--brand-ink); }
.ref-top b { margin-left: .4rem; }
.bulk-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .5rem .6rem; margin-bottom: .6rem; border-radius: var(--r); background: var(--surface-2); }
.bulk-bar.on { background: var(--brand-wash); }
.bulk-bar input:not([type=checkbox]), .bulk-bar select { width: auto; min-width: 0; max-width: 100%; }
.pl-views { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin: 0 0 .7rem; }
.pl-view { display: inline-flex; align-items: center; }
.pl-view .chip-btn.on { background: var(--brand); color: #fff; }
.pl-view-save summary { list-style: none; cursor: pointer; }
.pl-view-save form { display: inline-flex; gap: .3rem; margin-left: .3rem; }
.call-script .cs-one { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.call-script .cs-one:last-child { border-bottom: 0; }
.call-script h3 { margin: .2rem 0 .4rem; font-size: 1rem; }
.tl-head { font-size: .95rem; margin: 1rem 0 .3rem; }
.full-tl { max-height: 26rem; overflow-y: auto; }
.reply-helper { background: var(--info-wash); border-radius: var(--r); padding: .4rem .6rem; }
/* phone bottom bar */
.m-bar { display: none; }
@media (max-width: 900px) {
  .m-bar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--line); padding: .25rem .25rem calc(.25rem + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
  .m-bar a, .m-bar button { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: .68rem; color: var(--muted); text-decoration: none; background: none; border: 0; padding: .3rem 0; position: relative; font-family: inherit; cursor: pointer; }
  .m-bar span { font-size: 1.15rem; line-height: 1.2; }
  .m-bar a.on { color: var(--brand); font-weight: 700; }
  .m-bar i { position: absolute; top: .1rem; right: 22%; background: var(--stop); color: #fff; font-style: normal; font-size: .62rem; border-radius: 999px; padding: 0 .3rem; }
  body.has-m-bar { padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
}
.lead-who { min-width: 12rem; }
.perm-table th span { min-width: 4.5rem; }
.ft-calc + .ft-result { max-width: 52rem; }
/* 5.1 */
.alert-form { max-width: 44rem; margin: 0 auto; }
.state-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.2rem, 1fr)); gap: .3rem .5rem; border: 1px solid var(--line); border-radius: var(--r); padding: .7rem; margin: 0 0 1rem; }
.state-pick label { display: flex; gap: .3rem; align-items: center; font-size: .9rem; }
.alert-band-in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.4rem 1.6rem; border-radius: var(--r-xl); background: var(--brand-wash); }
.alert-band-in h2 { margin: 0 0 .2rem; }
.cmp-wrap { max-width: 52rem; margin: 0 auto; }
.cmp-table { width: 100%; }
.cmp-table th[scope=row] { text-align: left; color: var(--ink-2); font-weight: 600; }
.cmp-table td:last-child { background: var(--brand-wash); }
.cmp-fair { margin: 1rem 0 0; padding: .8rem 1rem; background: var(--surface-2); border-radius: var(--r); }
.tpl-sheet { max-width: 48rem; margin: 0 auto; background: #fff; color: #111; padding: 2rem; border: 1px solid var(--line); border-radius: var(--r-lg); }
.tpl-sheet h2 { margin-top: 0; } .tpl-sheet h3 { margin: 1.4rem 0 .4rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; }
.tpl-line { display: grid; grid-template-columns: minmax(10rem, 40%) 1fr; gap: .8rem; align-items: end; padding: .45rem 0; }
.tpl-line i { border-bottom: 1px solid #999; height: 1.1rem; }
.tpl-note { font-size: .8rem; color: #666; margin-top: 1.6rem; }
@media print { header, footer, .no-print, .ticker, .exit-pop, .m-bar { display: none !important; } body { background: #fff; } .section { padding: 0; } .tpl-sheet { border: 0; padding: 0; } }
@media (max-width: 560px) { .tpl-line { grid-template-columns: 1fr; gap: .2rem; } .tpl-sheet { padding: 1.1rem; } }
.status-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.status-list li { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.status-list b.good { color: var(--go); } .status-list b.bad { color: var(--stop); }
.success-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.success-steps li { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r); }
.success-steps li.done { background: var(--go-wash); border-color: transparent; }
.success-steps li.done b { text-decoration: line-through; color: var(--muted); }
.ss-n { flex-shrink: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; font-size: .85rem; }
.done .ss-n { background: var(--go); }
.drill-q { font-size: 1.3rem; font-weight: 600; margin: .6rem 0 1rem; }
.drill-result { display: flex; gap: 1rem; align-items: flex-start; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.shared-list { list-style: none; margin: 0; padding: 0; }
.shared-list li { display: flex; justify-content: space-between; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.shared-list li > a { color: var(--ink); text-decoration: none; min-width: 0; flex: 1 1 14rem; }
.shared-list li.answered { opacity: .65; }
.shared-meta { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.prize-card { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; background: linear-gradient(90deg, var(--warn-wash), var(--surface)); }
.prize-ico { font-size: 1.4rem; margin-right: .4rem; }
td.below { color: var(--stop); font-weight: 700; }
.tv-prize { background: #2a1f05; border: 1px solid #fbbf24; border-radius: 14px; padding: .8em 1em; margin-bottom: 1.5em; }
.tv-prize h2 { color: #fbbf24 !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 1.1em !important; }
.tv-prize p { margin: .2em 0; color: #c9cfe4; } .tv-count { color: #fbbf24 !important; font-weight: 700; }
/* billing & payments page */
.bill-nav { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; position: sticky; top: 0; z-index: 5; padding: .4rem 0; background: var(--bg); }
.bill-nav a { padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 600; }
.bill-nav a:hover { border-color: var(--brand); color: var(--brand-ink); }
.bill-nav b { background: var(--stop); color: #fff; border-radius: 999px; padding: 0 .4rem; font-size: .75rem; margin-left: .2rem; }
.bill-sec { scroll-margin-top: 4rem; }
.bill-sec h2 { margin-top: 0; }
.find-code { margin: .6rem 0; }
.found-box { background: var(--info-wash); border-radius: var(--r); padding: .6rem .9rem; margin-bottom: .8rem; }
.pay-decide { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.pay-decide input { min-width: 10rem; flex: 1; }
.pay-btns { display: inline-flex; gap: .3rem; }
.plan-box, .conn-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: .8rem 1rem; margin: .7rem 0; background: var(--surface); }
.plan-box > summary, .conn-card > summary { cursor: pointer; list-style: none; }
.plan-box > summary::-webkit-details-marker, .conn-card > summary::-webkit-details-marker { display: none; }
.plan-box[open] > summary, .conn-card[open] > summary { margin-bottom: .8rem; }
.conn-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.conn-head h3 { margin: 0; font-size: 1rem; }
.conn-del { margin-top: .6rem; text-align: right; }
.plan-more { margin: .6rem 0; }
.plan-more summary { cursor: pointer; font-weight: 600; color: var(--brand-ink); }
/* 5.2 */
.radar-map { position: relative; max-width: 900px; margin: 0 auto; }
.radar-map img { width: 100%; height: auto; display: block; }
.radar-dots { position: absolute; inset: 0; width: 100%; height: 100%; }
.rd-dot { fill: #5b3df5; stroke: #fff; stroke-width: 1.5; animation: rdpop .5s ease-out; cursor: pointer; }
.rd-ring { fill: none; stroke: #5b3df5; stroke-width: 2; opacity: 0; animation: rdring 1.6s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes rdpop { from { transform: scale(0); transform-box: fill-box; transform-origin: center; } to { transform: scale(1); } }
@keyframes rdring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(5); } }
.radar-tip { position: absolute; transform: translate(-50%, -140%); background: #111827; color: #fff; font-size: .8rem; padding: .3rem .6rem; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.radar-feed { max-width: 640px; margin: 1rem auto; display: grid; gap: .35rem; min-height: 9rem; }
.rf-row { display: flex; justify-content: space-between; gap: .8rem; padding: .45rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); animation: rfin .4s ease-out; font-size: .9rem; }
.rf-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rf-row span { color: var(--muted); white-space: nowrap; }
@keyframes rfin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .rf-row { flex-direction: column; gap: 0; } }
@media (prefers-reduced-motion: reduce) { .rd-dot, .rd-ring, .rf-row { animation: none; } }
.wrap-deck { position: relative; height: min(70vh, 34rem); border-radius: var(--r-xl); overflow: hidden; cursor: pointer; user-select: none; margin-bottom: .8rem; }
.wslide { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 2rem; color: #fff;
  opacity: 0; transform: scale(.96); transition: opacity .45s, transform .45s; pointer-events: none; }
.wslide.on { opacity: 1; transform: none; }
.wslide small { text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.88) !important; font-weight: 700; }
.wslide h1 { color: #fff; font-size: clamp(1.8rem, 5vw, 3rem); margin: .4rem 0; }
.wslide p { font-size: 1.15rem; opacity: .95; }
.wbig { font-size: clamp(4rem, 14vw, 8rem); line-height: 1; font-weight: 800; letter-spacing: -.04em; margin: .3rem 0; }
.ws-1 { background: linear-gradient(135deg, #061225, #173d61); } .ws-2 { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.ws-3 { background: linear-gradient(135deg, #10b981, #0ea5e9); } .ws-4 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.ws-5 { background: linear-gradient(135deg, #8b5cf6, #06b6d4); } .ws-6 { background: linear-gradient(135deg, #111827, #5b3df5); }
.wrap-ctrl { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.share-box { margin-top: 1rem; padding: .8rem; background: var(--surface-2); border-radius: var(--r); display: grid; gap: .6rem; overflow-wrap: anywhere; }
.btn-wa { background: #25d366; color: #fff; border-color: transparent; }
body.recap-pub { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #5b3df5, #ec4899); padding: 1rem; }
.rp-card { background: #fff; color: #111827; border-radius: 24px; padding: 2rem; max-width: 30rem; width: 100%; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.rp-card h1 { margin: .3rem 0 1rem; font-size: 1.6rem; } .rp-card small { text-transform: uppercase; letter-spacing: .1em; color: #6b7280; font-weight: 700; }
.rp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: 0 0 1rem; }
.rp-grid div { background: #f5f3ff; border-radius: 14px; padding: .8rem; display: flex; flex-direction: column; }
.rp-grid b { font-size: 1.8rem; color: #5b3df5; } .rp-grid span { color: #4b5563; font-size: .85rem; }
.rp-title { font-size: 1.2rem; font-weight: 700; }
.voice-btn.on { animation: vpulse 1s infinite; } @keyframes vpulse { 50% { transform: scale(1.12); } }
.recap-teaser { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--ink); background: linear-gradient(90deg, var(--brand-wash), var(--surface)); }
.recap-teaser > span:first-child { font-size: 1.8rem; } .recap-teaser div { flex: 1; display: flex; flex-direction: column; } .recap-teaser small { color: var(--muted); }
.ten-list { margin: 0; padding-left: 1.4rem; display: grid; gap: .45rem; }
.ten-list a { color: var(--ink); text-decoration: none; } .ten-list .tag { margin-top: .15rem; white-space: normal; }
.lv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: .8rem; margin-bottom: 1rem; }
.lv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .9rem; display: grid; gap: .5rem; min-width: 0; }
.lv-top { display: flex; align-items: center; gap: .6rem; min-width: 0; } .lv-top div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lv-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lv-top small { color: var(--muted); }
.lv-ico { font-size: 1.6rem; } .lv-rank { font-weight: 800; color: var(--muted); }
.lv-bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; } .lv-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #ef4444); }
.battle-card { text-align: center; }
.bt-sides { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin: 1rem 0; }
.bt-sides div:not(.bt-vs) { display: flex; flex-direction: column; } .bt-sides span { font-size: 2.6rem; font-weight: 800; }
.bt-vs { font-weight: 800; color: var(--muted); }
.bt-bar, .btv-bar { height: 18px; border-radius: 99px; background: #ef4444; overflow: hidden; } .bt-bar i, .btv-bar i { display: block; height: 100%; background: #5b3df5; transition: width .8s; }
.battle-tv .btv-sides { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; margin: 4vh 0; }
.btv-sides b { display: block; font-size: 2.2em; } .btv-sides span { font-size: 7em; font-weight: 800; line-height: 1; }
.btv-a span { color: #a5b4fc; } .btv-b span { color: #fca5a5; } .btv-vs { font-size: 2em; color: #fbbf24; font-weight: 800; }
.battle-tv .btv-bar { height: 4vh; } .btv-metric { text-align: center; font-size: 1.6em; color: #c9cfe4; }
body.btv-flash { animation: btvf 1.5s; } @keyframes btvf { 0%, 100% { background: #0b1020; } 30% { background: #3b2a06; } }
.verified-badge { display: inline-block; vertical-align: middle; font-size: .9rem; background: var(--go-wash); color: var(--go); border-radius: 99px; padding: .15rem .6rem; font-weight: 700; }
.claim-cta { text-align: center; color: var(--muted); }
/* ---------- admin command deck (night freight: midnight and brass) ---------- */
:root { --mid: #061225; --mid-2: #0c2440; --mid-3: #153653; --brass: #ff964b; --brass-2: #ffc28d; --ivory: #f4f8ff; --slate: #b2c8df; --emerald: #a3f5ce; --rose: #ffc0c7; }
.shell.is-staff .side { background: linear-gradient(180deg, var(--mid) 0%, #111b30 70%, var(--mid-2) 100%); border-right-color: #22304f; }
.shell.is-staff .side .group { text-transform: none; letter-spacing: .01em; font-size: .74rem; color: #6f7c96; font-weight: 600; }
.shell.is-staff .side a.nav { color: #c6cedd; }
.shell.is-staff .side a.nav:hover { background: rgba(69, 186, 253, .12); color: var(--ivory); }
.shell.is-staff .side a.nav.on { background: linear-gradient(90deg, rgba(36, 116, 184, .38), rgba(21, 57, 92, .21)); color: var(--ivory); box-shadow: inset 2px 0 0 var(--brass); }
.shell.is-staff .side a.nav .count { background: var(--brass); color: var(--mid); }
.shell.is-staff .side .brand-sub { color: var(--brass-2); }

.deck { background: radial-gradient(120% 140% at 85% 0%, #24345a 0%, var(--mid-2) 38%, var(--mid) 100%); color: var(--ivory); border-radius: 22px;
  padding: clamp(1.2rem, 3vw, 2.2rem); margin: 0 0 1.2rem; position: relative; overflow: hidden; border: 1px solid #263556; }
.deck::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.018) 0 2px, transparent 2px 7px); }
.deck > * { position: relative; z-index: 1; }
.deck-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .9fr); gap: 1.5rem; align-items: center; }
.deck-date { color: var(--brass-2); margin: 0 0 .3rem; font-size: .92rem; }
.deck h1 { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.05; letter-spacing: -.01em; color: var(--ivory); margin: 0 0 .5rem; }
.deck-sub { color: #c3cbd9; margin: 0 0 1.4rem; font-size: 1.02rem; }
.deck-pulse { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.deck-pulse a { display: flex; flex-direction: column; padding: .65rem 1rem; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(201,169,110,.18);
  color: var(--ivory); text-decoration: none; min-width: 7.5rem; }
.deck-pulse a:hover { border-color: rgba(201,169,110,.5); }
.deck-pulse b { font-family: "Fraunces", Georgia, serif; font-size: 1.7rem; font-weight: 500; line-height: 1.1; }
.deck-pulse span { color: var(--slate); font-size: .84rem; display: flex; align-items: center; gap: .35rem; }
.pulse-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 0 rgba(63,182,139,.6); animation: pdot 2.2s infinite; }
@keyframes pdot { 70% { box-shadow: 0 0 0 7px rgba(63,182,139,0); } 100% { box-shadow: 0 0 0 0 rgba(63,182,139,0); } }
.deck-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.deck-btn { padding: .6rem 1.05rem; border-radius: 999px; border: 1px solid rgba(243,238,227,.25); color: var(--ivory); text-decoration: none; font-weight: 600; font-size: .92rem; }
.deck-btn:hover { border-color: var(--brass); color: var(--brass-2); }
.deck-btn.primary { background: linear-gradient(180deg, var(--brass-2), var(--brass)); color: var(--mid); border-color: transparent; box-shadow: 0 6px 18px rgba(201,169,110,.25); }
.deck-btn.primary:hover { color: var(--mid); filter: brightness(1.05); }
.deck-btn:focus-visible, .deck-pulse a:focus-visible, .deck-money a:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 2px; }

.dial { margin: 0; display: grid; justify-items: center; position: relative; }
.dial-svg { width: min(100%, 340px); height: auto; overflow: visible; }
.dial-track { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 14; stroke-linecap: round; }
.dial-fill { fill: none; stroke: url(#none); stroke: var(--brass); stroke-width: 14; stroke-linecap: round; stroke-dasharray: var(--pct) 100;
  filter: drop-shadow(0 0 6px rgba(201,169,110,.45)); animation: dialfill 1.6s cubic-bezier(.2,.8,.2,1) both .2s; }
.tick { stroke: rgba(243,238,227,.25); stroke-width: 1.2; } .tick.major { stroke: var(--brass-2); stroke-width: 2; }
.dial-hand { transform-origin: 150px 150px; transform: rotate(var(--deg)); animation: dialhand 1.6s cubic-bezier(.2,.8,.2,1) both .2s; }
.dial-hand line { stroke: var(--ivory); stroke-width: 3; stroke-linecap: round; }
.dial-hand circle { fill: var(--brass); } .dial-hand .hub { fill: var(--mid); }
@keyframes dialhand { from { transform: rotate(-120deg); } to { transform: rotate(var(--deg)); } }
@keyframes dialfill { from { stroke-dasharray: 0 100; } }
.dial { padding-bottom: 1.2rem; }
.dial figcaption { position: absolute; left: 0; right: 0; top: 60%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.dial-label { color: var(--slate); font-size: .85rem; }
.dial-num { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: clamp(2rem, 4vw, 2.7rem); color: var(--ivory); line-height: 1.1; }
.dial-goal { color: var(--brass-2); font-size: .86rem; }
.dial-edit { margin-top: .3rem; font-size: .8rem; color: var(--slate); }
.dial-edit summary { cursor: pointer; } .dial-edit form { display: flex; gap: .3rem; margin-top: .3rem; }
.dial-edit input { width: 6.5rem; padding: .25rem .5rem; border-radius: 8px; border: 1px solid #33456d; background: var(--mid); color: var(--ivory); }
.dial-edit button { border: 0; border-radius: 8px; background: var(--brass); color: var(--mid); font-weight: 700; padding: .25rem .6rem; cursor: pointer; }

.deck-money { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 1px; margin-top: 1.6rem;
  background: rgba(201,169,110,.18); border-radius: 16px; overflow: hidden; border: 1px solid rgba(201,169,110,.18); }
.deck-money a { background: rgba(14,22,38,.72); padding: .9rem 1.1rem; display: flex; flex-direction: column; color: var(--ivory); text-decoration: none; }
.deck-money a:hover { background: rgba(31,44,74,.9); }
.deck-money span { color: var(--slate); font-size: .84rem; }
.deck-money b { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 1.6rem; line-height: 1.2; }
.deck-money small { color: #a9b3c6; font-size: .8rem; } .deck-money small.up { color: #7fd6b1; } .deck-money small.down { color: #f3a1ab; }

.deck-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .9fr); gap: 1rem; margin-bottom: 1rem; align-items: start; }
.deck-grid h2 { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 1.3rem; margin: 0 0 .8rem; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.deck-grid h2 small { font-family: inherit; font-size: .8rem; color: var(--muted); font-weight: 400; }
.need { display: flex; gap: .8rem; align-items: center; padding: .65rem .75rem; border-radius: 12px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); margin-bottom: .45rem; }
.need:hover { border-color: var(--brass); }
.need b { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.35rem; min-width: 2.2rem; text-align: center; }
.need-bad b { color: var(--rose); } .need-warn b { color: #c48a2c; } .need-info b { color: #4f6bd8; }
.needs-clear { color: var(--muted); margin: 0; }
.fn-row { display: grid; grid-template-columns: minmax(9.5rem, 11.5rem) minmax(0, 1fr) 3.2rem 2.8rem; gap: .6rem; align-items: center; padding: .4rem 0; text-decoration: none; color: var(--ink); }
.fn-label { font-size: .9rem; } .fn-row b { text-align: right; font-variant-numeric: tabular-nums; } .fn-row small { color: var(--muted); text-align: right; }
.fn-bar { height: .75rem; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.fn-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mid-3), var(--brass)); }
.fn-note { font-size: .8rem; margin: .5rem 0 0; }
.sys ul { list-style: none; padding: 0; margin: 0 0 .6rem; }
.sys li { display: flex; justify-content: space-between; padding: .38rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.sys li b.ok { color: var(--emerald); } .sys li b.bad { color: var(--rose); } .sys li b.muted { color: var(--muted); font-weight: 500; }
.sys-dot { width: .6rem; height: .6rem; border-radius: 50%; display: inline-block; align-self: center; } .sys-dot.ok { background: var(--emerald); } .sys-dot.bad { background: var(--rose); }
@media (max-width: 1100px) { .deck-grid { grid-template-columns: 1fr 1fr; } .deck-grid .sys { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .deck-top { grid-template-columns: 1fr; } .dial { order: -1; max-width: 300px; justify-self: center; }
  .deck-grid { grid-template-columns: 1fr; }
  .fn-row { grid-template-columns: minmax(0, 1fr) 3.2rem 2.4rem; } .fn-bar { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { .dial-hand, .dial-fill, .pulse-dot { animation: none; } }
.edit-link { font-size: .8rem; }
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: .6rem; margin-bottom: 1rem; }
.team-card { display: flex; flex-direction: column; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); text-decoration: none; color: var(--ink); min-width: 0; }
.team-card span { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; } .team-card.on { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); }
.staff-card .panel-head { align-items: flex-start; gap: .6rem; flex-wrap: wrap; } .staff-card h3 { margin: 0; }
.staff-tags { display: flex; gap: .3rem; flex-wrap: wrap; } .perm-group { margin: .6rem 0 .2rem; font-weight: 600; }
.job-help dl { margin: 0; } .job-help dt { font-weight: 600; margin-top: .5rem; } .job-help dd { margin: 0; color: var(--muted); font-size: .9rem; }
.dial-edit-btn { margin-top: .4rem; background: transparent; border: 1px solid rgba(201,169,110,.45); color: var(--brass-2); border-radius: 999px; padding: .25rem .8rem; font: inherit; font-size: .82rem; cursor: pointer; }
.dial-edit-btn:hover { background: rgba(201,169,110,.12); } .dial-edit-btn:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 2px; }
.goal-dlg { border: 0; border-radius: 18px; padding: 1.4rem 1.5rem; width: min(26rem, calc(100vw - 2rem)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.goal-dlg::backdrop { background: rgba(14,22,38,.6); } .goal-dlg h2 { margin-top: 0; font-family: "Fraunces", Georgia, serif; font-weight: 500; }
.goal-row { display: flex; align-items: center; gap: .4rem; margin: .3rem 0 1rem; } .goal-row span { font-size: 1.3rem; color: var(--muted); }
.goal-row input { font-size: 1.4rem; font-weight: 600; flex: 1; min-width: 0; }
/* white-label brands: any logo shape and long names fit */
.brand { min-width: 0; } .brand > span { min-width: 0; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 14rem; }
.brand-logo { max-width: 150px; max-height: 40px; width: auto; height: auto; object-fit: contain; }
@media (max-width: 420px) { .brand-name { max-width: 9rem; } .brand-logo { max-width: 110px; } }
.lane-cell { min-width: 9.5rem; }
