/* MCPilot: one stylesheet for the website and the admin pages. */
:root {
  --bg: #f6f5f3; --surface: #ffffff; --surface-2: #efedea; --text: #312d2a; --muted: #6b645e; --line: #dedad5;
  --accent: #c74634; --accent-2: #3f7c93; --accent-text: #ffffff;
  --ok: #1f8a5b; --bad: #c0392b; --warn: #b45309;
  --glow: rgba(199, 70, 52, .14);
  --radius: 14px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }

/* ---------- top bar (all pages) ---------- */
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1120px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.brand svg { width: 36px; height: 36px; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.topbar nav a.link { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.topbar nav a.link:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 720px) { .topbar nav a.link { display: none; } }
.topbar .btn { white-space: nowrap; }
@media (max-width: 440px) { .topbar .brand span { display: none; } .topbar .btn { padding: 8px 11px; font-size: 13px; } }

/* ---------- app pages (admin) ---------- */
main.app { max-width: 1120px; margin: 0 auto; padding: 28px 16px 64px; }h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.02em; }
h2 { font-size: 18px; margin: 32px 0 12px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 12px 0; }
.card.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.card.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); color: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.wrap { overflow-x: auto; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
  color: var(--text); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
label { display: block; margin: 12px 0 6px; font-weight: 600; font-size: 14px; }
button, .btn { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: transform .15s, box-shadow .2s, background .2s; }
button:hover, .btn:hover { transform: translateY(-1px); }
button.primary, .btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff;
  box-shadow: 0 6px 24px -8px var(--glow); }
