/* Telemetry tokens (light + dark), shell and components. Owned by unit fui. Prefix: --t- and .t-
   Screens use the components in web/src/tele/ui.rs and these tokens only (never hex) so dark mode works.

   Tokens (docs/TELEMETRY.md section 3, checked against the Figma variables; camelCase aliases exist too):
     --t-bg  --t-card  --t-ink  --t-muted  --t-line
     --t-accent  --t-accent-soft  --t-accent-ink        (--t-accentSoft, --t-accentInk)
     --t-have  --t-have-soft  --t-part  --t-part-soft  --t-miss  --t-miss-soft   (--t-haveSoft, --t-partSoft, --t-missSoft)
     --t-skeleton  --t-navy  --t-on-navy  --t-on-navy-soft  --t-on-accent  --t-on-have  --t-scrim
     --t-shadow-pop  --t-shadow-sheet  --t-f-head (Space Grotesk)  --t-f-body (Inter)
     --t-r-btn 8  --t-r-input 10  --t-r-card 14  --t-r-banner 12  --t-r-pill 999
   Text colours by tone: .t-ink-good .t-ink-warn .t-ink-bad .t-ink-info .t-ink-neutral (grey).
   Layout: .t-page is a column with 24 px gaps (the shell puts the page in it); .t-grid-4 (KPI tiles, 16 px gaps),
   .t-grid-2 (two cards), .t-col (a column of cards, 16 px gaps). */

/* ============================ tokens ============================ */
.tele {
  --t-bg: #F5F5F7; --t-card: #FFFFFF; --t-ink: #1C1C1E; --t-muted: #6E6E73; --t-line: #E5E5EA;
  --t-accent: #007AFF; --t-accent-soft: #E5F1FF; --t-accent-ink: #0062CC;
  --t-have: #248A3D; --t-have-soft: #E9F6EC; --t-part: #B25000; --t-part-soft: #FFF4E5;
  --t-miss: #D70015; --t-miss-soft: #FFEDEE; --t-skeleton: #EDEDF0; --t-navy: #0B2A4A;
  --t-on-navy: #FFFFFF; --t-on-navy-soft: #EDEDF0; --t-on-accent: #FFFFFF; --t-on-have: #FFFFFF;
  --t-scrim: rgba(28, 28, 30, .35);
  --t-shadow-pop: 0 12px 32px rgba(15, 23, 41, .14);
  --t-shadow-sheet: 0 10px 28px rgba(15, 23, 41, .12);
  --t-f-head: "Space Grotesk", Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --t-f-body: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --t-r-btn: 8px; --t-r-input: 10px; --t-r-card: 14px; --t-r-banner: 12px; --t-r-pill: 999px;
  --t-side-w: 232px;
  --t-accentSoft: var(--t-accent-soft); --t-accentInk: var(--t-accent-ink); --t-haveSoft: var(--t-have-soft);
  --t-partSoft: var(--t-part-soft); --t-missSoft: var(--t-miss-soft);
}
/* Dark (navy): the device setting, unless ?theme=light; ?theme=dark forces it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tele {
    --t-bg: #071A2E; --t-card: #0B2A4A; --t-ink: #FFFFFF; --t-muted: #B9C9DD; --t-line: #1D3D60;
    --t-accent: #3D9BFF; --t-accent-soft: #123A66; --t-accent-ink: #8EC5FF;
    --t-have: #52D18A; --t-have-soft: #0F3A33; --t-part: #FFB547; --t-part-soft: #3A2E14;
    --t-miss: #FF7A7A; --t-miss-soft: #3D1A26; --t-skeleton: #163556; --t-navy: #1D3D60;
    --t-on-have: #06261F; --t-scrim: rgba(2, 10, 20, .6);
    --t-shadow-pop: 0 12px 32px rgba(0, 0, 0, .45); --t-shadow-sheet: 0 10px 28px rgba(0, 0, 0, .4);
  }
  :root:not([data-theme="light"]) body:has(.tele) { background: #071A2E; }
}
:root[data-theme="dark"] .tele {
  --t-bg: #071A2E; --t-card: #0B2A4A; --t-ink: #FFFFFF; --t-muted: #B9C9DD; --t-line: #1D3D60;
  --t-accent: #3D9BFF; --t-accent-soft: #123A66; --t-accent-ink: #8EC5FF;
  --t-have: #52D18A; --t-have-soft: #0F3A33; --t-part: #FFB547; --t-part-soft: #3A2E14;
  --t-miss: #FF7A7A; --t-miss-soft: #3D1A26; --t-skeleton: #163556; --t-navy: #1D3D60;
  --t-on-have: #06261F; --t-scrim: rgba(2, 10, 20, .6);
  --t-shadow-pop: 0 12px 32px rgba(0, 0, 0, .45); --t-shadow-sheet: 0 10px 28px rgba(0, 0, 0, .4);
}
:root[data-theme="dark"] body:has(.tele) { background: #071A2E; }
body:has(.tele) { background: #F5F5F7; }
/* The old pages' look switch never shows on Telemetry. */
body:has(.tele) #looks { display: none !important; }

/* ============================ base ============================ */
.tele {
  display: flex; min-height: 100vh; background: var(--t-bg); color: var(--t-ink);
  font: 400 14px/17px var(--t-f-body); -webkit-font-smoothing: antialiased; color-scheme: light;
}
:root[data-theme="dark"] .tele { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tele { color-scheme: dark; } }
:where(.tele) *, :where(.tele) *::before, :where(.tele) *::after { box-sizing: border-box; }
:where(.tele) a { color: inherit; text-decoration: none; }
:where(.tele) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
:where(.tele) :is(h1, h2, h3, p) { margin: 0; font: inherit; flex: none; min-width: 0; letter-spacing: normal; }
:where(.tele) b { font-weight: 600; }
.tele :focus-visible { outline: 2px solid var(--t-accent); outline-offset: 2px; }
.t-ico { display: inline-flex; flex: none; }
.t-ico svg { display: block; }
.t-ink-good { color: var(--t-have); }
.t-ink-warn { color: var(--t-part); }
.t-ink-bad { color: var(--t-miss); }
.t-ink-info { color: var(--t-accent-ink); }
.t-ink-neutral { color: var(--t-muted); }
.t-link { color: var(--t-accent-ink); font-size: 13px; line-height: 16px; font-weight: 600; white-space: nowrap; flex: none; }
.t-link:hover { text-decoration: underline; }
.t-eyebrow { display: block; font-size: 11px; line-height: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--t-muted); }
.t-todo { padding: 24px; border: 1px dashed var(--t-line); border-radius: 14px; color: var(--t-muted); background: var(--t-card); }

/* ============================ shell ============================ */
.t-side {
  position: sticky; top: 0; height: 100vh; width: var(--t-side-w); flex: none; z-index: 5;
  display: flex; flex-direction: column; gap: 4px; padding: 24px 16px; overflow-x: hidden; overflow-y: auto;
  background: var(--t-card); border-right: 1px solid var(--t-line);
}
.t-side-logo { display: flex; padding: 0 0 20px 8px; }
.t-logo { display: inline-flex; align-items: center; gap: 10px; }
.t-logo-mark { display: inline-flex; flex: none; }
.t-logo-mark svg { display: block; }
.t-logo-word { font: 700 18px/23px var(--t-f-head); color: var(--t-ink); }
.t-nav { display: flex; flex-direction: column; gap: 4px; }
.t-nav-item {
  display: flex; align-items: center; gap: 10px; width: 200px; padding: 9px 12px; border-radius: 8px;
  font-size: 14px; line-height: 17px; font-weight: 500; color: var(--t-muted); white-space: nowrap;
}
.t-nav-item:hover { color: var(--t-ink); }
.t-nav-item.active { background: var(--t-accent-soft); color: var(--t-accent-ink); font-weight: 600; }
.t-side-grow { flex: 1; }
.t-user { display: flex; align-items: center; gap: 10px; padding-left: 8px; min-width: 0; }
.t-avatar {
  width: 32px; height: 32px; flex: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--t-accent-soft); color: var(--t-accent-ink); font-size: 14px; line-height: 17px; font-weight: 600;
}
.t-user-text { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.t-user-text b { font-size: 14px; line-height: 17px; font-weight: 600; color: var(--t-ink); }
.t-user-text small { font-size: 12px; line-height: 15px; color: var(--t-muted); }
.t-user-text .t-sk { margin: 2px 0; }

.t-main { flex: 1; min-width: 0; padding: 32px; display: flex; flex-direction: column; }
.t-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; line-height: 16px; margin-bottom: 24px; }
.t-crumb { color: var(--t-accent-ink); font-weight: 500; }
.t-crumb:hover { text-decoration: underline; }
.t-crumb-sep { color: var(--t-muted); }
.t-crumb-now { color: var(--t-muted); }
.t-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 57px; }
.t-head { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tele .t-title { font: 500 28px/36px var(--t-f-head); letter-spacing: -0.42px; color: var(--t-ink); }
.tele .t-sub { font-size: 14px; line-height: 17px; color: var(--t-muted); }
.t-controls { display: flex; align-items: center; gap: 12px; flex: none; min-width: 0; }
.t-status { font-size: 13px; line-height: 16px; white-space: nowrap; }
.t-bell {
  position: relative; width: 38px; height: 38px; flex: none; border-radius: 10px; border: 1px solid var(--t-line);
  background: var(--t-card); color: var(--t-muted); display: inline-flex; align-items: center; justify-content: center;
}
.t-bell:hover { color: var(--t-ink); }
.t-bell-dot { position: absolute; top: 8px; right: 8px; width: 4px; height: 4px; border-radius: 999px; background: var(--t-miss); box-shadow: 0 0 0 2px var(--t-card); }
.t-range { position: relative; flex: none; }
.t-range-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 10px 9px 12px; border: 1px solid var(--t-line);
  border-radius: 10px; background: var(--t-card); color: var(--t-ink); font-size: 13px; line-height: 16px; font-weight: 500; white-space: nowrap;
}
.t-range-btn .t-ico, .t-switch-chev { color: var(--t-muted); }
.t-range-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 41; width: 184px; }
.t-range-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; line-height: 16px; font-weight: 500; color: var(--t-ink);
}
.t-range-item:hover { background: var(--t-bg); }
.t-range-item.on { background: var(--t-accent-soft); color: var(--t-accent-ink); font-weight: 600; }
.t-switch-wrap { position: relative; min-width: 0; }
.t-switch {
  display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; padding: 7px 12px 7px 8px;
  border: 1px solid var(--t-line); border-radius: 10px; background: var(--t-card); text-align: left;
}
.t-switch.open { border-color: var(--t-accent); box-shadow: 0 0 0 .5px var(--t-accent); }
.t-switch-text { display: flex; flex-direction: column; min-width: 0; }
.t-switch-text b { font-size: 14px; line-height: 17px; font-weight: 600; color: var(--t-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-switch-text small { font-size: 12px; line-height: 15px; color: var(--t-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-mark {
  width: 28px; height: 28px; flex: none; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--t-have-soft); color: var(--t-have); font-size: 13px; line-height: 16px; font-weight: 700;
}
.t-mark-all { background: var(--t-accent-soft); color: var(--t-accent-ink); }
.t-tabs {
  display: inline-flex; align-items: center; align-self: flex-start; gap: 4px; padding: 4px; margin-top: 24px; max-width: 100%;
  border-radius: 10px; background: var(--t-skeleton); overflow-x: auto; scrollbar-width: none;
}
.t-tabs::-webkit-scrollbar { display: none; }
.t-tab { flex: none; padding: 7px 14px; border-radius: 8px; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--t-muted); white-space: nowrap; }
.t-tab:hover { color: var(--t-ink); }
.t-tab.active { background: var(--t-card); border: 1px solid var(--t-line); padding: 7px 14px; color: var(--t-ink); font-weight: 600; }
.t-page { margin-top: 24px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
/* Frames 10 to 16 (Live, Compliance, Checkout, Delivery, Results, journey, best time): 20 px apart. */
.t-dense .t-tabs { margin-top: 20px; }
.t-dense .t-page { margin-top: 20px; gap: 20px; }
.t-dense .t-crumbs { margin-bottom: 20px; }
.t-main > .t-top + .t-page { margin-top: 24px; }

/* overlays: the shell draws the catcher / scrim and places them */
.t-catch { position: fixed; inset: 0; z-index: 40; }
.t-menu-anchor { position: absolute; top: calc(100% + 15px); right: 0; z-index: 41; width: 390px; max-width: calc(100vw - 32px); }
.t-pop {
  display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--t-card); color: var(--t-ink);
  border: 1px solid var(--t-line); border-radius: 12px; box-shadow: var(--t-shadow-pop);
}
.t-pop-hint { font-size: 12px; line-height: 15px; color: var(--t-muted); }
.t-divider { flex: none; height: 1px; background: var(--t-line); border: 0; margin: 0; }
.t-scrim { position: fixed; inset: 0; z-index: 50; background: var(--t-scrim); }
.t-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: 440px; max-width: 100vw; overflow-y: auto;
  display: flex; flex-direction: column; padding: 24px 20px 20px; background: var(--t-card); color: var(--t-ink);
  box-shadow: -12px 0 32px rgba(15, 23, 41, .12);
}
.t-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 88vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 8px 16px 24px; background: var(--t-card); color: var(--t-ink);
  border-radius: 16px 16px 0 0; box-shadow: 0 -10px 28px rgba(15, 23, 41, .16);
}
.t-toast-host { position: fixed; z-index: 70; bottom: 24px; left: calc(50% + var(--t-side-w) / 2); transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); }
.tele-phone .t-toast-host { left: 50%; bottom: 88px; }

