/* SYGNAL admin: css/insights.css. Home's four tabs (js/pages/home.js, home-overview.js, home-usage.js,
 * home-performance.js, home-owe.js). Loaded after /ui.css, /css/home.css and /css/ops.css; only kit tokens
 * (--ui-*) and kit components, plus the parts below.
 *
 * Mobile-first: the phone (390) and the tablet (820) are drawn first, the desktop second.
 *   base (< 768)   tiles 2 across; the five Overview charts share one card (chips choose); every list is one column;
 *   768 and up     tiles 3 across; charts 2 across (Revenue full width); Usage and Performance pairs side by side.
 */

/* ── The tab strip and its panels ───────────────────────────────────────── */
.home-tabs { position: sticky; top: calc(var(--ui-topbar-h) + var(--ui-safe-top)); z-index: 6; margin: 0 calc(-1 * var(--ui-page-pad)); padding: 8px var(--ui-page-pad); background: var(--ui-bg); box-shadow: 0 1px 0 var(--ui-line); }
.home-tabs { gap: 2px; }
.home-tabs .ui-tab { height: 44px; flex-direction: row; padding: 0; font-size: 13px; line-height: 20px; border-radius: var(--ui-radius-pill); }
.home-tabs .ui-tab.is-on { box-shadow: inset 0 0 0 1.5px var(--ui-brand); }
.home-panels { display: flex; flex-direction: column; min-width: 0; }
.home-panel { display: flex; flex-direction: column; gap: var(--ui-section-gap); min-width: 0; }
.home-panel[hidden] { display: none; }
.ins-host { display: flex; flex-direction: column; gap: var(--ui-gap); min-width: 0; }
@media (min-width: 768px) {
  .home-tabs { margin: 0 calc(-1 * var(--ui-page-pad)); }
  .home-tabs .ui-tab { font-size: 15px; }
  .home-tabs { display: inline-grid; position: static; margin: 0; padding: 0; background: transparent; box-shadow: none; grid-auto-columns: 148px; }
}

/* Needs you folds under the headline figures on Overview. */
.home-needs-box { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.home-needs-box > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-height: 48px; padding: 0 16px; list-style: none; cursor: pointer; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: var(--ui-radius-card); box-shadow: var(--ui-shadow-1); }
.home-needs-box > summary::-webkit-details-marker { display: none; }
.home-needs-box .home-sec__meta { flex: 1 1 auto; }
.home-chev, .ins-chev { flex: none; margin-left: auto; color: var(--ui-muted); transition: transform .15s; }
details[open] > summary > .home-chev, details[open] > summary > .ins-chev, .ins-quiet__line[aria-expanded="true"] .ins-chev { transform: rotate(180deg); }
.home-money-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.home-money-bar > .ui-small { flex: 1 1 200px; }
.home-bottom { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1280px) { .home-bottom { grid-template-columns: minmax(0, 1fr); } }

/* ── Overview: the six headline tiles ─────────────────────────────────────
 * A face is a label, a number, a change chip (with what it compares with) and a sparkline: nothing else.
 * Every caveat is behind the "?". Each part has a fixed slot, so the numbers, chips and lines of the six
 * tiles sit level and the tiles of a row are the same height (the grid stretches them). */