button.primary:hover, .btn.primary:hover { box-shadow: 0 10px 34px -8px var(--glow); }
button.danger { color: var(--bad); }
.btn.lg, button.lg { padding: 12px 20px; font-size: 15px; border-radius: 12px; }
form.inline { display: inline; }
.pill { padding: 2px 9px; border-radius: 99px; font-size: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.pill.nowrap { white-space: nowrap; display: inline-block; margin-top: 4px; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .grow { flex: 1; }
.center-card { max-width: 520px; margin: 48px auto; }
.btn.wide, button.wide { width: 100%; justify-content: center; text-align: center; }
.or { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.terms-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.terms-note a { color: inherit; text-decoration: underline; }

/* ---------- marketing site ---------- */
.site main { overflow: hidden; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
#net { position: fixed; inset: 0; z-index: -1; opacity: .55; pointer-events: none; }
.aurora { position: absolute; inset: -20% -10% auto; height: 760px; z-index: -1; pointer-events: none; filter: blur(70px); opacity: .55;
  background: radial-gradient(40% 50% at 25% 35%, #c74634 0%, transparent 70%), radial-gradient(35% 45% at 75% 30%, #356b80 0%, transparent 70%),
              radial-gradient(30% 40% at 55% 70%, #d99a3a 0%, transparent 70%);
  animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(0, 40px, 0) scale(1.08) rotate(4deg); } }

.hero { position: relative; padding: 96px 0 72px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
@media (max-width: 920px) { .hero { grid-template-columns: minmax(0, 1fr); padding-top: 64px; } }
/* Fixed column widths: a long line typed in the demo can never widen the panel or move the page. */
.hero > *, .demo-wrap, .demo, .demo .win, .composer { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border: 1px solid var(--line);
  background: var(--surface); padding: 6px 12px; border-radius: 99px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(38px, 6vw, 66px); line-height: 1.02; letter-spacing: -.035em; margin: 20px 0 18px; }
.grad { background: linear-gradient(100deg, #a93a2b 0%, #c74634 30%, #3f7c93 70%, #356b80 100%); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 560px; margin: 0 0 28px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { margin-top: 28px; display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.trust span::before { content: "✓"; color: var(--ok); margin-right: 6px; font-weight: 700; }

/* Animated chat demo */
.demo { position: relative; border-radius: 20px; padding: 1px; background: linear-gradient(140deg, rgba(199, 70, 52,.6), rgba(63, 124, 147,.25) 40%, rgba(49, 45, 42,.06));
  box-shadow: 0 40px 120px -40px rgba(199, 70, 52, .55); transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); transition: transform .6s; }
.demo:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.demo .win { background: #ffffff; border-radius: 19px; overflow: hidden; }
.demo .bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid rgba(49, 45, 42,.07); font-size: 12px; color: var(--muted); }
.demo .bar i { width: 10px; height: 10px; border-radius: 50%; background: #cfc9c3; display: inline-block; }
.demo .bar b { margin-left: 8px; font-weight: 600; color: #3d3833; }
/* Fixed height, newest message at the bottom: the chat never resizes the hero while it plays. */
.demo .body { padding: 18px; height: 390px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; font-size: 14px;
  mask-image: linear-gradient(180deg, transparent 0, #000 56px); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 56px); }
.demo .body > * { flex: none; }
@media (max-width: 600px) { .demo .body { height: 330px; font-size: 13px; } }
/* Message box at the bottom of the demo: the question is typed here, then sent. */
.composer { display: flex; gap: 10px; align-items: center; margin: 0 14px 14px; padding: 8px 8px 8px 14px; min-height: 46px; border-radius: 14px;
  background: #ffffff; border: 1px solid rgba(49, 45, 42,.08); font-size: 14px; transition: border-color .3s; }
.composer.typing { border-color: rgba(199, 70, 52,.5); }
/* Fixed height: a long question stays on one line (its end stays visible while typing), so the page never moves. */
.composer { height: 46px; }
#demo-input { flex: 1; min-width: 0; color: var(--text); white-space: nowrap; overflow: hidden; }
#demo-input.ph { color: var(--muted); }
.send { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; color: #fff;
  background: rgba(49, 45, 42,.08); transition: transform .15s, background .3s; }
.composer.typing .send { background: linear-gradient(135deg, #c74634, #3f7c93); }
.send.go { transform: scale(.8); }
.msg.user { transform: translateY(26px) scale(.96); transform-origin: bottom right; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; }
.msg.show { opacity: 1; transform: none; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, #c74634, #a93a2b); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: #ffffff; border: 1px solid rgba(49, 45, 42,.07); border-bottom-left-radius: 4px; }
.msg.ai p { margin: 0; } .msg.ai p + p, .msg.ai ul + p { margin-top: 6px; }
.msg.ai ul { margin: 6px 0 0; padding-left: 18px; } .msg.ai li { margin: 3px 0; } .msg.ai li::marker { color: #c74634; }
.tool { align-self: flex-start; font-family: var(--mono); font-size: 12px; color: #3f7c93; background: rgba(63, 124, 147,.08);
  border: 1px solid rgba(63, 124, 147,.25); padding: 5px 10px; border-radius: 8px; opacity: 0; transition: opacity .3s; }
.tool.show { opacity: 1; }
.tool .spin { display: inline-block; width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  margin-right: 8px; vertical-align: -1px; animation: spin .8s linear infinite; }
.tool.done .spin { animation: none; border: 0; width: auto; height: auto; } .tool.done .spin::before { content: "✓"; color: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }
.caret::after { content: "▍"; animation: blink 1s steps(1) infinite; color: var(--accent-2); }
@keyframes blink { 50% { opacity: 0; } }

/* Sections */
section.block { padding: 88px 0; position: relative; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--accent-2); font-weight: 700; }
.block h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.03em; margin: 10px 0 14px; line-height: 1.1; }
.block .sub { color: var(--muted); font-size: 17px; max-width: 640px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
@media (max-width: 920px) { .grid3 { grid-template-columns: 1fr; } }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; overflow: hidden;
  transition: transform .3s, border-color .3s; }
.tile:hover { transform: translateY(-4px); border-color: rgba(199, 70, 52,.45); }
.tile::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(199, 70, 52,.14), transparent 40%);
  opacity: 0; transition: opacity .3s; pointer-events: none; }
.tile:hover::before { opacity: 1; }
.tile .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, rgba(199, 70, 52,.22), rgba(63, 124, 147,.12)); border: 1px solid rgba(199, 70, 52,.3); margin-bottom: 16px; }
.tile h3 { margin: 0 0 6px; font-size: 17px; }
.tile p { margin: 0; color: var(--muted); font-size: 14.5px; }
.step-no { font-family: var(--mono); font-size: 13px; color: var(--accent-2); }

.marquee { margin-top: 36px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee .track { display: flex; gap: 12px; width: max-content; animation: scroll 40s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee .q { white-space: nowrap; padding: 10px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: #3d3833; font-size: 14px; }
@keyframes scroll { to { transform: translateX(-50%); } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: #3d3833; }
.checks li::before { content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, var(--ok), #3f7c93); margin-top: 1px; }
.shield { aspect-ratio: 1; width: 100%; max-width: 420px; margin: 0 auto; position: relative; display: grid; place-items: center; }
.shield .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(199, 70, 52,.3); animation: ring 4s ease-out infinite; }
.shield .ring:nth-child(2) { animation-delay: 1.3s; } .shield .ring:nth-child(3) { animation-delay: 2.6s; }
@keyframes ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(1); opacity: 0; } }
.shield .core { width: 44%; aspect-ratio: 1; border-radius: 28%; display: grid; place-items: center; font-size: 56px;
  background: linear-gradient(135deg, rgba(199, 70, 52,.35), rgba(63, 124, 147,.2)); border: 1px solid rgba(199, 70, 52,.5);
  box-shadow: 0 0 80px -10px var(--glow); }

.faq details { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 4px 18px; margin: 10px 0; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--accent-2); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--muted); }

.cta-band { border-radius: 24px; padding: 48px; position: relative; overflow: hidden; border: 1px solid rgba(199, 70, 52,.35);
  background: radial-gradient(80% 120% at 0% 0%, rgba(199, 70, 52,.35), transparent 60%), radial-gradient(70% 100% at 100% 100%, rgba(63, 124, 147,.25), transparent 60%), var(--surface); }
.cta-band .split { align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .cta-band { padding: 28px 20px; } }
.form-grid .full { grid-column: 1 / -1; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); font-size: 13px; }
.consent input { width: auto; margin-top: 3px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

footer.site-foot { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 13px; margin-top: 40px; }
footer.site-foot .row a { color: var(--muted); text-decoration: none; } footer.site-foot .row a:hover { color: var(--text); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.legal { max-width: 760px; margin: 0 auto; padding: 56px 16px 80px; }
.legal h1 { font-size: 34px; } .legal h2 { margin-top: 32px; } .legal p, .legal li { color: #3d3833; }
.legal .table-wrap { overflow-x: auto; margin: 16px 0; } .legal table { min-width: 520px; } .legal th { color: var(--text); } .legal td { color: #3d3833; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; } .legal h3 { margin-top: 24px; }

/* Reduced motion (also Windows "Animation effects" off): stop the big moving parts (drifting, scrolling,
   sliding, tilting) but keep the small in-place animations inside the cards. */
@media (prefers-reduced-motion: reduce) {
  .aurora, .marquee .track, .float, .viz.orbit .ring { animation: none !important; }
  .reveal, .msg, .tool { opacity: 1 !important; transform: none !important; transition: none !important; }
  .demo, .demo:hover { transform: none; }
  html { scroll-behavior: auto; }
}

/* Copy-to-clipboard field and setup steps (account page, website) */
.copy code { padding: 10px 12px; border-radius: 10px; overflow-wrap: anywhere; }
.steps { margin-top: 18px; }
.steps ol { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.steps li { margin: 6px 0; }
.steps li b { color: var(--text); }

/* ---------- landing v2: visual, animated ---------- */
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.small { font-size: 13px; }
.demo-wrap { position: relative; }
/* Desktop: the chat is taller, growing upward only. The negative top margin keeps its layout height,
   so the bottom of the panel stays where it was. */
@media (min-width: 921px) { .demo .body { height: 450px; } .demo-wrap { margin-top: -60px; } }
.float { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .92); border: 1px solid rgba(49, 45, 42,.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px -20px rgba(49, 45, 42, .18); animation: bob 7s ease-in-out infinite; }
.float .i { width: 16px; height: 16px; color: #3f7c93; }
.float.f1 { left: -28px; top: 18%; }
/* "Read-only" sits inside the chat panel, pinned to its top-right corner: it tilts with the panel and
   stays in place at any width or zoom. */
.float.f2 { right: 16px; top: -18px; animation: none; }
@keyframes bob { 50% { transform: translateY(-12px); } }
@media (max-width: 920px) { .float.f1 { display: none; } .float.f2 { top: -16px; padding: 7px 11px; } }
.demo .body.fade > * { opacity: 0 !important; transition: opacity .8s; }

/* How it works: a little campaign canvas */
.flow { display: flex; align-items: center; justify-content: center; margin-top: 44px; }
.flow .node { flex: none; width: 210px; text-align: center; padding: 22px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.flow .node b { display: block; font-size: 16px; margin-top: 12px; } .flow .node small { color: var(--muted); }
.nico { width: 58px; height: 58px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #c74634, #d99a3a); box-shadow: 0 12px 34px -12px rgba(199, 70, 52,.8); }
.flow .node:nth-child(3) .nico { background: linear-gradient(135deg, #d99a3a, #3f7c93); }
.flow .node:nth-child(5) .nico { background: linear-gradient(135deg, #3f7c93, #356b80); box-shadow: 0 12px 34px -12px rgba(63, 124, 147,.8); }
.nico .i { width: 28px; height: 28px; }
.wire { flex: 1; height: 3px; min-width: 30px; border-radius: 3px; opacity: .9;
  background: repeating-linear-gradient(90deg, #c74634 0 10px, transparent 10px 20px); background-size: 40px 3px; animation: flow 1.6s linear infinite; }
@keyframes flow { to { background-position: 40px 0; } }
@keyframes flowv { to { background-position: 0 32px; } }
/* The connector URL above the flow, then a fork into two paths (ChatGPT, Claude) that join again */
.urltop { max-width: 560px; margin: 30px auto 0; text-align: center; }
.urltop .copy { margin-top: 8px; text-align: left; } .urltop code { overflow-wrap: anywhere; }
.flow .paths { flex: 0 1 340px; display: grid; grid-auto-rows: 1fr; gap: 16px; text-align: left; }
.branch { flex: 1; min-width: 40px; max-width: 90px; align-self: stretch; display: flex; }
.branch svg { width: 100%; height: 100%; overflow: visible; }
.branch path { fill: none; stroke: #c74634; stroke-width: 3; stroke-dasharray: 10 10; vector-effect: non-scaling-stroke; animation: dash 1.6s linear infinite; }
.branch .wire { display: none; }
@keyframes dash { to { stroke-dashoffset: -40; } }
.path { --c: #3f7c93; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); border-top: 3px solid var(--c);
  transition: transform .2s, box-shadow .2s; }
.path:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -18px var(--c); }
.path.gpt { --c: #10a37f; } .path.claude { --c: #d97757; }
.path .btn { display: flex; justify-content: center; width: 100%; font-weight: 700; border-color: var(--c); }
.path .btn:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.path ol { list-style: none; counter-reset: s; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.flow .path b { display: inline; font-size: inherit; margin: 0; }
.path li { counter-increment: s; display: flex; gap: 8px; align-items: baseline; }
.path li::before { content: counter(s); flex: none; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--c); }
p.flow-note { max-width: 640px; margin: 26px auto 0; text-align: center; font-size: 15px; }
.flow-cta { text-align: center; margin-top: 18px; }
.plan p.center-note { text-align: center; margin: -10px 0 12px; }
@media (max-width: 980px) {
  .flow { flex-direction: column; align-items: center; } .flow .node, .flow .paths { width: 100%; max-width: 360px; flex: none; }
  .branch { flex: none; max-width: none; min-width: 0; align-self: center; } .branch svg { display: none; } .branch .wire { display: block; }
  .wire { width: 3px; height: 34px; flex: none; min-width: 0; background: repeating-linear-gradient(180deg, #c74634 0 8px, transparent 8px 16px);
    background-size: 3px 32px; animation-name: flowv; }
}

/* Feature bento with mini pictures */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 40px; }
.bento-6 { grid-column: span 6; } .bento-3 { grid-column: span 3; } .bento-2 { grid-column: span 2; }
@media (max-width: 920px) { .bento { grid-template-columns: 1fr; } .bento-6, .bento-3, .bento-2 { grid-column: auto; } }
.bento .tile h3 { margin-top: 18px; }
.viz { position: relative; height: 150px; border-radius: 14px; background: rgba(49, 45, 42,.025); border: 1px solid var(--line); overflow: hidden; }
.viz.bars { display: flex; align-items: flex-end; gap: 10px; padding: 18px 18px 0; }
.viz.bars i { flex: 1; height: var(--h); border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #c74634, rgba(199, 70, 52,.15));
  transform-origin: bottom; animation: grow 4s ease-in-out var(--d) infinite; }
.viz.bars i:nth-child(even) { background: linear-gradient(180deg, #3f7c93, rgba(63, 124, 147,.12)); }
@keyframes grow { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.tag { position: absolute; top: 12px; right: 12px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: rgba(31, 138, 91,.14); color: var(--ok); }
.viz.contact { padding: 14px 16px; }
.viz.contact .who { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; }
.viz.contact .who b { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: linear-gradient(135deg, #c74634, #d99a3a); color: #fff; }
.viz.contact small { color: var(--muted); font-weight: 400; }
.viz.contact ol { list-style: none; margin: 12px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 8px; font-size: 13px; }
.viz.contact li { position: relative; color: var(--muted); animation: step 6s ease-in-out var(--d) infinite both; }
.viz.contact li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #3f7c93; box-shadow: 0 0 0 4px rgba(63, 124, 147,.18); }
.viz.contact em { color: var(--text); font-style: normal; }
@keyframes step { 0% { opacity: 0; transform: translateX(-6px); } 12%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.viz.venn { display: grid; place-items: center; }
.viz.venn i { position: absolute; width: 84px; height: 84px; border-radius: 50%; mix-blend-mode: screen; opacity: .75; animation: breathe 5s ease-in-out infinite; }
.viz.venn i:nth-child(1) { background: #c74634; transform: translate(-26px, -12px); }
.viz.venn i:nth-child(2) { background: #3f7c93; transform: translate(26px, -12px); animation-delay: -1.6s; }
.viz.venn i:nth-child(3) { background: #d99a3a; transform: translate(0, 24px); animation-delay: -3.2s; }
.viz.venn span { position: absolute; bottom: 10px; font-size: 12px; font-weight: 700; color: var(--text); }
@keyframes breathe { 50% { scale: 1.12; } }
.viz.table { padding: 10px 14px; display: grid; gap: 6px; align-content: center; }
.viz.table div { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: rgba(49, 45, 42,.03); animation: hl 6s ease-in-out infinite; }
.viz.table div:nth-child(2) { animation-delay: 1.5s; } .viz.table div:nth-child(3) { animation-delay: 3s; } .viz.table div:nth-child(4) { animation-delay: 4.5s; }
.viz.table em { font-style: normal; color: #3f7c93; font-family: var(--mono); font-size: 12px; }
@keyframes hl { 0%, 30%, 100% { background: rgba(49, 45, 42,.03); } 10%, 20% { background: rgba(199, 70, 52,.18); } }
.viz.orbit { display: grid; place-items: center; }
.viz.orbit .core { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #c74634, #3f7c93); }
.viz.orbit .ring { position: absolute; width: 200px; height: 200px; animation: spin 30s linear infinite; }
.viz.orbit .ring span { position: absolute; left: 50%; top: 50%; font-size: 11px; font-weight: 600; white-space: nowrap; padding: 3px 8px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line); transform: rotate(var(--a)) translate(78px) rotate(calc(-1 * var(--a))) translate(-50%, -50%); }
.viz.team { height: 110px; display: flex; justify-content: center; align-items: center; gap: 26px; flex-wrap: wrap; }
.viz.team > div { display: flex; align-items: center; gap: 10px; }
.viz.team b { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.sw { width: 40px; height: 22px; border-radius: 99px; background: rgba(49, 45, 42,.12); position: relative; animation: swbg 8s ease-in-out var(--d) infinite; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; animation: swknob 8s ease-in-out var(--d) infinite; }
.sw.off { animation-direction: reverse; } .sw.off::after { animation-direction: reverse; }
@keyframes swbg { 0%, 40% { background: #3f7c93; } 50%, 90% { background: rgba(49, 45, 42,.12); } 100% { background: #3f7c93; } }
@keyframes swknob { 0%, 40% { transform: translateX(18px); } 50%, 90% { transform: none; } 100% { transform: translateX(18px); } }
.marquee + .marquee { margin-top: 12px; }
.marquee.rev .track { animation-direction: reverse; animation-duration: 50s; }

/* Stats band */
.stats-band { padding: 40px 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr 1fr; } }
.stats b { display: block; font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(100deg, #a93a2b, #c74634 45%, #3f7c93); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { color: var(--muted); font-size: 14px; }

/* Security */
.sec { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
@media (max-width: 600px) { .sec { grid-template-columns: 1fr; } }
.sec > div { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.sec .i { color: #c74634; width: 26px; height: 26px; } .sec b { display: block; margin: 8px 0 2px; } .sec span { color: var(--muted); font-size: 14px; }
.shield .core .i { width: 40%; height: 40%; color: #fff; }

/* Pricing */
.plan { padding: 30px 26px; display: flex; flex-direction: column; }
.plan.featured { border-color: rgba(199, 70, 52,.6); box-shadow: 0 30px 80px -40px rgba(199, 70, 52,.6); }
.plan .price { font-size: 50px; font-weight: 800; letter-spacing: -.03em; margin: 10px 0 6px; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.plan .checks { margin: 8px 0 22px; flex: 1; }
.plan .btn { width: 100%; justify-content: center; }
.plan label { font-weight: 500; color: var(--muted); }
.plan [data-out="note"] { margin: 0 0 6px; }
.plan input[type=range] { padding: 0; height: 6px; accent-color: #c74634; background: transparent; border: 0; margin: 6px 0 4px; }
.plan input[type=range]:focus { box-shadow: none; }
/* Pricing page inside the account pages: the top bar is already above it. */
section.block.pricing-page { padding-top: 8px; }
.pricing-page .grid3 { margin-top: 24px; }

/* Super admin: click a company to show its people */
button.linkish { background: none; border: 0; padding: 0; font-size: inherit; font-weight: inherit; color: inherit; cursor: pointer; text-align: left; }
button.linkish:hover { transform: none; color: var(--accent); }
button.linkish .chev { display: inline-block; color: var(--muted); transition: transform .15s; }
button.linkish[aria-expanded="true"] .chev { transform: rotate(90deg); }
tr.sub > td { background: var(--surface-2); padding: 6px 12px 12px; }
tr.sub table th { font-size: 11px; }
@media (max-width: 720px) { .topbar nav a.link.keep { display: inline-block; } } /* "Home" on signed-in pages stays on phones */

/* Company admin tabs (top bar) and home tiles */
.topbar nav a.link.on { color: var(--text); background: var(--surface-2); }
.topbar nav .count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--warn); color: #1c1612; font-size: 11px; font-weight: 700; text-align: center; }
@media (max-width: 720px) { .topbar nav { overflow-x: auto; gap: 2px; } .topbar nav a.link.keep { padding: 6px 7px; white-space: nowrap; } }
h1 .h-sub { font-weight: 500; }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
@media (max-width: 720px) { .minis { gap: 8px; } a.mini { padding: 12px; } a.mini b { font-size: 20px; } a.mini span { font-size: 12px; } }
a.mini { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.mini:hover { border-color: var(--accent); transform: translateY(-2px); }
a.mini b { font-size: 26px; line-height: 1.2; }
a.mini span:first-child { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

/* Clickable rows and their pop-ups (admin People, super admin Companies) */
tr.clickable { cursor: pointer; }
tr.clickable:hover td, tr.clickable:focus-visible td { background: var(--surface-2); }
tr.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
td.chev { color: var(--muted); font-size: 18px; text-align: right; width: 24px; }
dialog.modal { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 20px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 24px 80px -20px rgba(49, 45, 42, .18); }
dialog.modal::backdrop { background: rgba(49,45,42,.4); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; font-size: 18px; }
.modal-head b { flex: 1; }
.modal-head .x { font-size: 18px; color: var(--muted); padding: 4px 8px; }
dialog.modal .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 14px 0; }
dialog.modal .facts > div { display: flex; flex-direction: column; gap: 2px; }
dialog.modal .facts .muted { font-size: 12px; }
dialog.modal .facts .pill { align-self: flex-start; }
dialog.modal h3 { margin: 18px 0 6px; font-size: 15px; }
dialog.modal .person { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
dialog.modal .person button { padding: 5px 10px; font-size: 13px; }
@media (max-width: 520px) { dialog.modal .facts { grid-template-columns: 1fr; } }

/* Signed-in pages (admin, super admin, account): the website's dark animated background, glass cards that rise in */
.shell main.app { overflow: visible; position: relative; }
.aurora.fixed { position: fixed; inset: -25% -15% auto; height: 80vh; opacity: .32; }
.shell .card, .shell a.mini, .shell .path, .shell .urltop .copy code { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.shell .card, .shell a.mini { background: linear-gradient(160deg, rgba(49, 45, 42,.055), rgba(49, 45, 42,.02)); box-shadow: 0 20px 50px -30px rgba(49, 45, 42, .18); }
.shell .card.ok { background: linear-gradient(160deg, rgba(31, 138, 91,.12), rgba(49, 45, 42,.02)); }
.shell .card.bad { background: linear-gradient(160deg, rgba(192, 57, 43,.12), rgba(49, 45, 42,.02)); }
.shell h1 { font-size: 30px; background: linear-gradient(100deg, #312d2a 0%, #a93a2b 45%, #3f7c93 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.shell h2 { position: relative; padding-left: 14px; }
.shell h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px; border-radius: 4px; background: linear-gradient(180deg, #c74634, #3f7c93); }
.shell a.mini b { background: linear-gradient(100deg, #a93a2b, #c74634 40%, #3f7c93); -webkit-background-clip: text; background-clip: text; color: transparent; }
.shell a.mini:hover, .shell .card:hover { border-color: rgba(199, 70, 52,.35); }
.shell tr.clickable:hover td { background: rgba(199, 70, 52,.07); }
.shell main.app > * { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
.shell main.app > *:nth-child(2) { animation-delay: .05s; } .shell main.app > *:nth-child(3) { animation-delay: .1s; }
.shell main.app > *:nth-child(4) { animation-delay: .15s; } .shell main.app > *:nth-child(5) { animation-delay: .2s; }
.shell main.app > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.shell dialog.modal { background: #ffffff; box-shadow: 0 30px 90px -20px rgba(49, 45, 42, .18), 0 0 0 1px rgba(199, 70, 52,.12); }
.shell dialog.modal[open] { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.shell .urltop { margin: 6px 0 0; max-width: none; text-align: left; }
.paths.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0 0; }
@media (max-width: 640px) { .paths.pair { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .shell main.app > *, .shell dialog.modal[open] { animation: none; } }

/* ---------- sign up / sign in ---------- */
.auth { display: grid; grid-template-columns: 1fr 1.1fr; max-width: 1040px; margin: 8px auto 0; border: 1px solid var(--line); border-radius: 24px;
  overflow: hidden; background: rgba(255, 255, 255, .8); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 40px 120px -48px rgba(199, 70, 52, .45), inset 0 1px 0 rgba(49, 45, 42, .05); animation: auth-in .5s ease-out both; }
@keyframes auth-in { from { opacity: 0; transform: translateY(14px) scale(.99); } }
.auth-side { position: relative; overflow: hidden; padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; gap: 26px;
  background: linear-gradient(160deg, rgba(199, 70, 52, .16), rgba(63, 124, 147, .07) 62%, transparent); border-right: 1px solid var(--line); }
.auth-side::before, .auth-side::after { content: ""; position: absolute; border-radius: 50%; filter: blur(8px); pointer-events: none; z-index: 0; }
.auth-side::before { width: 380px; height: 380px; right: -170px; top: -150px; background: radial-gradient(circle, rgba(199, 70, 52, .38), transparent 65%);
  animation: auth-float 14s ease-in-out infinite alternate; }
.auth-side::after { width: 300px; height: 300px; left: -140px; bottom: -120px; background: radial-gradient(circle, rgba(63, 124, 147, .25), transparent 65%);
  animation: auth-float 18s ease-in-out infinite alternate-reverse; }
@keyframes auth-float { to { transform: translate(-50px, 60px); } }
.auth-side > * { position: relative; z-index: 1; }
.auth-side { align-items: center; text-align: center; }
.auth-side > * { width: 100%; max-width: 380px; }
.auth-side .eyebrow { width: auto; }
.auth-points li { text-align: left; }
.auth-side h2 { font-size: clamp(28px, 3.2vw, 36px); line-height: 1.12; margin: 0; padding: 0; letter-spacing: -.03em; }
.auth-side h2::before { content: none; }  /* not the accent bar of admin-page headings */
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; }
.auth-points .muted { font-size: 13px; }
.auth-points .ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #c74634;
  background: rgba(49, 45, 42, .05); border: 1px solid var(--line); }
.auth-points .ic svg { width: 18px; height: 18px; }
.auth-card { padding: 40px 44px 34px; display: flex; flex-direction: column; }
.auth-form { margin: auto 0; }   /* centred when it fits, scrolls inside the card when it doesn't */
/* Big enough screens: the page itself never scrolls; a long form (sign up) scrolls inside its card. */
@media (min-width: 861px) and (min-height: 560px) {
  main.app:has(> .auth) { padding-top: 18px; padding-bottom: 18px; }
  .auth { height: calc(100dvh - 98px); max-height: 780px; margin-top: 0; }
  .auth-card { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(49, 45, 42, .18) transparent; overscroll-behavior: contain; }
}
.auth-card h1 { font-size: 30px; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); margin: 0 0 14px; }
.auth form { margin: 0; }
.auth label { font-size: 13px; margin: 14px 0 6px; color: #3d3833; }
.auth input:not([type=checkbox]) { padding: 12px 14px; border-radius: 12px; background: rgba(49, 45, 42, .04); }
.auth input:not([type=checkbox]):hover { border-color: rgba(49, 45, 42, .16); }
.auth .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.auth .label-row { display: flex; justify-content: space-between; align-items: baseline; }
.auth .label-row a { font-size: 13px; text-decoration: none; }
.auth .hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.auth .hint.center { text-align: center; margin-top: 10px; }
.auth .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); margin: 18px 0; }
.auth .check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.auth button.primary { margin-top: 18px; }
.auth .check + button.primary { margin-top: 0; }
.auth .card { margin: 8px 0 2px; padding: 11px 14px; font-size: 14px; }
.auth .card.bad { background: rgba(192, 57, 43, .08); }
.auth .card.ok { background: rgba(31, 138, 91, .08); }
.pw { position: relative; }
.pw input { padding-right: 68px !important; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 5px 10px; font-size: 12px; border-color: transparent;
  background: transparent; color: var(--muted); }
.pw button:hover { transform: translateY(-50%); color: var(--text); background: var(--surface-2); }
.strength { height: 4px; border-radius: 4px; background: var(--line); margin-top: 8px; overflow: hidden; }
.strength::after { content: ""; display: block; height: 100%; width: 0; border-radius: 4px; transition: width .3s, background .3s; }
.strength[data-level="1"]::after { width: 25%; background: var(--bad); }
.strength[data-level="2"]::after { width: 50%; background: var(--warn); }
.strength[data-level="3"]::after { width: 75%; background: #a3e635; }
.strength[data-level="4"]::after { width: 100%; background: var(--ok); }
.code-input { font-family: var(--mono); font-size: 24px !important; letter-spacing: .5em; text-align: center; }
.btn-eloqua { width: 100%; justify-content: center; gap: 12px; padding: 12px 16px; border-radius: 12px; font-size: 15px;
  background: #312d2a; color: #fff; border-color: transparent; }
.btn-eloqua:hover { background: #4a4540; box-shadow: 0 12px 34px -14px rgba(49, 45, 42, .5); }
.btn-eloqua svg { width: 22px; height: 22px; flex: none; }
.auth .or { margin: 20px 0 14px; }
.auth-foot { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.auth-foot a { font-weight: 600; text-decoration: none; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 26px 22px; gap: 14px; }
  .auth-points { display: none; }
  .auth-card { padding: 26px 22px; }
}
@media (max-width: 480px) { .auth .grid2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .auth, .auth-side::before, .auth-side::after { animation: none; } }

/* ---------- account menu (top right on signed-in pages) ---------- */
.menu { position: relative; margin-left: 6px; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 3px 6px 3px 3px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface-2); user-select: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { border-color: rgba(199, 70, 52, .45); }
.menu summary svg { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
.menu[open] summary svg { transform: rotate(180deg); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #c74634, #3f7c93); }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 6px; z-index: 30; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .98); backdrop-filter: blur(14px); box-shadow: 0 24px 60px -20px rgba(49, 45, 42, .18);
  animation: menu-in .15s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; gap: 2px; }
.menu-head span { color: var(--muted); font-size: 12px; word-break: break-all; }
.menu-list a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 14px; }
.menu-list a:hover, .menu-list a.on { background: var(--surface-2); }
.menu-list a.menu-out { color: var(--bad); border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; margin-top: 6px; }
.pw-card { max-width: 460px; }
.pw-card .strength + .hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
/* Phones: the top bar's tabs scroll sideways (overflow), which would cut the menu off; anchor it to the whole bar instead. */
@media (max-width: 720px) { .menu-list { position: fixed; top: calc(100% + 6px); right: 12px; } }

/* ---------- on/off switch and pager ---------- */
button.switch { position: relative; width: 46px; height: 26px; padding: 0; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; vertical-align: middle; transition: background .2s, border-color .2s; }
button.switch:hover { transform: none; border-color: var(--accent); }
button.switch .knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted);
  box-shadow: 0 1px 3px rgba(49, 45, 42, .18); transition: transform .2s, background .2s; }
button.switch[aria-checked="true"] { background: var(--ok); border-color: transparent; }
button.switch[aria-checked="true"] .knob { transform: translateX(20px); background: #fff; }
button.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-text { margin-left: 8px; font-size: 14px; font-weight: 600; vertical-align: middle; min-width: 2em; display: inline-block; }
.switch-label { display: flex; align-items: center; gap: 10px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px 0 4px; flex-wrap: wrap; }
.btn.disabled { opacity: .45; pointer-events: none; }
ul.tight { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; }
ul.tight li { margin: 2px 0; }
.card.warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }

/* ---------- scan progress bar ---------- */
.scanbar { display: grid; gap: 6px; margin: 6px 0 2px; max-width: 420px; color: var(--muted); }
.scanbar-track { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.scanbar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .25s linear; }
.scanbar-row { display: flex; align-items: center; gap: 8px; }
.scanbar-pct { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Status badges: coloured dot and soft tint (Home greeting, Team table) */
.pill.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; vertical-align: middle; }
.pill.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.status.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.pill.status.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.pill.status.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.pill.status.info { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); border-color: color-mix(in srgb, var(--accent-2) 35%, transparent); }
h1.hi .pill.status { font-size: 13px; padding: 4px 12px; margin-left: 8px; }

/* One-time notice after an action */
.notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin: 12px 0; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.notice.ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: color-mix(in srgb, var(--ok) 9%, var(--surface)); }
.notice.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 9%, var(--surface)); }
.notice-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.notice.ok .notice-ico { background: var(--ok); } .notice.bad .notice-ico { background: var(--bad); }
.notice b { display: block; } .notice div div { color: var(--muted); margin-top: 2px; }
.notice .x { flex: none; background: none; border: 0; color: var(--muted); padding: 2px 6px; font-size: 15px; }

/* Team page */
.who { display: flex; align-items: center; gap: 12px; }
.who .avatar { flex: none; width: 36px; height: 36px; font-size: 13px; }
.avatar.ghost { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line); }
.invite-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.invite-row input { flex: 1 1 240px; margin: 0; }
.card.offer { border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line)); }
.team-bar { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 6px; flex-wrap: wrap; }
.team-search { flex: 1 1 260px; display: flex; gap: 10px; align-items: center; margin: 0; }
.team-search input { flex: 1; margin: 0; }
.team-invite { flex: 1 1 340px; }
.team-invite .invite-row { margin-top: 0; }
.team-invite .notice { margin-top: 0; }
p.small { font-size: 13px; margin: 0 0 12px; }

/* Super admin signed in as someone: always on screen, with the way back. */
.acting-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 32px);
  padding: 10px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--bad) 55%, var(--line)); background: color-mix(in srgb, var(--bad) 14%, var(--surface)); box-shadow: 0 8px 30px rgb(49 45 42 / .18); font-size: 14px; }
.acting-bar form { margin: 0; }

/* ---------- light / dark switch (top bar) ---------- */
.theme-toggle { flex: none; width: 36px; height: 36px; padding: 0; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.theme-toggle:hover { color: var(--text); background: var(--surface-2); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .sun { display: none; }
/* On wide screens the icon sits at the right edge of the page, outside the centered content. */
@media (min-width: 1240px) { .topbar .theme-toggle { position: absolute; right: 16px; top: 50%; margin-top: -18px; } }

/* ---------- activity detail window ---------- */
dl.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; margin: 14px 0 0; }
dl.kv dt { color: var(--muted); font-size: 13px; }
dl.kv dd { margin: 0; word-break: break-word; white-space: pre-wrap; }
dl.kv dd.bad { color: var(--bad); }