/* ============================ layout helpers ============================ */
.t-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.t-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.t-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ============================ status pill ============================ */
.t-pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 15px; white-space: nowrap;
}
.t-pill-dot { width: 6px; height: 6px; flex: none; border-radius: 999px; background: currentColor; }
.t-pill-good { background: var(--t-have-soft); color: var(--t-have); }
.t-pill-warn { background: var(--t-part-soft); color: var(--t-part); }
.t-pill-bad { background: var(--t-miss-soft); color: var(--t-miss); }
.t-pill-info { background: var(--t-accent-soft); color: var(--t-accent-ink); }
.t-pill-neutral { background: var(--t-line); color: var(--t-muted); }

/* ============================ KPI tile + tooltip ============================ */
.t-kpi {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 20px;
  background: var(--t-card); border: 1px solid var(--t-line); border-radius: 14px;
}
.t-kpi-label { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--t-muted); }
.t-kpi-value { font: 500 28px/36px var(--t-f-head); letter-spacing: -0.28px; color: var(--t-ink); white-space: nowrap; }
.t-kpi-note { font-size: 13px; line-height: 16px; font-weight: 500; }
.t-kpi-warning { background: var(--t-part-soft); border-color: var(--t-part); }
.t-kpi-warning .t-kpi-value { color: var(--t-part); }
.t-kpi-nodata .t-kpi-value { font-size: 20px; line-height: 26px; letter-spacing: -0.2px; color: var(--t-muted); }
.t-kpi-nodata .t-kpi-note { font-weight: 400; }
.t-kpi-stale { opacity: .6; }
.t-kpi-loading { gap: 12px; }
.t-kpi-tip, .t-explained-tip { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; display: none; pointer-events: none; }
.t-kpi:hover .t-kpi-tip, .t-kpi:focus-visible .t-kpi-tip, .t-explained:hover .t-explained-tip, .t-explained:focus-visible .t-explained-tip { display: block; }
.t-explained { position: relative; display: inline-flex; cursor: help; }
.t-tip { display: flex; flex-direction: column; align-items: flex-start; width: 280px; max-width: calc(100vw - 32px); }
.t-tip-caret { flex: none; width: 14px; height: 7px; margin-left: 24px; background: var(--t-navy); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.t-tip-bubble { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 12px 14px; border-radius: 10px; background: var(--t-navy); }
.t-tip-bubble b { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--t-on-navy); }
.t-tip-bubble span { font-size: 12px; line-height: 15px; color: var(--t-on-navy-soft); }

/* ============================ banners ============================ */
.t-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; }
.t-banner-icon, .t-notice-icon, .t-toast-icon { display: inline-flex; flex: none; }
.t-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--t-ink); }
.t-banner-text b { font-size: 14px; line-height: 17px; font-weight: 600; }
.t-banner-text span { font-size: 13px; line-height: 16px; }
.t-banner-bad { background: var(--t-miss-soft); } .t-banner-bad .t-banner-icon { color: var(--t-miss); }
.t-banner-warn { background: var(--t-part-soft); } .t-banner-warn .t-banner-icon { color: var(--t-part); }
.t-banner-info { background: var(--t-accent-soft); } .t-banner-info .t-banner-icon { color: var(--t-accent-ink); }
.t-banner-good { background: var(--t-have-soft); } .t-banner-good .t-banner-icon { color: var(--t-have); }
.t-banner-neutral { background: var(--t-line); } .t-banner-neutral .t-banner-icon { color: var(--t-muted); }
.t-notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; }
.t-notice-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.t-notice-text b { font-size: 14px; line-height: 17px; font-weight: 600; color: var(--t-ink); }
.t-notice-text span { font-size: 12px; line-height: 15px; color: var(--t-muted); }
.t-notice-neutral { background: var(--t-line); } .t-notice-neutral .t-notice-icon { color: var(--t-muted); }
.t-notice-warn { background: var(--t-part-soft); } .t-notice-warn .t-notice-icon { color: var(--t-part); }
.t-notice-info { background: var(--t-accent-soft); } .t-notice-info .t-notice-icon { color: var(--t-accent-ink); }
.t-notice-good { background: var(--t-have-soft); } .t-notice-good .t-notice-icon { color: var(--t-have); }
.t-notice-bad { background: var(--t-miss-soft); } .t-notice-bad .t-notice-icon { color: var(--t-miss); }
.t-toast { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border-radius: 12px; background: var(--t-navy); box-shadow: var(--t-shadow-sheet); }
.t-toast-icon { color: var(--t-have); }
.t-toast-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.t-toast-text b { font-size: 14px; line-height: 17px; font-weight: 600; color: var(--t-on-navy); }
.t-toast-text span { font-size: 12px; line-height: 15px; color: var(--t-on-navy-soft); }
.t-toast-action { flex: none; font-size: 13px; line-height: 16px; font-weight: 600; color: var(--t-on-navy); }

/* ============================ buttons and inputs ============================ */
.t-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; padding: 10px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 600; line-height: 17px; white-space: nowrap; cursor: pointer; text-decoration: none;
}
.tele .t-btn-pri { background: var(--t-accent); color: var(--t-on-accent); }
.tele .t-btn-sec { background: var(--t-card); color: var(--t-ink); border: 1px solid var(--t-line); }
.tele .t-btn-good { background: var(--t-have); color: var(--t-on-have); padding: 9px 14px; font-size: 13px; line-height: 16px; }
.tele .t-btn-sm { padding: 8px 12px; font-size: 13px; line-height: 16px; border-radius: 8px; }
.tele .t-btn-xs { padding: 6px 10px; font-size: 12px; line-height: 15px; border-radius: 8px; }
.t-btn-pri:hover, .t-btn-good:hover { filter: brightness(1.07); }
.t-btn-sec:hover { background: var(--t-bg); }
.tele .t-btn:disabled { opacity: .5; cursor: default; filter: none; }
.t-toggle { position: relative; width: 40px; height: 24px; flex: none; border-radius: 999px; background: var(--t-skeleton); transition: background .15s; }
.t-toggle.on { background: var(--t-accent); }
.t-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 999px; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.t-toggle.on .t-knob { transform: translateX(16px); }
.t-toggle:disabled { opacity: .5; cursor: default; }
.t-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.t-seg-btn { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--t-line); background: var(--t-card); font-size: 12px; line-height: 15px; font-weight: 600; color: var(--t-muted); white-space: nowrap; }
.t-seg-btn:hover { color: var(--t-ink); }
.tele .t-seg-btn.on { background: var(--t-ink); border-color: var(--t-ink); color: var(--t-card); }
.t-search {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 1px solid var(--t-line); border-radius: 8px;
  background: var(--t-card); color: var(--t-muted); cursor: text;
}
.t-search:focus-within { border-color: var(--t-accent); box-shadow: 0 0 0 .5px var(--t-accent); }
.t-search input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: none; font: 400 13px/16px var(--t-f-body); color: var(--t-ink); }
.t-search input::placeholder { color: var(--t-muted); opacity: 1; }
.t-search input::-webkit-search-cancel-button { display: none; }
.t-search input:focus-visible { outline: 0; }