.ins-ov__asof { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.ins-excl { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0 -8px 0 0; padding: 0 8px; border: 0; background: transparent; color: var(--ui-brand); font-family: var(--ui-font); font-size: 13px; line-height: 18px; font-weight: 600; cursor: pointer; }
.ins-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ui-gap); margin: 0; }
.ins-tile { justify-content: flex-start; gap: 4px; min-height: 0; padding: 14px 14px 12px; }
.ins-tile__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ins-tile__label { margin: 0; min-height: 36px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ui-slate); }
.ins-help { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -13px -13px -13px 0; padding: 0; border: 0; background: transparent; color: var(--ui-slate); font-family: var(--ui-font); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ins-help > span { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ui-line-strong); background: var(--ui-surface); font-size: 13px; line-height: 1; font-weight: 600; }
.ins-help:hover > span { border-color: var(--ui-brand); color: var(--ui-brand); }
.ins-tile__value { margin: 0; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.01em; color: var(--ui-ink); overflow-wrap: anywhere; }
.ins-tile__value--long { font-size: 22px; line-height: 34px; }
.ins-tile__value--none { color: var(--ui-muted); }
/* Crash-free users: one figure per platform, each with its own name. */
.ins-plats { display: flex; flex-direction: column; gap: 2px; max-width: 200px; margin: 0; padding: 0; list-style: none; font-size: inherit; line-height: inherit; }
.ins-plat { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 30px; }
.ins-plat__v { font-size: 22px; line-height: 30px; font-weight: 700; letter-spacing: -0.01em; color: var(--ui-ink); }
.ins-plat__v--none { color: var(--ui-muted); }
.ins-plat__l { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ui-muted); }
.ins-tile__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-height: 36px; }
.ins-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ui-slate); }
.ins-delta--up { color: var(--ui-success); }
.ins-delta--down { color: var(--ui-danger); }
.ins-delta--none { font-weight: 500; color: var(--ui-muted); }
.ins-delta__t { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ui-muted); }
.ins-spark { display: block; width: 100%; height: 28px; margin-top: auto; overflow: visible; }
.ins-spark--none { height: 28px; margin-top: auto; }
.ins-spark__line { fill: none; stroke: var(--ui-chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ins-spark__area { fill: var(--ui-brand-50); stroke: none; }
.ins-tile--sk { gap: 10px; }
.ins-sk-l { display: block; width: 60%; height: 14px; border-radius: 6px; }
.ins-sk-v { display: block; width: 45%; height: 28px; border-radius: 6px; }
.ins-sk-s { display: block; width: 80%; height: 20px; border-radius: 6px; margin-top: auto; }
.ins-sk-m { display: block; width: 220px; max-width: 70%; height: 14px; border-radius: 6px; }
.ins-sk-chart { display: block; height: 240px; border-radius: var(--ui-radius-control); }
/* A 360 px phone: a tile is 158 px, so the label is a size down to keep "Yearly recurring revenue" to two lines and the numbers level. */
@media (max-width: 380px) {
  .ins-tile { padding: 12px 12px 10px; }
  .ins-tile__top { gap: 4px; }
  .ins-tile__label { min-height: 32px; font-size: 11.5px; line-height: 16px; letter-spacing: -0.01em; }
  .ins-help { margin-right: -12px; }
}
@media (min-width: 768px) {
  .ins-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ins-tile { padding: 16px 16px 14px; }
  .ins-tile__label { min-height: 40px; font-size: 14px; line-height: 20px; }
  .ins-tile__value { font-size: 32px; line-height: 38px; }
  .ins-tile__value--long { font-size: 28px; line-height: 38px; }
  .ins-plat__v { font-size: 24px; }
  .ins-tile__meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 8px; min-height: 24px; }
}
/* From 1200 a three-across tile is wide enough for every label on one line, so the label slot is one line tall.
 * (Three across stays the grid at every wider width: the page content is capped, so six across would give a tile
 * 177 px and "Yearly recurring revenue" would wrap to three lines and knock its number out of line.) */
@media (min-width: 1200px) {
  .ins-tile__label { min-height: 20px; }
}

/* ── Overview: charts ───────────────────────────────────────────────────── */
.ins-h2 { margin-top: 4px; }
.ins-chartnav { display: flex; flex-wrap: wrap; gap: 8px; }
.ins-chartnav .ui-chip { padding: 0 14px; }
.ins-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ui-gap); }
.ins-chart { display: none; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; }
.ins-chart.is-active, .ins-chart--sk { display: flex; }
.ins-chart__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ins-chart__titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ins-chart__meta { overflow-wrap: anywhere; }
.ins-chart__body { min-width: 0; }
.ins-chart__empty { margin: 0; padding: 32px 0; text-align: center; }
.ins-chart__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ins-chart__foot .ui-btn { flex: none; margin-left: -12px; }
.ins-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 13px; line-height: 18px; color: var(--ui-slate); }
.ins-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ins-sw { flex: none; display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.ins-sw--hatch { background: repeating-linear-gradient(135deg, var(--c) 0 2px, #FFFFFF 2px 4px); box-shadow: inset 0 0 0 1.5px var(--c); }
.ins-sw--diamond { width: 10px; height: 10px; margin: 0 1px; border-radius: 1px; transform: rotate(45deg); }
.ins-sw--line { height: 3px; border-radius: 2px; width: 16px; }
.ins-plot { position: relative; height: 240px; min-width: 0; }
.ins-plot--short { height: 220px; }
.ins-plot canvas { display: block; }
.ins-tablewrap { max-height: 360px; overflow: auto; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-control); }
.ins-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.ins-table th, .ins-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--ui-line); white-space: nowrap; }
.ins-table thead th { position: sticky; top: 0; background: var(--ui-surface-2); font-weight: 600; color: var(--ui-slate); }
.ins-table .ins-num { text-align: right; font-variant-numeric: tabular-nums; }
.ins-table tbody th { font-weight: 600; }
.ins-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ins-notes { background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: var(--ui-radius-card); padding: 0 16px; }
.ins-notes > summary { display: flex; align-items: center; min-height: 48px; font-size: 14px; font-weight: 600; cursor: pointer; }
.ins-notes ul { margin: 0 0 12px; padding-left: 18px; font-size: 14px; line-height: 20px; color: var(--ui-slate); }
.ins-notes li + li { margin-top: 6px; }
@media (min-width: 768px) {
  .ins-chartnav { display: none; }
  .ins-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ins-chart { display: flex; }
  .ins-chart[data-ins-chart-card="revenue"] { grid-column: 1 / -1; }
  .ins-chart[data-ins-chart-card="revenue"] .ins-plot { height: 300px; }
  .ins-chart__foot { flex-direction: row; align-items: center; gap: 12px; }
  .ins-chart__foot .ui-small { flex: 1 1 auto; }
}

