/* Dominion design system (docs/DESIGN.md). Dark, achromatic, mysterious but clear: near-black page, raised surfaces in
   grey steps, hairline borders, silver and white type. Colour appears only where it means something: a real change
   (good/bad), live, an error. 4 px grid, 44 px tap targets, visible focus rings, reduced motion respected.

   Sections: 1 tokens  2 base  3 layout  4 app shell  5 marketing shell  6 auth and notice shells  7 components
   8 charts (shared tokens)  9 motion  10 builder sections (append-only, prefixed, one per module) */

/* ============================================================ 1 tokens */
:root {
  color-scheme: dark;
  --bg: #09090a;
  --s1: #0e0e10;
  --s2: #121214;
  --s3: #18181b;
  --s4: #202024;
  --s5: #2a2a2f;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .13);
  --line3: rgba(255, 255, 255, .24);
  --rim: rgba(255, 255, 255, .06);
  --t1: #f2f2f3;
  --t2: #a6a6ac;
  --t3: #8b8b92;
  --ink: #0b0b0c;
  --field: rgba(255, 255, 255, .045);
  --hover: rgba(255, 255, 255, .06);
  --press: rgba(255, 255, 255, .09);
  /* meaning only */
  --good: #63d6a2;
  --good-bg: rgba(99, 214, 162, .12);
  --bad: #ff8a7d;
  --bad-bg: rgba(255, 138, 125, .12);
  --warn: #f0c36b;
  --warn-bg: rgba(240, 195, 107, .12);
  --accent: #ececef;      /* a chart's one highlighted series */
  --accent-2: #8b8b92;    /* comparison series */
  /* shape */
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 12px;
  --r-md: 14px;
  --r-lg: 16px;
  --r-xl: 22px;
  --pill: 999px;
  --shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .4);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --fast: 140ms;
  /* type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  /* layout */
  --gl: max(16px, env(safe-area-inset-left));
  --gr: max(16px, env(safe-area-inset-right));
  --maxw: 1440px;
  --hdr: 56px;
  --tabbar: 60px;
  /* the eclipse horizon */
  --d: 1400px;
  --g: 160px;
  --peek: 96px;
}

/* ============================================================ 2 base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-padding-top: 80px; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--t1);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-weight: 650; letter-spacing: -.015em; line-height: 1.2; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
p a, .prose a, .link {
  color: var(--t1);
  text-decoration: underline;
  text-decoration-color: var(--line3);
  text-underline-offset: 3px;
}
p a:hover, .prose a:hover, .link:hover { text-decoration-color: var(--t1); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
code, kbd, pre, samp { font-family: var(--mono); font-size: .92em; }
:not(pre) > code { padding: 1px 5px; border-radius: var(--r-xs); background: var(--field); border: 1px solid var(--line); }
kbd { display: inline-flex; align-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line2); border-bottom-width: 2px; color: var(--t2); font-size: 11px; }
hr { height: 1px; margin: 16px 0; border: 0; background: var(--line); }
::selection { background: rgba(255, 255, 255, .22); }
:focus-visible { outline: 2px solid var(--t1); outline-offset: 2px; border-radius: 4px; }
.ic { flex: none; }
.mark { flex: none; border-radius: 22%; }
.vh {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important;
}
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--r); background: var(--t1); color: var(--ink); font-weight: 600; }
.skip:focus { top: 8px; }
.muted { color: var(--t2); }
.faint { color: var(--t3); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 13px; }
.nowrap { white-space: nowrap; }
.trunc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { margin-left: auto; }
.center { text-align: center; }
.eyebrow { margin-bottom: 6px; color: var(--t3); font-size: 13px; font-weight: 500; }
.prose { max-width: 68ch; color: var(--t2); line-height: 1.65; }
.prose h2 { margin: 32px 0 10px; color: var(--t1); font-size: 20px; }
.prose h3 { margin: 24px 0 8px; color: var(--t1); font-size: 16px; }
.prose p + p { margin-top: 12px; }
.prose ul { margin: 12px 0; padding-left: 20px; list-style: disc; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--t1); font-weight: 600; }

/* ============================================================ 3 layout */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.sm { gap: 8px; }
.stack.lg { gap: 24px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cluster.lg { gap: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid { display: grid; gap: 16px; }
.g2, .g3, .g4 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .span-2 { grid-column: span 2; }
  .span-all { grid-column: 1 / -1; }
}
.section { margin-top: 32px; }
.section-t { margin: 0 2px 12px; color: var(--t2); font-size: 14px; font-weight: 600; letter-spacing: 0; }

/* ============================================================ 4 app shell */
.hdr { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.hdr-in { display: flex; align-items: center; gap: 8px; max-width: var(--maxw); height: var(--hdr); margin: 0 auto; padding: 0 var(--gr) 0 var(--gl); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; flex: none; border-radius: var(--r-sm); font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.brand .mark { width: 30px; height: 30px; }
.hdr-sep { flex: none; width: 1px; height: 22px; margin: 0 4px; background: var(--line2); }
.hdr-end { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.app .brand .word { display: none; }
@media (min-width: 480px) { .app .brand .word { display: inline; } }

/* menus: details/summary dropdowns */
.menu { position: relative; }
.menu > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; list-style: none; cursor: pointer; border-radius: var(--r-sm); -webkit-tap-highlight-color: transparent; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-p {
  position: absolute; top: calc(100% + 6px); z-index: 60; min-width: 248px; max-width: calc(100vw - 32px); max-height: min(70vh, 560px); overflow: auto;
  padding: 6px; border-radius: var(--r-md); background: var(--s3); border: 1px solid var(--line2); box-shadow: var(--shadow);
}
.menu-p.left { left: 0; }
.menu-p.right { right: 0; }
.menu-p hr { margin: 6px 4px; }
.menu-h { padding: 8px 10px 4px; color: var(--t3); font-size: 12px; font-weight: 500; }
.mi { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; margin: 0; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--t1); font-size: 14px; font-weight: 450; text-align: left; cursor: pointer; }
.mi .ic { color: var(--t2); }
.mi .mi-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi .mi-m { margin-left: auto; padding-left: 12px; color: var(--t3); font-size: 12px; white-space: nowrap; max-width: 50%; overflow: hidden; text-overflow: ellipsis; }
.mi[aria-current] { background: var(--hover); }
.mi[aria-current]::after { content: ""; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--t1); flex: none; }
.mi.danger, .mi.danger .ic { color: var(--bad); }
.menu-p form { margin: 0; }
.menu-who { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; min-width: 0; }
.menu-who .mw-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-who .mw-e { color: var(--t3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the business / site switcher */
.sw { min-width: 0; flex: 0 1 auto; }
.sw > summary { min-width: 0; padding: 0 8px 0 10px; border: 1px solid transparent; }
.sw > summary > .ic { color: var(--t3); }
.sw-a, .sw-b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-a { color: var(--t2); font-size: 14px; max-width: 28vw; }
.sw-b { font-size: 15px; font-weight: 600; max-width: 36vw; }
.sw-a + .sw-b::before { content: "/"; margin: 0 8px 0 0; color: var(--t3); font-weight: 400; }
.sw .menu-p { min-width: 300px; }
@media (max-width: 479px) {
  .sw-a:not(:only-of-type) { display: none; }
  .sw-a + .sw-b::before { content: none; }
  .sw-b { max-width: none; }
  .hdr-end .live { padding: 0 10px; }
  .hdr-end .live-l2 { display: none; }
  .hdr-sep { display: none; }
}

/* the account menu */
.acct > summary { padding: 0; border-radius: 50%; }
.av { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--s4); border: 1px solid var(--line2); color: var(--t1); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }
.av.lg { width: 48px; height: 48px; font-size: 16px; }
.acct > summary { width: 44px; justify-content: center; }

/* app tabs: under the header on a computer, a bottom bar on a phone */
.apptabs-in { display: flex; max-width: var(--maxw); margin: 0 auto; }
.at { position: relative; display: flex; align-items: center; justify-content: center; color: var(--t2); font-weight: 500; transition: color var(--fast) var(--ease); }
.at[aria-current] { color: var(--t1); }
@media (max-width: 759px) {
  .apptabs { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; background: var(--s1); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .apptabs-in { height: var(--tabbar); padding: 0 calc(var(--gr) - 8px) 0 calc(var(--gl) - 8px); }
  .at { flex: 1; flex-direction: column; gap: 3px; min-width: 0; font-size: 11px; }
  .at span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .at[aria-current]::before { content: ""; position: absolute; top: 0; left: 50%; width: 24px; height: 2px; margin-left: -12px; border-radius: 0 0 2px 2px; background: var(--t1); }
  body.has-tabs .main { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 32px); }
  body.has-tabs .toasts { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 12px); }
}
@media (min-width: 760px) {
  .apptabs-in { gap: 4px; padding: 0 var(--gr) 0 calc(var(--gl) - 10px); overflow-x: auto; scrollbar-width: none; }
  .apptabs-in::-webkit-scrollbar { display: none; }
  .at { gap: 8px; height: 44px; padding: 0 10px; font-size: 14px; white-space: nowrap; }
  .at .ic { width: 18px; height: 18px; color: var(--t3); }
  .at[aria-current] .ic { color: var(--t1); }
  .at[aria-current]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--t1); }
}
@media (min-width: 760px) and (hover: hover) { .at:hover { color: var(--t1); } }

.main { max-width: var(--maxw); margin: 0 auto; padding: 20px var(--gr) 48px var(--gl); }
.main.wide { max-width: none; }
@media (min-width: 760px) { :root { --gl: max(24px, env(safe-area-inset-left)); --gr: max(24px, env(safe-area-inset-right)); } .main { padding-top: 28px; padding-bottom: 64px; } }
@media (min-width: 1100px) { :root { --gl: max(32px, env(safe-area-inset-left)); --gr: max(32px, env(safe-area-inset-right)); } }
@media (min-width: 1280px) { :root { --hdr: 64px; } .brand { font-size: 18px; } .brand .mark { width: 32px; height: 32px; } }

/* page head */
.ph { margin-bottom: 20px; }
.ph-back { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; margin: -8px 0 4px -6px; padding: 0 8px 0 2px; border-radius: var(--r-sm); color: var(--t2); font-size: 14px; font-weight: 500; }
.ph-back:hover { color: var(--t1); }
.ph-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.ph-t { min-width: 0; }
.ph h1 { font-size: 24px; font-weight: 700; letter-spacing: -.025em; overflow-wrap: anywhere; }
.ph-s { margin-top: 4px; color: var(--t2); font-size: 15px; }
.ph-a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (min-width: 760px) { .ph { margin-bottom: 24px; } .ph h1 { font-size: 30px; } }

/* ============================================================ 5 marketing shell */
.mk-in { max-width: 1200px; margin: 0 auto; padding: 0 var(--gr) 0 var(--gl); }
.mk-hdr { position: sticky; top: 0; z-index: 40; background: rgba(9, 9, 10, .92); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.mk-hdr .mk-in { display: flex; align-items: center; gap: 12px; height: 64px; }
.mk-nav { display: none; align-items: center; gap: 4px; margin-left: 24px; }
.mk-nav a { display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border-radius: var(--r-sm); color: var(--t2); font-size: 15px; font-weight: 500; }
.mk-nav a:hover, .mk-nav a[aria-current] { color: var(--t1); }
.mk-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.mk-signin { display: none; }
@media (min-width: 720px) { .mk-nav { display: flex; } .mk-signin { display: inline-flex; } }
.mk-main { position: relative; overflow-x: clip; }
.mk-hero { position: relative; overflow: hidden; padding: 72px 0 calc(var(--peek) + 72px); }
.mk-h1 { max-width: 16ch; font-size: clamp(38px, 7vw, 76px); font-weight: 680; letter-spacing: -.04em; line-height: 1.02; }
.mk-lede { max-width: 560px; margin: 20px 0 32px; color: var(--t2); font-size: clamp(17px, 2vw, 20px); line-height: 1.5; }
.mk-dev { margin-top: 24px; font-size: 14px; }
.mk-hero .horizon { --peek: 120px; }
.mk-foot { padding: 48px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.mk-foot .mk-in { display: grid; gap: 32px; }
.mk-fb p { margin-top: 8px; font-size: 14px; }
.mk-fl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mk-fl div { display: flex; flex-direction: column; gap: 2px; }
.mk-fl a { display: inline-flex; align-items: center; min-height: 36px; color: var(--t2); font-size: 14px; }
.mk-fl a:hover { color: var(--t1); }
.mk-fh { margin-bottom: 4px; color: var(--t3); font-size: 13px; font-weight: 500; }
.mk-copy { color: var(--t3); font-size: 13px; }
@media (min-width: 860px) {
  .mk-foot .mk-in { grid-template-columns: 1fr auto; }
  .mk-fl { gap: 64px; }
  .mk-copy { grid-column: 1 / -1; }
  .mk-hero { padding-top: 120px; }
}

/* ============================================================ 6 auth and notice shells */
.auth-main { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: calc(env(safe-area-inset-top) + 32px) var(--gr) calc(env(safe-area-inset-bottom) + 32px) var(--gl); }
.ring { position: absolute; left: 50%; top: 50%; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, #000 0, #000 93%, rgba(236, 237, 241, .34) 93.4%, rgba(220, 222, 227, .11) 95%, rgba(200, 202, 208, .035) 97.4%, rgba(190, 192, 198, 0) 100%);
  -webkit-mask-image: linear-gradient(#000, rgba(0, 0, 0, .15)); mask-image: linear-gradient(#000, rgba(0, 0, 0, .15)); }
.auth-box { position: relative; width: 100%; max-width: 380px; }
.auth-box.wide { max-width: 560px; }
.lockup { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 36px; width: max-content; min-height: 44px; border-radius: var(--r); font-size: 26px; font-weight: 650; letter-spacing: -.025em; }
.lockup .mark { width: 44px; height: 44px; }
.auth-h { font-size: 22px; font-weight: 650; text-align: center; letter-spacing: -.02em; }
.auth-l { margin: 8px auto 0; max-width: 340px; color: var(--t2); text-align: center; }
.auth-box form, .auth-box .stack { margin-top: 24px; }
.auth-f { margin-top: 20px; color: var(--t2); font-size: 14px; text-align: center; }
.auth-f a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--t1); font-weight: 500; }
.auth-f a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 720px) { .ring { width: 760px; height: 760px; margin: -380px 0 0 -380px; } }

.notice-main { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 32px var(--gr) calc(var(--peek) + 48px) var(--gl); }
.notice-box { position: relative; z-index: 1; max-width: 440px; text-align: center; }
.notice-box .brand { margin: 0 auto 28px; }
.notice-box h1 { font-size: 28px; font-weight: 700; letter-spacing: -.025em; }
.notice-box p { margin-top: 8px; color: var(--t2); font-size: 16px; }
.notice-a { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }

/* the one brand moment: the eclipse rising at the foot (drawn with layered gradients, never blurred) */
.horizon { position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: calc(var(--peek) + var(--g)); overflow: hidden; pointer-events: none; }
.horizon::before {
  content: ""; position: absolute; top: 0; left: 50%; --r: calc(var(--d) / 2);
  width: calc(var(--d) + 2 * var(--g)); height: calc(var(--d) + 2 * var(--g)); margin-left: calc(var(--d) / -2 - var(--g));
  background:
    radial-gradient(circle at 50% 50%, #000 calc(var(--r) - .75px), rgba(0, 0, 0, 0) calc(var(--r) + .75px)),
    radial-gradient(circle at 50% calc(50% - 1.5px), rgba(255, 255, 255, .6) calc(var(--r) - .5px), rgba(255, 255, 255, 0) calc(var(--r) + 1.5px)),
    radial-gradient(circle at 50% calc(50% - 6px), rgba(236, 237, 240, .10) var(--r), rgba(236, 237, 240, 0) calc(var(--r) + 24px)),
    radial-gradient(circle at 50% calc(50% - 24px), rgba(236, 237, 240, .045) var(--r), rgba(236, 237, 240, 0) calc(var(--r) + 140px));
}
@media (min-width: 760px) { :root { --d: 2000px; --peek: clamp(120px, 16vh, 180px); } }
@media (min-width: 1280px) { :root { --d: 2600px; } }

/* ============================================================ 7 components */
/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; margin: 0; padding: 0 16px;
  border: 1px solid var(--line2); border-radius: var(--r); background: rgba(255, 255, 255, .04); color: var(--t1);
  font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn .ic { width: 18px; height: 18px; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--t1); border-color: var(--t1); color: var(--ink); font-weight: 600; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--t2); }
