/* ============================================================
   LinkOS UI v3 — theme layer.

   Loaded after app.css and deliberately overrides it.
   Fonts are loaded by <link> in the document head (not @import here):
   an @import inside a stylesheet serialises the font request behind the
   CSS request, which delays first paint.

   Every animation is disabled under prefers-reduced-motion.
   ============================================================ */

/* ============================================================
   LinkOS — SIGNAL tokens.
   Drop-in replacement for polish.css lines 14-95 (the :root and
   html[data-theme=dark] blocks). Every legacy variable name is kept
   and aliased, so the remaining ~68KB of polish.css keeps working
   unchanged; new rules use the richer names.

   Contrast is stated against the surface the text is ACTUALLY drawn
   on, measured, not estimated. Floor for any text is 4.5:1.
   ============================================================ */

:root{
  --ease: cubic-bezier(.16,.84,.44,1);
  --ease-soft: cubic-bezier(.4,0,.2,1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  /* ---- neutral ramp: four real steps, not four shades of almost-white ---- */
  --bg:#e8edf7;          /* page ground — cool, so white cards are objects   */
  --surface:#ffffff;     /* 1.17:1 against --bg (was 1.06:1)                 */
  --surface-2:#eff3fa;   /* recessed: tool zones, sidebar, inert panels      */
  --surface-3:#e2e9f5;   /* raised chrome: code, thumbnails, inset wells     */
  --border:#d5dfee;      /* 1.34:1 on --surface                              */
  --border-strong:#b3c2da;/* 1.80:1 on --surface — real edges                */

  --ink:#0e1626;         /* 18.08:1 on surface · 15.40:1 on bg               */
  --ink-2:#3a475f;       /*  9.35:1 on surface ·  7.96:1 on bg               */
  --muted:#5b6880;       /*  5.62:1 surface · 4.79:1 bg · 4.61:1 surface-3   */

  /* ---- SEMANTIC FAMILIES ----------------------------------------
     Each family is five roles and you take the whole set:
       X          solid fill: bars, dots, sparklines, filled buttons
       X-ink      text and icons (on white AND on X-tint / X-wash)
       X-tint     chip / badge / icon-square background
       X-wash     whole-row and whole-zone background
       X-line     border of a tinted zone
     ---------------------------------------------------------------- */

  /* ACCENT — identity + primary action + "this is the selected thing" */
  --accent:#2563eb;          /* unchanged: the product's anchor        */
  --accent-h:#1d4ed8;
  --accent-ink:#1a3fa8;      /* 9.05:1 white · 7.65:1 tint · 8.36:1 wash */
  --accent-tint:#e4ecff;     /* 1.18:1 vs surface                       */
  --accent-wash:#f2f6ff;     /* 1.08:1 vs surface — row hover / zone    */
  --accent-line:#bcd0fb;
  --on-accent:#ffffff;       /* 5.17:1 on --accent                      */

  /* POSITIVE — live, active, published, up, verified, within quota */
  --ok:#0b7d52;             /* white text on it = 5.16:1               */
  --ok-ink:#06643f;         /* 7.24:1 white · 6.15:1 tint · 6.70:1 wash */
  --ok-tint:#dbf2e6;
  --ok-wash:#edf9f2;
  --ok-line:#a3ddc0;

  /* CAUTION — paused, pending, near quota, needs attention, preview */
  --warn:#d97706;           /* NEVER carries white text: only 3.19:1   */
  --warn-ink:#8a5104;       /* 6.44:1 white · 5.53:1 tint · 5.99:1 wash */
  --warn-tint:#fbecd2;
  --warn-wash:#fdf6e7;
  --warn-line:#eecb87;

  /* CRITICAL — down, failed, spam/suspicious, over quota, deleted */
  --danger:#dc2626;         /* white text on it = 4.83:1               */
  --danger-ink:#b01c14;     /* 6.95:1 white · 5.86:1 tint · 6.25:1 wash */
  --danger-tint:#fce7e6;
  --danger-wash:#fdf0ef;
  --danger-line:#f2b9b6;

  /* INSIGHT — AI summaries, computed reads, anything derived not measured */
  --viz:#6d4df0;            /* white text on it = 5.29:1               */
  --viz-ink:#5230c4;        /* 8.14:1 white · 6.65:1 tint · 7.38:1 wash */
  --viz-tint:#eae5ff;
  --viz-wash:#f5f2ff;
  --viz-line:#ccc0fb;

  /* ---- series palette: INSIDE CHARTS ONLY.
     Never on nav icons, never on KPI tiles, never on chrome.
     These compare values; they do not carry state. ---- */
  --s1:#2563eb; --s2:#6d4df0; --s3:#0d9488; --s4:#d97706;
  --s5:#db2777; --s6:#0891b2; --s7:#65a30d; --s8:#c026d3;

  /* ---- brand: IDENTITY ONLY. See rule 3. ---- */
  --brand:#2563eb; --brand-ink:#0b1220;

  --radius:12px; --radius-sm:9px; --radius-pill:99px;

  /* deepened so a card reads as an object at rest, not only on hover */
  --shadow-1:0 1px 2px rgba(14,22,38,.07), 0 3px 8px rgba(14,22,38,.06);
  --shadow-2:0 4px 14px rgba(14,22,38,.10), 0 2px 5px rgba(14,22,38,.05);
  --shadow-3:0 14px 34px rgba(14,22,38,.14), 0 4px 10px rgba(14,22,38,.06);
  --shadow-4:0 24px 60px rgba(14,22,38,.20);
  --ring:0 0 0 3px var(--accent-line);

  /* ---- legacy aliases: keep the existing 68KB of rules working ---- */
  --surface2:var(--surface-2);
  --raised:var(--surface-3);
  --ink2:var(--ink-2);
  --accent-soft:var(--accent-tint);
  --accent-glow:rgba(37,99,235,.14);
  --ok-soft:var(--ok-tint);
  --warn-soft:var(--warn-tint);
  --danger-soft:var(--danger-tint);
  --shadow:var(--shadow-1);
  --c1:var(--s1); --c2:var(--s2); --c3:var(--s3); --c4:var(--s4);
  --c5:var(--s5); --c6:var(--s6); --c7:var(--s7); --c8:var(--s8);
}

html[data-theme=dark]{
  /* Authored, not inverted. In light a semantic zone SINKS (wash darker
     than the card); in dark it LIFTS (wash lighter than the card).
     Every value below is its own hex, chosen against #131a28. */

  --bg:#0a0f19;
  --surface:#131a28;      /* 1.10:1 above --bg                          */
  --surface-2:#0f1522;    /* recessed BELOW the card, not above it      */
  --surface-3:#1c2537;
  --border:#26314a;       /* 1.34:1 on --surface                        */
  --border-strong:#3d4a66;/* 1.96:1 on --surface                        */

  --ink:#e9eefa;          /* 14.99:1 on surface · 16.50:1 on bg         */
  --ink-2:#adbad0;        /*  8.88:1 on surface                         */
  --muted:#8492aa;        /*  5.53:1 surface · 4.87:1 surface-3         */

  --accent:#6ea0f8;
  --accent-h:#8ab4fa;
  --accent-ink:#a8c6fd;   /* 10.08:1 surface · 8.00:1 tint · 8.62:1 wash */
  --accent-tint:#1a2c50;  /* 1.26:1 vs surface                          */
  --accent-wash:#1b2740;  /* 1.17:1 vs surface                          */
  --accent-line:#2c4370;
  --on-accent:#08111f;    /* 7.25:1 on --accent (white would be 2.8:1)  */

  --ok:#34d399;           /* --on-accent-style dark ink on it = 9.84:1  */
  --ok-ink:#5fe3b0;       /* 10.86:1 surface · 8.27:1 tint · 8.88:1 wash */
  --ok-tint:#10362b;
  --ok-wash:#133024;
  --ok-line:#1e5240;

  --warn:#f5b13f;
  --warn-ink:#f8c66f;     /* 11.03:1 surface · 8.57:1 tint · 9.64:1 wash */
  --warn-tint:#3a2c15;
  --warn-wash:#2e2415;
  --warn-line:#57411c;

  --danger:#f87171;       /* dark ink on it = 6.84:1                    */
  --danger-ink:#fb9c9c;   /*  8.57:1 surface · 7.23:1 tint · 7.67:1 wash */
  --danger-tint:#421d21;
  --danger-wash:#331e21;
  --danger-line:#5f2a2f;

  --viz:#a78bfa;
  --viz-ink:#c0adfd;      /*  8.82:1 surface · 7.28:1 tint · 7.84:1 wash */
  --viz-tint:#2c234f;
  --viz-wash:#261f42;
  --viz-line:#40336b;

  /* series lifted for a dark ground — same hue order, readable as fills */
  --s1:#60a5fa; --s2:#a78bfa; --s3:#2dd4bf; --s4:#fbbf24;
  --s5:#fb7185; --s6:#22d3ee; --s7:#a3e635; --s8:#e879f9;

  --brand:#6ea0f8; --brand-ink:#eaeff8;

  --shadow-1:0 1px 2px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.35);
  --shadow-2:0 4px 14px rgba(0,0,0,.52);
  --shadow-3:0 16px 40px rgba(0,0,0,.60);
  --shadow-4:0 28px 70px rgba(0,0,0,.72);
  --ring:0 0 0 3px rgba(110,160,248,.35);
  --accent-glow:rgba(110,160,248,.20);

  color-scheme:dark;
}
html[data-theme=light]{color-scheme:light}

/* ============================================================
   The semantic layer itself. Paste after the tokens.
   One state class drives chip, icon, number, row and zone.
   ============================================================ */

/* state carriers — put ONE of these on a .kpi, .card, .chip or <tr> */
.is-good   { --st:var(--ok);     --st-ink:var(--ok-ink);     --st-tint:var(--ok-tint);     --st-wash:var(--ok-wash);     --st-line:var(--ok-line) }
.is-warn   { --st:var(--warn);   --st-ink:var(--warn-ink);   --st-tint:var(--warn-tint);   --st-wash:var(--warn-wash);   --st-line:var(--warn-line) }
.is-bad    { --st:var(--danger); --st-ink:var(--danger-ink); --st-tint:var(--danger-tint); --st-wash:var(--danger-wash); --st-line:var(--danger-line) }
.is-info   { --st:var(--accent); --st-ink:var(--accent-ink); --st-tint:var(--accent-tint); --st-wash:var(--accent-wash); --st-line:var(--accent-line) }
.is-insight{ --st:var(--viz);    --st-ink:var(--viz-ink);    --st-tint:var(--viz-tint);    --st-wash:var(--viz-wash);    --st-line:var(--viz-line) }
.is-idle   { --st:var(--muted);  --st-ink:var(--muted);      --st-tint:var(--surface-3);   --st-wash:var(--surface-2);   --st-line:var(--border) }

/* chips: same markup, now driven by state */
.chip{display:inline-block;font-size:11.5px;font-weight:600;line-height:1.5;
      border-radius:var(--radius-pill);padding:2px 9px;white-space:nowrap;
      background:var(--st-tint,var(--surface-3));color:var(--st-ink,var(--muted))}
.chip.ok  {background:var(--ok-tint);color:var(--ok-ink)}
.chip.warn{background:var(--warn-tint);color:var(--warn-ink)}
.chip.bad {background:var(--danger-tint);color:var(--danger-ink)}
.chip.mut {background:var(--surface-3);color:var(--muted)}

/* KPI tiles — colour by meaning, NOT by nth-child */
.kicon{background:var(--st-tint,var(--accent-tint));color:var(--st-ink,var(--accent-ink))}
.kpi.is-lead .kval{font-size:var(--t-display);color:var(--ink)}
.kpi.is-good .kval,.tr-up  {color:var(--ok-ink)}
.kpi.is-bad  .kval,.tr-down{color:var(--danger-ink)}
.kpi.is-warn .kval{color:var(--warn-ink)}

/* whole-row state — the payoff of the whole system */
.tbl tr.is-warn td{background:var(--warn-wash)}
.tbl tr.is-bad  td{background:var(--danger-wash)}
.tbl tr.is-good td{background:var(--ok-wash)}
.tbl tr.is-idle td{background:var(--surface-2);color:var(--ink-2)}
.tbl tr:hover td{background:var(--accent-wash)}

/* zones: recessed tool panel vs the answer card */
.card{background:var(--surface);border:1px solid var(--border);
      border-radius:var(--radius);box-shadow:var(--shadow-1);
      padding:18px 20px;margin-bottom:24px}
.card.tool{background:var(--surface-2);box-shadow:none;border-color:var(--border)}
.card.lead{border-color:var(--border-strong);box-shadow:var(--shadow-2)}
.card.zone{background:var(--st-wash);border-color:var(--st-line);box-shadow:none}
.grid2,.grid3{gap:20px}

/* ghosts get a body — no more transparent icons floating on white */
.ghost{background:var(--surface-2);border:1px solid var(--border);color:var(--ink-2)}
.ghost:hover{background:var(--surface-3);border-color:var(--border-strong);color:var(--ink)}
.ghost.danger{color:var(--danger-ink);background:var(--danger-wash);border-color:var(--danger-line)}

/* brand: identity only, fixed 9px geometry, never a surface or text */
.bdot,.brandchip::before{width:9px;height:9px;border-radius:50%;
  background:var(--brandc,var(--border-strong));flex:0 0 auto}
.brandchip{color:var(--ink-2)}   /* the LABEL is ink; only the dot is brand */

/* The canvas colour lives on <html> so the fixed ambient layer below can sit
   between it and the content. (Painting it on <body> hid that layer entirely.) */
html{background:var(--bg);transition:background .3s var(--ease-soft)}
body{
  background:transparent;
  font-family:var(--font);
  font-feature-settings:'cv02','cv03','cv04','ss01';
  letter-spacing:-.006em;
  transition:color .3s var(--ease-soft);
}
.mono,code,pre,.docpre{font-family:var(--mono)}
.num,.kval,.dnum,.price{font-variant-numeric:tabular-nums;font-feature-settings:'tnum'}
::selection{background:var(--accent-soft);color:var(--accent-ink)}

/* type scale */
h1{font-size:20px;font-weight:700;letter-spacing:-.022em}
h2{font-size:17px;font-weight:600;letter-spacing:-.015em}
h3{font-size:15px;line-height:1.35;font-weight:700;letter-spacing:-.012em;color:var(--ink);text-transform:none}
.sub,.muted{color:var(--muted)}

/* scrollbars — thin and theme-aware instead of the OS default slab */
*{scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:99px;border:3px solid transparent;background-clip:content-box}
::-webkit-scrollbar-thumb:hover{background:var(--muted);background-clip:content-box}

/* ---------- ambient: one faint accent wash so the canvas isn't dead flat ---------- */
body::before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(58% 42% at 20% -6%, var(--accent-glow), transparent 66%),
    radial-gradient(46% 36% at 94% 2%, color-mix(in srgb, var(--viz) 22%, transparent), transparent 70%);
}

/* ============================================================
   ICONS — one stroked family at a fixed set of sizes.
   Everything here used to be Unicode glyphs pulled from a dozen
   different blocks, so weights and baselines never matched.
   ============================================================ */
.ic{display:block;flex:0 0 auto;stroke-width:1.75;overflow:visible}
/* solid variant, for ratings and "is default" markers */
.ic.fill{fill:currentColor}
button .ic,.btn .ic,.navitem .ic,.cmditem .ic{pointer-events:none}
/* denser strokes read better at the smallest size */
.ic[width="11"],.ic[width="12"]{stroke-width:2.1}

/* ---------- sidebar ---------- */
.side{
  background:var(--surface2);
  border-right:1px solid var(--border);
  padding-bottom:8px;
}
.logo{padding:20px 16px 14px;gap:11px;align-items:center}
.logo b{font-size:15px;font-weight:700;letter-spacing:-.02em}
.logo small{font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:600}
.logomark{
  width:32px;height:32px;border-radius:10px;display:grid;place-items:center;color:var(--on-accent);
  background:linear-gradient(145deg, var(--accent), var(--viz));
  box-shadow:0 4px 14px var(--accent-glow);
  transition:transform .35s var(--ease), box-shadow .35s var(--ease);
}
.logomark .ic{stroke-width:2.1}
.logo:hover .logomark{transform:rotate(-8deg) scale(1.07);box-shadow:0 8px 22px var(--accent-glow)}

.wsbox{padding:2px 12px 12px;gap:7px}
.wsbox select{
  height:34px;border-radius:9px;background:var(--surface);border-color:var(--border);
  font-weight:600;font-size:12.5px;color:var(--ink);
}

nav{padding:2px 10px}
.navhdr{
  font-size:10px;font-weight:700;letter-spacing:.1em;color:var(--muted);
  padding:16px 10px 6px;text-transform:uppercase;opacity:.8;
}
.navitem{
  position:relative;gap:10px;padding:7px 10px;border-radius:9px;
  font-size:13.5px;font-weight:500;color:var(--ink2);
  transition:background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.navitem:hover{background:var(--raised);color:var(--ink);transform:translateX(2px)}
.navitem.active{background:var(--accent-soft);color:var(--accent-ink);font-weight:600}
.navitem.active::before{
  content:"";position:absolute;left:-10px;top:50%;margin-top:-8px;
  width:3px;height:16px;border-radius:0 3px 3px 0;background:var(--accent);
  box-shadow:0 0 10px var(--accent-glow);
  animation:fadein .3s var(--ease) both;
}
/* nav glyphs sit in small tinted tiles so the rail reads as a column */
.nico{
  width:26px;height:26px;flex:0 0 26px;display:grid;place-items:center;
  border-radius:8px;background:var(--raised);color:var(--ink2);opacity:1;
  transition:background .2s var(--ease), transform .25s var(--ease), color .2s;
}
.navitem:hover .nico{transform:scale(1.07);color:var(--ink)}
/* a quiet hue per destination — enough to navigate by shape AND colour */
/* the active item keeps the accent treatment: state beats decoration */
.navitem.active .nico{color:var(--on-accent) !important}
.navitem.active .nico{background:var(--accent);color:var(--on-accent);box-shadow:0 3px 10px var(--accent-glow)}

.sidefoot{padding:10px 14px 4px}
.planchip{
  display:flex;align-items:center;gap:7px;width:100%;justify-content:center;
  background:var(--raised);color:var(--ink2);border:1px solid var(--border);
  border-radius:9px;padding:7px 10px;font-size:11.5px;font-weight:600;
}
.planchip::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--ok);box-shadow:0 0 0 3px var(--ok-soft)}

/* ---------- header ---------- */
.tophdr{
  padding:13px 26px;background:color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter:saturate(180%) blur(14px);backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--border);
}
.uemail{font-size:12px;color:var(--muted);font-weight:500}
#__themebtn{
  width:34px;height:34px;padding:0;border-radius:10px;background:var(--raised);
  border:1px solid var(--border);color:var(--ink2);display:grid;place-items:center;
}
#__themebtn:hover{background:var(--border);transform:none;color:var(--ink)}
#__themebtn .ic{grid-area:1/1;transition:opacity .25s var(--ease), transform .35s var(--ease)}
/* show the mode you would switch TO */
#__themebtn .i-sun{opacity:0;transform:rotate(-45deg) scale(.7)}
#__themebtn .i-moon{opacity:1}
html[data-theme=dark] #__themebtn .i-sun{opacity:1;transform:none}
html[data-theme=dark] #__themebtn .i-moon{opacity:0;transform:rotate(45deg) scale(.7)}

.kbd-hint{
  display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 10px;
  border:1px solid var(--border);border-radius:10px;background:var(--raised);
  font-size:12px;color:var(--muted);cursor:pointer;font-weight:500;
  transition:border-color .2s, color .2s, background .2s;
}
.kbd-hint:hover{border-color:var(--accent);color:var(--ink);background:var(--surface)}
.kbd-hint kbd{
  display:inline-flex;align-items:center;gap:1px;
  font-family:var(--font);font-size:10.5px;font-weight:600;background:var(--surface);
  border:1px solid var(--border);border-radius:5px;padding:2px 5px;color:var(--ink2);
}
.kbd-hint kbd .ic{stroke-width:2.2}

/* ---------- content entrance ---------- */
@keyframes rise{from{opacity:.001;transform:translateY(12px)}}
@keyframes fadein{from{opacity:0}}

/* app.css caps this at 1280px, which on a wide screen left everything hugging
   the left with a dead strip down the right. Use the whole width instead —
   the tables have the most to gain from it. */
.content{padding:24px 26px 60px;max-width:none}
.content>*{animation:rise .48s var(--ease) backwards}
.content>*:nth-child(1){animation-delay:.02s}
.content>*:nth-child(2){animation-delay:.07s}
.content>*:nth-child(3){animation-delay:.12s}
.content>*:nth-child(4){animation-delay:.17s}
.content>*:nth-child(n+5){animation-delay:.21s}
/* Nav deliberately does NOT animate in: it re-renders on every page load, and
   gating its visibility on an animation risks items never painting. */

/* ---------- cards ---------- */
.card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow-1);padding:18px 20px;
  transition:box-shadow .3s var(--ease), border-color .25s var(--ease);
}
.card:hover{box-shadow:var(--shadow-2);border-color:var(--border-strong)}
.card h3{margin-bottom:14px;display:flex;align-items:center;gap:8px}

