/*
  The dashboard's screens: Overview, Findings (and a finding's evidence),
  Audits, Sources, Notifications, Team, Billing and Settings. The frame and the
  shared parts are in app.css. In a finding, colour keeps its meaning: yellow is
  what the bot said, orange what the store's own site says, red why that is a
  proven error.
*/

/* ---------- Overview: the home, after Markyard's and Shopify's (4. 11.) ---------- */
/* Five numbers, each with a round mark in the colour of what it means: red a proven error, green an audit done,
   ruby the brand's own (the free audits), ink the subscription. Figures are regular weight, never bold. */
.ov-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tile { display: grid; align-content: start; gap: 8px; padding: 16px 18px; color: inherit; text-decoration: none; }
.tile-link { transition: border-color 0.15s var(--ease-ui), background-color 0.15s var(--ease-ui); }
.tile-link:hover { border-color: var(--line-strong); background: var(--app-tile); }
/* The mark and the name on one line, the figure under them, one short line under that. */
.kpi { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; row-gap: 6px; }
.kpi-body { display: contents; }
.kpi-body > :not(.tile-label) { grid-column: 1 / -1; }
.kpi .tile-label { grid-column: 2; line-height: 1.35; }
.kpi [data-fill="allowanceNote"] { display: none; }
.kpi-ico { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--bg); }
.kpi-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kpi[data-kpi="open"] .kpi-ico { background: var(--error); color: #fff; }
.kpi[data-kpi="critical"] .kpi-ico { background: var(--error-bg); color: var(--error); box-shadow: inset 0 0 0 1.5px var(--error); }
.kpi[data-kpi="audited"] .kpi-ico { background: #2e9e5b; color: #fff; }
.kpi[data-kpi="trial"] .kpi-ico { background: var(--ruby); color: #fff; }
.tile-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.kpi-num, .tile-big b { font-size: clamp(26px, 1.2rem + 0.7vw, 32px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; color: var(--ink); }
.tile-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.tile-big span { font-size: 13px; color: var(--mute); }
.tile .small { font-size: 12.5px; line-height: 1.45; }
.tile-state { margin: 4px 0 2px; }
.page-app .meter { display: block; height: 5px; margin-top: 4px; }
.busy { display: flex; align-items: center; gap: 8px; color: var(--ink) !important; }

/* The attention list. */
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.ov-grid:has(> [data-ov-attention][hidden]) { grid-template-columns: minmax(0, 1fr); }
.attention { border-color: var(--error-line); }
.count-badge { min-width: 22px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 6px; border: 1px solid var(--error-line); color: var(--error-ink); font-size: 12px; font-weight: 600; }
.count-badge:empty { display: none; }
.problems > li + li { border-top: 1px solid var(--line); }
.problem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 13px 18px; }
.problem-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--error); box-shadow: 0 0 0 4px var(--error-bg); }
.problem-text b { font-size: 14px; font-weight: 500; color: var(--ink); }
.problem-text .small { margin-top: 2px; }

/* The latest findings and what happened, side by side. */
.ov-two { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.mini-rows > li + li, .feed-rows > li + li { border-top: 1px solid var(--line); }
.mini-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 18px; color: inherit; text-decoration: none; }
.mini-row:hover, .feed-row:hover { background: var(--app-tile); }
.mini-row:focus-visible, .feed-row:focus-visible { outline-offset: -2px; }
.mini-text { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-time { font-size: 12.5px; color: var(--mute); white-space: nowrap; font-variant-numeric: tabular-nums; }
.feed-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 11px 18px; color: inherit; text-decoration: none; }
.feed-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--app-tile); color: var(--ink-2); }
.feed-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feed-row[data-kind="finding"] .feed-ico { background: var(--error-bg); color: var(--error); }
.feed-row[data-kind="connection_problem"] .feed-ico { background: var(--error-bg); color: var(--error-ink); }
.feed-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.feed-text { display: grid; gap: 2px; min-width: 0; }
.feed-text b { font-size: 13.5px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-text span { font-size: 12.5px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-start .checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.ov-start .checklist { padding: 6px 0; }
.ov-start .checklist > li + li { border-top: 0; }
@media (max-width: 1279px) { .ov-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { .ov-grid, .ov-two { grid-template-columns: minmax(0, 1fr); } .ov-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .ov-tiles { grid-template-columns: minmax(0, 1fr); } }
.checklist > li + li { border-top: 1px solid var(--line); }
.checklist a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: var(--ink); text-decoration: none; font-size: 14px; }
.checklist a:hover { background: var(--app-tile); }
.check-mark { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.check-mark svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.checklist .is-done a { color: var(--mute); }
.opt-tag { margin-left: auto; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 11.5px; color: var(--mute); white-space: nowrap; }
.checklist .is-done .check-mark { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- The home, after Shopify's (4. 11.) ---------- */
/* The numbers now in one line on top, the Earth turning faintly in the corner, a greeting and the search in the middle,
   what to do as chips, and the cards under them. The page's own heading stays for screen readers only. */
.screens:has(> .home:not([hidden])) > .page-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The screens' column is centred in the sheet, so the way from the home's right edge to the sheet's is its side margin
   and padding; the globe and the words on it are placed from that edge. */
.home { position: relative; isolation: isolate; gap: 0; --to-edge: calc(max(0px, (100vw - var(--rail) - 16px - 1180px) / 2) + 32px); }
/* The first row of the sheet (Dusan, 16. 11., after Shopify's home): the period button in the very top left corner, "Audits
   running" in the top right, the numbers between them when the sheet is wide; narrower, the numbers take a row of their
   own under the two so neither is pushed down. The home's own top padding is small so the row is the first thing on the
   sheet, and the two ends are pulled out of the column's margin to stand a small inset from the sheet's edges. */
.screens:has(> .home:not([hidden])) { padding-top: 10px; }
.home-top { position: relative; z-index: 3; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 8px 16px; }
.home-top > .when-pop { grid-area: 1 / 1; justify-self: start; }
.home-top > .home-metrics { grid-area: 2 / 1 / 3 / 4; }
.home-top > .home-missing { grid-area: 3 / 1 / 4 / 4; }
.home-top > .home-live { grid-area: 1 / 3; justify-self: end; margin-top: 2px; }
.home-metrics { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 34px; }
.home-metric { display: grid; gap: 2px; padding: 4px 6px; border-radius: var(--r-sm); color: inherit; text-decoration: none; }
.home-metric span { font-size: 13px; color: var(--ink-2); }
.home-metric b { font-size: 14px; font-weight: 500; color: var(--ink); }
/* A number that opens a window has no ground under the pointer (the window and the faded others say where it is, as in Shopify); the free audits are only a link. */
.home-metric:not([data-metric]):hover { background: var(--app-tile); }
/* "Audits running" sits on the globe near the sheet's top right corner, as "Live visitors" sits on Shopify's (Dusan,
   10. 11.). Its own soft ground keeps the words clear of the dots; only its own box takes the pointer, the rest of the
   globe still turns under it. The ring fills and pulses while audits run. */
.home-live { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 26px; margin-left: auto; padding: 0 10px; border-radius: 999px; font-size: 13px; color: var(--ink-2); white-space: nowrap; background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.home-live b { color: var(--ink); font-weight: 500; }
.live-dot { position: relative; width: 8px; height: 8px; flex: none; border-radius: 50%; border: 2px solid #2e9e5b; transition: background-color 0.3s var(--ease-ui); }
.home-live.is-busy .live-dot { background: #2e9e5b; }
.home-live.is-busy .live-dot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #2e9e5b; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .home-live { animation: live-in 0.5s var(--ease) 0.2s both; }
  .home-live.is-busy .live-dot::after { animation: live-ring 1.8s var(--ease-ui) infinite; }
}
@keyframes live-in { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }
@keyframes live-ring { from { opacity: 0.55; transform: scale(1); } to { opacity: 0; transform: scale(2.6); } }
/* Wide enough, the numbers stand in the middle of the row and the line moves out over the globe; narrower it stays at
   the end of the row, where it cannot cover a number. */
@media (min-width: 1200px) {
  .home-top { grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); }
  .home-top > .home-metrics { grid-area: 1 / 2; }
  .home-top > .home-missing { grid-area: 2 / 1 / 3 / 4; }
}
@media (min-width: 900px) {
  .home-top > .when-pop { translate: calc(12px - var(--to-edge)) 0; }
  .home-top > .home-live { translate: calc(var(--to-edge) - 12px) 0; }
}
/* The Earth, after Shopify's (Dusan, 8. 11.): no ball and no rim, only fine dots that thin out into the sheet, so it
   melts into the background; it turns under the pointer, and the store's own dot sits on it (app-overview.js). The
   words and the cards over it let the pointer through wherever they have nothing to click. */
/* Its middle sits on the sheet's right edge, near the top, so half of it shows in the corner as Shopify's does
   (Dusan, 8. 11.); a quarter smaller since 10. 11., its middle where it was. */
.home .home-globe {
  --globe-r: 202.5px; --globe-box: 2.68; --globe-dot-a: 0.42; --globe-back-a: 0; --globe-glow-a: 0.3;
  position: absolute; z-index: 0; translate: none; width: calc(var(--globe-r) * var(--globe-box));
  top: calc(var(--globe-r) * var(--globe-box) / -2 + 70px);
  right: calc(var(--to-edge) * -1 - var(--globe-r) * var(--globe-box) / 2 + 40px);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 42%, rgba(0, 0, 0, 0.6) 56%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, #000 42%, rgba(0, 0, 0, 0.6) 56%, transparent 72%);
}
.home .home-globe::before { background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--ink) 3%, transparent), transparent 70%); box-shadow: none; }
.home .home-globe .globe-canvas { pointer-events: auto; touch-action: pan-y; }
.home-top, .home-hero, .home-cards { pointer-events: none; }
.home-top > *, .home-hero > *, .home-cards > * { pointer-events: auto; }
.home-hero .home-greet { pointer-events: none; }
.home-hero { position: relative; z-index: 1; display: grid; justify-items: center; gap: 18px; padding: clamp(40px, 9vh, 96px) 0 clamp(32px, 6vh, 64px); text-align: center; }
.home-greet { font-size: clamp(24px, 1.1rem + 1vw, 30px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); }
.home-ask { display: flex; align-items: center; gap: 12px; width: min(620px, 100%); min-height: 64px; padding: 0 16px 0 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--app-panel); color: var(--mute); font: inherit; font-size: 15px; text-align: left; cursor: text; box-shadow: 0 1px 2px rgba(13, 37, 61, 0.04), 0 12px 32px -18px rgba(13, 37, 61, 0.28); transition: border-color 0.15s var(--ease-ui), box-shadow 0.2s var(--ease-ui); }
.home-ask:hover { border-color: var(--line-strong); box-shadow: 0 1px 2px rgba(13, 37, 61, 0.04), 0 16px 40px -18px rgba(13, 37, 61, 0.36); }
.home-ask span { flex: 1; }
.home-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 36px; }
.home-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--app-panel); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 500; text-decoration: none; cursor: pointer; box-shadow: 0 1px 2px rgba(13, 37, 61, 0.05); transition: border-color 0.15s var(--ease-ui), transform 0.2s var(--ease-ui); }
.home-chip:not(:has(b)) { padding-right: 14px; }
.home-chip b { min-width: 22px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--app-tile); font-size: 12px; font-weight: 600; }
.home-chip:hover { border-color: var(--line-strong); transform: translateY(-1px); }
/* ---------- The cards, after Shopify's home (Dusan, 8. 11.) ----------
   A photo on top in its own rounded well (beside the words on a wide card), a status line, a title, the words, round
   buttons at the foot. Under the pointer a card rises 3px and its shadow deepens, and its photo moves in a little. */
.home-cards { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 16px; width: min(1000px, 100%); margin: 0 auto; }
.home-cards > [hidden] { display: none; }
/* With the severities card gone (Dusan, 16. 11.) the cards are Getting started, Needs your attention, Latest findings
   and the plan. Getting started is wide and the attention card narrow, the latest findings wide and the plan narrow;
   with Getting started alone the latest findings widen to the full row, and with only the attention card
   the plan takes the row under them as a wide card, so no card is left alone with a hole beside it. */