.btn.danger { background: transparent; border-color: rgba(255, 138, 125, .4); color: var(--bad); }
.btn.sm { height: 36px; padding: 0 12px; border-radius: var(--r-sm); font-size: 14px; }
.btn.sm .ic { width: 16px; height: 16px; }
.btn.lg { height: 52px; padding: 0 24px; border-radius: var(--r-md); font-size: 16px; }
.btn.block { display: flex; width: 100%; }
.btn.icon { width: 44px; padding: 0; }
.btn.icon.sm { width: 36px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
@media (hover: hover) {
  .btn:hover { background: var(--press); border-color: var(--line3); }
  .btn.primary:hover { background: #fff; border-color: #fff; }
  .btn.ghost:hover { background: var(--hover); border-color: transparent; color: var(--t1); }
  .btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
}
@media (pointer: coarse) { .btn.sm { height: 44px; } .btn.icon.sm { width: 44px; } }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field, .field + .toggle, .toggle + .field, .choices + .field, .field + .choices { margin-top: 16px; }
.stack > .field, .stack > .toggle, .stack > .choices, .cluster > .field { margin-top: 0; }
.field > label, .choices > legend { color: var(--t2); font-size: 13px; font-weight: 500; }
.input {
  display: block; width: 100%; height: 48px; margin: 0; padding: 0 14px; border: 1px solid var(--line2); border-radius: var(--r);
  background: var(--field); color: var(--t1); font-size: 16px; transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.input::placeholder { color: var(--t3); opacity: 1; }
.input:focus { outline: 2px solid var(--t1); outline-offset: 1px; background-color: rgba(255, 255, 255, .07); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.select { -webkit-appearance: none; appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='18' height='18' fill='none' stroke='%23a6a6ac' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.select option { background: var(--s3); color: var(--t1); }
@media (hover: hover) { .input:hover { border-color: var(--line3); } .input[aria-invalid="true"]:hover { border-color: var(--bad); } }
.affix { display: flex; align-items: stretch; }
.affix .input { flex: 1; min-width: 0; }
.affix .pre, .affix .suf { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line2); background: var(--s3); color: var(--t3); font-size: 15px; white-space: nowrap; }
.affix .pre { border-right: 0; border-radius: var(--r) 0 0 var(--r); }
.affix .suf { border-left: 0; border-radius: 0 var(--r) var(--r) 0; }
.affix .pre + .input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.affix .input:has(+ .suf) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.hint { color: var(--t3); font-size: 13px; line-height: 1.45; }
.ferr { display: flex; align-items: flex-start; gap: 6px; color: var(--bad); font-size: 13px; font-weight: 500; line-height: 1.4; }
.ferr .ic { margin-top: 1px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; }

/* toggle (a checkbox drawn as a switch) */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; cursor: pointer; }
.toggle + .toggle { border-top: 1px solid var(--line); }
.toggle .tl { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toggle input { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 46px; height: 28px; margin: 0; border-radius: var(--pill); background: rgba(255, 255, 255, .16); cursor: pointer; transition: background-color var(--fast) var(--ease); }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--t1); transition: transform var(--fast) var(--ease); }
.toggle input:checked { background: var(--t1); }
.toggle input:checked::after { transform: translateX(18px); background: var(--ink); }
.toggle input:focus-visible { outline: 2px solid var(--t1); outline-offset: 3px; }
.toggle input:disabled { opacity: .4; cursor: default; }

/* radio choices as cards */
.choices { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.choices > legend { margin-bottom: 6px; padding: 0; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .cb { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--field); transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.choice .cb > .ic { color: var(--t2); }
.choice .ct { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice .cl { font-weight: 550; }
.choice input:checked + .cb { border-color: var(--t1); background: rgba(255, 255, 255, .07); }
.choice input:checked + .cb > .ic { color: var(--t1); }
.choice input:focus-visible + .cb { outline: 2px solid var(--t1); outline-offset: 2px; }
@media (hover: hover) { .choice:hover .cb { border-color: var(--line3); } }

/* segmented control (links) */
.seg { display: inline-flex; max-width: 100%; padding: 3px; gap: 2px; overflow-x: auto; border-radius: var(--r); background: var(--s1); border: 1px solid var(--line); scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a, .seg button { display: inline-flex; align-items: center; justify-content: center; flex: none; height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--t2); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease); }
.seg a[aria-current], .seg button[aria-pressed="true"] { background: var(--s4); color: var(--t1); box-shadow: inset 0 1px 0 var(--rim), 0 1px 2px rgba(0, 0, 0, .4); }
@media (hover: hover) { .seg a:hover, .seg button:hover { color: var(--t1); } }
@media (pointer: coarse) { .seg a, .seg button { height: 38px; } }

/* cards */
.card { position: relative; min-width: 0; padding: 16px; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim); }
.card.flush { padding: 0; overflow: hidden; }
.card.hi { border-color: var(--line3); }
.card.quiet { background: var(--s1); box-shadow: none; }
.card-h { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.card.flush > .card-h { margin: 0; padding: 14px 16px 10px; }
.card-t { flex: 1 1 180px; min-width: 0; }
.card-t h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.card-s { margin-top: 2px; color: var(--t3); font-size: 13px; }
.card-a { display: flex; align-items: center; gap: 6px; flex: none; }
a.card { display: block; transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
@media (hover: hover) { a.card:hover { border-color: var(--line3); } }
@media (min-width: 760px) { .card { padding: 20px; } .card.flush > .card-h { padding: 18px 20px 12px; } }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; } }
.kpi { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 14px 12px; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim); transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.kpi-l { color: var(--t2); font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-v { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-d { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 22px; }
.kpi-s { color: var(--t3); font-size: 12px; }
a.kpi[aria-current] { border-color: var(--line3); background: var(--s3); }
a.kpi[aria-current]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--t1); }
@media (hover: hover) { a.kpi:hover { border-color: var(--line3); } }
@media (min-width: 1100px) { .kpi { padding: 16px 18px 14px; } .kpi-v { font-size: 30px; } }

/* deltas: colour only when the change is real */
.delta { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 6px 0 4px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.flat { color: var(--t2); background: rgba(255, 255, 255, .06); padding-left: 6px; }
.delta.flat .ic { margin-left: -2px; }
.delta.good { color: var(--good); background: var(--good-bg); }
.delta.bad { color: var(--bad); background: var(--bad-bg); }

/* ranked lists with thin bars */
.bars-h { display: flex; justify-content: space-between; gap: 12px; padding: 0 10px 6px; color: var(--t3); font-size: 12px; font-weight: 500; }
.bars ul { display: flex; flex-direction: column; gap: 2px; }
.bar { position: relative; display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 0 10px; border-radius: var(--r-sm); font-size: 14px; isolation: isolate; }
.bar-fill { position: absolute; z-index: -1; left: 0; top: 3px; bottom: 3px; width: var(--w); min-width: 2px; border-radius: 7px; background: rgba(255, 255, 255, .065); transition: background-color var(--fast) var(--ease); }
.bar-l { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.bar-l > .ic, .bar-l > img { color: var(--t3); flex: none; }
.bar-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-l.mono .bar-t { font-family: var(--mono); font-size: 13px; }
.bar-s { flex: none; color: var(--t3); font-size: 12px; }
.bar-v { flex: none; color: var(--t1); font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
a.bar:focus-visible { outline-offset: 0; }
@media (hover: hover) { a.bar:hover .bar-fill { background: rgba(255, 255, 255, .11); } a.bar:hover .bar-t { text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; } }
@media (pointer: coarse) { .bar { min-height: 44px; } }
.bars-empty { padding: 20px 10px; color: var(--t3); font-size: 14px; text-align: center; }
.bars-more { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; margin-top: 4px; padding: 0 10px; border-radius: var(--r-sm); color: var(--t2); font-size: 13px; font-weight: 500; }
.bars-more:hover { color: var(--t1); }

/* card tabs */
.ctabs { display: flex; gap: 2px; margin: -4px -6px 8px; padding: 0 0 2px; overflow-x: auto; scrollbar-width: none; }
.ctabs::-webkit-scrollbar { display: none; }
.ctabs a, .ctabs button { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--t3); font-size: 13px; font-weight: 550; white-space: nowrap; cursor: pointer; }
.ctabs a[aria-current], .ctabs button[aria-selected="true"] { color: var(--t1); background: var(--hover); }
.ctabs .cnt { color: var(--t3); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .ctabs a:hover, .ctabs button:hover { color: var(--t1); } }
@media (pointer: coarse) { .ctabs a, .ctabs button { height: 44px; } }

/* chips and badges */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 32px; padding: 0 12px; border-radius: var(--pill); border: 1px solid var(--line2); background: var(--field); color: var(--t1); font-size: 13px; font-weight: 500; }
.chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .ic { color: var(--t2); }
.chip.on { background: var(--t1); border-color: var(--t1); color: var(--ink); }
.chip.on .ic { color: var(--ink); }
.chip:has(.chip-x) { padding-right: 4px; }
.chip-x { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: inherit; opacity: .7; }
/* a 44px hit area around the small visual (the tap-target rule) */
.chip-x::before { content: ""; position: absolute; inset: -10px; }
.chip-x:hover { opacity: 1; background: rgba(127, 127, 127, .2); }
@media (hover: hover) { a.chip:hover:not(.on) { border-color: var(--line3); } }
@media (pointer: coarse) { .chip { min-height: 36px; } .chip-x { width: 28px; height: 28px; } .chip-x::before { inset: -8px; } }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-xs); background: rgba(255, 255, 255, .07); color: var(--t2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.solid { background: var(--t1); color: var(--ink); }
.badge.demo { background: transparent; border: 1px dashed var(--line3); color: var(--t2); }

/* notes, ribbons, toasts */
.note { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line2); background: rgba(255, 255, 255, .03); font-size: 14px; }
.note > .ic { margin-top: 1px; color: var(--t2); }
.note-b { flex: 1; min-width: 0; color: var(--t2); }
.note-t { margin-bottom: 2px; color: var(--t1); font-weight: 600; }
.note-a { flex: none; align-self: center; }
.note.good > .ic { color: var(--good); }
.note.warn { border-color: rgba(240, 195, 107, .32); }
.note.warn > .ic { color: var(--warn); }
.note.bad { border-color: rgba(255, 138, 125, .38); }
.note.bad > .ic { color: var(--bad); }
.main > .note, .main > .ribbon { margin-bottom: 16px; }
@media (max-width: 599px) { .note { flex-wrap: wrap; } .note-a { flex-basis: 100%; padding-left: 32px; } }
.ribbon { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px dashed var(--line3); color: var(--t2); font-size: 13px; }
.toasts { position: fixed; z-index: 80; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 16px); display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 12px 16px; border-radius: var(--r); background: var(--s4); border: 1px solid var(--line2); box-shadow: var(--shadow); color: var(--t1); font-size: 14px; font-weight: 500; pointer-events: auto; }
.toast .ic { color: var(--good); }
.toast.error .ic { color: var(--bad); }
.toast.info .ic { color: var(--t2); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity 240ms var(--ease), transform 240ms var(--ease); }
@media (min-width: 760px) { .toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; transform: none; } }

/* empty states */
.empty { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 24px; text-align: center; overflow: hidden; }
.empty-i { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 50%; background: var(--s3); border: 1px solid var(--line2); color: var(--t2); }
.empty-t { font-size: 18px; font-weight: 650; }
.empty-b { max-width: 420px; color: var(--t2); }
.empty-a { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.empty.with-horizon { padding-bottom: calc(var(--peek) + 56px); }
.card > .empty { margin: -16px; }

/* tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--t3); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.card.flush .tbl th:first-child, .card.flush .tbl td:first-child { padding-left: 16px; }
.card.flush .tbl th:last-child, .card.flush .tbl td:last-child { padding-right: 16px; }
@media (hover: hover) { .tbl tbody tr:hover td { background: rgba(255, 255, 255, .02); } }

/* code */
.code { border-radius: var(--r); border: 1px solid var(--line2); background: #0b0b0d; overflow: hidden; }
.code-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 4px 4px 4px 14px; border-bottom: 1px solid var(--line); color: var(--t3); font-size: 13px; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: var(--t1); font-size: 13px; line-height: 1.65; tab-size: 2; }

/* live pulse */
.live { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--pill); border: 1px solid var(--line2); color: var(--t2); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-n { color: var(--t1); font-weight: 600; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--t3); }
.live.on .live-dot { background: var(--good); }
.live.on .live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--good); opacity: .5; }