/* ---------- stat tiles ---------- */
.kpis{gap:13px}
.kpi{
  position:relative;overflow:hidden;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--radius);
  padding:15px 16px 14px;box-shadow:var(--shadow-1);
  animation:rise .5s var(--ease) backwards;
  transition:transform .3s var(--ease), box-shadow .3s var(--ease), border-color .25s;
}
.kpis .kpi:nth-child(2){animation-delay:.06s}
.kpis .kpi:nth-child(3){animation-delay:.12s}
.kpis .kpi:nth-child(4){animation-delay:.18s}
.kpis .kpi:nth-child(5){animation-delay:.24s}
.kpi:hover{transform:translateY(-3px);box-shadow:var(--shadow-3);border-color:var(--border-strong)}
/* accent hairline that grows on hover */
.kpi::before{
  content:"";position:absolute;top:0;left:0;right:0;height:2px;
  background:linear-gradient(90deg,var(--accent),var(--viz));
  transform:scaleX(0);transform-origin:left;transition:transform .45s var(--ease);
}
.kpi:hover::before{transform:scaleX(1)}
.ktop{display:flex;align-items:center;gap:8px;margin-bottom:9px}
.kicon{
  width:27px;height:27px;flex:0 0 27px;border-radius:9px;display:grid;place-items:center;
  background:var(--accent-soft);color:var(--accent-ink);
}
/* a row of stat tiles reads better when each has its own hue */
.kpis .kpi:nth-child(1)::before{background:linear-gradient(90deg,var(--c1),var(--c2))}
.kpis .kpi:nth-child(2)::before{background:linear-gradient(90deg,var(--c2),var(--c6))}
.kpis .kpi:nth-child(3)::before{background:linear-gradient(90deg,var(--c3),var(--c7))}
.kpis .kpi:nth-child(4)::before{background:linear-gradient(90deg,var(--c4),var(--c5))}
.kpis .kpi:nth-child(5)::before{background:linear-gradient(90deg,var(--c6),var(--c1))}
.klabel{font-size:11.5px;font-weight:600;color:var(--muted);letter-spacing:.01em}
.kval{font-size:27px;font-weight:700;letter-spacing:-.03em;line-height:1.1;color:var(--ink)}
.ksub{font-size:11.5px;color:var(--muted);margin-top:5px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.kspark{position:absolute;right:0;bottom:0;width:96px;height:34px;opacity:.5;pointer-events:none}
.kpi:hover .kspark{opacity:.85}
.trend{
  display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:700;
  padding:3px 8px 3px 6px;border-radius:99px;
}
.trend .ic{stroke-width:2.4}
.trend.up{background:var(--ok-soft);color:var(--ok)}
.trend.down{background:var(--danger-soft);color:var(--danger)}
.trend.flat{background:var(--raised);color:var(--muted)}

/* ---------- "online now" tile ----------
   The dot is the whole signal: a slow pulse reads as live without the number
   needing to move. It stops under reduced-motion like everything else. */
.kpi.live .kicon{background:var(--ok-soft);color:var(--ok)}
.livedot{
  width:9px;height:9px;border-radius:50%;background:var(--ok);
  box-shadow:0 0 0 0 var(--ok-soft);
  animation:livePulse 2.4s var(--ease-soft) infinite;
}
@keyframes livePulse{
  0%{box-shadow:0 0 0 0 var(--ok-soft)}
  70%{box-shadow:0 0 0 8px transparent}
  100%{box-shadow:0 0 0 0 transparent}
}
.kpi.live::before{background:linear-gradient(90deg,var(--ok),var(--accent))}
/* a brief lift when the count actually changes */
.kpi.live.bump{animation:liveBump .5s var(--ease)}
@keyframes liveBump{40%{transform:translateY(-4px)}}
.kpi.live .kval{transition:color .3s var(--ease)}

/* ---------- buttons ---------- */
button,.btn{
  border-radius:9px;font-weight:600;font-size:13px;height:36px;
  font-family:var(--font);letter-spacing:-.005em;position:relative;overflow:hidden;
  transition:background .18s var(--ease), transform .18s var(--ease), box-shadow .25s var(--ease), border-color .2s, color .18s;
}
.btn:not(.secondary):not(.ghost){box-shadow:0 1px 2px rgba(13,21,36,.1), 0 4px 12px var(--accent-glow)}
.btn:not(.secondary):not(.ghost):hover{box-shadow:0 2px 4px rgba(13,21,36,.12), 0 8px 22px var(--accent-glow);transform:translateY(-1px)}
button:active,.btn:active{transform:translateY(0) scale(.975)}
.btn::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.24),transparent 65%);
  transform:translateX(-130%);transition:transform .65s var(--ease);
}
.btn:hover::after{transform:translateX(130%)}
.btn.secondary::after,.ghost::after{display:none}
.btn.secondary{background:var(--surface);border:1px solid var(--border);color:var(--ink);box-shadow:var(--shadow-1)}
.btn.secondary:hover{background:var(--raised);border-color:var(--border-strong)}
.btn.secondary.on{border-color:var(--accent);color:var(--accent-ink);background:var(--accent-soft)}
.ghost{border-radius:8px;color:var(--ink2)}
.ghost:hover{background:var(--raised);color:var(--ink)}
.ghost.danger{color:var(--danger)}
.ghost.danger:hover{background:var(--danger-soft);color:var(--danger)}
.mini{height:30px;font-size:12px;border-radius:8px;gap:5px}
button:disabled,.btn:disabled,button[disabled]{opacity:.45;cursor:not-allowed;transform:none !important;box-shadow:none}

/* Icon-only buttons are square, with a hit area larger than their box.
   This is driven by an explicit .iconly class, NOT by :has(> .ic:only-child):
   :only-child counts elements and ignores text nodes, so `Label<svg>` matched
   too and every label+icon button got squashed to 30px with its text clipped. */
.iconly{padding:0;width:30px;justify-content:center}
.mini.iconly{width:30px;height:30px}
.rowact .iconly::before{content:"";position:absolute;inset:-7px -3px;border-radius:10px}
/* a label alongside an icon must never wrap or be cut off */
button,.btn{white-space:nowrap}
.btn:not(.iconly),button:not(.iconly){min-width:max-content}

/* ---------- inputs ---------- */
/* Solid-accent buttons carry --on-accent instead of a hardcoded white: in dark
   mode the accent is a light tonal blue and white on it is only 2.8:1.
   These selectors deliberately MIRROR the ones in app.css that set the accent
   background, so every existing per-component override (.kbd-hint, .presbtn,
   .tplcard, .secondary, .ghost) keeps winning exactly as it did before. */
button,.btn{color:var(--on-accent)}
button:hover,.btn:hover{color:var(--on-accent)}

/* default checkboxes are 13px — too small to hit reliably, and untinted */
input[type=checkbox],input[type=radio]{
  width:16px;height:16px;accent-color:var(--accent);cursor:pointer;margin:0;
}

input,select,textarea{
  border-radius:9px;height:37px;font-family:var(--font);font-size:13.5px;
  border:1px solid var(--border);background:var(--surface);color:var(--ink);
  transition:border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s;
}
input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--border-strong)}
input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:var(--ring)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:.8}
input:disabled,select:disabled,textarea:disabled{opacity:.5;background:var(--raised);cursor:not-allowed}

/* ---------- tables ---------- */
.tbl th{
  font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;
  color:var(--muted);padding:9px 10px;border-bottom:1px solid var(--border);
  background:var(--surface);
}
.tbl td{padding:11px 10px;border-bottom:1px solid var(--border);font-size:13.5px;position:relative}
.tbl tr{transition:background .16s var(--ease)}
.tbl tbody tr:hover td,.tbl tr:hover td{background:var(--accent-soft)}
.tbl tr:hover td:first-child::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--accent);
}

/* ---------- domain wiring status ----------
   Colour alone never carries the meaning here: each state has its own wording,
   and the full explanation is in the title. */
.wirecell{white-space:nowrap}
.wirechip{
  display:inline-flex;align-items:center;gap:6px;
  font-size:11px;font-weight:700;letter-spacing:.01em;
  padding:4px 9px;border-radius:99px;white-space:nowrap;
}
.wirechip::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;flex:0 0 auto}
.wirechip.live{background:var(--ok-soft);color:var(--ok)}
.wirechip.reaches{background:var(--warn-soft);color:var(--warn)}
.wirechip.elsewhere{background:var(--warn-soft);color:var(--warn)}
.wirechip.tls{background:var(--danger-soft);color:var(--danger)}
.wirechip.unreachable{background:var(--danger-soft);color:var(--danger)}
.wirechip.checking{background:var(--raised);color:var(--muted)}
.wirechip.checking::before{animation:pulseSoft 1s var(--ease-soft) infinite}
.wirebtn{margin-left:5px;padding:0 7px;height:24px;font-size:11px;gap:4px}

/* ---------- team: roles + per-member access ---------- */
.permtbl td:first-child{font-size:13px}
.permyes{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:7px;background:var(--ok-soft);color:var(--ok)}
.permno{color:var(--muted);opacity:.55;font-weight:700}
.accbox{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:14px 2px 6px;align-items:start}
.accgrp b{font-size:12.5px;color:var(--ink)}
.accchecks{display:flex;flex-wrap:wrap;gap:7px 14px;margin-top:8px}
.acccheck{font-size:12.5px;gap:6px}
.acccheck .sub{font-size:10.5px;text-transform:uppercase;letter-spacing:.04em}
.accsave{grid-column:1/-1;display:flex;align-items:center;gap:12px;padding-top:6px;border-top:1px solid var(--border);margin-top:4px}
@media(max-width:900px){.accbox{grid-template-columns:1fr}}

/* ---------- analytics: activity heatmap ----------
   A fixed 5-step scale rather than a continuous gradient: steps are readable at
   a glance and do not imply more precision than hourly counts carry. */
.heatwrap{overflow-x:auto}
.heat{border-collapse:separate;border-spacing:2px;width:100%}
.heat th{font-size:10px;font-weight:600;color:var(--muted);padding:0;text-align:center;background:none;border:0;text-transform:none;letter-spacing:0}
.heat th:first-child{width:34px;text-align:right;padding-right:6px}
.heat th.hmute{color:transparent}
.heat td{height:16px;border-radius:3px;padding:0;border:0}
.hl0{background:var(--raised)}
.hl1{background:color-mix(in srgb,var(--accent) 26%,var(--raised))}
.hl2{background:color-mix(in srgb,var(--accent) 50%,var(--raised))}
.hl3{background:color-mix(in srgb,var(--accent) 74%,var(--raised))}
.hl4{background:var(--accent)}
.heatkey{display:flex;align-items:center;gap:5px;margin-top:10px;font-size:11px}
.heatkey i{width:14px;height:14px;border-radius:3px;display:inline-block}

/* ---------- analytics: share bars ---------- */
.sharerow{display:flex;align-items:center;gap:10px;margin-bottom:7px;font-size:12.5px}
.sharelbl{width:104px;flex:0 0 auto;color:var(--ink2);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sharebar{flex:1;height:8px;background:var(--raised);border-radius:99px;overflow:hidden}
.sharebar i{display:block;height:100%;border-radius:99px;transform-origin:left;
  background:var(--cat, var(--accent));animation:growX .8s var(--ease) both}
.sharepct{width:46px;text-align:right;font-variant-numeric:tabular-nums;font-weight:600;color:var(--ink)}
.sharen{width:56px;text-align:right;font-variant-numeric:tabular-nums;color:var(--muted)}

/* ---------- traffic map ----------
   Inline SVG, no tiles and no third-party script. Countries with no traffic stay
   visible as land rather than disappearing, so the map reads as a map. */
.wgrid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(230px,1fr);gap:14px;align-items:start}
.wmapwrap{background:var(--surface2);border:1px solid var(--border);border-radius:12px;padding:4px;overflow:hidden;min-width:0}
.wmap{display:block;width:100%;height:auto}
.wc{stroke:var(--surface);stroke-width:.6;vector-effect:non-scaling-stroke;transition:fill .25s var(--ease)}
.wc0{fill:var(--raised)}
.wc1{fill:color-mix(in srgb,var(--c1) 26%,var(--raised))}
.wc2{fill:color-mix(in srgb,var(--c1) 50%,var(--raised))}
.wc3{fill:color-mix(in srgb,var(--c1) 74%,var(--raised))}
.wc4{fill:var(--c1)}
.wc:hover{fill:var(--c4)}
.wside{min-width:0;display:flex;flex-direction:column;background:var(--surface2);border:1px solid var(--border);
  border-radius:12px;overflow:hidden}
.wsh{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;font-size:11px;font-weight:700;
  letter-spacing:.04em;text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--border)}