.home-cards:has(> .hc-start:not([hidden])):has(> .hc-attention[hidden]) > .hc-latest { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .home-cards:has(> .hc-start[hidden]):has(> .hc-attention:not([hidden])) > .hc-plan { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
  .home-cards:has(> .hc-start[hidden]):has(> .hc-attention:not([hidden])) > .hc-plan .hcard-media { order: 2; width: 34%; height: auto; min-height: 220px; }
}

/* The chips under the search come in one after another (each leaves once opened, app-overview.js). */
@media (prefers-reduced-motion: no-preference) {
  .home-chips > .home-chip { animation: cn-in 0.3s var(--ease-ui) both; }
  .home-chips > .home-chip:nth-child(2) { animation-delay: 40ms; }
  .home-chips > .home-chip:nth-child(3) { animation-delay: 80ms; }
  .home-chips > .home-chip:nth-child(4) { animation-delay: 120ms; }
}
.hcard {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 8px;
  border-radius: 18px; border: 1px solid var(--line); background: var(--app-panel);
  box-shadow: 0 1px 2px rgba(13, 37, 61, 0.04);
  transition: transform 0.3s var(--ease-ui), box-shadow 0.3s var(--ease-ui), border-color 0.2s var(--ease-ui);
}
.hcard:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 1px 2px rgba(13, 37, 61, 0.04), 0 20px 40px -18px rgba(13, 37, 61, 0.3); }
.hcard:has(:focus-visible) { border-color: var(--line-strong); }
.hcard-wide { grid-column: span 2; flex-direction: row; align-items: stretch; }
.hcard-media { position: relative; flex: none; height: 148px; overflow: hidden; border-radius: 12px; background: var(--app-tile); }
.hcard-media img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity 0.5s var(--ease-ui), transform 0.7s var(--ease-ui); }
.hcard-media.is-loaded img { opacity: 1; transform: none; }
.hcard:hover .hcard-media.is-loaded img { transform: scale(1.045); }
.hcard-wide .hcard-media { order: 2; width: 34%; height: auto; min-height: 220px; }
.hcard-main { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; padding: 12px 10px 6px; }
.hcard-wide .hcard-main { padding: 12px 18px 8px 12px; }
.hcard-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--mute); }
.hcard-status b { color: var(--ink); font-weight: 600; }
.hcard-status.is-alert { color: var(--error-ink); font-weight: 500; }
.hcard-status .count-badge { margin-left: auto; }
.hcard-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--error); box-shadow: 0 0 0 4px var(--error-bg); }
.hcard-ring { --p: 0; width: 16px; height: 16px; flex: none; border-radius: 50%; background: conic-gradient(var(--ok-ink) calc(var(--p) * 1turn), var(--line-strong) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.6px), #000 calc(100% - 2.2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.6px), #000 calc(100% - 2.2px)); transition: --p 0.6s var(--ease-ui); }
.hcard-title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); }
.hcard-big { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.hcard-unit { font-size: 13.5px; font-weight: 400; letter-spacing: 0; color: var(--mute); }
.hcard-text { font-size: 13.5px; line-height: 1.5; color: var(--mute); }
.hcard-text:empty { display: none; }
.hcard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; }
.hcard .meter { margin: 2px 0; }
.hcard .busy { display: inline-flex; align-items: center; gap: 6px; }
/* The lists inside a card sit on its own padding, their rows rounded under the pointer. */
.hcard .mini-rows, .hcard .feed-rows, .hcard .problems { margin: 4px -4px 0; }
.hcard .mini-row, .hcard .feed-row { padding: 9px 6px; border-radius: 10px; }
.hcard .mini-rows > li + li, .hcard .feed-rows > li + li { border-top-color: transparent; }
.hcard .problem { grid-template-columns: minmax(0, 1fr); padding: 10px 4px; gap: 10px; }
.hcard .problem-mark { display: none; }
.hcard .problem-text b { font-size: 15px; font-weight: 600; }
.hcard .problem .btn-pill { justify-self: start; }
.hcard .problems > li + li { border-top: 1px solid var(--line); }
.hc-attention { border-color: var(--error-line); }
.hc-start .checklist { display: grid; grid-template-columns: minmax(0, 1fr); margin: 4px -6px 0; padding: 0; }
.hc-start .checklist > li + li { border-top: 0; }
.hc-start .checklist a { padding: 7px 6px; border-radius: 10px; font-size: 13.5px; }
.hc-start .check-mark { width: 18px; height: 18px; }
@media (max-width: 899px) {
  .home-cards { grid-template-columns: minmax(0, 1fr); }
  .home-cards > .hcard { grid-column: auto !important; }
  .hcard-wide { flex-direction: column; }
  .hcard-wide .hcard-media { order: 0; width: auto; height: 148px; min-height: 0; }
  .home-metrics { justify-content: flex-start; gap: 4px 20px; }
  .home .home-globe { --globe-r: 112.5px; top: calc(var(--globe-r) * var(--globe-box) / -2 + 81px); right: calc(var(--globe-r) * var(--globe-box) / -2 + 51px); opacity: 0.7; }
}
@media (max-width: 480px) {
  .home .home-globe { --globe-r: 75px; top: calc(var(--globe-r) * var(--globe-box) / -2 + 44px); right: calc(var(--globe-r) * var(--globe-box) / -2 + 4px); opacity: 0.28; }
}

/* ---------- The small charts beside the numbers (the overview's daily) ---------- */
.metric-row { display: inline-flex; align-items: center; gap: 10px; }
/* One colour, the theme's ink, a short line on the number's own line and centred on it, its right end faded by the mask
   the drawing carries (app-strips.js), as a smooth curve (Dusan, 16. 11.). */
.spark { display: inline-block; width: 40px; height: 20px; flex: none; }
.spark:empty { display: none; }
.spark svg { display: block; width: 40px; height: 20px; overflow: visible; }
.spark-line { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.spark-today { stroke-dasharray: 2 2.5; opacity: 0.7; }
@media (prefers-reduced-motion: no-preference) {
  .spark-line:not(.spark-today) { stroke-dasharray: 100; stroke-dashoffset: 100; animation: spark-draw 0.9s var(--ease) forwards; }
  .spark-today { opacity: 0; animation: spark-today 0.3s 0.8s var(--ease-ui) forwards; }
}
@keyframes spark-draw { to { stroke-dashoffset: 0; } }
@keyframes spark-today { to { opacity: 0.7; } }

/* ---------- Findings and Audits, after Shopify's Orders (4. 11.; laid out again, Dusan, 16. 11.) ---------- */
/* These two screens use the sheet's whole width, as the Orders page does: on a wide monitor the numbers and the
   columns spread across it instead of standing in a column in its middle. */
.screens:has(> :is([data-screen="findings"], [data-screen="audits"]):not([hidden])) { max-width: none; }
/* The numbers now, free on the sheet (Dusan, 16. 11.): no frame, no ground and no lines between them, spread evenly
   across its width; a number that opens its slice of the list shows a soft ground under the pointer. */
.strip-wrap { position: relative; min-width: 0; }
.metric-strip { display: flex; align-items: stretch; gap: 4px; }
/* Only the numbers scroll on a phone: the period button and the panel it opens stay out of the scrolling box. */
.metric-scroll { flex: 1 1 0; min-width: 0; display: flex; align-items: stretch; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.metric-scroll::-webkit-scrollbar { display: none; }
/* The period button, then a thin soft line between it and the first number, as Shopify's Orders (Dusan, 16. 11.). */
.metric-strip > .when-pop { flex: none; display: flex; align-items: flex-start; padding: 6px 14px 0 0; margin-right: 10px; }
.metric-strip > .when-pop::after { content: ""; position: absolute; top: 8px; right: 0; bottom: 8px; width: 1px; background: var(--line-strong); }
.metric-when { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; transition: background-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui), transform 0.12s var(--ease-ui); }
.metric-when svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.metric-when:hover, .metric-when[aria-expanded="true"] { background: var(--app-tile); color: var(--ink); }
.metric-when:active { transform: scale(0.97); }
.metric-when .chev { width: 10px; height: 10px; stroke-width: 1.6; transition: transform 0.2s var(--ease-ui); }
.metric-when[aria-expanded="true"] .chev { transform: rotate(180deg); }
.metric { flex: 1 1 0; display: grid; align-content: start; gap: 4px; min-width: 104px; padding: 8px 12px; border-radius: var(--r-md); color: inherit; text-decoration: none; transition: background-color 0.15s var(--ease-ui); }
a.metric:focus-visible, .metric:focus-visible { outline-offset: -2px; border-radius: var(--r-md); }
/* While a number's window is open the other numbers fade and the one it belongs to stands clear, as in Shopify. */
.has-card > :not(.is-card) { opacity: 0.45; }
.metric, .home-metric { transition: opacity 0.15s var(--ease-ui), background-color 0.15s var(--ease-ui); }
.metric b.is-none { font-weight: 400; color: var(--mute); }
.metric-label { justify-self: start; font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: underline dotted var(--line-strong); text-underline-offset: 4px; }
.metric b { font-size: 15px; font-weight: 500; color: var(--ink); }

/* The filter bar (app-filter.js), after Shopify's "Search and filter" (Dusan, 16. 11.): one bordered field with a
   magnifier; each filter is its words as plain text, as Shopify writes "Order status is", and its values on a blue
   pill beside them; the words take a soft ground only under the pointer or while their values are open. The field
   itself is only as wide as what is typed, so the caret stands right after the token being written. */
.fbar-host { position: relative; min-width: 0; }
.fbar { --fb-pill: #d2e7fb; --fb-pill-ink: #0b3b68; display: flex; align-items: flex-start; gap: 8px; min-height: 36px; padding: 5px 5px 5px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--app-panel); cursor: text; transition: border-color 0.15s var(--ease-ui), box-shadow 0.15s var(--ease-ui); }
:root[data-theme="dark"] .fbar { --fb-pill: rgba(143, 180, 255, 0.2); --fb-pill-ink: #bcd4ff; }
.fbar:hover { border-color: var(--line-strong); }
/* The ring of the dashboard's own fields, while the caret is in it. */
.fbar:has(.fbar-input:focus) { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(224, 36, 94, 0.16); }
.fbar-ico { width: 16px; height: 16px; flex: none; margin-top: 4px; fill: none; stroke: var(--mute); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fbar-tokens { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 24px; }
.ftoken { display: inline-flex; gap: 2px; max-width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 13px; line-height: 24px; text-align: left; cursor: pointer; }
.ftoken-name, .ftoken-pill { display: block; flex: none; padding: 0 7px; border-radius: 6px; white-space: nowrap; }
.ftoken-name { padding: 0 3px; background: none; color: var(--ink-2); transition: background-color 0.15s var(--ease-ui); }
.ftoken-pill { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; background: var(--fb-pill); color: var(--fb-pill-ink); font-weight: 500; }
.ftoken:hover .ftoken-name, .ftoken.is-editing .ftoken-name { background: var(--surface-2); color: var(--ink); }
.ftoken:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.fbar-type { position: relative; display: block; flex: none; min-width: 4px; height: 24px; }
/* What is typed, unseen, gives the field its width; the field itself lies over it and adds none of its own. */
.fbar-type::after { content: attr(data-value) " "; display: block; visibility: hidden; white-space: pre; font-size: 13.5px; line-height: 24px; pointer-events: none; }
.fbar-input { position: absolute; inset: 0; width: 100%; height: 24px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink); font: inherit; font-size: 13.5px; line-height: 24px; outline: none; }
.fbar-input::placeholder { color: var(--mute); }
.fbar.is-empty .fbar-type { flex: 1; }
.fbar-add { width: 20px; height: 20px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: none; color: var(--ink-2); cursor: pointer; transition: background-color 0.15s var(--ease-ui), border-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui); }
.fbar-add:hover { border-color: var(--mute); background: var(--app-tile); color: var(--ink); }
.fbar-add svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.fbar-clear { width: 24px; height: 24px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--mute); cursor: pointer; transition: background-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui); }
.fbar-clear:hover { background: var(--app-tile); color: var(--ink); }
.fbar-clear:focus-visible, .fbar-add:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.fbar-clear svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* Shopify's bar has a view selector before the magnifier ("All", a thin rule after it) and a columns button at its
   right end (Dusan, 16. 11.). The columns button gives way on a phone, where the rows are cards. */