/* meters, facts, steps, skeletons */
.meter { display: block; width: 100%; height: 6px; border-radius: var(--pill); background: rgba(255, 255, 255, .08); overflow: hidden; }
.meter > span { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--t1); }
.facts { display: grid; gap: 0; }
.facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--t2); font-size: 14px; }
.facts dd { min-width: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.steps { display: flex; gap: 6px; counter-reset: step; overflow-x: auto; scrollbar-width: none; }
.steps li { display: flex; align-items: center; gap: 8px; flex: none; height: 32px; padding: 0 12px 0 4px; border-radius: var(--pill); color: var(--t3); font-size: 13px; font-weight: 500; }
.steps-n { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line2); font-size: 12px; font-variant-numeric: tabular-nums; }
.steps li.done { color: var(--t2); }
.steps li.done .steps-n { background: var(--s4); border-color: var(--s4); color: var(--t1); }
.steps li.now { background: var(--s3); color: var(--t1); }
.steps li.now .steps-n { background: var(--t1); border-color: var(--t1); color: var(--ink); }
.skel { display: inline-block; max-width: 100%; border-radius: var(--r-xs); background: linear-gradient(90deg, rgba(255, 255, 255, .05) 0, rgba(255, 255, 255, .1) 40%, rgba(255, 255, 255, .05) 80%) 0 0 / 300% 100%; }

/* dialogs (app.js confirm) */
.dlg { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line2); border-radius: var(--r-lg); background: var(--s3); color: var(--t1); box-shadow: var(--shadow); }
.dlg::backdrop { background: rgba(0, 0, 0, .66); }
.dlg-b { padding: 20px 20px 4px; }
.dlg-b h2 { font-size: 17px; }
.dlg-b p { margin-top: 6px; color: var(--t2); }
.dlg-a { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px 20px; }

/* ============================================================ 8 charts (lib/charts.js draws; tokens shared here) */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.ch-axis { fill: var(--t3); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.ch-main { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-area { fill: var(--accent); opacity: .045; }
.ch-cmp { fill: none; stroke: var(--accent-2); stroke-width: 1.5; stroke-dasharray: 3 4; stroke-linecap: round; }
.ch-bar { fill: var(--s5); }
.ch-bar.on { fill: var(--accent); }
.ch-dot { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.ch-cursor { stroke: var(--line3); stroke-width: 1; }
.ch-note { fill: var(--t3); }
.ch-tip { position: absolute; z-index: 5; min-width: 140px; padding: 10px 12px; border-radius: var(--r); background: var(--s4); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 13px; pointer-events: none; }
.ch-tip .tt-d { color: var(--t2); font-size: 12px; }
.ch-tip .tt-v { margin-top: 2px; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--t2); font-size: 12px; }
.ch-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ch-legend i { display: inline-block; width: 14px; height: 2px; border-radius: 1px; background: var(--accent); }
.ch-legend i.cmp { background: repeating-linear-gradient(90deg, var(--accent-2) 0 3px, transparent 3px 7px); }

/* ============================================================ 9 motion (transform and opacity only; none when reduced) */
@media (prefers-reduced-motion: no-preference) {
  .main > *, .mk-hero .mk-in > *, .auth-box, .notice-box { animation: rise 420ms var(--ease) backwards; }
  .main > *:nth-child(2) { animation-delay: 30ms; }
  .main > *:nth-child(3) { animation-delay: 60ms; }
  .main > *:nth-child(4) { animation-delay: 90ms; }
  .main > *:nth-child(n+5) { animation-delay: 120ms; }
  .horizon, .ring { animation: fade 1400ms var(--ease) 60ms backwards; }
  .menu[open] > .menu-p { animation: pop 160ms var(--ease) backwards; }
  .toast { animation: rise 260ms var(--ease) backwards; }
  .live.on .live-dot::after { animation: pulse 2s var(--ease) infinite; }
  .skel { animation: shimmer 1.6s linear infinite; }
  .ch-main.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 900ms var(--ease) 120ms forwards; }
  .ch-area.draw, .ch-cmp.draw { animation: fade 700ms var(--ease) 500ms backwards; }
  .ch-bar.draw { transform-box: fill-box; transform-origin: bottom; animation: grow 600ms var(--ease) backwards; }
  .bar-fill { transform-origin: left; animation: grow-x 700ms var(--ease) backwards; }
  .dlg[open] { animation: pop 180ms var(--ease) backwards; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } }
  @keyframes fade { from { opacity: 0; } }
  @keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
  @keyframes pulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(3); opacity: 0; } }
  @keyframes shimmer { to { background-position: -300% 0; } }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes grow { from { transform: scaleY(0); } }
  @keyframes grow-x { from { transform: scaleX(0); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition: none !important; scroll-behavior: auto !important; }
  .ch-main.draw { stroke-dasharray: none; stroke-dashoffset: 0; }
}

/* ============================================================ 10 builder sections
   Append-only. One section per module, its classes prefixed (trk-, acc-, dash-, ins-, rev-, goal-, mk-x-).
   Use the tokens above; never redefine a core class. */

/* ---- foundation: component gallery (/dev/components) */
.gx-sws { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gx-sw { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gx-sw > span { flex: none; width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line2); }
.gx-sw p { font-size: 14px; }
.gx-sw p.mono { font-size: 12px; }
.gx-type { display: grid; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.gx-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 4px; }
.gx-icons li { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: var(--r-sm); color: var(--t2); font-size: 13px; }
.gx-icons li .ic { color: var(--t1); }

/* ---- MARKETING (mk-x-): landing, pricing, docs, legal, changelog (lib/routes/marketing.js, lib/marketing/*) */
.mk-x-eyebrow { margin-bottom: 12px; color: var(--t3); font-size: 14px; font-weight: 550; }
.mk-x-h1 { max-width: 15ch; font-size: clamp(40px, 6.4vw, 72px); font-weight: 680; letter-spacing: -.04em; line-height: 1.02; text-wrap: balance; }
.mk-x-h1.sm { max-width: 20ch; font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -.035em; line-height: 1.06; }
.mk-x-lede { max-width: 600px; margin-top: 20px; color: var(--t2); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; text-wrap: pretty; }
.mk-x-h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 680; letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
.mk-x-h3 { margin: 72px 0 16px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 650; letter-spacing: -.025em; }
.mk-x-p { margin-top: 16px; color: var(--t2); font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.mk-x-sh { max-width: 600px; }
.mk-x-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.mk-x-more { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 16px; color: var(--t1); font-size: 15px; font-weight: 550; border-radius: var(--r-sm); }
.mk-x-more .ic { color: var(--t2); transition: transform var(--fast) var(--ease); }
@media (hover: hover) { .mk-x-more:hover .ic { transform: translateX(3px); color: var(--t1); } }
.mk-x-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--t3); font-size: 13px; }
.mk-x-cap { display: block; margin: 20px auto 0; max-width: 640px; color: var(--t3); font-size: 13px; line-height: 1.5; text-align: center; }
.mk-x-cap .ic { display: inline-block; margin-right: 6px; vertical-align: -3px; }
.mk-x-cap a { color: var(--t2); text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; white-space: nowrap; }
.mk-x-cap a:hover { color: var(--t1); }

/* hero: the words, then the eclipse rising behind the product */
.mk-x-hero { position: relative; }
.mk-x-hero-in { display: flex; flex-direction: column; align-items: center; padding-top: 48px; text-align: center; }
.mk-x-hero .mk-x-lede { margin-left: auto; margin-right: auto; }
.mk-x-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin-bottom: 24px; padding: 0 10px 0 14px; border-radius: var(--pill); border: 1px solid var(--line2); background: rgba(255, 255, 255, .03); color: var(--t2); font-size: 13px; font-weight: 500; transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease); }
.mk-x-pill .ic { color: var(--t3); }
.mk-x-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--t1); box-shadow: 0 0 0 3px rgba(255, 255, 255, .1); }
@media (hover: hover) { .mk-x-pill:hover { color: var(--t1); border-color: var(--line3); } }
@media (min-width: 760px) { .mk-x-hero-in { padding-top: 88px; } }

.mk-x-stage { position: relative; padding: calc(var(--g) + 32px) 0 40px; margin-top: -72px; }
.mk-x-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mk-x-sky::before {
  content: ""; position: absolute; top: 0; left: 50%; --r: calc(var(--d) / 2);
  width: calc(var(--d) + 2 * var(--g)); height: calc(var(--d) + 2 * var(--g)); margin-left: calc(var(--d) / -2 - var(--g));
  background:
    radial-gradient(circle at 50% 50%, #000 calc(var(--r) - .75px), rgba(0, 0, 0, 0) calc(var(--r) + .75px)),
    radial-gradient(circle at 50% calc(50% - 1.5px), rgba(255, 255, 255, .6) calc(var(--r) - .5px), rgba(255, 255, 255, 0) calc(var(--r) + 1.5px)),
    radial-gradient(circle at 50% calc(50% - 6px), rgba(236, 237, 240, .10) var(--r), rgba(236, 237, 240, 0) calc(var(--r) + 24px)),
    radial-gradient(circle at 50% calc(50% - 24px), rgba(236, 237, 240, .045) var(--r), rgba(236, 237, 240, 0) calc(var(--r) + 140px));
}
.mk-x-sky::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 320px; background: linear-gradient(rgba(9, 9, 10, 0), var(--bg) 85%); }
.mk-x-stage-in { position: relative; z-index: 1; }
@media (min-width: 760px) { .mk-x-stage { padding-top: calc(var(--g) + 48px); padding-bottom: 48px; margin-top: -64px; } }