/* the list scrolls inside the card so a long tail never stretches the map */
.wlist{overflow-y:auto;max-height:330px;padding:8px 10px}
.wrow{display:flex;align-items:center;gap:8px;margin-bottom:7px;font-size:12px}
.wiso{width:22px;font-family:var(--mono);font-size:10.5px;font-weight:700;color:var(--muted);flex:none}
.wname{flex:1;min-width:0;color:var(--ink2);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wbar{width:46px;height:6px;background:var(--raised);border-radius:99px;overflow:hidden;flex:none}
.wbar i{display:block;height:100%;border-radius:99px;background:var(--c1);transform-origin:left;
  animation:growX .8s var(--ease) both}
.wn{font-variant-numeric:tabular-nums;font-weight:700;color:var(--ink);flex:none}
.wpc{width:32px;text-align:right;font-size:11px;color:var(--muted);flex:none;font-variant-numeric:tabular-nums}
.wkey{display:flex;align-items:center;gap:5px;margin-top:10px;font-size:11px;flex-wrap:wrap}
.wkey i{width:16px;height:12px;border-radius:3px;display:inline-block}
.wkey .wc1{background:color-mix(in srgb,var(--c1) 26%,var(--raised))}
.wkey .wc2{background:color-mix(in srgb,var(--c1) 50%,var(--raised))}
.wkey .wc3{background:color-mix(in srgb,var(--c1) 74%,var(--raised))}
.wkey .wc4{background:var(--c1)}
@media(max-width:900px){.wgrid{grid-template-columns:1fr}.wlist{max-height:220px}}

/* ---------- folding editor ----------
   0fr -> 1fr on a grid row animates to the content's real height, which
   max-height cannot do without guessing a number that will one day be wrong. */
.fold > h3.foldhead{display:flex;align-items:center;gap:8px;cursor:pointer;user-select:none;margin:0;
  padding:2px 0;border-radius:8px}
.fold > h3.foldhead:hover{color:var(--ink)}
.fold > h3.foldhead:focus-visible{outline:2px solid var(--c1);outline-offset:3px}
.fold-caret,.bc-caret{display:inline-flex;color:var(--muted);transition:transform .22s var(--ease);flex:none}
.fold.open > h3.foldhead .fold-caret,.blockcard.open .bc-caret{transform:rotate(90deg)}
.foldbody{display:grid;grid-template-rows:0fr;transition:grid-template-rows .26s var(--ease)}
.fold.open > .foldbody{grid-template-rows:1fr}
.foldinner{overflow:hidden;min-height:0}
.fold.open > .foldbody > .foldinner{padding-top:12px}

/* ---------- block cards ---------- */
.blockcard{border-left:3px solid transparent;transition:border-color .2s var(--ease),background .2s var(--ease)}
.blockcard.open{border-left-color:var(--c1);background:color-mix(in srgb,var(--c1) 4%,var(--surface))}
.bc-head{display:flex;align-items:center;gap:8px;cursor:pointer;user-select:none;min-width:0}
.bc-head:focus-visible{outline:2px solid var(--c1);outline-offset:2px;border-radius:8px}
.bc-sum{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:12px;color:var(--muted)}
.bc-empty{font-style:normal;opacity:.55}
/* the row tools stay put but only assert themselves on hover, so a long list of
   closed blocks reads as content rather than as a wall of buttons */
.bc-tools{display:flex;gap:2px;flex:none;opacity:.35;transition:opacity .18s var(--ease)}
.blockcard:hover .bc-tools,.blockcard.open .bc-tools,.bc-tools:focus-within{opacity:1}
.bc-body{display:grid;grid-template-rows:0fr;transition:grid-template-rows .24s var(--ease)}
.blockcard.open .bc-body{grid-template-rows:1fr}
.bc-inner{overflow:hidden;min-height:0}
.blockcard.open .bc-body > .bc-inner{padding-top:10px}
@media (prefers-reduced-motion: reduce){
  .foldbody,.bc-body,.fold-caret,.bc-caret,.bc-tools{transition:none}
}

/* ---------- help ---------- */
.helphead h2{display:flex;align-items:center;gap:9px;margin:0 0 6px}
.jumprow{display:flex;flex-wrap:wrap;gap:6px}
.jumpbtn{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:99px;
  border:1px solid var(--border);background:var(--surface2);color:var(--ink2);font-size:12.5px;
  font-weight:600;text-decoration:none;transition:all .18s var(--ease)}
.jumpbtn:hover{border-color:var(--c1);color:var(--c1);background:color-mix(in srgb,var(--c1) 8%,var(--surface2))}
.helpsec h3{display:flex;align-items:center;gap:8px}
.helpsec{scroll-margin-top:18px}
.qa{border-top:1px solid var(--border)}
.qa:first-of-type{border-top:0}
.qa-q{display:flex;align-items:flex-start;gap:9px;width:100%;text-align:left;background:none;border:0;
  padding:11px 2px;cursor:pointer;color:var(--ink);font-size:13.5px;font-weight:600;line-height:1.45}
.qa-q:hover{color:var(--c1)}
.qa-q:focus-visible{outline:2px solid var(--c1);outline-offset:2px;border-radius:8px}
.qa-caret{display:inline-flex;color:var(--muted);flex:none;margin-top:1px;
  transition:transform .2s var(--ease)}
.qa.open .qa-caret{transform:rotate(90deg);color:var(--c1)}
.qa-t{flex:1;min-width:0}
.qa-a{display:grid;grid-template-rows:0fr;transition:grid-template-rows .24s var(--ease)}
.qa.open .qa-a{grid-template-rows:1fr}
.qa-inner{overflow:hidden;min-height:0;color:var(--ink2);font-size:13px;line-height:1.65}
.qa.open .qa-a > .qa-inner{padding:0 2px 13px 25px}
.qa-inner code{font-family:var(--mono);font-size:12px;background:var(--raised);
  padding:1px 5px;border-radius:5px}
@media (prefers-reduced-motion: reduce){.qa-a,.qa-caret,.jumpbtn{transition:none}}

/* ---------- dashboard proportions ----------
   The chart card sits in a grid row with the taller Top-links card, so it is
   stretched to match. Letting the chart wrapper flex means it fills that height
   instead of leaving a void under a 300px line. */
.grid2.dashrow{align-items:start}
.grid2.dashrow>.card{margin-bottom:0}
.chartcard{display:flex; flex-direction:column}
.chartwrap{position:relative; flex:1 1 auto; display:flex;
  aspect-ratio:2.2/1; min-height:200px; max-height:340px}
.chartwrap>canvas{display:block; width:100%; align-self:stretch}

/* numbers in a column line up only if the figures are the same width */
.tbl td.num,.tbl th.num{font-variant-numeric:tabular-nums}

/* Recent links: the destination was eating the row. Give the short link and the
   numbers the room they need and let the destination take what is left. */
.tbl.recent{table-layout:fixed; width:100%}
.tbl.recent th:nth-child(1),.tbl.recent td:nth-child(1){width:30%}
.tbl.recent th:nth-child(2),.tbl.recent td:nth-child(2){width:auto}
.tbl.recent th:nth-child(3),.tbl.recent td:nth-child(3){width:88px}
.tbl.recent th:nth-child(4),.tbl.recent td:nth-child(4){width:96px}
.tbl.recent td.clip{max-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
@media(max-width:900px){
  .tbl.recent th:nth-child(2),.tbl.recent td:nth-child(2){display:none}
  .tbl.recent th:nth-child(1),.tbl.recent td:nth-child(1){width:auto}
}

/* ---------- QR preview ---------- */
.qrdlg{display:grid; gap:14px}
.qrdlg-head{display:flex; align-items:center; justify-content:space-between; gap:12px}
.qrdlg-head h3{margin:0}
/* white plate regardless of theme: a QR on a dark ground will not scan */
.qrframe{background:#fff; border:1px solid var(--border); border-radius:12px;
  padding:16px; display:grid; place-items:center; min-height:220px}
.qrframe img{display:block; width:100%; max-width:280px; height:auto; image-rendering:crisp-edges}
.qrfail{color:var(--danger,#c4231a); font-size:13px; text-align:center; padding:24px 12px}
.qrtarget{display:flex; align-items:center; gap:10px; background:var(--surface2);
  border:1px solid var(--border); border-radius:10px; padding:8px 10px; min-width:0}
.qrt-lab{font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--muted); flex:none}
.qrt-url{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-size:12.5px; color:var(--ink)}
.qrdl{display:flex; flex-wrap:wrap; gap:8px}
.qrdl .btn{flex:1 1 auto; justify-content:center}
@media(max-width:520px){.qrdl .btn{flex:1 1 100%}}

/* ---------- links table: trend + row actions ----------
   `.rowact` was display:flex ON the <td>. A flex td is no longer a table cell:
   vertical-align stops applying (so the buttons rode high against two-line
   rows) and it leaves the row's baseline box, which is what pushed the divider
   lines out of true on the right. The flex belongs on an inner wrapper. */
.tbl td.rowact{display:table-cell; vertical-align:middle; text-align:right;
  white-space:nowrap; overflow:visible}
.rowact-in{display:inline-flex; align-items:center; justify-content:flex-end; gap:6px}

/* four adjacent targets at 30px was tight, and short of the 44px touch guidance */
.tbl .rowact-in .mini{height:36px; min-width:36px; padding:0 9px; border-radius:9px}
.tbl .rowact-in .mini.iconly{padding:0; width:36px; justify-content:center}
/* Pages mixes text buttons (Preview, Publish) with icon ones — without this the
   row shows two different button heights side by side. */
.tbl .rowact-in .mini:not(.iconly){padding:0 11px}
.tbl .rowact-in .mini .ic{width:16px; height:16px}
@media (pointer:coarse){
  .tbl .rowact-in .mini{height:44px; min-width:44px}
  .tbl .rowact-in .mini.iconly{width:44px}
}

/* ---------- trend column ---------- */
/* 68px spark + 8px gap + the widest label ("-100%") + cell padding. At 132 the
   label had exactly nothing to spare and wrapped to three lines. */
/* the status chip is a fixed phrase: give it room rather than let it hyphenate */
.tbl td .chip{white-space:nowrap}
.tbl th.trendcol{width:156px}
.tbl td.trendcol{width:156px; vertical-align:middle}
.thsub{font-weight:400; opacity:.6; font-size:10.5px}
.tr{display:inline-flex; align-items:center; gap:8px}
.tr-spark{display:block; width:68px; height:22px; flex:none}
/* .kspark is absolutely positioned for the KPI-tile corner; in a table cell it
   has to sit in normal flow */
.tr-spark .kspark{position:static; width:68px; height:22px; display:block; opacity:1}
.tr-d{display:inline-flex; align-items:center; gap:2px; font-size:11.5px; font-weight:700;
  font-variant-numeric:tabular-nums; white-space:nowrap; flex:none}
.tr-up{color:var(--ok,#15803d)}
.tr-down{color:var(--danger,#c4231a)}
.tr-flat{color:var(--muted)}
.tr-none{color:var(--muted); opacity:.5}
@media(max-width:1100px){
  .tbl th.trendcol,.tbl td.trendcol{display:none}
}

/* ---------- invite ---------- */
.invlink{background:var(--surface2); border:1px dashed var(--border); border-radius:10px;
  padding:11px 13px; font-size:12px; color:var(--ink); word-break:break-all; line-height:1.5}
.authform{display:grid; gap:11px; margin-top:16px}
.authform label{display:grid; gap:5px; font-size:12.5px; font-weight:600; color:var(--ink2)}
.authform input{width:100%}
.authform input:disabled{opacity:.6}
.autherr{background:var(--danger-soft,#fdecec); color:var(--danger,#c4231a);
  border-radius:8px; padding:9px 12px; font-size:13px; margin-top:12px}

/* ---------- locations ---------- */
.locbar{display:block;width:100%;height:8px;background:var(--raised);border-radius:99px;overflow:hidden}
.locbar i{display:block;height:100%;border-radius:99px;background:var(--c3);
  animation:growX .8s var(--ease) both}
.locedit{display:inline-flex;align-items:center;gap:6px;padding:0 10px;height:30px;
  border:1px solid var(--border);border-radius:8px;background:var(--surface2);color:var(--muted)}
.locedit input{border:0;background:none;height:26px;width:170px;font-size:12.5px;
  color:var(--ink);padding:0}
.locedit input:focus{outline:none}
.locedit:focus-within{border-color:var(--c1)}

/* ---------- confirmation ---------- */
.cfm h3{margin:0 0 10px;font-size:17px}
.cfm p{margin:0;color:var(--ink2);line-height:1.6}
.cfm-note{margin-top:12px;padding:10px 13px;border-radius:9px;background:var(--surface2);
  border:1px solid var(--border);font-size:12.5px;color:var(--muted);line-height:1.55}
.cfm-act{display:flex;gap:9px;justify-content:flex-end;margin-top:20px}
.cfm-act .btn{min-width:104px;justify-content:center}
.cfm.danger h3{color:var(--danger,#c4231a)}

/* ---------- bulk action bar ----------
   Fixed to the bottom so it stays reachable however far down the list you are,
   and only present while something is selected. */
.bulkbar{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:60;
  max-width:min(720px,calc(100vw - 32px));animation:bulkin .22s var(--ease) both}
.bulkin{display:flex;align-items:center;gap:9px;padding:9px 10px 9px 16px;border-radius:14px;
  background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow-4,0 18px 44px -18px rgba(10,16,28,.5))}
.bulkn{display:grid;place-items:center;min-width:26px;height:26px;padding:0 7px;border-radius:8px;
  background:var(--c1);color:#fff;font-size:12.5px;font-weight:700;font-variant-numeric:tabular-nums}
.bulklab{font-size:13px;font-weight:600;color:var(--ink);white-space:nowrap}
.bulkin .btn{white-space:nowrap}
.tbl th.ckcol,.tbl td.ckcol{width:34px}
@keyframes bulkin{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}
@media(max-width:640px){
  .bulkbar{left:12px;right:12px;transform:none;max-width:none}
  .bulkin{flex-wrap:wrap}
  @keyframes bulkin{from{opacity:0}to{opacity:1}}
}
@media (prefers-reduced-motion:reduce){.bulkbar{animation:none}}

/* ---------- live search ----------
   A pulse while the real query is in flight, so the gap between the instant
   on-screen filter and the full result reads as work rather than a stall.
   NOTE: .livedot is already the dashboard's online-now dot — different thing. */
.searchdot{width:7px;height:7px;border-radius:50%;background:var(--c1);flex:none;align-self:center;
  animation:searchpulse 1s ease-in-out infinite}
@keyframes searchpulse{0%,100%{opacity:.25;transform:scale(.8)}50%{opacity:1;transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.searchdot{animation:none;opacity:.8}}

/* ---------- brand ----------
   --brand is deliberately NOT --c1. That variable is the first categorical
   colour in every chart and sparkline; the identity must not be able to move
   the data palette by being adjusted. */
:root{ --brand:#2563EB; --brand-ink:#0B1220; }
.logomark{background:var(--brand) !important;color:#fff;box-shadow:0 1px 2px rgba(11,18,32,.22)}
.logomark .bmark{display:block}
.logo b{letter-spacing:-.025em}

/* the slash between domain and slug, so the pair reads as one address */
.slugsep{color:var(--muted);font-weight:600;align-self:center;margin:0 -3px}

/* ---------- chips ---------- */
.chip{
  font-size:10.5px;font-weight:700;letter-spacing:.02em;padding:3px 9px;border-radius:6px;
  transition:transform .18s var(--ease);
}
.chip:hover{transform:translateY(-1px)}
.chip.ok{background:var(--ok-soft);color:var(--ok)}
.chip.warn{background:var(--warn-soft);color:var(--warn)}
.chip.mut{background:var(--raised);color:var(--muted)}
.flags{font-size:9px;padding:2px 5px;border-radius:5px;font-weight:700}

/* ---------- tabs ---------- */
.tabs{border-radius:10px;padding:3px;background:var(--raised);border:1px solid var(--border)}
.tab{border-radius:7px;font-size:12.5px;font-weight:600;padding:5px 13px;transition:all .2s var(--ease)}
.tab.on{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-1)}

/* ---------- empty states ---------- */
.empty{text-align:center;padding:38px 20px;color:var(--muted)}
.empty .eicon{
  width:52px;height:52px;margin:0 auto 14px;border-radius:16px;display:grid;place-items:center;
  background:var(--raised);color:var(--ink2);font-size:22px;
  animation:float 4s ease-in-out infinite;
}
.empty .eicon .ic{stroke-width:1.6}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
.empty b{display:block;color:var(--ink);font-size:15px;margin-bottom:5px;font-weight:600}
.empty p{margin:0 auto;max-width:340px;font-size:13px;line-height:1.55}

/* ---------- toast ---------- */
.toastmsg{
  animation:toastin .4s var(--ease) both;
  border-radius:11px;box-shadow:var(--shadow-4);
  padding:11px 16px;font-size:13px;font-weight:500;
  background:var(--ink);color:var(--bg);
  display:flex;align-items:center;gap:9px;
}
.toastmsg::before{content:"✓";font-weight:700;color:var(--ok)}
.toastmsg.err::before{content:"!";color:#fff}
.toastmsg.err{background:var(--danger);color:#fff}
@keyframes toastin{from{opacity:0;transform:translateY(16px) scale(.95)}}

/* ---------- modal ---------- */
.modalbg{animation:fadein .2s var(--ease) both;background:rgba(6,10,18,.6);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}
.modalbox{animation:modalin .34s var(--ease) both;border-radius:16px;box-shadow:var(--shadow-4);padding:24px}
@keyframes modalin{from{opacity:0;transform:translateY(16px) scale(.97)}}

/* ---------- command palette ---------- */
.cmdk{position:fixed;inset:0;z-index:60;display:grid;place-items:start center;padding-top:12vh;
  background:rgba(6,10,18,.55);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  animation:fadein .16s var(--ease) both}
.cmdbox{
  position:relative;width:min(560px,92vw);background:var(--surface);
  border:1px solid var(--border-strong);border-radius:15px;box-shadow:var(--shadow-4);
  overflow:hidden;animation:modalin .28s var(--ease) both;
}
.cmdsearch{position:absolute;left:18px;top:18px;color:var(--muted);pointer-events:none}
.cmdbox input{
  width:100%;height:52px;border:0;border-bottom:1px solid var(--border);border-radius:0;
  font-size:15px;padding:0 18px 0 46px;background:transparent;
}
.cmdbox input:focus{box-shadow:none;border-color:var(--border)}
.cmdlist{max-height:min(52vh,420px);overflow-y:auto;padding:7px}
.cmditem{
  display:flex;align-items:center;gap:11px;padding:9px 12px;border-radius:9px;
  cursor:pointer;font-size:13.5px;color:var(--ink2);
}
.cmditem .nico{width:26px;height:26px;flex:0 0 26px}
.cmditem .cmdsub{margin-left:auto;font-size:11px;color:var(--muted)}
.cmditem.sel{background:var(--accent-soft);color:var(--accent-ink)}
.cmditem.sel .nico{background:var(--accent);color:var(--on-accent)}
.cmdfoot{display:flex;gap:16px;padding:9px 14px;border-top:1px solid var(--border);font-size:11px;color:var(--muted)}
.cmdfoot span{display:inline-flex;align-items:center;gap:3px}
.cmdfoot kbd{font:inherit;font-weight:600;border:1px solid var(--border);border-radius:4px;padding:0 4px}
.cmdempty{padding:26px;text-align:center;color:var(--muted);font-size:13px}

/* ============================================================
   BRANDS — the grouping axis above domains. A brand owns several
   hostnames (link.x + landing.x), so the rail groups by brand and
   each row still shows which exact host it lives on.
   ============================================================ */
.brandrail{padding:12px 14px}
.brandbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.brandbar .preslabel{display:inline-flex;align-items:center;gap:6px;color:var(--ink2)}
.brandbtn{
  display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 12px 0 9px;
  border:1px solid var(--border);border-radius:10px;background:var(--surface);
  color:var(--ink2);font-size:13px;font-weight:600;text-decoration:none;
  box-shadow:var(--shadow-1);
  transition:transform .18s var(--ease), border-color .2s, box-shadow .25s var(--ease), background .2s;
}
.brandbtn:hover{text-decoration:none;transform:translateY(-1px);border-color:var(--border-strong);box-shadow:var(--shadow-2);color:var(--ink)}
.brandbtn.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-ink);box-shadow:0 0 0 3px var(--accent-soft)}
/* logos are supplied as artwork on white, so they keep their own plate */
/* fixed box + contain: the logos are wordmarks of differing aspect, and a
   lazily-loaded image with no intrinsic size would reflow the column on arrival */
.brandbtn img{
  width:52px;height:20px;object-fit:contain;background:#fff;
  border-radius:5px;padding:2px 3px;flex:0 0 auto;
}
.brandbtn .bnum{
  font-variant-numeric:tabular-nums;font-size:11.5px;font-weight:700;
  background:var(--raised);color:var(--muted);border-radius:99px;padding:2px 7px;
}
.brandbtn.on .bnum{background:var(--accent);color:var(--on-accent)}
.bdot{width:9px;height:9px;border-radius:50%;background:var(--brandc, var(--border-strong));flex:0 0 auto}
.brandchip{--dot:var(--brandc, var(--border-strong))}
.brandchip::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--dot);flex:0 0 auto}

/* row badge */
.brandchip{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--ink2);white-space:nowrap}
.brandchip img{width:38px;height:16px;object-fit:contain;background:#fff;border-radius:4px;padding:1px 2px;flex:0 0 auto}
.tbl td .brandchip{max-width:100%}
@media(max-width:1100px){
  /* the label is redundant next to the logo once space is tight */
  .tbl .brandchip span{display:none}
}

/* ============================================================
   INSIGHTS + BRAND STRIP — the "what should I look at" layer.
   Motion here is staggered and directional: cards rise in sequence
   so the eye reads them top-down, bars grow from their origin so the
   growth itself carries the meaning. All of it is transform/opacity
   only, and all of it is switched off under prefers-reduced-motion.
   ============================================================ */
@keyframes riseIn{from{opacity:0;transform:translateY(14px) scale(.985)}}
@keyframes slideIn{from{opacity:0;transform:translateX(-12px)}}
@keyframes growX{from{transform:scaleX(0)}}
@keyframes pulseRing{0%{box-shadow:0 0 0 0 var(--pulse)}70%{box-shadow:0 0 0 9px transparent}100%{box-shadow:0 0 0 0 transparent}}

/* ---------- traffic by brand ---------- */
.bstrip h3{margin-bottom:14px}
.bsgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.bscard{
  display:block;padding:13px 14px 12px;border:1px solid var(--border);border-radius:12px;
  background:var(--surface);color:var(--ink2);text-decoration:none;box-shadow:var(--shadow-1);
  animation:riseIn .5s var(--ease) both;animation-delay:calc(var(--i) * 60ms);
  transition:transform .28s var(--ease), box-shadow .28s var(--ease), border-color .2s;
}
.bscard:hover{text-decoration:none;transform:translateY(-3px);box-shadow:var(--shadow-3);border-color:var(--border-strong)}
.bscard:active{transform:translateY(-1px) scale(.99)}
.bshead{display:flex;align-items:center;gap:8px;margin-bottom:9px}
.bshead img{width:52px;height:20px;object-fit:contain;background:#fff;border-radius:5px;padding:2px 3px;flex:0 0 auto}
.bslabel{font-size:12.5px;font-weight:600;color:var(--ink)}
.bsval{font-size:23px;font-weight:700;letter-spacing:-.03em;color:var(--ink);font-variant-numeric:tabular-nums;line-height:1.15}
.bsbar{height:7px;border-radius:99px;background:var(--raised);overflow:hidden;margin:9px 0 7px}
.bsbar i{
  display:block;height:100%;width:var(--w);border-radius:99px;transform-origin:left;
  /* --cat is this brand's slot in the categorical palette, set per card */
  background:linear-gradient(90deg, var(--cat, var(--accent)), color-mix(in srgb, var(--cat, var(--accent)) 55%, var(--viz)));
  animation:growX .9s var(--ease) both;animation-delay:calc(var(--i) * 60ms + 120ms);
}
/* the real brand colour, used only as identity — never to encode a value */
.bscard{border-left:3px solid var(--brandc, var(--border))}
.bscard:hover{border-left-color:var(--brandc, var(--border-strong))}
.bsfoot{display:flex;justify-content:space-between;gap:8px;font-size:11.5px;color:var(--muted);font-variant-numeric:tabular-nums}

/* ---------- what needs attention ---------- */
.insights h3{margin-bottom:12px}
.inslist{display:flex;flex-direction:column;gap:9px}
.ins{
  display:flex;align-items:flex-start;gap:11px;padding:12px 13px;border-radius:11px;
  border:1px solid var(--border);border-left-width:3px;background:var(--surface2);
  animation:slideIn .42s var(--ease) both;animation-delay:calc(var(--i) * 55ms);
  transition:border-color .2s, background .2s, transform .2s var(--ease);
}
.ins:hover{transform:translateX(2px)}
.insico{
  width:28px;height:28px;flex:0 0 28px;border-radius:9px;display:grid;place-items:center;
}
.instext{flex:1;min-width:0}
.instext b{display:block;font-size:13.5px;font-weight:600;color:var(--ink);letter-spacing:-.01em}
.instext p{margin:3px 0 0;font-size:12.5px;line-height:1.5;color:var(--muted);max-width:74ch}
.insact{flex:0 0 auto;align-self:center;gap:3px}
.insact .ic{transition:transform .2s var(--ease)}
.insact:hover .ic{transform:translateX(2px)}

/* severity is carried by icon + wording as well as colour, never colour alone */
.ins-critical{border-left-color:var(--danger);background:var(--danger-soft)}
/* pulses three times to catch the eye on arrival, then stops — an alert that
   pulses forever stops registering as an alert and just annoys */
.ins-critical .insico{background:var(--danger-soft);color:var(--danger);--pulse:var(--danger-soft);animation:pulseRing 2.2s var(--ease-soft) 3}
.ins-warn{border-left-color:var(--warn);background:var(--warn-soft)}
.ins-warn .insico{background:var(--warn-soft);color:var(--warn)}
.ins-good{border-left-color:var(--ok);background:var(--ok-soft)}
.ins-good .insico{background:var(--ok-soft);color:var(--ok)}
.ins-info{border-left-color:var(--accent);background:var(--accent-soft)}
.ins-info .insico{background:var(--accent-soft);color:var(--accent-ink)}

/* active issue filter banner */
.issuebar{display:flex;align-items:center;gap:12px;padding:12px 14px;border-left:3px solid var(--warn)}
.issuebar b{font-size:13.5px;color:var(--ink)}
.issuebar .sub{font-size:12px}
.issuebar .btn{margin-left:auto;gap:4px}

/* ---------- table rows enter in sequence ----------
   Only the first rows animate: staggering 200 of them would cost more than it
   communicates, and rows below the fold are never seen entering anyway. */
.tbl tbody tr:nth-child(-n+12),
.tbl > tr:nth-child(-n+12){animation:riseIn .38s var(--ease) both}
.tbl tbody tr:nth-child(1),.tbl > tr:nth-child(1){animation-delay:.02s}
.tbl tbody tr:nth-child(2),.tbl > tr:nth-child(2){animation-delay:.05s}
.tbl tbody tr:nth-child(3),.tbl > tr:nth-child(3){animation-delay:.08s}
.tbl tbody tr:nth-child(4),.tbl > tr:nth-child(4){animation-delay:.11s}
.tbl tbody tr:nth-child(5),.tbl > tr:nth-child(5){animation-delay:.14s}
.tbl tbody tr:nth-child(6),.tbl > tr:nth-child(6){animation-delay:.17s}
.tbl tbody tr:nth-child(7),.tbl > tr:nth-child(7){animation-delay:.19s}
.tbl tbody tr:nth-child(8),.tbl > tr:nth-child(8){animation-delay:.21s}
.tbl tbody tr:nth-child(n+9):nth-child(-n+12),
.tbl > tr:nth-child(n+9):nth-child(-n+12){animation-delay:.23s}

/* brand pills arrive with the same rhythm */
.brandbtn{animation:riseIn .42s var(--ease) both}
.brandbar .brandbtn:nth-child(2){animation-delay:.03s}
.brandbar .brandbtn:nth-child(3){animation-delay:.07s}
.brandbar .brandbtn:nth-child(4){animation-delay:.11s}
.brandbar .brandbtn:nth-child(5){animation-delay:.15s}
.brandbar .brandbtn:nth-child(n+6){animation-delay:.18s}

/* press feedback on every card-shaped control */
.bscard:active,.qrcard:active,.plancard:active,.tplcard:active{transform:scale(.988)}

/* ============================================================
   PAGE PREVIEW GRID
   The thumbnail is the real page in an iframe, rendered from the admin
   host (/page-view), not from the public domain — for every imported
   page that domain still points at the old origin, so linking previews
   there showed a 404 for a page that was actually fine.
   Bio pages are mobile-first, so a narrow frame IS the honest preview:
   it is what a phone shows after scanning the QR.
   ============================================================ */
.viewbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:12px 14px}
.viewbar .preslabel{display:inline-flex;align-items:center;gap:6px;color:var(--ink2)}
.viewbar .mini-note{flex:1;min-width:200px;text-align:right}

.pggrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
.pgcard{
  background:var(--surface);border:1px solid var(--border);border-radius:14px;
  overflow:hidden;box-shadow:var(--shadow-1);
  animation:riseIn .45s var(--ease) both;animation-delay:calc(var(--i) * 45ms);
  transition:transform .28s var(--ease), box-shadow .28s var(--ease), border-color .2s;
}
.pgcard:hover{transform:translateY(-3px);box-shadow:var(--shadow-3);border-color:var(--border-strong)}

.pgthumb{
  position:relative;height:270px;overflow:hidden;
  background:#fff;border-bottom:1px solid var(--border);
}
/* The click target is an overlay anchor, NOT a wrapper around the iframe:
   an <iframe> is interactive content and is invalid inside an <a>, which left
   the thumbnail unclickable. This is valid markup and always receives the click. */
.pgopen{
  position:absolute;inset:0;z-index:2;display:block;
  text-decoration:none;border-radius:0;
}
.pgopen:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.pgopenpill{
  position:absolute;top:9px;right:9px;
  display:inline-flex;align-items:center;gap:4px;
  background:var(--accent);color:var(--on-accent);
  font-size:10.5px;font-weight:700;letter-spacing:.02em;
  padding:4px 9px;border-radius:99px;box-shadow:var(--shadow-2);
  opacity:0;transform:translateY(-4px);
  transition:opacity .18s var(--ease), transform .18s var(--ease);
}
.pgcard:hover .pgopenpill,.pgopen:focus-visible .pgopenpill{opacity:1;transform:none}
.pgthumb iframe{
  /* No scaling: these pages are mobile-first, so rendering at the card's own
     width IS the honest preview — it is what a phone shows after a QR scan.
     A scaled-down wide frame also left ~3px of subpixel overflow on the page. */
  width:100%;height:820px;border:0;display:block;
  pointer-events:none;   /* the whole thumbnail is one link to the editor */
}
/* a soft fade at the cut so the crop reads as intentional */
.pgveil{
  position:absolute;inset:auto 0 0 0;height:52px;pointer-events:none;
  background:linear-gradient(transparent,var(--surface));
}

.pgmeta{padding:11px 13px 12px;display:flex;flex-direction:column;gap:5px}
.pgtop{display:flex;align-items:center;justify-content:space-between;gap:8px}
.pgname{
  font-family:var(--mono);font-size:12.5px;font-weight:600;color:var(--ink);
  overflow-wrap:anywhere;text-decoration:none;
}
.pgname:hover{color:var(--accent-ink)}
.pgmeta .sub{font-size:11.5px}
.pgfoot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px;font-size:11.5px}
.pgedit{height:28px;padding:0 11px;font-size:12px;gap:5px;flex:0 0 auto}
.pgfoot .rowact{gap:2px}

@media(max-width:860px){
  .pggrid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
  .pgthumb{height:230px}
  .viewbar .mini-note{display:none}
}

/* ---------- on-demand page preview ----------
   The grid ships no iframes: each thumbnail is a full server-side page render,
   so loading 178 of them unasked would cost 178 renders per visit. The card
   starts as this placeholder and fetches its own preview when pressed. */
.pgload{
  position:absolute;inset:0;z-index:1;width:100%;height:100%;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;
  background:var(--surface2);border:0;border-radius:0;
  color:var(--muted);font-size:12.5px;font-weight:600;
  cursor:pointer;overflow:hidden;
  transition:background .2s var(--ease), color .2s var(--ease);
}
.pgload:hover{background:var(--raised);color:var(--ink);transform:none}
.pgloadico{
  width:42px;height:42px;border-radius:13px;display:grid;place-items:center;
  background:var(--surface);border:1px solid var(--border);color:var(--ink2);
  box-shadow:var(--shadow-1);
  transition:transform .25s var(--ease), border-color .2s;
}
.pgload:hover .pgloadico{transform:scale(1.06);border-color:var(--accent);color:var(--accent-ink)}
/* pressed: the render is in flight */
.pgload.is-busy{color:transparent}
.pgload.is-busy .pgloadico{animation:pulseSoft 1s var(--ease-soft) infinite}
@keyframes pulseSoft{0%,100%{opacity:1}50%{opacity:.45}}
/* the loaded frame fades in so the swap does not flash */
.pgthumb iframe{opacity:0;transition:opacity .3s var(--ease)}
.pgthumb iframe.ready{opacity:1}

/* ---------- icon-button labels ----------
   Native title= takes about a second to appear and never shows on keyboard
   focus, so icon-only controls stayed guesswork. This labels them instantly
   and on focus too. aria-label still carries the accessible name. */
/* Two things had to be undone for these to be visible at all:
   - button/.btn sets overflow:hidden (it clips the shine sweep), which also
     clipped the label AND the enlarged .rowact hit area, so .tip opts out;
   - .ghost::after is display:none (ghosts have no shine), and the label uses
     the same pseudo-element, so it must switch display back on. */
.tip{position:relative;overflow:visible}
.tip::after{
  display:block;
  content:attr(data-tip);
  position:absolute;bottom:calc(100% + 7px);left:50%;
  transform:translateX(-50%) translateY(3px);
  background:var(--ink);color:var(--bg);
  font-size:11px;font-weight:600;line-height:1;letter-spacing:0;
  padding:5px 8px;border-radius:6px;white-space:nowrap;
  box-shadow:var(--shadow-2);pointer-events:none;
  opacity:0;transition:opacity .14s var(--ease), transform .14s var(--ease);
  z-index:9;
}
.tip:hover::after,.tip:focus-visible::after{opacity:1;transform:translateX(-50%)}
/* a table row clips its own overflow, so the label needs the row to allow it */
.tbl td.rowact{overflow:visible}

/* ---------- pager ---------- */
/* rotated chevrons instead of a second pair of icons */
.ic.rot90{transform:rotate(90deg)}
.ic.rot270{transform:rotate(-90deg)}
.pager{
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:13px 2px 2px;margin-top:6px;border-top:1px solid var(--border);font-size:12.5px;
}
.pager b{color:var(--ink);font-variant-numeric:tabular-nums;font-weight:600}
.pgnav{display:flex;align-items:center;gap:9px;margin-left:auto}
.pgnav .btn{gap:4px}
.pgnav [aria-disabled=true]{opacity:.4;pointer-events:none;box-shadow:none}

/* ---------- review distribution ---------- */
.distrow{display:flex;align-items:center;gap:12px;margin-bottom:8px}
.dstar{width:74px;display:inline-flex;gap:1px;color:var(--warn)}
.dbar{flex:1;height:10px;background:var(--raised);border-radius:99px;overflow:hidden}
.dbar i{display:block;height:100%;border-radius:99px;transform-origin:left;animation:bargrow .85s var(--ease) both}
@keyframes bargrow{from{transform:scaleX(0)}}
.dnum{width:52px;text-align:right;font-size:12.5px;color:var(--muted)}
.stars{display:inline-flex;gap:1.5px;align-items:center}
.plancard li{display:flex;align-items:center;gap:7px}
.plancard li .ic{color:var(--ok)}
.dash{display:inline-block;width:13px;text-align:center;color:var(--muted);opacity:.6}
td .ic.fill{color:var(--warn)}
.stars.ok{color:var(--ok)}.stars.warn{color:var(--warn)}.stars.mut{color:var(--danger)}

/* ---------- pickers / builder / previews ---------- */
.tplcard,.presbtn{border-radius:11px;transition:transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s}
.tplcard:hover{transform:translateY(-3px);box-shadow:var(--shadow-2)}
.tplcard.on{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.presbtn:hover{transform:translateY(-2px)}
.tplcard.on,.presbtn.on{animation:pick .35s var(--ease)}
@keyframes pick{50%{transform:scale(1.045)}}
.blockcard{border-radius:11px;animation:rise .34s var(--ease) backwards;transition:box-shadow .25s var(--ease), border-color .2s}
.blockcard:hover{box-shadow:var(--shadow-2);border-color:var(--border-strong)}
.pviframe{border-radius:14px;box-shadow:var(--shadow-2);transition:box-shadow .3s var(--ease)}
.pviframe:hover{box-shadow:var(--shadow-3)}
.qrcard{border-radius:12px;transition:transform .28s var(--ease), box-shadow .28s var(--ease)}
.qrcard:hover{transform:translateY(-4px);box-shadow:var(--shadow-3)}
.qrcard img{transition:transform .3s var(--ease)}
.qrcard:hover img{transform:scale(1.045)}

/* ---------- plans ---------- */
.plancard{border-radius:14px;transition:transform .28s var(--ease), box-shadow .28s var(--ease), border-color .2s}
.plancard:hover{transform:translateY(-4px);box-shadow:var(--shadow-3)}
.plancard.cur{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);position:relative;overflow:hidden}
.plancard.cur::after{
  content:"CURRENT";position:absolute;top:13px;right:-31px;transform:rotate(45deg);
  background:var(--accent);color:var(--on-accent);font-size:9px;font-weight:800;letter-spacing:.1em;padding:3px 36px;
}
.plancard .price{font-size:29px;font-weight:700;letter-spacing:-.03em}
.plancard li.y{color:var(--ink2)}
.plancard li.n{color:var(--muted);opacity:.55}

/* ---------- loading shimmer ---------- */
.is-loading{position:relative;color:transparent !important;min-height:44px}
.is-loading::after{
  content:"";position:absolute;inset:0;border-radius:9px;
  background:linear-gradient(90deg,var(--raised) 25%,var(--surface2) 37%,var(--raised) 63%);
  background-size:400% 100%;animation:shimmer 1.4s ease infinite;
}
@keyframes shimmer{from{background-position:100% 0}to{background-position:0 0}}

/* ---------- chart tooltip ---------- */
.charttip{
  position:absolute;pointer-events:none;z-index:4;padding:7px 11px;border-radius:9px;
  background:var(--ink);color:var(--bg);font-size:11.5px;font-weight:600;white-space:nowrap;
  box-shadow:var(--shadow-3);transform:translate(-50%,-130%);opacity:0;transition:opacity .15s;
}
.charttip.on{opacity:1}
.chartwrap{position:relative}

/* ---------- login ---------- */
.loginbody{background:var(--bg)}
.logincard{border-radius:16px;box-shadow:var(--shadow-3);border:1px solid var(--border);padding:34px}
.alert{background:var(--danger-soft);color:var(--danger);border-radius:9px;padding:10px 13px;font-size:13px}

/* ---------- misc ---------- */
.docpre{border-radius:10px;background:var(--surface2);border:1px solid var(--border);font-size:12px;line-height:1.65}
.shorturl{font-weight:600;letter-spacing:-.01em}
.pvlabel{font-size:10px;font-weight:700;border-radius:99px;padding:3px 9px;letter-spacing:.02em}
a:focus-visible,button:focus-visible,.btn:focus-visible,
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* labelled inline date fields keep "starts/ends" unambiguous */
.fieldlbl{font-size:11.5px;color:var(--muted);font-weight:600;gap:7px}
.fieldlbl input{height:34px}
.csvbox{width:100%;min-height:104px;font-size:12px;line-height:1.6}

/* ---------- table overflow containment ----------
   A wide table must scroll inside its own card; it must never widen the page.
   (The Links table was 1684px inside a 616px card, pushing the whole layout
   sideways so content appeared shifted right.) */
.card:has(.tbl){overflow-x:auto}
.tbl{width:100%}
/* cap the text-heavy columns so they wrap instead of dictating table width.
   Trimmed from 440 when the Brand column was added, so the links table still
   fits its card at 1440 instead of growing an inner scrollbar. */
.tbl th,.tbl td{max-width:min(30vw,388px)}
/* the brand badge is fixed-width content; it never needs to grow */
/* one rule, not three: the label wraps rather than widening the column, so
   clipping it as well would only hide the second line */
.tbl td .brandchip{max-width:112px;flex-wrap:wrap;row-gap:1px}
.tbl td.clip{max-width:min(21vw,280px)}
/* the brand badge must not dictate column width — the logo carries the identity
   and the label wraps rather than pushing the table past its card */
.tbl td.num,.tbl th.num,.tbl td.rowact{max-width:none}
.tbl td a{overflow-wrap:anywhere}
.rowact{white-space:nowrap;gap:5px}
/* last-resort guard: nothing should ever scroll the document horizontally */
.main{min-width:0;overflow-x:clip}
.rowact .mini,.rowact .ghost{padding:0 7px;gap:4px}

/* ============================================================
   FIT TO CONTAINER
   Nothing may exceed its card or the viewport at any width. Verified at
   1024 / 1280 / 1440 / 1680 across every page: no page overflow, no inner
   scrollbars, and no button label clipped.
   ============================================================ */

/* A long unbroken slug or URL otherwise sets the cell's minimum width to the
   whole string, which is what made tables wider than their card. */
.tbl td{overflow-wrap:anywhere}
/* The truncated destination wraps instead of being pinned to one line. nowrap
   made the column incompressible; the full value is still in the title. */
.tbl td.clip{white-space:normal}

/* Labelled buttons keep their nowrap + max-content so text cannot clip, but
   CARD-shaped buttons hold prose and have to be able to shrink and wrap. */
button:not(.iconly){min-width:0}
.btn:not(.iconly),.mini:not(.iconly){min-width:max-content}
.tplcard,.presbtn,.bgthumb,.pgload{min-width:0;white-space:normal}
.tpldesc,.tplcard b{overflow-wrap:anywhere}

/* form controls size from their content by default, which overflows a row */
select,input,textarea{min-width:0;max-width:100%}
input[type=file]{max-width:100%}
/* rows of controls wrap rather than pushing their last item off a phone screen
   (the QR "Custom logo" file field and the analytics Export button did exactly
   that at 375px) */
label.inline{flex-wrap:wrap;max-width:100%}
.rangebar,.tabs{flex-wrap:wrap;max-width:100%}

/* ---------- responsive / motion ---------- */
@media(pointer:coarse){
  .mini,.rowact .mini{min-height:44px}
  input[type=checkbox],input[type=radio]{width:22px;height:22px}
  .mini.iconly{width:44px;height:44px}
  .navitem{padding:11px 10px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important;transition:none !important}
  .navitem:hover,.kpi:hover,.card:hover,.qrcard:hover,.plancard:hover,.tplcard:hover,
  .bscard:hover,.ins:hover,.brandbtn:hover{transform:none !important}
  /* the bar still has to show its value without the grow animation */
  .bsbar i{transform:none !important}
}
@media(max-width:860px){
  .content{padding:16px 14px 40px}
  .kbd-hint span{display:none}
  .kbd-hint{padding:0 9px}
  .tophdr{padding:11px 14px;gap:9px}
  .bsgrid{grid-template-columns:1fr}
  .ins{flex-wrap:wrap}
  .insact{margin-left:39px}
}
@media(max-width:700px){
  /* the address pushed Log out off-screen on a phone; the account is already
     identified by the workspace switcher, so the header keeps the action */
  .uemail{display:none}
  .hdr-right{gap:7px}
  h1{font-size:17px}
}

/* ============================================================
   RANK — stage 1 of the hierarchy pass (2026-08-31).

   Six independent audits of this codebase converged on the same
   root cause: the interface had a rich vocabulary of DECORATION
   and almost none of EMPHASIS. Colour was assigned by DOM
   position -- the fourth KPI tile was amber because it was
   fourth -- so the loudest thing on screen carried no meaning,
   while the label naming each section was the smallest and
   faintest text inside it.

   Nothing here moves, renames or removes a control. Weight,
   colour and breathing room only.
   ============================================================ */

/* Card titles now outrank their own contents. The h3 rule itself is
   corrected above; this gives the title room and keeps its icon subordinate. */
.card h3{margin:0 0 14px;display:flex;align-items:center;gap:8px}
.card h3 .ic{width:14px;height:14px;color:var(--muted);flex:0 0 auto}

/* Weight the column people actually scan. There was no font-weight on any
   table cell anywhere, so the link -- the answer -- weighed exactly as much
   as the truncated destination URL beside it, which nobody reads. */
.tbl tbody td a{font-weight:600;color:var(--accent-ink)}
.tbl td.num{font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.tbl td.clip,.tbl td .sub{color:var(--muted);font-size:12.5px}
.tbl th{background:var(--surface-2);font-size:11px;font-weight:700;letter-spacing:.04em;
        text-transform:uppercase;color:var(--muted)}

/* Spacing as a ratio rather than a pile of numbers: the gap BETWEEN two cards
   used to be smaller than the padding INSIDE one, which is why a stack of five
   read as a single undifferentiated field. */
.card{padding:20px;margin-bottom:24px}
.grid2,.grid3,.kpis{gap:20px}

/* Decoration that outranked the data. The nth-child hues and the ambient wash
   are removed rather than restyled: colour returns in stage 2 attached to
   STATE (live, paused, over quota) instead of to position. */
body::before{display:none}
.kpi::before{display:none}
nav .navitem .nico{color:var(--muted)}
nav .navitem.active .nico{color:var(--accent-ink)}

/* A blue halo on a red Delete button said "primary" about a destructive action. */
.btn.secondary,.btn.ghost,.btn.danger{box-shadow:none}

/* Inter ships here as static cuts 400/500/600/700/800, so every 650 and 750 in
   this file silently rounds up and the demotion it was meant to express
   collapses. These are the weights that actually exist. */
h1{font-size:22px;font-weight:700;letter-spacing:-.022em}
h2{font-size:17px;font-weight:600;letter-spacing:-.015em}
.kval{font-weight:700}
.klabel{font-size:12px;font-weight:500;color:var(--muted)}
/* Links inherited raw --accent (#2563eb), which measures 4.36:1 on white and
   less on the deepened canvas -- under the 4.5:1 floor. The ink variant of the
   same hue reads as the same colour and clears it at 9.05:1. */
a{color:var(--accent-ink)}
a:hover{color:var(--accent-h)}
/* Brand colour must never look like status. Five of the six brand hexes are red,
   and the dashboard puts the brand cards directly above a red "broken
   destination" alert -- so a 3px red edge on the KPOT card read as a warning
   about KPOT. The logo already carries identity; the stripe only added a second,
   contradictory meaning for the same colour. */
.bscard{border-left:1px solid var(--border)}
.bscard:hover{border-left-color:var(--border-strong)}

/* ============================================================
   SIGNAL — stage 2: colour means something.

   The semantic system was already defined near the top of this
   file, but 55 duplicated selectors accumulated below it and the
   cascade handed the argument to whichever rule happened to come
   last. Chips, for instance, were defined twice: the earlier rule
   used the measured -ink shades, the later one used raw hues at
   10.5px. The later one won, so the accessible version never
   rendered. These re-assert the intended rules; they are last, so
   they hold.

   One class -- .is-good / .is-warn / .is-bad / .is-info / .is-idle
   -- drives a chip, a tile icon, a number and a row from the same
   five variables. Colour is attached to MEANING, never to position.
   ============================================================ */

/* Chips. The losing definition sat at 10.5px in raw --ok (4.4:1 on its own
   tint); this is the measured pair at a size people can actually read. */
.chip{display:inline-block;font-size:11.5px;font-weight:700;line-height:1.5;
      letter-spacing:.01em;border-radius:999px;padding:2px 9px;white-space:nowrap;
      background:var(--st-tint,var(--surface-3));color:var(--st-ink,var(--muted));
      transition:transform .18s var(--ease)}
.chip.ok  {background:var(--ok-tint);color:var(--ok-ink)}
.chip.warn{background:var(--warn-tint);color:var(--warn-ink)}
.chip.bad {background:var(--danger-tint);color:var(--danger-ink)}
.chip.mut {background:var(--surface-3);color:var(--muted)}

/* Tile icons take their colour from what the number means. */
.kpis .kpi .kicon,.kicon{background:var(--st-tint,var(--surface-2));color:var(--st-ink,var(--muted))}
.kpi.is-good .kicon{background:var(--ok-tint);color:var(--ok-ink)}
.kpi.is-warn .kicon{background:var(--warn-tint);color:var(--warn-ink)}
.kpi.is-bad  .kicon{background:var(--danger-tint);color:var(--danger-ink)}
.kpi.is-lead .kicon{background:var(--accent-tint);color:var(--accent-ink)}

/* One lead metric per screen. Size only -- changing grid-column would reflow the
   row and move things, which the training screenshots depend on not happening. */
.kpi.is-lead .kval{font-size:32px}
.kpi.is-lead{border-color:var(--border-strong);box-shadow:var(--shadow-2)}

/* Icon buttons had no resting body: bare glyphs floating on white, with no way
   to tell a button from a label until you hovered it. */
.ghost{background:var(--surface-2);border:1px solid var(--border);color:var(--ink-2)}
.ghost:hover{background:var(--surface-3);border-color:var(--border-strong);color:var(--ink)}
.ghost.danger{color:var(--danger-ink);background:var(--danger-wash);border-color:var(--danger-line)}

/* Brand is identity, never status: five of the six brand hues are red, and red
   already means critical everywhere else in the product. A fixed dot, an ink label. */
.brandchip{color:var(--ink-2)}

/* ---------- motion: three things, each of which explains a change ----------
   Everything below animates transform and opacity only, and the global
   prefers-reduced-motion rule in app.css switches all of it off. */

/* Filtering replaces the contents of the table. Without a transition the list
   simply teleports and it is genuinely unclear whether anything happened. */
@keyframes swapIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
#results.swap-in{animation:swapIn .18s var(--ease) both}
#results.is-filtering{opacity:.55;transition:opacity .12s linear}

/* Press feedback inside 100ms, without moving anything around it. */
.btn:active,.chip:active,.brandbtn:active{transform:scale(.97)}
.btn,.brandbtn{transition:transform .12s var(--ease),background .16s var(--ease),
               border-color .16s var(--ease),box-shadow .16s var(--ease)}

/* Rows lift toward the reader on hover rather than just tinting. */
.tbl tbody tr{transition:background .16s var(--ease)}
.tbl tbody tr:hover td{background:var(--accent-wash)}

/* ============================================================
   FIRST-RUN TOUR + GETTING STARTED
   ============================================================ */

.tourbg{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:20px;
  background:rgba(6,10,18,.62);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  animation:fadein .22s var(--ease) both}
.tourbg.out{animation:fadein .18s var(--ease) reverse both}
.tourbox{background:var(--surface);border:1px solid var(--border);border-radius:18px;
  box-shadow:var(--shadow-4);width:min(520px,100%);padding:28px 28px 20px;position:relative;
  animation:modalin .34s var(--ease) both}
.tourico{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;
  background:var(--accent-tint);color:var(--accent-ink);margin-bottom:16px}
.tourstep h2{font-size:20px;font-weight:700;letter-spacing:-.02em;margin:0 0 8px;color:var(--ink)}
.tourstep p{margin:0;font-size:14.5px;line-height:1.6;color:var(--ink-2)}
.tournote{margin-top:14px;padding:11px 13px;border-radius:10px;background:var(--warn-wash);
  border:1px solid var(--warn-line);color:var(--warn-ink);font-size:13px;line-height:1.55}

.tourfoot{display:flex;align-items:center;gap:12px;margin-top:24px}
.tourdots{display:flex;gap:6px;margin:0 auto}
.tourdot{width:6px;height:6px;border-radius:50%;background:var(--border-strong);
  transition:background .2s var(--ease),transform .2s var(--ease)}
.tourdot.on{background:var(--accent);transform:scale(1.35)}
.tournav{display:flex;gap:8px}
.tourcount{position:absolute;top:20px;right:22px;font-size:11.5px;font-weight:600;color:var(--muted);
  font-variant-numeric:tabular-nums}

/* the tour is orientation, not a gate: it must never trap keyboard focus
   without an exit, so Escape closes it and Skip is the first control */
@media (max-width:560px){ .tourbox{padding:22px 20px 16px} .tourstep h2{font-size:18px} }

/* ---------- getting started checklist ---------- */
.getstarted .gsbar{height:4px;border-radius:99px;background:var(--surface-3);overflow:hidden;margin:0 0 8px}
.getstarted .gsbar i{display:block;height:100%;background:var(--accent);border-radius:99px;
  transition:width .4s var(--ease)}
.gslist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.gslist li{display:flex;align-items:center;gap:12px;padding:10px 4px;border-top:1px solid var(--border)}
.gslist li:first-child{border-top:0}
.gslist li b{display:block;font-size:13.5px;font-weight:600;color:var(--ink)}
.gslist .gshint{display:block;font-size:12.5px;color:var(--muted);margin-top:1px}
.gslist li > div{flex:1;min-width:0}
.gstick{flex:0 0 auto;width:19px;height:19px;border-radius:50%;border:1.5px solid var(--border-strong);
  display:grid;place-items:center;color:transparent}
.gslist li.on .gstick{background:var(--ok);border-color:var(--ok);color:#fff}
.gslist li.on b{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--border-strong)}
.gslist li.on .gshint{display:none}
/* The hidden attribute is only display:none in the UA sheet, which any
   display rule of ours outranks -- .btn{display:inline-flex} was showing the
   tour's Back button on step one. Make the attribute mean what it says. */
[hidden]{display:none!important}

/* ============================================================
   HELP — browse by topic, then read.

   82 answers stacked as 16 full-width cards was a wall you
   scrolled past rather than a thing you could scan. Pick a box,
   then read; search cuts across all of them at once.
   ============================================================ */

.helphero{padding:26px 26px 22px}
.helphero h2{display:flex;align-items:center;gap:10px;font-size:22px;font-weight:700;
  letter-spacing:-.02em;margin:0 0 6px;color:var(--ink)}
.helphero > p{margin:0 0 18px;color:var(--ink-2);font-size:14.5px;max-width:64ch}

.helpsearch{position:relative;display:flex;align-items:center;gap:10px;
  background:var(--surface-2);border:1px solid var(--border);border-radius:12px;
  padding:0 14px;transition:border-color .16s var(--ease),box-shadow .16s var(--ease)}
.helpsearch:focus-within{border-color:var(--accent);box-shadow:var(--ring);background:var(--surface)}
.helpsearch > .ic{color:var(--muted);flex:0 0 auto}
.helpsearch input{flex:1;min-width:0;border:0;background:transparent;height:48px;padding:0;
  font-size:15px;color:var(--ink)}
.helpsearch input:focus{outline:none;box-shadow:none}
.helpclear{border:0;background:transparent;color:var(--muted);cursor:pointer;padding:6px;
  border-radius:8px;display:grid;place-items:center}
.helpclear:hover{background:var(--surface-3);color:var(--ink)}
.helphero-act{margin-top:14px}

/* ---------- the topic grid ---------- */
.helpgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(258px,1fr));gap:16px;
  margin-bottom:24px}
/* This is a <button>, so it inherits the global control rules: a fixed 36px
   height, white-space:nowrap and overflow:hidden. All three have to be undone
   or the card clips to the height of its icon. */
.topiccard{display:flex;flex-direction:column;align-items:flex-start;gap:0;text-align:left;
  height:auto;min-height:0;white-space:normal;overflow:visible;
  background:var(--surface);border:1px solid var(--border);border-radius:14px;
  box-shadow:var(--shadow-1);padding:18px;cursor:pointer;font:inherit;color:inherit;
  transition:transform .16s var(--ease),box-shadow .16s var(--ease),border-color .16s var(--ease)}
.topiccard:hover{background:var(--surface);color:inherit;transform:translateY(-2px);box-shadow:var(--shadow-2);border-color:var(--border-strong)}
.topiccard:active{transform:translateY(0)}
.topiccard:focus-visible{outline:none;border-color:var(--accent);box-shadow:var(--ring)}
.topicico{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;
  background:var(--accent-tint);color:var(--accent-ink);margin-bottom:13px;flex:0 0 auto}
.topict{font-size:15px;font-weight:700;letter-spacing:-.01em;color:var(--ink);margin-bottom:5px}
.topicd{font-size:13px;line-height:1.5;color:var(--muted);
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.topicn{display:flex;align-items:center;gap:4px;margin-top:14px;font-size:12px;font-weight:600;
  color:var(--accent-ink)}
.topiccard:hover .topicn{gap:7px}
.topicn .ic{transition:transform .16s var(--ease)}

/* ---------- an opened topic ---------- */
.helpback{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;
  color:var(--muted);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;
  padding:4px 8px 4px 4px;border-radius:8px;margin-bottom:10px}
.helpback:hover{background:var(--surface-2);color:var(--ink)}

@media (max-width:560px){
  .helphero{padding:20px}
  .helphero h2{font-size:19px}
  .helpgrid{grid-template-columns:1fr}
}
/* Tool cards are machinery, not the answer. They sit on the recessed surface,
   drop their shadow and tighten up, so the eye goes past them to the data. */
.card.tool{background:var(--surface-2);box-shadow:none;border-color:var(--border);padding:14px 16px}
.card.tool h3{font-size:12.5px;font-weight:600;color:var(--ink-2);margin-bottom:10px}
.card.tool textarea{min-height:76px}
.toolrow{align-items:start}

/* ============================================================
   DENSITY — reclaim the real estate the hierarchy pass spent.

   Stage 1 widened padding and gaps to stop five cards reading as
   one undifferentiated field. That worked, and it cost about a
   quarter of the vertical space on every screen. What actually
   creates the separation is the RATIO -- the gap between two
   cards being larger than the padding inside one -- not the
   absolute numbers. So both shrink and the ratio is kept.
   ============================================================ */
.card{padding:16px 18px;margin-bottom:18px}
.grid2,.grid3,.kpis{gap:16px}
.card.tool{padding:12px 14px}
.card h3{margin:0 0 11px}

/* A four-column table stretched across a 2560px monitor puts the number two
   feet from the name it belongs to. That is not more room, it is more travel. */
.content{max-width:1600px}

/* The brand strip stays legible at half width; below that it goes back to
   one column rather than cramming six tiles into 350px. */
@media (max-width:1180px){ .dashpair{grid-template-columns:1fr} }
.dashpair{align-items:start}
.dashpair .bsgrid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}

/* ============================================================
   EQUAL BOXES

   Measured on the dashboard: the KPI row varied by 5px, the brand
   tiles by 17px, the two dashboard panels by 147px, and the chart
   sat beside a card 1,943px taller than itself.

   That last one was not a spacing problem. `.tbl td a` carries
   overflow-wrap:anywhere, so in a half-width column a hostname
   like link.thekpot.com/fredericksburgva broke mid-word across six
   lines and every row grew to 238px -- against about 40px for the
   same table at full width.
   ============================================================ */

/* Cards paired in a row match each other rather than each shrinking
   to its own contents. */
/* .grid2.dashrow{align-items:start} already existed at (0,2,0) and quietly beat
   the (0,1,0) version of this rule, so the chart kept sitting at its own height
   beside a card twice as tall. Matching the specificity is the fix. */
.grid2.dashpair,.grid2.dashrow,.grid2.toolrow{align-items:stretch}
.grid2.dashpair > .card,.grid2.dashrow > .card,.grid2.toolrow > .card{height:100%;margin-bottom:0}

/* Given the card now fills the row, let the chart fill the card rather than
   leaving the extra height blank. */
.chartcard .chartwrap{flex:1;min-height:180px;display:flex}
.chartcard .chartwrap canvas{width:100%;height:100%}

/* Tiles in a grid share a row height, so one wrapped label ("Ugly Dumpling")
   cannot make its tile taller than the five beside it. */
.kpis,.bsgrid{grid-auto-rows:1fr}
.kpi,.bscard{height:100%}

/* In a narrow column a link is one line with an ellipsis, not six wrapped
   fragments. The full value is already on the row's title attribute. */
.dashrow .tbl td a,.dashrow .tbl td .sub{
  display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashrow .tbl td{max-width:0}          /* lets the ellipsis actually engage */
.dashrow .tbl td.num{max-width:none;white-space:nowrap}

/* ============================================================
   BREATHING ROOM

   Zeroing card margins to make the equal-height grids work also
   removed the separation BELOW those rows: measured gaps between
   the dashboard's sections were 16px, 16px, 0, 0. The rows ran
   straight into each other, which is what read as cramped.

   The margin belongs on the grid container, not on the cards
   inside it — then the cards can still stretch to equal heights
   and the row still stands apart from the next one.
   ============================================================ */
.grid2,.grid3,.kpis,.dashpair,.dashrow,.toolrow{margin-bottom:20px}

/* a little air inside the panels, where content was hugging the edges */
.card{padding:18px 20px}
.card.tool{padding:13px 15px}
.bsgrid{gap:14px}
.inslist{gap:11px}
.card h3{margin-bottom:13px}

/* ============================================================
   ANALYTICS LENGTH

   Measured at 1440px: the page ran to 7,005px — nearly eight
   screens — and two tables were 47% of it. Locations lists up to
   40 venues and Recent events 30 raw rows; both are reference,
   not the thing you came to read, and neither should push the
   rest of the page off the bottom.

   They scroll inside a fixed height instead, the same treatment
   the country list beside the map already uses. Nothing is
   removed — every row is still reachable, just not by scrolling
   the whole page past it.
   ============================================================ */
.tblscroll{max-height:420px;overflow-y:auto;margin:0 -20px -18px;padding:0 20px}
.tblscroll thead th,.tblscroll .tbl tr:first-child th{
  position:sticky;top:0;z-index:1;background:var(--surface-2)}
.tblscroll .tbl{margin-bottom:0}

/* ============================================================
   LOADING SCREEN

   These pages are server-rendered: a click spends up to a second
   on the OLD screen with nothing to show it landed, and the
   browser's own spinner is in the tab where nobody looks.

   Centred, because that is where attention already is. Held back
   250ms by the script so a fast page never flashes it -- a
   loading screen that appears and vanishes reads as a glitch.
   ============================================================ */
#navload{position:fixed;inset:0;z-index:210;display:grid;place-items:center;
  background:color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
  opacity:0;visibility:hidden;transition:opacity .18s var(--ease),visibility .18s}
#navload.on{opacity:1;visibility:visible}

.nlbox{display:flex;flex-direction:column;align-items:center;gap:14px}

.nlmark{width:54px;height:54px;display:grid;place-items:center;border-radius:15px;
  background:var(--accent);color:var(--on-accent);box-shadow:0 10px 30px -8px var(--accent-glow)}
.nlmark svg{width:34px;height:34px;overflow:visible}

/* The mark is the product's own: a bracket, a gap, and a core. Rather than
   spin the whole thing, the parts move the way the logo already implies --
   the core pulses, the dash travels the gap, the bracket breathes. */
.nlcore{transform-box:fill-box;transform-origin:center;animation:nlCore 1.4s var(--ease-soft) infinite}
.nldash{animation:nlDash 1.4s var(--ease-soft) infinite}
.nlring{stroke-dasharray:38;stroke-dashoffset:0;animation:nlRing 1.4s var(--ease-soft) infinite}

@keyframes nlCore{0%,100%{transform:scale(1);opacity:1}45%{transform:scale(.72);opacity:.55}}
@keyframes nlDash{0%,100%{opacity:1;transform:translateX(0)}45%{opacity:.3;transform:translateX(3px)}}
@keyframes nlRing{0%,100%{stroke-dashoffset:0}50%{stroke-dashoffset:9}}

.nltext{font-size:13px;font-weight:600;letter-spacing:.02em;color:var(--ink-2)}
.nltext::after{content:'';display:inline-block;width:1.2em;text-align:left;
  animation:nlDots 1.4s steps(4,end) infinite}
@keyframes nlDots{0%{content:''}25%{content:'.'}50%{content:'..'}75%{content:'...'}}

/* The clicked destination acknowledges the click straight away too. */
.navitem.pending{background:var(--accent-tint);color:var(--accent-ink)}
.navitem.pending .nico{color:var(--accent-ink)}

/* Reduced motion keeps the loading SCREEN -- it is information -- and drops
   only the movement. The global reduce rule already stops the keyframes; this
   makes sure what is left still reads as deliberate rather than frozen. */
@media (prefers-reduced-motion: reduce){
  #navload{transition:none}
  .nlmark{box-shadow:none}
  .nltext::after{content:'...'}
}

/* ---------- Analytics: the detail block ----------
   Closed by default. It reads as a real control rather than a hidden section,
   so nobody has to wonder whether the numbers are missing. */
.detailblock{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow-1);margin-bottom:20px;overflow:hidden}
.detailblock > summary{display:flex;align-items:center;gap:9px;padding:15px 18px;cursor:pointer;
  font-size:14px;list-style:none;transition:background .16s var(--ease)}
.detailblock > summary::-webkit-details-marker{display:none}
.detailblock > summary:hover{background:var(--surface-2)}
.detailblock > summary .ic{color:var(--muted);flex:0 0 auto}
.detailblock > summary b{font-weight:700;color:var(--ink)}
.detailblock > summary .muted{font-size:12.5px}
/* the caret is drawn here so it can rotate without a second element */
.detailblock > summary::after{content:'';margin-left:auto;width:8px;height:8px;flex:0 0 auto;
  border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);
  transform:rotate(45deg) translateY(-2px);transition:transform .18s var(--ease)}
.detailblock[open] > summary::after{transform:rotate(-135deg) translateY(-2px)}
.detailblock[open] > summary{border-bottom:1px solid var(--border);background:var(--surface-2)}
.detailbody{padding:18px 18px 2px}
.detailbody > *:last-child{margin-bottom:16px}
@media (max-width:640px){ .detailblock > summary .muted{display:none} }

/* ---------- Traffic by brand: fill the panel ----------
   Six brands in an auto-fill grid landed 4 + 2, leaving two orphan cells and a
   large blank below them once the panel stretched to match the alerts beside it.
   Six divides exactly by three and by two, so the column count is fixed rather
   than auto-filled, and the rows share the leftover height instead of pooling
   it at the bottom. */
.dashpair .bstrip{display:flex;flex-direction:column}
.dashpair .bstrip .bsgrid{flex:1;grid-template-columns:repeat(3,1fr);grid-auto-rows:1fr;align-content:stretch}
@media (max-width:1500px){ .dashpair .bstrip .bsgrid{grid-template-columns:repeat(2,1fr)} }
@media (max-width:1180px){ .dashpair .bstrip .bsgrid{grid-template-columns:repeat(3,1fr)} }
@media (max-width:760px){  .dashpair .bstrip .bsgrid{grid-template-columns:repeat(2,1fr)} }

/* the tile lays its own content out top-to-bottom so a taller row does not
   leave the number floating away from its label */
.bscard{display:flex;flex-direction:column;justify-content:space-between;gap:6px}

/* And the alert list fills its panel the same way, rather than stacking at the
   top with dead space under the last one. */
.dashpair .insights{display:flex;flex-direction:column}
.dashpair .insights .inslist{flex:1}


/* ============================================================
   COMPONENT CRAFT

   Seen at 1:1 on the component sheet, the controls were the weak
   part: a 36px button with tight padding reads as a chip rather
   than something you press, ghost buttons were faint enough to
   look disabled, a disabled primary looked like it was loading,
   and an inline link in body copy was a dark navy with no
   underline — barely distinguishable from the text around it.
   ============================================================ */

/* ---------- buttons ---------- */
/* 38px with real horizontal padding, and the card radius rather than a 9px
   that reads as neither square nor pill. */
/* Geometry applies to real buttons only. A .tplcard is a <button>, but it is a
   card: giving it a 38px height collapsed the Pages template picker. */
.btn{
  height:38px;padding:0 18px;border-radius:10px;font-size:13.5px;font-weight:600;
  gap:7px;overflow:visible;
}
.btn.mini{height:31px;padding:0 12px;font-size:12.5px;border-radius:8px;gap:5px}
.btn.iconly{padding:0;width:38px}
.btn.mini.iconly{width:31px}

/* Primary earns a little elevation: it is the one thing on the screen you are
   most likely to want, and a flat fill does not say "press me".

   Scoped by an OPT-OUT class rather than :not() chains. The chain version sat at
   specificity (0,4,0) and so beat .tplcard, .presbtn, .brandbtn and .kbd-hint --
   every component that happens to be a <button> -- and painted the Pages
   template cards and the Search box solid accent with unreadable labels.
      Every rule in this block is scoped to .btn, never to bare `button`. A
   .tplcard, .presbtn, .brandbtn and .kbd-hint are all <button> elements WITHOUT
   .btn, so the bare selector reached straight into them and painted the Pages
   template cards and the Search box solid accent with unreadable labels.
   Verified: no <button> in the views is class-less, so nothing loses styling. */
.btn:not(.secondary):not(.ghost):not(.danger){
  background:var(--accent);
  box-shadow:0 1px 2px rgba(15,23,42,.10), 0 2px 6px -1px var(--accent-glow);
}
.btn:not(.secondary):not(.ghost):not(.danger):hover{
  background:var(--accent-h);
  box-shadow:0 2px 4px rgba(15,23,42,.12), 0 6px 14px -3px var(--accent-glow);
}

/* Secondary is a real object, not a hairline. */
.btn.secondary,button.secondary{
  background:var(--surface);border:1px solid var(--border-strong);color:var(--ink);
  box-shadow:0 1px 2px rgba(15,23,42,.05);
}
.btn.secondary:hover,button.secondary:hover{
  background:var(--surface);border-color:var(--muted);color:var(--ink);
  box-shadow:0 2px 6px rgba(15,23,42,.09);
}

/* Ghost is for dense rows. It was faint enough to read as disabled; now it has
   a surface and ink-strength text, and only its border is quiet. */
.btn.ghost,.ghost{
  background:var(--surface-2);border:1px solid var(--border);color:var(--ink-2);box-shadow:none;
}
.btn.ghost:hover,.ghost:hover{
  background:var(--surface);border-color:var(--border-strong);color:var(--ink);
}

/* Destructive is outlined until it is the confirmed action. Two solid reds side
   by side in a table row is a lot of shouting for something you rarely want. */
.btn.danger{
  background:var(--danger-wash);border:1px solid var(--danger-line);color:var(--danger-ink);
  box-shadow:none;
}
.btn.danger:hover{
  background:var(--danger);border-color:var(--danger);color:#fff;
}
/* the one inside a confirmation dialog is already the decision: fill it */
.cfm .btn.danger{background:var(--danger);border-color:var(--danger);color:#fff}
.cfm .btn.danger:hover{background:var(--danger-ink);border-color:var(--danger-ink)}

/* Disabled goes neutral. A faded accent reads as "working on it". */
.btn:disabled,.btn[disabled]{
  background:var(--surface-3) !important;border-color:var(--border) !important;
  color:var(--muted) !important;box-shadow:none !important;opacity:1;cursor:not-allowed;
}

/* One focus treatment for everything, visible on every variant. */
button:focus-visible,.btn:focus-visible,a.btn:focus-visible,
.tplcard:focus-visible,.presbtn:focus-visible,.brandbtn:focus-visible{
  outline:none;box-shadow:0 0 0 3px var(--accent-tint),0 0 0 1px var(--accent);
}

/* ---------- links ---------- */
/* In body copy a link needs an underline: colour alone is not enough, and this
   accent is a dark navy that sits close to the ink around it. */
.card p a,.instext a,.qa-inner a,.mini-note a,.helpsec a,p a{
  color:var(--accent-ink);text-decoration:underline;
  text-decoration-color:var(--accent-line);text-decoration-thickness:1.5px;
  text-underline-offset:2.5px;transition:text-decoration-color .16s var(--ease)
}
.card p a:hover,.instext a:hover,.qa-inner a:hover,.mini-note a:hover,p a:hover{
  text-decoration-color:var(--accent)
}
/* In a dense table an underline on every row is noise; weight and colour carry
   it there, and the underline appears on hover. */
.tbl td a{text-decoration:none}
.tbl td a:hover{text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:2.5px}

/* ---------- type scale ---------- */
/* h2 at 17 next to h3 at 15 was a 2px step, which is not a step. */
h1{font-size:24px;font-weight:700;letter-spacing:-.025em;line-height:1.2}
h2{font-size:18.5px;font-weight:600;letter-spacing:-.018em;line-height:1.3}
h3{font-size:15px;font-weight:700;letter-spacing:-.012em}

/* ---------- opening pipeline ---------- */
.openpanel h3{display:flex;align-items:center;gap:8px}
.opencount{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;
  border-radius:99px;background:var(--accent-tint);color:var(--accent-ink);
  font-size:11.5px;font-weight:700}
.openpanel .rowact{white-space:nowrap}
.openpanel .tbl td{vertical-align:top}

/* ============================================================
   VIEW TRANSITIONS

   These pages are server-rendered, which until recently meant a
   white flash between every screen unless you bolted on a JS
   router. Cross-document view transitions ship natively now, so
   the whole thing is an opt-in rule and two names.

   It degrades to precisely nothing where unsupported -- no
   polyfill, no fallback branch, no risk -- and it pairs with the
   loading screen rather than competing: fast navigations get the
   transition, slow ones still get the centred loader.
   ============================================================ */
@view-transition{navigation:auto}

/* Named elements morph between pages instead of being redrawn. The chrome that
   is genuinely the SAME thing on both pages should not blink. */
.side{view-transition-name:sidebar}
.tophdr{view-transition-name:apphead}

/* The content area crossfades and lifts very slightly, which reads as "this
   replaced that" rather than "the screen blinked". */
@keyframes vtIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes vtOut{from{opacity:1}to{opacity:0}}
::view-transition-old(root){animation:vtOut .12s var(--ease) both}
::view-transition-new(root){animation:vtIn .22s var(--ease) both}

/* The loading overlay must never be captured as part of a page snapshot --
   it would fade out as an artefact of the transition it is not part of. */
#navload{view-transition-name:none}

@media (prefers-reduced-motion: reduce){
  ::view-transition-old(root),::view-transition-new(root){animation:none}
  ::view-transition-group(*),::view-transition-image-pair(*){animation-duration:.01ms}
}

/* ---------- copy confirmation ----------
   Short links get copied constantly and nothing acknowledged it, so people
   copied twice to be sure. */
.copied{position:relative;color:var(--ok-ink) !important;border-color:var(--ok-line) !important;
  background:var(--ok-tint) !important}
.copied .ic{color:var(--ok-ink)}

/* ---------- row confirmation ----------
   After changing a row's state, say which row changed. */
@keyframes rowFlash{0%{background:var(--ok-wash)}100%{background:transparent}}
.tbl tr.flash td{animation:rowFlash 1.4s var(--ease) both}
.tbl tr.flash-warn td{animation:rowFlash 1.4s var(--ease) both;--ok-wash:var(--warn-wash)}

/* ---------- skeleton rows ----------
   While a filter is in flight, shaped placeholders read as "loading". Dimming
   alone reads as "greyed out and broken". */
.skelrow td{padding:11px 10px}
.skelbar{display:block;height:11px;border-radius:6px;
  background:linear-gradient(90deg,var(--surface-3) 25%,var(--surface-2) 37%,var(--surface-3) 63%);
  background-size:400% 100%;animation:shimmer 1.3s ease infinite}
.skelrow td:nth-child(2) .skelbar{width:62%}
.skelrow td:nth-child(3) .skelbar{width:80%}
.skelrow td:nth-child(4) .skelbar{width:34%}
@media (prefers-reduced-motion: reduce){ .skelbar{animation:none} }

/* ---------- the domain picker ----------
   Called out rather than sitting as one control among six: it decides which
   BRAND a link belongs to, and getting it wrong is only discovered after the
   code is printed. */
.dompick{display:inline-flex;align-items:center;gap:9px;padding:6px 10px 6px 12px;
  border:1.5px solid var(--accent-line);border-radius:11px;background:var(--accent-wash)}
.dompick:focus-within{border-color:var(--accent);box-shadow:var(--ring)}
.domlbl{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:700;
  letter-spacing:.03em;text-transform:uppercase;color:var(--accent-ink);white-space:nowrap}
.domlbl .ic{width:13px;height:13px}
.dompick select{border-color:var(--accent-line);background:var(--surface);font-weight:600}
/* a dot in the brand's own colour: identity only, never status */
.dombrand{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;
  color:var(--ink-2);white-space:nowrap}
.dombrand::before{content:'';width:9px;height:9px;border-radius:50%;background:var(--bc,#94a3b8);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.14);flex:0 0 auto}
@media (max-width:720px){ .domlbl span{display:none} }
/* on a phone it ran 46px off the screen: let it take the row and wrap */
@media (max-width:760px){
  .dompick{display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box;row-gap:7px}
  .dompick select{flex:1 1 150px;min-width:0}
}

/* ---------- duplicate dialog ----------
   The address the copy will actually get, shown while it is being typed. The
   mistake this prevents is a copy landing on the wrong brand's domain, which
   is invisible until somebody follows the link. */
.dupurl{margin:4px 0 2px;padding:9px 12px;border:1px dashed var(--border);border-radius:9px;
  background:var(--surface-2);color:var(--ink-2);font-size:13px;word-break:break-all}
/* fields in the duplicate dialog fill the box: three ragged-width inputs read
   as three unrelated controls rather than one short form */
.dupform{margin:14px 0 12px}
.dupform .formrow{margin-bottom:9px}
.dupform label.inline{display:grid;grid-template-columns:74px 1fr;align-items:center;gap:10px;width:100%}
.dupform input,.dupform select{width:100%;min-width:0}
.dupdim{font-style:normal;color:var(--muted);opacity:.85}


/* ============================================================
   PHONE (2026-09-08)

   A table is an instrument for comparing rows. At 390px there is
   nothing to compare with — one row fills the screen — so below
   760px the table stops pretending to be one. Each row becomes a
   RECORD: the thing it is on the first line, its facts labelled
   underneath, its actions along the bottom.

   The labels are lifted from the table's own header row at
   runtime (tblLabels() in app.js), so every table in the app gets
   this without knowing about it, and a new table gets it for free.

   Dense matrices opt out through .tblscroll and scroll sideways
   instead: comparing across the columns IS the point there, and
   stacking a 5-column grid into 5 labelled lines destroys it.
   ============================================================ */
@media (max-width:760px){

  /* ---- chrome: enough less of it that data starts on screen one ---- */
  .content{padding:14px 12px 44px}
  .card{padding:14px;margin-bottom:12px}
  .viewbar{padding:10px 12px}
  .brandrail{padding:10px 12px}

  /* four headline numbers stacked one per screenful is four scrolls to read
     four numbers; auto-fit gives up at 366px, so pair them explicitly */
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .kpi{padding:12px 13px}
  .kpi .kval{font-size:24px}
  .kpi .ksub{line-height:1.35}   /* it wraps at half width; that is fine, it is the context */

  /* three half-width controls fighting over 366px is worse than four
     full-width ones you can actually hit */
  .formrow > input,
  .formrow > select,
  .formrow > .btn,
  .formrow > .grow{flex:1 1 100%;width:100%;min-width:0}
  .formrow > input[style*="width"]{width:100%}

  /* the template picker stood six rows tall before anything else could
     be seen; it becomes a strip you swipe */
  .tplgrid{
    display:flex;gap:9px;margin:4px -14px 12px;padding:2px 14px 10px;
    overflow-x:auto;overscroll-behavior-x:contain;
    scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;
  }
  .tplgrid .tplcard{flex:0 0 152px;scroll-snap-align:start}

  /* brands wrapped to five stacked rows; a swipeable strip costs one */
  .brandbar{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;
    margin:0 -12px;padding:2px 12px 6px;scrollbar-width:none}
  .brandbar::-webkit-scrollbar{display:none}
  .brandbtn{flex:0 0 auto}
  .brandrail .preslabel,.viewbar .preslabel{display:none}

  /* ---- the record ---- */
  .tbl{display:block;width:100%;border-collapse:separate;border-spacing:0}
  .tbl > tbody{display:block}
  /* the header row is the label source, not something to render */
  .tbl > tbody > tr:first-child{display:none}

  .tbl > tbody > tr{
    display:flex;flex-direction:column;position:relative;
    padding:12px 13px;margin:0 0 10px;
    border:1px solid var(--border);border-radius:13px;
    background:var(--surface);box-shadow:var(--shadow-1);
  }
  .tbl > tbody > tr:last-child{margin-bottom:0}
  /* no hover affordances on a surface nobody hovers */
  .tbl tbody tr:hover td,.tbl tr:hover td{background:none}
  .tbl tr:hover td:first-child::before{display:none}

  .tbl td{
    display:grid;grid-template-columns:76px minmax(0,1fr);gap:10px;align-items:baseline;
    /* a value sits at its own size: a status chip stretched to the full column
       reads as a progress bar, not a label */
    justify-items:start;
    width:auto;padding:3px 0;border:0;font-size:13.5px;min-width:0;
    /* the desktop rule caps a cell at min(30vw,388px), which is 117px here —
       that cap is what a table column needs and what a record must not have */
    max-width:none;
  }
  .tbl td .brandchip{max-width:none}
  /* the label the JS lifted off the header row */
  .tbl td[data-l]::before{
    content:attr(data-l);
    font-size:11.5px;font-weight:600;letter-spacing:.02em;
    color:var(--muted);text-transform:none;
    padding-top:1px;
  }
  .tbl td:not([data-l]){grid-template-columns:minmax(0,1fr)}
  .tbl td:empty{display:none}

  /* what the row IS, on the first line, at reading size and unlabelled */
  .tbl td.idcell{
    order:-1;grid-template-columns:minmax(0,1fr);justify-items:stretch;
    font-size:15px;font-weight:600;line-height:1.35;
    padding:0 44px 5px 0;             /* clear of the corner checkbox */
    overflow-wrap:anywhere;           /* a URL has nowhere else to break */
  }
  .tbl td.idcell::before{display:none}
  .tbl td.idcell .sub{font-size:13px;font-weight:400;margin-top:2px}
  .tbl td.idcell a{text-decoration:none}

  /* selection is a corner affordance, not a column */
  .tbl td.ckcol{position:absolute;top:9px;right:9px;padding:0;width:auto;display:block}
  .tbl th.ckcol{display:none}

  /* a truncated destination has room to be read here */
  .tbl td.clip{max-width:none;white-space:normal;overflow:visible;overflow-wrap:anywhere}
  .tbl td.num{text-align:left}

  /* actions get their own full-width shelf, left-aligned like everything else */
  .tbl td.rowact{
    order:9;display:block;width:100%;
    margin-top:9px;padding-top:9px;border-top:1px solid var(--border);
  }
  .tbl td.rowact .rowact-in{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px;width:100%}
  .tbl td.rowact .mini{
    display:inline-flex;align-items:center;justify-content:center;gap:5px;
    /* 44px is the floor a finger needs; this selector outranks the
       pointer:coarse rule, so it has to carry the floor itself */
    min-height:44px;white-space:nowrap;   /* "Preview" must not stack under its icon */
  }
  /* an icon-only control is a square, not whatever width is left over */
  .tbl td.rowact .mini.iconly{width:44px;min-width:44px;height:44px;padding:0}

  /* ---- matrices keep their shape and scroll sideways ---- */
  .tblscroll,.tblwide{
    max-height:none;overflow-x:auto;overflow-y:visible;
    /* .tblscroll's desktop rule pulls the next element up over the last row;
       here the table fills the card and the note below it needs its space */
    margin:0 -14px;padding:0 14px 4px;
    scrollbar-width:thin;-webkit-overflow-scrolling:touch;
  }
  .tblscroll .tbl,.tblwide .tbl,
  .tblscroll .tbl > tbody,.tblwide .tbl > tbody,
  .tblscroll .tbl > tbody > tr,.tblwide .tbl > tbody > tr,
  .tblscroll .tbl td,.tblwide .tbl td,
  .tblscroll .tbl th,.tblwide .tbl th{display:revert}
  .tblscroll .tbl,.tblwide .tbl{display:table;min-width:520px;border-collapse:collapse}
  .tblscroll .tbl > tbody > tr:first-child,
  .tblwide  .tbl > tbody > tr:first-child{display:table-row}
  .tblscroll .tbl > tbody > tr,.tblwide .tbl > tbody > tr{
    padding:0;margin:0;border:0;border-radius:0;background:none;box-shadow:none;
  }
  .tblscroll .tbl td,.tblwide .tbl td{
    padding:11px 10px;border-bottom:1px solid var(--border);grid-template-columns:none;
  }
  .tblscroll .tbl td[data-l]::before,.tblwide .tbl td[data-l]::before{display:none}
  .tblscroll .tbl td.ckcol,.tblwide .tbl td.ckcol{position:static}
  /* a matrix keeps a bold row header — that is what the first column IS here —
     but not the record layout's title size */
  .tblscroll .tbl td.idcell,.tblwide .tbl td.idcell{font-size:13.5px;font-weight:600}
}

/* the sign-up honeypot: off-screen rather than display:none, because some bots
   skip hidden inputs and the point is that they fill this one in */
.logincard .hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}


/* ============================================================
   GLASS theme (2026-09-26)

   Frosted translucent panels over a soft gradient canvas, after the
   glassmorphism reference chosen for this - its STRUCTURE, in LinkOS's
   own colours. Measured from the reference rather than guessed:

     chrome (sidebar, top bar)  72% white + blur(24px)
     cards                      translucent white, 8% hairline, soft
                                32px shadow, 1px white highlight on top
     tiles inside cards         lighter again, hairline only
     every control              a pill; the active one solid accent
                                with a coloured glow beneath it

   Only the chrome actually blurs. Blurring every card is what makes
   glass UIs slow on a laptop with 200 rows on screen, and the
   reference does not do it either: layered translucency carries it.

   Cards are 58% white rather than the reference's 45%, because this is
   read under office fluorescent light by someone mid-conversation
   (PRODUCT.md), not admired on a design site. Text never sits on the
   raw canvas.

   Light-only by design. Chosen per person; Light and Dark are untouched.
   ============================================================ */
html[data-theme=glass]{
  --glass-canvas: linear-gradient(118deg, #b7c8fb 0%, #d6d3fa 46%, #c9e3fb 100%);
  --bg:#d3d9f8;
  --surface:rgba(255,255,255,.58);
  --surface-2:rgba(255,255,255,.44);
  --surface-3:rgba(255,255,255,.66);
  --raised:rgba(255,255,255,.72);
  --border:rgba(15,23,42,.09);
  --border-strong:rgba(15,23,42,.17);
  --glass-hi:inset 0 1px 0 rgba(255,255,255,.65), inset 0 -1px 0 rgba(255,255,255,.18);
  --glass-shadow:0 8px 32px rgba(15,23,42,.07);
  --glass-solid:rgba(255,255,255,.93);    /* menus, modals, toasts: must read */
  background:var(--glass-canvas) fixed;
  background-color:#cfd6f7;
}
html[data-theme=glass] body{
  font-family:'DM Sans', var(--font);
  font-feature-settings:normal;
  letter-spacing:0;
}

/* ---- chrome: the only surfaces that actually blur ---- */
html[data-theme=glass] .side{
  background:rgba(255,255,255,.72);
  -webkit-backdrop-filter:blur(24px) saturate(150%);backdrop-filter:blur(24px) saturate(150%);
  border-right:1px solid rgba(255,255,255,.55);
  box-shadow:var(--glass-shadow), var(--glass-hi);
}
html[data-theme=glass] .tophdr{
  background:rgba(255,255,255,.62);
  -webkit-backdrop-filter:blur(24px) saturate(150%);backdrop-filter:blur(24px) saturate(150%);
  border-bottom:1px solid rgba(255,255,255,.5);
  box-shadow:0 4px 20px rgba(15,23,42,.05);
}
html[data-theme=glass] .tophdr h1{font-weight:600;letter-spacing:-.01em}

/* ---- navigation: a soft pill for where you are ---- */
html[data-theme=glass] .navitem{border-radius:20px}
html[data-theme=glass] .navitem:hover{background:rgba(255,255,255,.45)}
html[data-theme=glass] .navitem.active{
  background:rgba(255,255,255,.78);color:var(--accent-ink);
  box-shadow:0 2px 10px rgba(15,23,42,.06), var(--glass-hi);
}
html[data-theme=glass] .navitem.active::before{display:none}
html[data-theme=glass] .planchip{background:rgba(255,255,255,.55);border:1px solid var(--border);border-radius:999px}

/* ---- panels ---- */
html[data-theme=glass] .card,
html[data-theme=glass] .kpi{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--glass-shadow), var(--glass-hi);
}
html[data-theme=glass] .card:hover,
html[data-theme=glass] .kpi:hover{transform:none}
/* a panel inside a panel is a tile: lighter, hairline, no shadow of its own */
html[data-theme=glass] .card .kpi,
html[data-theme=glass] .card .bscard,
html[data-theme=glass] .card .gslist li,
html[data-theme=glass] .card .pgcard,
html[data-theme=glass] .card .tplcard{
  background:var(--surface-2);
  border:1px solid var(--border);
  box-shadow:none;
}
/* the attention list keeps its severity tint: red, amber and green are the
   message, so they are softened to sit on glass rather than flattened away */
html[data-theme=glass] .ins{border:1px solid var(--border);box-shadow:var(--glass-hi)}
html[data-theme=glass] .klabel,
html[data-theme=glass] .tbl th{
  font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
}
html[data-theme=glass] .tbl th{background:transparent}
html[data-theme=glass] .tbl tr:hover td{background:rgba(255,255,255,.42)}

/* ---- controls: everything is a pill ---- */
html[data-theme=glass] .btn{
  border-radius:999px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.36), inset 0 -1px 0 rgba(0,0,0,.08),
             0 1px 2px rgba(15,23,42,.06), 0 8px 20px rgba(37,99,235,.22);
}
html[data-theme=glass] .btn.secondary,
html[data-theme=glass] .btn.ghost,
html[data-theme=glass] .mini{
  border-radius:999px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(15,23,42,.1);
  box-shadow:0 1px 2px rgba(15,23,42,.05), var(--glass-hi);
}
html[data-theme=glass] .btn.secondary:hover,
html[data-theme=glass] .mini:hover{background:rgba(255,255,255,.92)}
html[data-theme=glass] .mini.danger{background:var(--danger-wash)}

/* segmented control: a frosted track holding one solid pill */
html[data-theme=glass] .tabs{
  background:rgba(255,255,255,.72);border:1px solid var(--border);
  border-radius:999px;padding:3px;box-shadow:var(--glass-hi);
}
html[data-theme=glass] .tab{border-radius:999px}
html[data-theme=glass] .tab.on{
  background:var(--accent);color:var(--on-accent);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.36), 0 6px 16px rgba(37,99,235,.28);
}
html[data-theme=glass] .brandbtn{
  border-radius:999px;background:rgba(255,255,255,.62);border-color:rgba(15,23,42,.1);
  box-shadow:var(--glass-hi);
}
html[data-theme=glass] .brandbtn.on{
  background:rgba(255,255,255,.92);border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(37,99,235,.14), var(--glass-hi);
}

/* inputs sit a step more opaque than the card they are on */
html[data-theme=glass] input:not([type=checkbox]):not([type=radio]):not([type=range]),
html[data-theme=glass] select,
html[data-theme=glass] textarea{
  background:rgba(255,255,255,.78);
  border:1px solid rgba(15,23,42,.12);
  border-radius:12px;
  box-shadow:0 1px 3px rgba(15,23,42,.05);
}
html[data-theme=glass] #livesearch,
html[data-theme=glass] input[type=search]{border-radius:999px;padding-left:16px}

/* ---- anything floating above the page stays readable ---- */
html[data-theme=glass] .modalbox,
html[data-theme=glass] .cmdk-box,
html[data-theme=glass] .toast,
html[data-theme=glass] .thememenu{
  background:var(--glass-solid);
  -webkit-backdrop-filter:blur(24px) saturate(150%);backdrop-filter:blur(24px) saturate(150%);
  border:1px solid rgba(255,255,255,.7);
  box-shadow:0 24px 64px rgba(15,23,42,.18), var(--glass-hi);
}

@media (prefers-reduced-transparency: reduce){
  /* people who asked the OS for less transparency get solid panels */
  html[data-theme=glass] .side,html[data-theme=glass] .tophdr,
  html[data-theme=glass] .card,html[data-theme=glass] .kpi{
    background:#fff;-webkit-backdrop-filter:none;backdrop-filter:none;
  }
}

/* ---- theme picker (all themes) ---- */
.thememenu{
  position:fixed;z-index:60;min-width:228px;padding:6px;border-radius:14px;
  background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow-4);
}
.thememenu[hidden]{display:none}
.thememenu button{
  display:flex;align-items:center;gap:11px;width:100%;min-height:44px;padding:6px 10px;
  border:0;border-radius:10px;background:none;color:var(--ink);font:500 14px/1.2 inherit;
  text-align:left;cursor:pointer;box-shadow:none;height:auto;
}
.thememenu button:hover,.thememenu button:focus-visible{background:var(--accent-wash);outline:none}
.thememenu button[aria-checked=true]{font-weight:650}
.thememenu button[aria-checked=true]::after{
  content:"";margin-left:auto;width:8px;height:8px;border-radius:50%;background:var(--accent);flex:none;
}
.tm-swatch{width:28px;height:28px;border-radius:8px;flex:none;border:1px solid rgba(15,23,42,.14)}
.tm-swatch.light{background:linear-gradient(135deg,#ffffff 50%,#e8edf7 50%)}
.tm-swatch.dark{background:linear-gradient(135deg,#1b2436 50%,#0b111c 50%)}
.tm-swatch.glass{background:linear-gradient(118deg,#b7c8fb,#d6d3fa 46%,#c9e3fb)}
.tm-sub{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:2px}
#__themebtn .i-glass{display:none}
html[data-theme=glass] #__themebtn .i-glass{display:block}
html[data-theme=glass] #__themebtn .i-sun,
html[data-theme=glass] #__themebtn .i-moon{display:none}

/* ============================================================
   GLASS v2: motion and finish (2026-09-26)

   From the reference's own stylesheet: it has no keyframe
   animations at all. Its polish is state - every control answers
   in 150-200ms, and buttons carry a layered "glint" shadow with
   three distinct states: resting, lifted on hover, pressed IN on
   click. That restraint is the point, and it is kept here.

   Two things are added that the reference cannot do, because it
   is a single-page app and LinkOS is not:

   - the active nav item SLIDES to its new place when you change
     page, its label crossfading on the way (cross-document view
     transitions, already switched on for the whole app);
   - the selected date range does the same within a screen.

   And one borrowed idea: the reference's charts grow in on load
   (Recharts' default). The traffic chart here wipes in left to
   right, as if drawing itself.

   All of it stops under prefers-reduced-motion.
   ============================================================ */
html[data-theme=glass]{
  --g-ease:cubic-bezier(.2,.8,.2,1);
  --glint:inset 0 1px 0 rgba(255,255,255,.36), inset 0 -1px 0 rgba(0,0,0,.08),
          0 1px 2px rgba(15,23,42,.06), 0 8px 20px rgba(37,99,235,.22);
  --glint-hover:inset 0 1px 0 rgba(255,255,255,.44), inset 0 -1px 0 rgba(0,0,0,.1),
          0 2px 4px rgba(15,23,42,.08), 0 12px 28px rgba(37,99,235,.28);
  --glint-press:inset 0 2px 4px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.18);
  --lift:0 4px 16px rgba(15,23,42,.09), inset 0 1px 0 rgba(255,255,255,.55);
  --sink:inset 0 2px 4px rgba(15,23,42,.1);
  scrollbar-width:thin;
  scrollbar-color:rgba(15,23,42,.24) transparent;
}

/* ---- every control answers in 150-200ms ---- */
html[data-theme=glass] .btn,
html[data-theme=glass] .mini,
html[data-theme=glass] .tab,
html[data-theme=glass] .brandbtn,
html[data-theme=glass] .navitem,
html[data-theme=glass] .tbl td{
  transition:background-color .15s var(--g-ease), box-shadow .2s var(--g-ease),
             color .15s var(--g-ease), border-color .15s var(--g-ease), transform .15s var(--g-ease);
}

/* ---- glint: rest, lift, press ---- */
html[data-theme=glass] .btn:not(.secondary):not(.ghost){box-shadow:var(--glint)}
html[data-theme=glass] .btn:not(.secondary):not(.ghost):hover{box-shadow:var(--glint-hover);transform:translateY(-1px)}
html[data-theme=glass] .btn:not(.secondary):not(.ghost):active{box-shadow:var(--glint-press);transform:none}

/* ---- frosted pills: lift to near-white, sink when pressed ---- */
html[data-theme=glass] .btn.secondary:hover,
html[data-theme=glass] .btn.ghost:hover,
html[data-theme=glass] .mini:hover,
html[data-theme=glass] .brandbtn:not(.on):hover{
  background:rgba(255,255,255,.92);box-shadow:var(--lift);transform:translateY(-1px);
}
html[data-theme=glass] .btn.secondary:active,
html[data-theme=glass] .btn.ghost:active,
html[data-theme=glass] .mini:active,
html[data-theme=glass] .brandbtn:active{box-shadow:var(--sink);transform:none}
html[data-theme=glass] .mini.danger:hover{background:var(--danger-tint)}

/* ---- the segmented range: resting track, lifted pill ---- */
html[data-theme=glass] .tab:not(.on):hover{background:rgba(255,255,255,.7);color:var(--ink)}
html[data-theme=glass] .tab.on{box-shadow:var(--glint)}

/* ---- sliding highlights across page loads ---- */
html[data-theme=glass] .navitem.active{view-transition-name:navactive}
html[data-theme=glass] .tab.on{view-transition-name:var(--vt-range, none)}
@media (prefers-reduced-motion: no-preference){
  html[data-theme=glass]::view-transition-group(navactive){
    animation-duration:.36s;animation-timing-function:var(--g-ease);
  }
  html[data-theme=glass]::view-transition-group(*){animation-timing-function:var(--g-ease)}
  /* One solid pill the whole way. The two snapshots crossfade in exact
     complement, so together they always make one full pill - but that only
     adds up under plus-lighter blending, and setting the animation here
     drops the browser's own plus-lighter, so it is restated. The label
     swaps in the middle of the flight, while the pill is between rows. */
  html[data-theme=glass]::view-transition-image-pair(navactive){isolation:isolate}
  html[data-theme=glass]::view-transition-old(navactive),
  html[data-theme=glass]::view-transition-new(navactive){
    mix-blend-mode:plus-lighter;
    animation-duration:.36s;animation-timing-function:var(--g-ease);animation-fill-mode:both;
  }
  html[data-theme=glass]::view-transition-old(navactive){animation-name:gSwapOut}
  html[data-theme=glass]::view-transition-new(navactive){animation-name:gSwapIn}
  /* rows it passes over are frosted behind it, not read through it */
  html[data-theme=glass]::view-transition-group(navactive){
    border-radius:20px;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  }
}
@keyframes gSwapOut{0%,30%{opacity:1}70%,100%{opacity:0}}
@keyframes gSwapIn{0%,30%{opacity:0}70%,100%{opacity:1}}

/* ---- the traffic chart draws itself in ---- */
@media (prefers-reduced-motion: no-preference){
  html[data-theme=glass] .chartwrap canvas,
  html[data-theme=glass] .card > canvas#ts{animation:gChartIn .9s var(--g-ease) .05s both}
}
@keyframes gChartIn{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}

/* ---- details ---- */
html[data-theme=glass] .kicon{
  border-radius:999px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6), 0 2px 8px rgba(15,23,42,.07);
}
html[data-theme=glass] .tbl tr:hover td{background:rgba(37,99,235,.055)}
html[data-theme=glass] :is(a,button,summary,[tabindex]):focus-visible{
  outline:2px solid rgba(37,99,235,.6);outline-offset:2px;
}
html[data-theme=glass] :is(input,select,textarea):focus{
  border-color:var(--accent);outline:none;
  box-shadow:0 0 0 4px rgba(37,99,235,.14), 0 1px 3px rgba(15,23,42,.05);
}
html[data-theme=glass] ::selection{background:rgba(37,99,235,.2)}

@media (prefers-reduced-motion: reduce){
  html[data-theme=glass] .btn,html[data-theme=glass] .mini,html[data-theme=glass] .brandbtn,
  html[data-theme=glass] .tab{transform:none !important}
}

/* ============================================================
   MOTION PASS (2026-09-26): nothing jumps, nothing reloads

   Ten small interactions with one rule between them: a change
   happens where you caused it, and grows out of the thing you
   pressed. The search opens out of its button, the + becomes
   its own menu, a submit button shows its own progress and its
   own result, a row opens under itself, the list rearranges into
   a grid, the header folds away and returns. Behaviour lives in
   motion.js, ui.js and post() in app.js.

   Under prefers-reduced-motion app.css removes every transition,
   so each of these still happens - instantly.
   ============================================================ */
:root{--m-ease:cubic-bezier(.2,.8,.2,1)}

/* ---- 1. search opens out of its own button ---- */
.cmdk.inline{
  display:block;padding:0;background:rgba(6,10,18,0);
  -webkit-backdrop-filter:none;backdrop-filter:none;animation:none;
  transition:background-color .28s var(--ease);
}
.cmdk.inline.open{background:rgba(6,10,18,.22)}
.cmdk.inline .cmdbox{position:fixed;margin:0;animation:none;transition:clip-path .36s var(--m-ease)}
.cmdk.inline .cmdlist,.cmdk.inline .cmdfoot{transition:opacity .2s var(--ease)}
.cmdk.inline:not(.open) .cmdlist,.cmdk.inline:not(.open) .cmdfoot{opacity:0}
.cmdk.inline.open .cmdlist,.cmdk.inline.open .cmdfoot{transition-delay:.1s}
.kbd-hint.is-open{visibility:hidden}

/* ---- 2 and 4. the + becomes its own menu, and turns into an x ---- */
.fab{position:fixed;right:22px;bottom:22px;z-index:55}
.fabbtn{
  position:relative;z-index:2;width:56px;height:56px;padding:0;border:0;border-radius:50%;
  display:grid;place-items:center;cursor:pointer;
  background:var(--accent);color:var(--on-accent);
  box-shadow:0 8px 22px var(--accent-glow), 0 2px 6px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.28);
  transition:transform .2s var(--m-ease), background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.fabbtn:hover{transform:translateY(-2px)}
.fabbtn:active{transform:scale(.94)}
.fab.open .fabbtn{background:var(--ink);color:var(--bg);box-shadow:0 4px 14px rgba(15,23,42,.22)}
.fabx{position:relative;width:18px;height:18px}
.fabx::before,.fabx::after{
  content:"";position:absolute;left:0;top:8px;width:18px;height:2px;border-radius:2px;
  background:currentColor;transition:transform .38s var(--m-ease);
}
.fabx::after{transform:rotate(90deg)}
.fab.open .fabx::before{transform:rotate(135deg)}
.fab.open .fabx::after{transform:rotate(225deg)}
.fabpanel{
  position:absolute;right:0;bottom:0;width:276px;padding:12px 10px 70px;
  background:var(--surface);border:1px solid var(--border);border-radius:20px;box-shadow:var(--shadow-4);
  /* closed, it is exactly the button's circle; open, the whole panel */
  clip-path:inset(calc(100% - 56px) 0 0 calc(100% - 56px) round 28px);
  transition:clip-path .4s var(--m-ease);
}
.fab.open .fabpanel{clip-path:inset(0 round 20px)}
.fabhd{font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:4px 10px 8px}
.fabitem{
  display:flex;align-items:center;gap:12px;padding:9px 10px;border-radius:12px;
  color:var(--ink);text-decoration:none;opacity:0;transform:translateY(10px);
  transition:opacity .2s var(--ease), transform .34s var(--m-ease), background-color .15s;
}
.fab.open .fabitem{opacity:1;transform:none;transition-delay:calc(70ms + var(--i) * 35ms), calc(70ms + var(--i) * 35ms), 0s}
.fabitem:hover,.fabitem:focus-visible{background:var(--accent-soft);text-decoration:none;outline:none}
.fabitem .nico{width:34px;height:34px;flex:0 0 34px;border-radius:10px;display:grid;place-items:center;background:var(--raised);color:var(--ink2)}
.fabitem:hover .nico,.fabitem:focus-visible .nico{background:var(--accent);color:var(--on-accent)}
.fabtx{display:flex;flex-direction:column;line-height:1.3;min-width:0}
.fabtx b{font-size:13.5px;font-weight:600}
.fabtx small{font-size:11.5px;color:var(--muted)}
body.has-fab #toast{bottom:92px}
/* the last row's actions must never be stuck under it */
body.has-fab .content{padding-bottom:104px}
.fab{transition:transform .34s var(--m-ease), opacity .24s var(--ease)}
html.reading .fab:not(.open){transform:translateY(24px) scale(.6);opacity:0;pointer-events:none}
html[data-theme=glass] .fabpanel{
  background:rgba(255,255,255,.84);border-color:rgba(255,255,255,.7);
  -webkit-backdrop-filter:blur(22px) saturate(150%);backdrop-filter:blur(22px) saturate(150%);
}
/* arriving from the menu with #new: the create form says "here" */
.newflash{animation:newflash 1.4s var(--ease)}
@keyframes newflash{30%{box-shadow:0 0 0 5px var(--accent-soft), var(--shadow-2)}}

/* ---- 3. one button: pressed, working, done ---- */
.is-busy,.is-done{position:relative;pointer-events:none;color:transparent !important}
.is-busy > *,.is-done > *{visibility:hidden}
.is-busy::after{
  content:"";position:absolute;left:50%;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;
  border-radius:50%;border:2px solid var(--busy-c, currentColor);border-right-color:transparent;
  animation:bspin .7s linear infinite;
}
.is-done::after{
  content:"";position:absolute;left:50%;top:50%;width:16px;height:16px;margin:-8px 0 0 -8px;
  background:var(--busy-c, currentColor);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 12.5 5 5L19.5 7'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 12.5 5 5L19.5 7'/%3E%3C/svg%3E") center/contain no-repeat;
  animation:bpop .34s cubic-bezier(.2,.8,.3,1.5) both;
}
.btn.is-done:not(.secondary):not(.ghost):not(.danger){background:var(--ok);border-color:var(--ok);--busy-c:#fff}
.is-err{animation:bshake .4s var(--ease)}
@keyframes bspin{to{transform:rotate(360deg)}}
@keyframes bpop{from{transform:scale(.3);opacity:0}}
@keyframes bshake{20%,60%{transform:translateX(-3px)}40%,80%{transform:translateX(3px)}}

/* ---- 4. pause and play turn into each other ---- */
.ppm path{transition:d .38s var(--m-ease)}
.ppm .ppa{d:path("M7 4.5L10.6 4.5L10.6 19.5L7 19.5Z")}
.ppm .ppb{d:path("M13.4 4.5L17 4.5L17 19.5L13.4 19.5Z")}
.ppm.is-play .ppa{d:path("M7.5 4.8L19 12L19 12L7.5 19.2Z")}
.ppm.is-play .ppb{d:path("M19 12L19 12L19 12L19 12Z")}
.chipswap{animation:chipswap .45s var(--m-ease)}
@keyframes chipswap{from{transform:scale(.75);opacity:.2}}

/* ---- 5. segmented tabs: one pill that travels ---- */
.tabs{position:relative}
.tabs.has-ind .tab{position:relative;z-index:1}
.tabs.has-ind .tab.on{background:transparent !important;box-shadow:none !important}
.tabind{
  position:absolute;left:0;top:0;z-index:0;pointer-events:none;
  transition:transform .36s var(--m-ease), width .36s var(--m-ease);
}
.tabind.noanim{transition:none}
html[data-theme=glass] .tabs.has-ind .tab.on{view-transition-name:none}
html[data-theme=glass] .tabind{view-transition-name:var(--vt-range, none)}

/* ---- 7. a row opens under itself ---- */
.rowpeek .ic{transition:transform .32s var(--m-ease)}
.rowpeek[aria-expanded=true] .ic{transform:rotate(180deg)}
.rowpeek[aria-expanded=true]{color:var(--accent-ink);background:var(--accent-soft)}
.tbl tr[data-link] > td{transition:background-color .2s var(--ease)}
.tbl tr.peeking > td{background:color-mix(in srgb, var(--accent-soft) 55%, transparent)}
.tbl tr.peekrow > td{padding:0 !important;border-bottom:0;background:transparent}
.tbl tr.peekrow.open > td{border-bottom:1px solid var(--border)}
.peekwrap{display:grid;grid-template-rows:0fr;transition:grid-template-rows .36s var(--m-ease)}
.peekrow.open .peekwrap{grid-template-rows:1fr}
.peekin{overflow:hidden;min-height:0}
.peekbody{
  padding:14px 18px 18px;opacity:0;transform:translateY(-6px);
  transition:opacity .24s var(--ease) .06s, transform .32s var(--m-ease) .06s;
}
.peekrow.open .peekbody{opacity:1;transform:none}
.peekskel{display:grid;gap:10px;min-height:118px;align-content:start}
.peekskel i{display:block;height:12px;border-radius:6px;background:var(--raised);animation:pkpulse 1.1s ease-in-out infinite alternate}
.peekskel i:nth-child(1){width:55%}
.peekskel i:nth-child(2){width:82%;height:26px}
.peekskel i:nth-child(3){width:38%}
@keyframes pkpulse{to{opacity:.45}}
.pkgrid{display:grid;grid-template-columns:minmax(260px,1.7fr) repeat(3,minmax(120px,1fr));gap:16px 26px}
.pkmain{min-width:0}
.pkdest{display:flex;flex-direction:column;gap:2px;font-size:11.5px;min-width:0}
.pkdest a{font-size:13px;word-break:break-all}
.pkstats{display:flex;align-items:flex-end;gap:24px;margin:12px 0 10px}
.pkstats > div{display:flex;flex-direction:column}
.pkstats b{font-size:21px;font-weight:700;letter-spacing:-.01em;font-variant-numeric:tabular-nums;line-height:1.15}
.pkstats span{font-size:11.5px;color:var(--muted)}
.pkdelta .trend{align-self:flex-start;margin-bottom:3px}
.pkmeta{display:flex;flex-wrap:wrap;gap:4px 18px;margin:0;font-size:12px}
.pkmeta > div{display:flex;gap:6px}
.pkmeta dt{color:var(--muted)}
.pkmeta dd{margin:0;color:var(--ink2)}
.pkcol{min-width:0}
.pkcol h4{margin:0 0 8px;font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.pkbar{position:relative;display:flex;justify-content:space-between;gap:8px;padding:4px 8px;margin-bottom:4px;border-radius:7px;font-size:12.5px;overflow:hidden}
.pkbar i{position:absolute;inset:0 auto 0 0;width:var(--w);background:var(--accent-soft);transform-origin:left;animation:pkgrow .6s var(--m-ease) .12s both}
.pkbar span{position:relative;z-index:1}
.pkk{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pkn{font-variant-numeric:tabular-nums;color:var(--ink2)}
@keyframes pkgrow{from{transform:scaleX(0)}}
.pkact{margin-top:14px;display:flex;gap:8px}
@media (max-width:1100px){.pkgrid{grid-template-columns:1fr 1fr 1fr}.pkmain{grid-column:1 / -1}}
@media (max-width:760px){
  .pkgrid{grid-template-columns:1fr}
  /* on a phone the row is a card; its details continue the same card */
  .tbl > tbody > tr.peeking{margin-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}
  .tbl > tbody > tr.peekrow{padding:0;margin:0 0 10px;border-top:0;border-radius:0 0 13px 13px;box-shadow:none}
  .tbl > tbody > tr.peekrow:not(.open){border-color:transparent;background:transparent}
  .tbl tr.peekrow > td{display:block}
  .tbl tr.peekrow > td::before{display:none}
  .peekbody{padding:12px 13px 14px}
}

/* ---- 8. pages: rows rearrange into cards ---- */
@media (prefers-reduced-motion: no-preference){
  ::view-transition-group(*.pgitem){animation-duration:.46s;animation-timing-function:var(--m-ease)}
  ::view-transition-old(*.pgitem),::view-transition-new(*.pgitem){
    width:100%;height:100%;object-fit:cover;object-position:left top;
  }
  ::view-transition-old(*.pgitem){animation:vtOut .2s var(--ease) both}
  ::view-transition-new(*.pgitem){animation:pgIn .3s var(--ease) .1s both}
}
@media (prefers-reduced-motion: no-preference){
  html:active-view-transition-type(pgview)::view-transition-new(root){animation:pgIn .3s var(--ease) .12s both}
}
@keyframes pgIn{from{opacity:0}}

/* ---- 9. the header folds to icons while you read ---- */
.tophdr{transition:padding .32s var(--m-ease), margin .32s var(--m-ease), box-shadow .3s var(--ease)}
.tophdr h1{transform-origin:left center;transition:transform .32s var(--m-ease)}
/* the margin gains what the padding loses, so the page does not move */
.tophdr.tuck{padding-top:7px;padding-bottom:7px;margin-bottom:12px;box-shadow:0 8px 24px rgba(15,23,42,.08)}
.tophdr.tuck h1{transform:scale(.86)}
.kbd-hint{transition:border-color .2s, color .2s, background .2s, gap .32s var(--m-ease), padding .32s var(--m-ease)}
.kbd-hint span,.kbd-hint kbd{
  max-width:120px;overflow:hidden;white-space:nowrap;
  transition:max-width .32s var(--m-ease), opacity .2s var(--ease), padding .32s var(--m-ease), border-width .32s;
}
.tophdr.tuck .kbd-hint{gap:0;padding:0 9px}
.tophdr.tuck .kbd-hint span,.tophdr.tuck .kbd-hint kbd{max-width:0;opacity:0;padding-left:0;padding-right:0;border-width:0}
.uemail{max-width:280px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition:max-width .32s var(--m-ease), opacity .2s var(--ease), margin .32s var(--m-ease)}
.tophdr.tuck .uemail{max-width:0;opacity:0;margin-left:-10px}
.hdrout{gap:0;transition:padding .32s var(--m-ease)}
.hdrout .ic{max-width:0;opacity:0;transition:max-width .32s var(--m-ease), opacity .2s var(--ease)}
.hdrout span{display:inline-block;max-width:80px;overflow:hidden;white-space:nowrap;transition:max-width .32s var(--m-ease), opacity .2s var(--ease)}
.tophdr.tuck .hdrout{padding:0 9px}
.tophdr.tuck .hdrout .ic{max-width:14px;opacity:1}
.tophdr.tuck .hdrout span{max-width:0;opacity:0}
@media (max-width:860px){.tophdr.tuck{margin-bottom:8px}}

/* ---- 10 and 4. phone menu: grows out of its button to the whole screen ---- */
.navbtn{
  display:none;position:relative;flex:0 0 auto;width:38px;height:38px;padding:0;
  border:1px solid var(--border);border-radius:10px;background:var(--raised);color:var(--ink);cursor:pointer;
}
.navbtn span{
  position:absolute;left:10px;right:10px;height:2px;border-radius:2px;background:currentColor;
  transition:transform .38s var(--m-ease), opacity .2s var(--ease);
}
.navbtn span:nth-child(1){top:12px}
.navbtn span:nth-child(2){top:17px}
.navbtn span:nth-child(3){top:22px}
/* bare button:hover paints accent; this is a quiet control, like the theme button */
.navbtn:hover{background:var(--border);color:var(--ink);transform:none}
.navbtn[aria-expanded=true]{visibility:hidden}
@media (max-width:860px){.navbtn{display:block}}
.mnav{
  position:fixed;inset:0;z-index:80;overflow-y:auto;overscroll-behavior:contain;
  background:var(--surface2);transition:clip-path .46s var(--m-ease);
}
.mnav[hidden]{display:none}
.mnavin{max-width:520px;margin:0 auto;padding:62px 16px 40px}
.mnav .logo{padding:0 8px 14px}
.mnav .wsbox{padding:0 4px 8px}
.mnav .navitem{
  font-size:16px;min-height:48px;padding:10px 12px;
  opacity:0;transform:translateY(12px);view-transition-name:none !important;
  transition:opacity .24s var(--ease), transform .38s var(--m-ease), background-color .15s;
}
.mnav .navhdr,.mnav .logo,.mnav .wsbox,.mnav .sidefoot{opacity:0;transition:opacity .24s var(--ease)}
.mnav.open .navitem,.mnav.open .navhdr{opacity:1;transform:none;transition-delay:calc(110ms + var(--i) * 16ms), calc(110ms + var(--i) * 16ms), 0s}
.mnav.open .logo,.mnav.open .wsbox,.mnav.open .sidefoot{opacity:1;transition-delay:.08s}
.mnavx{display:block;position:fixed;z-index:81}
.mnav.open .mnavx span:nth-child(1){transform:translateY(5px) rotate(45deg)}
.mnav.open .mnavx span:nth-child(2){opacity:0;transform:scaleX(.2)}
.mnav.open .mnavx span:nth-child(3){transform:translateY(-5px) rotate(-45deg)}
html.mnav-open{overflow:hidden}
html[data-theme=glass] .mnav{background:linear-gradient(118deg,#b7c8fb 0%,#d6d3fa 46%,#c9e3fb 100%)}

@media print{.fab,.navbtn,.mnav{display:none !important}}

/* ---- page editor: the preview says whether it is live ---- */
.pvlabel.pv-live{color:var(--ok-ink);background:var(--ok-tint)}
.pvlabel.pv-live::before{
  content:"";display:inline-block;width:6px;height:6px;margin-right:5px;vertical-align:1px;
  border-radius:50%;background:currentColor;animation:pvpulse 2.2s ease-in-out infinite;
}
.pvlabel.pv-changed{color:var(--warn-ink);background:var(--warn-tint)}
.pvlabel.pv-draft{color:var(--ink2);background:var(--raised)}
@keyframes pvpulse{50%{opacity:.3}}
#pgsave .ic{width:13px;height:13px}

/* ============================================================
   CREAM (2026-09-27)

   Learned from the Cream dashboard kit: a warm paper palette, one
   blue, and almost no depth. Surfaces are told apart by a thin line
   and a half-step of tone, not by shadow; every control is a pill;
   cards are generously rounded (24px). Type is Montserrat.

   Its motion is restraint: colours change in 150ms and nothing
   lifts on hover. Menus drop 2px as they fade in, dialogs rise 4px.
   So this theme turns the hover lifts OFF rather than adding more.

   The kit is light-only (its moon button does nothing), so Cream is
   too. Chosen per person; Light, Dark and Glass are untouched.

   Contrast, computed on the card (#fcf9f5): ink 16.4:1, ink-2 8.4:1,
   muted 5.4:1 (5.1 on the ground), accent-ink on its tint 5.8:1,
   white on accent 4.9:1, placeholders on a pill 4.3:1.
   ============================================================ */
html[data-theme=cream]{
  --font:'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg:#f6f2ee;
  --surface:#fcf9f5;
  --surface-2:#f6f2ee;
  --surface-3:#e5ded5;
  --border:#ddd5ca;
  --border-strong:#c7c7c7;

  --ink:#1c1b18;
  --ink-2:#4d4a44;
  --muted:#6b665d;

  --accent:#0271d4;           /* the kit's #0277dd, a hair darker: white on it now passes 4.5:1 */
  --accent-h:#025fac;
  --accent-ink:#025fac;
  --accent-tint:#eaf4fe;
  --accent-wash:#f3f8fe;
  --accent-line:#80b9ee;
  --on-accent:#ffffff;

  --ok:#15803d;      --ok-ink:#14532d;     --ok-tint:#e2f5e8;     --ok-wash:#ecfdf3;     --ok-line:#bbf7d0;
  --warn:#c2410c;    --warn-ink:#7c2d12;   --warn-tint:#ffedd5;   --warn-wash:#fffaeb;   --warn-line:#fed7aa;
  --danger:#be123c;  --danger-ink:#9f1239; --danger-tint:#ffe4e6; --danger-wash:#fff1f2; --danger-line:#fecdd3;
  --viz:#7c5cc4;     --viz-ink:#5b3fa0;    --viz-tint:#efe9fb;    --viz-wash:#f7f3fd;    --viz-line:#d4c6f2;

  /* the kit's chart colours first, then LinkOS's own */
  --s1:#028bff; --s2:#f785d1; --s3:#1b998b; --s4:#f7b573;
  --s5:#7c5cc4; --s6:#0891b2; --s7:#5c7a1e; --s8:#c026d3;
  --brand:#0271d4;

  --radius:24px; --radius-sm:12px; --radius-pill:9999px;
  /* flat by default; only floating things (menus, dialogs) cast a shadow */
  --shadow-1:none;
  --shadow-2:none;
  --shadow-3:0 4px 16px rgba(28,27,24,.10);
  --shadow-4:0 12px 32px rgba(28,27,24,.14);
  --ring:0 0 0 3px #80b9ee;
  --accent-glow:rgba(2,119,221,.14);
  --cr-hover:#d0c8bb;          /* a pill under the pointer */
  --cr-hover-line:#c7bfb3;
  --cr-row:#efeae3;            /* a table row under the pointer */
  --cr-ease:ease;
  color-scheme:light;
  background:var(--bg);
  scrollbar-width:thin;
  scrollbar-color:#c9c0b3 transparent;
}
html[data-theme=cream] body{
  font-family:var(--font);background:var(--bg);color:var(--ink-2);
  font-feature-settings:normal;letter-spacing:0;
}
html[data-theme=cream] h1,html[data-theme=cream] h2,html[data-theme=cream] h3{color:var(--ink);letter-spacing:-.01em}
html[data-theme=cream] ::selection{background:#cfe6fc}

/* ---- motion: 150ms colour, no lifts ---- */
/* (the header's search pill and nav items keep their own transitions: the header
   fold and the phone menu animate them) */
html[data-theme=cream] :is(.btn,.mini,.brandbtn,.tab,.planchip,input,select,textarea){
  transition:background-color .15s var(--cr-ease), border-color .15s var(--cr-ease), color .15s var(--cr-ease), box-shadow .15s var(--cr-ease);
}
html[data-theme=cream] :is(button,.btn,.mini,.brandbtn,.card,.kpi,.bscard,.ins,.tplcard,.navitem,.pgcard):hover{transform:none}
html[data-theme=cream] .navitem:hover .nico{transform:none}
html[data-theme=cream] .kpi{animation:none}

/* ---- chrome: one warm ground, divided by hairlines ---- */
html[data-theme=cream] .side{background:var(--surface-2);border-right:1px solid var(--border-strong)}
html[data-theme=cream] .tophdr{
  background:var(--surface-2);-webkit-backdrop-filter:none;backdrop-filter:none;
  border-bottom:1px solid var(--border-strong);
}
html[data-theme=cream] .tophdr h1{font-size:20px;font-weight:600}
html[data-theme=cream] .logomark{border-radius:50%;background:var(--accent);box-shadow:none}
html[data-theme=cream] .logo small{color:var(--muted)}

/* ---- navigation: pills; where you are is a pale blue pill, not a badge ---- */
html[data-theme=cream] .navhdr{letter-spacing:.1px;color:var(--muted);font-weight:600}
html[data-theme=cream] .navitem{border-radius:9999px;color:var(--ink-2);font-weight:500}
html[data-theme=cream] .navitem:hover{background:var(--surface-3);color:var(--ink)}
html[data-theme=cream] .navitem.active{background:var(--accent-tint);color:var(--ink);font-weight:600}
html[data-theme=cream] .navitem.active::before{display:none}
html[data-theme=cream] .nico{background:transparent;color:var(--ink-2);box-shadow:none}
html[data-theme=cream] .navitem.active .nico{background:transparent;color:var(--ink) !important;box-shadow:none}
html[data-theme=cream] .planchip{border-radius:9999px;background:var(--surface-3);border-color:var(--border)}

/* ---- surfaces: cream cards on the warm ground, a line instead of a shadow ---- */
html[data-theme=cream] :is(.card,.kpi){
  background:var(--surface);border:1px solid var(--border-strong);border-radius:24px;box-shadow:none;
}
html[data-theme=cream] .card{padding:22px 24px}
html[data-theme=cream] :is(.card,.kpi):hover{box-shadow:none;border-color:var(--border-strong)}
html[data-theme=cream] .kpi .kval{color:var(--ink);font-weight:600}
html[data-theme=cream] .kicon{border-radius:9999px}

/* ---- buttons: all pills ---- */
html[data-theme=cream] .btn{border-radius:9999px;font-weight:500;box-shadow:none}
html[data-theme=cream] .btn:not(.secondary):not(.ghost):not(.danger){
  background:var(--accent);border:1px solid #0268be;color:#fff;box-shadow:none;
}
html[data-theme=cream] .btn:not(.secondary):not(.ghost):not(.danger):hover{background:var(--accent-h);border-color:#02568f;box-shadow:none}
html[data-theme=cream] :is(.btn.secondary,button.secondary,.btn.ghost,.ghost){
  background:var(--surface-3);border:1px solid #dbd3c7;color:var(--ink-2);box-shadow:none;
}
html[data-theme=cream] :is(.btn.secondary,button.secondary,.btn.ghost,.ghost):hover{
  background:var(--cr-hover);border-color:var(--cr-hover-line);color:var(--ink);
}
html[data-theme=cream] .mini{border-radius:9999px}
html[data-theme=cream] .mini.danger{background:var(--danger-wash);border-color:var(--danger-line);color:var(--danger-ink)}
html[data-theme=cream] :is(.btn,.mini,button):focus-visible{outline:none;box-shadow:var(--ring)}

/* ---- inputs: warm pills; a softer ring than the buttons' ---- */
html[data-theme=cream] :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),select){
  border-radius:9999px;background:var(--surface-3);border:1px solid #d3cbbe;color:var(--ink);padding-inline:14px;
}
html[data-theme=cream] textarea{border-radius:16px;background:var(--surface-3);border:1px solid #d3cbbe;color:var(--ink)}
html[data-theme=cream] :is(input,select,textarea):hover:not(:disabled){border-color:#c7bfb3}
html[data-theme=cream] :is(input,select,textarea):focus{
  border-color:#bdb3a5;box-shadow:0 0 0 4px rgba(208,200,187,.6);outline:none;background:#ebe5dd;
}
html[data-theme=cream] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
html[data-theme=cream] .kbd-hint{border-radius:9999px;background:var(--surface-3);border-color:#dbd3c7;color:var(--ink-2)}
html[data-theme=cream] .kbd-hint:hover{background:var(--cr-hover);border-color:var(--cr-hover-line);color:var(--ink)}
html[data-theme=cream] .kbd-hint kbd{background:var(--surface);border-color:#dbd3c7;border-radius:6px}
html[data-theme=cream] #__themebtn{border-radius:9999px;background:transparent;border-color:transparent;color:var(--ink-2)}
html[data-theme=cream] #__themebtn:hover{background:var(--surface-3);color:var(--ink)}

/* ---- segmented choices: the kit's chip colours on one track, so the
   selection can travel along it (a row of separate chips would hide it) ---- */
html[data-theme=cream] .tabs{background:var(--surface-3);border:0;box-shadow:inset 0 0 0 1px #dbd3c7;padding:3px;gap:2px;border-radius:9999px}
html[data-theme=cream] .tab{border-radius:9999px;background:transparent;color:var(--ink-2);font-weight:500;padding:6px 14px;box-shadow:none}
html[data-theme=cream] .tab:not(.on):hover{background:rgba(255,255,255,.4);color:var(--ink)}
html[data-theme=cream] .tab.on{background:var(--accent-tint);color:var(--ink);font-weight:600;box-shadow:inset 0 0 0 1px var(--accent-line)}
html[data-theme=cream] .dompick{border-radius:20px;background:var(--accent-wash);border-color:var(--accent-line)}
html[data-theme=cream] .brandbtn{border-radius:9999px;background:var(--surface);border-color:#dbd3c7;box-shadow:none}
html[data-theme=cream] .brandbtn:hover{background:var(--surface-3);border-color:var(--cr-hover-line)}
html[data-theme=cream] .brandbtn.on{background:var(--accent-tint);border-color:var(--accent-line);color:var(--ink);box-shadow:none}

/* ---- badges: small, squared, outlined, as in the kit ---- */
html[data-theme=cream] .chip{border-radius:5px;border:1px solid var(--st-line,var(--border));font-weight:500;padding:1px 7px}
html[data-theme=cream] .trend{border-radius:5px}

/* ---- tables ---- */
html[data-theme=cream] .tbl th{background:transparent;color:var(--muted);font-weight:600;letter-spacing:.02em}
html[data-theme=cream] .tbl td{border-bottom-color:var(--border)}
html[data-theme=cream] .tbl tr:hover td{background:var(--cr-row)}

/* ---- things that float: cream panel, hairline, the kit's one shadow ---- */
html[data-theme=cream] :is(.thememenu,.cmdbox,.modalbox,.fabpanel){
  background:var(--surface);border:1px solid #dbd4c9;border-radius:16px;box-shadow:0 4px 16px rgba(28,27,24,.10);
  -webkit-backdrop-filter:none;backdrop-filter:none;
}
html[data-theme=cream] .modalbox{border-radius:24px;border:0}
html[data-theme=cream] .thememenu{animation:crDrop .16s ease both}
html[data-theme=cream] .modalbg{background:rgba(0,0,0,.5);animation:crFade .2s ease both}
html[data-theme=cream] .modalbox{animation:crRise .2s ease both}
html[data-theme=cream] .cmdk:not(.inline){background:rgba(0,0,0,.35);-webkit-backdrop-filter:none;backdrop-filter:none}
html[data-theme=cream] .cmditem{border-radius:10px}
html[data-theme=cream] .cmditem.sel{background:var(--surface-3);color:var(--ink)}
html[data-theme=cream] .cmditem.sel .nico{background:var(--accent);color:#fff}
html[data-theme=cream] .thememenu button{border-radius:10px}
html[data-theme=cream] .thememenu button:hover,html[data-theme=cream] .thememenu button:focus-visible{background:var(--surface-3)}
html[data-theme=cream] .toastmsg{background:var(--ink);color:#fcf9f5;border-radius:9999px}
html[data-theme=cream] .fabitem{border-radius:10px}
html[data-theme=cream] .fabitem:hover,html[data-theme=cream] .fabitem:focus-visible{background:var(--surface-3)}
html[data-theme=cream] .fabbtn{box-shadow:0 4px 16px rgba(2,119,221,.28)}
html[data-theme=cream] .mnav{background:var(--surface-2)}
@keyframes crDrop{from{opacity:0;transform:translateY(-2px)}}
@keyframes crRise{from{opacity:0;transform:translateY(4px)}}
@keyframes crFade{from{opacity:0}}

/* ---- theme button and menu ---- */
.tm-swatch.cream{background:linear-gradient(135deg,#fcf9f5 50%,#e5ded5 50%)}
#__themebtn .i-cream{display:none}
html[data-theme=cream] #__themebtn .i-cream{display:block}
html[data-theme=cream] #__themebtn .i-sun,
html[data-theme=cream] #__themebtn .i-moon,
html[data-theme=cream] #__themebtn .i-glass{display:none}

/* ============================================================
   BRAND BAR, smarter (2026-09-27)
   Biggest brand first; one row, with the overflow under More; the
   choice follows you between screens (brand_param), so a Clear link
   sits at the end whenever one is chosen; a thin line along the foot of
   each chip shows that brand's share of the whole. (Brand colours were
   tried and dropped: three of the six brands are red.)
   ============================================================ */
.brandbar.bb-fit{flex-wrap:nowrap;overflow:clip}
.brandbar.bb-fit > *{flex:0 0 auto}
.brandmore[hidden]{display:none}
.brandmorebtn{cursor:pointer;font:inherit}
.brandmorebtn .ic{width:13px;height:13px;transition:transform .2s var(--ease)}
.brandmorebtn[aria-expanded=true] .ic{transform:rotate(180deg)}
.brandmenu{
  position:fixed;z-index:70;min-width:230px;max-height:60vh;overflow-y:auto;padding:6px;
  display:flex;flex-direction:column;gap:2px;
  background:var(--surface);border:1px solid var(--border);border-radius:14px;
  box-shadow:0 12px 32px rgba(15,23,42,.14);animation:crDrop .16s ease both;
}
.brandmenu[hidden]{display:none}
.brandmenu .brandbtn{width:100%;border-color:transparent;box-shadow:none;background:transparent}
.brandmenu .brandbtn:hover,.brandmenu .brandbtn:focus-visible{background:var(--raised);outline:none}
.brandmenu .brandbtn .bnum{margin-left:auto}
.brandbtn.zero{opacity:.55}
.brandbtn.zero:hover,.brandbtn.zero.on{opacity:1}
.brandclear{
  display:inline-flex;align-items:center;gap:4px;margin-left:auto;padding:6px 11px;border-radius:999px;
  font-size:12.5px;font-weight:600;color:var(--muted);text-decoration:none;
  transition:background-color .15s, color .15s;
}
.brandclear:hover{background:var(--raised);color:var(--ink);text-decoration:none}
.brandbar[data-brandbar] .brandbtn{position:relative;overflow:hidden}
/* each brand's share of the whole, along the foot of its own chip */
.brandbar[data-brandbar] .brandbtn[style*="--share"]::after{
  content:"";position:absolute;left:10px;bottom:3px;height:2px;border-radius:2px;
  width:calc((100% - 20px) * var(--share) / 100);background:var(--accent);opacity:.45;
  transition:opacity .2s var(--ease);
}
.brandbar[data-brandbar] .brandbtn.on::after,.brandbar[data-brandbar] .brandbtn:hover::after{opacity:.9}
.brandmenu .brandbtn::after{display:none}
@media (max-width:760px){.brandclear span{display:none}}
/* More is a <button>; bare button:hover would paint it solid accent */
.brandbar .brandmorebtn{background:var(--surface);color:var(--ink-2);border:1px solid var(--border)}
.brandbar .brandmorebtn:hover,.brandbar .brandmorebtn[aria-expanded=true]{background:var(--raised);color:var(--ink);transform:none}

/* ============================================================
   POLISH PASS (2026-09-27): buttons and words, every screen

   From a screen-by-screen audit in every theme. What was wrong:
   a link's destination wrapped one character per line, so some
   rows stood eight lines tall; "Preview" dropped its icon onto a
   second line; the Reviews empty state broke its own sentence in
   three; templates used emoji as icons; the file picker was the
   browser's bare default; the More chip used a different font
   from the chips beside it; billing counted in lowercase keys.
   ============================================================ */
/* empty states: only the title is a block; bold words inside the sentence stay in it */
.empty b{display:inline;color:var(--ink);font-size:inherit;margin:0;font-weight:600}
.empty > b{display:block;font-size:15px;margin-bottom:5px}
/* links: the destination on one line, the whole of it on hover (title) */
.tbl tr[data-link] > td.clip{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:0;min-width:120px;width:20%}
.tbl tr[data-link] > td.idcell{max-width:250px}
/* an address breaks after its host (a <wbr> in the markup), mid-word only as a last resort */
.tbl td.idcell .sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px}
/* a row button with a word and an icon stays on one line */
.rowact-in > .mini:not(.iconly){display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
/* template picker: drawn icons on a small tile, filled when chosen */
.tplico{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--raised);color:var(--ink-2);font-size:0}
.tplcard.on .tplico{background:var(--accent);color:var(--on-accent)}
/* the file picker gets a real button */
input[type=file]{font-size:12.5px;color:var(--muted);height:auto;padding:0;border:0;background:none;box-shadow:none}
input[type=file]::file-selector-button{
  font:600 12.5px var(--font);margin-right:10px;padding:7px 13px;border-radius:999px;cursor:pointer;
  border:1px solid var(--border-strong);background:var(--surface);color:var(--ink);transition:background-color .15s;
}
input[type=file]::file-selector-button:hover{background:var(--raised)}
/* billing: five plans fit one row on a laptop; the allowance line reads as the headline it is */
.plangrid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.plancard li.plancap{font-weight:600;color:var(--ink);margin-top:4px}
/* More matches the chips around it */
.brandbar .brandmorebtn{font-size:13px;font-weight:600;height:36px}
/* Cream: the small icon buttons round too, like every other control in it */
html[data-theme=cream] .mini.iconly{border-radius:9999px}
@media (max-width:760px){
  .tbl tr[data-link] > td.clip{max-width:none;width:auto;white-space:normal;overflow:visible}
  .tbl td.idcell .sub{white-space:normal;max-width:none}
}

/* ---- QR: three labelled steps (what it opens · how it looks · file) ----
   It was one long row of unlabelled fields ("FG", "BG", "EC"), a bare
   browser file picker, and four notes wherever they fitted. */
.qrmake .qrhead{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.qrmake .qrhead h3{margin:0}
.qrsec{padding:18px 0 4px;border-top:1px solid var(--border);margin-top:16px}
.qrhead + .qrsec{border-top:0;margin-top:4px;padding-top:10px}
.qrsec-t{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-size:11.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.qrsec-t span{width:20px;height:20px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--accent-tint);color:var(--accent-ink);font-size:11px;letter-spacing:0}
.qrfields{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px 16px;align-items:end}
.qrfields .fld.wide{grid-column:span 2}
.fld{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12.5px;font-weight:600;color:var(--ink-2)}
.fld[hidden]{display:none}
.fld select,.fld input:not([type=color]):not([type=file]){width:100%}
.qrsec > .fld{margin-top:16px}
.qrcolors{display:flex;gap:8px;flex-wrap:wrap}
.swatch{
  display:inline-flex;align-items:center;gap:8px;height:37px;padding:0 13px 0 5px;cursor:pointer;
  border:1px solid var(--border);border-radius:999px;background:var(--surface);font-weight:500;color:var(--ink-2);
}
.swatch input[type=color]{width:27px;height:27px;padding:0;border:1px solid var(--border-strong);border-radius:50%;background:none;cursor:pointer;overflow:hidden;box-shadow:none}
.swatch input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.swatch input[type=color]::-webkit-color-swatch{border:0;border-radius:50%}
.swatch input[type=color]::-moz-color-swatch{border:0;border-radius:50%}
.qrmake .qrpresets{margin-top:0;padding-top:0;border-top:0}
.qrupload{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  min-width:78px;align-self:stretch;padding:6px 10px;cursor:pointer;
  border:1px dashed var(--border-strong);border-radius:8px;font-size:11px;font-weight:500;color:var(--ink-2);
  transition:background-color .15s, border-color .15s;
}
.qrupload:hover{background:var(--raised);color:var(--ink)}
.qrupload.on{border-style:solid;border-color:var(--accent);color:var(--accent-ink);box-shadow:0 0 0 3px var(--accent-soft)}
.qrupload input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.qrnote{margin:12px 0 0;max-width:760px}
.qrsize{display:flex;align-items:center;gap:8px;font-weight:500;color:var(--muted)}
.qrfoot .qrfields{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 16px}
.qrfoot .fld{width:210px}
.qrgo{margin-left:auto;height:40px;padding:0 20px;gap:7px}
html[data-theme=cream] :is(.presbtn,.qrupload){border-radius:14px}
@media (max-width:760px){
  .qrfields .fld.wide{grid-column:auto}
  .qrfoot .fld{width:100%}
  .qrgo{width:100%;margin-left:0;justify-content:center}
}
/* laptop widths: the trend and address columns give way first, so a row's
   buttons stay inside the card */
@media (min-width:761px) and (max-width:1400px){
  .tbl th.trendcol,.tbl td.trendcol{width:118px}
  .tbl tr[data-link] > td.idcell{max-width:200px}
  .tbl td .brandchip{max-width:92px}
}
/* ...and with a mouse (not a finger) the row's icon buttons tighten a little */
@media (min-width:761px) and (max-width:1400px) and (pointer:fine){
  .tbl td.rowact .mini.iconly{width:30px;height:30px;min-width:30px}
  .tbl td.rowact .rowact-in{gap:3px}
  .tbl td.idcell{max-width:210px}
  .tbl tr[data-link] > td.idcell{max-width:180px}
  .tbl tr[data-link] > td.clip{min-width:100px}
}
/* billing: the yearly price under the monthly one, and the group lines */
.planyr{font-size:12.5px;color:var(--muted);margin:-4px 0 12px;min-height:20px}
.planyr b{color:var(--ink);font-weight:600}
.planyr .chip{margin-left:4px}
.plancard li.planloc{display:flex;gap:6px;align-items:flex-start;font-weight:600;color:var(--accent-ink);line-height:1.4}
.plancard li.planloc .ic{flex:none;margin-top:2px}
.plancard.ent{background:var(--surface-2);border-style:dashed}
.plancard.ent .price{font-size:26px}
.planyrnote{display:flex;align-items:center;gap:6px;margin:0 0 12px;font-size:13px;font-weight:600;color:var(--ok-ink)}
/* a feature this plan does not include: what it does, which plan has it */
.planlock{display:flex;align-items:center;gap:14px;border-style:dashed}
.planlock-ico{width:36px;height:36px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--accent-tint);color:var(--accent-ink)}
.planlock-tx{flex:1;min-width:0}
.planlock-tx b{display:block;color:var(--ink);font-size:14px}
.planlock-tx p{margin:2px 0 0;font-size:13px;color:var(--muted);line-height:1.5}
@media (max-width:760px){.planlock{flex-wrap:wrap}.planlock .btn{width:100%;justify-content:center}}
/* billing cards: who it is for, the allowance, then only what this plan adds */
.plancard .planfor{font-size:12.5px;color:var(--muted);margin:-6px 0 10px;min-height:2.6em;line-height:1.4}
.plancard ul.plancaps{margin-bottom:10px}
.plancard .planplus{font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:4px 0 8px}
.plangrid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
/* sign-in: password or single sign-on */
.loginor{display:flex;align-items:center;gap:10px;margin:16px 0 12px;font-size:12px;color:var(--muted)}
.loginor::before,.loginor::after{content:"";flex:1;height:1px;background:var(--border)}
.logincard form[hidden]{display:none}
.logincard #ssoform{margin-bottom:10px}

/* settings: single sign-on */
.ssoredir{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0 14px;padding:10px 12px;border-radius:12px;background:var(--surface-2);font-size:12.5px;color:var(--muted)}
.ssoredir code{font-size:12.5px;color:var(--ink);background:none;padding:0}
.ssogrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px 16px;margin-bottom:12px}
.ssogrid .fld.wide{grid-column:span 2}
.ssochk{display:flex;gap:8px;align-items:flex-start;margin:6px 0;font-size:13px;color:var(--ink-2)}
.ssoact{margin-top:12px}
@media (max-width:760px){.ssogrid .fld.wide{grid-column:auto}}
.ssocard label.ssochk{display:flex;width:100%}

/* certificate expiry on the Domains page */
.sslcell{white-space:nowrap}
.sslchip{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 10px;border-radius:999px;background:var(--surface-3);color:var(--ink-2)}
.sslchip::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;flex:0 0 auto}
.sslchip.ok{background:var(--ok-tint);color:var(--ok-ink)}
.sslchip.renew,.sslchip.soon{background:var(--warn-tint);color:var(--warn-ink)}
.sslchip.expired,.sslchip.mismatch{background:var(--danger-tint);color:var(--danger-ink)}
.sslchip.unknown{background:var(--surface-3);color:var(--muted)}
.sslbanner .sub > div{display:flex;align-items:center;gap:10px;margin-top:6px}

/* Domains: a hostname or a type word never breaks mid-word; the redirect column gives way instead */
.domtbl td{white-space:nowrap}
.domtbl td.clip{white-space:normal}
.sslbanner{align-items:flex-start}
@media (max-width:760px){.domtbl td{white-space:normal}}
@media (min-width:761px) and (max-width:1400px){.domtbl th,.domtbl td{padding-left:6px;padding-right:6px}}
@media (min-width:761px) and (max-width:1100px){.domtbl td{white-space:normal}}
@media (min-width:761px) and (max-width:1000px){.domtbl th:nth-child(6),.domtbl td:nth-child(6),.domtbl th:nth-child(8),.domtbl td:nth-child(8){display:none}}

/* roles: the owner ticks what each role may do */
.permhead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.permhead h3{margin:0}
.permhead .mini{margin-left:auto}
.permhead .chip[hidden],.permhead .mini[hidden]{display:none}
.permcell{
  width:28px;height:28px;padding:0;border-radius:8px;display:inline-grid;place-items:center;cursor:pointer;
  background:transparent;border:1px dashed var(--border-strong);color:var(--muted);font-size:14px;line-height:1;
  transition:background-color .15s, border-color .15s, color .15s;
}
.permcell:hover:not(:disabled){background:var(--accent-wash);border-color:var(--accent);color:var(--accent-ink);transform:none}
.permcell.on{background:var(--ok-tint);border:1px solid transparent;color:var(--ok-ink)}
.permcell.on:hover:not(:disabled){background:var(--danger-tint);color:var(--danger-ink)}
.permcell:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.permcell:disabled{cursor:not-allowed;opacity:.45;border-style:solid;border-color:transparent;background:none}
.permcell:disabled.on{opacity:.65;background:var(--ok-tint)}

/* ---- launch list summary (Leads) ---- */
.launch h3{margin:0 0 12px}
.lgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px 26px}
.lspark{height:40px;margin:6px 0 4px;color:var(--accent,#2563eb)}
.lspark svg{display:block}
.lbig{font-size:26px;font-weight:700;letter-spacing:-.02em}
.lbig .sub{font-size:12.5px;font-weight:400;letter-spacing:0}
.lbar{display:grid;grid-template-columns:minmax(80px,38%) 1fr auto;gap:10px;align-items:center;margin:7px 0;font-size:13px}
.lbar i{display:block;height:8px;border-radius:99px;background:var(--accent,#2563eb);opacity:.85;min-width:3px}
.lbar b{font-variant-numeric:tabular-nums}
.lwording{margin-top:16px;border-top:1px solid var(--border);padding-top:12px}
.lwording summary{cursor:pointer;font-weight:600;font-size:14px}
.lwording .lgrid{margin-top:12px}
.lwording textarea{width:100%;box-sizing:border-box;font:inherit;font-size:13px;line-height:1.5;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2,var(--surface));color:inherit;resize:vertical}
.lwording button{margin-top:8px}

.lspark .kspark{position:static;display:block;width:150px;height:40px;opacity:1}
.lwording textarea{height:auto}
.lwording textarea.lw-mail{min-height:285px}
.lwording textarea.lw-sms{min-height:92px}

/* ---- opening tools (page editor) and launch extras (Leads) ---- */
.opentools .ot-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:6px 0}
.opentools .ot-sep{border-top:1px solid var(--border);margin:14px 0 10px}
.opentools .ot-in{width:100%;font-size:12.5px}
.opentools .ot-out{margin-top:8px;padding:10px 12px;border:1px dashed var(--border);border-radius:10px;font-size:13px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.opentools .ot-out[hidden]{display:none}
.opentools .ot-out code{word-break:break-all;flex:1 1 260px}
.lmore{margin-top:18px;padding-top:14px;border-top:1px solid var(--border)}
.lsrc{display:grid;grid-template-columns:1fr auto;gap:2px 10px;margin:7px 0;font-size:13px}
.lsrc em{grid-column:1/-1;font-style:normal;font-size:11.5px;color:var(--muted)}
.ldraw{margin-top:18px;padding-top:14px;border-top:1px solid var(--border)}
.ldraw .formrow{flex-wrap:wrap;gap:8px;align-items:center}
.ldrawrow{margin:12px 0 0;padding:10px 12px;border:1px solid var(--border);border-radius:10px;font-size:13px}
.ldrawrow ol{margin:6px 0;padding-left:20px}

.ldraw #dr_prize{flex:1 1 280px;min-width:240px}

/* ---- Connect with LinkOS: the approval screen a connected site sends people to ---- */
.cxcard{width:min(440px,calc(100vw - 32px))}
.cxcard .cx-title{font-size:20px;line-height:1.3;margin:18px 0 10px;color:var(--ink)}
.cxcard p{color:var(--ink2);line-height:1.5;margin:0 0 12px}
.cxcard .cx-lead{font-size:15px;color:var(--ink)}
.cxcard .cx-ws{font-size:14px}
.cxcard select{width:100%;margin-top:4px}
.cxcard .cx-box{border:1px solid var(--border);border-radius:12px;padding:12px 14px;margin:0 0 12px;background:var(--surface2)}
.cxcard .cx-box ul{margin:6px 0 0;padding-left:18px;color:var(--ink2);font-size:13.5px;line-height:1.5}
.cxcard .cx-box li+li{margin-top:4px}
.cxcard .cx-k{font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.cxcard .cx-no{background:transparent}
.cxcard .mini-note{margin-top:14px}
.cxcard .cx-note{font-size:13px;line-height:1.5;color:var(--ink2);background:var(--accent-soft);border-radius:10px;padding:10px 12px;margin:0 0 12px}

/* ---- Opening Pro status on the Opening day card and Billing ---- */
.opro{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:12px 14px;border-radius:12px;background:var(--surface2);border:1px solid var(--border)}
.opro.on{align-items:center;justify-content:flex-start}
.opro.full{border-color:var(--warn);background:color-mix(in srgb,var(--warn) 8%,var(--surface))}
.opro b{font-weight:600}
.opro p{margin:6px 0 0;max-width:62ch}
.opro-acts{display:flex;gap:8px;flex-wrap:wrap}
.ok-note{margin-top:10px;color:var(--ok,#15803d);font-weight:600}

/* a design saved from the public website: the note on the sign-up form and the screen after */
.draftnote{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;margin:0 0 16px;border-radius:12px;
  background:color-mix(in srgb,#16a34a 10%,transparent);border:1px solid color-mix(in srgb,#16a34a 30%,transparent);
  color:inherit;font-size:14px;line-height:1.45}
.draftnote svg{flex:none;margin-top:2px;color:#16a34a}