.fbar-view { display: inline-flex; align-items: center; gap: 3px; flex: none; height: 24px; padding: 0 4px 0 7px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 560; cursor: pointer; transition: background-color 0.15s var(--ease-ui); }
.fbar-view:hover, .fbar-view[aria-expanded="true"] { background: var(--app-tile); }
.fbar-view:focus-visible, .fbar-cols:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.fbar-view-ico { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fbar-divider { flex: none; width: 1px; height: 18px; margin: 3px 0 0; background: var(--line-strong); }
.fbar-cols { width: 24px; height: 24px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; transition: background-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui); }
.fbar-cols:hover, .fbar-cols[aria-expanded="true"] { background: var(--app-tile); color: var(--ink); }
.fbar-cols-ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fpop { display: grid; gap: 1px; min-width: 176px; outline: none; }
.fpop[hidden] { display: none; }
@media (max-width: 767px) { .fbar-cols { display: none; } }
/* The columns the person left showing: the grid is worked out again from them (app-findings.js layout). A column
   hidden here is hidden in the names and in every row, and is never a gap. */
@media (min-width: 768px) {
  .list-panel.has-cols .rows-findings, .list-panel.has-cols .rows-audits { grid-template-columns: var(--cols); }
  .list-panel[data-hide~="time"] :is(.cell-time, .rows-head [data-col="time"]),
  .list-panel[data-hide~="conv"] :is(.cell-conv, .rows-head [data-col="conv"]),
  .list-panel[data-hide~="channel"] :is(.cell-channel, .rows-head [data-col="channel"]),
  .list-panel[data-hide~="sev"] :is(.cell-sev, .rows-head [data-col="sev"]),
  .list-panel[data-hide~="status"] :is(.cell-status, .rows-head [data-col="status"]),
  .list-panel[data-hide~="topic"] :is(.cell-topic, .rows-head [data-col="topic"]),
  .list-panel[data-hide~="checked"] :is(.cell-checked, .rows-head [data-col="checked"]),
  .list-panel[data-hide~="outcome"] :is(.cell-outcome, .rows-head [data-col="outcome"]) { display: none; }
}
/* Its menu, under the caret: the fields, or one field's values. Boxes where several can be taken, a tick where only
   one can; the row the pointer or the keys are on says that Enter takes it. */
.fmenu, .fpop { position: absolute; z-index: 30; left: 0; top: 100%; width: max-content; min-width: 208px; max-width: min(340px, calc(100vw - 32px)); padding: 6px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--dd-bg); color: var(--ink); box-shadow: 0 16px 40px var(--dd-shadow), 0 2px 6px rgba(0, 0, 0, 0.05); transform-origin: top left; }
.fmenu-list { position: relative; display: grid; gap: 1px; max-height: min(336px, 52vh); overflow-y: auto; overscroll-behavior: contain; }
.fmenu-opt { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 5px 6px 5px 8px; border-radius: var(--r-sm); font-size: 13.5px; cursor: pointer; }
.fmenu-opt.is-active { background: var(--surface-2); }
.fmenu-text { flex: 1; min-width: 0; }
.fmenu-enter { visibility: hidden; flex: none; margin-left: 14px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--dd-bg); color: var(--mute); font-size: 11.5px; line-height: 1.4; white-space: nowrap; }
.fmenu-opt.is-active .fmenu-enter { visibility: visible; }
.fmenu-mark { width: 16px; height: 16px; flex: none; display: grid; place-items: center; color: var(--ink); }
.fmenu-mark svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.fmenu-opt[aria-selected="true"] .fmenu-mark svg { opacity: 1; }
.fmenu-check .fmenu-mark { border-radius: 4px; border: 1px solid var(--mute); background: var(--dd-bg); color: var(--bg); }
.fmenu-check[aria-selected="true"] .fmenu-mark { border-color: var(--ink); background: var(--ink); }
.fmenu-none { padding: 9px 8px; font-size: 13px; color: var(--mute); overflow-wrap: anywhere; }
.fmenu-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; padding: 10px 8px 4px; border-top: 1px solid var(--line); }
.fmenu-date { display: grid; gap: 4px; min-width: 0; }
.fmenu-date label { font-size: 12px; font-weight: 500; color: var(--mute); }
.fmenu-date .drop { display: grid; }
.fmenu-date .drop-btn { height: 32px; min-width: 132px; padding: 0 8px 0 10px; font-size: 13px; }
.fmenu-note { padding: 8px 8px 3px; font-size: 12px; color: var(--mute); }
@media (hover: none) { .fmenu-enter { display: none; } }
/* Quick and quiet, as Shopify's: the menu settles in, a token and its pill ease in, a box fills. Only where motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  .fmenu, .fpop { animation: fb-menu 0.12s var(--ease-ui); }
  .ftoken { animation: fb-token 0.18s var(--ease-ui); }
  .ftoken-pill { animation: fb-pill 0.18s var(--ease-ui); }
  .fmenu-mark, .fmenu-mark svg { transition: opacity 0.1s var(--ease-ui), background-color 0.1s var(--ease-ui), border-color 0.1s var(--ease-ui); }
}
@keyframes fb-menu { from { opacity: 0; transform: translateY(-3px) scale(0.985); } }
@keyframes fb-token { from { opacity: 0; transform: translateX(-4px); } }
@keyframes fb-pill { from { opacity: 0; transform: scale(0.92); } }

/* The list (Dusan, 16. 11.): no card around it. The column names stand on a rounded band a shade off the sheet (a
   little darker on the light theme, a little lighter on the dark one), the rows on the sheet itself with hairlines
   between them, and the columns share the whole width instead of gathering at its right end. */