/* the demo dashboard in a window */
.mk-x-window { position: relative; max-width: 1120px; margin: 0 auto; overflow: hidden; border-radius: 20px; background: var(--s1); border: 1px solid var(--line2); box-shadow: 0 40px 120px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .07); text-align: left; }
.mk-x-wbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding: 0 12px 0 14px; border-bottom: 1px solid var(--line); }
.mk-x-wsite { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mk-x-wsite .mark { width: 26px; height: 26px; }
.mk-x-wname { flex: none; font-size: 15px; font-weight: 600; white-space: nowrap; }
.mk-x-wdom { min-width: 0; overflow: hidden; color: var(--t3); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mk-x-wdom::before { content: "/"; margin-right: 8px; color: var(--t3); }
.mk-x-wend { display: flex; align-items: center; gap: 8px; flex: none; }
.mk-x-wrange { display: none; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line2); color: var(--t2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.mk-x-wrange .ic { color: var(--t3); }
.mk-x-wtabs { display: flex; gap: 2px; padding: 0 6px; border-bottom: 1px solid var(--line); overflow: hidden; }
.mk-x-wtabs span { position: relative; display: inline-flex; align-items: center; flex: none; height: 40px; padding: 0 10px; color: var(--t3); font-size: 13px; font-weight: 500; }
.mk-x-wtabs span.on { color: var(--t1); }
.mk-x-wtabs span.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--t1); }
.mk-x-wbody { display: grid; gap: 10px; padding: 10px; }
.mk-x-strip { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.mk-x-strip > :nth-child(n+3) { display: none; }
.mk-x-kpis { gap: 8px; }
.mk-x-kpis .kpi { background: var(--s2); }
.mk-x-chartcard { min-width: 0; padding: 14px 14px 8px; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim); }
.mk-x-chead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.mk-x-ct { font-size: 15px; font-weight: 600; }
.mk-x-wlink { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-top: 1px solid var(--line); color: var(--t2); font-size: 14px; font-weight: 500; transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
@media (hover: hover) { .mk-x-wlink:hover { color: var(--t1); background: rgba(255, 255, 255, .025); } }
@media (max-width: 479px) { .mk-x-wdom { display: none; } .mk-x-wbar .live-l { display: none; } }
@media (min-width: 600px) {
  .mk-x-wrange { display: inline-flex; }
  .mk-x-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .mk-x-wbar { height: 60px; padding: 0 16px 0 18px; }
  .mk-x-wtabs { padding: 0 10px; }
  .mk-x-wbody { gap: 14px; padding: 18px; }
  .mk-x-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .mk-x-chartcard { padding: 18px 20px 10px; }
}
@media (min-width: 1000px) {
  .mk-x-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .mk-x-strip > :nth-child(3) { display: flex; }
}

/* the chart: an SVG that stretches, HTML labels that don't */
.mk-x-chart { position: relative; padding-left: 34px; }
.mk-x-plot { position: relative; height: 150px; }
.mk-x-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mk-x-yax span { position: absolute; left: -34px; width: 28px; transform: translateY(50%); color: var(--t3); font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1; text-align: right; }
.mk-x-xax { position: relative; height: 18px; margin-top: 8px; }
.mk-x-xax span { position: absolute; top: 0; transform: translateX(-50%); color: var(--t3); font-size: 11px; white-space: nowrap; }
.mk-x-xax span:first-child { transform: none; }
.mk-x-xax span:last-child { transform: translateX(-100%); }
.mk-x-hover { position: absolute; inset: 0; pointer-events: none; }
.mk-x-cur { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line3); }
.mk-x-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.mk-x-chart .ch-tip { top: 0; }
@media (min-width: 760px) { .mk-x-plot { height: var(--h, 220px); } }

/* insight cards */
.mk-x-ins { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px 16px 16px; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim); }
.mk-x-ins-h { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.mk-x-ins-i { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--s4); color: var(--t1); }
.mk-x-ins-site { flex: 1; min-width: 0; overflow: hidden; color: var(--t3); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.mk-x-conf { display: inline-flex; flex: none; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-xs); background: rgba(255, 255, 255, .06); color: var(--t2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.mk-x-conf.good { background: var(--good-bg); color: var(--good); }
.mk-x-conf.bad { background: var(--bad-bg); color: var(--bad); }
.mk-x-ins-t { font-size: 16px; font-weight: 620; letter-spacing: -.01em; line-height: 1.3; text-wrap: pretty; }
.mk-x-ins-b { color: var(--t2); font-size: 14px; line-height: 1.5; }
.mk-x-ins-a { display: flex; align-items: flex-start; gap: 6px; color: var(--t1); font-size: 14px; font-weight: 500; line-height: 1.45; }
.mk-x-ins-a .ic { flex: none; margin-top: 2px; color: var(--t3); }
a.mk-x-ins-a { align-self: flex-start; border-radius: var(--r-xs); }
@media (hover: hover) { a.mk-x-ins-a:hover span { text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; } a.mk-x-ins-a:hover .ic { color: var(--t1); } }
.mk-x-ins.compact { padding: 12px 14px 14px; }
.mk-x-ins.compact .mk-x-ins-t { font-size: 15px; }
.mk-x-ins.compact .mk-x-ins-b { display: -webkit-box; overflow: hidden; font-size: 13px; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.mk-x-ins.compact .mk-x-ins-a { font-size: 13px; }

/* sections */
.mk-x-sec { position: relative; padding: 64px 0; }
.mk-x-split { display: grid; gap: 32px; }
.mk-x-copy { min-width: 0; }
.mk-x-demo { min-width: 0; }
.mk-x-list { display: grid; gap: 10px; margin-top: 24px; }
.mk-x-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--t1); font-size: 15px; line-height: 1.45; }
.mk-x-list .ic { flex: none; margin-top: 1px; color: var(--t3); }
.mk-x-insights { display: grid; gap: 10px; }
.mk-x-insights > :nth-child(5) { display: none; }
@media (min-width: 720px) { .mk-x-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mk-x-insights > :first-child { grid-column: 1 / -1; } .mk-x-insights > :nth-child(5) { display: flex; } }
.mk-x-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.mk-x-figs > div { padding-top: 14px; border-top: 1px solid var(--line2); }
.mk-x-figs dt { color: var(--t2); font-size: 14px; font-weight: 500; line-height: 1.4; }
.mk-x-figs dd { margin-top: 8px; }
.mk-x-big { display: block; font-size: clamp(32px, 4vw, 44px); font-weight: 680; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.mk-x-small { display: block; margin-top: 6px; color: var(--t3); font-size: 13px; line-height: 1.4; }
.mk-x-pair { display: grid; gap: 64px; }
.mk-x-col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.mk-x-col > .mk-x-reveal { flex: 1; display: flex; flex-direction: column; }
.mk-x-col > .mk-x-reveal > .card { flex: 1; }
.mk-x-between { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; }
@media (min-width: 760px) { .mk-x-sec { padding: 80px 0; } }
@media (min-width: 1000px) {
  .mk-x-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
  .mk-x-split.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .mk-x-split.rev > .mk-x-copy { order: 2; }
  .mk-x-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .mk-x-sec { padding: 96px 0; }
}

/* sources card: channel tabs with two number columns */
.mk-x-sources .ctabs { margin-bottom: 10px; }
.mk-x-hcols { display: flex; }
.mk-x-hcols > span { width: 72px; text-align: right; }
.mk-x-sources .bar-v, .mk-x-revlist .bar-v { width: 72px; }
.mk-x-cv { flex: none; width: 72px; color: var(--t2); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.mk-x-cv.faint { color: var(--t3); }
.mk-x-pane { min-height: 248px; border-radius: var(--r-sm); }
.mk-x-pane:focus-visible { outline-offset: 4px; }

/* revenue */
.mk-x-rev-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; padding-bottom: 18px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.mk-x-rev-top > :last-child { grid-column: 1 / -1; }
.mk-x-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mk-x-stat-l { color: var(--t2); font-size: 13px; font-weight: 500; }
.mk-x-stat-v { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mk-x-stat-s { color: var(--t3); font-size: 12px; line-height: 1.4; }
.mk-x-revlist .mk-x-cv { width: 84px; }
.mk-x-revlist .mk-x-hcols > span:first-child { width: 84px; }
.mk-x-foot { margin-top: 12px; padding: 0 10px; color: var(--t3); font-size: 12px; line-height: 1.5; }
@media (min-width: 520px) { .mk-x-rev-top { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mk-x-rev-top > :last-child { grid-column: auto; } }

/* funnel */
.mk-x-steps { display: grid; gap: 16px; }
.mk-x-step-h { display: flex; align-items: center; gap: 10px; min-height: 24px; font-size: 14px; }
.mk-x-step-n { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line2); color: var(--t2); font-size: 12px; font-variant-numeric: tabular-nums; }
.mk-x-step-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mk-x-step-v { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.mk-x-step-bar { height: 10px; margin-top: 8px; overflow: hidden; border-radius: 5px; background: rgba(255, 255, 255, .05); }
.mk-x-step-bar span { display: block; width: var(--w); min-width: 3px; height: 100%; border-radius: inherit; background: var(--s5); }
.mk-x-steps li.leak .mk-x-step-bar span { background: var(--accent); }
.mk-x-steps li.leak .mk-x-step-n { border-color: var(--t1); color: var(--t1); }
.mk-x-step-s { margin-top: 6px; color: var(--t3); font-size: 12px; font-variant-numeric: tabular-nums; }
.mk-x-funnel .mk-x-foot { padding: 0; margin-top: 18px; }

/* privacy */
.mk-x-priv-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.mk-x-priv-in .mk-x-sh { margin: 0 auto; }
.mk-x-priv-mark { position: relative; width: 72px; height: 72px; margin-bottom: 28px; border-radius: 50%; background: #000; box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .8), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 -2px 10px -2px rgba(236, 237, 240, .35), 0 -10px 40px -8px rgba(236, 237, 240, .18); }
.mk-x-grid4, .mk-x-grid3 { display: grid; gap: 12px; width: 100%; margin-top: 40px; text-align: left; }
.mk-x-grid4 > li { padding: 20px; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim); }
.mk-x-fi { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 16px; border-radius: var(--r-sm); background: var(--s4); border: 1px solid var(--line2); color: var(--t1); }
.mk-x-grid4 h3, .mk-x-grid3 h3 { font-size: 16px; font-weight: 620; letter-spacing: -.01em; }
.mk-x-grid4 p, .mk-x-grid3 p { margin-top: 6px; color: var(--t2); font-size: 14px; line-height: 1.55; }
.mk-x-grid3 { gap: 0 32px; }
.mk-x-grid3 > li { padding: 24px 0; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .mk-x-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mk-x-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .mk-x-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } .mk-x-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* plans */
.mk-x-plans { display: grid; gap: 12px; margin-top: 40px; }
.mk-x-plan { display: flex; flex-direction: column; min-width: 0; padding: 24px; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim); }
.mk-x-plan.hi { background: var(--s3); border-color: var(--line3); }
.mk-x-plan-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mk-x-plan-h h3 { font-size: 17px; font-weight: 650; }
.mk-x-price { display: flex; align-items: baseline; gap: 6px; margin-top: 16px; }
.mk-x-amt { font-size: 40px; font-weight: 680; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.mk-x-per { color: var(--t3); font-size: 15px; }
.mk-x-plan-for { margin-top: 10px; color: var(--t2); font-size: 14px; }
.mk-x-ticks { display: grid; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.mk-x-ticks li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; }
.mk-x-ticks .ic { flex: none; margin-top: 1px; color: var(--t2); }
.mk-x-plan-a { margin-top: auto; padding-top: 24px; }
@media (min-width: 900px) { .mk-x-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

/* the last call */
.mk-x-end { position: relative; overflow: hidden; padding: 72px 0 calc(var(--peek) + 88px); text-align: center; }
.mk-x-end .mk-in { position: relative; z-index: 1; }
.mk-x-end .mk-x-p { max-width: 520px; margin-left: auto; margin-right: auto; }
@media (min-width: 760px) { .mk-x-end { padding-top: 112px; } }

/* inner pages: pricing, changelog, legal */
.mk-x-page { padding: 48px 0 24px; }
.mk-x-ph { margin-bottom: 32px; }
.mk-x-ph.center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.mk-x-ph.center .mk-x-lede { margin-left: auto; margin-right: auto; }
.mk-x-narrow { max-width: 880px; }
.mk-x-plans.full { margin-top: 0; }
.mk-x-compare { overflow: hidden; }
.mk-x-compare .tbl th[scope="row"] { color: var(--t1); font-size: 14px; font-weight: 450; white-space: normal; }
.mk-x-compare .tbl th.num, .mk-x-compare .tbl td.num { width: 22%; text-align: center; }
.mk-x-compare .tbl td.num > span { display: inline-flex; justify-content: center; vertical-align: middle; }
.mk-x-compare .tbl tbody th { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mk-x-compare .tbl tbody tr:last-child th { border-bottom: 0; }
@media (hover: hover) { .mk-x-compare .tbl tbody tr:hover th { background: rgba(255, 255, 255, .02); } }
@media (max-width: 599px) { .mk-x-compare .tbl { font-size: 13px; } .mk-x-compare .tbl th, .mk-x-compare .tbl td { padding-left: 8px; padding-right: 8px; } .mk-x-compare .tbl th[scope="row"] { font-size: 13px; } }
.mk-x-yes { color: var(--t1); }
.mk-x-no { color: var(--t3); }
.mk-x-faq { border-top: 1px solid var(--line); }
.mk-x-qa { border-bottom: 1px solid var(--line); }
.mk-x-qa > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 8px 2px; list-style: none; font-size: 16px; font-weight: 550; cursor: pointer; border-radius: var(--r-xs); }
.mk-x-qa > summary::-webkit-details-marker { display: none; }
.mk-x-qa > summary .ic { flex: none; color: var(--t3); transition: transform var(--fast) var(--ease); }
.mk-x-qa[open] > summary .ic { transform: rotate(180deg); }
.mk-x-qa > p { max-width: 68ch; padding: 0 2px 20px; color: var(--t2); line-height: 1.6; }
@media (hover: hover) { .mk-x-qa > summary:hover .ic { color: var(--t1); } }
@media (min-width: 760px) { .mk-x-page { padding-top: 80px; } .mk-x-ph { margin-bottom: 48px; } }

.mk-x-log { display: grid; gap: 0; border-top: 1px solid var(--line); }
.mk-x-log > li { display: grid; gap: 8px 32px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.mk-x-log-d { color: var(--t3); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mk-x-log-b h2 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.mk-x-log-b .muted { margin-top: 4px; }
.mk-x-log-b ul { display: grid; gap: 8px; margin-top: 16px; padding-left: 20px; list-style: disc; color: var(--t2); line-height: 1.55; }
.mk-x-log-b li::marker { color: var(--t3); }
@media (min-width: 760px) { .mk-x-log > li { grid-template-columns: 180px minmax(0, 1fr); } .mk-x-log-d { padding-top: 3px; } }

.mk-x-legal > .note { margin-bottom: 32px; }
.mk-x-legal-grid { display: grid; gap: 32px; }
.mk-x-toc { display: none; }
.mk-x-toc-h { margin-bottom: 8px; color: var(--t3); font-size: 13px; font-weight: 550; }
.mk-x-toc a { display: flex; align-items: center; min-height: 34px; color: var(--t2); font-size: 14px; border-radius: var(--r-xs); }
.mk-x-toc a:hover { color: var(--t1); }
.mk-x-prose { max-width: 70ch; }
.mk-x-prose > h2:first-child { margin-top: 0; }
.mk-x-prose h2 { scroll-margin-top: 88px; }
.mk-x-upd { display: flex; align-items: center; gap: 8px; margin-top: 40px; color: var(--t3); font-size: 13px; }
@media (min-width: 1000px) {
  .mk-x-legal-grid { grid-template-columns: 200px minmax(0, 1fr); gap: 64px; }
  .mk-x-toc { position: sticky; top: 96px; display: flex; flex-direction: column; align-self: start; }
}

/* docs */
.mk-x-docs { padding-top: 24px; }
.mk-x-dgrid { display: grid; gap: 24px; }
.mk-x-dside { min-width: 0; }
.mk-x-dsticky { display: none; }
.mk-x-dmenu { border: 1px solid var(--line2); border-radius: var(--r); background: var(--s1); }
.mk-x-dmenu > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; list-style: none; font-weight: 550; cursor: pointer; border-radius: var(--r); }
.mk-x-dmenu > summary::-webkit-details-marker { display: none; }
.mk-x-dmenu > summary > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-x-dmenu > summary > .ic { color: var(--t3); transition: transform var(--fast) var(--ease); }
.mk-x-dmenu[open] > summary > .ic:last-child { transform: rotate(180deg); }
.mk-x-dmenu .mk-x-dnav { padding: 4px 6px 10px; border-top: 1px solid var(--line); }
.mk-x-dgroup + .mk-x-dgroup { margin-top: 10px; }
.mk-x-dg { padding: 8px 10px 4px; color: var(--t3); font-size: 12px; font-weight: 600; }
.mk-x-dnav a { display: flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: var(--r-sm); color: var(--t2); font-size: 14px; }
.mk-x-dnav a[aria-current] { background: var(--hover); color: var(--t1); font-weight: 550; }
@media (hover: hover) { .mk-x-dnav a:hover { background: var(--hover); color: var(--t1); } }
@media (pointer: coarse) { .mk-x-dnav a { min-height: 44px; } }
.mk-x-dart { min-width: 0; max-width: 760px; }
.mk-x-dhead { margin-bottom: 28px; }
.mk-x-dhead .mk-x-eyebrow a { color: var(--t3); }
.mk-x-dhead .mk-x-eyebrow a:hover { color: var(--t1); }
.mk-x-dprose { max-width: none; }
.mk-x-dprose > :first-child { margin-top: 0; }
.mk-x-dprose h2 { scroll-margin-top: 88px; }
.mk-x-dprose .code, .mk-x-dprose .tbl-wrap, .mk-x-dprose .note, .mk-x-dprose .mk-x-ptabs { margin: 16px 0; }
.mk-x-dprose .tbl { color: var(--t1); }
.mk-x-dprose .tbl td { color: var(--t2); }
.mk-x-dprose .tbl td:first-child { color: var(--t1); }
.mk-x-dprose .tbl th.num, .mk-x-dprose .tbl td.num { text-align: center; }
.mk-x-dprose .tbl td.num .ic { display: inline-block; vertical-align: middle; }
.mk-x-dprose .note p { margin: 0; }
.mk-x-dprose .mk-x-qa > summary { color: var(--t1); }
.mk-x-ol { display: grid; gap: 12px; margin: 16px 0; padding: 0; list-style: none; counter-reset: mkx; }
.prose .mk-x-ol > li + li { margin-top: 0; }
.mk-x-ol > li { position: relative; min-height: 24px; padding-left: 36px; counter-increment: mkx; }
.mk-x-ol > li::before { content: counter(mkx); position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line2); color: var(--t1); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mk-x-ptabs { padding: 6px 8px 2px; border-radius: var(--r-lg); border: 1px solid var(--line2); background: var(--s1); }
.mk-x-ptabs .ctabs { margin: 0 -6px 4px; }
.mk-x-ppane { padding: 0 2px 8px; }
.mk-x-ppane > p { margin-top: 12px; }
@media (min-width: 760px) { .mk-x-ptabs { padding: 8px 12px 4px; } }
.mk-x-pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.mk-x-pn a { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--s1); transition: border-color var(--fast) var(--ease); }
.mk-x-pn a.next { grid-column: 2; align-items: flex-end; text-align: right; }
.mk-x-pn-l { display: inline-flex; align-items: center; gap: 4px; color: var(--t3); font-size: 13px; }
.mk-x-pn-t { max-width: 100%; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .mk-x-pn a:hover { border-color: var(--line3); } }
.mk-x-dcards { display: grid; align-items: start; gap: 12px; margin-top: 24px; }
.mk-x-dcard { padding: 16px 18px 10px; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim); }
.prose .mk-x-dcard h2 { margin: 0 0 4px; color: var(--t3); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.prose .mk-x-dcard ul { margin: 0; padding: 0; list-style: none; }
.prose .mk-x-dcard li + li { margin-top: 0; }
.prose .mk-x-dcard a { display: flex; flex-direction: column; gap: 2px; margin: 0 -10px; padding: 10px; border-radius: var(--r-sm); text-decoration: none; }
.mk-x-dct { color: var(--t1); font-weight: 600; }
.mk-x-dcl { color: var(--t2); font-size: 14px; line-height: 1.45; }
@media (hover: hover) { .prose .mk-x-dcard a:hover { background: var(--hover); } }
@media (min-width: 720px) { .mk-x-dcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) {
  .mk-x-dgrid { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
  .mk-x-dmenu { display: none; }
  .mk-x-dsticky { position: sticky; top: 88px; display: block; align-self: start; max-height: calc(100vh - 112px); overflow: auto; }
  .mk-x-dsticky .mk-x-dnav { margin-left: -10px; }
  .mk-x-dside { align-self: stretch; }
}

/* motion: the eclipse rises once; sections fade up as they arrive (marketing.js adds .mk-x-pre below the fold) */
@media (prefers-reduced-motion: no-preference) {
  .mk-x-hero-in > * { animation: rise 520ms var(--ease) backwards; }
  .mk-x-hero-in > :nth-child(2) { animation-delay: 40ms; }
  .mk-x-hero-in > :nth-child(3) { animation-delay: 80ms; }
  .mk-x-hero-in > :nth-child(4) { animation-delay: 120ms; }
  .mk-x-sky::before { animation: mk-x-rise 1800ms var(--ease) 80ms backwards; }
  .mk-x-window { animation: rise 760ms var(--ease) 260ms backwards; }
  .mk-x-page .mk-in > *, .mk-x-end .mk-in > * { animation: rise 420ms var(--ease) backwards; }
  .mk-x-reveal { transition: opacity 640ms var(--ease), transform 640ms var(--ease); }
  .mk-x-reveal.mk-x-pre { opacity: 0; transform: translateY(18px); }
  .mk-x-pre .bar-fill, .mk-x-pre .mk-x-step-bar span, .mk-x-pre .ch-main.draw, .mk-x-pre .ch-area.draw, .mk-x-pre .ch-cmp.draw { animation: none; }
  .mk-x-step-bar span { transform-origin: left; animation: grow-x 800ms var(--ease) 120ms backwards; }
  @keyframes mk-x-rise { from { opacity: 0; transform: translateY(56px); } }
}
/* ---- MARKETING end */

/* ---- ACCOUNTS (acc-): sign in and up, onboarding, business home, install, site settings, team, account, outbox
   (lib/routes/{auth,workspaces,sites,team,account,dev}.js, public/js/accounts.js) */
.acc-fine { color: var(--t3); font-size: 13px; line-height: 1.5; }
.acc-fine a { color: var(--t2); }
.acc-dot { display: inline-block; width: 3px; height: 3px; margin: 0 8px; border-radius: 50%; background: currentColor; opacity: .55; vertical-align: middle; }
.acc-em { color: var(--t1); font-weight: 600; overflow-wrap: anywhere; }
.acc-strong { font-weight: 600; }
.acc-label { color: var(--t3); font-size: 13px; font-weight: 500; }
.acc-row { display: flex; gap: 8px; }
.acc-grow { flex: 1; }
.acc-mt0 { margin-top: 0; }
.acc-wrap { flex-wrap: wrap; }
.acc-inline { display: inline; }
.center-x { justify-content: center; }
.acc-list { display: grid; gap: 6px; margin-top: 10px; }
.acc-banners { display: grid; gap: 8px; margin-bottom: 16px; }

/* auth: password with Show, forgot link, onboarding steps */
.acc-reveal { position: relative; display: block; }
.acc-reveal .input { padding-right: 72px; }
.acc-reveal-b { position: absolute; top: 4px; right: 4px; height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--t2); font-size: 13px; font-weight: 600; cursor: pointer; }
.acc-reveal-b:focus-visible { outline-offset: -2px; }
@media (hover: hover) { .acc-reveal-b:hover { color: var(--t1); background: var(--hover); } }
.acc-pw { display: flex; flex-direction: column; }
.acc-forgot { align-self: flex-end; display: inline-flex; align-items: center; min-height: 40px; margin: 2px -4px -8px 0; padding: 0 4px; border-radius: var(--r-xs); color: var(--t2); font-size: 13px; font-weight: 500; }
.acc-forgot:hover { color: var(--t1); }
.auth-f .acc-dot { margin: 0 8px; }
.auth-box .acc-fine { text-align: center; }
.acc-steps { display: flex; justify-content: center; margin-bottom: 28px; }
.acc-steps.left { justify-content: flex-start; margin-bottom: 20px; }
.acc-steps .steps { max-width: 100%; }
@media (max-width: 479px) { .acc-steps .steps li:not(.now) > span:last-child { display: none; } .acc-steps .steps li:not(.now) { padding-right: 4px; } }
.acc-onb-h { text-align: center; }
.acc-onb-h .auth-h { margin-top: 0; }
.auth-box .acc-onb-h + form { margin-top: 24px; }
.acc-or-invite { display: grid; gap: 10px; margin-top: 24px; }
.acc-or-invite > .acc-label:last-child { margin-top: 14px; text-align: center; }
.acc-invites { display: grid; gap: 8px; }
.acc-invite { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--field); }
.acc-invite-t { flex: 1; min-width: 0; }
.acc-invite-t p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.acc-invite form { margin: 0; }

/* the business home */
.acc-sites { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .acc-sites { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1100px) { .acc-sites { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
a.card.acc-site { display: flex; flex-direction: column; gap: 12px; min-height: 252px; }
.acc-site-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.acc-site-n { min-width: 0; }
.acc-site-n h2 { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-site-n p { margin-top: 2px; font-size: 12px; }
.acc-site-k { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.acc-site-v { font-size: 36px; font-weight: 680; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.acc-site-l { color: var(--t2); font-size: 13px; }
.acc-site-d { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 22px; font-size: 12px; }
.acc-mini { display: block; width: 100%; height: 40px; margin-top: auto; overflow: visible; }
.acc-site-f { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--t2); font-size: 13px; }
.acc-site-f strong { color: var(--t1); font-weight: 600; }
.acc-wait { display: flex; align-items: center; gap: 10px; margin: auto 0; padding: 16px 0; color: var(--t2); font-size: 14px; }
.acc-wait-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--t3); box-shadow: 0 0 0 4px rgba(255, 255, 255, .05); }
.acc-site-cta { align-self: flex-start; }
.acc-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 252px; border: 1px dashed var(--line3); border-radius: var(--r-lg); color: var(--t2); font-size: 15px; font-weight: 500; transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
@media (hover: hover) { .acc-add:hover { color: var(--t1); border-color: var(--t3); background: rgba(255, 255, 255, .02); } }
@media (max-width: 719px) { .acc-add { min-height: 96px; flex-direction: row; } a.card.acc-site { min-height: 0; } .acc-wait { padding: 4px 0; } }
.acc-home-inv { margin-bottom: 16px; }
.acc-ppl { display: grid; gap: 4px; }
.acc-ppl li { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; }
.acc-ppl .trunc { flex: 1; }
.acc-use { display: grid; gap: 8px; font-size: 14px; }
.acc-use + .acc-use { margin-top: 8px; }
.acc-use.over .meter > span { background: var(--warn); }

/* two columns: main and side (settings, team, account) */
.acc-cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .acc-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; } }
.acc-danger { border-color: rgba(255, 138, 125, .2); }
.acc-danger .card-t h2 { color: var(--bad); }
.acc-danger form + form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }

/* install */
.acc-install { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "status" "side"; align-items: start; }
.acc-install-st { grid-area: status; }
.acc-install-main { grid-area: main; }
.acc-install-side { grid-area: side; }
@media (min-width: 1100px) { .acc-install { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-areas: "main status" "main side"; grid-template-rows: auto 1fr; gap: 24px; } }
.acc-plats { margin-bottom: 20px; }
.acc-how { display: grid; gap: 12px; margin: 0 0 16px; counter-reset: how; }
.acc-how li { position: relative; min-height: 24px; padding-left: 36px; color: var(--t2); line-height: 1.5; counter-increment: how; }
.acc-how li::before { content: counter(how); position: absolute; left: 0; top: -1px; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line2); color: var(--t1); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.acc-how strong { color: var(--t1); font-weight: 600; }
.acc-panel .acc-fine { margin-top: 12px; }
.acc-status { position: relative; overflow: hidden; padding: 32px 20px 28px; text-align: center; }
.acc-status h2 { margin-top: 18px; font-size: 18px; font-weight: 650; }
.acc-status p { margin-top: 6px; overflow-wrap: anywhere; }
.acc-status .cluster { margin-top: 18px; }
.acc-orb { position: relative; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(closest-side, #000 0, #000 82%, rgba(236, 237, 241, .6) 86%, rgba(220, 222, 227, .16) 92%, rgba(200, 202, 208, 0) 100%); }
.acc-orb span { position: absolute; inset: -8px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); }
.acc-done { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; border: 1px solid rgba(99, 214, 162, .35); background: var(--good-bg); color: var(--good); }
.acc-ticks { display: grid; gap: 2px; }
.acc-ticks li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; color: var(--t2); font-size: 14px; }
.acc-ticks .ic { margin-top: 3px; color: var(--t1); }
.acc-ticks + .acc-fine { margin-top: 12px; }
.acc-inst-st { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.acc-copyline { display: flex; gap: 8px; }
.acc-copyline .input { flex: 1; min-width: 0; font-size: 13px; }

/* people rows (team, devices, businesses, outbox) */
.acc-people > li + li { border-top: 1px solid var(--line); }
.acc-person { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; }
@media (min-width: 760px) { .acc-person { padding: 14px 20px; } }
.acc-person-t { flex: 1; min-width: 0; }
.acc-person-t > p.faint { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-person-n { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.acc-person-n .faint { font-weight: 500; font-size: 13px; }
.acc-person-n .badge { flex: none; }
.acc-person-m { margin-top: 2px; color: var(--t3); font-size: 13px; }
.acc-person-a { display: flex; flex: none; align-items: center; gap: 4px; }
.acc-person-a form { margin: 0; }
.acc-av-wait { background: transparent; border-style: dashed; color: var(--t3); }
.acc-dev { display: flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line2); background: var(--s3); color: var(--t2); }
@media (max-width: 479px) { .acc-person.multi { flex-wrap: wrap; } .acc-person.multi .acc-person-a { width: 100%; padding-left: 40px; margin-top: -6px; } }
.acc-role-v { color: var(--t2); font-weight: 400; font-size: 14px; }

/* access pickers: sites appear when "All sites" is off; admins don't need either */
.acc-access { display: grid; gap: 8px; }
.acc-checks { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.acc-access:has(input[name="all_sites"]:checked) .acc-checks { display: none; }
form:has(input[name="role"][value="admin"]:checked) .acc-access,
form:has(input[name="role"][value="admin"]:checked) .toggle:has(input[name="see_revenue"]) { display: none; }
.acc-check { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--field); cursor: pointer; transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.acc-check input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: #f2f2f3; }
.acc-check > span { display: flex; flex-direction: column; min-width: 0; }
.acc-check .mono { font-size: 12px; }
.acc-check:has(input:checked) { border-color: var(--line3); background: rgba(255, 255, 255, .07); }

/* plan and activity */
.acc-plan-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .acc-plan-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.acc-price { margin-left: 8px; color: var(--t3); font-size: 13px; font-weight: 500; }
.acc-plan-now { margin-top: 4px; font-size: 20px; font-weight: 650; }
.acc-log li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 16px; color: var(--t2); font-size: 14px; }
.acc-log li + li { border-top: 1px solid var(--line); }
.acc-log strong { color: var(--t1); font-weight: 600; }
.acc-log time { flex: none; font-size: 13px; }
@media (min-width: 760px) { .acc-log li { padding: 12px 20px; } }

/* account */
.acc-email { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.acc-email .acc-strong { overflow-wrap: anywhere; }
.acc-more { margin-top: 8px; }
.acc-more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--t2); font-size: 14px; font-weight: 500; list-style: none; cursor: pointer; border-radius: var(--r-xs); }
.acc-more > summary::-webkit-details-marker { display: none; }
.acc-more > summary::after { content: ""; width: 7px; height: 7px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.acc-more[open] > summary { color: var(--t1); }
.acc-more[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }
.acc-more > form { margin-top: 4px; }

/* dev outbox */
.acc-mailtext { margin: 0; color: var(--t2); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.acc-mailframe { display: block; width: 100%; height: 680px; border: 0; background: #f4f4f5; }
.acc-links li + li { margin-top: 8px; }
.acc-links a { font-size: 12px; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: no-preference) {
  .acc-orb span { animation: acc-ring 2.4s var(--ease) infinite; }
  .acc-status.celebrate .acc-done { animation: acc-pop 640ms var(--ease) backwards; }
  .acc-status.celebrate .acc-st-got > :not(.acc-done) { animation: rise 420ms var(--ease) 160ms backwards; }
  .acc-status.celebrate::before { content: ""; position: absolute; left: 50%; top: 64px; width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(99, 214, 162, .16), rgba(99, 214, 162, 0)); animation: acc-glow 1600ms var(--ease) forwards; }
  @keyframes acc-ring { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }
  @keyframes acc-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } }
  @keyframes acc-glow { 0% { opacity: 0; transform: scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.2); } }
}
/* getting set up (business home) */
.acc-setup-w { margin-bottom: 16px; }
.acc-setup .meter { margin: 2px 0 12px; }
.acc-setup-l { display: grid; gap: 4px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .acc-setup-l { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; } }
.acc-setup-r { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px; border-radius: var(--r); transition: background-color var(--fast) var(--ease); }
@media (min-width: 1100px) { .acc-setup-r { align-items: flex-start; padding: 12px; border: 1px solid var(--line); min-height: 100%; } }
a.acc-setup-r:hover { background: var(--hover); }
.acc-setup-i { display: flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line2); color: var(--t1); }
.acc-setup-i.done { border-color: transparent; background: var(--s4); color: var(--t2); }
.acc-setup-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; font-weight: 550; }
.acc-setup-t .faint { font-size: 13px; font-weight: 400; }
.acc-setup-r.done .acc-setup-t > span:first-child { color: var(--t2); }
.acc-setup-go { margin-left: auto; color: var(--t3); }
@media (min-width: 1100px) { .acc-setup-go { position: absolute; top: 14px; right: 10px; } }
.acc-tip { margin-top: 12px; }
/* two-step sign-in */
.acc-left { text-align: left; }
.acc-qr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.acc-qr { flex: none; width: 196px; height: 196px; padding: 0; border-radius: var(--r); overflow: hidden; background: #fff; }
.acc-qr svg { width: 100%; height: 100%; }
.acc-qr-row .stack { flex: 1 1 200px; }
.acc-key-l { margin: 20px 0 8px; }
.acc-narrow { max-width: 640px; }
.acc-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-bottom: 16px; counter-reset: rc; }
.acc-codes li { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 16px; letter-spacing: .04em; counter-increment: rc; }
.acc-codes li::before { content: counter(rc); width: 20px; color: var(--t3); font-family: var(--font); font-size: 12px; text-align: right; }
/* ---- ACCOUNTS end */

/* ---- DASHBOARD (dash-): the site dashboard, details tables, share view, demo (lib/routes/dashboard.js, lib/charts.js,
   public/js/dashboard.js) */
.dash-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.dash-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.dash-title h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 26px; font-weight: 700; letter-spacing: -.025em; }
.dash-dom { display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 32px; color: var(--t3); font-size: 14px; }
.dash-dom:hover { color: var(--t1); }
.dash-ctl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dash-ctl > .menu > summary.btn { gap: 8px; padding: 0 14px; }
.dash-range > summary .ic:last-child { color: var(--t3); margin-right: -4px; }
.dash-rl, .dash-cl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-shift { display: flex; gap: 4px; }
.dash-shift .btn[aria-disabled="true"] { opacity: .35; }
.dash-export > summary.btn, .dash-cmp > summary.btn { color: var(--t2); }
.dash-range .menu-p { min-width: 268px; }
.dash-range .mi, .dash-cmp .mi { min-height: 36px; }
.dash-range .mi kbd, .dash-cmp .mi kbd { margin-left: auto; }
.dash-custom { padding: 4px 6px 8px; }
.dash-custom .menu-h { padding-left: 4px; }
.dash-custom-r { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.dash-custom-r label { flex: 1; min-width: 0; }
.dash-custom-r .input, .dash-nf .input { height: 40px; padding: 0 10px; font-size: 14px; }
.dash-cmp-note { padding: 6px 10px 8px; color: var(--t3); font-size: 12px; }
@media (max-width: 759px) {
  .dash-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dash-bar { margin-bottom: 12px; }
  .dash-ctl { width: 100%; }
  .dash-ctl > .dash-range { flex: 1; min-width: 0; }
  .dash-range > summary.btn { width: 100%; justify-content: flex-start; padding: 0 12px; }
  .dash-range > summary .ic:first-child { display: none; }
  .dash-range > summary .ic:last-child { margin-left: auto; }
  .dash-cmp > summary.btn { width: 44px; padding: 0; justify-content: center; }
  .dash-cl { display: none; }
  .dash-keys { display: none; }
}
@media (pointer: coarse) { .dash-keys { display: none; } }

.dash-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 16px; color: var(--t3); }
.dash-filters .chip { background: var(--s3); border-color: var(--line3); color: var(--t1); }
.dash-filters .chip-x { opacity: 1; color: var(--t2); }
.dash-filters .chip-x:hover { color: var(--t1); }
.dash-clear { display: inline-flex; align-items: center; min-height: 32px; padding: 0 6px; color: var(--t2); font-size: 13px; font-weight: 500; }
.dash-clear:hover { color: var(--t1); }

/* the milestone moment: a quiet line with the eclipse rising under it */
.dash-moment { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 16px 18px 26px; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line2); background: var(--s1); }
.dash-moment > .ic { color: var(--t1); }
.dash-moment p { position: relative; z-index: 1; flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.dash-moment .dash-mb { color: var(--t2); font-weight: 450; }
.dash-moment .dash-more { position: relative; z-index: 1; flex: none; }
@media (max-width: 479px) { .dash-moment .dash-more { display: none; } }
.dash-moment .horizon { --peek: 14px; --g: 70px; --d: 1600px; }

/* the insights strip */
.dash-insights { margin-bottom: 16px; }
.dash-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.dash-sec-h h2 { display: inline-flex; align-items: center; gap: 8px; color: var(--t2); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.dash-more { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; color: var(--t2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.dash-more:hover { color: var(--t1); }
.dash-ins-row { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 360px); gap: 8px; margin: 0 calc(-1 * var(--gr)) 0 calc(-1 * var(--gl)); padding: 0 var(--gr) 4px var(--gl); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gl); scrollbar-width: none; }
.dash-ins-row::-webkit-scrollbar { display: none; }
@media (min-width: 760px) { .dash-ins-row { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; overflow: visible; } }
.dash-ins { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px 12px; scroll-snap-align: start; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim); }
.dash-ins-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.dash-ins-i { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--s4); border: 1px solid var(--line2); color: var(--t1); }
.dash-ins-c { color: var(--t3); font-size: 12px; font-weight: 500; }
.dash-ins h3 { font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.dash-ins p { color: var(--t2); font-size: 14px; line-height: 1.45; }
.dash-ins-a { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 4px; min-height: 36px; color: var(--t1); font-size: 13px; font-weight: 550; }
a.dash-ins-a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* KPIs */
.dash-kpis { margin-bottom: 16px; }
@media (min-width: 760px) { .dash-kpis .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.dash-kpis .kpi-d { flex-wrap: nowrap; overflow: hidden; }
.dash-kpis .kpi-s { overflow-wrap: anywhere; }

/* the main chart */
.dash-chartcard { padding-bottom: 14px; }
.dash-ch-h { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; margin-bottom: 6px; }
.dash-ch-h h2 { margin-bottom: 6px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.dash-ch-a { display: flex; align-items: center; gap: 8px; }
.dash-gran a { height: 30px; padding: 0 10px; font-size: 13px; }
.dash-notes-m > summary.btn { height: 36px; padding: 0 12px; color: var(--t2); font-size: 14px; }
.dash-notes-m .menu-p { width: min(340px, calc(100vw - 32px)); }
.dash-noteform { padding: 4px 6px 8px; }
.dash-noteform .menu-h { padding-left: 4px; }
.dash-nf { display: grid; grid-template-columns: 132px 1fr; gap: 8px; margin: 4px 0 10px; }
.dash-notes { padding: 0 4px 4px; }
.dash-notes li { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13px; }
.dash-notes .dash-nd { flex: none; width: 52px; color: var(--t3); font-variant-numeric: tabular-nums; }
.dash-nt { flex: 1; min-width: 0; color: var(--t2); }
.dash-notes form { margin: 0; }
@media (max-width: 479px) { .dash-nl { display: none; } .dash-notes-m > summary.btn { width: 44px; padding: 0; justify-content: center; } }
.dash-mtabs { display: none; }
.ch-legend i.dash-li { width: 6px; height: 6px; border-radius: 50%; background: var(--t2); }

.dash-chart { position: relative; margin-top: 14px; outline-offset: 6px; }
.dash-plot { position: relative; height: 196px; }
@media (min-width: 760px) { .dash-plot { height: 248px; } }
@media (min-width: 1280px) { .dash-plot { height: 288px; } }
.dash-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dash-area { stroke: none; }
.dash-fade0 { stop-color: var(--accent); stop-opacity: .11; }
.dash-fade1 { stop-color: var(--accent); stop-opacity: 0; }
.dash-svg .ch-main { stroke-width: 2.25; }
.ch-main.dash-partial { stroke-dasharray: 2 5; }
.dash-yl span { position: absolute; left: 0; transform: translateY(-100%); padding: 0 0 3px; color: var(--t3); font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1.2; pointer-events: none; }
.dash-xl { position: relative; height: 18px; margin-top: 8px; }
.dash-xl span { position: absolute; top: 0; transform: translateX(-50%); color: var(--t3); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-xl span.first { transform: none; }
.dash-xl span.last { transform: translateX(-100%); }
@media (max-width: 599px) { .dash-xl span.minor { display: none; } }
.dash-cursor { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: var(--line3); pointer-events: none; }
.dash-dot { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); pointer-events: none; }
.dash-dot.cmp { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-color: var(--accent-2); }
.dash-annos { position: absolute; left: 0; right: 0; bottom: 0; height: 0; pointer-events: none; }
.dash-anno { position: absolute; bottom: -3px; width: 12px; height: 12px; margin-left: -6px; display: flex; align-items: center; justify-content: center; }
.dash-anno i { width: 6px; height: 6px; border-radius: 50%; background: var(--t2); box-shadow: 0 0 0 3px var(--s2); }
.dash-chart .ch-tip { top: -6px; left: 0; min-width: 168px; max-width: 260px; }
.ch-tip .tt-c { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--t2); font-size: 12px; font-variant-numeric: tabular-nums; }
.ch-tip .tt-c b { color: var(--t1); font-weight: 600; }
.ch-tip .tt-dd { margin-left: 8px; color: var(--t2); font-size: 13px; font-weight: 550; }
.ch-tip .tt-x { margin-top: 2px; color: var(--t3); font-size: 12px; }
.ch-tip .tt-n { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--t2); font-size: 12px; }
.dash-reveal { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .dash-reveal { display: block; position: absolute; z-index: 2; top: -6px; bottom: -2px; left: -2px; right: -6px; background: var(--s2); transform-origin: right center; pointer-events: none; animation: dash-reveal 1000ms var(--ease) 100ms forwards; }
  @keyframes dash-reveal { to { transform: scaleX(0); } }
}

/* lists */
.dash-grid { display: grid; gap: 16px; margin-top: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .dash-grid3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); } }
.dash-list { display: flex; flex-direction: column; }
.dash-list > .card-h { margin-bottom: 6px; }
.dash-tabs { margin-bottom: 10px; }
.dash-pane { flex: 1; }
.dash-val { display: inline-flex; align-items: center; gap: 10px; }
.dash-n { min-width: 36px; text-align: right; }
.dash-pct { min-width: 38px; color: var(--t3); font-size: 12px; font-weight: 500; text-align: right; }
.dash-new { height: 20px; padding: 0 6px; font-size: 11px; }
.dash-list .bars-more { margin-top: 6px; }
@media (max-width: 599px) { .dash-list .bars li:nth-child(n+9) { display: none; } }
.dash-fo { display: inline-flex; align-items: center; gap: 6px; }
.dash-fo .dash-pct { min-width: 0; }
.dash-lede { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--s1); color: var(--t2); font-size: 13px; line-height: 1.5; }
.dash-lede .ic { flex: none; margin-top: 2px; color: var(--t1); }
.dash-lede strong { color: var(--t1); font-weight: 600; }
.dash-gv { display: inline-flex; align-items: center; gap: 10px; }
.dash-gv .delta { height: 20px; font-size: 11px; }
@media (max-width: 479px) { .dash-gv .delta { display: none; } }