/* ── The "?" sheet ──────────────────────────────────────────────────────── */
.ins-sheet__box { gap: 12px; }
.ins-sheet__body { display: flex; flex-direction: column; gap: 12px; }
.ins-sheet__lead { margin: 0; font-size: 15px; line-height: 22px; color: var(--ui-slate); }
.ins-sheet__note { margin: 0; }
.ins-defs { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.ins-defs dt { margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ui-muted); }
.ins-defs dd { margin: 2px 0 0; font-size: 15px; line-height: 22px; color: var(--ui-ink); overflow-wrap: anywhere; }
.ins-sheet__lead--big { font-size: 17px; line-height: 24px; font-weight: 600; color: var(--ui-ink); }
.ins-plist { margin: 0 0 4px; padding-left: 18px; font-size: 15px; line-height: 22px; color: var(--ui-ink); }
.ins-plist li + li { margin-top: 4px; }

/* ── Usage and Performance ──────────────────────────────────────────────── */
.ins-bar { display: flex; flex-direction: column; gap: 8px; }
.ins-seg { max-width: 560px; }
.ins-us { display: flex; flex-direction: column; gap: var(--ui-gap); min-width: 0; }
.ins-card { margin: 0; min-width: 0; }
.ins-us > .ui-tiles, .ins-us > .ops-pair { margin: 0; }
.ins-card--attn { border-color: var(--ui-line-strong); }
.ins-sub { margin: 12px 0 4px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ui-slate); }
.ins-sub2 { margin: 0 0 4px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ui-muted); }
.ins-ok { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 15px; line-height: 22px; color: var(--ui-slate); }
.ins-ok .ui-i { flex: none; margin-top: 1px; color: var(--ui-success); }
.ins-counter-ok { margin-top: 8px; }
.ins-quiet { margin-top: 8px; border-top: 1px solid var(--ui-line); }
.ins-quiet__line { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ui-ink); font-family: var(--ui-font); font-size: 15px; line-height: 22px; font-weight: 600; text-align: left; cursor: pointer; }
.ins-quiet__line .ins-chev { margin-left: 0; }
.ins-quiet .ui-small { margin-bottom: 4px; }
.ins-mapbar { display: flex; flex-direction: column; gap: 8px; }
.ins-map { position: relative; z-index: 0; height: 320px; margin: 12px 0 0; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-control); overflow: hidden; isolation: isolate; background: var(--ui-line); }
.ins-map .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; }
.ins-map .leaflet-control-attribution { padding: 0 6px; font-family: var(--ui-font); font-size: 12px; line-height: 16px; color: var(--ui-slate); }
.ins-map__none { margin: 0; padding: 24px; }
.ins-pin-wrap { display: flex; align-items: center; justify-content: center; background: transparent; border: 0; }
.ins-pin { display: flex; align-items: center; justify-content: center; width: var(--pin, 100%); height: var(--pin, 100%); border-radius: 50%; border: 2px solid #FFFFFF; background: var(--ui-brand); color: #FFFFFF; font-family: var(--ui-font); font-size: 14px; line-height: 1; font-weight: 700; box-shadow: 0 1px 4px rgba(15, 27, 45, 0.4); }
.ins-pin--bad { background: var(--ui-danger); }
.ins-pop__who { color: var(--ui-slate); }
.ins-more { padding: 0 16px; }
.ins-more > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 12px; min-height: 56px; padding: 8px 0; list-style: none; cursor: pointer; }
.ins-more > summary::-webkit-details-marker { display: none; }
.ins-more > summary .ui-small { flex: 1 1 200px; }
.ins-more__body { display: flex; flex-direction: column; gap: var(--ui-gap); padding-bottom: 16px; }
.ins-more__body .ins-card { box-shadow: none; }
.ins-note { margin: 0; }
.ins-two { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ins-bars { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ins-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 88px auto; align-items: center; gap: 8px; min-height: 32px; font-size: 14px; line-height: 20px; }
.ins-bar-row__label { overflow-wrap: anywhere; color: var(--ui-ink); }
.ins-bar-row__track { display: block; height: 8px; border-radius: 4px; background: var(--ui-bg); overflow: hidden; }
.ins-bar-row__fill { display: block; width: var(--w); height: 100%; border-radius: 4px; background: var(--ui-chart-1); }
.ins-bar-row__n { min-width: 28px; font-weight: 600; text-align: right; }
.ins-crashline__v { margin: 0; font-size: 24px; line-height: 30px; font-weight: 700; }
.ins-clean { margin: 0 0 8px; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ui-ink); }
.ins-sigs { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ins-sig { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ui-line); }
.ins-sig:last-child { border-bottom: 0; }
.ins-sig__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ins-sig__name { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ui-ink); }
.ins-sig__n { display: flex; flex-direction: column; align-items: flex-end; flex: none; font-size: 15px; line-height: 22px; font-weight: 700; color: var(--ui-ink); text-align: right; }
.ins-sig--zero .ins-sig__name, .ins-sig--zero .ins-sig__n { color: var(--ui-muted); font-weight: 600; }
.ins-grp + .ins-grp { margin-top: 8px; }
@media (min-width: 768px) {
  .ins-two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .ins-mapbar { flex-direction: row; flex-wrap: wrap; }
  .ins-mapbar > .ui-seg { flex: 1 1 220px; }
  .ins-map { height: 400px; }
  .ins-us, .ins-host { gap: 16px; }
}
@media (min-width: 1280px) { .ins-map { height: 460px; } }