/* ============================ cards and rows ============================ */
.t-card { display: flex; flex-direction: column; min-width: 0; padding: 18px 20px 6px; background: var(--t-card); border: 1px solid var(--t-line); border-radius: 14px; }
.t-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.tele .t-card-title { font: 500 17px/22px var(--t-f-head); color: var(--t-ink); }
.t-card-note { font-size: 13px; line-height: 16px; white-space: nowrap; }
.t-card-dense { padding: 16px 20px 4px; }
.t-card-dense .t-card-head { padding-bottom: 8px; }
.t-card-note.t-ink-neutral { color: var(--t-muted); }
.t-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--t-line); min-width: 0; }
.t-row-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.t-row-title { font-size: 14px; line-height: 17px; font-weight: 500; color: var(--t-ink); }
.t-row-sub { font-size: 12px; line-height: 15px; color: var(--t-muted); }
.t-row-right { display: flex; align-items: center; gap: 12px; flex: none; }
.t-row-value { font-size: 14px; line-height: 17px; font-weight: 600; color: var(--t-ink); white-space: nowrap; }
.t-row-sub.t-ink-good, .t-row-value.t-ink-good { color: var(--t-have); }
.t-row-sub.t-ink-warn, .t-row-value.t-ink-warn { color: var(--t-part); }
.t-row-sub.t-ink-bad, .t-row-value.t-ink-bad { color: var(--t-miss); }
.t-row-sub.t-ink-info, .t-row-value.t-ink-info { color: var(--t-accent-ink); }
a.t-row-link:hover .t-row-title { color: var(--t-accent-ink); }
.t-skrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--t-line); }
.t-skrow-left { display: flex; flex-direction: column; gap: 6px; }
.t-skrow-right { display: flex; align-items: center; gap: 12px; }
.t-sk { display: block; flex: none; border-radius: 6px; background: var(--t-skeleton); }
.t-sk-pill { width: 64px; height: 20px; border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) {
  .t-sk, .t-kpi-loading .t-sk { animation: t-pulse 1.4s ease-in-out infinite; }
}
@keyframes t-pulse { 50% { opacity: .55; } }

