/* PLNM workbench. Light analytics UI: white cards on a soft canvas, large readable figures,
   charts that answer the pointer. Colour carries meaning: blue for the main measure, green/red
   for change, one stable colour per persona. */
:root {
  color-scheme: light;
  /* brand */
  --night: #0F1416;   /* dark ground: near-black, cool */
  --night-2: #171D20;
  --night-line: rgba(255, 255, 255, .07);
  --lime: #D9B77E;    /* accent: Dubai sand, on dark and for calls to action */
  --rise: #6FD39A;    /* up, on dark */
  --deep: #1F3D5C;    /* main measure on light: deep ink blue */
  --mint: #EFE9DD;
  --paper: #F6F4EF;
  --stone: #C1CBCC;
  --slate: #848689;
  /* roles */
  --canvas: var(--paper);
  --panel: #ffffff;
  --solid: #ffffff;
  --sunk: #F1EEE7;
  --ink: #11171A;
  --ink-2: #3A4247;
  --muted: #6B7276;
  --line: rgba(17, 23, 26, .09);
  --line-2: rgba(17, 23, 26, .18);
  --accent: #11171A;
  --accent-2: #1F3D5C;
  --accent-soft: #EFE9DD;
  --c-blue: #1F3D5C; --c-sky: #2a78d6; --c-orange: #eb6834; --c-green: #00875c; --c-purple: #6250d6;
  --c-yellow: #eda100; --c-red: #c2413a; --c-teal: #00875c; --c-grey: #9aa6a7;
  --bar: #DAD6CD;
  --track: rgba(19, 37, 36, .07);
  --up: #00875c;
  --down: #c2413a;
  --tier-hot: #c2413a; --tier-warm: #eda100; --tier-nurture: #00875c; --tier-cold: #9aa6a7;
  /* categorical, validated (scripts/validate_palette.js, light): fixed order, colour follows the entity */
  --c1: #00875c; --c2: #6250d6; --c3: #eb6834; --c4: #2a78d6; --c5: #eda100;
  --c6: #b5476b; --c7: #8a9a2e; --c8: #e87ba4; --c9: #848689; --c10: #4f6f6b;
  --fs-xs: 11px; --fs-sm: 12.5px; --fs-base: 13.5px; --fs-md: 16px; --fs-lg: 30px; --fs-kpi: 30px;
  --fw-regular: 400; --fw-medium: 500; --fw-bold: 600;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --side: 240px;
  --insp: 430px;
  --r: 4px;
  --glass: #ffffff;
  --glass-border: var(--line);
  --blur: none;
  --shadow: none;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; color: var(--ink); font: var(--fw-regular) var(--fs-base)/1.5 var(--sans); -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1;
  background: var(--canvas); }
button, select, input, textarea { font: inherit; color: inherit; font-variant-numeric: inherit; }
svg text { font-family: var(--sans); font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }
.muted { color: var(--muted); }
.pad { padding: 16px; }
.mono, .n, .meta, .tick { font-variant-numeric: lining-nums tabular-nums; }
.mono { font-family: var(--mono); font-size: .95em; }