/* ── Money: who I owe ───────────────────────────────────────────────────── */
.ins-owe-total { margin: 4px 0 0; font-size: 15px; line-height: 22px; color: var(--ui-slate); }
.ins-owe-total strong { font-size: 18px; color: var(--ui-ink); }
.ins-owe { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ui-gap); }
.ins-owecard { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; }
.ins-owecard__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ins-owecard__sum { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; color: var(--ui-ink); text-align: right; }
.ins-deals { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ins-deal { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--ui-line); }
.ins-deal__line { margin: 0; font-size: 15px; line-height: 22px; color: var(--ui-ink); overflow-wrap: anywhere; }
.ins-deal__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.ins-deal__note { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13px; line-height: 18px; color: var(--ui-warning); }
.ins-deal__note .ui-i { flex: none; margin-top: 1px; }
.ins-deal__acts { display: flex; flex-direction: column; gap: 8px; }
.ins-deal__acts .ui-btn { width: 100%; }
.ins-deal--paid .ins-deal__line { color: var(--ui-slate); }
.ins-deal__paidon { margin: 0; color: var(--ui-slate); }
.ins-client { display: flex; flex-direction: column; border-top: 1px solid var(--ui-line); padding-top: 8px; }
.ins-client + .ins-client { margin-top: 4px; }
.ins-client__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ins-client__name { margin: 0; min-width: 0; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ui-ink); overflow-wrap: anywhere; }
.ins-client__sum { margin: 0; flex: none; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ui-ink); }
.ins-client .ins-deal { border-top: 0; padding: 8px 0 4px; }
.ins-paid__dealer { padding: 8px 0 4px; border-top: 1px solid var(--ui-line); }
.ins-paid__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; }
.ins-paid__name { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ui-ink); overflow-wrap: anywhere; }
.ins-paid__sum { margin: 0; flex: none; font-size: 15px; line-height: 22px; color: var(--ui-slate); }
.ins-paid__dealer .ins-deal { border-top: 0; padding: 8px 0; }
.ins-owe-open { display: inline-flex; align-items: center; min-height: 44px; color: var(--ui-brand); font-weight: 600; }
.ins-owe-page { display: flex; flex-direction: column; gap: var(--ui-gap); }
.ins-paid { padding: 0 16px; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: var(--ui-radius-card); }
.ins-paid > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; }
.ins-paid > summary .ui-small { margin-left: auto; }
.ins-owe-none { padding: 8px 0; }
.ins-owe-foot { margin: 0; }
@media (min-width: 768px) {
  .ins-deal__acts { flex-direction: row; flex-wrap: wrap; }
  .ins-deal__acts .ui-btn { width: auto; }
}
@media (min-width: 1024px) { .ins-owe { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Money: the long sections are "More" rows ─────────────────────────────
 * Closed on a phone or tablet (home.js opens them from 1024), so the page after Who I owe is a short list
 * of rows, not four screens of charts. The row is the card; its body is what the section always held. */
.home-more { padding: 0; overflow: hidden; }
.home-more > summary { flex-wrap: nowrap; gap: 12px; min-height: 64px; padding: 10px 16px; }
.home-more__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.home-more > summary .ui-h3 { margin: 0; }
.home-more > summary .home-more__text .ui-small { flex: none; }
.home-more > summary .ins-chev { margin-left: 0; }
.home-more__body { padding: 0 16px 16px; min-width: 0; }
.home-more__body--flush { padding: 0; }
.home-more.home-chart { display: block; min-height: 0; padding: 0; }
.home-chart__bar { display: flex; justify-content: flex-end; margin: -4px 0 4px; }
.home-chart__bar:empty { display: none; }
.home-more[open] > summary { border-bottom: 1px solid var(--ui-line); margin-bottom: 12px; }
.home-more[open].home-latestbox > summary { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) { .home-chev, .ins-chev { transition: none; } }

.ins-pair--one { grid-template-columns: minmax(0, 1fr); }

/* Four tiles (Usage) and up to four crash-free figures fill a row from 768; three would leave one alone. */
@media (min-width: 768px) {
  .ins-us-tiles, .ins-crash { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Overview (2026-10-24): the working layer, Highlights, Reach, More numbers ───────────────────────────────
 * The working layer (alerts above, then the Needs you chips) stays at the very top; Presenting mode hides
 * [data-working-layer]. Highlights: 2 across on the phone, 4 from 768. */
.home-working { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.home-needs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.home-needs-row__t { flex: none; margin: 0 4px 0 0; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--ui-ink); }
.home-needs-row__chips { display: contents; }
.home-needs-row__note { color: var(--ui-muted); }
.home-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; text-decoration: none; }
.home-chip strong { color: var(--ui-ink); font-weight: 700; }
.home-chip--all { margin-left: auto; }
.home-chip--all[aria-expanded="true"] .home-chev { transform: rotate(180deg); }
.home-needs-box[hidden] { display: none; }
.ins-tiles--hl, .ins-tiles--more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .ins-tiles--hl, .ins-tiles--more { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Highlights and More numbers are four across from 768, beside the side menu, so a tile is only about 145 to 210 px.
 * MEASURED 2026-10-24 (npm run browser:overview, 820 px, tile 158 px): "Yearly recurring revenue" took three lines and its
 * number sat 20 px lower than its neighbours, "CA$19,154" split as "CA$19,1" / "54", and the Crash-free users figures broke
 * inside a word. So from 768 to 1199 these two grids use the compact tile of the 360 px phone: less padding, a smaller
 * label in a THREE-line slot (the numbers stay level whatever wraps), and figures sized to stay on one line. */
@media (min-width: 768px) and (max-width: 1199px) {
  .ins-tiles--hl .ins-tile, .ins-tiles--more .ins-tile { padding: 12px 12px 10px; }
  .ins-tiles--hl .ins-tile__top, .ins-tiles--more .ins-tile__top { gap: 4px; }
  .ins-tiles--hl .ins-tile__label, .ins-tiles--more .ins-tile__label { min-height: 48px; font-size: 12px; line-height: 16px; letter-spacing: -0.01em; }
  .ins-tiles--hl .ins-help, .ins-tiles--more .ins-help { margin-right: -12px; }
  .ins-tiles--hl .ins-tile__value, .ins-tiles--more .ins-tile__value { font-size: 26px; line-height: 34px; }
  .ins-tiles--hl .ins-tile__value--long, .ins-tiles--more .ins-tile__value--long { font-size: 20px; white-space: nowrap; overflow-wrap: normal; }
  .ins-tiles--hl .ins-tile__value--none, .ins-tiles--more .ins-tile__value--none { font-size: 18px; line-height: 38px; }
  .ins-tiles--hl .ins-plat__v, .ins-tiles--more .ins-plat__v { font-size: 20px; white-space: nowrap; }
  .ins-tiles--hl .ins-plat__l, .ins-tiles--more .ins-plat__l { white-space: nowrap; }
}
/* From 1200 the label slot of these grids is TWO lines: "Yearly recurring revenue" wraps in a 224 px tile (measured: its number sat at 61 px, the others at 41 px). */
@media (min-width: 1200px) {
  .ins-tiles--hl .ins-tile__label, .ins-tiles--more .ins-tile__label { min-height: 40px; }
}
.ins-tile__line { flex: 1 0 100%; font-size: 13px; line-height: 18px; color: var(--ui-muted); overflow-wrap: anywhere; }
.ins-tile__value--none { font-size: 18px; line-height: 38px; font-weight: 600; color: var(--ui-muted); }
.ins-tile--go { cursor: pointer; }
.ins-tile__goto { align-self: flex-start; min-height: 44px; margin: 0 0 -8px -4px; padding: 0 4px; border: 0; background: transparent; color: var(--ui-brand); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ins-spark__hatch { stroke: none; }
.ins-spark__hatchline { stroke: var(--ui-chart-1); stroke-width: 1.2; }
.ins-spark__line--partial { stroke-dasharray: 3 3; }
.ins-spark__cap { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 16px; color: var(--ui-muted); }

/* The Reach card: headline, a world map of proportional dots, Top countries. */
.ins-reach { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; scroll-margin-top: calc(var(--ui-topbar-h, 56px) + 12px); }
.ins-reach:focus { outline: none; }
.ins-reach:focus-visible { outline: 2px solid var(--ui-brand); outline-offset: 2px; }
.ins-reach__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ins-reach__titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ins-reach__titles .ui-h2 { margin: 0; }
.ins-reach__headline { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; color: var(--ui-ink); overflow-wrap: anywhere; }
.ins-reach__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.ins-reach__mapcol { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ins-reach__map { height: 240px; min-width: 0; overflow: hidden; isolation: isolate; border-radius: var(--ui-radius-control); background: var(--ui-surface-2); }
.ins-reach__map .leaflet-control-zoom a { width: 44px; height: 44px; line-height: 44px; }
.ins-reach__note:empty { display: none; }
.ins-map__none { margin: 0; padding: 24px 12px; text-align: center; }
.ins-reach-dot { fill: var(--ui-brand); stroke: var(--ui-surface); }
.ins-reach__list { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.ins-reach__list .ui-h3 { margin: 0; }
.ins-top { display: flex; flex-direction: column; gap: 10px; width: 100%; margin: 0; padding: 0; list-style: none; }
.ins-top__row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 40px; grid-template-areas: "n name v pct" ". bar bar bar"; align-items: baseline; gap: 2px 8px; }
.ins-top__n { grid-area: n; color: var(--ui-muted); }
.ins-top__name { grid-area: name; color: var(--ui-ink); overflow-wrap: anywhere; }
.ins-top__v { grid-area: v; font-weight: 600; color: var(--ui-ink); }
.ins-top__pct { grid-area: pct; text-align: right; color: var(--ui-muted); }
.ins-top__bar { grid-area: bar; display: block; height: 6px; border-radius: 3px; background: var(--ui-line); overflow: hidden; }
.ins-top__bar i { display: block; width: var(--w, 0); height: 100%; border-radius: 3px; background: var(--ui-brand); }
@media (min-width: 768px) {
  .ins-reach__body { grid-template-columns: minmax(0, 3fr) minmax(240px, 2fr); }
  .ins-reach__map { height: 320px; }
}

/* ── Usage: organisations ranked, the countries beside the map ─────────────
 * Bars are plain boxes sized by a --w custom property (a share of the biggest organisation), so they read in a screenshot, a print and a
 * screen reader (each bar has its numbers in its label). Online and offline use the same two colours as the Activity chart. */
.ins-maprow { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ui-gap); min-width: 0; }
.ins-us > .ins-maprow { margin: 0; }
.ins-coverage[hidden] { display: none; }
.ins-cty { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ins-cty__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name n" "bar bar"; align-items: baseline; gap: 4px 12px; padding: 9px 0; border-top: 1px solid var(--ui-line); font-size: 15px; line-height: 22px; }
.ins-cty__row:first-child { border-top: 0; }
.ins-cty__name { grid-area: name; color: var(--ui-ink); overflow-wrap: anywhere; }
.ins-cty__n { grid-area: n; font-weight: 600; color: var(--ui-ink); text-align: right; }
.ins-cty__bar { grid-area: bar; display: block; height: 6px; border-radius: 3px; background: var(--ui-bg); overflow: hidden; }
.ins-cty__bar > span { display: block; width: var(--w); height: 100%; border-radius: 3px; background: #2D5FAF; }
.ins-cty__more { margin: 8px 0 0; }
.ins-rank { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ins-rank__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 8px; font-size: 13px; line-height: 18px; color: var(--ui-slate); }
.ins-rank__lg::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; }
.ins-rank__lg--on::before { background: #2D5FAF; }
.ins-rank__lg--off::before { background: #EB6834; }
.ins-rank__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 0; border-top: 1px solid var(--ui-line); min-width: 0; }
.ins-rank__row:first-child { border-top: 0; }
.ins-rank__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.ins-rank__who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.ins-rank__name { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ui-ink); overflow-wrap: anywhere; }
.ins-rank__n { flex: none; font-size: 15px; line-height: 22px; font-weight: 700; color: var(--ui-ink); text-align: right; }
.ins-rank__bar { display: flex; height: 10px; border-radius: 5px; background: var(--ui-bg); overflow: hidden; }
.ins-rank__on, .ins-rank__off { display: block; width: var(--w); height: 100%; }
.ins-rank__on { background: #2D5FAF; }
.ins-rank__off { background: #EB6834; }
.ins-rank__meta { margin: 0; font-size: 13px; line-height: 18px; color: var(--ui-slate); }
.ins-kind { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 0 8px; border: 1px solid var(--ui-line-strong); border-radius: 11px; background: var(--ui-surface-2); font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ui-ink); white-space: nowrap; }
.ins-kind::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ui-muted); }
.ins-kind--paying::before { background: var(--ui-success); }
.ins-kind--dealer::before, .ins-kind--partner::before { background: var(--ui-brand); }
.ins-kind--trial::before { background: var(--ui-warning); }
.ins-idle { margin-top: 8px; border-top: 1px solid var(--ui-line); }
.ins-idle > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; list-style: none; cursor: pointer; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ui-ink); }
.ins-idle > summary::-webkit-details-marker { display: none; }
.ins-idle .ins-chev { margin-left: 0; }
.ins-idle__list { margin: 4px 0 0; padding-left: 18px; font-size: 15px; line-height: 22px; color: var(--ui-ink); }
.ins-idle__list li + li { margin-top: 2px; }
.ins-idle--none { margin: 8px 0 0; padding-top: 10px; }
/* The tiles and the average-length line under them stay together: one gap between the block and the next card, not two. */
.ins-us-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
@media (min-width: 768px) {
  .ins-maprow { grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); align-items: start; }
  .ins-rank__row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr) 56px; column-gap: 16px; row-gap: 2px; align-items: center; }
  .ins-rank__top { display: contents; }
  .ins-rank__who { grid-column: 1; grid-row: 1 / span 2; }
  .ins-rank__bar { grid-column: 2; grid-row: 1; }
  .ins-rank__meta { grid-column: 2; grid-row: 2; }
  .ins-rank__n { grid-column: 3; grid-row: 1 / span 2; }
}