/* store menu item and table */
.t-mitem { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 8px 10px; border-radius: 8px; text-align: left; }
.t-mitem:hover { background: var(--t-bg); }
.tele .t-mitem.selected { background: var(--t-accent-soft); }
.t-mitem-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.t-mitem-text b { font-size: 14px; line-height: 17px; font-weight: 600; color: var(--t-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-mitem-text small { font-size: 12px; line-height: 15px; color: var(--t-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-thead { display: flex; align-items: center; padding: 0 0 8px; font-size: 11px; line-height: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--t-muted); }
.t-trow { display: flex; align-items: center; padding: 12px 0; border-top: 1px solid var(--t-line); min-width: 0; }
a.t-trow-link:hover .t-mitem-text b { color: var(--t-accent-ink); }
.t-tcell-store { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.t-tcell { flex: none; font-size: 14px; line-height: 17px; font-weight: 500; white-space: nowrap; }
.t-thead .t-tcell { font-size: 11px; line-height: 13px; font-weight: 600; }
.t-tcell-sales { width: 120px; }
.t-tcell-fee, .t-tcell-delivery, .t-tcell-optout { width: 110px; }
.t-tcell-status { width: 150px; }

/* funnel step */
.t-funnel { display: flex; flex-direction: column; gap: 6px; padding: 9px 0; }
.t-funnel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.t-funnel-label { font-size: 14px; line-height: 17px; font-weight: 500; }
.t-funnel-right { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.t-funnel-right b { font-size: 14px; line-height: 17px; font-weight: 600; }
.t-funnel-right span { font-size: 13px; line-height: 16px; color: var(--t-muted); }
.t-funnel-track { height: 8px; border-radius: 4px; background: var(--t-skeleton); overflow: hidden; }
.t-funnel-bar { height: 8px; border-radius: 4px; background: var(--t-accent); }
.t-funnel-warn .t-funnel-bar { background: var(--t-part); }
.t-funnel-bad .t-funnel-bar { background: var(--t-miss); }
.t-funnel-good .t-funnel-bar { background: var(--t-have); }

/* feed item */
.t-feed { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--t-line); min-width: 0; }
.t-feed-icon { width: 34px; height: 34px; flex: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.t-feed-view .t-feed-icon { background: var(--t-line); color: var(--t-muted); }
.t-feed-cart .t-feed-icon, .t-feed-text .t-feed-icon, .t-feed-reply .t-feed-icon { background: var(--t-accent-soft); color: var(--t-accent-ink); }
.t-feed-checkout .t-feed-icon { background: var(--t-part-soft); color: var(--t-part); }
.t-feed-order .t-feed-icon { background: var(--t-have-soft); color: var(--t-have); }
.t-feed-optout .t-feed-icon { background: var(--t-miss-soft); color: var(--t-miss); }
.t-feed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.t-feed-title { font-size: 14px; line-height: 17px; font-weight: 500; color: var(--t-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-feed-meta { font-size: 12px; line-height: 15px; color: var(--t-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-feed-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.t-feed-amount { font-size: 14px; line-height: 17px; font-weight: 600; color: var(--t-have); }
.t-feed-time { font-size: 12px; line-height: 15px; color: var(--t-muted); white-space: nowrap; }
a.t-feed-link:hover .t-feed-title { color: var(--t-accent-ink); }

/* timeline step */
.t-step { display: flex; align-items: stretch; gap: 14px; }
.t-step-time { width: 64px; flex: none; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--t-muted); }
.t-step-rail { width: 14px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 4px; }
.t-step-dot { width: 12px; height: 12px; flex: none; border-radius: 999px; background: var(--t-muted); box-shadow: 0 0 0 4px var(--t-line); }
.t-step-kaysend .t-step-dot { background: var(--t-accent); box-shadow: 0 0 0 4px var(--t-accent-soft); }
.t-step-sale .t-step-dot { background: var(--t-have); box-shadow: 0 0 0 4px var(--t-have-soft); }
.t-step-line { flex: 1; width: 2px; min-height: 1px; background: var(--t-line); }
.t-step-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-bottom: 18px; }
.t-step-kind { font-size: 10px; line-height: 12px; font-weight: 700; color: var(--t-muted); }
.t-step-kaysend .t-step-kind { color: var(--t-accent-ink); }
.t-step-sale .t-step-kind { color: var(--t-have); }
.t-step-title { font-size: 14px; line-height: 17px; font-weight: 600; color: var(--t-ink); }
.t-step-detail { font-size: 13px; line-height: 16px; color: var(--t-muted); }

/* alert item */
.t-alert { display: flex; align-items: stretch; gap: 12px; padding: 14px 0; border-top: 1px solid var(--t-line); }
.t-alert-edge { width: 4px; flex: none; border-radius: 2px; background: var(--t-miss); }
.t-alert-warning .t-alert-edge { background: var(--t-part); }
.t-alert-info .t-alert-edge { background: var(--t-accent); }
.t-alert-resolved .t-alert-edge { background: var(--t-have); }
.t-alert-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.t-alert-title { font-size: 14px; line-height: 17px; font-weight: 600; color: var(--t-ink); }
.t-alert-resolved .t-alert-title { color: var(--t-muted); }
.t-alert-body { font-size: 13px; line-height: 16px; color: var(--t-muted); }
.t-alert-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.t-alert-meta > span { font-size: 12px; line-height: 15px; color: var(--t-muted); }

/* 21 small states */
.t-first { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 28px 24px 24px; border-radius: 16px; background: var(--t-have-soft); border: 1px solid var(--t-have); }
.tele .t-first-title { font: 500 22px/28px var(--t-f-head); letter-spacing: -0.22px; color: var(--t-ink); }
.tele .t-first-body { font-size: 14px; line-height: 17px; color: var(--t-ink); }
.t-first .t-btn { margin-top: 6px; }
.t-ring { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.t-ring-box { position: relative; display: block; flex: none; }
.t-ring-svg { display: block; transform: rotate(-90deg); }
.t-ring-svg svg { display: block; }
.t-ring-track { stroke: var(--t-skeleton); }
.t-ring-arc { stroke: var(--t-muted); }
.t-ring-good .t-ring-arc { stroke: var(--t-have); }
.t-ring-warn .t-ring-arc { stroke: var(--t-part); }
.t-ring-bad .t-ring-arc { stroke: var(--t-miss); }
.t-ring-info .t-ring-arc { stroke: var(--t-accent); }
.t-ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.t-ring-num b { font: 500 24px/31px var(--t-f-head); letter-spacing: -0.24px; color: var(--t-ink); }
.t-ring-num small { font-size: 10px; line-height: 12px; color: var(--t-muted); }
.t-ring-name { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--t-ink); white-space: nowrap; }
.t-ring-label { font-size: 12px; line-height: 15px; font-weight: 500; color: var(--t-muted); white-space: nowrap; }
.t-ring-good .t-ring-label { color: var(--t-have); }
.t-ring-warn .t-ring-label { color: var(--t-part); }
.t-ring-bad .t-ring-label { color: var(--t-miss); }
.t-ring-info .t-ring-label { color: var(--t-accent-ink); }
.t-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 20px; text-align: center; }
.t-empty b { font-size: 14px; line-height: 17px; font-weight: 600; color: var(--t-ink); }
.t-empty span { font-size: 12px; line-height: 15px; color: var(--t-muted); }
.t-empty-btn { margin-top: 12px; padding: 7px 12px; border: 1px solid var(--t-line); border-radius: 8px; font-size: 12px; line-height: 15px; font-weight: 600; color: var(--t-ink); }
.t-empty-btn:hover { background: var(--t-bg); }

/* ============================ narrower screens ============================ */
@media (max-width: 1100px) {
  .tele { --t-side-w: 72px; }
  .t-side { padding: 24px 12px; align-items: center; }
  .t-side-logo { padding: 0 0 20px; }
  .t-logo-word, .t-nav-label, .t-user-text { display: none; }
  .t-nav-item { width: 44px; justify-content: center; padding: 9px; }
  .t-user { padding-left: 0; }
  .t-top { flex-wrap: wrap; }
  .t-controls { flex-wrap: wrap; }
  .t-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .t-main { padding: 16px; }
  .t-grid-4 { gap: 12px; }
  .t-tcell-fee, .t-tcell-delivery { display: none; }
  .t-tcell-sales, .t-tcell-optout { width: 76px; }
  .t-tcell-status { width: auto; }
  .t-drawer { width: 100vw; }
}
.tele-phone { display: block; }
/* On a phone the page sits in .t-page.t-page-phone inside s18::PhoneFrame, which gives the side gutters. */
.t-page-phone { margin-top: 0; gap: 16px; }
/* Phone tiles (18): 2 columns 10 apart, rows 16 apart; padding 12 14, radius 12, label 12, value 22/28, note 11. */
.tele-phone .t-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
.tele-phone .t-kpi { padding: 12px 14px; border-radius: 12px; gap: 4px; }
.tele-phone .t-kpi-label { font-size: 12px; line-height: 15px; }
.tele-phone .t-kpi-value { font-size: 22px; line-height: 28px; letter-spacing: -0.22px; }
.tele-phone .t-kpi-nodata .t-kpi-value { font-size: 20px; line-height: 26px; letter-spacing: -0.2px; }
.tele-phone .t-kpi-note { font-size: 11px; line-height: 13px; }
.tele-phone .t-kpi-loading { gap: 8px; }
.tele-phone .t-grid-2 { grid-template-columns: minmax(0, 1fr); }

/* ============================ component gallery (/telemetry/components) ============================ */
.t-gallery { display: flex; flex-direction: column; gap: 40px; padding-bottom: 48px; }
.t-gal { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.t-gal-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.t-gal-top { align-items: flex-start; }
.t-gal-icons { display: flex; flex-wrap: wrap; gap: 16px; color: var(--t-muted); }
.t-gal-icon { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; }
.t-gal-icon small { font-size: 10px; line-height: 12px; color: var(--t-muted); text-align: center; overflow-wrap: anywhere; }
.t-gal-sidebar { height: 1024px; max-height: 80vh; display: flex; border: 1px solid var(--t-line); border-radius: 14px; overflow: hidden; align-self: flex-start; }
.t-gal-sidebar .t-side { position: static; height: 100%; }
.t-gal-menu { position: relative; width: 184px; }
.t-gal-menu .t-range-menu { position: static; }
.t-gal-w274 { width: 274px; max-width: 100%; }
.t-gal-w372 { width: 372px; max-width: 100%; }
.t-gal-w380 { width: 380px; max-width: 100%; padding: 8px 8px 16px; gap: 8px; }
.t-gal-w400 { width: 400px; max-width: 100%; }
.t-gal-w420 { width: 420px; max-width: 100%; }
.t-gal-w520 { width: 520px; max-width: 100%; }
.t-gal-w700 { width: 700px; max-width: 100%; }
.t-gal-table { max-width: 1104px; padding-top: 18px; }
.t-gal-states { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px 20px; }
.t-gal-focus .t-search { border-color: var(--t-accent); box-shadow: 0 0 0 .5px var(--t-accent); }
.t-gal-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.t-gal-tip { margin-top: -8px; }
.t-gal-rings { padding: 18px 20px; gap: 14px; }
.t-gal-rings .t-gal-row { gap: 28px; }
.t-gal-note { font-size: 12px; line-height: 15px; color: var(--t-muted); }

/* Telemetry sign-in (web/src/tele/login.rs): the same page as the KaySend app's Log in. */
.t-login { color-scheme: light; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: #f4f7fb; color: #1c1c1e;
  font: 400 14px/1.45 var(--t-f-body); }
.t-login-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.t-login-brand { display: flex; justify-content: center; }
.t-login-brand .t-logo { font-size: 18px; }
.t-login-brand .t-logo-word { color: #1c1c1e; font: 600 18px/1 var(--t-f-body); letter-spacing: 0; }
.t-login-card { background: #fff; border: 1px solid #e5e5ea; border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.t-login-form { display: flex; flex-direction: column; gap: 16px; }
.t-login h1 { font: 600 22px/1.2 var(--t-f-body); letter-spacing: -0.01em; margin: 0; }
.t-login-muted { margin: 0; color: #636366; }
.t-login-field { display: flex; flex-direction: column; gap: 6px; }
.t-login-field label { font-size: 13px; font-weight: 500; }
.t-login-input { width: 100%; box-sizing: border-box; border: 1px solid #8e8e93; border-radius: 8px; padding: 10px 12px; min-height: 42px;
  background: #fff; color: #1c1c1e; font: inherit; }
.t-login-input:focus, .t-login-input:focus-visible { outline: none; border-color: #007aff; box-shadow: 0 0 0 3px #e5f1ff; }
.t-login-input.bad { border-color: #b42318; }
.t-login-code { letter-spacing: 0.4em; font-size: 20px; text-align: center; font-weight: 600; }
.t-login-err { font-size: 12px; color: #b42318; }
.t-login-btn { width: 100%; display: flex; align-items: center; justify-content: center; text-align: center; border: 1px solid #007aff; background: #007aff; color: #fff; border-radius: 8px; padding: 9px 16px; min-height: 40px;
  font: 600 14px/1 var(--t-f-body); cursor: pointer; }
.t-login-btn:hover { background: #0062cc; border-color: #0062cc; }
.t-login-btn:disabled { opacity: .55; cursor: default; }
.t-login-switch { margin: 0; text-align: center; color: #636366; font-size: 13px; }
.t-login-link { background: none; border: 0; padding: 0; color: #0062cc; font: 600 13px/1.45 var(--t-f-body); cursor: pointer; text-decoration: none; }
.t-login-link:disabled { color: #636366; cursor: default; font-weight: 500; }
.t-login-legal { margin: 0; text-align: center; font-size: 12px; }
.t-login-legal .t-login-link { font-size: 12px; }
.t-gate { min-height: 100vh; background: var(--t-bg); }
.t-user-out { margin-left: auto; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px;
  background: none; color: var(--t-muted); cursor: pointer; }
.t-user-out:hover { background: var(--t-accent-soft); color: var(--t-accent-ink); }
/* Telemetry's own sidebar: the logo with a small "Telemetry" tag, and its 15 sections a little tighter. */
.t-side-logo { align-items: center; gap: 8px; }
.t-side-tag { font: 600 11px/1 var(--t-f-body); color: var(--t-accent-ink); background: var(--t-accent-soft); padding: 4px 7px; border-radius: 999px; }
.t-side-tele .t-nav { gap: 2px; }
.t-side-tele .t-nav-item { padding: 7px 12px; }
/* Telemetry console sections (web/src/tele/admin.rs): tables whose rows open details, the link form. Classes .adm- */
.adm-table { display: flex; flex-direction: column; }
.adm-head, .adm-row { display: grid; gap: 14px; align-items: center; padding: 0 2px; }
.adm-head { grid-template-columns: 1fr; padding-top: 6px; padding-bottom: 8px; font-size: 11px; line-height: 13px; font-weight: 600; letter-spacing: .02em; color: var(--t-muted); }
.adm-head > :last-child, .adm-row > :last-child { width: 16px; }
.adm-row { min-height: 48px; border-top: 1px solid var(--t-line); font-size: 13px; line-height: 16px; color: var(--t-ink); text-decoration: none; }
.adm-link { cursor: pointer; }
.adm-link:hover { background: var(--t-accent-soft); }
.adm-link svg { color: var(--t-muted); }
.adm-cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.adm-cell > span:not(.t-pill):not(.adm-two) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-cell > .t-pill { display: inline-flex; max-width: 100%; }
.adm-two { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adm-two b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-two small { font-size: 12px; color: var(--t-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-empty { padding: 22px 2px 26px; font-size: 13px; color: var(--t-muted); border-top: 1px solid var(--t-line); }
.adm-form { display: flex; flex-direction: column; gap: 14px; padding: 12px 0 16px; max-width: 560px; }
.adm-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--t-ink); }
.adm-input { border: 1px solid var(--t-line); border-radius: 8px; padding: 10px 12px; min-height: 40px; font: inherit; font-weight: 400; background: var(--t-card); color: var(--t-ink); }
.adm-input:focus { outline: none; border-color: var(--t-accent); box-shadow: 0 0 0 3px var(--t-accent-soft); }
.adm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.adm-actions { display: flex; align-items: center; gap: 12px; padding: 10px 0 6px; }
.adm-error { font-size: 13px; color: var(--t-miss); }
.adm-hint { margin: 0; font-size: 12px; color: var(--t-muted); }
.adm-search { max-width: 420px; }
.adm-shopper { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.adm-side { display: flex; flex-direction: column; gap: 16px; }
.adm-steps { display: flex; flex-direction: column; padding: 12px 0 14px; }
.adm-steps .t-step { min-height: 62px; }
@media (max-width: 900px) { .adm-shopper { grid-template-columns: 1fr; } .adm-pair { grid-template-columns: 1fr; } }
.adm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .adm-grid { grid-template-columns: 1fr; } }
/* 01 Overview. Owned by unit s01. Classes start with .s01- */
/* Layout only: tiles, cards, rows and pills are fui's (base.css). Spec: docs/telemetry-specs/s01.md.
   Content 820 px or wider: 4 tiles in a row, the two cards side by side (each its own height). Narrower: tiles 2 per
   row, cards stacked. The same switch as 02, so the skeleton and the page line up. */
.s01 { container: s01 / inline-size; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.s01-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.s01-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@container s01 (min-width: 820px) {
  .s01-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .s01-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* The last tile's tooltip opens to the left (caret 24 px from the right) so it stays on screen. */
  .s01-tiles > .t-kpi:last-child .t-kpi-tip { left: auto; right: 0; }
  .s01-tiles > .t-kpi:last-child .t-tip { align-items: flex-end; }
  .s01-tiles > .t-kpi:last-child .t-tip-caret { margin: 0 24px 0 0; }
}
/* 02 Loading. Owned by unit s02. Classes start with .s02-
   Layout only: the tiles, cards, rows and bars are fui's. Desktop = frame 02; phone = frame 18's Today boxes. */

/* Desktop: tiles row, then the two cards (each its own height), 24 apart like 01. */
.s02 { container: s02 / inline-size; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.s02-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.s02-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
/* A bar never pokes out of a narrow box: it shrinks instead. */
.s02 .t-sk { max-width: 100%; }
/* Content under 820 px (the same switch as 01): tiles 2 per row, cards one under the other. */
@container s02 (width < 820px) {
  .s02-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s02-cards { grid-template-columns: minmax(0, 1fr); }
}

/* Phone (under 768 px): 4 tiles 174 x 90 at 390, "Live now" with "See all", a feed card of 3 rows (170 high). */
.s02-phone { gap: 16px; }
.s02-ptiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
.s02-ptile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; padding: 12px 14px;
  background: var(--t-card); border: 1px solid var(--t-line); border-radius: 12px;
}
.s02-psec { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tele .s02-psec-title { font: 600 16px/19px var(--t-f-body); color: var(--t-ink); }
.tele .s02-psec-link { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--t-accent-ink); white-space: nowrap; }
.s02-psec-link:hover { text-decoration: underline; }
.s02-pfeed { padding: 2px 14px; background: var(--t-card); border: 1px solid var(--t-line); border-radius: 14px; }
.s02-prow { display: flex; align-items: center; gap: 12px; padding: 10px 0; min-width: 0; }
.s02-prow + .s02-prow { border-top: 1px solid var(--t-line); }
.s02-prow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
/* 03 New store. Owned by unit s03. Classes start with .s03-
   Lays out fui's parts as Figma 03 (3:379): the banner (or the 21 first sale card), 4 tiles, then Setup and Data sources
   side by side, each its own height. Between phone and desktop the same rule as 01 and 02: content under 820 px puts
   the tiles 2 per row and the cards one under the other (Setup first). */
.s03 { container: s03 / inline-size; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.s03-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.s03-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.s03-steps { list-style: none; margin: 0; padding: 0; }
.s03-steps > li { display: block; }
/* "Finish setup" scrolls here and rings the card for a moment. */
.s03-setup { scroll-margin-top: 24px; transition: box-shadow .3s ease; }
.s03-flash { box-shadow: 0 0 0 2px var(--t-accent); }
@container s03 (max-width: 819px) {
  .s03-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s03-cards { grid-template-columns: minmax(0, 1fr); }
}
/* Phone (18): 16 between sections, tiles 2 per row (10 apart, rows 16); one per row on screens under 360
   (content under 328 inside the phone frame's 16 px gutters), where "No data yet" no longer fits twice. */
.tele-phone .s03 { gap: 16px; }
.tele-phone .s03-tiles { gap: 16px 10px; }
.tele-phone .s03-setup { scroll-margin-top: 16px; }
@container s03 (max-width: 327px) {
  .s03-tiles { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .s03-setup { transition: none; }
}
/* 04 Sync error. Owned by unit s04. Classes start with .s04-
   Layout only: the banner, the tiles (.t-grid-4) and the cards (.t-grid-2) sit straight in the shell's .t-page
   column, 24 px apart (16 on a phone). fui's components keep their own look. */
.s04 { display: contents; }
/* A faded tile with its tooltip beside it (s04.rs `tile`): the tooltip shows on hover or keyboard focus. */
.s04-tile { position: relative; min-width: 0; border-radius: var(--t-r-card); }
.s04-tile:hover > .t-kpi-tip, .s04-tile:focus-visible > .t-kpi-tip { display: block; }
.tele-phone .s04-tile { border-radius: 12px; }
/* 05 Opt-outs high. Owned by unit s05. Classes start with .s05-
   Layout only: fui's Banner, KPI tile, Card and Data row draw everything. Spec: docs/telemetry-specs/s05.md.
   The same switch as 01 and 02 (it replaces 01 on /telemetry): content 820 px or wider, 4 tiles in a row and the two
   cards side by side (each its own height); narrower, tiles 2 per row and the cards stacked. */
.s05 { container: s05 / inline-size; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.s05-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.s05-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.s05-rows { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; list-style: none; }
/* A card with no rows: one grey line under its header. */
.s05-empty { padding: 12px 0; border-top: 1px solid var(--t-line); font-size: 13px; line-height: 16px; color: var(--t-muted); }
/* Tooltips on the right-hand tiles open to the left (caret 24 px from the right) so they stay on screen. */
.s05-tiles > .t-kpi:nth-child(2n) .t-kpi-tip { left: auto; right: 0; }
.s05-tiles > .t-kpi:nth-child(2n) .t-tip { align-items: flex-end; }
.s05-tiles > .t-kpi:nth-child(2n) .t-tip-caret { margin: 0 24px 0 0; }
@container s05 (min-width: 820px) {
  .s05-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .s05-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Four in a row: only the last tile's tooltip opens to the left. */
  .s05-tiles > .t-kpi:nth-child(2n) .t-kpi-tip { left: 0; right: auto; }
  .s05-tiles > .t-kpi:nth-child(2n) .t-tip { align-items: flex-start; }
  .s05-tiles > .t-kpi:nth-child(2n) .t-tip-caret { margin: 0 0 0 24px; }
  .s05-tiles > .t-kpi:last-child .t-kpi-tip { left: auto; right: 0; }
  .s05-tiles > .t-kpi:last-child .t-tip { align-items: flex-end; }
  .s05-tiles > .t-kpi:last-child .t-tip-caret { margin: 0 24px 0 0; }
}

/* Phone (frame 18's sizes; fui sizes the tiles): 16 apart, tile columns 10 apart; the banner's button drops under the
   text, in line with it; cards 16 14 4. */
.tele-phone .s05 { gap: 16px; }
.tele-phone .s05-tiles { gap: 16px 10px; }
.tele-phone .s05 .t-banner { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
.tele-phone .s05 .t-banner-text { flex: 1 1 calc(100% - 30px); }
.tele-phone .s05 .t-banner .t-btn { margin-left: 30px; }
.tele-phone .s05-card { padding: 16px 14px 4px; }
.tele-phone .s05-card .t-row-right { gap: 8px; }
/* Phones under 360 px (content under 328 between the 16 px gutters): one tile per row. */
@container s05 (max-width: 327px) {
  .s05-tiles { grid-template-columns: minmax(0, 1fr); }
}
/* 06 Payment failed. Owned by unit s06. Classes start with .s06- (spec: docs/telemetry-specs/s06.md).
   Lays out fui's banner, tiles and cards; the components keep their own look. */

/* Banner, KPI row, cards row: one column 24 apart. Columns follow the content width, not the window. */
.s06 { display: flex; flex-direction: column; gap: 24px; min-width: 0; container-type: inline-size; }
.s06-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.s06-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@container (min-width: 720px) { .s06-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (min-width: 900px) { .s06-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Figma: "1 problem" is Inter Medium; the grey "Stripe" stays Regular. */
.s06 .t-card-note.t-ink-bad { font-weight: 500; }

/* Long words wrap inside narrow tiles and rows instead of widening the page. */
.s06 .t-kpi-note, .s06 .t-row-left { overflow-wrap: anywhere; }

/* Phone (frame 18 sizes; fui sizes the tiles): 16 between blocks, tiles 2 x 2 (10 across, 16 down),
   the banner button under its text, cards 14 16 4. One tile per row on the narrowest phones. */
.tele-phone .s06 { gap: 16px; }
.tele-phone .s06-kpis { gap: 16px 10px; }
@container (max-width: 327px) { .s06-kpis { grid-template-columns: minmax(0, 1fr); } }
.tele-phone .s06 .t-banner { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; }
.tele-phone .s06 .t-banner > .t-btn { grid-column: 2; justify-self: start; }
.tele-phone .s06 .t-card { padding: 14px 16px 4px; }
/* 07 Store menu. Owned by unit s07. Classes start with .s07- (spec: docs/telemetry-specs/s07.md).
   fui's .t-menu-anchor puts it 15 px under the switcher, right edges aligned, 390 wide; .t-pop is the box
   (padding 8, gap 2, radius 12). Here only the layout: search, rows, hint; 21's no results; the ring card. */

.s07-pop { position: relative; }
/* Search and hint stay put; the rows scroll when the window is short (five stores never do: 374 tall). */
.s07-menu { max-height: calc(100vh - 124px); }
.s07-menu > .t-search { flex: none; }
.s07-list { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.s07-row { display: block; flex: none; }
/* The list clips anything outside it, so a row's focus ring sits inside the row. */
.s07-list .t-mitem:focus-visible { outline-offset: -2px; }

/* 21 no results: 8 between the search and the message, 16 under the button. */
.s07-menu.s07-none { gap: 8px; padding-bottom: 16px; }
.s07-empty { min-width: 0; overflow-wrap: anywhere; }

/* Loading (shell not loaded yet): mark, two bars, pill. */
.s07-skrow { display: flex; align-items: center; gap: 10px; height: 48px; padding: 8px 10px; }
.s07-skrow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

/* 21 health ring on hover or keyboard focus: 8 left of the menu, level with the row. */
.s07-ring {
  position: absolute; right: calc(100% + 8px); width: 220px; display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 18px 20px; background: var(--t-card); border: 1px solid var(--t-line); border-radius: 14px;
  box-shadow: var(--t-shadow-pop); pointer-events: none;
}
.s07-ring .t-ring-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.s07-ring-note { font-size: 12px; line-height: 15px; color: var(--t-muted); text-align: center; }
/* 08 All stores. Owned by unit s08. Classes start with .s08-
   Lays out fui's parts (KPI tiles, Card, Store table row, health ring); tokens only. Figma 08 at 1440: tiles 126 high
   at y 177, the Stores card 1144 x 397 at y 327, rows 57 from y 407, the foot at y 692. */

.s08 { display: flex; flex-direction: column; gap: 24px; min-width: 0; container: s08 / inline-size; }

/* Stores card: column labels 8 under the header, 16 under the foot (fui's card leaves 6). Figma 08 draws
   "3 need attention" Medium (01's card notes are Regular). */
.s08-stores { padding-bottom: 16px; }
.s08-stores .t-card-note { font-weight: 500; }
.s08-cols { padding-top: 8px; }
.s08-foot { font-size: 12px; line-height: 15px; color: var(--t-muted); }
.s08-none { padding: 12px 0; border-top: 1px solid var(--t-line); font-size: 14px; line-height: 17px; font-weight: 500; color: var(--t-muted); }

/* Health ring (21) under the Status cell. The 8 px gap is padding, so the pointer can move onto the card. */
.s08-row { position: relative; }
.s08-ring { position: absolute; top: 100%; right: 0; z-index: 20; display: none; padding-top: 8px; }
.s08-on > .s08-ring { display: block; }
.s08-ring-card {
  display: flex; flex-direction: column; align-items: center; gap: 14px; width: 220px; padding: 18px 20px;
  background: var(--t-card); border: 1px solid var(--t-line); border-radius: var(--t-r-card); box-shadow: var(--t-shadow-pop);
}
.s08-ring-note { font-size: 12px; line-height: 15px; color: var(--t-muted); text-align: center; }
@media (hover: none) { .s08-on > .s08-ring { display: none; } }

/* Loading rows keep a store row's height (57). */
.s08-sk { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 32px; }
.s08-sk-pill { width: 72px; height: 21px; border-radius: var(--t-r-pill); }

/* Narrower content: 2 tiles across under 960. */
@container s08 (max-width: 959px) {
  .s08 .t-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Under 900 (and on phones) each store stacks: mark, name and pill, then the four numbers a quarter each, label over
   value. No ring card here. */
@container s08 (max-width: 899px) {
  .s08-cols { display: none; }
  .s08 .t-trow {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "store status" "nums nums";
    align-items: center; gap: 10px 8px;
  }
  .s08 .t-trow > .t-tcell-store { grid-area: store; }
  .s08 .t-trow > .t-tcell-status { grid-area: status; width: auto; }
  .s08 .t-trow > :is(.t-tcell-sales, .t-tcell-fee, .t-tcell-delivery, .t-tcell-optout) {
    grid-area: nums; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0;
    width: calc((100% - 24px) / 4);
  }
  .s08 .t-trow > .t-tcell-fee { margin-left: calc((100% - 24px) / 4 + 8px); }
  .s08 .t-trow > .t-tcell-delivery { margin-left: calc((100% - 24px) / 2 + 16px); }
  .s08 .t-trow > .t-tcell-optout { margin-left: calc((100% - 24px) * 3 / 4 + 24px); }
  .s08 .t-trow > .t-tcell::before {
    font-size: 11px; line-height: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--t-muted);
  }
  .s08 .t-trow > .t-tcell-sales::before { content: "Sales"; }
  .s08 .t-trow > .t-tcell-fee::before { content: "Fee"; }
  .s08 .t-trow > .t-tcell-delivery::before { content: "Delivery"; }
  .s08 .t-trow > .t-tcell-optout::before { content: "Opt-out"; }
  .s08-on > .s08-ring { display: none; }
}

/* Phone (18): cards 14 in from the edge, sections 16 apart. */
.tele-phone .s08 { gap: 16px; }
.tele-phone .s08-stores { padding: 14px 14px 12px; }
/* 09 No access. Owned by unit s09. Classes start with .s09- (spec: docs/telemetry-specs/s09.md) */

/* The card sits in the middle of the space under the top bar (09 has no tab bar):
   100vh - 32 top - 57 top bar - 24 gap - 32 bottom = 879 at 1440 x 1024, card at y 413. */
.s09-center { min-height: calc(100vh - 145px); display: flex; align-items: center; justify-content: center; min-width: 0; }
.s09-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; width: 482px; max-width: 100%;
  padding: 32px; background: var(--t-card); border: 1px solid var(--t-line); border-radius: 16px; text-align: center;
}
.s09-icon {
  width: 64px; height: 64px; flex: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--t-bg); color: var(--t-muted);
}
.tele .s09-title { font: 500 22px/28px var(--t-f-head); letter-spacing: -0.22px; color: var(--t-ink); }
/* The title takes focus by script only (screen readers start there): no ring. */
.tele .s09-title:focus, .tele .s09-title:focus-visible { outline: none; }
.tele .s09-body { width: 416px; max-width: 100%; font-size: 14px; line-height: 17px; color: var(--t-muted); }
/* Figma: the blue button is 37 tall, the white one 39, both top aligned. */
.s09-actions { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 10px; padding-top: 6px; max-width: 100%; }

/* "Ask the owner for access" and "Asked" in one cell: the button keeps its width. */
.s09-swap { display: inline-grid; }
.s09-swap > span { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.s09-ask:not(.s09-asked) .s09-swap-done, .s09-asked .s09-swap-ask { visibility: hidden; }
.s09-swap-done .t-ico { color: var(--t-have); }
.tele .t-btn.s09-asked { color: var(--t-muted); cursor: default; }
.tele .t-btn.s09-asked:hover { background: var(--t-card); }

/* For screen readers only. */
.s09-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Phone (18's frame gives the side gutters): the card 16 under the header, buttons full width, primary first. */
.tele-phone .s09-center { display: block; min-height: 0; padding-top: 16px; }
.tele-phone .s09-card { width: 100%; max-width: 482px; margin: 0 auto; padding: 24px 20px; }
.tele-phone .s09-actions { flex-direction: column; align-items: stretch; width: 100%; }
/* 10 Compliance. Owned by unit s10. Classes start with .s10- (layout only: the parts are fui's). */
.s10 { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Run a test: both labels in one cell, so "Testing" keeps the button's width. */
.s10-run { display: inline-grid; }
.s10-run > span { grid-area: 1 / 1; text-align: center; }
.s10-run > .s10-off { visibility: hidden; }

/* Tiles: four in a row from 1200 px wide, 2 x 2 under it (fui's grid only splits under 1100). */
@media (max-width: 1199px) {
  .s10-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Cards: two columns from 1024 px wide (fui's grid stacks under 1100), one column under it. */
@media (min-width: 1024px) and (max-width: 1100px) {
  .s10-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* No forms: one grey line under the header. */
.s10-none { padding: 12px 0; border-top: 1px solid var(--t-line); font-size: 13px; line-height: 16px; color: var(--t-muted); }

/* Phone: 16 px between blocks; the banner's button drops under the text, lined up with it; cards in 18's
   padding; the right-hand tiles open their tooltip to the left, so it stays on the screen. */
.tele-phone .s10 { gap: 16px; }
.tele-phone .s10-banner { flex-wrap: wrap; align-items: flex-start; row-gap: 8px; }
.tele-phone .s10-banner > .t-banner-text { flex: 1 1 calc(100% - 32px); }
.tele-phone .s10-banner > .t-btn { margin-left: 32px; }
.tele-phone .s10-cards .t-card { padding: 14px 14px 2px; }
.tele-phone .s10-tiles > .t-kpi:nth-child(even) .t-kpi-tip { left: auto; right: 0; }
.tele-phone .s10-tiles > .t-kpi:nth-child(even) .t-tip { align-items: flex-end; }
.tele-phone .s10-tiles > .t-kpi:nth-child(even) .t-tip-caret { margin: 0 24px 0 0; }
@media (max-width: 359px) {
  .tele-phone .s10-tiles { grid-template-columns: minmax(0, 1fr); }
  .tele-phone .s10-tiles > .t-kpi:nth-child(even) .t-kpi-tip { left: 0; right: auto; }
  .tele-phone .s10-tiles > .t-kpi:nth-child(even) .t-tip { align-items: flex-start; }
  .tele-phone .s10-tiles > .t-kpi:nth-child(even) .t-tip-caret { margin: 0 0 0 24px; }
}
/* 11 Checkout. Owned by unit s11. Classes start with .s11-
   Only lays out fui's parts as frame 11 has them (docs/telemetry-specs/s11.md); tokens only, no hex. */

/* The page: tiles, then the two cards (an error's list joins the right one), 20 apart (16 on a phone). */
.s11 { container-type: inline-size; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.s11-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.s11-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.s11-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* Content 820 px and wider (1144 at 1440): four tiles in a row, the cards side by side (the s01 and s12 switch). */
@container (min-width: 820px) {
  .s11-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .s11-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Frame 11's cards pad 16 at the bottom too. */
.s11-card { padding-bottom: 16px; }
/* Steps 2 apart and 2 under the header; the note 2 under the last step (right under the last error row). */
.s11-funnel { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 0; padding: 0; list-style: none; }
.s11-funnel + .s11-note, .t-card-head + .s11-note { margin-top: 2px; }
.s11-note { font-size: 12px; line-height: 15px; color: var(--t-muted); }
/* Loading: a skeleton step keeps the real step's 49 px. */
.s11-skstep .t-funnel-top { min-height: 17px; }

/* Phone (18's sizes): 16 between blocks, tiles 10 apart across, cards padded 14. */
.tele-phone .s11 { gap: 16px; }
.tele-phone .s11-kpis { gap: 16px 10px; }
.tele-phone .s11-card { padding: 14px; }
/* 12 Delivery (Figma 8:1725). Owned by unit s12. Lays out fui's components; colours are tokens only. */
.s12 { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
/* No texts yet: the card's one line in place of its rows. */
.s12-empty { padding: 12px 0; border-top: 1px solid var(--t-line); font-size: 13px; line-height: 16px; color: var(--t-muted); }

/* Phone (18's "Live now"): the title over the card, the rows in a card of their own. */
.s12-sec { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.s12-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.s12-sec-title { font-size: 16px; line-height: 19px; font-weight: 600; color: var(--t-ink); }
.s12-sec-note { font-size: 12px; line-height: 15px; color: var(--t-muted); text-align: right; }
.tele .s12-rows { padding: 2px 14px; }
.s12-rows > :first-child { border-top: 0; }
/* A list on a phone: the way back, its title and line (the phone top bar shows neither). */
.s12-phone-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.s12-back { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 8px -4px; }
.s12-phone-title { font: 500 22px/28px var(--t-f-head); letter-spacing: -0.22px; color: var(--t-ink); }
.s12-phone-sub { font-size: 13px; line-height: 16px; color: var(--t-muted); }
/* 13 Results. Owned by unit s13. Classes start with .s13- (spec: docs/telemetry-specs/s13.md).
   Lays fui's components out: four KPI tiles (.t-grid-4), then the two cards side by side (.t-grid-2). Tokens only. */
.s13 { display: flex; flex-direction: column; gap: 20px; width: 100%; min-width: 0; }

/* Automations vs one-off sends: the link is last, 16 above the card's edge (Benchmarks keeps fui's dense 16 20 4). */
.t-card.s13-sends { padding-bottom: 16px; }
.s13-link { align-self: flex-start; }
.s13-arrow { display: inline-block; margin-left: 5px; vertical-align: -1px; }
.s13-arrow svg { display: block; }
.s13-empty { padding: 12px 0; border-top: 1px solid var(--t-line); font-size: 13px; line-height: 16px; color: var(--t-muted); }
/* A row with nothing to count yet: grey text where the number goes. */
.s13-nodata { font-size: 13px; line-height: 16px; color: var(--t-muted); white-space: nowrap; }

/* The right-hand tile's tooltip opens to the left so it stays on the screen. */
.s13-tiles > .t-kpi:last-child .t-kpi-tip { left: auto; right: 0; }
.s13-tiles > .t-kpi:last-child .t-tip { align-items: flex-end; }
.s13-tiles > .t-kpi:last-child .t-tip-caret { margin: 0 24px 0 0; }

/* 768 to 1199: tiles 2 x 2. 1024 and wider: the cards side by side (fui stacks them under 1100). */
@media (max-width: 1199px) {
  .s13-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s13-tiles > .t-kpi:nth-child(even) .t-kpi-tip { left: auto; right: 0; }
  .s13-tiles > .t-kpi:nth-child(even) .t-tip { align-items: flex-end; }
  .s13-tiles > .t-kpi:nth-child(even) .t-tip-caret { margin: 0 24px 0 0; }
}
@media (min-width: 1024px) {
  .s13-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phone (18): sections 16 apart, cards 14 14 14 and 14 14 4, the right column's tooltips open to the left,
   a tapped tile shows its tooltip. Under 360 px the tiles go one per row. */
.tele-phone .s13 { gap: 16px; }
.tele-phone .t-card.s13-sends { padding: 14px; }
.tele-phone .t-card.s13-bench { padding: 14px 14px 4px; }
.tele-phone .s13-tiles > .t-kpi:nth-child(even) .t-kpi-tip { left: auto; right: 0; }
.tele-phone .s13-tiles > .t-kpi:nth-child(even) .t-tip { align-items: flex-end; }
.tele-phone .s13-tiles > .t-kpi:nth-child(even) .t-tip-caret { margin: 0 24px 0 0; }
.tele-phone .s13-tiles > .t-kpi:focus .t-kpi-tip { display: block; }
@media (max-width: 359px) {
  .tele-phone .s13-tiles { grid-template-columns: minmax(0, 1fr); }
}
/* 14 Live. Owned by unit s14. Classes start with .s14- . Spec: docs/telemetry-specs/s14.md
   Layout only: tiles, cards, rows, pills and skeletons are fui's. Tokens only, no hex. */

/* Page: tiles, then the feed beside a 420 px column (Events per minute over Most viewed now), 20 apart (frame 14). */
.s14 { container: s14 / inline-size; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@container s14 (width >= 820px) { .s14 .s14-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container s14 (width < 820px) { .s14 .s14-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.s14-cards { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.s14-feed { flex: 1; }
.s14-side { flex: none; width: 420px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* Frame 14's cards: 16 20 6 (fui's dense card ends at 4). */
.s14 .s14-card { padding-bottom: 6px; }
/* Under 1000 px of content: the feed on its own row, the two cards under it side by side, stacked under 640. */
@container s14 (width < 1000px) {
  .s14-cards { flex-direction: column; align-items: stretch; }
  .s14-side { width: auto; flex-direction: row; align-items: flex-start; }
  .s14-side > .t-card { flex: 1 1 0; }
}
@container s14 (width < 640px) {
  .s14-side { flex-direction: column; align-items: stretch; }
}

/* Live feed: fui Feed items in a list. The row that just came in fades in. */
.s14-list { list-style: none; margin: 0; padding: 0; min-width: 0; }
.s14-li { min-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .s14-in { animation: s14-in .45s ease-out; }
}
@keyframes s14-in { from { opacity: 0; transform: translateY(-6px); } }
/* No events yet: fui's empty state under a line, 24 above (4 + its 20) and 28 below. */
.s14-empty { padding: 4px 0 28px; border-top: 1px solid var(--t-line); }

/* Events per minute: the number row (46 high), then the 72 px chart with the bars on its floor, 14 above the edge. */
.s14-now { display: flex; align-items: baseline; gap: 8px; padding-bottom: 10px; min-width: 0; }
.s14-now-num { font: 500 28px/36px var(--t-f-head); letter-spacing: -0.28px; color: var(--t-ink); white-space: nowrap; }
.s14-now-label { font-size: 13px; line-height: 16px; color: var(--t-muted); white-space: nowrap; }
.s14-now-none .s14-now-num { font-size: 20px; line-height: 26px; letter-spacing: -0.2px; color: var(--t-muted); }
.s14-chart { display: flex; align-items: flex-end; height: 72px; padding-bottom: 14px; min-width: 0; }
.s14-chart svg { display: block; flex: 1 1 auto; min-width: 0; }
.s14-bar { fill: var(--t-accent); opacity: .35; }
.s14-bar-now { opacity: 1; }
.s14-stub { fill: var(--t-skeleton); }

/* Most viewed now with nobody on the store. */
.tele .s14-none { padding: 16px 0 18px; border-top: 1px solid var(--t-line); font-size: 13px; line-height: 16px; color: var(--t-muted); }

/* Loading (?preview=loading): the same boxes in grey bars. */
.s14-skfeed { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--t-line); min-width: 0; }
.s14-sk-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.s14-sk-now { align-items: center; height: 46px; }
.s14-sk-bars { width: 100%; max-width: 356px; height: 52px; }
.s14-skrow { padding: 15px 0; }

/* Phone (under 768 px): frame 18's boxes. s18's phone frame gives the side gutters. */
.s14-phone { gap: 16px; }
.s14-ptitle { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tele .s14-ptitle-h { font: 500 28px/36px var(--t-f-head); letter-spacing: -0.28px; color: var(--t-ink); }
.s14-ptitle-status { font-size: 13px; line-height: 16px; }
.tele .s14-psec { font-size: 16px; line-height: 19px; font-weight: 600; color: var(--t-ink); }
.s14-psec-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.s14-psec-note { font-size: 13px; line-height: 16px; color: var(--t-muted); white-space: nowrap; }
.s14 .s14-pcard { padding: 2px 14px; }
.s14 .s14-pchart { padding: 12px 14px 0; }
/* A card without a header: its first row has no line on top. */
.s14-pcard > :first-child, .s14-pcard .s14-li:first-child > .t-feed { border-top: 0; }
/* 15 Shopper journey and the order list. Owned by unit s15. Classes start with .s15- */
.s15-journey { margin-top: -26px; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.s15-side { display: flex; flex-direction: column; gap: 16px; }
.s15-who { display: flex; align-items: center; gap: 12px; padding: 12px 0 14px; }
.s15-avatar { width: 36px; height: 36px; flex: none; border-radius: 999px; display: grid; place-items: center;
  background: var(--t-accent-soft); color: var(--t-accent-ink); font: 600 15px/1 var(--t-f-body); }
.s15-two { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.s15-two b { font-size: 14px; line-height: 17px; font-weight: 600; color: var(--t-ink); }
.s15-two small { font-size: 12px; line-height: 15px; color: var(--t-muted); }
.s15-fact { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px;
  border-top: 1px solid var(--t-line); font-size: 13px; line-height: 16px; }
.s15-fact span { color: var(--t-muted); }
.s15-fact b { font-weight: 600; text-align: right; }
.s15-fact b.t-ink-neutral { color: var(--t-ink); }
.s15-credit { background: var(--t-have-soft); border-color: transparent; }
.s15-credit .s15-fact { border-top-color: color-mix(in srgb, var(--t-have) 18%, transparent); }
.s15-steps { display: flex; flex-direction: column; padding: 12px 0 14px; }
.s15-steps .t-step { min-height: 68px; }
/* the order list */
.s15-ohead, .s15-orow { display: grid; grid-template-columns: 100px minmax(0, 1.6fr) 1fr 1.3fr 160px; gap: 16px; align-items: center; }
.s15-ohead { padding: 10px 0 8px; font-size: 11px; line-height: 13px; font-weight: 600; letter-spacing: .02em; color: var(--t-muted); }
.s15-orow { min-height: 56px; border-top: 1px solid var(--t-line); color: var(--t-ink); text-decoration: none; }
.s15-orow:hover { background: var(--t-accent-soft); }
.s15-c-order { font-size: 14px; font-weight: 600; }
.s15-c-shopper { display: flex; align-items: center; gap: 10px; min-width: 0; }
.s15-c-time { font-size: 13px; color: var(--t-muted); text-align: right; white-space: nowrap; }
.s15-foot { margin: 0; padding: 10px 0 12px; border-top: 1px solid var(--t-line); font-size: 12px; color: var(--t-muted); }
.s15-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 0; text-align: center; font-size: 13px; color: var(--t-muted); }
.s15-empty b { font-size: 15px; color: var(--t-ink); }
@media (max-width: 767px) {
  .s15-journey { grid-template-columns: 1fr; margin-top: 0; }
  .s15-ohead { display: none; }
  .s15-orow { grid-template-columns: 1fr auto; row-gap: 4px; padding: 10px 0; }
  .s15-c-order, .s15-c-flow { display: none; }
}
/* 16 Best time to send. Owned by unit s16. Classes start with .s16- (build spec: docs/telemetry-specs/s16.md).
   Lays out fui's tiles, cards and funnel steps; the heatmap and the numbered tips are this page's own. Tokens only. */
.s16 { display: flex; flex-direction: column; gap: 20px; min-width: 0; container-type: inline-size; }
/* At 1440: heatmap 798 wide, the column of two cards 330. */
.s16-cards { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.s16-heat { flex: 1 1 798px; min-width: 0; padding-bottom: 16px; }
.s16-side { flex: 0 1 330px; min-width: 300px; display: flex; flex-direction: column; gap: 16px; }
.s16-tips-card { padding-bottom: 16px; }
.s16-orders { padding-bottom: 12px; }

/* heatmap: a 36 px day column and 18 hours (cells 36 x 26 at 1440) */
.s16-grid { display: grid; grid-template-columns: 36px repeat(18, minmax(0, 1fr)); grid-template-rows: 14px repeat(7, 26px); gap: 4px; }
.s16-head { font-size: 10px; line-height: 12px; font-weight: 500; text-align: center; white-space: nowrap; color: var(--t-ink); }
.s16-head.s16-quiet { color: var(--t-muted); }
.s16-day { align-self: center; font-size: 11px; line-height: 13px; font-weight: 500; color: var(--t-muted); }
.s16-cell { border-radius: 5px; background: var(--t-accent); }
.s16-legend { display: flex; align-items: center; gap: 6px; padding-top: 12px; font-size: 11px; line-height: 13px; color: var(--t-muted); }
.s16-swatch { width: 18px; height: 12px; flex: none; border-radius: 3px; background: var(--t-accent); }
.s16-cell.s16-off, .s16-swatch.s16-off, .s16-cell.s16-wait { background: var(--t-skeleton); }
/* Dark has no Figma frame: there the skeleton navy looks like the faintest blue hours, so quiet hours (and hours
   without sales) sink to the page colour instead. Loading cells stay skeleton. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tele .s16-off { background: var(--t-bg); } }
:root[data-theme="dark"] .tele .s16-off { background: var(--t-bg); }
/* a 24 px spacer between "More" and the quiet swatch: 36 px with the gaps */
.s16-legend-quiet { display: inline-flex; align-items: center; gap: 6px; margin-left: 30px; }
/* a card's only line while there is no data yet */
.s16-first { padding-top: 12px; font-size: 13px; line-height: 16px; color: var(--t-muted); }
.s16-first-row { padding: 9px 0; }

/* What to try */
.s16-tips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.s16-tip { display: flex; align-items: flex-start; gap: 10px; }
.s16-num {
  width: 22px; height: 22px; flex: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--t-accent-soft); color: var(--t-accent-ink); font-size: 12px; line-height: 15px; font-weight: 600;
}
.s16-tip-text { flex: 1; min-width: 0; font-size: 13px; line-height: 16px; color: var(--t-ink); }

/* loading */
.s16-sk-tips { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.s16-sk-top { min-height: 17px; }

/* Content under 900: the heatmap full width, the two cards side by side under it; under 640 one under the other. */
@container (max-width: 899px) {
  .s16-cards { flex-direction: column; align-items: stretch; }
  .s16-heat { flex: none; }
  .s16-side { flex: none; flex-direction: row; align-items: flex-start; min-width: 0; }
  .s16-side > .t-card { flex: 1 1 0; }
}
@container (max-width: 639px) {
  .s16-side { flex-direction: column; align-items: stretch; }
  .s16-side > .t-card { flex: none; }
}

/* Phone (no Figma frame for 16): one column 16 apart, smaller cells, a head every third hour, the legend wraps. */
.tele-phone .s16 { gap: 16px; }
/* the way back to Results (no tab bar on a phone) */
.s16-back { display: inline-flex; align-items: center; gap: 2px; align-self: flex-start; }
.tele-phone .s16-heat { padding: 14px; }
/* Under about 350 px "Store time" goes under the title instead of past the card's edge. */
.tele-phone .s16-heat .t-card-head { flex-wrap: wrap; row-gap: 2px; }
.tele-phone .s16-grid { grid-template-columns: 28px repeat(18, minmax(0, 1fr)); grid-template-rows: 12px repeat(7, 18px); gap: 2px; }
.tele-phone .s16-head { overflow: visible; }
.tele-phone .s16-cell { border-radius: 3px; }
.tele-phone .s16-legend { flex-wrap: wrap; row-gap: 6px; }
.tele-phone .s16-legend-quiet { flex-basis: 100%; margin-left: 0; }
/* 17 Alerts. Owned by unit s17. Classes start with .s17-
   The panel is fui's .t-drawer (440 wide, fixed right, padding 24 20 20) with the class .s17. Every rule starts with
   .s17 because base.css resets .tele h1, h2, h3, p more strongly than one class. Tokens only, no hex. */

/* Slides in when the bell opens it (not when the address does: ?open=alerts). */
.s17.s17-slide { animation: s17-in 200ms ease-out; }
@keyframes s17-in { from { transform: translateX(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .s17.s17-slide { animation: none; } }
/* Focus lands on the panel so the title is read out; the panel itself gets no ring. */
.tele .s17:focus-visible { outline: none; }

/* Phone: the whole width of what holds it (the screen; the 390 px root under ?vw=390, where 100vw is the window). */
.tele-phone .s17 { width: 100%; }

/* header: title, "2 need you", Mark all read, close */
.s17 .s17-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; padding-bottom: 14px; }
.s17 .s17-head-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.s17 .s17-title { font: 500 20px/26px var(--t-f-head); letter-spacing: -0.2px; color: var(--t-ink); }
.s17 .s17-count {
  flex: none; padding: 2px 8px; border-radius: var(--t-r-pill); background: var(--t-miss-soft); color: var(--t-miss);
  font-size: 12px; line-height: 15px; font-weight: 600; white-space: nowrap;
}
.s17 .s17-head-right { display: flex; align-items: center; gap: 14px; flex: none; }
.s17 .s17-markall { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--t-accent-ink); white-space: nowrap; }
.s17 .s17-markall:hover { text-decoration: underline; }
/* 18 x 18 in the row, a 32 x 32 hit area */
.s17 .s17-close { display: inline-flex; flex: none; padding: 7px; margin: -7px; border-radius: var(--t-r-btn); color: var(--t-muted); }
.s17 .s17-close:hover { background: var(--t-bg); color: var(--t-ink); }

/* filter chips (fui's Segmented) */
.s17 .s17-filters { flex: none; padding-bottom: 12px; }

/* the list scrolls by itself; the settings box stays at the bottom */
.s17 .s17-list {
  flex: 1 1 auto; min-height: 206px; margin: 0; padding: 0; list-style: none;
  overflow-y: auto; overscroll-behavior: contain;
}
.s17 .s17-empty { flex: 1 1 auto; border-top: 1px solid var(--t-line); }

/* settings box */
.s17 .s17-settings {
  flex: none; display: flex; flex-direction: column; gap: 6px; margin-top: 16px; padding: 12px 14px;
  border-radius: 10px; background: var(--t-bg);
}
.s17 .s17-settings.open { gap: 10px; }
.s17 .s17-settings-line { font-size: 12px; line-height: 15px; color: var(--t-muted); }
.s17 .s17-settings-link { align-self: flex-start; font-size: 12px; line-height: 15px; font-weight: 600; color: var(--t-accent-ink); }
.s17 .s17-settings-link:hover { text-decoration: underline; }
.s17 .s17-set-panel { display: flex; flex-direction: column; gap: 10px; }
.s17 .s17-set-panel[hidden] { display: none; }
.s17 .s17-set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.s17 .s17-set-name { min-width: 0; font-size: 12px; line-height: 15px; font-weight: 600; color: var(--t-ink); }
.s17 .s17-set-pairs { display: flex; align-items: center; gap: 12px; flex: none; }
.s17 .s17-set-pair { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 15px; font-weight: 500; color: var(--t-muted); }
.s17 .s17-set-to { font-size: 12px; line-height: 15px; color: var(--t-muted); }

/* loading: chip and alert skeletons in the same places */
.s17 .s17-skchips { display: flex; flex-wrap: wrap; gap: 6px; }
.s17 .s17-skchips .t-sk { border-radius: var(--t-r-pill); }
.s17 .s17-skrow { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--t-line); }
.s17 .s17-skedge { display: flex; flex: none; }
.s17 .s17-skedge .t-sk { border-radius: 2px; }
.s17 .s17-skmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.s17 .s17-skline { display: flex; align-items: center; height: 17px; }
.s17 .s17-skline-body { height: 16px; }
.s17 .s17-skline .t-sk { max-width: 100%; }
.s17 .s17-skmeta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.s17 .s17-skbtn .t-sk { border-radius: var(--t-r-btn); }
/* 18 Phone and 18b the store sheet. Owned by unit s18. Classes start with .s18- */
.s18-frame { min-height: 100vh; background: var(--t-bg); padding-bottom: 92px; }
.s18-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 4px; }
.s18-brand { color: var(--t-ink); text-decoration: none; }
.s18-brand .t-logo { display: inline-flex; align-items: center; gap: 10px; }
.tele .s18-brand .t-logo-word { display: inline; font: 600 17px/1 var(--t-f-body); color: var(--t-ink); }
.s18-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 5px; max-width: 60%;
  border: 1px solid var(--t-line); border-radius: 999px; background: var(--t-card); color: var(--t-ink); cursor: pointer; }
.s18-pill .t-mark { width: 24px; height: 24px; font-size: 12px; border-radius: 6px; }
.s18-pill-label { font: 600 15px/1 var(--t-f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s18-body { padding: 12px 16px 0; }
.s18-body .t-page-phone { padding: 0; }
.s18-today { display: flex; flex-direction: column; gap: 16px; }
.s18-title h1 { margin: 0; font: 500 30px/36px var(--t-f-head); letter-spacing: -0.3px; color: var(--t-ink); }
.s18-updated { margin: 2px 0 0; font-size: 13px; line-height: 16px; }
.s18-updated.t-ink-neutral { color: var(--t-muted); }
.s18-live-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 4px; }
.s18-live-head h2 { margin: 0; font: 500 17px/22px var(--t-f-head); color: var(--t-ink); }
.s18-live-head .t-link { font-size: 14px; font-weight: 600; }
.s18-live { padding: 2px 16px; border-radius: 12px; }
.s18-live .t-feed:first-child { border-top: 0; }
.s18-empty { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; font-size: 13px; color: var(--t-muted); }
.s18-empty b { color: var(--t-ink); font-size: 14px; }
.s18-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 4px 22px; background: var(--t-card); border-top: 1px solid var(--t-line); }
.s18-nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0; border: 0; background: none;
  color: var(--t-muted); font: 500 11px/13px var(--t-f-body); text-decoration: none; cursor: pointer; }
.s18-nav-item.active { color: var(--t-accent); }
.s18-sheet { gap: 14px; padding-bottom: 28px; }
.s18-grab { align-self: center; width: 36px; height: 5px; border-radius: 999px; background: var(--t-line); margin: 2px 0 2px; }
.s18-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.s18-sheet-head h2 { margin: 0; font: 600 18px/22px var(--t-f-body); color: var(--t-ink); }
.s18-sheet-head .t-link { font-size: 15px; font-weight: 600; background: none; border: 0; cursor: pointer; }
.s18-stores { display: flex; flex-direction: column; gap: 4px; }
.s18-more { display: flex; flex-direction: column; }
.s18-more-row { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 6px; border: 0; background: none;
  color: var(--t-ink); font: 500 15px/18px var(--t-f-body); text-decoration: none; text-align: left; cursor: pointer; }
.s18-more-row .t-glyph, .s18-more-row svg { color: var(--t-muted); }
/* 19 Weekly email. Owned by unit s19. Classes start with .s19- */
.s19-page { align-items: flex-start; }
.s19-switch { width: 680px; max-width: 100%; display: flex; flex-direction: row; text-align: left; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; }
.s19-switch-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.s19-switch-text b { font-size: 14px; font-weight: 600; color: var(--t-ink); }
.s19-switch-text span { font-size: 12px; color: var(--t-muted); }
.s19-preview { width: 680px; max-width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--t-line); }
.s19-preview.off { opacity: .45; }
.s19-frame { display: block; width: 100%; height: 900px; border: 0; background: #F5F5F7; }