/* funnels */
.dash-fhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.dash-fname { font-weight: 600; }
a.dash-fname:hover { text-decoration: underline; text-underline-offset: 3px; }
.dash-fall { color: var(--t2); font-size: 13px; }
.dash-fall b { color: var(--t1); font-weight: 600; }
.dash-funnel { display: flex; flex-direction: column; }
.dash-fs { padding: 4px 0 8px; }
.dash-frow { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.dash-fl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dash-fn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line2); color: var(--t2); font-size: 11px; font-variant-numeric: tabular-nums; }
.dash-fv { flex: none; font-variant-numeric: tabular-nums; }
.dash-fv b { font-weight: 600; }
.dash-fv span { margin-left: 8px; color: var(--t3); font-size: 12px; }
.dash-fbar { display: block; height: 6px; margin: 6px 0 0 28px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.dash-fbar span { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--t2); }
.dash-fs:first-child .dash-fbar span { background: var(--t1); }
.dash-fdrop { display: block; margin: 0 0 4px 28px; color: var(--t3); font-size: 12px; }
.dash-fs.leak .dash-fdrop { color: var(--warn); }
.dash-fs.leak .dash-fdrop::after { content: " · biggest drop"; }
.dash-flist { margin-top: 8px; }
.dash-flist li > a, .dash-flist li > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; border-top: 1px solid var(--line); font-size: 14px; }
.dash-flist a .ic { color: var(--t3); }
.dash-flist a:hover { color: var(--t1); }
@media (prefers-reduced-motion: no-preference) { .dash-fbar span { transform-origin: left; animation: grow-x 700ms var(--ease) backwards; } }