/* shell */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.app.with-insp { grid-template-columns: var(--side) minmax(0, 1fr) var(--insp); }
.side { background: transparent; border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.brand { padding: 24px 24px 18px; font-family: var(--sans); font-weight: var(--fw-bold); font-size: 20px; letter-spacing: .14em; color: #2b2f37; }
nav { padding: 4px 8px; overflow: auto; }
nav .grp { padding: 16px 16px 4px; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
nav button { position: relative; display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 7px 16px; margin: 1px 0; color: #5d626d; cursor: pointer; font-weight: var(--fw-medium); transition: color .15s; }
nav button:hover { color: #2b2f37; }
nav button.active { color: #22262d; font-weight: var(--fw-bold); }
nav button.active::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: #3a3f49; }
nav button[hidden] { display: none; }

.work { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; padding: 6px 16px 28px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }

/* query bar */
.qbar { position: sticky; top: 8px; z-index: 3; margin: 10px 16px 10px; border-radius: var(--r);
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; }
.qbar[hidden] { display: none; }
.qbar .lbl { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.qbar .expr { font-size: var(--fs-sm); color: var(--muted); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.qbar.bare .expr { margin-left: 0; max-width: none; }
.qbar .expr b { color: var(--ink); font-weight: var(--fw-bold); }
.side .side-help { display: block; padding: 0 24px 6px; font-size: var(--fs-sm); color: var(--muted); text-align: left; }
.side .side-help:hover { color: var(--ink); }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; background: var(--solid); border: 1px solid var(--line); }
.seg button { background: none; border: 0; border-radius: 4px; padding: 4px 11px; cursor: pointer; font-size: var(--fs-sm); color: var(--ink-2); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--accent-soft); color: var(--ink); font-weight: var(--fw-bold); }
select, input { font: inherit; font-size: var(--fs-base); padding: 6px 10px; border: 1px solid var(--line-2); background: var(--solid); color: var(--ink); border-radius: 6px; }
select:focus, input:focus { outline: 2px solid rgba(20, 24, 33, .08); border-color: var(--line-2); }
.btn { font-size: var(--fs-base); padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--solid); color: var(--ink); cursor: pointer;
  text-decoration: none; display: inline-block; font-weight: var(--fw-medium); }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: var(--fs-sm); }

/* status line */
/* status ticker: one slow line above the query bar, pauses on hover */
.ticker { position: relative; margin: 12px 16px 0; height: 34px; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--glass-border); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  font-size: var(--fs-sm); color: var(--ink-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.tk-track { display: flex; width: max-content; height: 100%; align-items: center; animation: tk var(--tk-dur, 60s) linear infinite; }
.ticker:hover .tk-track { animation-play-state: paused; }
.tk-run { display: flex; align-items: center; white-space: nowrap; }
.tk-i { padding: 0 2px; }
.tk-i b { color: var(--ink); font-weight: var(--fw-bold); }
.tk-i b.up { color: var(--up); } .tk-i b.warnc { color: #b07a00; }
.tk-n { color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.tk-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); margin: 0 14px; }
@keyframes tk { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tk-track { animation: none; }
  .ticker { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* page head */
.view-head h2 { margin: 0 0 3px; font-size: var(--fs-lg); font-weight: var(--fw-bold); letter-spacing: -.01em; }
.view-head p { margin: 0; color: var(--muted); font-size: var(--fs-base); max-width: 980px; }

/* cards */
.row { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; }
.panel { background: var(--panel); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.ph { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px 8px; flex-wrap: wrap; }
.ph h3 { margin: 0; font-size: var(--fs-md); font-weight: var(--fw-bold); }
.csv-btn { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line-2) !important; border-radius: 6px; padding: 1px 7px !important; order: 3; }
.csv-btn:hover { color: var(--ink); border-color: var(--ink-2) !important; }
.ph .meta { margin-left: auto; font-size: var(--fs-sm); color: var(--muted); min-width: 0; }
.pb { padding: 6px 18px 16px; min-width: 0; }
.pb.flush { padding: 0 0 4px; }
.foot { padding: 10px 18px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 18px 10px; }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.kpi { background: var(--panel); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px 10px;
  display: flex; flex-direction: column; min-width: 0; }
.kpi .l { font-size: var(--fs-sm); color: var(--muted); font-weight: var(--fw-medium); }
.kpi { container-type: inline-size; }
.kpi .v { font-size: clamp(19px, 17cqi, var(--fs-kpi)); font-weight: var(--fw-bold); line-height: 1.25; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums;
  margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v .nm { font-size: var(--fs-md); font-weight: var(--fw-bold); display: flex; align-items: center; white-space: normal; line-height: 1.25; overflow-wrap: anywhere; }
.kpi .s { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; line-height: 1.35; }
.kpi .spark { margin-top: auto; padding-top: 10px; width: 100%; height: 42px; box-sizing: border-box; }
.up { color: var(--up); } .down { color: var(--down); }
.delta { font-weight: var(--fw-bold); font-size: var(--fs-sm); }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; z-index: 1; background: rgba(250, 250, 251, .96); color: var(--muted); font-weight: var(--fw-bold); font-size: var(--fs-sm); border-bottom: 1px solid var(--line-2); }
td.n, th.n { text-align: right; font-variant-numeric: lining-nums tabular-nums; }
td.wrap { white-space: normal; }
.who { display: inline-flex; align-items: baseline; gap: 0; min-width: 170px; max-width: 230px; line-height: 1.35; }
.who .sw { flex: none; transform: translateY(-1px); }
tbody tr:hover td { background: rgba(20, 24, 33, .035); }
tbody tr.sel td { background: rgba(20, 24, 33, .06); }
tbody tr:last-child td { border-bottom: 0; }
.clickable tbody tr { cursor: pointer; }
.scroll { overflow: auto; max-height: 560px; }
.scroll.tall { max-height: calc(100vh - 280px); }
.cellbar { display: inline-block; width: 64px; height: 6px; background: var(--track); border-radius: 3px; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.cellbar i { display: block; height: 100%; background: var(--c-blue); border-radius: 3px; }
.heat { display: block; padding: 3px 8px; border-radius: 4px; text-align: right; cursor: pointer; }

/* markers */
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; flex: none; }
.tier { display: inline-flex; align-items: center; gap: 6px; text-transform: capitalize; font-weight: var(--fw-medium); }
.tier::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tier-cold); }
.tier-hot::before { background: var(--tier-hot); } .tier-warm::before { background: var(--tier-warm); }
.tier-nurture::before { background: var(--tier-nurture); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: var(--fs-sm); font-weight: var(--fw-bold); background: var(--sunk); color: var(--ink-2); }

/* charts */
.ch { position: relative; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--solid); border-radius: 6px;
  padding: 3px 10px; font-size: var(--fs-sm); cursor: pointer; color: var(--ink-2); }
.chip i { width: 10px; height: 10px; border-radius: 3px; }
.chip.off { color: var(--muted); background: var(--sunk); }
.chip.off i { background: var(--line-2) !important; }
.ch-plot { width: 100%; position: relative; }
.ch-svg { display: block; overflow: visible; }
.ch-svg .grid { stroke: rgba(20, 24, 33, .06); stroke-width: 1; shape-rendering: crispEdges; }
.ch-svg .base { stroke: rgba(20, 24, 33, .22); stroke-width: 1; shape-rendering: crispEdges; }
.ch-svg .tick { fill: #8a8f99; font-size: var(--fs-xs); font-family: var(--sans); font-variant-numeric: lining-nums tabular-nums; }
.ch-svg .axis-t { fill: #8a8f99; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .03em; font-family: var(--sans); }
.ch-svg .cross { stroke: rgba(20, 24, 33, .35); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-svg .hl { fill: rgba(20, 24, 33, .04); }
.ch-svg .hl { fill: var(--accent); fill-opacity: .06; }
.ch-svg .bar { transition: opacity .1s; }
.ch-tip { position: absolute; z-index: 4; pointer-events: none; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: var(--blur);
  backdrop-filter: none; border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 2px 6px rgba(16, 18, 24, .08); padding: 9px 12px; min-width: 170px; font-size: var(--fs-sm); }
.ch-tip .th { font-weight: var(--fw-bold); margin-bottom: 5px; }
.ch-tip .tr { display: flex; align-items: center; gap: 8px; padding: 1px 0; }
.ch-tip .tr i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ch-tip .tr span { color: var(--ink-2); flex: 1; }
.ch-tip .tr b { font-variant-numeric: lining-nums tabular-nums; }
.hb { display: flex; flex-direction: column; gap: 1px; }
.hb-row { display: grid; grid-template-columns: minmax(96px, 32%) minmax(60px, 1fr) var(--hb-v, 64px); gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; }
.hb.with-sub .hb-row { grid-template-columns: minmax(96px, 32%) minmax(60px, 1fr) var(--hb-v, 64px) var(--hb-s, 76px); }
.hb-row:hover { background: rgba(20, 24, 33, .035); }
.hb-row.click { cursor: pointer; }
.hb-l { display: flex; align-items: center; min-width: 0; }
.hb-l > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hb-t { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; }
.hb-f { height: 100%; border-radius: 4px; }
.hb-v { text-align: right; font-weight: var(--fw-bold); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.hb-s { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: lining-nums tabular-nums; }
.donut { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.donut svg .slice { transition: opacity .12s; stroke: #fff; stroke-width: 1.5; }
.donut svg .slice.dim { opacity: .25; }
.donut .d-big { font-size: var(--fs-lg); font-weight: var(--fw-bold); fill: var(--ink); font-family: var(--sans); }
.donut .d-sub { font-size: var(--fs-sm); fill: var(--muted); font-family: var(--sans); }
.d-list { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 1px; }
.d-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; }
.d-row:hover { background: rgba(20, 24, 33, .035); }
.d-row i { width: 10px; height: 10px; border-radius: 50%; }
.d-row b { font-variant-numeric: lining-nums tabular-nums; }

/* inspector */
.inspector { background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: none;
  position: sticky; top: 12px; margin: 12px 12px 12px 0; height: calc(100vh - 24px); overflow: auto; }
.inspector .ih { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(255, 255, 255, .9); z-index: 2; }
.inspector .ih .kind { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.inspector .ih h4 { margin: 0; font-size: var(--fs-md); display: flex; align-items: center; }
.inspector .ih .x { margin-left: auto; background: none; border: 0; font-size: var(--fs-lg); line-height: 1; cursor: pointer; color: var(--muted); }
.isec { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.isec h5 { margin: 0 0 8px; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 5px 12px; margin: 0; font-size: var(--fs-base); }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.lede-i { color: var(--ink-2); margin: 0; font-size: var(--fs-base); }
.list { margin: 0; padding-left: 18px; } .list li { margin: 3px 0; }

.drv { display: grid; grid-template-columns: 1fr 120px 52px; gap: 2px 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.drv:last-of-type { border-bottom: 0; }
.drv-l { font-size: var(--fs-base); font-weight: var(--fw-medium); } .drv-l .muted { font-size: var(--fs-xs); margin-left: 4px; font-weight: var(--fw-regular); }
.drv-x { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--muted); }
.div-bar { position: relative; height: 8px; background: var(--track); border-radius: 4px; }
.div-bar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-2); }
.div-bar span { position: absolute; top: 0; bottom: 0; }
.div-bar .pos { left: 50%; background: var(--up); border-radius: 0 4px 4px 0; } .div-bar .neg { right: 50%; background: var(--down); border-radius: 4px 0 0 4px; }
.ol, .st { font-size: var(--fs-sm); font-weight: var(--fw-bold); display: inline-flex; align-items: center; gap: 6px; }
.ol::before, .st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ol-strengthening, .st-ok { color: var(--up); } .ol-weakening, .st-failed { color: var(--down); }
.ol-stable, .ol-no-data, .st-missing { color: var(--muted); } .st-warn, .warnc { color: #b07a00; }

/* notes and empty states */
.note { padding: 10px 14px; background: #f2f3f5; border-radius: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: var(--fs-md); margin-bottom: 4px; }

/* language switch (sidebar foot) */
.side .lang { margin-top: auto; padding: 14px 24px 20px; border-top: 0; display: flex; align-items: center; gap: 10px; }
.side .lang .lbl { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* help */
.help { position: fixed; inset: 0; z-index: 20; display: flex; justify-content: flex-end; background: rgba(16, 18, 24, .25);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.help[hidden] { display: none; }
.help-panel { width: min(780px, calc(100vw - 24px)); height: calc(100% - 24px); margin: 12px; border-radius: var(--r); overflow: hidden;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,.15); }
.help-head { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.help-head h3 { margin: 0; font-size: var(--fs-md); }
.help-head .x { margin-left: auto; background: none; border: 0; font-size: var(--fs-kpi); cursor: pointer; color: var(--muted); }
.help-body { display: grid; grid-template-columns: 200px 1fr; min-height: 0; flex: 1; }
.help-toc { border-right: 1px solid var(--line); padding: 12px 8px; overflow: auto; }
.help-toc button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.help-toc button.on { background: var(--accent); color: #fff; font-weight: var(--fw-bold); }
.help-content { padding: 18px 26px 40px; overflow: auto; font-size: var(--fs-base); line-height: 1.6; }
.help-content h4 { font-size: var(--fs-md); margin: 0 0 10px; }
.help-content h5 { font-size: var(--fs-base); margin: 18px 0 6px; }
.help-content ol, .help-content ul { padding-left: 20px; }
.help-content li { margin: 5px 0; }
.help-content .step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; margin: 12px 0; }
.help-content .step b.n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: var(--fs-base); }
.help-content .tip { background: #f2f3f5; border-radius: 6px; padding: 10px 12px; margin: 12px 0; }
.help-content dl { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; }
.help-content dt { font-weight: var(--fw-bold); }
.help-content dd { margin: 0; color: var(--ink-2); }

/* products: area x unit-type matrix */
.matrix tbody tr { cursor: pointer; }
.matrix .heat { display: inline-flex; flex-direction: column; align-items: flex-end; min-width: 72px; line-height: 1.2; padding: 4px 8px; }
.matrix .heat small { font-size: var(--fs-xs); opacity: .75; font-weight: var(--fw-medium); }

/* persona cards: one quiet card per buyer logic; colour only in the marks, never as a band */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 16px; }
.pcard { background: var(--panel); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-border);
  border-radius: var(--r); padding: 20px 22px 16px; display: flex; flex-direction: column; gap: 14px;
  cursor: pointer; min-width: 0; }
.pcard:hover { border-color: var(--line-2); }
.pc-h { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: start; }
.pc-rank { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: var(--fw-bold); font-size: var(--fs-md);
  color: var(--ink); background: none; border: 1px solid var(--line-2); }
.pc-t h3 { margin: 1px 0 3px; font-size: 18px; font-weight: var(--fw-bold); letter-spacing: -.01em; line-height: 1.25; }
.pc-t p { margin: 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
.pc-h .ol { margin-top: 4px; white-space: nowrap; }
.pc-quote { margin: 0; font-size: var(--fs-base); color: var(--ink-2); font-style: italic; line-height: 1.5; }
.pc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pc-stats > div { padding: 10px 0 10px 12px; border-left: 1px solid var(--line); min-width: 0; container-type: inline-size; }
.pc-stats > div:first-child { border-left: 0; padding-left: 0; }
.pc-stats span { display: block; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pc-stats b { display: block; font-size: clamp(14px, 15cqi, 20px); font-weight: var(--fw-bold); margin-top: 2px; white-space: nowrap; letter-spacing: -.01em; }
.pc-k { display: block; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pc-typ { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pc-typ .pc-k { margin: 0 4px 0 0; }
.pc-tag { font-size: var(--fs-sm); font-weight: var(--fw-bold); padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--ink-2); }
.pc-sh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pc-leg { font-size: var(--fs-xs); color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.pc-leg i { width: 10px; height: 6px; border-radius: 3px; }
.pc-leg b { width: 2px; height: 10px; background: var(--ink); margin-left: 8px; border-radius: 1px; }
.mix { display: flex; flex-direction: column; gap: 5px; }
.mix-r { display: grid; grid-template-columns: 58px 1fr 38px 38px; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.mix-l { color: var(--ink-2); font-weight: var(--fw-medium); }
.mix.wide .mix-r { grid-template-columns: minmax(120px, 36%) minmax(60px, 1fr) 40px 42px; }
.mix.wide .mix-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-t { position: relative; height: 8px; background: var(--track); border-radius: 4px; }
.mix-t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.mix-t b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.mix-v { text-align: right; font-weight: var(--fw-bold); }
.mix-x { text-align: right; color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.mix-x.hi { color: var(--up); } .mix-x.lo { color: var(--down); }
.pc-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: var(--fs-sm); color: var(--ink-2); }
.pc-facts em { font-style: normal; color: var(--muted); }
.pc-areas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.pc-areas li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 38px; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.pc-areas li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-areas i { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.pc-areas u { display: block; height: 100%; border-radius: 3px; opacity: .75; }
.pc-areas b { text-align: right; }
.pc-gtm { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.pc-gtm ul { margin: 0; padding-left: 16px; font-size: var(--fs-sm); color: var(--ink-2); }
.pc-gtm li { margin: 2px 0; }
.pc-gtm p { margin: 0 0 10px; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.45; }
.pc-f { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.pc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pc-chip { font-size: var(--fs-xs); font-weight: var(--fw-bold); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--ink-2); }
.pc-when { font-size: var(--fs-xs); color: var(--muted); flex: 1; min-width: 120px; }
.pc-open { font-weight: var(--fw-bold); }
.pc-note { margin: 0; font-size: var(--fs-sm); }
@media (max-width: 560px) {
  .pc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-stats > div:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .pc-stats > div:nth-child(4) { border-top: 1px solid var(--line); }
  .pc-gtm { grid-template-columns: 1fr; }
}

.sub-h { margin: 14px 0 6px; font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* sign-in */
.login { min-height: 100vh; display: grid; place-items: center; align-content: center; justify-content: center; grid-template-columns: minmax(0, 400px); padding: 16px; }
.login-card { width: min(400px, 100%); background: var(--panel); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--line); border-radius: var(--r); padding: 28px 28px 22px; display: flex; flex-direction: column; gap: 12px; }
.login-card .brand { padding: 0; }
.login-card h1 { margin: 6px 0 0; font-size: var(--fs-lg); }
.login-card p { margin: 0; font-size: var(--fs-sm); }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink-2); }
.login-card input { font-size: var(--fs-base); padding: 9px 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--solid); }
.login-card .btn { padding: 10px; font-weight: var(--fw-bold); }
.login-err { color: var(--down); min-height: 1.2em; }
.login-card .lang { display: flex; justify-content: center; }
.who-am-i { margin-top: auto; padding: 12px 24px 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); color: var(--muted); }
.who-am-i span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-am-i + .lang { margin-top: 0; }

/* legal pages */
body.legal { background: var(--canvas); }
.legal-page { max-width: 760px; margin: 0 auto; padding: 32px 20px 60px; display: block; line-height: 1.6; }
.legal-page .brand { padding: 0; text-decoration: none; display: inline-block; margin-bottom: 16px; }
.legal-page h1 { font-size: var(--fs-lg); margin: 8px 0 16px; }
.legal-page h2 { font-size: var(--fs-md); margin: 22px 0 6px; }
.legal-draft { font-size: var(--fs-sm); color: #8a6100; background: #fff6e0; border-radius: 4px; padding: 6px 10px; display: inline-block; }
.legal-links { padding: 8px 24px 16px; font-size: var(--fs-xs); color: var(--muted); }
.legal-links a { color: var(--muted); }

/* developer profile head */
.dev-head .pb { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.dev-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.dev-top h2 { margin: 0; font-size: var(--fs-lg); }
.dev-head .kpi { box-shadow: none; }

/* ad intelligence: creative cards */
.crgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.cr { border: 1px solid var(--line); border-radius: var(--r); background: var(--solid); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cr-h { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); }
.cr-t { font-weight: var(--fw-bold); }
.cr p { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.cr-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.cr-tags .pc-tag { font-size: var(--fs-xs); padding: 2px 8px; }
.pc-tag.cta { background: none; border: 1px solid var(--line-2); }
.cr-f { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; font-size: var(--fs-xs); }
.cr-f a { color: var(--ink); font-weight: var(--fw-bold); text-decoration: none; }
#cr-theme { flex-wrap: wrap; }

@media (max-width: 1100px) {
  .app.with-insp { grid-template-columns: var(--side) minmax(0, 1fr); }
  .inspector { position: fixed; right: 0; top: 0; width: min(var(--insp), 100vw); z-index: 5; box-shadow: -8px 0 24px rgba(0,0,0,.12); }
  .span-8, .span-7, .span-6, .span-5, .span-4, .span-3 { grid-column: span 12; }
}
@media (max-width: 720px) {
  .app, .app.with-insp { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  nav button.active::before { left: 8px; right: 8px; top: auto; bottom: 0; width: auto; height: 2px; }
  .qbar { margin: 10px; top: 6px; }
  .inspector { margin: 0; border-radius: 0; height: 100vh; top: 0; }
  nav { display: flex; overflow-x: auto; padding: 0 6px 6px; }
  nav .grp { display: none; }
  nav button { width: auto; white-space: nowrap; }
  .side .lang { margin-top: 0; }
  .qbar { padding: 8px 12px; }
  .qbar .expr { display: none; }
  .qbar.bare .expr { display: block; flex: 1; min-width: 0; }
  main { padding: 12px; }
  .kv { grid-template-columns: 110px 1fr; }
  .help-body { grid-template-columns: 1fr; }
  .help-toc { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .help-toc button { white-space: nowrap; width: auto; }
  .help-content dl { grid-template-columns: 1fr; }
}
.setup form { display: flex; flex-wrap: wrap; gap: 8px; }
.setup input, .setup select, .setup textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--line, #ddd); border-radius: 6px; }
.setup textarea { width: 100%; box-sizing: border-box; font-family: ui-monospace, monospace; font-size: var(--fs-xs); }
.setup label { display: block; font-weight: 700; margin-top: 12px; }
.setup button { font: inherit; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line, #ddd); background: #fff; cursor: pointer; }

/* ---------- insights front page ---------- */
.lens-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.lens-bar .lbl { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--muted); }
.lens-bar select { min-width: 220px; }
.pulse { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) minmax(200px, 1fr); gap: 28px; padding: 20px 22px; align-items: center; }
.pulse .live { font-size: var(--fs-sm); color: var(--muted); }
.pulse .big { font-size: 40px; font-weight: var(--fw-bold); letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; }
.pulse .sub { color: var(--ink-2); font-size: var(--fs-base); }
.pulse .chips { display: grid; gap: 2px; margin-top: 10px; font-size: var(--fs-sm); color: var(--muted); }
.pulse .chip { font-weight: var(--fw-medium); border: 0; padding: 0; background: none; border-radius: 0; }
.pulse .chip.up { color: var(--up); } .pulse .chip.down { color: var(--down); }
.pulse .today { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
.pulse .today b { color: var(--ink); }
.pulse-bars { width: 100%; height: 92px; display: block; }
.pulse-bars rect { fill: var(--bar); }
.pulse-bars rect.now { fill: var(--ink-2); }
.pulse-ax { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.pulse-r { display: grid; gap: 14px; }
.deal { display: grid; gap: 2px; font-size: var(--fs-sm); }
.deal .lbl { font-size: var(--fs-sm); color: var(--muted); }
.deal b { font-size: var(--fs-md); }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.ins-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.ins-top { display: flex; justify-content: space-between; align-items: center; }
.ins-tag { font-size: var(--fs-sm); color: var(--muted); }
.ins-go { font-size: var(--fs-sm); color: var(--muted); text-decoration: none; }
.ins-go:hover { color: var(--ink); text-decoration: underline; }
.ins-card h4 { margin: 0; font-size: var(--fs-md); font-weight: var(--fw-medium); line-height: 1.35; }
.ins-card h4 b { font-weight: var(--fw-bold); }
.ins-fig { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ins-fig > :first-child { font-size: var(--fs-kpi); font-weight: var(--fw-bold); letter-spacing: -.01em; }
.ins-fig span:last-child { color: var(--muted); font-size: var(--fs-sm); }
.ins-why { margin: auto 0 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.ins-foot { font-size: var(--fs-sm); margin: 0; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; }
.rank li { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 5px 0;
  border-bottom: 1px solid var(--line); font-size: var(--fs-base); }
.rank li:last-child { border-bottom: 0; }
.rank li[data-href] { cursor: pointer; }
.rank li[data-href]:hover .rk-l { text-decoration: underline; }
.rk-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-s { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.rk-v { font-weight: var(--fw-bold); white-space: nowrap; min-width: 64px; text-align: right; }
.rk-v.up { color: var(--up); } .rk-v.down { color: var(--down); }
.lens-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 6px; }
.lens-k { display: grid; gap: 2px; padding: 12px 14px; border-left: 1px solid var(--line); }
.lens-k:first-child { border-left: 0; }
.lens-k > span { font-size: var(--fs-sm); color: var(--muted); }
.lens-k b { font-size: var(--fs-kpi); font-weight: var(--fw-bold); letter-spacing: -.01em; }
.lens-k b.up, .lens-k em.up { color: var(--up); } .lens-k b.down, .lens-k em.down { color: var(--down); }
.lens-k em { font-style: normal; font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.lens-k em small { color: var(--muted); font-weight: var(--fw-regular); }
.lens-row h5 { margin: 0 0 6px; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink-2); }
.lens-row > div { display: flex; flex-direction: column; gap: 6px; }
.wk { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.wk i { flex: 1; background: var(--bar); }
.wk i.now { background: var(--ink-2); }
@media (max-width: 1100px) { .pulse { grid-template-columns: 1fr 1fr; } .pulse-c { grid-column: 1 / -1; order: 3; } }
@media (max-width: 720px) {
  .pulse { grid-template-columns: 1fr; padding: 18px; } .pulse .big { font-size: 34px; }
  .ins-grid { grid-template-columns: 1fr; } .lens-bar select { min-width: 0; flex: 1; }
  .lens-row > div { grid-column: 1 / -1; } .lens-k { border-left: 0; border-top: 1px solid var(--line); } .lens-k:first-child { border-top: 0; }
}

/* reconcile */
.drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 26px; border: 1px dashed var(--line-2); border-radius: 6px;
  background: var(--sunk); cursor: pointer; }
.drop:hover { border-color: var(--accent); background: var(--solid); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop span { color: var(--muted); font-size: var(--fs-sm); }
.rc-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; margin-bottom: 12px; }
.rc-map label { display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--muted); }
.rc-map select { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--solid); color: var(--ink); min-width: 0; }
.rc-go { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.btn.primary[disabled] { opacity: .5; cursor: default; }
.rc-filter { margin: 10px 16px; }
.rc-st { font-size: var(--fs-sm); font-weight: var(--fw-bold); white-space: nowrap; }
.st-exact { color: var(--up); } .st-price_differs { color: #9a6a00; } .st-not_found { color: var(--down); }

/* content packs */
.cp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; font-size: var(--fs-sm); }
.cp-tools { margin-left: auto; display: flex; gap: 8px; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.cp-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cp-meta { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.cp-fig b { display: block; font-size: var(--fs-kpi); font-weight: var(--fw-bold); letter-spacing: -.01em; line-height: 1.2; }
.cp-fig span { font-size: var(--fs-sm); color: var(--muted); }
.cp-text { margin: 0; font-size: var(--fs-base); line-height: 1.55; color: var(--ink); padding: 10px 12px; background: var(--sunk); border-radius: 6px; }
.cp-src { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.cp-src a { color: var(--ink-2); }
.cp-method { margin: 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.cp-f { margin-top: auto; display: flex; justify-content: flex-end; }
.cp-limits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cp-limits li { display: grid; gap: 2px; font-size: var(--fs-sm); }
.cp-limits span { color: var(--muted); }
@media (max-width: 720px) { .cp-grid { grid-template-columns: 1fr; } .cp-tools { margin-left: 0; } }
.cp-bar .seg { flex-wrap: wrap; max-width: 100%; }
.cp-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.ch-svg .end-l { font-size: var(--fs-sm); fill: var(--ink); }
.ch-svg .end-n { font-weight: var(--fw-regular); fill: var(--muted); }
.ch-tip .tp { margin-top: 4px; color: var(--muted); font-size: var(--fs-xs); }

/* public landing page */
body.lp-body { background: var(--canvas); }
.lp-top { display: flex; justify-content: space-between; align-items: center; padding: 18px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--line); background: var(--solid); }
.lp-top .brand { padding: 0; }
.lp-top-r { display: flex; align-items: center; gap: 16px; }
.lp { max-width: 1180px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 48px) 24px; display: grid; gap: 40px; }
.lp-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 400px); gap: 48px; align-items: start; }
.lp-kicker { margin: 0 0 10px; font-size: var(--fs-sm); color: var(--muted); }
.lp-copy h1 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -.02em; font-weight: var(--fw-bold); max-width: 640px; }
.lp-lead { font-size: var(--fs-md); line-height: 1.55; color: var(--ink-2); max-width: 600px; margin: 16px 0 0; }
.lp-live { margin: 22px 0 0; padding-left: 12px; border-left: 2px solid var(--ink); font-size: var(--fs-base); color: var(--ink); max-width: 600px; }
.lp-chart { margin-top: 18px; max-width: 600px; }
.lp-bars { width: 100%; height: 60px; display: block; }
.lp-bars rect { fill: var(--bar); }
.lp-bars rect:nth-last-child(-n+7) { fill: var(--ink-2); }
.lp-form { background: var(--solid); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.lp-form h2 { margin: 0; font-size: 20px; }
.lp-form p { margin: 0; font-size: var(--fs-sm); }
.lp-form label { display: grid; gap: 4px; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--ink-2); }
.lp-form input, .lp-form select { padding: 9px 11px; }
.lp-form .btn { padding: 10px; font-weight: var(--fw-bold); }
.lp-switch, .lp-legal { text-align: center; }
.lp-legal a, .lp-foot a { color: var(--muted); }
.lp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-fact { padding: 18px 18px 18px 0; display: grid; gap: 4px; align-content: start; }
.lp-fact + .lp-fact { padding-left: 18px; border-left: 1px solid var(--line); }
.lp-fact b { font-size: 26px; font-weight: var(--fw-bold); letter-spacing: -.01em; font-variant-numeric: proportional-nums; }
.lp-fact span { font-size: var(--fs-sm); color: var(--ink-2); }
.lp-fact em { font-style: normal; font-size: var(--fs-xs); color: var(--muted); }
.lp-who { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.lp-who h3, .lp-src h3 { margin: 0 0 6px; font-size: var(--fs-md); }
.lp-who p, .lp-src p { margin: 0; font-size: var(--fs-base); color: var(--ink-2); line-height: 1.55; }
.lp-foot { max-width: 1180px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 48px) 32px; font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 860px) {
  .lp-hero { grid-template-columns: 1fr; gap: 28px; }
  .lp-fact + .lp-fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}
/* plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.plan.current { border-color: var(--ink-2); }
.plan h3 { margin: 0; font-size: 18px; }
.plan-price { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.plan ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: var(--fs-base); }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan-note { display: grid; gap: 8px; max-width: 520px; }
.plan-note label { display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--ink-2); }
.plan-note textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px; }
.who-am-i .trial { text-align: left; color: var(--ink-2); }
.who-am-i .link { text-align: left; }


/* ===================================================================================================
   PLNM visual language: dark night ground with lime on the chrome, paper and white for reading,
   deep green as the main measure, thin grotesk headlines, mono overlines, sharp corners, grid marks.
   =================================================================================================== */
body { letter-spacing: -.003em; }
.kick, .ins-tag, nav .grp, .qbar .lbl, .lens-bar .lbl, .deal .lbl, .cp-meta, th, .pc-stats span, .pc-k, .sub-h, .isec h5, .inspector .ih .kind, .lens-row h5 {
  font-family: var(--mono); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
.kick::before, .ins-tag::before { content: ""; display: inline-block; width: 5px; height: 5px; background: var(--deep); margin: 0 8px 1px 0; vertical-align: middle; }

/* sidebar: the dark brand column */
.side { background: var(--night); border-right: 0; color: var(--stone); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; letter-spacing: .18em; font-weight: 500; font-size: 17px; padding: 26px 24px 22px; }
.brand .mark { width: 18px; height: 18px; fill: var(--lime); flex: none; }
nav .grp { color: var(--slate); padding: 22px 24px 6px; }
nav button { color: var(--stone); padding: 7px 24px; margin: 0; border-radius: 0; font-weight: 400; }
nav button:hover { color: #fff; background: rgba(255, 255, 255, .03); }
nav button.active { color: #fff; font-weight: 500; background: rgba(155, 250, 148, .06); }
nav button.active::before { left: 0; top: 0; bottom: 0; width: 3px; border-radius: 0; background: var(--lime); }
.side .lang .lbl { color: var(--slate); }
.side .seg { background: transparent; border-color: var(--night-line); }
.side .seg button { color: var(--stone); }
.side .seg button.on { background: var(--lime); color: var(--night); }
.side .side-help, .side .legal-links, .side .legal-links a, .who-am-i { color: var(--slate); }
.side .side-help:hover, .side .legal-links a:hover { color: #fff; }
.who-am-i span { color: var(--stone); }
.who-am-i .link { color: var(--stone); }
.who-am-i .trial { color: var(--lime); }

/* ticker and query bar */
.ticker { background: var(--night); border: 0; color: var(--stone); border-radius: 0; margin: 0; height: 36px; }
.tk-i b { color: #fff; } .tk-i b.up { color: var(--lime); } .tk-n { color: var(--slate); }
.tk-dot { background: var(--lime); width: 3px; height: 3px; border-radius: 0; }
.qbar { border-radius: 0; margin: 0; top: 0; border: 0; border-bottom: 1px solid var(--line); background: var(--panel); padding: 10px 24px; }
.qbar .lbl { color: var(--muted); }
main { padding: 26px 24px 40px; gap: 18px; }

/* headings: thin, large; overline from the screen's menu group */
.view-head h2 { font-size: var(--fs-lg); font-weight: 400; letter-spacing: -.025em; line-height: 1.15; }
.view-head p { color: var(--muted); margin-top: 6px; }
.view-head .kick { display: block; color: var(--muted); margin-bottom: 10px; }

/* surfaces */
.panel, .kpi, .ins-card, .cp-card, .pcard, .plan, .lp-form { border-radius: var(--r); border-color: var(--line); }
.ph h3 { font-weight: 500; letter-spacing: -.01em; }
.kpi .v { font-weight: 400; font-size: clamp(22px, 18cqi, var(--fs-kpi)); letter-spacing: -.02em; font-variant-numeric: proportional-nums; }
.kpi .l { color: var(--muted); }
th { color: var(--muted); background: var(--panel); }
.seg { border-radius: 2px; } .seg button { border-radius: 1px; }
.seg button.on { background: var(--night); color: #fff; }
select, input, textarea, .btn { border-radius: 2px; }

/* buttons: lime with a dark arrow block, like the brand's calls to action */
.btn { font-weight: 500; }
.btn.primary { background: var(--lime); color: var(--night); border: 0; padding: 0 0 0 14px; display: inline-flex; align-items: center; gap: 14px; min-height: 38px; font-weight: 500; }
.btn.primary::after { content: "↗"; display: inline-grid; place-items: center; width: 30px; height: 30px; margin: 4px; background: var(--night); color: var(--lime); font-size: 13px; }
.btn.primary:hover { filter: brightness(.97); }
.btn.primary[disabled]::after { content: "…"; }

/* the weekly pulse: night panel with grid marks */
.pulse { background: var(--night); color: #fff; border: 0; position: relative;
  background-image: linear-gradient(var(--night-line) 1px, transparent 1px), linear-gradient(90deg, var(--night-line) 1px, transparent 1px);
  background-size: 64px 64px; background-position: -1px -1px; }
.pulse::after { content: ""; position: absolute; right: 0; bottom: 0; width: 48px; height: 48px;
  background: linear-gradient(var(--lime), var(--lime)) 0 24px / 24px 24px no-repeat, linear-gradient(var(--deep), var(--deep)) 24px 0 / 24px 24px no-repeat; opacity: .9; }
.pulse .live, .pulse .sub, .pulse .today, .pulse .deal .lbl, .pulse .muted, .pulse-ax { color: var(--stone); }
.pulse .big { font-weight: 300; font-size: 54px; letter-spacing: -.035em; }
.pulse .chip.up { color: var(--lime); } .pulse .chip.down { color: #ff9a8f; }
.pulse .today { border-top-color: var(--night-line); } .pulse .today b, .pulse .deal b { color: #fff; }
.pulse-bars rect { fill: #2f4a47; } .pulse-bars rect.now { fill: var(--lime); }
.pulse .deal span b { font-weight: 500; }

/* insight and content cards */
.ins-card, .cp-card { gap: 12px; }
.ins-tag { color: var(--ink-2); }
.ins-go { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
.ins-go:hover { color: var(--deep); text-decoration: none; }
.ins-card h4 { font-size: 17px; font-weight: 400; letter-spacing: -.01em; }
.ins-card h4 b { font-weight: 600; }
.ins-fig > :first-child, .cp-fig b, .lens-k b { font-weight: 400; letter-spacing: -.02em; font-variant-numeric: proportional-nums; }
.rk-v.up, .lens-k b.up, .lens-k em.up { color: var(--up); }
.wk i.now { background: var(--deep); }
.lens-grid { border-radius: var(--r); }
.cp-text { background: var(--accent-soft); border-left: 2px solid var(--deep); border-radius: 0; }

/* persona cards keep their meaning colours in the marks only */
.pc-rank { border-radius: 0; border-color: var(--line-2); font-weight: 500; }

/* charts on light: hairline grid, mono ticks */
.ch-svg .tick { font-family: var(--mono); font-size: 10px; fill: #7b8889; }
.ch-svg .axis-t { font-family: var(--mono); font-weight: 400; letter-spacing: .06em; fill: #7b8889; }
.ch-svg .grid { stroke: rgba(19, 37, 36, .07); } .ch-svg .base { stroke: rgba(19, 37, 36, .22); }
.hb-f { border-radius: 0 2px 2px 0; }
.chip.on, .chip { border-radius: 2px; }

/* plans */
.plan.current { border-color: var(--deep); box-shadow: inset 0 3px 0 var(--deep); }
.plan h3 { font-weight: 500; }

/* public landing page: night hero with grid marks, paper facts, lime call to action */
body.lp-body { background: var(--night); color: #fff; }
.lp-top { background: var(--night); border-bottom: 1px solid var(--night-line); }
.lp-top .brand { color: #fff; }
.lp-top .seg { background: transparent; border-color: var(--night-line); } .lp-top .seg button { color: var(--stone); }
.lp-top .seg button.on { background: var(--lime); color: var(--night); }
.lp-top .link { color: var(--stone); } .lp-top .link:hover { color: #fff; }
.lp { max-width: none; padding: 0; gap: 0; }
.lp-hero { max-width: none; padding: 72px clamp(16px, 6vw, 96px) 80px; position: relative;
  background-image: linear-gradient(var(--night-line) 1px, transparent 1px), linear-gradient(90deg, var(--night-line) 1px, transparent 1px);
  background-size: 96px 96px; background-position: -1px -1px; }
.lp-hero::after { content: ""; position: absolute; right: 0; bottom: 0; width: 192px; height: 192px; pointer-events: none;
  background: linear-gradient(#2f6b4f, #2f6b4f) 96px 0 / 96px 96px no-repeat, linear-gradient(var(--lime), var(--lime)) 0 96px / 96px 96px no-repeat,
              linear-gradient(#2f6b4f, #2f6b4f) 96px 96px / 96px 96px no-repeat; opacity: .55; }
.lp-kicker { font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--lime); }
.lp-copy h1 { font-weight: 300; font-size: clamp(34px, 4.6vw, 64px); letter-spacing: -.035em; line-height: 1.04; max-width: 760px; color: #fff; }
.lp-copy h1 em { font-style: normal; color: #5d7472; }
.lp-lead { color: var(--stone); font-size: 17px; max-width: 520px; }
.lp-live { border-left-color: var(--lime); color: #fff; }
.lp-bars rect { fill: #2f4a47; } .lp-bars rect:nth-last-child(-n+7) { fill: var(--lime); }
.lp .pulse-ax { color: var(--slate); }
.lp-form { background: var(--night-2); border: 1px solid var(--night-line); color: #fff; position: relative; z-index: 1; }
.lp-form h2 { font-weight: 400; letter-spacing: -.01em; }
.lp-form .muted, .lp-form small { color: var(--slate); }
.lp-form label { color: var(--stone); font-weight: 400; }
.lp-form input, .lp-form select { background: var(--night); border: 1px solid var(--night-line); color: #fff; }
.lp-form input:focus, .lp-form select:focus { border-color: var(--lime); outline: none; }
.lp-form .link { color: var(--lime); }
.lp-form .btn.primary { justify-content: space-between; }
.lp-legal a { color: var(--slate); }
.lp-facts { background: var(--paper); color: var(--ink); border: 0; padding: 0 clamp(16px, 6vw, 96px); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.lp-fact { padding: 36px 24px 36px 0; }
.lp-fact + .lp-fact { border-left: 1px solid var(--line); padding-left: 24px; }
.lp-fact b { font-weight: 300; font-size: 40px; letter-spacing: -.03em; color: var(--ink); }
.lp-fact span { color: var(--ink-2); }
.lp-fact em { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; font-size: 10px; color: var(--muted); }
.lp-who { background: var(--night); padding: 64px clamp(16px, 6vw, 96px); gap: 1px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.lp-who > div { border-top: 1px solid var(--night-line); padding-top: 18px; }
.lp-who h3 { font-weight: 400; font-size: 20px; color: #fff; letter-spacing: -.01em; }
.lp-who p { color: var(--stone); }
.lp-cta { background: var(--lime); color: var(--night); padding: 64px clamp(16px, 6vw, 96px); display: grid; gap: 18px; justify-items: start; position: relative; }
.lp-cta h2 { margin: 0; font-weight: 300; font-size: clamp(28px, 3.6vw, 48px); letter-spacing: -.03em; line-height: 1.08; max-width: 760px; }
.lp-cta p { margin: 0; max-width: 620px; color: #24413c; }
.lp-cta .btn.primary { background: var(--night); color: #fff; }
.lp-cta .btn.primary::after { background: var(--lime); color: var(--night); }
.lp-src { padding: 32px clamp(16px, 6vw, 96px) 8px; background: var(--night); }
.lp-src h3 { color: #fff; font-weight: 400; }
.lp-src p { color: var(--slate); }
.lp-foot { max-width: none; padding: 16px clamp(16px, 6vw, 96px) 32px; background: var(--night); color: var(--slate); }
.lp-foot a { color: var(--slate); }
@media (max-width: 860px) {
  .lp-hero { padding-top: 40px; } .lp-hero::after { width: 96px; height: 96px; background-size: 48px 48px; background-position: 48px 0, 0 48px, 48px 48px; }
  .lp-fact + .lp-fact { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .side { background: var(--night); }
  nav button.active::before { left: 8px; right: 8px; top: auto; bottom: 0; width: auto; height: 2px; }
  nav button { padding: 8px 12px; }
  main { padding: 18px 16px 32px; }
  .view-head h2 { font-size: 24px; }
}

/* map */
.map-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; font-size: var(--fs-sm); }
.map-bar .seg { flex-wrap: wrap; }
.map-legend { display: inline-flex; align-items: center; gap: 2px; }
.map-legend i { width: 22px; height: 10px; display: block; }
.map-legend span { margin-left: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.map-panel { padding: 0; }
#map { height: 620px; width: 100%; background: #e8eeec; z-index: 0; }
.leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.04); }
.leaflet-container { font: inherit; }
.leaflet-popup-content-wrapper, .leaflet-tooltip { border-radius: 2px; box-shadow: 0 2px 8px rgba(19, 37, 36, .18); }
.map-pop { display: grid; gap: 4px; min-width: 200px; font-size: var(--fs-sm); }
.map-pop > b { font-size: var(--fs-md); font-weight: 500; } .map-pop > span { color: var(--muted); }
.map-pop dl { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 6px 0; }
.map-pop dt { color: var(--muted); } .map-pop dd { margin: 0; text-align: right; font-weight: 600; }
.map-pop a { color: var(--deep); }
@media (max-width: 720px) { #map { height: 420px; } }
/* listing check */
#lc-text { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid var(--line-2); margin-bottom: 12px; resize: vertical; }
.lc-fields input { padding: 6px 8px; border: 1px solid var(--line-2); min-width: 0; width: 100%; box-sizing: border-box; }
.lc-size { display: flex; gap: 6px; } .lc-size select { width: 78px; flex: none; }
.lc-out { grid-column: 1 / -1; display: grid; gap: 16px; }
.lc-verdict { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 16px 20px; background: var(--night); color: var(--stone); }
.lc-verdict b { font-size: 40px; font-weight: 300; letter-spacing: -.03em; color: #fff; }
.lc-verdict b.up { color: var(--lime); } .lc-verdict b.down { color: #ff9a8f; }

/* workspace switch and skyline */
.ws { display: grid; grid-template-columns: 1fr 1fr; margin: 0 16px 6px; border: 1px solid var(--night-line); }
.ws button { background: none; border: 0; color: var(--stone); padding: 7px 4px; cursor: pointer; font-size: var(--fs-sm); }
.ws button.on { background: var(--lime); color: var(--night); font-weight: 500; }
.lp-sky { display: block; width: 100%; max-width: 600px; height: auto; margin-top: 28px; }
@media (max-width: 720px) { .ws { margin: 0 12px 8px; } }
.lp-sky { max-width: 760px; margin-top: 34px; }
.lp-sky-ax { max-width: 760px; }
.lp-hero { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 400px); }
@media (max-width: 860px) { .lp-hero { grid-template-columns: 1fr; } }

/* nothing of the app shows before sign-in state is known */
body.booting { background: var(--night); } body.booting .app { visibility: hidden; }
/* tighter hero, calmer colours */
.lp-hero { padding: 36px clamp(16px, 6vw, 96px) 40px; gap: 40px; align-items: center; }
.lp-hero::after { display: none; }
.lp-copy h1 { font-size: clamp(30px, 3.6vw, 50px); }
.lp-lead { font-size: 15.5px; margin-top: 12px; }
.lp-live { margin-top: 16px; border-left-color: #E9C98A; }
.lp-kicker { color: var(--stone); }
.lp-sky { max-width: 620px; margin-top: 20px; }
.lp-sky-ax { max-width: 620px; }
.lp-form { padding: 20px; gap: 9px; }
.lp-form input, .lp-form select { padding: 7px 10px; }
.lp-who .lp-kicker { color: var(--slate); }

/* palette pass: sand accent, ink neutrals, green only where something rises */
.pulse-bars rect { fill: #2A3034; } .pulse-bars rect.now { fill: var(--lime); }
.pulse .chip.up, .lc-verdict b.up { color: var(--rise); }
.pulse::after { background: linear-gradient(var(--lime), var(--lime)) 0 24px / 24px 24px no-repeat, linear-gradient(#2A3034, #2A3034) 24px 0 / 24px 24px no-repeat; }
nav button.active { background: rgba(217, 183, 126, .07); }
.btn.primary { color: #11171A; }
.btn.primary::after { background: #11171A; color: var(--lime); }
.lp-cta { background: var(--lime); }
.lp-cta p { color: #3A3122; }
.lp-cta .btn.primary { background: #11171A; color: #fff; }
.lp-cta .btn.primary::after { background: var(--lime); color: #11171A; }
.lp-form input:focus, .lp-form select:focus { border-color: var(--lime); }
.lp-live { border-left-color: var(--lime); }
.wk i.now { background: var(--deep); }
.kick::before, .ins-tag::before { background: var(--lime); }
.plan.current { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--lime); }
.cp-text { border-left-color: var(--lime); }
.lp-copy h1 em { color: #5F676C; }


/* =====================================================================================================
   Light dashboard (Rexora-style): soft sage page, white rounded cards, top pill navigation, lime active
   pills, green/red delta chips, orange highlight, semibold figures.
   ===================================================================================================== */
:root {
  --canvas: #EEF3EF; --paper: #EEF3EF; --panel: #ffffff; --solid: #ffffff; --sunk: #F5F8F6;
  --ink: #141A17; --ink-2: #3E4742; --muted: #7B857F; --line: rgba(20, 26, 23, .07); --line-2: rgba(20, 26, 23, .14);
  --lime: #BDF09A; --lime-ink: #1C2A17; --orange: #F28C38; --rise: #2E8B2E;
  --deep: #57B04A; --c-blue: #57B04A; --c-orange: #F28C38; --c-sky: #5B8DEF; --c-green: #2E8B2E;
  --bar: #E3EAE5; --up: #2E8B2E; --down: #D9483B; --accent: #141A17; --accent-soft: #EEF7E8;
  --r: 18px; --sans: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fw-bold: 600; --fs-lg: 26px; --fs-kpi: 32px;
}
body { background: var(--canvas); letter-spacing: -.005em; }
.app, .app.with-insp { display: block; max-width: 1480px; margin: 0 auto; padding: 14px 18px 0; }
.work { min-height: auto; }
.ticker { display: none !important; }

/* top bar */
.side { position: sticky; top: 10px; z-index: 6; height: auto; display: flex; align-items: center; gap: 14px; flex-wrap: nowrap;
  background: var(--panel); border-radius: 22px; padding: 10px 12px 10px 20px; color: var(--ink); border: 0; overflow: visible;
  box-shadow: 0 1px 2px rgba(20, 26, 23, .04); }
.brand { order: 0; padding: 0; color: var(--ink); font-size: 19px; font-weight: 700; letter-spacing: .02em; gap: 9px; flex: none; }
.brand .mark { fill: var(--ink); width: 20px; height: 20px; }
nav#tabs { order: 1; flex: 1; display: flex; justify-content: center; align-items: center; gap: 2px; padding: 4px; overflow-x: auto;
  background: var(--sunk); border-radius: 999px; min-width: 0; scrollbar-width: none; }
nav#tabs::-webkit-scrollbar { display: none; }
nav .grp, nav#tabs .grp { display: none !important; }
nav button { width: auto; flex: none; white-space: nowrap; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; }
nav button:hover { color: var(--ink); background: rgba(20, 26, 23, .04); }
nav button.active { background: var(--lime); color: var(--lime-ink); font-weight: 600; }
nav button.active::before { display: none; }
.ws { order: 2; margin: 0; flex: none; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; display: inline-grid; }
.ws button { color: var(--ink-2); padding: 7px 12px; font-size: 12.5px; }
.ws button.on { background: var(--ink); color: #fff; }
.side .side-help { order: 3; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); cursor: pointer;
  font-weight: 700; display: grid; place-items: center; flex: none; padding: 0; }
.icon-btn:hover { background: var(--sunk); }
.side .lang { order: 4; margin: 0; padding: 0; border: 0; }
.side .lang .lbl { display: none; }
.side .seg { border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); }
.side .seg button { color: var(--ink-2); border-radius: 999px; padding: 5px 10px; }
.side .seg button.on { background: var(--ink); color: #fff; }
.side .legal-links { display: none; }
.who-am-i { order: 5; margin: 0; padding: 4px 6px 4px 4px; display: flex; align-items: center; gap: 9px; flex-direction: row; flex: none;
  border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); }
.who-am-i .av { width: 32px; height: 32px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); font-style: normal; font-weight: 700;
  display: grid; place-items: center; font-size: 12.5px; }
.who-t { display: grid; line-height: 1.15; max-width: 150px; }
.who-t b { color: var(--ink); font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-t small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-am-i .link { color: var(--muted); font-size: 12px; } .who-am-i .link:hover { color: var(--down); }
.who-am-i .trial { color: var(--rise); }

/* filters and page head */
.qbar { position: static; background: transparent; border: 0; padding: 18px 2px 0; gap: 8px; }
.qbar .lbl { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--muted); }
.qbar .seg, .lens-bar select, .qbar select { border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); }
.qbar select, .lens-bar select { padding: 7px 14px; }
.seg { border-radius: 999px; padding: 3px; } .seg button { border-radius: 999px; padding: 5px 12px; }
.seg button.on { background: var(--lime); color: var(--lime-ink); font-weight: 600; }
main { padding: 18px 2px 28px; gap: 16px; }
.view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.view-head .kick { display: none; }
.view-head h2 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.view-head p { margin-top: 4px; font-size: 13.5px; max-width: 860px; }
.btn { border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); padding: 9px 16px; font-weight: 500; }
.btn.ghost { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.btn.ghost svg { width: 17px; height: 17px; }
.btn.primary { background: var(--lime); color: var(--lime-ink); border: 0; padding: 10px 18px; min-height: 0; gap: 8px; border-radius: 999px; font-weight: 600; }
.btn.primary::after { content: "↗"; width: auto; height: auto; margin: 0; background: none; color: inherit; font-size: 14px; display: inline; }
.app-foot { padding: 10px 2px 28px; font-size: 12px; color: var(--muted); } .app-foot a { color: var(--muted); }

/* cards */
.panel, .kpi, .ins-card, .cp-card, .pcard, .plan, .lens-panel { background: var(--panel); border: 0; border-radius: var(--r); box-shadow: 0 1px 2px rgba(20, 26, 23, .03); }
.ph { padding: 18px 20px 6px; } .ph h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.ph .meta { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); }
.ph::after { content: "···"; color: var(--muted); font-weight: 700; letter-spacing: 1px; margin-left: 12px; }
.pb { padding: 12px 20px 18px; } .pb.flush { padding: 6px 0 0; }
.foot { border-top: 1px solid var(--line); color: var(--muted); }
.kpis { gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi { padding: 18px 20px 14px; position: relative; }
.kpi::after { content: "↗"; position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13px; }
.kpi .l { font-size: 14px; color: var(--ink-2); font-weight: 500; padding-right: 40px; }
.kpi .v { font-size: clamp(24px, 17cqi, var(--fs-kpi)); font-weight: 600; letter-spacing: -.025em; margin-top: 14px; }
.kpi .s { font-size: 12px; margin-top: 6px; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.delta.up { background: #E3F6D8; color: #2E7D21; } .delta.down { background: #FCE4E1; color: #C23A2E; }
th { font-family: var(--sans) !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 12px !important; font-weight: 500;
  color: var(--muted); background: var(--sunk) !important; }
td { border-color: var(--line); }
tbody tr:hover td { background: #FAFCFA; }
.csv-btn { border-radius: 999px !important; }
.hb-f { border-radius: 999px; }
.ch-svg .tick, .ch-svg .axis-t { font-family: var(--sans); fill: #8C958F; }
.ch-svg .grid { stroke: rgba(20, 26, 23, .06); stroke-dasharray: 3 4; }

/* insights */
.pulse { background: var(--panel); color: var(--ink); background-image: none; border-radius: var(--r); }
.pulse::after { display: none; }
.pulse .live, .pulse .sub, .pulse .today, .pulse .deal .lbl, .pulse .muted, .pulse-ax { color: var(--muted); }
.pulse .big { font-weight: 600; font-size: 48px; color: var(--ink); letter-spacing: -.03em; }
.pulse .chip.up { color: #2E7D21; } .pulse .chip.down { color: #C23A2E; }
.pulse .today { border-top-color: var(--line); } .pulse .today b, .pulse .deal b { color: var(--ink); }
.pulse .deal .lbl { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 12px; }
.pulse-bars rect { fill: #E3EAE5; } .pulse-bars rect.now { fill: var(--orange); }
.ins-tag, .kick, .cp-meta, .deal .lbl, .lens-bar .lbl, .lens-row h5, .pc-stats span, .pc-k, .sub-h, .isec h5 { font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.ins-tag { font-size: 12px; font-weight: 600; background: var(--sunk); padding: 3px 10px; border-radius: 999px; color: var(--ink-2); }
.ins-tag::before, .kick::before { background: var(--deep); border-radius: 50%; }
.ins-go { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 12px; }
.ins-card h4 { font-weight: 500; } .ins-card h4 b { font-weight: 700; }
.wk i { background: #E3EAE5; border-radius: 6px 6px 0 0; } .wk i.now { background: var(--orange); }
.lens-grid { border: 0; gap: 10px; } .lens-k { background: var(--sunk); border: 0 !important; border-radius: 14px; }
.lc-verdict { background: var(--panel); color: var(--muted); border-radius: var(--r); }
.lc-verdict b { color: var(--ink); font-weight: 600; } .lc-verdict b.up { color: #2E7D21; } .lc-verdict b.down { color: #C23A2E; }
.cp-text { background: var(--sunk); border-left: 0; border-radius: 12px; }
.rc-st { padding: 3px 10px; border-radius: 999px; }
.st-exact { background: #E3F6D8; } .st-price_differs { background: #FFF1DD; color: #9a5a00; } .st-not_found { background: #FCE4E1; }
.drop { border-radius: 16px; }
#map { border-radius: var(--r); }
.map-panel { overflow: hidden; }
#lc-text, .lc-fields input, .rc-map select, select, input, textarea { border-radius: 12px; }
.plan.current { box-shadow: inset 0 0 0 2px var(--lime); }
.pc-rank { border-radius: 50%; }

@media (max-width: 1100px) {
  .side { flex-wrap: wrap; } nav#tabs { order: 6; flex-basis: 100%; justify-content: flex-start; }
}
@media (max-width: 720px) {
  .app, .app.with-insp { padding: 8px 10px 0; }
  .side { padding: 8px; gap: 8px; border-radius: 18px; }
  .who-t, .who-am-i .link { display: none; }
  .view-head { flex-direction: column; } .export { display: none; }
}
@media print { .side, .qbar, .app-foot, .export { display: none !important; } body { background: #fff; } }

/* ---------- public landing page: light, modern ---------- */
body.lp-body { background: #F4F7F5; color: var(--ink); }
.lp-top { background: transparent; border: 0; padding: 18px clamp(16px, 5vw, 64px); }
.lp-top .brand { color: var(--ink); } .lp-top .brand .mark { fill: var(--ink); }
.lp-top .seg { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; }
.lp-top .seg button { color: var(--ink-2); } .lp-top .seg button.on { background: var(--ink); color: #fff; }
.lp-top .link { color: var(--ink); font-weight: 600; background: #fff; border: 1px solid var(--line-2); padding: 8px 16px; border-radius: 999px; }
.lp { padding: 0 clamp(12px, 4vw, 48px) 24px; gap: 18px; max-width: 1360px; margin: 0 auto; }
.lp-hero { background: #fff; background-image: none; border-radius: 32px; padding: 44px clamp(20px, 4vw, 56px); gap: 44px;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 400px); box-shadow: 0 1px 2px rgba(20, 26, 23, .04); }
.lp-hero::after { display: none; }
.lp-kicker { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--ink-2); font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; background: var(--sunk); padding: 6px 12px; border-radius: 999px; }
.lp-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #57B04A; }
.lp-copy h1 { color: var(--ink); font-weight: 700; font-size: clamp(34px, 4.4vw, 60px); letter-spacing: -.04em; line-height: 1.02; margin-top: 16px; }
.lp-copy h1 em { color: #A6B0AA; }
.lp-lead { color: var(--ink-2); font-size: 16px; }
.lp-live { border-left: 0; background: var(--sunk); padding: 10px 14px; border-radius: 14px; color: var(--ink-2); font-size: 13.5px; }
.lp-sky .sk-day { fill: #E3EAE5; } .lp-sky .sk-now { fill: var(--orange); }
.lp-sky .sk-edge { stroke: #fff; } .lp-sky .sk-a { fill: #9ED486; } .lp-sky .sk-b { fill: #74B95E; } .lp-sky .sk-c { fill: var(--ink); }
.lp-sky .sk-wheel { stroke: #74B95E; } .lp-sky .sk-ground { fill: var(--ink); opacity: .15; }
.lp .pulse-ax { color: var(--muted); }
.lp-form { background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 24px; padding: 24px;
  box-shadow: 0 12px 32px rgba(20, 26, 23, .07); }
.lp-form h2 { font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.lp-form .muted, .lp-form small { color: var(--muted); }
.lp-form label { color: var(--ink-2); font-weight: 500; }
.lp-form input, .lp-form select { background: var(--sunk); border: 1px solid transparent; color: var(--ink); border-radius: 12px; padding: 10px 12px; }
.lp-form input:focus, .lp-form select:focus { border-color: #57B04A; background: #fff; }
.lp-form .link { color: #2E7D21; font-weight: 600; }
.lp-form .btn.primary { justify-content: center; padding: 12px; font-size: 15px; }
.lp-legal a { color: var(--muted); }
.lp-facts { background: transparent; padding: 0; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); display: grid; }
.lp-fact, .lp-fact + .lp-fact { background: #fff; border: 0; border-radius: 24px; padding: 22px 22px 18px; }
.lp-fact b { font-weight: 700; font-size: 34px; letter-spacing: -.03em; color: var(--ink); }
.lp-fact span { color: var(--ink-2); } .lp-fact em { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 11.5px; color: var(--muted); }
.lp-who { background: transparent; padding: 0; gap: 18px; }
.lp-who > div { background: #fff; border: 0; border-radius: 24px; padding: 22px; }
.lp-who h3 { color: var(--ink); font-weight: 700; font-size: 19px; margin-top: 12px; } .lp-who p { color: var(--ink-2); }
.lp-cta { background: var(--lime); border-radius: 32px; padding: 48px clamp(20px, 4vw, 56px); color: var(--lime-ink); }
.lp-cta .lp-kicker { background: rgba(255, 255, 255, .55); }
.lp-cta h2 { font-weight: 700; letter-spacing: -.035em; } .lp-cta p { color: #2D3A28; }
.lp-cta .btn.primary { background: var(--ink); color: #fff; }
.lp-src { background: #fff; border-radius: 24px; padding: 22px; } .lp-src h3 { color: var(--ink); font-weight: 700; } .lp-src p { color: var(--muted); }
.lp-foot { background: transparent; color: var(--muted); padding: 8px clamp(16px, 5vw, 64px) 28px; } .lp-foot a { color: var(--muted); }
@media (max-width: 860px) { .lp-hero { grid-template-columns: 1fr; padding: 28px 18px; border-radius: 24px; } }
.side { flex-direction: row !important; }
.side nav#tabs { flex-direction: row; }
.ph { display: flex; align-items: center; flex-wrap: nowrap; gap: 10px; }
.ph h3 { flex: none; } .ph .meta { flex: 1; text-align: right; min-width: 0; }

/* No dot-and-pill labels anywhere: kickers and tags are plain text; colour alone carries status */
.lp-kicker, .lp-cta .lp-kicker, .lp-who .lp-kicker { display: block; background: none; padding: 0; border-radius: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.lp-cta .lp-kicker { color: #2D3A28; }
.lp-kicker::before, .ins-tag::before, .kick::before, .ol::before, .st::before, .tier::before { content: none; display: none; }
.ins-tag { background: none; padding: 0; border-radius: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ol, .st, .tier { background: none; padding: 0; border-radius: 0; gap: 0; }

/* Header, simplified: logo · this workspace's screens · workspace switch · language · account */
.side { gap: 10px; }
.side .lang { order: 3; position: relative; }
.lang-btn { height: 34px; min-width: 46px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel);
  color: var(--ink); font: 600 12.5px var(--sans); cursor: pointer; }
.lang-btn::after { content: "▾"; margin-left: 5px; color: var(--muted); font-size: 10px; }
.lang-btn:hover, .who-btn:hover { border-color: var(--ink-2); }
.pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 170px; padding: 6px; background: #fff;
  border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 26, 23, .14); display: flex; flex-direction: column; }
.pop[hidden] { display: none; }
.pop button, .pop a { text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 9px; color: var(--ink); font: 500 13.5px var(--sans);
  cursor: pointer; text-decoration: none; }
.pop button:hover, .pop a:hover { background: var(--sunk); }
.pop button.on { font-weight: 700; background: var(--sunk); }
.pop-h { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.pop-h small { color: var(--muted); font-size: 12px; }
.pop .out { color: var(--down); border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; margin-top: 4px; }
.pop .trial { color: var(--rise); }
.who-am-i { position: relative; padding: 0; border: 0; background: none; }
.who-btn { display: flex; align-items: center; gap: 9px; padding: 3px 12px 3px 3px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--panel); cursor: pointer; font: inherit; color: inherit; text-align: left; }
.who-t { display: flex; flex-direction: column; line-height: 1.15; }
.who-t small { color: var(--muted); font-size: 11.5px; }
.ws { order: 2; }
.who-am-i { order: 4; }
nav#tabs { justify-content: flex-start; }
@media (max-width: 1180px) { .who-t { display: none; } .who-btn { padding: 3px; } }
@media (max-width: 560px) {
  .side .brand span { display: none; }
  .ws button { padding: 6px 10px; font-size: 12px; }
  .side .lang { margin-left: auto; }
  .lang-btn { min-width: 0; padding: 0 9px; }
}

/* Screen changes: instant when the data is here; when it is not, the old screen dims and a thin bar runs */
#view { transition: opacity .12s ease; }
#view.loading { opacity: .45; }
#view.loading::before { content: ""; position: fixed; left: 0; top: 0; height: 2px; width: 40%; background: var(--ink); z-index: 50;
  animation: plnm-bar 0.9s ease-in-out infinite; }
@keyframes plnm-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* Map: a calm grey base so the data carries the colour */
#map .leaflet-tile-pane { filter: grayscale(1) brightness(1.04) contrast(.88); }
#map { height: min(640px, calc(100vh - 230px)); min-height: 420px; background: #eef1ef; }
.leaflet-tooltip { border-radius: 10px; border: 0; box-shadow: 0 6px 18px rgba(20, 26, 23, .16); font: 500 12.5px var(--sans); padding: 7px 10px; }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: 0 12px 30px rgba(20, 26, 23, .18); }
#t-map tbody tr { cursor: pointer; }
@media (max-width: 720px) { #map { height: 420px; } }
.map-pop-a { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); }
.map-pop-a a { color: var(--ink); font-weight: 600; text-decoration: none; } .map-pop-a a:hover { text-decoration: underline; }

/* Names are the point of a ranking: give them the room and let a long one wrap instead of cutting it */
.rank li { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) auto; align-items: center; }
.rk-l { white-space: normal; overflow: visible; line-height: 1.25; overflow-wrap: anywhere; }
.hb-l > span { white-space: normal; line-height: 1.2; }
.pc-areas li span { white-space: normal; }

/* Drop-downs: one custom chevron, inset from the rounded edge, the same everywhere */
select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 38px !important; text-overflow: ellipsis; cursor: pointer;
  background-color: var(--panel);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23525a55' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 15px center !important; background-size: 12px 12px !important;
}
select::-ms-expand { display: none; }
select:hover { border-color: var(--ink-2); }

/* Skeleton: the page's shape while its figures arrive */
.sk { display: grid; gap: 16px; padding-top: 4px; }
.sk i { display: block; height: 12px; border-radius: 8px; background: linear-gradient(90deg, #e4ebe6 0%, #f3f6f4 40%, #e4ebe6 80%);
  background-size: 300% 100%; animation: sk-shine 1.1s ease-in-out infinite; }
.sk-h { display: grid; gap: 10px; margin-bottom: 6px; }
.sk-k { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.sk-k > div, .sk-p { background: var(--panel); border-radius: 18px; padding: 18px; display: grid; gap: 12px; }
.sk-r { display: flex; gap: 14px; } .sk-p { flex: 1; min-height: 300px; align-content: start; }
@keyframes sk-shine { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (max-width: 720px) { .sk-k { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sk-r { flex-direction: column; } }

/* Rankings: the name takes what is left; the small figure and the value always show in full */
.rank li { grid-template-columns: minmax(0, 1fr) auto auto; }
.rk-s { overflow: visible; text-overflow: clip; }
.sub-gap { height: 18px; }

/* Wide tables on small screens: smaller type, the first column stays in view while the rest scrolls */
@media (max-width: 760px) {
  .scroll table { font-size: 12.5px; }
  .scroll th, .scroll td { padding-left: 8px; padding-right: 8px; }
  .scroll table tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); }
  .scroll table tr > :first-child + :not(.n) { position: sticky; left: 0; z-index: 1; background: var(--panel); }
}
/* bar lists: the small figure on the right gets the width it needs */
.hb.with-sub .hb-row { grid-template-columns: minmax(96px, 32%) minmax(60px, 1fr) var(--hb-v, 64px) minmax(var(--hb-s, 76px), max-content); }
.hb-s { overflow: visible; text-overflow: clip; text-align: right; }

/* Filter bar: each label stays with its control */
.qf { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.qbar select { max-width: 260px; }

/* Phones: compact */
@media (max-width: 720px) {
  .qbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
  .qbar .qf { flex-direction: column; align-items: stretch; gap: 4px; }
  .qbar .qf:first-child { grid-column: 1 / -1; }
  .qbar .qf .lbl { font-size: 11.5px; }
  .qbar select { max-width: none; width: 100%; }
  .qbar .expr { display: none; }
  .kpis, .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .kpi { padding: 14px !important; min-height: 0 !important; }
  .kpi::after { display: none !important; }
  .kpi .v, .kpi b.v, .kpi .kv { font-size: 22px !important; }
  .view-head { gap: 10px; }
  .view-head .btn, .view-head .export { padding: 8px 10px; font-size: 12.5px; }
  .view-head p { font-size: 13px; }
}
@media (max-width: 720px) {
  .view-head { display: flex !important; flex-direction: row !important; align-items: flex-start !important; justify-content: space-between; }
  .view-head .export { font-size: 0 !important; padding: 9px !important; flex: none; }
  .view-head .export svg { width: 18px; height: 18px; margin: 0 !important; }
  .kpi .sp, .kpi svg { max-height: 26px; }
}
@media (max-width: 720px) {
  .ph { flex-wrap: wrap; row-gap: 2px; }
  .ph .meta { order: 9; flex-basis: 100%; text-align: left; margin: 0; }
}

/* Landing and sign-in: the same compact language menu as inside the app */
.lang-dd { position: relative; display: inline-flex; }
.lp-top-r { display: flex; align-items: center; gap: 10px; }
.lp-who { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.lp-cta .btn.primary::after { background: none !important; color: inherit !important; width: auto; height: auto; margin: 0 0 0 4px; }
@media (max-width: 720px) {
  .lp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .lp-fact { padding: 14px !important; }
  .lp-fact b { font-size: 22px !important; }
  .lp-who { grid-template-columns: 1fr !important; }
  .lp-top .link { white-space: nowrap; }
}

/* Live data strip under the header: today's registrations first, then where the data comes from */
.ticker { display: block !important; position: relative; height: 38px; margin: 12px 0 0; border-radius: 14px; background: #fff; color: var(--ink-2);
  border: 0; font-size: 12.5px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.ticker:empty { display: none !important; }
.tk-i b { color: var(--ink); } .tk-i b.up { color: var(--up); } .tk-i b.down { color: var(--down); }
.tk-i:first-child b.up::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--up);
  margin-right: 7px; vertical-align: 1px; animation: tk-live 1.6s ease-in-out infinite; }
@keyframes tk-live { 50% { opacity: .25; } }
@media (max-width: 720px) { .ticker { margin-top: 10px; height: 34px; font-size: 12px; } }

/* Daily bars: hover readout, daily-average line, closed days and the day in progress */
.pulse-wrap { position: relative; }
.pulse-bars { display: block; width: 100%; touch-action: pan-y; cursor: crosshair; }
.pulse-bars rect[data-i] { fill: #DCE5DF; transition: fill .12s; }
.pulse-bars rect.now { fill: #F28C38; }
.pulse-bars rect.off { fill: #EEF2EF; }
.pulse-bars rect.part { fill: #F8C79C; }
.pulse-bars rect.hov { fill: var(--ink) !important; }
.pulse-avg { stroke: #9AA59F; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.pulse-avg-l { position: absolute; right: 0; transform: translateY(-120%); font-size: 11px; color: var(--muted); background: rgba(255,255,255,.85); padding: 0 4px; border-radius: 4px; pointer-events: none; }
.pulse-tip { position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 10px;
  padding: 7px 10px; font-size: 12px; line-height: 1.35; display: grid; gap: 1px; white-space: nowrap; pointer-events: none; z-index: 5;
  box-shadow: 0 8px 20px rgba(20, 26, 23, .2); }
.pulse-tip[hidden] { display: none; }
.pulse-tip em { font-style: normal; font-weight: 700; } .pulse-tip .up { color: #9BE27A; } .pulse-tip .down { color: #FF9C8F; } .pulse-tip .muted { color: #C9D1CC; }
.pulse-bars rect.pulse-hit { fill: transparent !important; }

/* ---- project scorecard, radar, client links, day card, assistant ---- */
.pj-search input { width: 100%; padding: 13px 16px; border: 1px solid var(--line-2); border-radius: 14px; font: 500 15px var(--sans); background: var(--sunk); }
.pj-hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 14px; }
.pj-hits button { text-align: left; display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.pj-hits button:hover { border-color: var(--ink-2); } .pj-hits span { color: var(--muted); font-size: 12.5px; } .pj-hits em { font-style: normal; font-size: 12.5px; color: var(--ink-2); }
.pj-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 0 12px; }
.pj-acts { display: flex; gap: 8px; flex-wrap: wrap; } .pj-acts .btn svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; }
.facts li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.facts li:last-child { border-bottom: 0; } .facts span { color: var(--muted); } .facts b { text-align: right; font-weight: 600; }
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(20, 26, 23, .38); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 22px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 24px 60px rgba(20, 26, 23, .25); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 4px; } .modal-h h3 { margin: 0; font-size: 18px; }
.modal-h .x { border: 0; background: var(--sunk); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.modal-b { padding: 8px 20px 20px; display: grid; gap: 14px; }
.sh-form, .card-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.sh-form label, .card-form label { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); }
.sh-form input, .sh-form select, .card-form select { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; font: 500 14px var(--sans); width: 100%; }
.sh-go { display: flex; align-items: center; gap: 12px; }
.sh-box { display: grid; gap: 8px; padding: 12px; background: var(--sunk); border-radius: 14px; }
.sh-box input { width: 100%; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 10px; font: 500 13px var(--mono, monospace); background: #fff; }
.sh-acts { display: flex; gap: 8px; flex-wrap: wrap; } .sh-acts .btn { padding: 8px 14px; font-size: 13px; text-decoration: none; }
#card-cv { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); }
.ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ink); color: #fff;
  font: 600 14px var(--sans); cursor: pointer; box-shadow: 0 10px 26px rgba(20, 26, 23, .28); }
.ai-fab.open { width: 46px; padding: 0; font-size: 20px; }
.ai-box { position: fixed; right: 20px; bottom: 78px; z-index: 60; width: min(420px, calc(100vw - 24px)); height: min(600px, calc(100vh - 110px)); background: #fff; border-radius: 22px;
  box-shadow: 0 24px 60px rgba(20, 26, 23, .28); display: flex; flex-direction: column; overflow: hidden; }
.ai-box[hidden] { display: none; }
.ai-box header { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; } .ai-box header span { color: var(--muted); font-size: 12px; }
.ai-log { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-m { max-width: 92%; padding: 10px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; display: grid; gap: 8px; }
.ai-m p { margin: 0; } .ai-m ul { margin: 4px 0; padding-left: 18px; }
.ai-m.user { align-self: flex-end; background: var(--lime); color: var(--lime-ink); border-bottom-right-radius: 6px; }
.ai-m.assistant { align-self: flex-start; background: var(--sunk); border-bottom-left-radius: 6px; }
.ai-did { font-size: 12px; color: var(--muted); }
.ai-tips { display: grid; gap: 8px; margin-top: auto; } .ai-tips button { text-align: left; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; font: 500 13.5px var(--sans); cursor: pointer; }
.ai-tips button:hover { border-color: var(--ink-2); }
.ai-box form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.ai-box textarea { flex: 1; resize: none; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 14px; font: 500 14px var(--sans); min-height: 44px; max-height: 120px; }
.ai-box form .btn { padding: 0 16px; } .ai-box form .btn::after { content: none; }
.ai-dots { display: inline-flex; gap: 4px; } .ai-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: tk-live 1s ease-in-out infinite; }
.ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
@media (max-width: 720px) { .sh-form, .card-form { grid-template-columns: 1fr; } .ai-box { right: 12px; bottom: 72px; } .ai-fab { right: 12px; bottom: 14px; } }
@media print { .ai-fab, .ai-box, .modal { display: none !important; } }
/* the page a client opens */
.sp-body { background: #EEF3EF; margin: 0; font-family: "Plus Jakarta Sans", system-ui, sans-serif; color: #141A17; }
.sp { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; display: grid; gap: 14px; }
.sp-card { background: #fff; border-radius: 26px; padding: 28px 24px; }
.sp-k { margin: 0 0 6px; color: #6B756F; font-size: 13px; font-weight: 600; } .sp-card h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; line-height: 1.1; }
.sp-sub { margin: 6px 0 0; color: #3A433E; } .sp-asof { margin: 10px 0 0; color: #6B756F; font-size: 12.5px; }
.sp-spark { width: 100%; height: auto; margin-top: 18px; } .sp-axis { display: flex; justify-content: space-between; color: #8A948E; font-size: 11.5px; }
.sp-card section { margin-top: 22px; } .sp-card h2 { margin: 0 0 4px; font-size: 13px; color: #6B756F; font-weight: 600; }
.sp-card dl { margin: 0; } .sp-card dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #E6ECE8; font-size: 14.5px; }
.sp-card dl div:last-child { border-bottom: 0; } .sp-card dt { color: #3A433E; } .sp-card dd { margin: 0; font-weight: 700; text-align: right; white-space: nowrap; }
.sp-src { margin: 22px 0 0; color: #8A948E; font-size: 12px; line-height: 1.45; }
.sp-sender { background: #BDF09A; border-radius: 22px; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.sp-sender span { display: block; font-size: 12px; color: #2D3A28; } .sp-sender b { display: block; font-size: 18px; } .sp-sender em { font-style: normal; color: #2D3A28; font-size: 13.5px; }
.sp-acts { display: flex; gap: 8px; } .sp-acts a { padding: 10px 16px; border-radius: 999px; background: #fff; color: #141A17; text-decoration: none; font-weight: 600; font-size: 14px; }
.sp-acts a.wa { background: #141A17; color: #fff; }
.sp-foot { text-align: center; color: #8A948E; font-size: 12px; } .sp-foot a { color: #141A17; font-weight: 700; text-decoration: none; }

/* Assistant: a docked panel on the right, full height, beside the page (not a chat bubble) */
.ai-fab { display: none !important; }
.ai-dock { position: fixed; top: 0; right: 0; bottom: 0; width: 380px; z-index: 40; background: #fff; border-left: 1px solid var(--line-2);
  display: flex; flex-direction: column; }
.ai-dock[hidden] { display: none; }
body.ai-open .app, body.ai-open .legal-links { margin-right: 380px; }
.ai-dock header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.ai-dock header div { display: grid; gap: 2px; } .ai-dock header b { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.ai-dock header b::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--up); }
.ai-dock header span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.ai-x { border: 1px solid var(--line-2); background: #fff; width: 30px; height: 30px; border-radius: 9px; cursor: pointer; color: var(--ink-2); font-size: 15px; flex: none; }
.ai-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ai-quick button { border: 1px solid var(--line-2); background: var(--sunk); border-radius: 9px; padding: 6px 10px; font: 600 12px var(--sans); cursor: pointer; color: var(--ink); }
.ai-quick button:hover { border-color: var(--ink-2); background: #fff; }
.ai-dock .ai-log { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ai-dock .ai-m { max-width: 100%; border-radius: 12px; }
.ai-dock .ai-m.user { align-self: stretch; background: var(--sunk); color: var(--ink); font-weight: 600; border-radius: 12px; }
.ai-dock .ai-m.assistant { align-self: stretch; background: none; padding: 0 2px; }
.ai-used { font-size: 11.5px; color: var(--muted); }
.ai-dock form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.ai-dock textarea { flex: 1; resize: none; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 12px; font: 500 14px var(--sans); min-height: 44px; max-height: 120px; }
.ai-dock form .btn { padding: 0 16px; } .ai-dock form .btn::after { content: none; }
.ai-toggle { order: 3; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel);
  color: var(--ink); font: 600 12.5px var(--sans); cursor: pointer; flex: none; }
.ai-toggle svg { width: 16px; height: 16px; } .ai-toggle.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.side .lang { order: 4; } .who-am-i { order: 5; }
@media (max-width: 1100px) { body.ai-open .app, body.ai-open .legal-links { margin-right: 0; } .ai-dock { width: min(420px, 100vw); box-shadow: -18px 0 40px rgba(20, 26, 23, .18); } }
@media (max-width: 720px) { .ai-dock { width: 100vw; } .ai-toggle span { display: none; } .ai-toggle { padding: 0 9px; } }
@media print { .ai-dock, .ai-toggle { display: none !important; } body.ai-open .app { margin-right: 0; } }
/* with the assistant open the header has less room: the menu takes its own row instead of being cut */
@media (min-width: 1101px) and (max-width: 1780px) {
  body.ai-open .side { flex-wrap: wrap; row-gap: 8px; }
  body.ai-open nav#tabs { order: 9; flex-basis: 100%; justify-content: flex-start; }
  body.ai-open .side .brand { margin-right: auto; }
}

/* "Ask": a work panel, not a chat widget. Width drags, answers read like a document, the composer is one box. */
:root { --ai-w: 400px; }
.ai-dock { width: var(--ai-w); max-width: 100vw; }
body.ai-open .app, body.ai-open .legal-links { margin-right: var(--ai-w); }
body.ai-drag { user-select: none; cursor: col-resize; } body.ai-drag .app { pointer-events: none; }
.ai-grip { position: absolute; left: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 2; }
.ai-grip:hover, body.ai-drag .ai-grip { background: linear-gradient(90deg, transparent 2px, var(--ink) 2px, var(--ink) 4px, transparent 4px); }
.ai-dock header { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); min-height: 54px; }
.ai-dock header b { font-size: 15px; font-weight: 700; } .ai-dock header b::after { content: none; }
.ai-here { font-size: 12px; color: var(--muted); background: var(--sunk); border-radius: 7px; padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ai-hbtns { margin-left: auto; display: flex; gap: 4px; flex: none; }
.ai-hbtns button { width: 30px; height: 30px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
.ai-hbtns button:hover { background: var(--sunk); color: var(--ink); } .ai-hbtns svg { width: 17px; height: 17px; }
.ai-dock .ai-log { flex: 1; overflow: auto; padding: 18px; display: block; }
.ai-q { font-weight: 600; font-size: 14px; line-height: 1.4; padding: 10px 12px; background: var(--sunk); border-radius: 12px; margin: 0 0 12px; white-space: pre-wrap; }
.ai-a { font-size: 14px; line-height: 1.55; margin: 0 0 22px; display: grid; gap: 8px; }
.ai-a p, .ai-a h4, .ai-a ul { margin: 0; } .ai-a h4 { font-size: 14px; font-weight: 700; margin-top: 4px; }
.ai-a ul { padding-left: 18px; display: grid; gap: 3px; } .ai-a code { background: var(--sunk); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; }
.ai-a table { width: 100%; border-collapse: collapse; font-size: 13px; } .ai-a th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; }
.ai-a th, .ai-a td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); } .ai-a td:last-child, .ai-a th:last-child { text-align: right; padding-right: 0; }
.ai-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 11.5px; }
.ai-meta button { border: 0; background: none; color: var(--muted); font: 600 11.5px var(--sans); cursor: pointer; padding: 2px 0; } .ai-meta button:hover { color: var(--ink); }
.ai-did { font-size: 12.5px; color: var(--ink-2); }
.ai-empty { display: grid; gap: 8px; padding-top: 6px; } .ai-empty h4 { margin: 0; font-size: 18px; letter-spacing: -.02em; } .ai-empty p { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.ai-empty button { text-align: left; display: grid; gap: 2px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.ai-empty button:hover { border-color: var(--ink-2); } .ai-empty button b { font-size: 13.5px; } .ai-empty button span { font-size: 12.5px; color: var(--muted); }
.ai-foot { padding: 10px 14px 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.ai-dock .ai-quick { display: flex; flex-wrap: nowrap; gap: 6px; padding: 0; border: 0; overflow-x: auto; scrollbar-width: none; } .ai-dock .ai-quick::-webkit-scrollbar { display: none; }
.ai-dock .ai-quick button { flex: none; background: #fff; border-radius: 999px; font-weight: 600; }
.ai-dock form.ai-composer { display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 12px; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; }
.ai-composer:focus-within { border-color: var(--ink); }
.ai-dock .ai-composer textarea { flex: 1; border: 0; outline: 0; padding: 7px 0; min-height: 34px; max-height: 160px; font: 500 14px/1.4 var(--sans); background: none; resize: none; border-radius: 0; }
.ai-dock .ai-composer button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; padding: 0; }
.ai-composer button:disabled { opacity: .35; cursor: default; } .ai-composer svg { width: 17px; height: 17px; }
.ai-hint { margin: 0; font-size: 11px; color: var(--muted); }
@media (max-width: 1100px) { body.ai-open .app, body.ai-open .legal-links { margin-right: 0; } .ai-grip { display: none; } }
@media (max-width: 720px) { .ai-dock { width: 100vw; } .ai-hint { display: none; } }

/* The Ask button: a black spark inside a soft gradient ring */
.ai-toggle { border: 1.5px solid transparent; height: 36px; padding: 0 14px 0 11px; gap: 7px; color: var(--ink);
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(120deg, #BDF09A 0%, #9CC8FF 45%, #F7B98A 100%) border-box; }
.ai-toggle svg { width: 18px; height: 18px; color: #141A17; }
.ai-toggle:hover { background: linear-gradient(#F6F9F7, #F6F9F7) padding-box, linear-gradient(120deg, #9FE072 0%, #6FAEFF 45%, #F28C38 100%) border-box; }
.ai-toggle.on { color: #fff; border-color: transparent;
  background: linear-gradient(#141A17, #141A17) padding-box, linear-gradient(120deg, #BDF09A 0%, #9CC8FF 45%, #F7B98A 100%) border-box; }
.ai-toggle.on svg { color: #fff; }
.ai-spark { width: 19px; height: 19px; color: var(--ink); flex: none; margin-right: -3px; }

/* Ask: earlier conversations */
.ai-hbtns button.on { background: var(--sunk); color: var(--ink); }
.ai-hist { display: grid; gap: 6px; } .ai-hist h4 { margin: 0 0 6px; font-size: 15px; }
.ai-hrow { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.ai-hrow.on { border-color: var(--ink); } .ai-hrow:hover { border-color: var(--ink-2); }
.ai-hrow > button:first-child { flex: 1; min-width: 0; text-align: left; display: grid; gap: 2px; padding: 10px 12px; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
.ai-hrow b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ai-hrow span { font-size: 11.5px; color: var(--muted); }
.ai-hdel { border: 0; background: none; padding: 0 12px; color: var(--muted); cursor: pointer; font-size: 16px; } .ai-hdel:hover { color: var(--down); }

/* Listing check: where the advert comes from, what was read, and where its price sits */
.lc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12.5px; }
.lc-from { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.lc-src { display: inline-flex; align-items: center; height: 26px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.lc-src img { height: 16px; width: auto; display: block; } .lc-src b { font-size: 12px; }
.lc-read { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.lc-read > b { font-size: 16px; margin-right: 4px; } .lc-read > span:not(.lc-src) { background: #fff; border-radius: 8px; padding: 4px 9px; font-size: 12.5px; color: var(--ink-2); }
.lc-note { margin: 10px 0 0; font-size: 12.5px; }
.lc-range { padding: 6px 4px 0; }
.lc-track { position: relative; height: 14px; border-radius: 7px; background: var(--sunk); }
.lc-track .lc-mid { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: #BFD2E6; }
.lc-track .lc-med { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); }
.lc-track .lc-ask { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #F28C38; border: 3px solid #fff; box-shadow: 0 0 0 1px #F28C38; }
.lc-scale { position: relative; height: 22px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.lc-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; } .lc-scale b { color: var(--ink); }
.lc-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.lc-legend span { display: inline-flex; align-items: center; gap: 6px; } .lc-legend i { display: inline-block; }
.lc-legend .lc-mid { width: 18px; height: 8px; border-radius: 4px; background: #BFD2E6; } .lc-legend .lc-med { width: 2px; height: 12px; background: var(--ink); }
.lc-legend .lc-ask { width: 10px; height: 10px; border-radius: 50%; background: #F28C38; }
tr.sel td { background: var(--sunk); }
.lc-share { justify-content: flex-end; } .lc-share .btn { white-space: nowrap; }
.lc-src img { max-height: 18px; height: 18px; }
.ck-form { grid-template-columns: 2fr 1.3fr 1.3fr auto; align-items: end; } .ck-form .btn { height: 40px; } @media (max-width: 720px) { .ck-form { grid-template-columns: 1fr; } }
.seg button:disabled { opacity: .35; cursor: not-allowed; }

/* Ask: what it is doing, and the answer arriving */
.ai-status { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 13.5px; margin: 0 0 18px; }
.ai-pulse { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ink); animation: ai-breathe 1.4s ease-in-out infinite; }
.ai-pulse svg { width: 18px; height: 18px; }
@keyframes ai-breathe { 0%, 100% { transform: scale(.82) rotate(0deg); opacity: .55; } 50% { transform: scale(1.08) rotate(12deg); opacity: 1; } }
.ai-shimmer { font-weight: 600; background: linear-gradient(90deg, #8A948E 0%, #141A17 45%, #8A948E 90%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: ai-shine 1.6s linear infinite; }
@keyframes ai-shine { 0% { background-position: 120% 0; } 100% { background-position: -100% 0; } }
.ai-steps { list-style: none; margin: 0; padding: 0; flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.ai-steps li { font-size: 11.5px; color: var(--muted); background: var(--sunk); border-radius: 7px; padding: 2px 8px; animation: ai-rise .25s ease both; }
.ai-steps li::before { content: "✓ "; color: var(--up); }
.ai-a.fresh > * { animation: ai-rise .32s ease both; }
.ai-a.fresh > *:nth-child(2) { animation-delay: .06s; } .ai-a.fresh > *:nth-child(3) { animation-delay: .12s; } .ai-a.fresh > *:nth-child(4) { animation-delay: .18s; }
.ai-a.fresh > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes ai-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-empty .ai-chips button { display: inline-block; padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font: 600 12.5px var(--sans); cursor: pointer; color: var(--ink); }
.ai-empty .ai-chips button:hover { border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .ai-pulse, .ai-shimmer, .ai-a.fresh > *, .ai-steps li { animation: none; } .ai-shimmer { color: var(--ink); background: none; } }
.req { font-style: normal; font-size: 10.5px; color: var(--rise, #C2410C); background: #FFF1E3; border-radius: 5px; padding: 1px 5px; margin-left: 4px; } .lc-com { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--sunk); border-radius: 12px; padding: 10px 12px; }

/* Reports: a branded document from any screen */
.print-only { display: none; }
.rp-opt { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.rp-opt input { width: 17px; height: 17px; accent-color: var(--ink); }
@media print {
  @page { size: A4; margin: 14mm 12mm 16mm; }
  html, body { background: #fff !important; }
  .side, .ticker, .qbar, .export, .ai-dock, .ai-toggle, .modal, .legal-links, .pj-bar, .map-bar .seg, .lc-top, .rc-go, .ai-fab, .tools, .csv, [data-share], [data-card], #pj-back { display: none !important; }
  body.ai-open .app, .app { margin: 0 !important; display: block !important; }
  .work, #view { padding: 0 !important; margin: 0 !important; }
  .print-only { display: block; }
  #print-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid #141A17; }
  .ph-brand { display: flex; align-items: center; gap: 8px; } .ph-brand .mark { width: 18px; height: 18px; fill: #141A17; } .ph-brand b { font-size: 18px; letter-spacing: -.02em; }
  .ph-brand span { font-size: 10.5px; color: #555; margin-left: 6px; }
  .ph-meta { text-align: right; display: grid; gap: 1px; font-size: 10.5px; color: #333; } .ph-meta b { font-size: 13px; color: #000; }
  #print-foot { margin-top: 14px; padding-top: 8px; border-top: 1px solid #bbb; font-size: 9.5px; color: #555; }
  .view-head h2 { font-size: 22px; } .view-head p { font-size: 11px; }
  .panel, .kpi, .pcard, .ins-card { box-shadow: none !important; border: 1px solid #d9dedb !important; break-inside: avoid; }
  .row { gap: 10px !important; } .kpis { gap: 8px !important; }
  .scroll { overflow: visible !important; max-height: none !important; }
  a { color: inherit; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media print {
  .kpis { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)) !important; }
  .kpi { padding: 10px 12px !important; min-height: 0 !important; } .kpi::after { display: none !important; }
  .kpi .v { font-size: 19px !important; } .kpi .l, .kpi .s { font-size: 10px !important; }
  .map-bar { display: none !important; }
}

/* listing check: reading a pasted link */
.lc-reading { display: flex; align-items: center; gap: 8px; color: var(--muted, #6b7280); }
.lc-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: lc-spin .7s linear infinite; flex: none; }
@keyframes lc-spin { to { transform: rotate(360deg); } }
.lc-read b { font-weight: 600; }
.lc-warn { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 12px; }

/* ---------- compact header ---------- */
.side { padding: 6px 8px 6px 16px; gap: 8px; border-radius: 18px; top: 8px; }
.brand { font-size: 16px; gap: 7px; } .brand .mark { width: 17px; height: 17px; }
nav#tabs { padding: 3px; gap: 0; }
nav button { padding: 6px 11px; font-size: 12.5px; }
.ws button { padding: 5px 10px; font-size: 12px; }
.ai-toggle { height: 30px; padding: 0 11px 0 9px; font-size: 12px; gap: 5px; }
.ai-toggle svg { width: 15px; height: 15px; }
.lang-btn { height: 30px; min-width: 40px; padding: 0 8px; font-size: 12px; }
.who-btn { padding: 2px 10px 2px 2px; gap: 7px; }
.who-am-i .av { width: 26px; height: 26px; font-size: 12px; }
.who-t b { font-size: 12.5px; } .who-t small { font-size: 10.5px; }
.ticker { margin-top: 6px; }
/* ---------- "?" by a page title, "i" on blocks and figures, their cards ---------- */
.page-q { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 10px; vertical-align: 5px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); font: 600 11.5px var(--sans); cursor: pointer; }
.page-q:hover { color: var(--ink); border-color: var(--ink-2); }
.info-i { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 6px; vertical-align: 1px; border-radius: 50%; border: 1px solid var(--line-2);
  background: none; color: var(--muted); font: italic 600 9.5px Georgia, serif; cursor: help; padding: 0; opacity: 0; transition: opacity .15s; }
.panel:hover .info-i, .kpi:hover .info-i, .info-i:focus-visible { opacity: 1; }
@media (hover: none) { .info-i { opacity: .7; } }
.info-card { position: absolute; z-index: 60; background: #141A17; color: #EEF2EF; border-radius: 12px; padding: 11px 13px; font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 10px 30px rgba(20, 26, 23, .22); animation: info-in .12s ease-out; }
.info-card p { margin: 0; } .info-card h5 { margin: 10px 0 3px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #9FE072; font-weight: 600; }
.info-card h5:first-child { margin-top: 0; } .info-card ol { margin: 0; padding-left: 18px; } .info-card li { margin: 2px 0; }
.info-card.page { padding: 14px 16px; } .info-more { display: inline-block; margin-top: 10px; color: #9FE072; font-weight: 600; text-decoration: none; }
@keyframes info-in { from { opacity: 0; transform: translateY(-3px); } }
@media print { .page-q, .info-i, .info-card { display: none !important; } }
/* ---------- the guide (/docs) ---------- */
body.docs { background: var(--bg, #EEF2EF); }
.docs-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; max-width: 1240px; margin: 0 auto; padding: 24px 20px 60px; }
.docs-nav { position: sticky; top: 16px; align-self: start; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--panel); border-radius: 16px; padding: 16px; }
.docs-nav .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--ink); text-decoration: none; margin-bottom: 12px; }
.docs-nav .brand .mark { width: 17px; height: 17px; fill: var(--ink); }
.docs-nav select { margin-bottom: 10px; }
.docs-nav h5 { margin: 14px 0 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.docs-nav a:not(.brand) { color: var(--ink-2); text-decoration: none; font-size: 13px; padding: 5px 8px; border-radius: 8px; }
.docs-nav a:not(.brand):hover { background: var(--sunk); color: var(--ink); }
.docs-main { min-width: 0; }
.docs-head h1 { font-size: 32px; letter-spacing: -.02em; margin: 6px 0 8px; } .docs-head p { color: var(--ink-2); max-width: 760px; font-size: 15px; }
.docs-part { margin: 40px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.docs-sec { background: var(--panel); border-radius: 18px; padding: 22px 24px; margin-top: 14px; scroll-margin-top: 16px; }
.docs-sec h2 { font-size: 22px; letter-spacing: -.01em; margin: 0 0 6px; } .docs-sec p { color: var(--ink-2); line-height: 1.55; max-width: 820px; }
.docs-lead { font-size: 15px; }
.docs-sec figure { margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: 560px; }
.docs-sec figure img { display: block; width: 100%; height: auto; }
.docs-cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; }
.docs-cols h4 { margin: 6px 0 6px; font-size: 13px; } .docs-cols ol { margin: 0 0 12px; padding-inline-start: 20px; color: var(--ink-2); line-height: 1.55; }
.docs-cols dl { margin: 0; } .docs-cols dt { font-weight: 600; font-size: 13px; margin-top: 9px; } .docs-cols dd { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
@media (max-width: 860px) { .docs-wrap { grid-template-columns: 1fr; } .docs-nav { position: static; max-height: none; } .docs-cols { grid-template-columns: 1fr; } }

/* weekly bars on Today: a value on hover, the weekly average as a dashed line */
.wk-wrap { position: relative; }
.wk-wrap .wk { position: relative; height: 120px; gap: 5px; }
.wk i { cursor: pointer; transition: background .12s, opacity .12s; outline: none; }
.wk i:hover, .wk i.hov, .wk i:focus-visible { background: #C9D6CD; } .wk i.now:hover, .wk i.now.hov { background: #D9772A; }
.wk-avg { position: absolute; left: 0; right: 0; border-top: 1.5px dashed rgba(20, 26, 23, .35); pointer-events: none; }
.wk-tip { white-space: nowrap; z-index: 3; }

/* the workspace follows the account: no switch in the header; it shows as a tag on the account pill */
#ws { display: none !important; }
.ws-tag { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; letter-spacing: .01em; }
.ws-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #7CC75A; }
.ws-tag.developer::before { background: #6FAEFF; }
.pop-ws { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px; margin: 4px 0; background: var(--sunk); border-radius: 10px; }
.pop-ws button { border-radius: 8px; padding: 6px 8px; font-size: 12.5px; } .pop-ws button.on { background: var(--ink); color: #fff; }
.lp-ws { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; padding: 0; margin: 0; }
.lp-ws legend { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: 4px; padding: 0; }
.lp-ws label { display: block; cursor: pointer; }
.lp-ws input { position: absolute; opacity: 0; pointer-events: none; }
.lp-ws span { display: block; text-align: center; padding: 10px 8px; border: 1px solid var(--line-2); border-radius: 12px; font-weight: 600; color: var(--ink-2); }
.lp-ws input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.lp-ws input:focus-visible + span { outline: 2px solid #6FAEFF; outline-offset: 2px; }
/* ---------- Arabic: right to left ---------- */
[dir="rtl"] { --sans: "IBM Plex Sans Arabic", "Plus Jakarta Sans", -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; }
[dir="rtl"] body, [dir="rtl"] button, [dir="rtl"] input, [dir="rtl"] select, [dir="rtl"] textarea { font-family: var(--sans); letter-spacing: 0 !important; }
[dir="rtl"] select { background-position: left 15px center !important; padding-left: 34px !important; padding-right: 12px !important; }
[dir="rtl"] th, [dir="rtl"] td { text-align: right; } [dir="rtl"] th.n, [dir="rtl"] td.n { text-align: left; }
[dir="rtl"] .page-q { margin-left: 0; margin-right: 10px; } [dir="rtl"] .info-i { margin-left: 0; margin-right: 6px; }
[dir="rtl"] .lc-scale, [dir="rtl"] .lc-range, [dir="rtl"] .wk, [dir="rtl"] .pulse-wrap svg, [dir="rtl"] .chart, [dir="rtl"] .leaflet-container { direction: ltr; }
[dir="rtl"] .ticker { direction: rtl; }
[dir="rtl"] .ai-dock { right: auto; left: 0; border-left: 0; border-right: 1px solid var(--line); }
[dir="rtl"] body.ai-open .app, [dir="rtl"] body.ai-open .legal-links { margin-right: 0; margin-left: var(--ai-w); }
[dir="rtl"] .ai-grip { left: auto; right: -4px; }
[dir="rtl"] .who-btn { padding: 2px 2px 2px 10px; }
[dir="rtl"] .docs-nav a:not(.brand), [dir="rtl"] .info-card { text-align: right; }
[dir="rtl"] textarea, [dir="rtl"] input { unicode-bidi: plaintext; }  /* a pasted English advert reads left to right */
[dir="rtl"] #ai-close svg, [dir="rtl"] .info-more, [dir="rtl"] .btn::after { transform: scaleX(-1); display: inline-block; }