.list-panel { min-width: 0; }
.list-panel .rows-head { padding: 8px 12px; gap: 14px; border: 0; border-radius: var(--r-md); background: var(--app-tile); font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.list-panel .rows-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The names belong to rows: over a list that has none to show they step aside, as Shopify's do. */
.list-panel:has(> [data-list] > .state) > .rows-head { display: none; }
.list-panel .pager { padding: 10px 12px; }
/* A list asked again keeps its rows, dimmed, until the answer is in (app-findings.js). */
.list-panel > [data-list].is-reloading { opacity: 0.4; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .list-panel > [data-list] { transition: opacity 0.14s var(--ease-ui); } }
/* Nothing for these filters, as Shopify says it: a magnifier, what was not found, and one dark pill that clears. */
.state-none { justify-items: center; gap: 6px; padding: 56px 20px 64px; text-align: center; }
.state-none-ico { width: 52px; height: 52px; margin-bottom: 8px; fill: none; stroke: var(--mute); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.state-none .state-none-title { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.state-none .state-none-text { font-size: 13.5px; color: var(--mute); }
.state-none .btn-pill { margin-top: 12px; }
.btn-pill-ink { border-color: var(--ink); background: var(--ink); color: var(--bg); box-shadow: none; }
.btn-pill-ink:hover { border-color: var(--ink-2); background: var(--ink-2); }
.rows-findings { grid-template-columns: minmax(0, 3.2fr) minmax(84px, 0.7fr) minmax(84px, 0.8fr) minmax(96px, 0.8fr) minmax(88px, 0.7fr) minmax(108px, 0.85fr) minmax(120px, 1.05fr); }
.list-panel .row.rows-findings { padding: 8px 12px; gap: 10px 14px; font-size: 13.5px; }
.rows-findings .row-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 500; }
.rows-findings .cell-time, .rows-findings .cell-conv, .rows-findings .cell-channel, .rows-findings .cell-topic { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows-findings .cell-conv { font-family: var(--mono); font-size: 12px; color: var(--mute); }
@media (min-width: 1024px) { .no-channel .rows-findings { grid-template-columns: minmax(0, 3.2fr) minmax(84px, 0.7fr) minmax(84px, 0.8fr) minmax(88px, 0.7fr) minmax(108px, 0.85fr) minmax(120px, 1.05fr); } }
@media (min-width: 768px) and (max-width: 1023px) { .no-channel .rows-findings { grid-template-columns: minmax(0, 3.2fr) minmax(84px, 0.7fr) minmax(88px, 0.7fr) minmax(108px, 0.85fr); } }
.no-channel .rows-findings .cell-channel, .no-channel .rows-head.rows-findings span:nth-child(4) { display: none; }
.cell-topic { font-size: 13.5px; }
.cell-status { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* One finding, on a page of its own (Dusan, 25. 11., after Shopify's order page; it was a drawer over the list). On top,
   what it is about, how serious, where it stands, and the three things to do about it. Under that a wide column with the
   evidence in the order it is read, and a narrow one with the facts about the conversation and the method. The colours
   are the evidence's own on every page: red why it is wrong, yellow the bot's words, orange the store's. */
.screen.fp { max-width: 1040px; margin-inline: auto; row-gap: 20px; }
/* The heading in the sheet's corner is the way back while a finding is open: an arrow, then "Findings" as on its list. */
.title-back { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; border-radius: 6px; }
.title-back .title-arrow { width: 18px; height: 18px; flex: none; margin-right: -4px; fill: none; stroke: var(--mute); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.title-back:hover .title-arrow { stroke: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .title-back .title-arrow { transition: transform 0.16s var(--ease-ui), stroke 0.16s var(--ease-ui); }
  .title-back:hover .title-arrow { transform: translateX(-2px); }
}

.fp-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 24px; }
.fp-head-main { display: grid; gap: 6px; min-width: 0; }
.fp-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fp-title { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); outline: none; }
.fd-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.verdict { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--error-ink); }
.verdict-supported { color: var(--ok-ink); }
.verdict-insufficient_evidence { color: var(--mute); }
.fp-sub { display: flex; flex-wrap: wrap; align-items: center; min-height: 20px; font-size: 13.5px; line-height: 20px; color: var(--mute); }
.fp-sub > * + *::before { content: "·"; margin: 0 8px; }
.fp-via { display: inline-flex; align-items: center; gap: 6px; }
.fp-sub .fp-via::before { margin: 0 2px 0 8px; }
.fp-head-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fd-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-step { display: flex; gap: 6px; }
.fp-step[hidden] { display: none; }
.fp-step .icon-btn:disabled { opacity: 0.38; cursor: default; }
.fp-step .icon-btn:disabled:hover { border-color: var(--line); }

.fp-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.fp-main { display: grid; gap: 16px; min-width: 0; }
.fp-body.is-reloading { opacity: 0.55; }
/* The names of the parts beside the evidence are set as the panels' names are everywhere in the dashboard. */
.fp-sec-h { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

/* The evidence, with no box around anything (Dusan, 25. 11., after Shopify's Autopilot page: "much sharper"). First the
   one sentence that says why it is wrong, set large, its figures bold. Then the steps it happened in, as that page's
   "Activity": a dot for each on one thin line, what the step is, its time at the right, and under them the words in
   plain ink. A value stands in a soft pill. The only colour is the last dot's, the error's red. */
.fp-main { gap: 30px; padding-top: 6px; }
.fd-reason { max-width: 26em; font-size: clamp(24px, 2.25vw, 30px); font-weight: 420; line-height: 1.22; letter-spacing: -0.022em; color: var(--ink); overflow-wrap: anywhere; text-wrap: pretty; }
.fd-reason b { font-weight: 680; }

.fp-flow { display: grid; gap: 16px; }
.fp-flow-h { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: -0.005em; color: var(--ink); }
.fp-flow-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fp-events { display: grid; margin: 0; padding: 0; list-style: none; }
.fp-ev { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 12px; padding-bottom: 26px; }
.fp-ev:last-child { padding-bottom: 0; }
/* The line from this step's dot to the next one's. */
.fp-ev::before { content: ""; position: absolute; left: 11px; top: 16px; bottom: -6px; width: 2px; border-radius: 1px; background: var(--line); }
.fp-ev:last-child::before { display: none; }
.fp-dot { position: relative; width: 8px; height: 8px; margin: 7px 8px 0; border-radius: 50%; background: var(--ink); }
.fp-ev-found .fp-dot { background: var(--error); box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 20%, transparent); }
.fp-ev-in { display: grid; gap: 8px; min-width: 0; }
.fp-ev-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; min-height: 22px; }
.fp-ev .fp-ev-h .fd-label { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.fp-ev-when { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The words: plain ink, a size above the page's text, in the quotation marks the bot's and the page's words wear. */
.fd-quote, .fp .evidence-text { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.45; letter-spacing: -0.008em; color: var(--ink); overflow-wrap: anywhere; }
/* The site's highlight is a few words on one line; in the dashboard it holds a whole quote, which must break like the
   text around it (kept on one line, a long quote pushed its panel wider than the screen and was cut off). */
.page-app mark { color: inherit; white-space: inherit; }
.fd-quote mark, .fp .evidence mark { background: none; }
.fd-quote mark::before, .fp .evidence mark::before { content: none; }
.fd-quote::before, .fp .evidence-text:not(.fd-listing)::before { content: "\201C"; }
.fd-quote::after, .fp .evidence-text:not(.fd-listing)::after { content: "\201D"; }
.fp .evidence { padding: 0; border-radius: 0; background: none; box-shadow: none; }
.fp .fd-listing { font-size: 15.5px; white-space: pre-wrap; }
.fd-url { overflow-wrap: anywhere; }
.fd-again { display: grid; gap: 8px; margin-top: 6px; }
.fd-again > .fd-label { font-size: 13px; color: var(--mute); }
.fd-again-item { display: grid; gap: 2px; }
.fd-again .fd-quote { font-size: 15.5px; }
.fd-meta, .fp .panel-body > .fd-meta { font-size: 13px; color: var(--mute); line-height: 1.5; }
.fd-title { font-size: 15px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }

/* A value in a soft pill, as Shopify sets the values beside its settings; one that leaves the dashboard carries an arrow. */
.fp-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.fp-chip { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.fp-chip { align-items: center; }
a.fp-chip:hover { background: color-mix(in srgb, var(--surface-2) 70%, var(--line-strong)); }
.fp-chip dt { font-weight: 400; color: var(--ink-2); }
.fp-open-ico { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Beside the evidence, one panel in parts, as Shopify's column beside an order: each a name, then its facts one under another. */
.fp-sec { display: grid; gap: 12px; padding: 16px 18px 18px; min-width: 0; }
.fp-sec + .fp-sec { border-top: 1px solid var(--line); }
.fp-facts { display: grid; gap: 10px; }
.fp-facts div { display: grid; gap: 2px; min-width: 0; }
.fp-facts dt { font-size: 12.5px; color: var(--mute); }
.fp-facts dd { min-width: 0; font-size: 13.5px; color: var(--ink); }
.fp-facts code { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.fp-state .skeleton, .fp-state .state { padding: 24px 20px; }

/* The statement comes in first, then the steps one after another, then the facts beside them; a step along the list
   dims what is shown until the next finding is in. */
@media (prefers-reduced-motion: no-preference) {
  .fp-lead, .fp-flow-h, .fp-ev, .fp-side { animation: rise-in 0.32s var(--ease-ui) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .fp-body { transition: opacity 0.14s var(--ease-ui); }
}
/* The facts go under the evidence where the sheet is too narrow for two columns. */
@media (max-width: 1180px) {
  .fp-cols { grid-template-columns: minmax(0, 1fr); }
}
/* On a phone the two arrows stand beside the title, the three things to do take a row of their own, a third each, and
   a step's time stands under its name. */
@media (max-width: 640px) {
  .fp-title { font-size: 22px; }
  .fp-head { position: relative; gap: 12px; }
  .fp-head-main { flex: 1 1 100%; }
  .fp-head-end { display: contents; }
  /* The arrows keep the corner and the title makes room for them, so the labels and the date line keep the whole width. */
  .fp-step { position: absolute; top: -3px; right: 0; }
  .fp-head:has(.fp-step:not([hidden])) .fp-title { padding-inline-end: 86px; }
  .fp-head .fd-actions { flex: 1 1 100%; flex-wrap: nowrap; }
  .fp-head .fd-actions .btn { flex: 1 1 0; min-width: 0; padding-inline: 6px; font-size: 13.5px; }
  .fp-main { gap: 24px; }
  .fd-reason { font-size: 23px; }
  .fd-quote, .fp .evidence-text { font-size: 16px; }
}

/* ---------- Audits ---------- */
/* What an outcome means, said once over the list: plain quiet words on the sheet, no box around them (Dusan, 16. 11.). */
.explain { max-width: 96ch; padding: 0 2px; color: var(--mute); font-size: 13px; line-height: 1.5; }
.explain b { color: var(--ink-2); font-weight: 500; }
.rows-audits { grid-template-columns: minmax(0, 1.5fr) minmax(96px, 0.7fr) minmax(128px, 0.9fr) minmax(0, 2fr); }
.list-panel .row.rows-audits { padding: 9px 12px; gap: 6px 14px; }
.cell-checked { font-size: 13.5px; }
.cell-outcome { display: grid; justify-items: start; gap: 2px; }
.oc { display: inline-flex; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.oc-with_findings { border-color: var(--error-line); background: var(--error-bg); color: var(--error-ink); }
a.oc:hover { border-color: var(--error); }
.oc-clean { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-ink); }
.oc-not_judged { border-style: dashed; color: var(--mute); }
/* For review in the site's "worth a look" colour: calm, neither the error's red nor the green of correct. */
.oc-for_review { border-color: var(--look-line); background: var(--look-bg); color: var(--look-ink); }
.oc-failed { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.oc-pending, .oc-unknown { color: var(--mute); }
/* A completed audit's row opens its claims: the conversation's name is the button, the whole row answers the pointer. */
.rows-audits.is-openable { cursor: pointer; transition: background-color 0.12s var(--ease-ui); }
.rows-audits.is-openable:hover { background: var(--app-tile); }
.row-open { justify-self: start; max-width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.row-open code { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color 0.12s var(--ease-ui); }
.is-openable:hover .row-open code, .row-open:focus-visible code { text-decoration-color: currentColor; }

/* The claims of one audit: a dialog that only shows (12. 11.). The list scrolls inside it, so Close stays in sight. */
.claims-dialog { width: min(600px, calc(100vw - 32px)); }
.claims-dialog[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden; }
.claims-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 6px; font-size: 13.5px; color: var(--mute); }
.claims-sub code { font-family: var(--mono); font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.claims-body { min-height: 0; overflow-y: auto; margin: 16px -24px 0; padding: 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.claims-body .skeleton, .claims-body .state { padding: 18px 0; }
.claims { display: grid; }
.claim-item { display: grid; gap: 8px; padding: 14px 0; }
.claim-item + .claim-item { border-top: 1px solid var(--line); }
.claim-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.claim-topic { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.claim-quote { margin: 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--app-tile); box-shadow: inset 3px 0 0 var(--claim-line); font-size: 14.5px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.claim-quote mark.claim { background: var(--claim-bg); padding: 1px 3px; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.claim-reason { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.claim-meta { font-size: 12.5px; color: var(--mute); }
.cstate { display: inline-flex; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.cstate-error { border-color: var(--error-line); background: var(--error-bg); color: var(--error-ink); }
a.cstate-error:hover { border-color: var(--error); }
.cstate-ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-ink); }
.cstate-for_review { border-color: var(--look-line); background: var(--look-bg); color: var(--look-ink); }
.cstate-not_judged { border-style: dashed; color: var(--mute); }
.cstate-unknown { color: var(--mute); }

/* ---------- Sources ---------- */
.site-domain { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 15px; }
.site-domain b { font-weight: 500; color: var(--ink); }
.page-app .methods { margin-top: 0; }
.upload { display: grid; gap: 12px; }
.upload input[type="file"] { width: 100%; min-width: 0; max-width: 100%; font: inherit; font-size: 14px; color: var(--ink-2); }
.upload .field-hint code, .panel-body code { font-family: var(--mono); font-size: 12.5px; }
.result { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--ok-line); background: var(--ok-bg); }
.result-line { color: var(--ink) !important; font-size: 14px !important; }
.refused { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; padding: 8px 10px; border-radius: var(--r-sm); background: var(--app-panel); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.refused b { font-weight: 500; color: var(--error-ink); }
.progress { color: var(--ink) !important; }
.steps { display: grid; gap: 10px; }
.kv { display: grid; gap: 8px; }
.kv div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; font-size: 14.5px; }
.kv dt { color: var(--mute); }
.kv dd { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.kv code { font-family: var(--mono); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.ints > li + li { border-top: 1px solid var(--line); }
.int { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: start; padding: 14px 20px; }
.int-main { display: grid; gap: 4px; min-width: 0; }
.int-main > b { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.int-main .note-box { margin-top: 6px; }
.int-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.int[data-connection="connected"] .int-main > .small { color: var(--ok-ink); }
/* Freshchat's live reading, set up by the customer in Freshchat: our address and its public key (app-sources.js, freshchatLive). */
.int-live { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 10px; }
.int-live > summary { cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.int-live[data-live="on"] > summary { color: var(--ok-ink); }
.int-live-form { display: grid; gap: 8px; }
.int-live-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-app .gate { margin: 0; }
.page-app .gate p { color: var(--inv-mute); }
.pick { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pick .field + .field { margin-top: 0; }
.secret-box { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: var(--r-md); background: #0b1a2b; color: #ffd552; }
.secret-box code { flex: 1; font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.sdk { display: grid; gap: 14px; }
.install code { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.sdk-steps { counter-reset: s; display: grid; gap: 8px; }
.sdk-steps li { counter-increment: s; position: relative; padding-left: 30px; font-size: 14px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.sdk-steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; border: 1px solid var(--ruby); color: var(--accent-ink); }
.page-app .code-card { margin-top: 0; }
.page-app .code-card pre { max-height: 360px; }
.page-app .code-card pre.prompt-pre code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Notifications ---------- */
.nf-ios { counter-reset: s; display: grid; gap: 6px; }
.nf-ios li { counter-increment: s; position: relative; padding-left: 28px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.nf-ios li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 11px; font-family: var(--mono); }
.nf-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nf-table th, .nf-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.nf-table thead th { font-size: 12.5px; font-weight: 500; color: var(--mute); }
.nf-table tbody th { font-weight: 400; color: var(--ink); }
.nf-table tbody tr:last-child > * { border-bottom: 0; }
.nf-table input { width: 18px; height: 18px; accent-color: var(--primary); }
.page-app .table-wrap { margin-top: 0; }
.nf-min { max-width: 320px; }
.nf-kinds { border: 0; padding: 0; margin: 0; }
.nf-kinds legend { margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--ink); }
.nf-kinds > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; }
.nf-kinds .check + .check { margin-top: 0; }
.page-app .check { font-size: 14px; padding: 10px 12px; }

/* ---------- Team ---------- */
.rows-members { grid-template-columns: minmax(0, 1.4fr) 150px 150px minmax(120px, auto); }
.rows-invites { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.you { display: inline-flex; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-ink); font-size: 11.5px; font-weight: 500; }
.role { font-size: 14px; color: var(--ink); }
.role-select { height: 34px; padding: 0 8px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--app-panel); color: var(--ink); font: inherit; font-size: 14px; }
.invite-link { display: grid; gap: 4px; margin-top: 8px; }
.invite-link code { display: block; padding: 6px 10px; border-radius: var(--r-sm); background: var(--app-tile); border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roles-key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.roles-key div { padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); }
.roles-key dt { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.roles-key dd { margin-top: 4px; font-size: 13px; color: var(--mute); }

/* ---------- Billing ---------- */
.bill-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; align-items: start; }
.usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.usage { display: grid; align-content: start; gap: 10px; padding: 18px 20px; }
.usage + .usage { box-shadow: inset 1px 0 0 var(--line); }
.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines th { padding: 8px 0; border-top: 1px solid var(--line); text-align: left; font-weight: 400; color: var(--ink-2); }
.lines td { padding: 8px 0; border-top: 1px solid var(--line); text-align: right; color: var(--ink); }
.lines tfoot th, .lines tfoot td { border-top: 1px solid var(--line-strong); font-weight: 500; color: var(--ink); }
.rows-history { grid-template-columns: minmax(0, 1.4fr) 120px 110px minmax(0, 1.2fr); }
.charge { font-size: 13.5px; color: var(--ink); }
.charge-refused { color: var(--ink); font-weight: 500; }
.charge-pending, .charge-unknown, .charge-not_charged { color: var(--mute); }
.charge-refund, .charge-reversal { color: var(--ink-2); }
[data-receipt="missing"] { font-style: italic; }
.bill-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bill-details div { min-width: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--app-tile); }
.bill-details dt { font-size: 13px; color: var(--mute); }
.bill-details dd { margin-top: 4px; font-size: 14.5px; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.bill-form { display: grid; gap: 14px; max-width: 640px; }
.bill-form .field + .field { margin-top: 0; }
.bill-form .form-error { margin-top: 0; }

/* ---------- Settings ---------- */
.ret-field { max-width: 240px; }
.data-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; }
.data-row + .data-row { padding-top: 16px; border-top: 1px solid var(--line); }
.data-row .small { margin-top: 2px; max-width: 64ch; }
.inline-check { margin-top: 10px; width: fit-content; }
.panel.danger { border-color: var(--error-line); }
.panel.danger .panel-head h2 { color: var(--error-ink); }
.last-owner { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--error-line); background: var(--error-bg); font-size: 14px; color: var(--ink); }
.last-owner ul { display: grid; gap: 8px; }
.last-owner li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.last-owner-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1023px) {
  .rows-findings { grid-template-columns: minmax(0, 3.2fr) minmax(84px, 0.7fr) minmax(96px, 0.8fr) minmax(88px, 0.7fr) minmax(108px, 0.85fr); }
  .rows-findings .cell-conv, .rows-findings .cell-topic, .rows-head.rows-findings span:nth-child(3), .rows-head.rows-findings span:nth-child(7) { display: none; }
  .bill-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  /* A long button wraps on a phone rather than pushing the page sideways. */
  .page-app .btn { white-space: normal; text-align: center; height: auto; }
  .ov-tiles, .ov-two, .nf-grid, .bill-top, .usage-grid, .roles-key { grid-template-columns: minmax(0, 1fr); }
  .usage + .usage { box-shadow: inset 0 1px 0 var(--line); }
  /* A phone's own keyboard zooms the page into a field with small letters: the bar's are full size there. The numbers
     keep their own width and the strip scrolls sideways under the thumb. */
  .fbar-input, .fbar-type::after { font-size: 16px; }
  .metric { flex: 1 0 auto; }
  .state-none { padding: 40px 12px 48px; }
  .rows-findings { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "sev status" "main main" "topic time"; gap: 6px 12px; }
  .list-panel .row.rows-findings, .list-panel .row.rows-audits { padding: 12px 4px; }
  .rows-findings .row-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .rows-findings .cell-conv, .rows-findings .cell-channel { display: none; }
  .rows-findings .cell-sev { grid-area: sev; }
  .rows-findings .cell-status { grid-area: status; justify-self: end; }
  .rows-findings .cell-main { grid-area: main; }
  .rows-findings .cell-topic { grid-area: topic; display: block; font-size: 12.5px; color: var(--mute); }
  .rows-findings .cell-time { grid-area: time; justify-self: end; }
  .rows-audits, .rows-members, .rows-history { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .rows-audits .cell-main, .rows-history .cell-main, .rows-members .cell-main { grid-column: 1 / -1; }
  .rows-audits .cell-outcome, .rows-history .cell-status { grid-column: 1 / -1; }
  .rows-members .cell-actions { justify-content: flex-start; }
  .rows-invites { grid-template-columns: minmax(0, 1fr); }
  .rows-invites .cell-actions { justify-content: flex-start; }
  .cell-amount { text-align: left; }
  .problem { grid-template-columns: auto minmax(0, 1fr); }
  .problem .btn { grid-column: 2; justify-self: start; }
  .int { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .int-side { justify-content: flex-start; }
  .pick { grid-template-columns: minmax(0, 1fr); }
  .kv div, .fd-facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .data-row { grid-template-columns: minmax(0, 1fr); }
  .data-row .btn { justify-self: start; }
  .mini-row { grid-template-columns: auto minmax(0, 1fr); }
  .mini-time { grid-column: 2; }
  .page-app .gate { grid-template-columns: minmax(0, 1fr); }
  .bill-details { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Roles (app-roles.js) ---------- */
/* Once the roles are listed, they say what each does, so the fixed key of the three built in ones steps aside. */
[data-screen="team"]:has([data-roles-panel]:not([hidden])) .roles-key { display: none; }
.role-rows > li + li { border-top: 1px solid var(--line); }
.role-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 16px; padding: 12px 18px; }
.role-name { display: flex; align-items: center; gap: 8px; }
.role-name b { font-size: 14px; font-weight: 500; color: var(--ink); }
.role-tag { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 11.5px; color: var(--mute); }
.role-text .small { margin-top: 2px; }
.role-count { white-space: nowrap; }
.role-actions { display: flex; gap: 6px; }
.role-dialog { width: min(560px, calc(100vw - 32px)); }
.role-perms { display: grid; gap: 6px; margin: 16px 0 0; padding: 0; border: 0; }
.role-perms legend { margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--ink); }
.role-perm { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); cursor: pointer; transition: border-color 0.15s var(--ease-ui), background-color 0.15s var(--ease-ui); }
.role-perm:hover { border-color: var(--line-strong); }
.role-perm:has(input:checked) { border-color: var(--accent-ink); background: var(--accent-bg); }
.role-perm input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); }
.role-perm b { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.role-perm small { display: block; margin-top: 2px; font-size: 13px; color: var(--mute); }
@media (max-width: 767px) {
  .role-row { grid-template-columns: minmax(0, 1fr) auto; }
  .role-actions { grid-column: 1 / -1; }
}

/* ---------- The setup and account screens, after Shopify's settings (Dusan, 8. 11.) ----------
   One column in the middle of the sheet and each section's name above a white card with round corners that holds its
   rows. The page's own name is not in the column: it stands in the sheet's top left corner like every other page's
   (see .screens > .page-title in app.css). The screens' markup stays the dashboard session's; this lays it out. */
.screen:is([data-screen="sources"], [data-screen="notifications"], [data-screen="team"], [data-screen="billing"], [data-screen="plan"], [data-screen="settings"]) {
  max-width: 820px; margin-inline: auto; row-gap: 28px;
}
:is([data-screen="sources"], [data-screen="notifications"], [data-screen="team"], [data-screen="billing"], [data-screen="plan"], [data-screen="settings"]) :is(.nf-grid, .bill-top) { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
:is([data-screen="sources"], [data-screen="notifications"], [data-screen="team"], [data-screen="billing"], [data-screen="plan"], [data-screen="settings"]) .panel {
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
:is([data-screen="sources"], [data-screen="notifications"], [data-screen="team"], [data-screen="billing"], [data-screen="plan"], [data-screen="settings"]) .panel > .panel-head {
  min-height: 0; padding: 0 2px 10px; border: 0; background: none;
}
:is([data-screen="sources"], [data-screen="notifications"], [data-screen="team"], [data-screen="billing"], [data-screen="plan"], [data-screen="settings"]) .panel > .panel-head h2 {
  font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: -0.005em; text-transform: none; color: var(--ink);
}
/* What follows the name is one card: its sides on every part, its top and round corners on the first part shown, its
   bottom on the last. */
:is([data-screen="sources"], [data-screen="notifications"], [data-screen="team"], [data-screen="billing"], [data-screen="plan"], [data-screen="settings"]) .panel > :not(.panel-head) {
  background: var(--app-panel); border-inline: 1px solid var(--line);
}
:is([data-screen="sources"], [data-screen="notifications"], [data-screen="team"], [data-screen="billing"], [data-screen="plan"], [data-screen="settings"]) .panel > :nth-child(1 of :not(.panel-head):not([hidden])) {
  border-top: 1px solid var(--line); border-radius: 14px 14px 0 0;
}
:is([data-screen="sources"], [data-screen="notifications"], [data-screen="team"], [data-screen="billing"], [data-screen="plan"], [data-screen="settings"]) .panel > :nth-last-child(1 of :not(.panel-head):not([hidden])) {
  border-bottom: 1px solid var(--line); border-bottom-left-radius: 14px; border-bottom-right-radius: 14px;
}
:is([data-screen="sources"], [data-screen="notifications"], [data-screen="team"], [data-screen="billing"], [data-screen="plan"], [data-screen="settings"]) .panel-head .panel-link {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--app-tile); color: var(--ink); font-size: 12.5px; font-weight: 500; text-decoration: none; transition: background-color 0.15s var(--ease-ui);
}
:is([data-screen="sources"], [data-screen="notifications"], [data-screen="team"], [data-screen="billing"], [data-screen="plan"], [data-screen="settings"]) .panel-head .panel-link:hover { background: var(--line); text-decoration: none; }

/* ---------- Sources, kept simple (Dusan, 10. 11.; app-connect.js, app-upload.js, app-sdk.js) ----------
   Sources is the companies whose AI agent can be connected, as rectangles by kind (as Shopify lists its apps). An
   audit from files (Upload) and the SDK's generator are pages of their own in the sidebar; their parts live in this
   screen, which shows the one asked for. The Gorgias form and the list of what is connected are dialogs, and the
   page behind a dialog blurs. Motion is transform and opacity, and under reduced motion every part shows its
   finished state. */
.screen[data-screen="sources"] { max-width: 960px; }
.src-view { display: grid; gap: 28px; min-width: 0; }
.src { display: grid; gap: 32px; }
.src-page { max-width: 820px; width: 100%; margin-inline: auto; }
.src-page-head p { max-width: 70ch; font-size: 14.5px; line-height: 1.5; color: var(--mute); }
.src-page-head .status { margin-right: 10px; vertical-align: 1px; }
/* Under the catalog: where to go when the agent is not on the list. */
.src-else { margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: var(--app-tile); font-size: 13.5px; color: var(--ink-2); }
.src-else a { font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--ruby); text-underline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .src-view:not([hidden]) { animation: src-in 0.28s var(--ease-ui) both; }
}
@keyframes src-in { from { opacity: 0; transform: translateY(6px); } }

/* The companies, by kind. */
.src-cat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.src-cat-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.src-cat-head p { margin-top: 3px; font-size: 13.5px; color: var(--mute); }
.src-search { position: relative; display: block; flex: 0 1 250px; }
.src-search svg { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; fill: none; stroke: var(--mute); stroke-width: 1.6; stroke-linecap: round; pointer-events: none; }
.src-search input {
  width: 100%; height: 36px; padding: 0 12px 0 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--app-panel); color: var(--ink);
  font: inherit; font-size: 13.5px; transition: border-color 0.15s var(--ease-ui), box-shadow 0.15s var(--ease-ui);
}
.src-search input::placeholder { color: var(--mute); }
.src-search input:hover { border-color: var(--line-strong); }
.src-search input:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
.src-tabs { position: relative; display: flex; flex-wrap: wrap; gap: 2px; margin-top: 16px; }
.src-tab {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border: 0; border-radius: 999px; background: none;
  font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: color 0.15s var(--ease-ui);
}
.src-tab:hover, .src-tab[aria-pressed="true"] { color: var(--ink); }
.src-tab small { font-size: 11.5px; font-weight: 400; color: var(--mute); font-variant-numeric: tabular-nums; }
/* One pill under the chosen kind; it glides to the next one (set by app-connect.js from the tab's own box). */
.src-tab-glide { position: absolute; z-index: 0; top: 0; left: 0; width: var(--w, 0); height: 32px; border-radius: 999px; background: var(--app-tile); transform: translate(var(--x, 0), var(--y, 0)); pointer-events: none; }
.src-tabs.is-ready .src-tab-glide { transition: transform 0.3s var(--ease-ui), width 0.3s var(--ease-ui); }
.cn-groups { display: grid; gap: 26px; margin-top: 20px; }
.cn-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
.cn-head h3 { font-size: 13px; font-weight: 600; color: var(--ink); }
.cn-head p { font-size: 13px; color: var(--mute); }
/* Rectangles, two to a row: the mark on the left, then the name with whose agent it is and its status, what comes
   in, and how it connects. A card lifts under the pointer, its mark tilts and its arrow steps forward. */
.cn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.cn-grid > li { display: grid; min-width: 0; }
.cn-tile {
  position: relative; display: flex; align-items: flex-start; gap: 14px; width: 100%; min-width: 0; padding: 16px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--app-panel); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgba(13, 37, 61, 0.04);
  transition: transform 0.24s var(--ease-ui), box-shadow 0.24s var(--ease-ui), border-color 0.18s var(--ease-ui), background-color 0.18s var(--ease-ui);
}
.cn-tile:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 14px 28px -16px rgba(13, 37, 61, 0.3); }
.cn-tile:active { transform: translateY(0) scale(0.995); box-shadow: 0 1px 2px rgba(13, 37, 61, 0.04); }
.cn-mark { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--app-tile); color: var(--ink-2); font-size: 17px; font-weight: 600; transition: transform 0.3s var(--ease-ui); }
.cn-tile:hover .cn-mark { transform: scale(1.06) rotate(-3deg); }
.cn-tile[data-connect="upload"] .cn-mark { background: linear-gradient(135deg, var(--ruby), #ff7a59); color: #fff; }
.cn-body { display: grid; gap: 4px; flex: 1; min-width: 0; }
.cn-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; }
.cn-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
.cn-name { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.3; }
/* Whose answers are read: the name of that company's own AI agent. */
.cn-agent { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--accent-ink); white-space: nowrap; }
.cn-agent svg { width: 11px; height: 11px; flex: none; fill: currentColor; }
.cn-desc { font-size: 13px; line-height: 1.45; color: var(--mute); }
.cn-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.cn-how { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-go { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--app-tile); color: var(--ink-2); transition: background-color 0.18s var(--ease-ui), color 0.18s var(--ease-ui), transform 0.24s var(--ease-ui); }
.cn-go svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cn-tile:hover .cn-go { background: var(--ink); color: var(--bg); transform: translateX(3px); }
.cn-tile[data-status="available"] .cn-go { background: var(--ruby); color: #fff; }
.cn-tile[data-linked] { border-color: var(--ok-line); }
.cn-tile[data-linked] .cn-go { background: var(--ok-bg); color: var(--ok-ink); }
.cn-none { padding: 28px 20px; border-radius: 16px; border: 1px dashed var(--line-strong); text-align: center; font-size: 14px; color: var(--ink-2); }
.cn-none a { color: var(--ink); text-decoration-color: var(--ruby); text-underline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .cn-grid > li { animation: cn-in 0.34s var(--ease-ui) both; animation-delay: calc(var(--i, 0) * 24ms); }
}
@keyframes cn-in { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 760px) {
  .src-search { flex-basis: 100%; }
  .cn-grid { grid-template-columns: minmax(0, 1fr); }
}

/* The Gorgias form and the list of what is connected: dialogs, each holding its panel without the panel's own card. */
.src-dialog { width: min(600px, calc(100vw - 32px)); padding: 24px; }
.src-dialog-x { position: absolute; z-index: 2; top: 12px; right: 12px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--mute); cursor: pointer; transition: background-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui), transform 0.2s var(--ease-ui); }
.src-dialog-x:hover { background: var(--app-tile); color: var(--ink); transform: rotate(90deg); }
.src-dialog-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.src-dialog .panel > .panel-head { padding: 0 40px 14px 0; }
.src-dialog .panel > .panel-head h2 { font-size: 18px; }
.src-dialog .panel > :not(.panel-head) { padding-inline: 0; background: none !important; border: 0 !important; border-radius: 0 !important; }
/* Behind any dialog of the dashboard the page blurs (Dusan, 10. 11.), and comes back as the dialog leaves. */
.page-app .modal::backdrop { -webkit-backdrop-filter: blur(7px) saturate(1.1); backdrop-filter: blur(7px) saturate(1.1); }

/* An audit from files: the place to drop one. The file input lies over it, unseen, so the place itself is the button. */
.up-field { display: grid; gap: 10px; }
.up-drop {
  position: relative; display: grid; justify-items: center; gap: 6px; padding: 36px 20px 28px; border-radius: 16px;
  border: 1.5px dashed var(--line-strong); background: var(--app-tile); text-align: center;
  transition: border-color 0.18s var(--ease-ui), background-color 0.18s var(--ease-ui), transform 0.24s var(--ease-ui);
}
.upload .up-drop > .up-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.up-drop:hover { border-color: var(--ink-2); }
.up-drop:has(.up-input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.up-drop.is-over { border-style: solid; border-color: var(--ruby); background: var(--accent-bg); transform: scale(1.012); }
.up-ico { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 6px; border-radius: 16px; background: var(--app-panel); border: 1px solid var(--line); box-shadow: 0 8px 18px -10px rgba(13, 37, 61, 0.3); transition: transform 0.3s var(--ease-ui); }
.up-ico svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.up-ico-arrow { transition: transform 0.3s var(--ease-ui); }
.up-drop:hover .up-ico-arrow { transform: translateY(-2px); }
.up-drop.is-over .up-ico { transform: translateY(-3px) scale(1.06); }
.up-drop.is-over .up-ico svg { stroke: var(--ruby); }
.up-title { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.up-or { font-size: 13.5px; color: var(--mute); }
.up-pick { font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--ruby); text-underline-offset: 3px; }
.up-kinds { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.up-kinds li { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--app-panel); font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
fieldset:disabled .up-drop { opacity: 0.6; }
fieldset:disabled .up-drop > .up-input { cursor: not-allowed; }
.up-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--app-tile); }
.up-file-ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px; background: var(--app-panel); border: 1px solid var(--line); }
.up-file-ico svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.up-file-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.up-file-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--ink); }
.up-file-text small { font-size: 12.5px; color: var(--mute); }
@media (prefers-reduced-motion: no-preference) {
  .up-file:not([hidden]) { animation: src-in 0.26s var(--ease-ui) both; }
}
.up-holds .panel-body { display: grid; gap: 14px; }
.up-kind { display: grid; gap: 12px; justify-items: start; min-width: 0; }
.up-kind p, .up-roles { max-width: 76ch; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.up-kind p code, .up-roles code { padding: 1px 5px; border-radius: 5px; background: var(--app-tile); font-family: var(--mono); font-size: 12px; color: var(--ink); }
.up-sample { width: 100%; margin: 0; padding: 14px 16px; border-radius: 12px; background: #0d253d; color: rgba(255, 255, 255, 0.9); font-family: var(--mono); font-size: 12px; line-height: 1.6; overflow-x: auto; white-space: pre; }

/* The SDK's generator, for people who write code: pick the stack, then four steps to copy. */
.gen { display: grid; gap: 24px; min-width: 0; }
.gen-bar { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--app-panel); }
.gen-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.gen-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--mute); }
.gen-step { display: grid; gap: 10px; min-width: 0; transition: opacity 0.2s var(--ease-ui); }
.gen[data-ready="no"] .gen-step { opacity: 0.45; }
.gen-step h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
.gen-n { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 11.5px; font-weight: 500; }
.gen-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 6px 8px 6px 16px; border-radius: 12px; background: #0d253d; color: #fff; }
.gen-line code { overflow-x: auto; white-space: nowrap; font-family: var(--mono); font-size: 13px; }
.gen-line .copy-btn, .gen-line .btn { flex: none; }
.gen-line .btn-ghost { border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.08); color: #fff; }
.gen-line .btn-ghost:hover { background: rgba(255, 255, 255, 0.16); }
.gen-line .copy-btn { color: rgba(255, 255, 255, 0.86); }
/* The backend's own notes on the call are for whoever wants them: closed until asked for. */
.gen-more { border-radius: 12px; border: 1px solid var(--line); background: var(--app-panel); }
.gen-more:has(.gen-notes:empty) { display: none; }
.gen-more summary { display: flex; align-items: center; gap: 8px; padding: 11px 14px; font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; list-style: none; }
.gen-more summary::-webkit-details-marker { display: none; }
.gen-more summary::before { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 1.6px solid var(--mute); border-bottom: 1.6px solid var(--mute); transform: rotate(-45deg); transition: transform 0.2s var(--ease-ui); }
.gen-more[open] summary::before { transform: rotate(45deg); }
.gen-notes { display: grid; gap: 6px; padding: 2px 16px 14px 34px; list-style: decimal; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
/* The assistants' tabs: the maker's mark beside the name, on one line. */
.gen .cn-tools .set-tab { display: inline-flex; align-items: center; gap: 6px; }
.gen .cn-tools .tool-logo { display: block; flex: none; margin: 0; }
.gen .code-card pre { max-height: 420px; overflow: auto; }
/* The generator shows the code, so the key's panel under it keeps to the key: its own copy of the code and its two
   stack fields step aside (they stay in the page for the dashboard session's logic). */
.src-page [data-custom] [data-sdk] { display: none !important; }
.src-page [data-custom] .pick .field:has([data-sdk-language], [data-sdk-framework]) { display: none; }
.src-page [data-custom] .pick { grid-template-columns: minmax(0, 380px); }
.cn-dialog { width: min(560px, calc(100vw - 32px)); }
.cn-dialog-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cn-dialog-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.cn-ways { display: grid; gap: 8px; margin: 6px 0 4px; }
.cn-way { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color 0.15s var(--ease-ui), background-color 0.15s var(--ease-ui); }
.cn-way:hover { border-color: var(--line-strong); background: var(--app-tile); }
.cn-way b { font-size: 14px; font-weight: 600; }
.cn-way span { font-size: 13px; color: var(--mute); }
/* The prompt's assistants: round tabs under its bar, and where the chosen one takes it. */
.cn-tools { padding: 8px 12px 0; }
.cn-tool-hint { padding: 6px 14px 2px; font-size: 13px; color: var(--ink-2); }
/* On the dark code card they take its light ink. */
.code-card .cn-tools .set-tab { color: rgba(255, 255, 255, 0.78); }
.code-card .cn-tools .set-tab:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.code-card .cn-tools .set-tab[aria-pressed="true"] { background: #fff; color: #0d253d; }
.code-card .cn-tool-hint { color: rgba(255, 255, 255, 0.86); }
/* A platform's form: where its settings keep the key, the fields, and why it waits while it is not ready. */
.cn-form { display: grid; gap: 14px; }
.cn-where { display: grid; gap: 6px; margin: 0; padding: 12px 14px 12px 32px; border-radius: 12px; background: var(--app-tile); font-size: 13.5px; color: var(--ink-2); }
.cn-where li::marker { color: var(--mute); font-weight: 600; }
.cn-form .field { display: grid; gap: 6px; }
.cn-form .field .small { margin-top: -2px; }
/* A step that leads to the platform's own page: a link has to look like one inside the grey list. */
.cn-where a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
/* The agents a key reaches, to tick: a long list scrolls inside the dialog instead of pushing its buttons away. */
.cn-pick { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.cn-pick legend { padding: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.cn-pick-list { display: grid; gap: 8px; max-height: 248px; overflow-y: auto; }
.cn-pick-list .check + .check { margin-top: 0; }
.cn-wait { padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line-strong); }
.cn-variant { display: grid; gap: 14px; }
.cn-variant[hidden] { display: none; }
.cn-hook { display: grid; gap: 6px; margin: 4px 0 8px; }
.cn-hook dt { font-size: 12.5px; font-weight: 600; color: var(--mute); text-transform: capitalize; }
.cn-hook dd { display: flex; align-items: center; gap: 8px; margin: 0; }
.cn-hook code { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; background: var(--app-tile); font-size: 12.5px; overflow-wrap: anywhere; }
.cn-authorize .modal-actions { justify-content: flex-start; }
.cn-other { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.cn-other > summary { cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.cn-other[open] > summary { margin-bottom: 12px; }

/* ---------- The period of the home's numbers: Shopify's date range picker (Dusan, 9. and 10. 11.; app-overview.js) ----------
   The button where Shopify has "Week to date", and its card: the periods on a soft grey column on the left (Last and
   Period to date slide in as lists of their own), the two dates with a time behind the clock, two months, and Cancel
   and Apply under the calendar. A range is a soft band between two dark squares; today is outlined; the days after it
   are grey and cannot be picked. Motion is transform, opacity and clip-path, and none under reduced motion. */
.when-pop { position: relative; }
.when-pop .when-panel {
  left: 0; right: auto; width: 678px; max-width: calc(100vw - 32px); min-width: 0; padding: 0; overflow: hidden;
  display: grid; grid-template-columns: 170px minmax(0, 1fr);
  border-radius: 16px; background: var(--dd-bg); transform-origin: top left;
  box-shadow: 0 24px 56px -12px rgba(15, 23, 42, 0.28), 0 6px 16px rgba(15, 23, 42, 0.08);
}
:root[data-theme="dark"] .page-app .when-pop .when-panel { box-shadow: 0 24px 56px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04); }

/* The periods. A list slides in from the side it opens to; the chosen one is a rounded grey pill, as Shopify's. */
.when-side { position: relative; overflow: hidden; background: var(--app-tile); border-right: 1px solid var(--line); }
.when-list { display: flex; flex-direction: column; padding: 8px; }
.when-preset { display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; white-space: nowrap; cursor: pointer; transition: background-color 0.15s var(--ease-ui), transform 0.12s var(--ease-ui); }
.when-preset:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.when-preset[aria-pressed="true"], .when-preset.is-on { background: color-mix(in srgb, var(--ink) 9%, transparent); font-weight: 600; }
.when-chev { width: 14px; height: 14px; margin-left: auto; flex: none; fill: none; stroke: var(--mute); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.6; transition: opacity 0.15s var(--ease-ui), transform 0.2s var(--ease-ui); }
.when-opener:hover .when-chev, .when-opener:focus-visible .when-chev { opacity: 1; transform: translateX(2px); }
.when-rule { flex: none; height: 1px; margin: 6px -8px; background: var(--line); }
.when-back { display: flex; align-items: center; gap: 8px; height: 40px; margin: -8px -8px 6px; padding: 0 18px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.when-back-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s var(--ease-ui); }
.when-back:hover .when-back-ico { transform: translateX(-2px); }
.when-back:focus-visible, .when-preset:focus-visible { outline-offset: -2px; }

/* The two dates, each with its time behind the clock, typed or picked. */
.when-main { display: flex; flex-direction: column; min-width: 0; }
.when-fields { display: flex; align-items: center; gap: 8px; padding: 14px 16px 12px; }
.when-field { flex: 1; min-width: 0; display: flex; gap: 6px; }
.when-date, .when-time { height: 32px; min-width: 0; padding: 0 11px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--dd-bg); color: var(--ink); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; transition: border-color 0.15s var(--ease-ui), box-shadow 0.15s var(--ease-ui); }
.when-date { flex: 1; }
.when-time { flex: none; width: 58px; padding: 0 6px; text-align: center; }
.when-date::placeholder, .when-time::placeholder { color: var(--mute); }
.when-date:hover, .when-time:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.when-date:focus, .when-time:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.when-date.is-bad, .when-time.is-bad { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.when-arrow { flex: none; color: var(--ink-2); font-size: 15px; }
.when-clock { flex: none; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); cursor: pointer; transition: background-color 0.15s var(--ease-ui), color 0.15s var(--ease-ui), transform 0.12s var(--ease-ui); }
.when-clock:hover { background: color-mix(in srgb, var(--ink) 13%, transparent); }
.when-clock svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.when-clock[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Two months side by side, a rule between them; a chevron on the outer side of each. */
.when-cal { position: relative; overflow: hidden; padding: 2px 16px 10px; }
.when-months { display: grid; grid-template-columns: repeat(2, 224px); justify-content: space-between; }
.when-month { position: relative; }
.when-month[data-side="right"]::before { content: ""; position: absolute; left: -13px; top: 64px; bottom: 6px; width: 1px; background: var(--line); }
.when-head { position: relative; display: flex; align-items: center; justify-content: center; height: 32px; margin-bottom: 4px; }
.when-title { display: flex; gap: 6px; font-size: 13.5px; font-weight: 650; color: var(--ink); }
.when-step { position: absolute; top: 2px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; transition: background-color 0.15s var(--ease-ui), transform 0.12s var(--ease-ui); }
.when-step[data-step="-1"] { left: 0; }
.when-step[data-step="1"] { right: 0; }
.when-month[data-side="left"] .when-step[data-step="1"], .when-month[data-side="right"] .when-step[data-step="-1"] { display: none; }
.when-step:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.when-step:disabled { opacity: 0.28; cursor: default; }
.when-step-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.when-week, .when-month-grid { display: grid; grid-template-columns: repeat(7, 32px); }
.when-week span { height: 26px; display: grid; place-items: center; font-size: 12px; color: var(--ink-2); }
.when-month-grid { grid-template-rows: repeat(6, 32px); row-gap: 2px; }
/* A day: the band of a range and its dark square are drawn under the number and ease in when it is chosen. */
.when-day { position: relative; isolation: isolate; display: grid; place-items: center; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; transition: color 0.15s var(--ease-ui), background-color 0.15s var(--ease-ui), transform 0.12s var(--ease-ui); }
.when-day::before { content: ""; position: absolute; inset: 1px 0; z-index: -2; background: color-mix(in srgb, var(--ink) 7%, transparent); opacity: 0; transform: scaleX(0.3); transition: opacity 0.2s var(--ease-ui), transform 0.26s var(--ease); }
.when-day::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 8px; background: var(--ink); opacity: 0; transform: scale(0.55); transition: opacity 0.18s var(--ease-ui), transform 0.26s var(--ease); }
.when-day.is-in::before { opacity: 1; transform: none; }
.when-day.is-start.is-in::before { left: 50%; transform-origin: left center; }
.when-day.is-end.is-in::before { right: 50%; transform-origin: right center; }
.when-day.is-start::after, .when-day.is-end::after { opacity: 1; transform: none; }
.when-day.is-preview.is-end:not(.is-start)::after { opacity: 0.72; }
.when-day.is-start, .when-day.is-end { color: var(--bg); font-weight: 600; }
.when-day[aria-current="date"]:not(.is-start):not(.is-end) { box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 600; }
.when-day:hover:not(:disabled):not(.is-start):not(.is-end) { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.when-day:disabled { color: var(--mute); opacity: 0.5; cursor: default; }
.when-day:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.when-gap { pointer-events: none; }

/* Cancel and Apply under the calendar, as Shopify's: a soft grey pill and a near black one. */
.when-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 10px 12px 10px 16px; border-top: 1px solid var(--line); }
.when-note { flex: 1; min-width: 0; margin: 0; font-size: 12px; line-height: 1.4; color: var(--mute); text-wrap: balance; }
.when-btn { flex: none; height: 28px; padding: 0 12px; border: 0; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color 0.15s var(--ease-ui), transform 0.12s var(--ease-ui); }
.when-cancel { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.when-cancel:hover { background: color-mix(in srgb, var(--ink) 13%, transparent); }
.when-apply { background: var(--ink); color: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.when-apply:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.when-btn:active, .when-preset:active, .when-back:active, .when-step:active:not(:disabled), .when-clock:active, .when-day:active:not(:disabled) { transform: scale(0.95); }

@media (prefers-reduced-motion: no-preference) {
  /* The card grows out of the button's corner. */
  .when-pop .when-panel { animation: when-grow 0.24s var(--ease-ui); }
  .when-list.is-in-right, .when-months.is-in-right { animation: when-from-right 0.24s var(--ease-ui) both; }
  .when-list.is-in-left, .when-months.is-in-left { animation: when-from-left 0.24s var(--ease-ui) both; }
  .when-list.is-out-left, .when-months.is-out-left { animation: when-to-left 0.22s var(--ease-ui) both; }
  .when-list.is-out-right, .when-months.is-out-right { animation: when-to-right 0.22s var(--ease-ui) both; }
  .when-time:not([hidden]) { animation: when-from-left-small 0.2s var(--ease-ui) both; }
  .when-date.is-bad, .when-time.is-bad { animation: when-shake 0.36s var(--ease-ui); }
  .home-metric b.is-pending { animation: when-wait 0.9s var(--ease-ui) infinite alternate; }
}
.when-side > .is-out-left, .when-side > .is-out-right, .when-cal > .is-out-left, .when-cal > .is-out-right { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }
.when-cal > .is-out-left, .when-cal > .is-out-right { top: 2px; left: 16px; right: 16px; }
@keyframes when-grow { from { opacity: 0; transform: scale(0.96) translateY(-4px); clip-path: inset(0 22% 30% 0 round 16px); } to { clip-path: inset(0 round 16px); } }
@keyframes when-from-right { from { opacity: 0; transform: translateX(36px); } }
@keyframes when-from-left { from { opacity: 0; transform: translateX(-36px); } }
@keyframes when-to-left { to { opacity: 0; transform: translateX(-36px); } }
@keyframes when-to-right { to { opacity: 0; transform: translateX(36px); } }
@keyframes when-from-left-small { from { opacity: 0; transform: translateX(-6px); } }
@keyframes when-shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes when-wait { from { opacity: 0.45; } }

/* The numbers while a period is asked for, and when the backend has none for it: never a zero nobody counted. */
.home-metric b.is-pending, .metric b.is-pending { display: inline-block; width: 30px; height: 14px; margin: 2px 0 1px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 9%, transparent); color: transparent; }
.home-metric b.is-none { font-weight: 400; color: var(--mute); }
.home-missing { order: 10; flex-basis: 100%; margin: 2px 0 0; text-align: center; font-size: 12.5px; color: var(--mute); }

/* ---------- A number's chart under the pointer (Dusan, 10. 11., after Shopify's "Sessions over time"; app-strips.js) ----------
   The period's count and its change against the period before, what it counts, and a smooth blue line of it with the
   period before lighter and dashed, no ground under either (Dusan, 16. 11.). It rises out of its number, the line draws
   itself from the left; the counts themselves are facts and appear at once. The blues are read on both themes. */
.metric-card { position: absolute; left: 0; z-index: 40; display: grid; gap: 2px; padding: 18px 20px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--dd-bg); color: var(--ink); box-shadow: 0 24px 56px -12px rgba(15, 23, 42, 0.26), 0 6px 16px rgba(15, 23, 42, 0.07); transform-origin: var(--from-x, 50%) 0; --mc-a: #2f6fe4; --mc-b: #9dbbf0; --mc-tip: #20242a; --mc-tip-ink: #f4f6f8; }
:root[data-theme="dark"] .metric-card { --mc-a: #7aaaff; --mc-b: #52689a; --mc-tip: #2d333b; }
.metric-card.is-moving { transition: translate 0.22s var(--ease-ui); }
:root[data-theme="dark"] .page-app .metric-card { box-shadow: 0 24px 56px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04); }
.mc-head { display: flex; align-items: baseline; gap: 10px; }
.mc-num { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.mc-num.is-pending { width: 44px; height: 24px; margin: 3px 0 1px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.mc-pct { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--mute); }
.mc-pct.is-good { color: var(--ok-ink); }
.mc-pct.is-bad { color: var(--error); }
.mc-when { font-size: 12.5px; color: var(--mute); }
.mc-title { margin: 6px 0 0; font-size: 13.5px; font-weight: 600; }
.mc-says { margin: 0 0 10px; font-size: 13px; color: var(--mute); }
.mc-none { margin: 4px 0 2px; padding: 34px 12px; border-radius: 12px; background: var(--app-tile); text-align: center; font-size: 13px; color: var(--mute); }
.mc-wait { height: 196px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.mc-plot { position: relative; }
.mc-chart { display: block; overflow: visible; }
.mc-grid { stroke: var(--line); stroke-width: 1; }
.mc-y, .mc-x { fill: var(--mute); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.mc-line { fill: none; stroke: var(--mc-a); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mc-then-line { fill: none; stroke: var(--mc-b); stroke-width: 1.8; stroke-dasharray: 4 4; stroke-linecap: round; }
.mc-dot { fill: var(--dd-bg); stroke: var(--mc-a); stroke-width: 2; }
.mc-dot-then { stroke: var(--mc-b); }
.mc-guide { stroke: color-mix(in srgb, var(--ink) 22%, transparent); stroke-width: 1; }
.mc-catch { fill: transparent; cursor: crosshair; }
/* Dark in both themes, as Shopify's: the metric's name as its title, then a row for each period. */
.mc-tip { position: absolute; top: 0; left: 0; translate: var(--tip-x, 0) 0; display: grid; gap: 6px; min-width: 190px; padding: 10px 12px; border-radius: 10px; background: var(--mc-tip); color: var(--mc-tip-ink); font-size: 12px; pointer-events: none; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.mc-tip-title { margin: 0; font-size: 12px; font-weight: 600; }
.mc-tip-row { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.mc-tip-row span { flex: 1; opacity: 0.8; }
.mc-tip-row b { padding: 1px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.14); font-weight: 600; }
.mc-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--ink-2); }
.mc-legend li { display: inline-flex; align-items: center; gap: 7px; }
.mc-key { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--mc-a); }
.mc-key-then { background: var(--mc-b); }
@media (prefers-reduced-motion: no-preference) {
  .metric-card:not([hidden]) { animation: mc-in 0.22s var(--ease-ui) both; }
  .metric-card.is-leaving { animation: mc-out 0.14s var(--ease-ui) both; }
  .mc-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: mc-draw 0.75s var(--ease) 0.08s forwards; }
  .mc-then { clip-path: inset(0 100% 0 0); animation: mc-wipe 0.75s var(--ease) 0.08s forwards; }
  .mc-dot:not([visibility]) { opacity: 0; animation: mc-fade 0.35s var(--ease-ui) 0.5s forwards; }
  .mc-tip:not([hidden]) { animation: mc-tip-in 0.12s var(--ease-ui); }
}
@keyframes mc-tip-in { from { opacity: 0; } }
@keyframes mc-in { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
@keyframes mc-out { to { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@keyframes mc-draw { to { stroke-dashoffset: 0; } }
@keyframes mc-wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes mc-fade { to { opacity: 1; } }

/* Narrower: a slimmer column and days; a phone shows one month under the periods, which scroll sideways in a row. */
@media (max-width: 899px) {
  .when-pop .when-panel { width: 626px; grid-template-columns: 150px minmax(0, 1fr); }
  .when-months { grid-template-columns: repeat(2, 210px); }
  .when-week, .when-month-grid { grid-template-columns: repeat(7, 30px); }
}
/* Where every other panel is laid across the top of the screen (app.css, under 768px), this one opens under its
   button across the screen's width instead: the row of sections stays over the home and would cover its top. */
@media (max-width: 767px) {
  .when-pop .when-panel { position: absolute; top: calc(100% + 8px); left: 0; right: auto; width: calc(100vw - 32px); max-width: none; }
}
@media (max-width: 719px) {
  .when-pop .when-panel { grid-template-columns: minmax(0, 1fr); }
  .when-side { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .when-side::-webkit-scrollbar { display: none; }
  .when-list { flex-direction: row; align-items: center; gap: 4px; width: max-content; padding: 8px 10px; }
  .when-side > .is-out-left, .when-side > .is-out-right { right: auto; }
  .when-rule { width: 1px; height: 18px; margin: 0 4px; }
  .when-back { height: 28px; margin: 0 4px 0 0; padding: 0 10px 0 6px; border-bottom: 0; border-radius: 8px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
  .when-chev { transform: rotate(90deg); }
  .when-opener:hover .when-chev, .when-opener:focus-visible .when-chev { transform: rotate(90deg) translateY(-1px); }
  .when-fields { padding: 12px 14px 10px; }
  .when-panel.has-times .when-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .when-panel.has-times .when-arrow { display: none; }
  .when-panel.has-times .when-field:last-of-type { grid-row: 2; }
  .when-cal { padding: 2px 14px 10px; }
  .when-cal > .is-out-left, .when-cal > .is-out-right { left: 14px; right: 14px; }
  .when-months { grid-template-columns: minmax(0, 1fr); }
  .when-month[data-side="left"] { display: none; }
  .when-month[data-side="right"]::before { display: none; }
  .when-month[data-side="right"] .when-step[data-step="-1"] { display: grid; }
  .when-week, .when-month-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .when-month-grid { grid-template-rows: repeat(6, 38px); }
  .when-day { height: 38px; }
}

/* ---------- Brand marks (Dusan, 9. 11.; brands.js, assets/logos) ----------
   A platform's or service's own logo wherever it is named: on a white rounded plate in Sources, small beside the
   word in a table, a tab, a settings row or a panel's name. */
.cn-mark.has-logo { background: #fff; border: 1px solid var(--line); }
.cn-tile[data-status] .cn-mark.has-logo { background: #fff; }
.cn-logo { width: 24px; height: 24px; object-fit: contain; border-radius: 5px; }
.tool-logo { width: 15px; height: 15px; margin-right: 6px; vertical-align: -3px; object-fit: contain; border-radius: 3px; }
.code-card .tool-logo { background: #fff; padding: 1px; }
.cell-channel { display: inline-flex; align-items: center; gap: 6px; }
.row-logo { width: 16px; height: 16px; flex: none; object-fit: contain; border-radius: 4px; }
.set-row > img.row-brand { width: 20px; height: 20px; object-fit: contain; border-radius: 5px; }
.panel-head h2 .head-brand { width: 18px; height: 18px; margin-right: 8px; vertical-align: -4px; object-fit: contain; border-radius: 4px; }
/* Some brands' own marks are black (Gorgias, Zendesk, WordPress); on the dark theme the small ones sit on a white
   plate like the squares, or they would vanish. */
:root[data-theme="dark"] .page-app :is(.row-logo, .row-brand, .head-brand) { background: #fff; padding: 2px; }

/* ---------- Two-factor authentication (docs/two-factor.md, section 4): the code, the set-up dialog, the devices ---------- */
.tf-code { font-family: var(--mono); font-size: 20px; letter-spacing: 0.22em; text-align: center; }
.tf-form { display: grid; gap: 12px; margin-top: 4px; }
.tf-lost { font-size: 13.5px; }
.tf-lost a { color: var(--ink); text-decoration-color: var(--ruby); text-underline-offset: 3px; }
.tf-lost-line { margin-top: 8px; }
.tf-lost-line[hidden], .tf-links[hidden] { display: none; }
.tf-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; }
.tf-security { display: grid; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tf-devices { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 10px; }
.tf-devices[hidden] { display: none; }
.tf-device { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
.tf-device + .tf-device { border-top: 1px solid var(--line); }
.tf-device-name { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.tf-device-name .row-sub { display: block; }
.tf-device-name b { font-weight: 500; }
.tf-qr { display: grid; place-items: center; margin: 14px 0 10px; }
.tf-qr img { width: 200px; height: 200px; box-sizing: content-box; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.tf-qr img:not([src]) { visibility: hidden; }
.tf-key { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--app-tile); }
.tf-key code { font-family: var(--mono); font-size: 14px; letter-spacing: 0.06em; overflow-wrap: anywhere; user-select: all; }
.org-need { display: block; font-size: 11.5px; color: var(--accent-ink); }
.tf-mark { display: block; }

/* The pending note sits at the same inset as the rows under it, on narrow screens too. */
.users-pending-note { padding: 12px 20px 0; }
@media (max-width: 560px) {
  .users-pending-note { padding-inline: 16px; }
}

/* Errors found in chats still going (app-findings.js): above the findings, one row each, the words stacked, the label and time on the right (under them on a phone). */
.live-found { display: grid; grid-template-rows: 0fr; margin-bottom: 0; opacity: 0; }
.live-found[hidden] { display: none; }
.live-found.is-open { grid-template-rows: 1fr; margin-bottom: 16px; opacity: 1; }
.live-found-in { min-height: 0; overflow: hidden; }
.live-found-bar { display: flex; align-items: center; gap: 8px; padding: 4px 12px 0; }
.live-found-h { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
/* The heading is a button that folds the section (Dusan, 25. 11.): a chevron, the words, and next to them how many. */
.live-found-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 -4px; padding: 2px 4px; border: 0; border-radius: 6px; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.live-found-toggle:hover { background: var(--app-tile); }
.live-found-chev { width: 14px; height: 14px; color: var(--mute); }
.live-found-n { margin-left: 0; }
.live-found-body { display: grid; grid-template-rows: 1fr; }
.live-found-body-in { min-height: 0; overflow: hidden; }
.live-found.is-folded .live-found-body { grid-template-rows: 0fr; }
.live-found.is-folded .live-found-body-in { visibility: hidden; }
.live-found.is-folded .live-found-chev { transform: rotate(-90deg); }
.live-found-sub { margin: 2px 0 6px; padding: 0 12px; font-size: 12.5px; color: var(--mute); }
.live-found .row.rows-live { grid-template-columns: minmax(0, 1fr) auto; align-items: start; padding: 12px; gap: 6px 16px; }
.lw-main { display: grid; gap: 6px; min-width: 0; }
.lw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lw-topic { font-size: 14px; font-weight: 500; color: var(--ink); }
.lw-line { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.lw-who { display: inline-block; min-width: 92px; margin-right: 6px; font-size: 12.5px; color: var(--mute); }
.lw-src { margin-left: 8px; font-size: 12.5px; color: var(--ink); text-underline-offset: 3px; }
.lw-side { display: grid; justify-items: end; gap: 4px; }
/* A row with its chat opens it on a click, as a row of findings opens its finding. */
.live-found .row.rows-live.has-chat { cursor: pointer; }
.live-found .row.rows-live[tabindex]:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 8px; }
.lw-chat { font-size: 12.5px; color: var(--ink); text-underline-offset: 3px; white-space: nowrap; }
.lw-side .row-sub { margin-top: 0; white-space: nowrap; }
.oc-pending { border-style: dashed; }
@media (max-width: 767px) {
  .live-found .row.rows-live { grid-template-columns: minmax(0, 1fr); padding: 12px 4px; }
  .lw-side { justify-items: start; }
  .lw-who { display: block; min-width: 0; margin: 0; }
}

/* The "New" label on a finding nobody has opened (app-findings.js), and the count in the phone's menu. */
.rows-findings .cell-main:has(.new-tag) { display: flex; align-items: center; gap: 8px; }
.rows-findings .cell-main .row-title { min-width: 0; }
.new-tag { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--app-tile); border: 1px solid var(--line-strong); font-size: 11.5px; font-weight: 500; line-height: 1.5; color: var(--ink); }
.new-tag[hidden] { display: none; }
.chip-count { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--app-tile); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.chip-count[hidden] { display: none; }

/* Motion for the count, the New label and the section of errors found in chats still going: the dashboard's own curve and
   keyframes (fb-pill, mc-out, bell-row); only transform and opacity move, plus the height of a section or row that folds. */
@media (prefers-reduced-motion: no-preference) {
  [data-nav-count], .chip-count { animation: fb-pill 0.2s var(--ease-ui); }
  [data-nav-count].is-out { animation: mc-out 0.2s var(--ease-ui) forwards; }
  .new-tag { transition: opacity 0.2s var(--ease-ui); }
  .new-tag.is-gone { opacity: 0; }
  .live-found { transition: grid-template-rows 0.32s var(--ease-ui), opacity 0.24s var(--ease-ui), margin-bottom 0.32s var(--ease-ui); }
  .live-found .row.is-fresh { animation: bell-row 0.32s var(--ease-ui) both; animation-delay: calc(var(--i, 0) * 28ms + 120ms); }
  .live-found-body { transition: grid-template-rows 0.32s var(--ease-ui); }
  .live-found-body-in { transition: visibility 0.32s; }
  .live-found-chev { transition: transform 0.2s var(--ease-ui); }
  .live-found .row.is-leaving { height: 0 !important; padding-top: 0; padding-bottom: 0; opacity: 0; overflow: hidden; border-width: 0; transition: height 0.28s var(--ease-ui), padding 0.28s var(--ease-ui), opacity 0.2s var(--ease-ui); }
}