/* revenue */
.dash-rfs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.dash-rf { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--s1); }
.dash-rf span { color: var(--t2); font-size: 13px; }
.dash-rf b { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dash-rf small { color: var(--t3); font-size: 12px; }

/* waiting for the first visit */
.dash-wait { min-height: min(62vh, 560px); display: flex; align-items: center; justify-content: center; }
.dash-wait .empty { width: 100%; align-self: stretch; justify-content: center; margin: 0; padding-top: 64px; }

/* details tables */
.dash-detail { overflow: visible; }
.dash-dt-tabs { padding: 12px 12px 0; }
.dash-dt-tabs .ctabs { margin: 0; }
.dash-dt-tools { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dash-search { position: relative; display: block; max-width: 340px; }
.dash-search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--t3); pointer-events: none; }
.dash-search .input { height: 44px; padding-left: 40px; }
.dash-tbl td:first-child { max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-tl { color: var(--t1); }
.dash-tl.mono { font-family: var(--mono); font-size: 13px; }
.dash-tl:hover { text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; }
.dash-sort { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.dash-sort:hover { color: var(--t1); }
.dash-sort[aria-sort]::after { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }
.dash-sort[aria-sort="ascending"]::after { border-top: 0; border-bottom: 5px solid currentColor; }
.dash-tbl tr[hidden] { display: none; }
.dash-tbl .badge { height: 20px; font-size: 11px; }

/* shortcuts */
.dash-sc { width: min(380px, calc(100vw - 32px)); }
.dash-scl { display: grid; gap: 4px; margin-top: 14px; }
.dash-scl div { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 30px; }
.dash-scl dt { display: flex; gap: 4px; }
.dash-scl dd { color: var(--t2); font-size: 14px; }
/* right now (the live pulse's list) */
.dash-now > summary { min-height: 44px; }
.dash-now > summary .live { cursor: pointer; }
.dash-now .menu-p { min-width: 260px; }
.dash-now-l { padding: 0 4px 4px; }
.dash-now-l li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 0 6px; font-size: 13px; }
.dash-now-l .num { color: var(--t2); }
.dash-now-0 { color: var(--t3); }
@media (hover: hover) { .dash-now > summary:hover .live { border-color: var(--line3); } }

/* when they visit */
.dash-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-stack > .card { flex: none; }
.dash-when-l { margin: -4px 0 14px; color: var(--t2); font-size: 14px; }
.dash-when-l strong { color: var(--t1); font-weight: 600; }
.dash-when-g { display: grid; gap: 20px; }
@media (min-width: 600px) { .dash-when-g { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 24px; } }
.dash-when-h { margin-bottom: 8px; color: var(--t3); font-size: 12px; font-weight: 500; }
.dash-bars { position: relative; }
.dash-bars svg { display: block; width: 100%; height: 96px; }
.dash-bars .dash-xl span { transform: translateX(-50%); }
/* ---- DASHBOARD end */

/* ---- INSIGHTS+REVENUE (ins-, goal-, rev-): insights, milestones and digest (lib/routes/insights.js), goals and funnels
   (lib/routes/goals.js), revenue and Stripe (lib/routes/revenue.js); shared markup in lib/insights-ui.js */
.ph-a .ins-range { flex: none; }
@media (max-width: 599px) { .ph-a:has(.ins-range) { width: 100%; flex-wrap: wrap; } .ph-a .ins-range { flex: 1 1 100%; } .ph-a .ins-range a { flex: 1; } }

/* insights: layout */
.ins-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.ins-main, .ins-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1100px) {
  .ins-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
  .ins-side { position: sticky; top: calc(var(--hdr) + 64px); }
}
@media (min-width: 1280px) { .ins-layout { grid-template-columns: minmax(0, 1fr) 400px; } }
.ins-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .ins-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }

/* insights: one card */
.ins-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px; border-radius: var(--r-lg); background: var(--s2); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim); }
.ins-card.lead { gap: 12px; padding: 20px; background: var(--s3); border-color: var(--line2); }
@media (min-width: 760px) { .ins-card { padding: 18px 20px; } .ins-card.lead { padding: 28px 28px 24px; } }
.ins-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ins-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--s4); border: 1px solid var(--line2); color: var(--t1); }
.ins-kind { color: var(--t3); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-conf { flex: none; display: inline-flex; align-items: center; height: 22px; margin-left: auto; padding: 0 8px; border-radius: var(--r-xs); background: rgba(255, 255, 255, .06); color: var(--t2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins-conf.good { background: var(--good-bg); color: var(--good); }
.ins-conf.bad { background: var(--bad-bg); color: var(--bad); }
.ins-conf.solid { background: var(--t1); color: var(--ink); }
.ins-t { font-size: 17px; font-weight: 650; line-height: 1.3; letter-spacing: -.012em; text-wrap: balance; overflow-wrap: anywhere; }
.ins-card.lead .ins-t { font-size: 22px; letter-spacing: -.02em; }
@media (min-width: 760px) { .ins-card.lead .ins-t { font-size: 28px; line-height: 1.18; } .ins-card.lead .ins-b { font-size: 15px; max-width: 72ch; } }
.ins-b { color: var(--t2); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.ins-nums { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 10px 20px; margin: 2px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .ins-nums { gap: 10px 28px; } }
.ins-nums > div { min-width: 0; }
.ins-nums dt { color: var(--t3); font-size: 12px; }
.ins-nums dd { margin: 2px 0 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.ins-card.lead .ins-nums dd { font-size: 24px; letter-spacing: -.02em; }
.ins-nums dd.ins-note, .ins-note { display: block; margin: 1px 0 0; color: var(--t3); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.ins-card.lead .ins-nums dd.ins-note { font-size: 12px; }
.ins-act { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 36px; margin-top: auto; padding-top: 2px; border-radius: var(--r-xs); color: var(--t1); font-size: 14px; font-weight: 600; }
.ins-act .ic { transition: transform var(--fast) var(--ease); }
@media (hover: hover) { .ins-act:hover { text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; } .ins-act:hover .ic { transform: translateX(2px); } }
@media (pointer: coarse) { .ins-act { min-height: 44px; } }

/* insights: a new milestone, celebrated once */
.ins-moment { position: relative; overflow: hidden; margin-bottom: 16px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line2); background: radial-gradient(90% 160% at 0% 0%, rgba(255, 255, 255, .075), transparent 62%), var(--s2); }
@media (min-width: 760px) { .ins-moment { padding: 22px 24px; } }
.ins-moment-in { display: flex; align-items: flex-start; gap: 14px; }
.ins-moment-i { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--t1); color: var(--ink); box-shadow: 0 0 0 6px rgba(255, 255, 255, .05), 0 0 36px rgba(255, 255, 255, .16); }
.ins-moment-k { color: var(--t3); font-size: 13px; font-weight: 500; }
.ins-moment h2 { margin: 2px 0 4px; font-size: 21px; letter-spacing: -.02em; }
.ins-moment-more { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0 58px; color: var(--t2); font-size: 13px; }
.ins-moment-more li { display: inline-flex; align-items: center; gap: 6px; }
@media (prefers-reduced-motion: no-preference) { .ins-moment-i { animation: ins-glow 1600ms var(--ease) 200ms backwards; } @keyframes ins-glow { from { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0), 0 0 0 rgba(255, 255, 255, 0); transform: scale(.85); } } }

/* insights: side cards */
.ins-fl { display: grid; gap: 0; }
.ins-fl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ins-fl > div:last-child { border-bottom: 0; }
.ins-fl dt { color: var(--t2); font-size: 14px; }
.ins-fl dd { margin: 0; font-weight: 600; text-align: right; }
.ins-fl .ins-note { text-align: right; }
.ins-mail { padding: 14px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--bg); font-size: 13px; }
.ins-mail-s { color: var(--t1); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.ins-mail-s .faint { display: block; font-weight: 500; font-size: 12px; }
.ins-mail-k { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; padding: 10px 0; border-block: 1px solid var(--line); }
.ins-mail-k > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ins-mail-k .faint { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-mail-k b { font-size: 16px; font-weight: 650; }
.ins-mail-l { padding-left: 18px; list-style: decimal; color: var(--t2); }
.ins-mail-l li + li { margin-top: 6px; }
.ins-digest-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ins-digest-a form { display: contents; }
.ins-how { display: flex; flex-direction: column; gap: 10px; color: var(--t2); font-size: 13px; line-height: 1.5; }
.ins-how li { display: flex; gap: 10px; align-items: flex-start; }
.ins-how .ic { flex: none; margin-top: 2px; color: var(--t3); }

/* insights: milestones */
.ins-mss { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ins-ms { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--line); }
.ins-ms.new { background: var(--s2); border-color: var(--line3); }
.ins-ms.next { border-style: dashed; border-color: var(--line2); background: transparent; }
.ins-ms-i { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--s3); border: 1px solid var(--line2); color: var(--t1); }
.ins-ms.new .ins-ms-i { background: var(--t1); color: var(--ink); border-color: var(--t1); }
.ins-ms-t { font-size: 14px; font-weight: 600; line-height: 1.3; }
.ins-ms-d { margin-top: 2px; color: var(--t3); font-size: 12px; }
.ins-ms-g { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; }
.ins-new { color: var(--t1); font-weight: 600; }

/* goals: layout and the list */
.goal-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .goal-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; } }
.goal-mainc, .goal-side { min-width: 0; }
.goal-side { scroll-margin-top: 96px; }
.goal-head { display: none; }
.goal-rows { display: flex; flex-direction: column; }
.goal-row { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 10px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line); }
.goal-rows.rev .goal-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.goal-main { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 36px; border-radius: var(--r-sm); }
.goal-rows.edit .goal-main { padding-right: 44px; }
.goal-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--s4); color: var(--t2); }
.goal-name { display: flex; flex-direction: column; min-width: 0; }
.goal-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-p { color: var(--t3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { a.goal-main:hover .goal-n { text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; } }
.goal-c { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.goal-c b { font-weight: 650; font-variant-numeric: tabular-nums; }
.goal-lbl { color: var(--t3); font-size: 11px; font-weight: 500; }
.goal-x { position: absolute; top: 8px; right: 6px; }
.goal-rate { display: flex; flex-direction: column; }
.goal-rate .num { font-weight: 650; }
.goal-range { color: var(--t3); font-size: 12px; white-space: nowrap; }
@media (min-width: 720px) {
  .goal-head { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(88px, 1fr)) 44px; gap: 12px; padding: 0 16px 8px; color: var(--t3); font-size: 12px; font-weight: 500; }
  .goal-head.rev { grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(88px, 1fr)) 44px; }
  .goal-head:not(.edit) { grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(88px, 1fr)); }
  .goal-head.rev:not(.edit) { grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(88px, 1fr)); }
  .goal-head > span:not(:first-child) { text-align: right; }
  .goal-row, .goal-rows.rev .goal-row { grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(88px, 1fr)) 44px; padding: 10px 16px; }
  .goal-rows.rev .goal-row { grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(88px, 1fr)) 44px; }
  .goal-rows:not(.edit) .goal-row { grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(88px, 1fr)); }
  .goal-rows.rev:not(.edit) .goal-row { grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(88px, 1fr)); }
  .goal-row { align-items: center; }
  .goal-main, .goal-rows.edit .goal-main { grid-column: auto; padding-right: 0; }
  .goal-x { position: static; margin: 0 -10px 0 0; }
  .goal-c { align-items: flex-end; text-align: right; }
  .goal-lbl { display: none; }
  .goal-rate { align-items: flex-end; }
}
.card.goal-card > .card-h { padding-bottom: 14px; }

/* goals: the form and suggestions */
.goal-form form { display: flex; flex-direction: column; gap: 14px; }
.goal-form .choices { margin: 0; }
.goal-revenue[data-hide] { display: none; }
.goal-sugg { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.goal-sugg-h { margin: 10px 0 8px; color: var(--t3); font-size: 12px; font-weight: 500; }
.goal-sugg-h:first-child { margin-top: 0; }
.goal-sugg .chip.mono { font-family: var(--mono); font-size: 12px; }
.goal-del { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.goal-form form.goal-del { display: block; }
.goal-narrow { max-width: 720px; }

/* goals: funnel cards */
.goal-fh { margin-bottom: 12px; }
.goal-fh .section-t { margin: 0 2px; }
.goal-mainc > .section { margin-top: 24px; }
a.card.goal-fcard { display: flex; flex-direction: column; gap: 12px; color: inherit; }
.goal-fcard .between .ic { color: var(--t3); }
.goal-ft { font-size: 16px; font-weight: 650; }
.goal-fs { margin-top: -8px; color: var(--t3); font-size: 13px; }
.goal-fgrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .goal-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.goal-segs { align-items: start; }
.ir-tbl tbody th { padding: 12px; border-bottom: 1px solid var(--line); color: var(--t1); font-size: 14px; font-weight: 500; text-align: left; white-space: nowrap; }
.ir-tbl tbody tr:last-child th { border-bottom: 0; }
.goal-mini { display: flex; flex-direction: column; gap: 6px; }
.goal-mini li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.goal-mini-l { color: var(--t2); }
.goal-mini-b { position: relative; height: 6px; border-radius: var(--pill); background: rgba(255, 255, 255, .06); overflow: hidden; }
.goal-mini-b > span { position: absolute; inset: 0 auto 0 0; width: var(--w); min-width: 2px; border-radius: inherit; background: var(--t2); }
.goal-mini li.leak .goal-mini-l { color: var(--t1); }
.goal-mini-v { min-width: 44px; color: var(--t2); text-align: right; }
.goal-fk { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.goal-fk-v { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.goal-fk .delta { margin-left: auto; align-self: center; }

/* funnels: the page */
.goal-flayout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; margin-top: 16px; }
@media (min-width: 1100px) { .goal-flayout { grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; } }
.goal-steps { display: flex; flex-direction: column; }
.goal-step { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.goal-step-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; }
.goal-step-n { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--s4); border: 1px solid var(--line2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.goal-step-l { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.goal-step-d { color: var(--t3); font-size: 12px; font-weight: 400; }
.goal-step-v { font-size: 17px; font-weight: 650; }
.goal-step-p { min-width: 48px; color: var(--t3); font-size: 13px; text-align: right; }
.goal-step-bar { position: relative; display: block; height: 10px; margin-left: 38px; border-radius: var(--pill); background: rgba(255, 255, 255, .05); overflow: hidden; }
.goal-step-bar > span { position: absolute; inset: 0 auto 0 0; width: var(--w); min-width: 3px; border-radius: inherit; background: var(--accent); }
.goal-step:not(:first-child) .goal-step-bar > span { background: var(--t2); }
.goal-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 2px 0 2px 12px; padding: 8px 0 8px 26px; border-left: 1px dashed var(--line2); color: var(--t2); font-size: 13px; }
.goal-gap-a { display: none; }
.goal-gap b { color: var(--t1); }
.goal-gap.leak { border-left: 2px solid var(--t2); }
@media (prefers-reduced-motion: no-preference) { .goal-step-bar > span, .goal-mini-b > span { transform-origin: left; animation: grow-x 700ms var(--ease) backwards; } }
.goal-leaks .card-h { margin-bottom: 8px; }
.goal-leak-lead { color: var(--t2); line-height: 1.55; }
.goal-leak-lead b { color: var(--t1); }
.goal-leakl { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.goal-leak { padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line2); background: rgba(255, 255, 255, .02); font-size: 14px; }
.goal-leak.bad { border-color: rgba(255, 138, 125, .32); }
.goal-leak.good { border-color: rgba(99, 214, 162, .3); }
.goal-leak-t { margin-bottom: 2px; color: var(--t1); font-weight: 600; }
.goal-leak-none { margin-top: 12px; font-size: 14px; }
.goal-seg th[scope="row"] { font-weight: 500; text-align: left; white-space: nowrap; }
.goal-seg td.goal-flag { color: var(--bad); font-weight: 600; }

/* funnels: the form */
.goal-fform .choices .choice { min-width: 0; }
.goal-steps-f { margin: 0; padding: 0; border: 0; min-width: 0; }
.goal-steps-f legend { margin-bottom: 8px; padding: 0; color: var(--t1); font-size: 14px; font-weight: 600; }
.goal-srows { display: flex; flex-direction: column; gap: 10px; }
.goal-srow { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--s1); }
.goal-srow > .goal-step-n { margin-top: 30px; }
.goal-srow[data-extra][hidden] { display: none; }
.goal-sfields { display: grid; flex: 1; gap: 10px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .goal-sfields { grid-template-columns: 120px minmax(0, 1.4fr) minmax(0, 1fr); } }
.goal-sfields .field { margin: 0; }
.goal-addstep { margin-top: 10px; }
.goal-steps-f > .hint { margin-top: 10px; }

/* revenue */
.rev-kpis { margin-bottom: 16px; }
@media (min-width: 1100px) { .rev-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.rev-charts { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .rev-charts { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.rev-chart { position: relative; margin-top: 22px; outline-offset: 6px; }
.rev-plot { position: relative; height: 200px; }
@media (min-width: 760px) { .rev-plot { height: var(--h, 220px); } }
.rev-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rev-yl span { position: absolute; left: 0; transform: translateY(-100%); padding: 0 0 3px; color: var(--t3); font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1.2; pointer-events: none; }
.rev-xl { position: relative; height: 18px; margin-top: 8px; }
.rev-xl span { position: absolute; top: 0; transform: translateX(-50%); color: var(--t3); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rev-xl span.first { transform: none; }
.rev-xl span.last { transform: translateX(-100%); }
.rev-cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line3); pointer-events: none; }
.rev-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); pointer-events: none; }
.rev-chart .ch-tip { top: 0; }
.rev-bars { position: relative; }
.rev-bars svg { display: block; width: 100%; height: 200px; }
@media (min-width: 760px) { .rev-bars svg { height: 220px; } }
.rev-bars .ch-bar { fill: var(--s5); }
@media (hover: hover) { .rev-bars .ch-bar:hover { fill: var(--accent); } }
.rev-pad { padding: 0 6px 10px; }
.rev-rpv { display: flex; flex-direction: column; gap: 4px; }
.rev-rpv li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: center; gap: 12px; min-height: 40px; font-size: 14px; }
.rev-rpv-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rev-rpv-l .ic { color: var(--t3); flex: none; }
.rev-rpv-b { position: relative; height: 14px; border-radius: var(--pill); background: rgba(255, 255, 255, .04); }
.rev-rpv-r { position: absolute; top: 3px; bottom: 3px; min-width: 2px; border-radius: var(--pill); background: rgba(255, 255, 255, .16); }
.rev-rpv-m { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--accent); }
.rev-rpv-avg { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1px dashed var(--t3); }
.rev-rpv-v { display: flex; flex-direction: column; align-items: flex-end; font-weight: 600; }
.rev-rpv-v .faint { font-size: 11px; font-weight: 500; }
.rev-legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; }
.rev-key-avg { display: inline-block; width: 0; height: 12px; border-left: 1px dashed var(--t3); }
.rev-trial { margin-bottom: 8px; }
.rev-tb { display: flex; height: 12px; border-radius: var(--pill); overflow: hidden; background: rgba(255, 255, 255, .05); }
.rev-tb > span { height: 100%; }
.rev-tb .paid, .rev-tl i.paid { background: var(--accent); }
.rev-tb .lost, .rev-tl i.lost { background: var(--s5); }
.rev-tb .open, .rev-tl i.open { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .22) 0 3px, transparent 3px 6px); }
.rev-tl { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; color: var(--t2); font-size: 12px; }
.rev-tl span { display: inline-flex; align-items: center; gap: 6px; }
.rev-tl i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.rev-tt { margin-top: 12px; }
.rev-attr { margin: 12px 0; font-size: 14px; line-height: 1.55; }
.rev-conn-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rev-connect-l { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
@media (min-width: 1100px) { .rev-connect-l { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.rev-connect .rev-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; color: var(--t2); font-size: 14px; }
.rev-steps li { display: flex; align-items: flex-start; gap: 10px; }
.rev-steps b { color: var(--t1); }
.rev-steps a { color: var(--t1); text-decoration: underline; text-decoration-color: var(--line3); text-underline-offset: 3px; }
.goal-formlayout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .goal-formlayout { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 24px; } .goal-help { position: sticky; top: calc(var(--hdr) + 64px); } }
.rev-n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--s4); color: var(--t1); font-size: 12px; font-weight: 600; }
.rev-connect form { display: flex; flex-direction: column; gap: 12px; }
/* ---- INSIGHTS+REVENUE end */

/* ==========================================================================
   INTEGRATOR (int-): small fixes found walking the whole product
   ========================================================================== */
/* the install page's "we saw a visit from another host" hint sits under the waiting orb */
.acc-refused { margin-top: 16px; text-align: left; }
/* phones: the demo header has the ribbon below, so the small "Demo" tag can go */
@media (max-width: 479px) {
  .hdr .badge.demo { display: none; }
}
/* the shared view has no site switcher in its header, so its title stays visible on phones */
@media (max-width: 759px) {
  .dash-title.shared { position: static !important; width: auto; height: auto; overflow: visible; clip-path: none; flex-wrap: wrap; row-gap: 4px; margin-bottom: 12px; }
  .dash-title.shared h1 { font-size: 22px; }
}
/* insights: the Monday email is on */
.ins-weekly-on { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--t3); font-size: 13px; }
.ins-weekly-on .ic { color: var(--good, currentColor); flex: none; }

/* ---------------------------------------------------------------- review fixes (Dec 1): phone glance screen and more */
.dash-rl-s { display: none; }
.dash-ins-span { margin-left: 8px; color: var(--t3); font-size: 12px; font-weight: 450; letter-spacing: 0; }
.dash-nohist { color: var(--t3); }
.dash-mx { position: relative; z-index: 1; flex: none; margin: -8px -8px -8px 0; }
.dash-top { display: flex; flex-direction: column; }
.ins-more { margin-top: 12px; }
.ins-more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; color: var(--t2); font-size: 14px; font-weight: 550; cursor: pointer; list-style: none; }
.ins-more > summary::-webkit-details-marker { display: none; }
.ins-more[open] > summary .ic { transform: rotate(180deg); }
.ins-more > .ins-grid { margin-top: 8px; }
@media (max-width: 759px) {
  .dash-ins-span { display: block; margin: 2px 0 0; }
}
@media (max-width: 639px) {
  /* the glance screen: the numbers first, then one compact line for a milestone, then what changed */
  .dash-top > .dash-kpis { order: -1; margin-bottom: 16px; }
  .dash-moment { padding: 8px 8px 8px 14px; min-height: 48px; gap: 10px; margin-bottom: 12px; }
  .dash-moment p { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dash-moment .dash-mb { display: none; }
  .dash-moment .horizon { display: none; }
  .dash-ins-row { align-items: start; }
  .dash-rl-f { display: none; }
  .dash-rl-s { display: inline; }
}
@media (max-width: 479px) {
  .dash-shift { display: none; }
  .dash-cmp > summary.btn { width: auto; padding: 0 10px; }
  .dash-cl { display: inline; font-size: 13px; }
}
.rev-bplot { position: relative; }
.rev-bplot .rev-yl span, .rev-plot .rev-yl span { padding: 0 6px 2px 0; background: var(--s1); border-radius: 0 0 6px 0; }
.rev-tt-note { margin-top: 8px; font-size: 12px; }
.acc-site-m { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; color: var(--t2); font-size: 13px; }
.acc-site-m strong { color: var(--t1); font-weight: 600; }
/* install on phones: the snippet comes first and wraps instead of scrolling sideways; the platform tabs fade at the edge */
.acc-install .code pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 759px) {
  .acc-plats { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); padding-right: 28px; }
}
/* insight numbers: label, value and note each share one row across the columns, so they line up even when one wraps */
.ins-nums { align-items: start; }
@supports (grid-template-rows: subgrid) {
  .ins-nums > div { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
  .ins-nums dt { align-self: end; }
}
@media (max-width: 759px) { .goal-addtop { display: none; } }
/* the setup checklist for a new site (dashboard) */
.dash-setup { margin-top: 16px; }
.dash-setup ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .dash-setup ol { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dash-setup li a, .dash-setup li > span { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--s1); color: var(--t1); font-size: 14px; font-weight: 550; }
.dash-setup li a:hover { border-color: var(--line3); }
.dash-setup li.done > span { color: var(--t3); font-weight: 450; text-decoration: line-through; text-decoration-color: var(--line3); }
.dash-setup .dash-setup-n { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line3); color: var(--t2); font-size: 12px; }
.dash-setup li.done .dash-setup-n { background: var(--t1); color: var(--bg); border-color: var(--t1); }
@media (max-width: 759px) { .dash-sec-h h2 { flex-wrap: wrap; } .dash-ins-span { flex-basis: 100%; margin: 0 0 0 26px; } }
