/* Monitor de Preços: "Mesa de Controle Grafite" (redesign 2026-11-19). Dark only (D2).
   A graphite sidebar beside ONE content area on pure black; data on iOS grouped-gray
   tiles; one system blue for actions and selection; status colour only in chips that
   also carry a word. Body text 19 px, large titles 38 px, nothing the owner reads under
   15 px; the content uses the window's width (up to 1760 px) beside the sidebar.

   FILE ORDER
     1. TOKENS and BASE (this top part)
     2. SHELL: sidebar (Mac), content area, glass tab bar (iPhone)
     3. SHARED COMPONENTS, used by every screen (list below; Jinja macros in
        templates/_ui.html: {% import "_ui.html" as ui %})
     4. older screen rules (each screen's agent replaces its own)
     5. one section per screen at the very end, between markers
        "screen: X" / "end screen: X": a screen's own rules go ONLY in its section.

   TYPE (root 16 px on the Mac; on the iPhone the root follows Dynamic Type, so every
   token grows with the system Text Size and the browser's Cmd-+):
     --text-xs 15 floor (table headers, small facts)   --text-caption 15 (chips, badges)
     --text-sm 16 (footnote: tile labels, meta, help lines)
     --text-md 17 (callout: buttons, table cells)   --text-row 18 (a row's title)
     --text-body 19 (body, rows)   --text-lg 21 (title 3)   --text-xl 24 (title 2, h2)
     --text-kpi 36 (KPI figure)   --text-2xl 38 (large title, h1)
     --text-tab 14 (the iPhone tab labels only)   --measure 78ch (running text)
     Short secondary lines (meta, captions, tile sublabels, row subtitles) are weight 500,
     never thinner; a help sentence stays 400 at 16 px in --label-2.

   COLOUR ROLES (contrast on #000 / #1c1c1e):
     --label #f5f5f7 primary text; --label-2 #c7c7cc secondary (the lowest grey for text,
     10:1 on #1c1c1e); --label-3 #8e8e93 chevrons/disabled only, never meaningful text.
     --accent-text #409cff links and blue text; --accent-fill #0071e3 behind WHITE text
     only (filled button, active sidebar item); --red-fill #d70015 badges and the
     confirm-destructive button. Status tones: green yellow orange red blue gray.

   SHARED COMPONENTS (section 3)
     .page-header > .page-header-text (h1, .subtitle, .page-meta) + .page-actions
                          large title + subtitle + buttons (macro ui.page_header)
     .back-link           "‹ Produtos" above a detail page's h1 (ui.back_link)
     .sec-head > h2 + a.see-all   section title with "Ver tudo ›"; .sec-help its one
                          help line (ui.section_head)
     .tile                a surface-1 tile (radius 14); a.tile highlights on hover
     .kpis > .kpi         auto-fit row of number tiles: .kpi-label .kpi-value .kpi-sub
                          (ui.kpi); .kpi-pair holds two tiles in one (Lojas | Radar);
                          .kpi-wide spans the row on the iPhone
     .dash                Início's 2 columns (main + aside), stacks under 1100 px
     .detail              a detail page's 2 columns (1.65fr main + 20rem aside)
     .cols-2              2 columns that stack by themselves (auto-fit 26rem)
     .list > .list-row    iOS grouped inset list; a row: .list-icon? .list-body >
                          (.list-text > .list-title + .list-sub) + .list-trail (.chev)
                          The separator is inset (starts at the text), as in iOS.
     .chip + .tone-{green|yellow|orange|red|blue|gray}   16 % tint + a 7 px dot + a
                          word (ui.chip). .chip.no-dot drops the dot (an emoji chip).
     .btn                 grey fill (secondary)        .btn.primary  filled blue
     .btn.plain           blue text, no fill           .btn.danger   red text, red tint
     .btn.destructive     solid red, white text: only to confirm a destructive commit
     .btn.ghost           outlined (older screens)     .btn.small    compact
     input, select, textarea   #2c2c2e fields, radius 10, 16 px or more
     .meter (.meter-proj .meter-used .meter-safe) + .is-{green|yellow|red}  spend bar;
                          .meter-foot the "usado / total" line + chip (ui.meter)
     .seg-group > .seg    segmented control (a or button; selected with
                          aria-current="true" or aria-pressed="true"); .seg-count
     .photo-wrap > .photo-tile (.has-photo white 1:1 tile, the image contained |
                          .no-photo dark "Sem foto") + a.photo-pick "Escolher foto"
                          (ui.photo_tile; --ph-size sets a fixed size, else fluid)
     .spark               72×24 sparkline (only where a real 7-day series exists)
     .money               an amount: never wraps, tabular figures
     .warn-text           orange inline warning text
     <details class="how"><summary>Como funciona</summary><div class="how-body">…</div></details>
                          the long explanation behind a section's one-line help (ui.how)
     <details class="fold"> a section collapsed to one summary line, opened to edit
     .summary-line        one plain sentence under a heading
     .visually-hidden     text for VoiceOver only
   Every other <details> (.evidence, .hint, .conn-replace) uses the same accent label and
   chevron as .how, so a disclosure always looks the same. */

/* ═════ 1. TOKENS ═══════════════════════════════════════════════════════ */
:root {
  color-scheme: dark;

  /* Surfaces: tonal elevation, no shadows (canvas → surface-1 → surface-2 → surface-3) */
  --bg: #000;                       /* canvas: page and content area */
  --bg-sidebar: #161618;            /* the Mac sidebar's graphite */
  --surface-1: #1c1c1e;             /* tiles, grouped lists, tables, chart panel */
  --surface-1-hover: #242426;       /* a clickable tile or row under the mouse */
  --surface-2: #2c2c2e;             /* fields; a well inside a tile (rare) */
  --surface-3: #3a3a3c;             /* a pressed control */
  --bg-elevated: var(--surface-1);  /* older names, same colours */
  --bg-grouped: var(--surface-1);
  --bg-field: var(--surface-2);
  --fill: rgba(120, 120, 128, 0.24);        /* grey button, segmented track, meter track */
  --fill-strong: rgba(120, 120, 128, 0.36); /* grey button under the mouse */
  --seg-on: #636366;                        /* the selected segment */
  --glass: rgba(22, 22, 24, 0.86);          /* ONLY the iPhone tab bar */
  /* Labels. Opaque (not alpha): Chrome applies a text colour's alpha to colour emoji too. */
  --label: #f5f5f7;
  --label-2: #c7c7cc;               /* secondary text: the lowest grey allowed for text (10:1 on surface-1) */
  --label-3: #8e8e93;               /* chevrons, disabled, placeholder: never meaningful */
  --separator: rgba(84, 84, 88, 0.6);
  --separator-soft: rgba(84, 84, 88, 0.35);
  --field-border: rgba(255, 255, 255, 0.16);
  --card-border: transparent;       /* the old hairline is dropped: tone alone separates */
  --accent: #0a84ff;                /* focus ring, chart line, selected controls */
  --accent-text: #409cff;           /* links, "Ver tudo", back link, active tab */
  --accent-text-hover: #6cb4ff;
  --accent-fill: #0071e3;           /* behind white text only */
  --accent-fill-hover: #0068d6;
  --accent-press: #005bbf;
  /* Status tones: each always paired with a word. */
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --red-text: #ff6961;
  --red-fill: #d70015;              /* badges and the confirm-destructive button (white text) */
  --yellow: #ffd60a;
  --gray-dot: #8e8e93;
  --gray-text: #d1d1d6;
  /* Price chart (ticket 36): one colour per Store, in this fixed order (never cycled; a 9th
     Store is gray and dashed). The dataviz reference palette's dark steps, validated
     against --bg-grouped: CVD-safe adjacent pairs, >= 3:1 contrast. */
  --chart-1: #3987e5;
  --chart-2: #d95926;
  --chart-3: #199e70;
  --chart-4: #c98500;
  --chart-5: #d55181;
  --chart-6: #0ca30c;
  --chart-7: #9085e9;
  --chart-8: #e66767;
  --chart-other: #8e8e93;

  /* Type scale (rem: it follows the browser's text size, and Dynamic Type on the iPhone).
     The owner prefers LARGER text (2026-11-19 "fonte que não dá para enxergar"): body 19 px,
     large titles 38 px; nothing the owner reads under 15 px (the chart's axis ticks and the
     iPhone tab labels excepted, set where they are drawn). */
  --type-scale: 1;
  --text-xs: 0.9375rem;    /* 15 floor: table headers, small facts, banner */
  --text-caption: 0.9375rem; /* 15: chips, badges */
  --text-sm: 1rem;         /* 16: footnote, tile labels, meta, help lines */
  --text-md: 1.0625rem;    /* 17: callout, buttons, table cells */
  --text-row: 1.125rem;    /* 18: a list row's or table row's title */
  --text-body: 1.1875rem;  /* 19: body, list rows, subtitles */
  --text-lg: 1.3125rem;    /* 21: title 3 */
  --text-xl: 1.5rem;       /* 24: title 2 (h2) */
  --text-kpi: 2.25rem;     /* 36: a KPI tile's figure */
  --text-2xl: 2.375rem;    /* 38: large title (h1) */
  --text-tab: 0.875rem;    /* 14: the iPhone tab bar's labels only (five must fit) */

  /* Radii */
  --radius-chip: 999px;
  --radius-control: 8px;   /* segment, sidebar item */
  --radius-btn: 10px;      /* Mac button, field */
  --radius: 12px;          /* grouped list, table container, iPhone button */
  --radius-tile: 14px;     /* tile, chart panel */
  --radius-lg: 14px;
  --radius-sheet: 22px;
  --radius-icon: 7px;      /* the icon tile in a list row */

  /* Layout */
  --sidebar-w: 15.5rem;    /* 248 px */
  /* The content uses the width beside the sidebar (2026-11-19: "um monte de espaço nas
     laterais"); the cap only stops absurd lines on an ultra-wide monitor. */
  --content-max: 110rem;   /* 1760 px: fills a 1920 window; 1120 px usable at 1440 */
  --gutter: clamp(2rem, 2.5vw, 3rem); /* the content area's side padding on the Mac */
  --measure: 78ch;         /* running text (help lines, "Como funciona", subtitles) */
  --tabbar-h: 0px;         /* the iPhone tab bar's height (0 on the Mac) */

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --banner-h: 0px;

  font: 100%/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
/* iPhone and iPad: the root follows Settings › Tela e Brilho › Tamanho do Texto (Dynamic
   Type). Only iOS: -webkit-touch-callout exists there alone, so the Mac's Safari keeps the
   percentage above (its -apple-system-body is a small 13 px). */
@supports (font: -apple-system-body) and (-webkit-touch-callout: none) {
  :root { font: -apple-system-body; font-family: -apple-system, system-ui, sans-serif; line-height: 1.5; }
}

/* ═════ BASE ═════════════════════════════════════════════════════════════ */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--label);
  font-size: var(--text-body); line-height: 1.5; letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
}

h1, h2 { margin: 0; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--text-2xl); line-height: 1.18; letter-spacing: -0.02em; }
h2 { font-size: var(--text-xl); line-height: 1.27; letter-spacing: -0.015em; }
small { font-size: var(--text-sm); }  /* never the browser's "smaller" (13 px inside a 16 px label) */
p { margin: 0; text-wrap: pretty; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }
a { color: var(--accent-text); text-underline-offset: 0.18em; }
/* A plain link lightens under the mouse; a link styled as a tile, row or button keeps
   its own colour (it has its own hover). */
@media (hover: hover) and (pointer: fine) {
  a:not([class]):hover, a.see-all:hover, a.back-link:hover, a.link:hover { color: var(--accent-text-hover); }
}
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); color: #fff; }
input, textarea { caret-color: var(--accent); }
button { font-family: inherit; }

:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* ── test banner (Q13.6) ───────────────────────────────────────────── */
body:has(.test-banner) { --banner-h: 2rem; }
.test-banner {
  position: sticky; top: 0; z-index: 50;
  height: var(--banner-h);
  display: grid; place-items: center;
  background: var(--yellow); color: #000;
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.02em;
}

/* ═════ 2. SHELL ═════════════════════════════════════════════════════════
   Mac: a graphite sidebar (248 px, its column runs the page's height; the menu inside
   stays in view) beside ONE content area (it fills the window up to --content-max 110rem,
   then centres; gutters 2-3rem). iPhone (≤ 760 px): the
   sidebar hides, a glass tab bar sits at the bottom (Início, Central, Produtos, Lojas,
   Mais) and the content clears it. Markup: templates/panel.html. */
.shell {
  display: flex; align-items: stretch;
  min-height: calc(100dvh - var(--banner-h));
}
.sidebar {
  flex: 0 0 var(--sidebar-w); min-width: 0;
  background: var(--bg-sidebar); border-right: 1px solid var(--separator);
  padding: 1.25rem 0.75rem 2rem;
}
.sidebar-inner {
  position: sticky; top: calc(var(--banner-h) + 1.25rem);
  display: flex; flex-direction: column; gap: 2px;
}
.sb-brand {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.25rem 0.75rem 1.25rem; color: var(--label); text-decoration: none;
}
.sb-brand-mark {
  flex: none; width: 28px; height: 28px; border-radius: var(--radius-icon);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-fill); color: #fff;
}
.sb-brand-name { font-size: var(--text-row); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  min-height: 2.75rem; padding: 0 0.75rem; border-radius: var(--radius-control);
  color: var(--label); text-decoration: none; text-align: left;
  font: inherit; font-size: var(--text-row); font-weight: 500; line-height: 1.3; letter-spacing: -0.005em;
  transition: background-color 140ms var(--ease-out), transform 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.nav-item:active { transform: scale(0.98); }
.nav-icon { display: inline-flex; flex: none; width: 20px; height: 20px; color: var(--accent-text); }
.nav-icon svg { width: 100%; height: 100%; }
.nav-label { min-width: 0; overflow-wrap: anywhere; }
.nav-item.active { background: var(--accent-fill); color: #fff; }
.nav-item.active .nav-icon { color: #fff; }
/* Sair: a form button that looks like a menu item, in the quieter grey. */
button.nav-item { appearance: none; border: 0; background: transparent; cursor: pointer; }
.nav-out, .nav-out .nav-icon { color: var(--label-2); }
.nav-sep { height: 1px; background: var(--separator); margin: 1rem 0.75rem; }
@media (hover: hover) and (pointer: fine) {
  .nav-item:not(.active):hover { background: rgba(255, 255, 255, 0.07); }
  .nav-item.active:hover { background: var(--accent-fill-hover); }
}
/* The Central's count (red, white text); white on blue when its item is active, as in Mail. */
.badge {
  margin-left: auto; flex: none;
  min-width: 1.375rem; height: 1.375rem; padding: 0 0.4375rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red-fill); color: #fff;
  font-size: var(--text-caption); font-weight: 700; line-height: 1; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.nav-item.active .badge { background: #fff; color: var(--accent-fill); }
.badge[hidden], .tab-badge[hidden] { display: none; }
.sidebar-foot { margin: 0; }

.content { flex: 999 1 560px; min-width: 0; padding: 2.5rem var(--gutter) 4rem; }
.content > .page { max-width: var(--content-max); margin: 0 auto; }

/* The iPhone tab bar: hidden on the Mac (the sidebar has everything). */
.tabbar { display: none; }

@media (max-width: 760px) {
  :root { --tabbar-h: calc(56px + env(safe-area-inset-bottom, 0px)); }
  /* The iPhone's scale: the same 15 px floor; body 18 (19 with iOS's default Text Size),
     iOS's 34 px large title, a KPI figure that fits a half-width tile. */
  :root { --text-body: 1.125rem; --text-xl: 1.375rem; --text-2xl: 2.125rem; --text-kpi: 1.75rem; }
  .shell { display: block; }
  .sidebar { display: none; }
  .content {
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(var(--tabbar-h) + 2rem);
  }
  .tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 40;
    display: flex;
    padding: 0 0.25rem env(safe-area-inset-bottom);
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 0.5px solid var(--separator);
  }
  /* Five tabs always fit, whatever the text size: a label that no longer fits is cut with
     "…", and on a tab too narrow for a word (a very large Text Size) it hides (it stays
     the link's name for VoiceOver) and the icon remains. */
  .tab {
    flex: 1 1 0; min-width: 0; min-height: 56px; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 6px 0 2px; color: var(--label-2); text-decoration: none;
    font-size: var(--text-tab); line-height: 1.2; font-weight: 600; letter-spacing: 0.01em;
    container-type: inline-size;
    -webkit-tap-highlight-color: transparent;
  }
  .tab[aria-current="page"] { color: var(--accent-text); }
  .tab-icon { position: relative; display: inline-flex; width: 26px; height: 26px; }
  .tab-icon svg { width: 100%; height: 100%; }
  .tab-label { max-width: 100%; padding: 0 0.125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  @container (max-width: 3.4em) {
    .tab-label {
      position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
      overflow: hidden; clip-path: inset(50%); white-space: nowrap;
    }
  }
  /* The count sits on the icon's corner, ringed in the bar's colour. */
  .tab-badge {
    position: absolute; top: -4px; left: calc(100% - 9px);
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--red-fill); color: #fff;
    font-size: min(var(--text-tab), 16px); font-weight: 700; line-height: 1;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 2px #161618;
  }
}

/* ═════ 3. SHARED COMPONENTS (documented at the top; macros in _ui.html) ══════ */

/* ── page header: large title, subtitle, actions on the right ── */
.page-header {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1rem 1.5rem; margin: 0 0 2rem;
}
.page-header-text { flex: 1 1 28rem; min-width: 0; }
.page-header h1 { overflow-wrap: anywhere; }
.page-header .subtitle { margin-top: 0.375rem; font-size: var(--text-body); line-height: 1.5; max-width: var(--measure); }
.page-header .subtitle b, .page-header .subtitle strong { color: var(--label); font-weight: 600; }
.page-meta { margin-top: 0.25rem; font-size: var(--text-sm); line-height: 1.4; font-weight: 500; color: var(--label-2); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.back-link {
  display: inline-flex; align-items: center; gap: 0.375rem; margin: 0 0 0.75rem;
  font-size: var(--text-row); font-weight: 500; color: var(--accent-text); text-decoration: none;
}
.back-link svg { flex: none; }
.back-link.phone-only { display: none; }  /* a page reached from "Mais": the iPhone's stack only */
@media (max-width: 760px) {
  .back-link.phone-only { display: inline-flex; }
  .back-link.mac-only { display: none; }
}

/* ── section title with "Ver tudo" and its one help line ── */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 2.5rem 0 1rem;
}
.sec-head > h2 { min-width: 0; }
.see-all {
  display: inline-flex; align-items: center; gap: 0.375rem; flex: none;
  font-size: var(--text-md); font-weight: 500; color: var(--accent-text);
  text-decoration: none; white-space: nowrap;
}
.see-all .chev { color: currentColor; }
.sec-help { margin: -0.5rem 0 1rem; font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); max-width: var(--measure); }
.chev { display: inline-flex; flex: none; color: var(--label-3); }

/* ── tiles and KPI tiles ── */
.tile {
  display: flex; flex-direction: column; gap: 0.5rem; min-width: 0;
  padding: 1.25rem 1.375rem; border-radius: var(--radius-tile);
  background: var(--surface-1); color: var(--label); text-decoration: none;
}
a.tile { transition: background-color 140ms var(--ease-out); }
a.tile:active { background: var(--surface-1-hover); }
@media (hover: hover) and (pointer: fine) { a.tile:hover { background: var(--surface-1-hover); } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 1.5rem; }
/* Four tiles on a narrow Mac window go 2 × 2, never 3 + 1 lonely tile. */
@media (min-width: 761px) and (max-width: 1360px) {
  .kpis:not(.home-kpis):has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.kpi-label {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  font-size: var(--text-sm); font-weight: 600; line-height: 1.33; color: var(--label-2);
}
.kpi-value {
  font-size: var(--text-kpi); line-height: 1.19; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.kpi-sub {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem;
  font-size: var(--text-sm); line-height: 1.4; font-weight: 500; color: var(--label-2);
}
.kpi-sub.stack { flex-direction: column; align-items: stretch; gap: 0.5rem; }
/* Two numbers in one tile (Lojas | Radar), each its own link. */
.kpi-pair {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-radius: var(--radius-tile); background: var(--surface-1); overflow: hidden; min-width: 0;
}
.kpi-pair > .tile { border-radius: 0; padding-inline: 1.375rem 1rem; }
.kpi-pair > .tile + .tile { border-left: 1px solid var(--separator); padding-inline: 1rem 1.375rem; }

/* ── page compositions ── */
.dash { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 1fr); gap: 0 2rem; align-items: start; }
.detail { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(20rem, 1fr); gap: 1.5rem 2rem; align-items: start; }
.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.5rem; }
.dash > *, .detail > *, .cols-2 > * { min-width: 0; }
@media (max-width: 1100px) {
  .dash, .detail { grid-template-columns: minmax(0, 1fr); }
}

/* ── grouped inset list (iOS): rows with an inset separator and a chevron ── */
.list { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; }
.list + .list { margin-top: 1.5rem; }
.list-row {
  display: flex; align-items: center; gap: 0.875rem; min-height: 3.75rem; padding: 0 1.125rem;
  color: var(--label); text-decoration: none; background: var(--surface-1);
}
button.list-row { appearance: none; border: 0; width: 100%; font: inherit; text-align: left; cursor: pointer; }
a.list-row, button.list-row { transition: background-color 140ms var(--ease-out); -webkit-tap-highlight-color: transparent; }
a.list-row:active, button.list-row:active { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { a.list-row:hover, button.list-row:hover { background: var(--surface-1-hover); } }
.list-icon {
  flex: 0 0 30px; height: 30px; border-radius: var(--radius-icon); background: var(--fill);
  display: inline-flex; align-items: center; justify-content: center; color: var(--accent-text);
}
.list-icon svg { width: 18px; height: 18px; }
.list-body {
  flex: 1 1 auto; min-width: 0; align-self: stretch;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 0;
}
.list-row + .list-row > .list-body { border-top: 1px solid var(--separator); }
.list-text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.125rem; }
.list-title { display: block; font-size: var(--text-body); line-height: 1.4; overflow-wrap: anywhere; }
.list-title.strong { font-size: var(--text-row); font-weight: 600; }
.list-sub { display: block; font-size: var(--text-sm); line-height: 1.4; font-weight: 500; color: var(--label-2); overflow-wrap: anywhere; }
.list-trail {
  display: inline-flex; align-items: center; gap: 0.625rem; flex: none;
  font-size: var(--text-row); color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ── status chip: the tone at 16 % behind its word, plus a dot ── */
.chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  min-height: 1.75rem; padding: 0.125rem 0.6875rem; border-radius: var(--radius-chip);
  font-size: var(--text-caption); font-weight: 600; line-height: 1.2; letter-spacing: 0.01em;
  white-space: nowrap;
}
.chip::before {
  content: ""; flex: none; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--dot, currentColor);
}
.chip.no-dot::before { content: none; }
/* A chip never runs out of its tile: on the iPhone (half-width cards) a long word list
   wraps inside the pill instead of being cut at the card's edge. */
.chip { max-width: 100%; }
@media (max-width: 760px) {
  .chip:not(.chip-text) { white-space: normal; text-wrap: balance; }
}
.tone-green { --dot: var(--green); color: var(--green); background: color-mix(in srgb, var(--green) 16%, transparent); }
.tone-yellow { --dot: var(--yellow); color: var(--yellow); background: color-mix(in srgb, var(--yellow) 16%, transparent); }
.tone-orange { --dot: var(--orange); color: var(--orange); background: color-mix(in srgb, var(--orange) 16%, transparent); }
.tone-red { --dot: var(--red); color: var(--red-text); background: color-mix(in srgb, var(--red) 16%, transparent); }
.tone-blue { --dot: var(--accent); color: var(--accent-text); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tone-gray { --dot: var(--gray-dot); color: var(--gray-text); background: var(--fill); }

/* ── buttons: grey (secondary), filled blue (primary), plain, red ── */
.btn {
  appearance: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; font-size: var(--text-md); line-height: 1.2; letter-spacing: 0;
  min-height: 2.5rem; padding: 0 1.125rem; border-radius: var(--radius-btn);
  color: var(--label); background: var(--fill);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  text-align: center; text-wrap: balance; /* a label that must wrap stays centred */
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), opacity 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.btn:active { transform: scale(0.97); transition-duration: 80ms; }
.btn.primary { background: var(--accent-fill); color: #fff; }
.btn.primary:active { background: var(--accent-press); }
/* Ghost: a real button with an outline, not grey text that reads as a caption (several
   ghost buttons start paid work). */
.btn.ghost { background: transparent; color: var(--label); box-shadow: inset 0 0 0 1px var(--fill-strong); }
.btn.plain { background: transparent; color: var(--accent-text); padding-inline: 0.25rem; }
.btn.destructive { background: var(--red-fill); color: #fff; }
.btn.small { min-height: 32px; padding: 0 0.75rem; font-size: var(--text-sm); }
.btn[disabled], .btn.busy { opacity: 0.6; pointer-events: none; }
.btn.busy .label::after,
.btn[disabled] .label::after {
  content: ""; display: inline-block; width: 0.9em; height: 0.9em; margin-left: 0.5em;
  vertical-align: -0.12em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 700ms linear infinite;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--fill-strong); }
  .btn.primary:hover { background: var(--accent-fill-hover); }
  .btn.ghost:hover { background: var(--fill); color: var(--label); }
  .btn.plain:hover { background: transparent; color: var(--accent-text-hover); }
  .btn.destructive:hover { background: #c20013; }
}

/* ── segmented control ── */
.seg-group {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px;
  border-radius: 9px; background: var(--fill); max-width: 100%;
}
.seg {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2rem; padding: 0 0.875rem; border-radius: var(--radius-icon);
  background: transparent; color: var(--label); text-decoration: none; white-space: nowrap;
  font: inherit; font-size: var(--text-sm); font-weight: 500; line-height: 1.2;
  transition: background-color 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.seg[aria-current="true"], .seg[aria-current="page"], .seg[aria-pressed="true"],
.seg:has(input:checked) { background: var(--seg-on); font-weight: 600; }
.seg:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg[hidden] { display: none; }  /* a chart range longer than the history */
.seg-count { margin-left: 0.375rem; color: var(--gray-text); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .seg:not([aria-current="true"], [aria-current="page"], [aria-pressed="true"], :has(input:checked)):hover { background: rgba(255, 255, 255, 0.08); }
}

/* ── meter (spend): used, projection and the 95 % line, in the verdict's tone ── */
.meter {
  position: relative; display: block; height: 8px; border-radius: 999px;
  background: var(--fill); overflow: hidden;
}
.meter > span { position: absolute; inset: 0 auto 0 0; }
.meter-proj { opacity: 0.32; }
.meter-used { border-radius: 999px; }
.meter > .meter-safe { left: 95%; width: 2px; background: var(--label-2); }
.meter.is-green > :is(.meter-proj, .meter-used) { background: var(--green); }
.meter.is-yellow > :is(.meter-proj, .meter-used) { background: var(--yellow); }
.meter.is-red > :is(.meter-proj, .meter-used) { background: var(--red); }
.meter-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem;
  font-size: var(--text-sm); font-weight: 500; color: var(--label-2); font-variant-numeric: tabular-nums;
}
.meter-foot b { color: var(--label); font-weight: 600; }

/* ── Product Photo tile (Q48: ONLY the owner-approved photo) ──
   Approved: a white 1:1 tile with the image contained. None: a dark tile, "Sem foto",
   and over it "Escolher foto" (the picker on the Product page) when bigger than 64 px. */
.photo-wrap { position: relative; display: block; flex: none; width: var(--ph-size, 100%); }
.photo-link { display: block; text-decoration: none; }
.photo-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6%; width: 100%; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius-tile); background: var(--surface-2); color: var(--label-2);
}
.photo-tile.is-small { border-radius: 10px; }
.photo-tile.has-photo { background: #fff; }
.photo-tile img { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-tile > .icon { width: 40%; height: 40%; }
.photo-tile.can-pick { padding-bottom: 3.25rem; }
.photo-tile.can-pick > .icon { width: 30%; height: auto; aspect-ratio: 1; }
.photo-cap, .photo-broken {
  font-size: var(--text-xs); line-height: 1.2; font-weight: 600; color: var(--label-2); white-space: nowrap;
}
.photo-tile .photo-broken { display: none; }
.photo-tile.is-broken { background: var(--surface-2); }
.photo-tile.is-broken img { display: none; }
.photo-tile.is-broken .photo-broken { display: block; }
.photo-pick {
  position: absolute; left: 50%; bottom: 0.75rem; transform: translateX(-50%);
  font-size: var(--text-sm); padding: 0 0.875rem; gap: 0.375rem; white-space: nowrap;
}
.photo-pick:active { transform: translateX(-50%) scale(0.97); }

/* ── sparkline (7 days; only where a real series exists) ── */
.spark { display: block; overflow: visible; }
.spark path { fill: none; stroke: var(--label-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.spark .spark-end { fill: var(--gray-dot); }
.spark .spark-end.tone-green { fill: var(--green); }
.spark .spark-end.tone-orange { fill: var(--orange); }
.spark .spark-end.tone-red { fill: var(--red); }

/* ── text tones that go WITH a word (a change, a verdict) ── */
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-red { color: var(--red-text); }
.text-gray { color: var(--label-2); }

/* ── the shared parts on the iPhone ── */
@media (max-width: 760px) {
  .page-header { margin-bottom: 1.5rem; gap: 0.75rem; }
  .page-header .subtitle { font-size: var(--text-body); }
  .back-link { min-height: 44px; margin: -0.5rem 0 0.25rem -0.25rem; padding: 0 0.25rem; font-size: var(--text-body); }
  .sec-head { margin: 2rem 0 0.25rem; align-items: center; }
  .see-all { min-height: 44px; font-size: 1.0625rem; }
  .sec-help { margin: 0 0 0.75rem; }
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .tile { padding: 1rem; gap: 0.375rem; }
  .kpi-value { font-size: var(--text-kpi); }
  .kpi-wide { grid-column: 1 / -1; order: 1; }
  .kpi-pair { display: contents; }
  .kpi-pair > .tile, .kpi-pair > .tile + .tile { border: 0; border-radius: var(--radius-tile); padding: 1rem; }
  .list-row { min-height: 56px; }
  .btn { border-radius: var(--radius); }
  .seg-group { display: flex; }
  .seg { flex: 1 1 0; min-height: 40px; padding: 0 0.5rem; }
  .photo-tile { border-radius: var(--radius); }
  .photo-pick { left: 6px; right: 6px; bottom: 6px; transform: none; }
  .photo-pick:active { transform: scale(0.97); }
}

/* ── fields ─────────────────────────────────────────────────────────── */
.stack { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.375rem; }
.field > span { font-size: var(--text-sm); color: var(--label-2); font-weight: 500; }
input {
  font: inherit; font-size: var(--text-row); /* ≥16px: iOS Safari doesn't zoom */
  color: var(--label); background: var(--bg-field);
  border: 1px solid var(--field-border); border-radius: 10px;
  min-height: 44px; padding: 0 0.875rem; width: 100%;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
input:focus { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: 0; border-color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--red); }
input[type="time"] { min-width: 7.5rem; }
input::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.6; }

.error { color: var(--red-text); font-size: var(--text-sm); font-weight: 500; }
.lead { color: var(--label-2); }
.tip {
  font-size: var(--text-sm); color: var(--label-2);
  background: var(--fill); border-radius: 10px; padding: 0.625rem 0.75rem;
}

/* (The login and setup screens' rules are in "screen: acesso" at the end.) */

.hint { font-size: var(--text-sm); color: var(--label-2); }
.hint p { margin-top: 0.5rem; }

.subtitle { color: var(--label-2); max-width: var(--measure); }

.empty {
  display: grid; justify-items: center; text-align: center; gap: 0.625rem;
  padding: 4rem 1.5rem;
  background: var(--bg-grouped); border-radius: var(--radius-lg);
  color: var(--label-2);
}
.empty h2 { color: var(--label); }
.empty p { max-width: 60ch; }
.empty-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-size: calc(1.5rem * var(--type-scale));
  background: var(--fill); color: var(--label-2); margin-bottom: 0.25rem;
}

/* ── grouped settings (iOS/macOS Settings) ──────────────────────────── */
.groups { display: grid; gap: 2rem; }
.group { display: grid; gap: 0.5rem; }
.group > h2 { padding: 0; }
.group-help { color: var(--label-2); font-size: var(--text-sm); line-height: 1.45; padding: 0; max-width: var(--measure); }
.rows { background: var(--bg-grouped); border-radius: var(--radius); overflow: hidden; }
.rows > .error { padding: 0 1rem 0.625rem; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 52px; padding: 0.375rem 0.5rem 0.375rem 1rem;
}
.row + .row, .error + .row { border-top: 1px solid var(--separator); }
.row-label { display: grid; font-size: var(--text-md); }
.row-label small { color: var(--label-2); font-size: var(--text-sm); }
.row-label small.spend { font-variant-numeric: tabular-nums; }
.row-label small.spend.warn { color: var(--orange); }
.row-label small.spend.danger { color: var(--red-text); font-weight: 600; }
.row-input { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; flex: 0 1 16rem; }
.row-input input { text-align: right; min-height: 40px; width: 8rem; flex: 0 1 auto; }
.row-input input.mono { width: 100%; }
.unit { color: var(--label-2); font-size: var(--text-sm); white-space: nowrap; }
.actions { display: flex; align-items: center; gap: 1rem; position: relative; }

.toast {
  font-size: var(--text-sm); font-weight: 600; color: var(--green);
  padding: 0.5rem 0.875rem; border-radius: 999px;
  background: color-mix(in srgb, var(--green) 14%, transparent);
  /* "Ajustes salvos": pops in, stays 2.6 s, fades out (it only confirms; nothing to do). */
  animation: toast-in 200ms var(--ease-out) both, toast-out 300ms var(--ease-out) 2.6s forwards;
}
/* An error stays until the next save. */
.toast.warn { color: var(--red-text); background: color-mix(in srgb, var(--red) 16%, transparent); animation: toast-in 200ms var(--ease-out) both; }

/* ── Conexões: the rest is in "screen: ajustes"; this field stays before the
   touch-screen block that raises it to 44 px. ── */
.conn-form input { flex: 1 1 14rem; min-height: 36px; }

/* ── cards, chips, tables (Central, Produtos) ─────────────────────────── */
.muted { color: var(--label-2); }
.small { font-size: var(--text-sm); }
.good { color: var(--green); }
.notice {
  font-size: var(--text-md); color: var(--label);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 1rem;
}
.central-list, .cards { display: grid; gap: 1rem; }
.cards { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.card {
  background: var(--bg-grouped); border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem; display: grid; gap: 0.625rem;
  border: 1px solid var(--card-border);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.card-title { font-size: var(--text-lg); }
/* .chip and .tone-* live in SHARED COMPONENTS (section 3). */
.explain { margin: 0; display: grid; gap: 0.5rem; }
.explain div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.75rem; align-content: start; align-items: start; }
.explain dt { color: var(--label-2); font-size: var(--text-sm); font-weight: 600; padding-top: 0.1rem; }
.explain dd { margin: 0; }
.evidence summary { font-size: var(--text-sm); }
.evidence[open] summary { margin-bottom: 0.5rem; }
.item-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
/* Ticket 67: the AI's raw refusal text (English) and the refusals that ended by themselves. */
.raw-error { overflow-wrap: anywhere; margin: 0; }
a.btn { text-decoration: none; }
.table-wrap { overflow-x: auto; background: var(--bg-grouped); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.table th, .table td { padding: 0.625rem 0.875rem; text-align: left; white-space: nowrap; }
.table th { color: var(--label-2); font-weight: 600; font-size: var(--text-xs); border-bottom: 1px solid var(--separator); }
.table tbody tr + tr td { border-top: 1px solid var(--separator); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table.compact th, .table.compact td { padding: 0.375rem 0.5rem; white-space: normal; }
.chevron { color: var(--label-3); font-size: var(--text-xl); padding-right: 0.5rem; }
.offer-price { font-size: var(--text-body); font-variant-numeric: tabular-nums; }
.offer-price strong { font-size: var(--text-xl); letter-spacing: -0.01em; }

/* ── Seller Badge (Q21) and Shipping Origin (Q20.8): offer cards, readings, product options */
.info-box {
  display: grid; gap: 0.375rem; padding: 0.625rem 0.75rem; border-radius: 10px;
  background: var(--fill); border: 1px solid transparent;
}
.tone-box-yellow { background: color-mix(in srgb, var(--yellow) 6%, var(--fill)); }
.tone-box-orange {
  background: color-mix(in srgb, var(--orange) 8%, var(--fill));
  border-color: color-mix(in srgb, var(--orange) 26%, transparent);
}
.tone-box-red {
  background: color-mix(in srgb, var(--red) 9%, var(--fill));
  border-color: color-mix(in srgb, var(--red) 32%, transparent);
}
.info-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; min-width: 0; }
.info-line .chip { min-height: 1.6em; padding: 0.0625em 0.5em; }
.seller-name { font-size: var(--text-md); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.seller-name.unknown { color: var(--label-2); font-weight: 500; font-style: italic; }
.seller-why, .info-why { color: var(--label-2); line-height: 1.4; }
.tone-box-gray { background: var(--fill); border-color: var(--separator); }
.tone-box-blue {
  background: color-mix(in srgb, var(--accent) 7%, var(--fill));
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
}
.origin-emoji { font-size: var(--text-sm); line-height: 1; }
.offer-price .price-chip { min-height: 1.6em; padding: 0.0625em 0.5em; vertical-align: 2px; }
/* Variant Click (ticket 20): where the Offer clicks before reading */
.click-what { font-size: var(--text-sm); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.click-recipe p { margin: 0.25rem 0 0; overflow-wrap: anywhere; }
.table .num .chip { min-height: 1.6em; padding: 0.0625em 0.5em; margin-right: 0.25rem; vertical-align: 1px; }
.seller-cell { display: inline-flex; align-items: center; gap: 0.375rem; }
.seller-emoji { font-size: var(--text-sm); line-height: 1; }
.choices .row { cursor: pointer; flex-wrap: nowrap; }
.choices .row-label { flex: 1 1 auto; min-width: 0; }
.choice input[type="radio"] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0 0.5rem 0 0;
  border-radius: 50%; border: 2px solid var(--label-2); background: transparent;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
  cursor: pointer;
}
.choice input[type="radio"]:checked {
  border-color: var(--accent); background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--bg-grouped);
}
.choice input[type="radio"]:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }

/* ── link analysis ──────────────────────────────────────────────────── */
.link-paste { margin-bottom: 2rem; }
.paste-form { display: flex; gap: 0.5rem; }
.paste-form input { flex: 1 1 auto; }
.paste-or { margin-top: 1.5rem; }
.byname-typed { font-size: var(--text-body); min-width: 0; overflow-wrap: anywhere; }
.analyses { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
.analysis {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--bg-grouped); border-radius: var(--radius); padding: 0.625rem 0.75rem 0.625rem 1rem;
}
.analysis-text { display: grid; flex: 1 1 auto; min-width: 0; }
.analysis-text small { color: var(--label-2); font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The note under the address wraps (ticket 44): only the address is cut to one line. */
.analysis-text small.analysis-note { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
/* "· desde 17/11 15:18" next to "Na fila" / "Analisando": a quieter part of the title. */
.analysis-when { font-weight: 400; color: var(--label-2); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; padding: 0; }
.dot.tone-green { background: var(--green); }
.dot.tone-orange { background: var(--orange); }
.dot.tone-blue { background: var(--accent); }
.spinner {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid var(--label-3); border-top-color: var(--accent);
  animation: spin 800ms linear infinite;
}
.summary-card { margin-bottom: 2rem; }
.row-input.wide { flex: 1 1 22rem; }
.row:has(.row-input.wide) .row-label { flex: 0 0 12rem; }
.row-input .btn { flex: none; }
.row-input.wide input { width: 100%; text-align: left; }
select {
  font: inherit; font-size: var(--text-row); color: var(--label); background: var(--bg-field);
  border: 1px solid var(--field-border); border-radius: 10px; min-height: 44px;
  padding: 0 0.875rem; width: 100%;
}

/* ── Lojas ──────────────────────────────────────────────────────────── */
.store-list { display: grid; gap: 1rem; }
.store-name { display: grid; gap: 0.125rem; min-width: 0; }
.store-status { color: var(--label); max-width: var(--measure); }
.notice.is-error { background: color-mix(in srgb, var(--red) 16%, transparent); }
.facts {
  margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--separator); border-radius: var(--radius); overflow: hidden;
}
.facts div { background: color-mix(in srgb, var(--bg-field) 55%, var(--bg-grouped)); padding: 0.625rem 0.875rem; display: grid; gap: 0.125rem; align-content: start; }
.facts dt { color: var(--label-2); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.02em; }
.facts dd { margin: 0; font-size: var(--text-md); }
.facts dd.num { font-variant-numeric: tabular-nums; }
.facts dd small { display: block; color: var(--label-2); font-size: var(--text-sm); }
.mini-head { margin: 0 0 0.5rem; font-size: var(--text-sm); font-weight: 600; color: var(--label-2); letter-spacing: 0.01em; }
.ladder-wrap { display: grid; gap: 0.375rem; }
.ladder-wrap .mini-head { margin: 0; }
.ladder {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.5rem;
}
.rung {
  position: relative; display: grid; gap: 0.125rem; align-content: start;
  padding: 0.5rem 0.75rem; border-radius: 10px;
  background: var(--fill); border: 1px solid transparent;
}
.rung-n { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--label-2); }
.rung-label { font-size: var(--text-sm); font-weight: 500; line-height: 1.3; }
.rung-cost { font-size: var(--text-sm); color: var(--label-2); font-variant-numeric: tabular-nums; }
.rung.fixed { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.rung.fixed .rung-n { color: var(--accent-text); }
.rung.failing { background: color-mix(in srgb, var(--red) 14%, transparent); border-color: color-mix(in srgb, var(--red) 50%, transparent); }
.rung.failing .rung-n { color: var(--red-text); }
.rung.skipped { background: transparent; border: 1px dashed var(--fill-strong); }
.rung.skipped .rung-label { color: var(--label-2); }
.history[open] summary { margin-bottom: 0.25rem; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.75rem;
  padding: 0.5rem 0; font-size: var(--text-sm); border-top: 1px solid var(--separator);
}
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline .ev-stopped span:first-of-type { color: var(--label); }
.store-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.relearn-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex: 1 1 100%; min-width: 0; }
.relearn-label { font-size: var(--text-sm); color: var(--label-2); white-space: nowrap; }
.relearn-form select { min-height: 36px; font-size: var(--text-md); padding: 0 0.625rem; flex: 1 1 16rem; width: auto; min-width: 0; }
.relearn-cost { flex-basis: 100%; margin: 0; font-size: var(--text-sm); line-height: 1.4; color: var(--label-2); font-variant-numeric: tabular-nums; }
.relearn-confirm {
  flex-basis: 100%; display: grid; gap: 0.5rem; padding: 0.75rem 0.875rem; border-radius: 12px;
  background: color-mix(in srgb, var(--orange) 9%, var(--fill));
  border: 1px solid color-mix(in srgb, var(--orange) 34%, transparent);
  animation: enter 180ms var(--ease-out) both;
}
.relearn-confirm-title { margin: 0; font-weight: 600; font-size: var(--text-md); }
.relearn-confirm-body { margin: 0; font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); max-width: 52rem; }
.relearn-confirm-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.seller-bars { display: grid; gap: 0.5rem; }
.seller-bars .mini-head { margin: 0; }
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; font-size: var(--text-sm); }
.bar-list li { display: grid; grid-template-columns: 1.375rem 1fr; gap: 0.375rem; align-items: baseline; }
.bar-list strong { font-weight: 600; }
.seller-edit[open] summary { margin-bottom: 0.75rem; }
.seller-form { display: grid; gap: 0.875rem; max-width: 44rem; }
.bar-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 15rem)); gap: 0.625rem 1.25rem; }
.bar-field {
  display: grid; align-content: start; gap: 0.25rem;
  font-size: var(--text-sm); color: var(--label-2); font-weight: 500;
}
.bar-input { display: flex; align-items: center; gap: 0.5rem; }
.bar-input input { width: 6.5rem; min-height: 36px; text-align: right; flex: none; }
.bar-field .error { font-size: var(--text-sm); }
textarea {
  font: inherit; font-size: var(--text-row); color: var(--label); background: var(--bg-field);
  border: 1px solid var(--field-border); border-radius: 10px;
  padding: 0.5rem 0.875rem; width: 100%; resize: vertical; line-height: 1.4;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: 0; border-color: var(--accent); }
.check { display: flex; align-items: flex-start; gap: 0.625rem; font-size: var(--text-sm); cursor: pointer; }
.check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0.1rem 0 0;
  border-radius: 6px; border: 2px solid var(--label-2); background: transparent;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
  cursor: pointer;
}
.check input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.check small { display: block; }
.seller-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

/* ── page change: sidebar stays still, only the new content eases in ──
   (ticket 54) A plain CSS transition, not a view transition: it never blocks a click, and
   the next tab simply replaces it mid-fade. */
#content.htmx-added { opacity: 0; transform: translateY(4px); }
#content { transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); }

/* ── iPhone: the older screens' rows (the tab bar itself is in SHELL) ── */
@media (max-width: 760px) {
  .row { flex-wrap: wrap; }
  .row-input { flex: 1 1 100%; justify-content: flex-start; }
  .row-input input { text-align: left; width: 100%; flex: 1 1 auto; }
  .explain div { grid-template-columns: 1fr; gap: 0.125rem; }
  .paste-form { flex-direction: column; }
  .row:has(.row-input.wide) .row-label { flex: 1 1 100%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .relearn-form { flex-wrap: wrap; flex-basis: 100%; min-width: 0; }
  .relearn-form select { flex-basis: 100%; width: 100%; max-width: 100%; min-height: 44px; font-size: 1rem; }
  .store-actions .btn { flex: 1 1 100%; min-height: 44px; }
  .relearn-confirm-actions .btn { flex: 1 1 100%; }
  .relearn-cost { order: 1; }  /* what the chosen rung costs, read before the button */
  .relearn-form .btn { order: 2; }
  .timeline li { grid-template-columns: 1fr; gap: 0.125rem; }
  .bar-fields { grid-template-columns: minmax(0, 1fr); }
  .bar-input input { min-height: 44px; }
}

/* ── keyframes ──────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes card-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
/* A block that appears after an action (a note, a confirmation, a fold-out): no scale, a
   wide block would grow at its edges. */
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }
/* A small pill (toast). */
@keyframes toast-in { from { opacity: 0; transform: scale(0.96); } }
@keyframes toast-out { to { opacity: 0; } }
@keyframes shake {
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* ── accessibility ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .btn:active, .nav-item:active { transform: none; }
  #content.htmx-added { transform: none; }
  .btn.busy .label::after, .btn[disabled] .label::after { animation: none; border-right-color: currentColor; opacity: 0.5; }
  /* With 1 ms the toast would jump to its end, invisible: it stays instead. */
  .toast { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .tabbar { background: var(--bg-sidebar); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --label-2: #e5e5ea; --separator: rgba(160, 160, 165, 0.8); }
  .rows, .access-card, .empty { border: 1px solid var(--separator); }
}

/* Excluir: quiet until hovered, red so it never reads as the main action */
.btn.danger { color: var(--red-text); background: color-mix(in srgb, var(--red) 14%, transparent); }
.btn.ghost.danger { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 45%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .btn.danger:hover { background: color-mix(in srgb, var(--red) 22%, transparent); }
  .btn.ghost.danger:hover { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red-text); }
}

/* ── lateness and frequency (ticket 26) ─────────────────────────────── */
/* The select is as wide as its longest option, so the chosen one's cost is never clipped;
   the label beside it wraps instead. */
.frequency-row .row-label { flex: 1 1 12rem; min-width: 0; }
.frequency-row .row-input { flex: 0 1 auto; min-width: 0; }
.frequency-row select { min-height: 40px; font-size: var(--text-md); width: auto; max-width: 100%; }
@media (max-width: 760px) {
  .frequency-row .row-label, .frequency-row .row-input { flex: 1 1 100%; }
  .frequency-row select { width: 100%; font-size: 1rem; }  /* iOS zooms a field under 16px */
}
.late-box .info-why, .late-todo { line-height: 1.4; }
.queue-full { margin-top: 0.25rem; }  /* a state that stays: shown still, not on every re-render */
.queue-full .info-why, .queue-full .late-todo { max-width: 52rem; }
.late-todo { color: var(--label); }
.late-todo strong { font-weight: 600; }
.late-read { font-variant-numeric: tabular-nums; }
.queue-heavy {
  list-style: none; margin: 0; padding: 0 0 0 0.75rem; display: grid; gap: 0.25rem;
  border-left: 2px solid color-mix(in srgb, var(--orange) 40%, transparent);
  font-variant-numeric: tabular-nums; max-width: 52rem;
}
.queue-heavy strong { font-weight: 600; }
.group-note {
  font-size: var(--text-sm); line-height: 1.45; color: var(--label); max-width: var(--measure);
  padding: 0.5rem 0.75rem; border-radius: 10px; background: var(--fill);
}
/* Only the note a save produces enters; the fixed explanation is just there. */
.group-note[role="status"] { animation: enter 180ms var(--ease-out) both; }

/* ── price chart (ticket 36) ───────────────────────────────────────────── */
.price-chart {
  display: grid; gap: 0.5rem; padding: 0.75rem; border-radius: var(--radius-lg);
  background: var(--bg-grouped); min-width: 0;
}
.price-chart:not(.ready) .chart-ranges, .price-chart:not(.ready) .chart-plot { display: none; }
.chart-plot { width: 100%; min-width: 0; overflow: hidden; }
/* A sideways finger drag reads the chart; a vertical one still scrolls the page. */
.chart-plot .u-over { touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.chart-plot .u-select { background: var(--fill); }
.chart-status:empty, .chart-when:empty { display: none; }
.chart-when { font-variant-numeric: tabular-nums; }
.chart-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.125rem; }
.chart-key {
  display: flex; align-items: center; gap: 0.5rem; width: 100%; min-height: 44px;
  padding: 0.25rem 0.5rem; border: 0; border-radius: 10px; background: transparent;
  color: var(--label); font: inherit; font-size: var(--text-sm); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chart-key[aria-pressed="false"] { color: var(--label-2); text-decoration: line-through; text-decoration-color: var(--label-3); }
.chart-key[aria-pressed="false"] .chart-swatch { opacity: 0.3; }
.chart-key:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { .chart-key:hover { background: var(--fill); } }
.chart-swatch {
  flex: none; width: 18px; height: 0; border-top: 3px solid var(--swatch, var(--label-2));
  border-radius: 2px;
}
.chart-swatch.dashed { border-top-style: dashed; }
.chart-swatch.ref-normal { border-top: 2px dashed var(--label-2); }
.chart-swatch.ref-lowest { border-top: 2px dotted var(--label-2); }
.chart-swatch.ref-target { border-top: 2px solid var(--label-2); }
/* Q42.10: what the ✕ on the chart means (a plain row, not a toggle). */
.chart-key-note {
  display: flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.25rem 0.5rem;
  color: var(--label-2); font-size: var(--text-sm);
}
.chart-swatch.mark {
  width: 18px; height: auto; border: 0; text-align: center; line-height: 1;
  color: var(--label); font-weight: 600;
}
/* Ticket 50: the 📍 row; the Tip under the cursor can be a long line, so it wraps below. */
.chart-key.tip { flex-wrap: wrap; }
.chart-key.tip .chart-value { flex: 1 1 100%; max-width: none; margin-left: calc(18px + 0.5rem); text-align: left; }
.chart-swatch.pin { width: 18px; height: auto; border: 0; text-align: center; line-height: 1; font-size: var(--text-sm); }
.chart-name { flex: 1 1 8rem; min-width: 0; overflow-wrap: anywhere; }
.chart-value {
  margin-left: auto; text-align: right; color: var(--label-2); font-variant-numeric: tabular-nums;
  flex: 0 1 auto; max-width: 60%; min-width: 0;
}
.chart-notes { color: var(--label-2); display: grid; gap: 0.25rem; max-width: var(--measure); }
.chart-notes p { margin: 0; }

/* ── Store registry ([Incluir loja]) and a Product's Stores to search (ticket 38) ── */
.store-add { margin-bottom: 1rem; }
.store-add-summary {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.store-add-summary::-webkit-details-marker { display: none; }
.store-add[open] .store-add-summary .btn { background: var(--fill-strong); color: var(--label); }
.store-add-form { display: grid; gap: 0.875rem; margin-top: 0.75rem; max-width: 36rem; }
/* Fold-out: the form eases in when "Incluir loja" opens; when it comes back with an error
   it stays put and only the error enters. */
.store-add[open] > .store-add-form { animation: enter 180ms var(--ease-out) both; }
.store-add[open] > .store-add-form:has(.is-error) { animation: none; }
.store-add-form > .notice { animation: enter 180ms var(--ease-out) both; }
.store-add-form textarea { font-family: inherit; }
.store-add-choice { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 0.5rem; }
.store-add-choice legend { font-size: var(--text-sm); color: var(--label-2); font-weight: 500; padding: 0; margin-bottom: 0.375rem; }
.check input[type="radio"] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0.1rem 0 0;
  border-radius: 50%; border: 2px solid var(--label-2); background: transparent;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
  cursor: pointer;
}
.check input[type="radio"]:checked { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--bg-grouped); }
.check input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.store-pick { padding: 0.625rem 0.75rem 0.625rem 1rem; align-items: flex-start; }
.store-pick .check { flex: 1 1 auto; min-width: 0; font-size: var(--text-md); }
.store-pick .check > span { min-width: 0; }  /* a long store name or chip ends in "…", never widens the form */
.store-pick-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; }
.store-pick-name .chip { min-height: 1.6em; padding: 0.0625em 0.5em; font-size: var(--text-xs); }
.store-pick-cost { display: block; color: var(--label-2); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.store-pick-note { display: block; color: var(--label-2); font-size: var(--text-sm); }
.store-others { padding: 0.25rem 0.25rem 0; }
.store-others .rows { margin-top: 0.5rem; }

/* Discovery on the Product page (ticket 40) */
#product-stores .search-offer { margin-top: 0.75rem; }
.search-offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.5rem; }
.search-actions { flex-wrap: wrap; gap: 0.5rem 1rem; }
.search-actions small { flex: 1 1 14rem; line-height: 1.4; }
#product-discovery .reevaluate { margin-top: 1rem; }
#product-discovery .reevaluate p { margin: 0 0 0.5rem; line-height: 1.4; }
#product-discovery .reevaluate .btn { max-width: 100%; white-space: normal; }
.run-list { display: grid; gap: 0.5rem; margin-top: 1rem; }
.run summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; }
.run-summary { margin: 0.5rem 0; }
.run-stores { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.375rem; }
.run-stores li { display: flex; flex-direction: column; gap: 0.125rem; font-size: var(--text-sm); }
.run-store { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; }
.run-detail { color: var(--label-2); font-size: var(--text-sm); overflow-wrap: anywhere; }
/* Google Shopping's sellers outside the registry, each with [Incluir loja] (ticket 43) */
.unknown-sellers { list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.25rem; }
.run-stores .unknown-sellers li { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.5rem; font-size: var(--text-sm); overflow-wrap: anywhere; }
.candidate-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.candidate { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.625rem 0.75rem; border-radius: 10px; background: var(--bg-field); min-width: 0; }
.candidate-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; font-size: var(--text-sm); }
.candidate-head .chip { min-height: 1.6em; padding: 0.0625em 0.5em; font-size: var(--text-xs); }
.candidate-title { overflow-wrap: anywhere; }
.candidate-meta { color: var(--label-2); font-size: var(--text-sm); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.candidate-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.search-ladder .rung-cost { white-space: nowrap; }
#product-discovery .mini-head { margin-top: 1.25rem; }
.search-ladder-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }

/* (The Radar's own rules, its switch included, are in "screen: radar" at the end.) */
/* The Product page's "Sinais do radar" (ticket 47) */
.signal-head .chip { min-height: 1.6em; padding: 0.0625em 0.5em; font-size: var(--text-xs); }
.signal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; font-size: var(--text-sm); }
.signal-price { color: var(--label); font-variant-numeric: tabular-nums; }

/* (The product page's seller box can be green; Custos moved to "screen: custos".) */
.tone-box-green {
  background: color-mix(in srgb, var(--green) 7%, var(--fill));
  border-color: color-mix(in srgb, var(--green) 24%, transparent);
}

/* ── Ticket 52: worst-case data (break-ui) ──────────────────────────────────
   Names, links and sellers come from the stores and the deal sites: a Mercado Livre
   seller written as one long word, a link full of tracking, a title with emoji. None of
   them may push the page sideways (iPhone) or out of its card (Mac).
   1. Single-column grids never grow to their widest word: their column is minmax(0, 1fr). */
.stack, .groups, .group, .card, .product-body, .central-list, .store-list,
.radar-body, .explain, .store-name, .info-box, .store-add-form, .seller-form {
  grid-template-columns: minmax(0, 1fr);
}
.explain div { grid-template-columns: 7.5rem minmax(0, 1fr); }
.timeline li { grid-template-columns: 6.5rem minmax(0, 1fr); }
@media (max-width: 760px) {
  .explain div, .timeline li { grid-template-columns: minmax(0, 1fr); }  /* stacked, as before */
}
/* 2. Text that comes from data wraps, breaking inside a word only when it has to. */
.content :is(h1, h2, h3, h4, p, dd, li, summary, figcaption),
.row-label, .card-head > strong, .store-name > *, .analysis-text strong, .check > span,
.store-pick-name strong, .unknown-sellers li > span {
  overflow-wrap: anywhere;
}
/* In a compact table a long word (a link, a seller written as one word) breaks where it
   must, so it never sets the column width; a column keeps at least 5rem, so it is never
   squeezed to one letter. (overflow-wrap: break-word does not lower a cell's min-content
   width, so it let an unbreakable link make the table 1240 px wide.) Prices never wrap.
   A table still wider than the screen scrolls inside its own box (.table-wrap). */
.table.compact td:not(.num) { overflow-wrap: anywhere; min-width: 5rem; }
.card-head { flex-wrap: wrap; row-gap: 0.375rem; }
.card-head > strong, .check > span, .row-label { min-width: 0; }
/* 3. A button whose label comes from data (Central actions) wraps inside the card. */
.btn { max-width: 100%; }
.item-actions .btn { height: auto; padding-top: 0.375rem; padding-bottom: 0.375rem; text-align: center; overflow-wrap: anywhere; }
/* 4. A Store name inside a chip is cut with "…" (the full name is in its title). */
.chip.chip-text {
  display: inline-block; max-width: 100%; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; line-height: 1.45; vertical-align: middle;
}
.chip.chip-text::before { margin-right: 0.375rem; vertical-align: 1px; }  /* inline-block: the flex gap is gone */
/* 5. A price never splits between "R$" and the number. */
.offer-price strong, .signal-price, .radar-price,
.table .num, .table.compact .num { white-space: nowrap; }
/* 6. Wide table cells (a seller as one long word) are cut, full text in the title. */
.table:not(.compact) td.cell-clip { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; }
.table.compact td.cell-clip { min-width: 7rem; }  /* a compact table wraps it instead */
/* 7. Ticket 50 leftover: a long word in the 📍 readout wraps instead of widening the row. */
.chart-key.tip .chart-value { overflow-wrap: anywhere; }
/* 8. Offer cards fit a 320 px screen (17rem is wider than its content column there). */
.cards { grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); }
/* 9. The test banner stays one line (it has a fixed height): on a narrow screen it says
      only "AMBIENTE DE TESTE", at full size, instead of shrinking the text. */
.test-banner { display: block; line-height: var(--banner-h); text-align: center; padding: 0 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .test-banner .banner-more { display: none; } }
/* 10. A button that cannot be used yet (no Store ticked, no radar site on) is dimmed, never
   a spinner: the spinner means "working", which it is not. */
.btn[data-off] .label::after { content: none; }
/* 11. A Produtos card shows at most 2 lines of a long Product name (the full name is on
   its page, and in the title): .pcard-name in "screen: produtos". */
.card-title { margin: 0; }  /* an h3 title (Radar) keeps no browser margin */

/* ── Ticket 53: iPhone Safari (mobile-native; no PWA, D3) ───────────────────
   The fixes that make the panel feel like an app on the iPhone, not a website. Each one
   says why. Capability queries ((hover), (pointer), env(), dvh), never the user agent.
   1. No gray flash on tap: the browser's highlight is off everywhere, and every tappable
      thing has its own pressed state instead (.btn, .nav-item, .switch already;
      plain links, summaries and the chart legend below). */
html { -webkit-tap-highlight-color: transparent; }
a:not(.btn, .nav-item):active, summary:active { opacity: 0.6; }
.chart-key:active { background: var(--fill); }
/* 2. No 300 ms wait for a double-tap zoom on anything tappable (zoom by pinch still works). */
a, button, summary, label, select, [role="button"], [role="switch"],
input[type="checkbox"], input[type="radio"] { touch-action: manipulation; }
/* 3. A long press on a control does not select its label or pop the link callout; text that
      is content (names, prices, links in sentences) stays selectable. */
.nav-item, .switch, .chart-key, .seg, .store-add-summary, .evidence summary {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
/* 4. A table that scrolls sideways inside its box stops at its end: the swipe does not carry
      on to the page (on the Mac, it would go "back" a page). */
.table-wrap { overscroll-behavior-x: contain; }
/* 5. Content clear of the notch and the home bar (viewport-fit=cover in base.html): the
      iPhone turned sideways is wider than 760 px, so it gets the sidebar layout, and the
      notch sits on the left or the right. */
@media (min-width: 761px) {
  .sidebar { padding-left: max(0.75rem, env(safe-area-inset-left, 0px)); }
  .content { padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
}
@media (max-width: 760px) {
  .tabbar {
    padding-left: max(0.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.25rem, env(safe-area-inset-right, 0px));
  }
  .content {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }
  /* 6. The main button of a form is as wide as the screen: easy to reach with the thumb. */
  .actions { flex-wrap: wrap; }
  .actions > .btn.primary { flex: 1 1 100%; }
}
/* Logout: the iPhone's tab bar has no room for "Sair", so Ajustes shows it at the end. */
.mobile-only { display: none; }
@media (max-width: 760px) { .mobile-only { display: block; } }
.signout { margin-top: 2rem; }
.signout .btn { width: 100%; }
.test-banner {
  padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.5rem, env(safe-area-inset-right, 0px));
}
/* 7. On a touch screen (iPhone, iPad): no zoom into a field, and a finger-sized target.
      iOS zooms the page into a field whose text is under 16 px and never zooms back; the
      fields that are smaller on the Mac (Reaprender, Frequência) are 16 px+ here. Every
      button, field, disclosure and stand-alone link is at least 44 px tall (Apple's
      minimum); links inside a sentence are not (they would break the line). */
@media (pointer: coarse) {
  input:not([type="checkbox"], [type="radio"]), select, textarea,
  .relearn-form select, .frequency-row select {
    font-size: max(16px, 1rem);
  }
  input:not([type="checkbox"], [type="radio"]), select,
  .relearn-form select, .frequency-row select, .row-input input, .conn-form input, .bar-input input {
    min-height: 44px;
  }
  .btn, .btn.small { min-height: 44px; }
  .back-link, .see-all, .seg, .photo-pick { min-height: 44px; }
  summary:not(.store-add-summary) { min-height: 44px; padding-block: 0.625rem; }
  .store-add-summary { min-height: 44px; }
  .check { min-height: 44px; padding-block: 0.625rem; }
  .table td > a {
    display: inline-flex; align-items: center; min-height: 44px;
  }
}

/* ── [Editar loja] / [Remover loja] on an owner-added Store's card (Q45.4) ── */
.store-manage { display: grid; gap: 0.75rem; }
.store-edit[open] > .store-add-form { animation: enter 180ms var(--ease-out) both; }
.store-edit[open] > .store-add-form:has(.is-error) { animation: none; }
.store-remove { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.store-remove-block { margin: 0; max-width: 44rem; }
@media (max-width: 760px) {
  .store-remove .btn, .store-manage .seller-form-actions .btn { flex: 1 1 100%; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .store-edit[open] > .store-add-form { animation: none; }
}

/* ── Product Photo (Q48, ticket 59): the approved photo, the options to choose from ── */
.photo-current { display: flex; align-items: center; gap: 0.875rem; min-width: 0; }
.photo-current > p { flex: 1 1 auto; min-width: 0; line-height: 1.4; }
.photo-frame {
  position: relative; display: grid; place-items: center; overflow: hidden;
  aspect-ratio: 1; width: 100%; border-radius: 10px; background: #fff;
}
.photo-frame img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
.photo-frame.is-broken { background: var(--fill); }
.photo-frame.is-broken img { visibility: hidden; }
.photo-broken {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 0.5rem;
  color: var(--label-2); font-size: var(--text-xs); text-align: center; visibility: hidden;
}
.photo-frame.is-broken .photo-broken { visibility: visible; }
.photo-frame-current { flex: none; width: 112px; }
.photo-working { display: flex; align-items: center; gap: 0.5rem; color: var(--label-2); padding: 0; }
.photo-problem { color: var(--orange); padding: 0; line-height: 1.4; }
.photo-nothing { padding: 0; }
#product-photo .mini-head { margin: 0.5rem 0 0; padding: 0; }
.photo-grid {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
}
.photo-option {
  display: flex; flex-direction: column; gap: 0.375rem; min-width: 0;
  padding: 0.5rem; border-radius: var(--radius); background: var(--bg-grouped);
}
.photo-title {
  font-size: var(--text-sm); line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.photo-meta { color: var(--label-2); font-size: var(--text-xs); overflow-wrap: anywhere; }
.photo-link { align-self: flex-start; }
.photo-option .btn { margin-top: auto; width: 100%; }
/* ticket 60: "Ver mais fotos deste anúncio" and the pictures it brought */
.photo-option .photo-more-btn { margin-top: 0; }
.photo-more { padding: 0; line-height: 1.35; overflow-wrap: anywhere; }
.photo-more-cost { font-size: var(--text-xs); line-height: 1.3; }
.photo-option-gallery { outline: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: -1px; }
@media (max-width: 380px) {
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-frame-current { width: 88px; }
}

/* ── Foundation components (step F, 2026-11-18): documented at the top of this file ── */
/* An amount never wraps: "R$" stays with its number, "US$ 0.84" stays whole. */
.money, .nowrap { white-space: nowrap; }
.money { font-variant-numeric: tabular-nums; }
.warn-text { color: var(--orange); }

/* One disclosure style everywhere: an accent label and a chevron that turns down when open
   (it replaces the browser's ▶ and the old " ›"). */
:is(.how, .hint, .evidence, .conn-replace) > summary {
  cursor: pointer; list-style: none; color: var(--accent-text); font-weight: 500;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
:is(.how, .hint, .evidence, .conn-replace, .fold) > summary::-webkit-details-marker { display: none; }
:is(.how, .hint, .evidence, .conn-replace) > summary::after {
  content: ""; display: inline-block; flex: none; width: 0.42em; height: 0.42em; margin-left: 0.5em;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-0.12em) rotate(-45deg);
  transition: transform 160ms var(--ease-out);
}
:is(.how, .hint, .evidence, .conn-replace)[open] > summary::after { transform: translateY(-0.3em) rotate(45deg); }

/* "Como funciona": a section's one-line help stays visible; the rest is folded here. */
.how { font-size: var(--text-sm); color: var(--label-2); max-width: var(--measure); }
.how > summary { width: fit-content; }
.how-body {
  display: grid; gap: 0.5rem; margin-top: 0.375rem; padding: 0.75rem 1rem;
  border-radius: var(--radius); background: var(--fill); color: var(--label); line-height: 1.5;
}
.how-body :is(p, li) { max-width: 70ch; }
/* The same, in a section that refreshes itself (Busca nas lojas): no entrance to replay. */
.how-body-still {
  display: grid; gap: 0.5rem; margin-top: 0.375rem; padding: 0.75rem 1rem;
  border-radius: var(--radius); background: var(--fill); color: var(--label); line-height: 1.5;
}
.how-body-still :is(p, li) { max-width: 70ch; }
.how-body-still :is(ul, ol) { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.25rem; }
.how-body :is(ul, ol) { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.25rem; }
.how[open] > .how-body { animation: enter 180ms var(--ease-out) both; }

/* A section folded to one summary line; "Editar" opens it. */
.fold { background: var(--bg-grouped); border-radius: var(--radius); }
.fold > summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem;
  min-height: 52px; padding: 0.5rem 1rem; cursor: pointer; list-style: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.fold-title { font-weight: 600; font-size: var(--text-md); }
.fold-sum { flex: 1 1 14rem; min-width: 0; color: var(--label-2); font-size: var(--text-sm); }
.fold-action { margin-left: auto; color: var(--accent-text); font-weight: 600; font-size: var(--text-sm); }
.fold-action::after {
  content: ""; display: inline-block; width: 0.42em; height: 0.42em; margin-left: 0.5em;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-0.12em) rotate(45deg); transition: transform 160ms var(--ease-out);
}
.fold[open] > summary .fold-action::after { transform: translateY(0.08em) rotate(-135deg); }
.fold[open] > summary { border-bottom: 1px solid var(--separator); }
.fold-body { display: grid; gap: 1rem; padding: 1rem; }
.fold[open] > .fold-body { animation: enter 180ms var(--ease-out) both; }
@media (hover: hover) and (pointer: fine) { .fold > summary:hover .fold-title { color: var(--accent-text); } }

.summary-line { color: var(--label-2); font-size: var(--text-md); max-width: var(--measure); }
.summary-line strong { color: var(--label); font-weight: 600; }

/* Prose inside cards keeps a readable line on the wide Mac screen. */
.card :is(p, .seller-why, .info-why, .store-status) { max-width: 72ch; }

@media (prefers-reduced-motion: reduce) {
  :is(.how, .hint, .evidence, .conn-replace) > summary::after, .fold-action::after { transition: none; }
}

/* Text for VoiceOver only (shared). */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* An explanation opened under a "Por quê" (Central, Início). */
.why-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.625rem; margin-top: 0.5rem; }
.why-body > * { min-width: 0; }  /* a table inside scrolls in its own box, never widens the page */
.why-body > p { max-width: var(--measure); }
/* The Central's own rules: section "screen: central" at the end. */

/* (The Product page's rules are in "screen: produto" at the end.) */
.group > .how { margin-top: -0.125rem; padding: 0; }
.coupon-line strong { white-space: nowrap; }
.offer-more-body { display: grid; gap: 0.375rem; color: var(--label-2); line-height: 1.45; }
.offer-more-body p { max-width: 72ch; }
h2.fold-title { font-size: var(--text-lg); font-weight: 600; }

/* Leituras on the iPhone: one block per Reading, the PIX price always in view.
   line 1  Loja ............................ PIX (and its chips)
   line 2  Vendedor ...................... cartão
   line 3  Quando   estoque sim ........... custo
   A flex row that wraps: the PIX and cartão cells are a fixed 12rem column (even when empty)
   and the store and the seller take the rest, so each pair fills its line; on line 3 no cell breaks inside, and when the three do not fit
   (a larger Text Size, "esgotado", the "voltou" chip) the cost moves to a line of its own. */
@media (max-width: 760px) {
  .table-wrap:has(> .readings-table) { overflow-x: visible; }
  .readings-table, .readings-table tbody { display: block; }
  .readings-table thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%);
  }
  .readings-table tr {
    display: flex; flex-wrap: wrap; align-items: baseline;
    gap: 0.125rem 0.75rem; padding: 0.75rem 1rem;
  }
  .readings-table tbody tr + tr { border-top: 1px solid var(--separator); }
  .readings-table tbody tr + tr td { border-top: 0; }
  .readings-table td { padding: 0; white-space: normal; }
  .readings-table td.cell-clip { max-width: none; overflow-wrap: anywhere; }
  .readings-table .r-store { order: 1; flex: 1 1 calc(100% - 13rem); min-width: 0; font-size: var(--text-md); font-weight: 600; }
  .readings-table .r-pix {
    order: 2; flex: 0 0 12rem; min-width: 0;
    display: flex; flex-wrap: wrap; justify-content: flex-end;
    align-items: center; gap: 0.25rem 0.375rem; font-size: var(--text-md); font-weight: 600;
  }
  .readings-table .r-pix .chip { white-space: normal; text-align: right; margin: 0; font-weight: 600; }
  .readings-table .r-seller { order: 3; flex: 1 1 calc(100% - 13rem); min-width: 0; }
  .readings-table .r-card { order: 4; flex: 0 0 12rem; min-width: 0; text-align: right; }
  .readings-table .r-when { order: 5; }
  .readings-table .r-stock { order: 6; }
  .readings-table .r-cost { order: 7; margin-left: auto; }
  .readings-table :is(.r-card, .r-when, .r-stock, .r-cost) { color: var(--label-2); white-space: nowrap; }
  .readings-table .r-card.is-empty { visibility: hidden; }
  .readings-table :is(.r-card, .r-stock, .r-cost)::before { content: attr(data-label) " "; }
}

.paste-form .btn { white-space: nowrap; flex: none; }
.analyses-head { margin: 0.5rem 0 0; padding: 0; font-size: var(--text-md); color: var(--label); }
@media (max-width: 760px) {
}

/* Novo produto: "Sem variação" is a row like the radios (label left, box right). */
.row.choice { cursor: pointer; flex-wrap: nowrap; }
.row.choice > .row-label { flex: 1 1 auto; min-width: 0; }
.choice input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0 0.5rem 0 0;
  border-radius: 6px; border: 2px solid var(--label-2); background: transparent;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
  cursor: pointer;
}
.choice input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.choice input[type="checkbox"]:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }

/* ── Older Store pieces still in use (the removed-Store answer, meta lines, the relearn
   ladder); the Lojas screen's own rules are in "screen: lojas". */
.store-row { scroll-margin-top: calc(var(--banner-h) + 1rem); min-width: 0; }
.store-meta { color: var(--label-2); margin: 0; }
.mini-note { font-weight: 400; color: var(--label-2); }
.mini-note::before { content: "· "; }
.search-relearn .search-ladder-actions { margin-top: 0.5rem; }
.store-row > .notice { margin: 0 1.25rem 1rem; animation: enter 180ms var(--ease-out) both; }
.store-row.store-removed { margin: 0; border-radius: 0; }

@media (max-width: 960px) {
  .store-row > .notice { margin: 0 1rem 1rem; }
}

/* ═════ 5. SCREENS ═══════════════════════════════════════════════════════
   One section per screen. A screen's own rules go ONLY between its two markers; shared
   pieces stay in section 3. */

/* ===== screen: inicio ===== */
/* Início (templates/inicio.html) and Mais (templates/mais.html). */
.home-kpis { margin-bottom: 0.5rem; }
/* Wide Mac: the Lojas | Radar pair gets the room its two sublabels need. */
@media (min-width: 1101px) {
  .home-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); }
}
/* The strip shows at most SHOW_PRODUCTS (5) tiles: auto-fit lets them share the whole
   row (no empty tracks on a wide screen); 5 per row from 1440 up. */
.home-products {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1.25rem;
  list-style: none; margin: 0; padding: 0;
}
.home-products:has(> li:only-child, > li:nth-child(2):last-child) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.pcard {
  display: flex; flex-direction: column; min-width: 0;
  padding: 0.625rem 0.625rem 1rem; border-radius: 20px; background: var(--surface-1);
}
.pcard-text { display: flex; flex-direction: column; gap: 0.375rem; margin-top: 0.375rem; color: var(--label); text-decoration: none; min-width: 0; }
.pcard-name {
  margin: 0.5rem 0.25rem 0; min-height: 2.7em; font-size: var(--text-row); line-height: 1.35; font-weight: 600;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  overflow-wrap: anywhere;
}
.pcard-price { margin: 0 0.25rem; font-size: var(--text-xl); line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.pcard-store { margin: 0 0.25rem; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); overflow-wrap: anywhere; }
.pcard-status { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; margin: 0.25rem 0.25rem 0; }
.pcard-gap { font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .pcard-text:hover .pcard-name { color: var(--accent-text-hover); } }
.home-note { margin: 0.75rem 0 0; font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); max-width: var(--measure); }
/* "Maiores quedas (7 dias)": a compact table of grid rows (each row is one link). */
.drops { background: var(--surface-1); border-radius: var(--radius); overflow-x: auto; overscroll-behavior-x: contain; }
.drops-head, .drop-row {
  display: grid; grid-template-columns: minmax(11rem, 1fr) 5.25rem 5.75rem 9rem; align-items: center;
  min-width: 32rem;
}
.drops-head { border-bottom: 1px solid var(--separator); }
.drops-head > span {
  padding: 0.75rem 1rem; font-size: var(--text-caption); font-weight: 600; letter-spacing: 0.01em;
  color: var(--label-2); white-space: nowrap;
}
.drops-head > span:nth-child(2) { padding-inline: 0.5rem; }
.drops-head > span:nth-child(3), .drop-row > .drop-pct { padding-inline: 0.5rem; }
.drops-head > .num, .drop-row > .num { text-align: right; }
.drop-row {
  min-height: 3.5rem; color: var(--label); text-decoration: none; background: var(--surface-1);
  font-size: var(--text-md); line-height: 1.38; font-variant-numeric: tabular-nums;
  transition: background-color 140ms var(--ease-out);
}
.drop-row + .drop-row { border-top: 1px solid var(--separator-soft); }
.drop-row:active { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .drop-row:hover { background: var(--surface-1-hover); } }
.drop-row > span { padding: 0.75rem 1rem; min-width: 0; }
.drop-row > .drop-spark { padding-inline: 0.5rem; }
.drop-name { display: flex; align-items: center; gap: 0.875rem; }
.drop-name strong {
  font-size: var(--text-row); line-height: 1.35; font-weight: 600; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.drop-row small { display: block; margin-top: 0.125rem; font-size: var(--text-sm); color: var(--label-2); overflow-wrap: anywhere; }
.drop-row .num b { display: block; font-weight: 600; white-space: nowrap; }
.home-empty { padding: 1.5rem 1.375rem; border-radius: var(--radius); background: var(--surface-1); }
.home-empty-title { font-size: var(--text-body); line-height: 1.45; font-weight: 600; }
.home-empty p + p { margin-top: 0.375rem; font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); max-width: var(--measure); }
.home-segs { margin: 0 0 0.875rem; }
/* "Precisa de você": up to two cards, the most severe first. */
.needs { display: flex; flex-direction: column; gap: 0.75rem; }
.need {
  padding: 1.125rem 1.25rem; border-radius: var(--radius); background: var(--surface-1);
  border: 1px solid transparent; min-width: 0;
}
.need.sev-red { border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.need.sev-orange { border-color: color-mix(in srgb, var(--orange) 30%, transparent); }
.need-top { display: flex; align-items: center; gap: 0.875rem; }
.need-top-text { flex: 1 1 auto; min-width: 0; }
.need-chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.need-when { font-size: var(--text-sm); color: var(--label-2); white-space: nowrap; }
.need-product {
  margin-top: 0.375rem; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.need-title { margin: 0.625rem 0 0; font-size: var(--text-lg); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: anywhere; }
.need-what { margin-top: 0.375rem; font-size: var(--text-md); line-height: 1.5; max-width: 72ch; }
.need-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.875rem; }
.need-why > summary {
  display: inline-flex; align-items: center; padding: 0.4375rem 0.25rem;
  color: var(--accent-text); font-size: var(--text-md); font-weight: 600; cursor: pointer;
  list-style: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.need-why > summary::-webkit-details-marker { display: none; }
.need-why > summary::after {
  content: ""; display: inline-block; width: 0.42em; height: 0.42em; margin-left: 0.5em;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-0.12em) rotate(-45deg); transition: transform 160ms var(--ease-out);
}
.need-why[open] > summary::after { transform: translateY(-0.3em) rotate(45deg); }
.need-why-body {
  margin-top: 0.5rem; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--fill);
  font-size: var(--text-sm); line-height: 1.5; max-width: 72ch; overflow-wrap: anywhere;
}
.need-why { min-width: 0; }
.need-why[open] { flex-basis: 100%; order: 1; }
/* Saúde do sistema: a small title per group, then its grouped list. */
.health-group + .health-group { margin-top: 1.5rem; }
.health-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 0.5rem; padding: 0 0.25rem; }
.health-head h3 { margin: 0; font-size: var(--text-row); line-height: 1.3; font-weight: 600; }
.health-head h3 small { font-size: var(--text-sm); font-weight: 500; color: var(--label-2); }
.health-head .see-all { font-size: var(--text-sm); }
.health .list-trail { gap: 0.625rem; }
.health .on-narrow { display: none; }
.drop-row .drop-now-inline { display: none; }
/* Mais: the Sair row is red, with a line under its group. */
.more-out .list-title, .more-out .list-icon { color: var(--red-text); }
.more-out .list-icon { background: color-mix(in srgb, var(--red) 16%, transparent); }
.more-out .list-title { font-weight: 600; }
.more-note { margin: 0.5rem 1rem 0; font-size: var(--text-sm); line-height: 1.4; color: var(--label-2); }
/* Mais on the Mac: the four screens as tiles (2 a row, 4 on a wide screen) rather than
   rows stretched across the whole width; Sair keeps one tile's width. */
@media (min-width: 761px) {
  .more-list-main {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
    background: none; border-radius: 0; overflow: visible;
  }
  .more-list-main > .list-row { background: var(--surface-1); border-radius: var(--radius-tile); min-height: 5rem; }
  .more-list-main > .list-row + .list-row > .list-body { border-top: 0; }
  .more-signout { width: calc((100% - 1rem) / 2); }
}
@media (min-width: 1600px) {
  .more-list-main { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .more-signout { width: calc((100% - 3rem) / 4); }
}
@media (max-width: 760px) {
  .home-products {
    display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    margin: 0 -1rem; padding: 0 1rem 4px; scroll-padding: 0 1rem; scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .home-products::-webkit-scrollbar { display: none; }
  .home-products > li { flex: 0 0 150px; scroll-snap-align: start; }
  .pcard { padding: 0; background: transparent; border-radius: 0; }
  .pcard-name { margin: 0.375rem 0 0; min-height: 2.6em; font-size: var(--text-sm); }
  .pcard-price, .pcard-store, .pcard-status { margin-inline: 0; }
  .pcard-price { font-size: var(--text-body); }
  .drops { overflow: hidden; }
  .drops-head { display: none; }
  .drops-head, .drop-row { min-width: 0; }
  .drop-row {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name spark" "name pct";
    padding: 0.625rem 1rem; column-gap: 0.75rem;
  }
  .drop-row > span { padding: 0; }
  .drop-row > .drop-name { grid-area: name; }
  .drop-row > .drop-spark { grid-area: spark; justify-self: end; padding: 0; }
  .drop-row > .drop-pct { grid-area: pct; }
  .drop-row > .drop-now { display: none; }
  .drop-row .drop-now-inline { display: block; }
  .need { padding: 1rem; }
  .need-actions .btn { flex: 1 1 auto; }
  .need-why > summary { min-height: 44px; }
  .home-segs { display: flex; }
  .home-cta, .home-sec-drops .sec-head .see-all { display: none; }  /* the tab bar and the tiles lead there */
  .health .on-narrow { display: block; margin-top: 0.25rem; }
  .health .on-wide { display: none; }
  /* One column, in the order of the iPhone design: need → changes → Products → health. */
  .home-body { display: flex; flex-direction: column; }
  .home-body .dash, .home-body .dash-main, .home-body .dash-aside { display: contents; }
  .home-sec-need { order: 1; }
  .home-sec-drops { order: 2; }
  .home-sec-products { order: 3; }
  .home-sec-health { order: 4; }
}
@media (prefers-reduced-motion: reduce) { .need-why > summary::after { transition: none; } }
/* ===== end screen: inicio ===== */

/* ===== screen: central ===== */
/* The Central (central.html, _central_list.html, _central_counts.html). On the Mac:
   "Precisa de você" and "Anúncios achados" in the main column, "Para saber" beside them;
   a filter (radios styled as a segmented control, outside #central-list so an action's
   answer keeps the chosen view) shows one block at a time. On the iPhone they stack. */
.central-header { align-items: flex-end; }
.central-summary .sep { color: var(--label-2); }
.central-filter { border: 0; margin: 0; padding: 0; min-width: 0; }
.central-filter .seg { cursor: pointer; position: relative; }
.central:has(.central-list > .empty) .central-filter { display: none; }

/* The filter: one block at a time (the others hidden), and one column. */
.central:has(#cf-need:checked) .central-section:not([data-block="need"]),
.central:has(#cf-found:checked) .central-section:not([data-block="found"]),
.central:has(#cf-fyi:checked) .central-section:not([data-block="fyi"]) { display: none; }
.central-none { display: none; }
.central:has(#cf-need:checked) .central-none[data-for="need"],
.central:has(#cf-found:checked) .central-none[data-for="found"],
.central:has(#cf-fyi:checked) .central-none[data-for="fyi"] {
  display: block; padding: 1.25rem 1.375rem; border-radius: var(--radius);
  background: var(--surface-1); color: var(--label-2); font-size: var(--text-md);
}
.central:has(:is(#cf-need, #cf-found, #cf-fyi):checked) .central-grid.is-split { display: block; }
/* "Para saber" alone (its filter, or nothing else waiting): the notices run in columns on a
   wide screen instead of one long row across the whole width. */
@media (min-width: 1101px) {
  :is(.central:has(#cf-fyi:checked) .central-aside, .central-grid:not(.is-split) > .central-aside) .fyi-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
    margin-bottom: -1px;
  }
  :is(.central:has(#cf-fyi:checked) .central-aside, .central-grid:not(.is-split) > .central-aside) .fyi-item {
    border-bottom: 1px solid var(--separator); min-width: 0;
  }
  :is(.central:has(#cf-fyi:checked) .central-aside, .central-grid:not(.is-split) > .central-aside) .fyi-item + .fyi-item::before { display: none; }
  :is(.central:has(#cf-fyi:checked) .central-aside, .central-grid:not(.is-split) > .central-aside) .fyi-item:has(> .fyi-detail[open]) { grid-column: 1 / -1; }
}

.central-grid.is-split {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(20rem, 1fr);
  gap: 2.5rem 2rem; align-items: start;
}
.central-main { display: grid; gap: 2.5rem; min-width: 0; }
.central-section { min-width: 0; }
.central-section > .sec-head { margin-top: 0; }
.sec-count { flex: none; font-size: var(--text-sm); color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.central-section > .how { margin: -0.25rem 0 1rem; }
.central-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.central-cards > * { min-width: 0; }
:is(.central-item, .cand-row, .fyi-item):target { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ── Precisa de você: one tile per item; the tone's edge reads while scrolling ── */
.central-item { display: block; padding: 1.25rem 1.375rem; border-radius: var(--radius-tile); }
.central-item.sev-red { border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.central-item.sev-orange { border-color: color-mix(in srgb, var(--orange) 35%, transparent); }
.central-item.sev-yellow { border-color: color-mix(in srgb, var(--yellow) 30%, transparent); }
.central-item.sev-blue { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.central-item.sev-green { border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.ci-head { display: flex; align-items: center; gap: 0.875rem; margin: 0 0 0.75rem; }
.ci-head-text { flex: 1 1 auto; min-width: 0; }
.ci-chipline { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.ci-when { font-size: var(--text-sm); color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ci-product {
  margin: 0.375rem 0 0; font-size: var(--text-sm); line-height: 1.33; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.ci-product a { color: var(--label-2); text-decoration: none; }
.central-item > .card-title {
  margin: 0 0 1rem; font-size: var(--text-lg); line-height: 1.3; font-weight: 600;
  letter-spacing: -0.01em; overflow-wrap: anywhere; text-wrap: balance;
}
.ci-explain { margin: 0; display: flex; flex-direction: column; gap: 0.875rem; }
/* A wide card puts "O que é" and "O que fazer" side by side instead of leaving its right
   third empty; a narrower one stacks them. */
.central-item > .ci-explain {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 0.875rem 2.5rem;
}
.ci-explain dt { margin: 0 0 0.25rem; font-size: var(--text-sm); line-height: 1.33; font-weight: 600; color: var(--label-2); }
.ci-explain dd { margin: 0; font-size: var(--text-body); line-height: 1.5; max-width: var(--measure); overflow-wrap: anywhere; }
.ci-explain.is-boxed {
  gap: 0.625rem; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--fill);
  font-size: var(--text-sm); line-height: 1.5; max-width: var(--measure);
}
.ci-explain.is-boxed dt { margin: 0; color: var(--gray-text); }
.ci-explain.is-boxed dd { font-size: var(--text-sm); }
.ci-folds { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.25rem 1.5rem; margin: 0.875rem 0 0; }
.ci-folds > details { min-width: 0; }
.ci-folds > details[open] { flex: 1 1 100%; }
.ci-folds > details > summary,
.more-actions > summary,
.cand-more > summary { display: inline-flex; align-items: center; padding-block: 0.25rem; font-size: var(--text-sm); font-weight: 600; }
.ci-folds .why-body { padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--fill); font-size: var(--text-sm); }
/* An opened table of attempts scrolls inside its box rather than widening the card. */
:is(.ci-folds, .cand-more) .why-body { grid-template-columns: minmax(0, 1fr); }
:is(.ci-folds, .cand-more) .why-body > * { min-width: 0; }
.ci-actions {
  justify-content: flex-end; align-items: center; margin: 1.25rem 0 0; padding-top: 1rem;
  border-top: 1px solid var(--separator-soft);
}
:is(.ci-actions, .cand-actions) > .btn.danger { margin-right: auto; }
.more-actions { margin: 0.75rem 0 0; }
.more-actions > p { margin: 0.5rem 0 0.75rem; max-width: var(--measure); }
.more-list { flex-direction: column; align-items: flex-start; }
.more-list .btn { text-align: left; }

/* ── Anúncios achados: one tile per Product, one comparable row per Listing ── */
.cand-group { display: block; padding: 0; overflow: hidden; border-radius: var(--radius-tile); }
.cand-group-head { display: flex; align-items: center; gap: 1.125rem; padding: 1.125rem 1.375rem; }
.cand-group-text { flex: 1 1 auto; min-width: 0; }
.cand-group-head .card-title { font-size: var(--text-lg); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; text-wrap: balance; }
.cand-group-head .card-title a { color: var(--label); text-decoration: none; }
.cand-group-sub { margin: 0.25rem 0 0; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); }
.cand-pick { font-weight: 600; color: var(--accent-text); text-decoration: none; }
.cand-rows { list-style: none; margin: 0; padding: 0; }
.cand-row { padding: 1rem 1.375rem; border-top: 1px solid var(--separator); }
.cand-main {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "store price" "listing note" "seller score";
  gap: 0.125rem 1.5rem; align-items: start;
}
.cand-main > p { margin: 0; min-width: 0; }
.cand-store { grid-area: store; font-size: var(--text-body); line-height: 1.45; overflow-wrap: anywhere; }
.cand-store strong { font-weight: 600; }
.cand-store .chip { margin-left: 0.25rem; vertical-align: 1px; }
.cand-price { grid-area: price; justify-self: end; text-align: right; }
.cand-amount { font-size: var(--text-xl); line-height: 1.27; font-weight: 700; letter-spacing: -0.015em; }
.cand-note { grid-area: note; justify-self: end; text-align: right; font-size: var(--text-sm); color: var(--label-2); }
.cand-note.cand-amount { font-size: var(--text-md); font-weight: 600; letter-spacing: 0; }
.cand-listing { grid-area: listing; font-size: var(--text-md); line-height: 1.4; overflow-wrap: anywhere; }
.cand-main > .cand-seller { margin-top: 0.5rem; }
.cand-main > .cand-score { margin-top: 0.375rem; }
.cand-seller {
  grid-area: seller; display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.375rem 0.5rem; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); overflow-wrap: anywhere;
}
.cand-score { grid-area: score; justify-self: end; align-self: end; }
.cand-score b { font-variant-numeric: tabular-nums; }
.cand-meter {
  display: inline-block; width: 3rem; height: 5px; border-radius: 999px;
  background: var(--fill-strong); overflow: hidden;
}
.cand-meter > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.cand-actions { justify-content: flex-end; align-items: center; margin: 1rem 0 0; }
.btn .ext { flex: none; }
.cand-more { margin: 0.5rem 0 0; }
.cand-more .why-body { gap: 0.5rem; }
.why-list { margin: 0; padding-left: 1.125rem; display: grid; gap: 0.375rem; }
.why-list strong { font-weight: 600; }

/* ── Para saber: one row per notice (an inset list); the details open in place ── */
.fyi-card { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; }
.fyi-list { list-style: none; margin: 0; padding: 0; }
.fyi-item + .fyi-item::before { content: ""; display: block; height: 1px; margin-left: 1rem; background: var(--separator); }
.fyi-detail > summary {
  display: flex; align-items: center; gap: 0.75rem; min-height: 3.5rem; padding: 0.75rem 1rem;
  cursor: pointer; list-style: none; background: var(--surface-1);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: background-color 140ms var(--ease-out);
}
.fyi-detail > summary::-webkit-details-marker { display: none; }
.fyi-sum { flex: 1 1 auto; min-width: 0; }
.fyi-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.375rem; }
.fyi-title { display: block; font-size: var(--text-row); line-height: 1.4; overflow-wrap: anywhere; }
.fyi-detail > summary > .chev { transition: transform 200ms var(--ease-out); }
.fyi-detail[open] > summary > .chev { transform: rotate(90deg); }
.fyi-body { display: grid; gap: 0.75rem; padding: 0 1rem 1rem; }
.fyi-detail[open] > .fyi-body { animation: enter 180ms var(--ease-out) both; }
.fyi-actions { justify-content: flex-end; margin: 0; }
.fyi-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.875rem;
  padding: 1rem; border-top: 1px solid var(--separator);
}
.fyi-foot-note { font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); }
@media (hover: hover) and (pointer: fine) {
  .fyi-detail > summary:hover { background: var(--surface-1-hover); }
  .ci-product a:hover, .cand-group-head .card-title a:hover { color: var(--accent-text); }
}
@media (prefers-reduced-motion: reduce) {
  .fyi-detail > summary > .chev { transition: none; }
}
.central-recent { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.recent-head { font-size: var(--text-md); font-weight: 600; color: var(--label-2); }
.central-item.resolved { display: grid; gap: 0.375rem; padding: 1rem 1.25rem; border-radius: var(--radius); }
.central-item.resolved .card-title { font-size: var(--text-body); font-weight: 600; }

@media (max-width: 1100px) {
  .central-grid.is-split { grid-template-columns: minmax(0, 1fr); }
}

/* ── the Central on the iPhone ── */
@media (max-width: 760px) {
  .central-header { align-items: stretch; }
  .page-header .central-summary { font-size: var(--text-sm); line-height: 1.4; }
  .central-filter { flex: 1 1 100%; }
  /* Two by two, so every segment keeps its whole label and its count. */
  .central-filter .seg-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .central-filter .seg { min-height: 44px; font-size: var(--text-md); }
  .central-section > .sec-head { margin: 0 0 0.75rem; }
  .central-main { gap: 2rem; }
  .central-grid.is-split { gap: 2rem; }
  .central-cards { gap: 0.75rem; }
  .central-item { padding: 1rem; }
  .ci-head { gap: 0.75rem; margin-bottom: 0.625rem; }
  .ci-explain { gap: 0.75rem; }
  .ci-explain dd { font-size: var(--text-row); }
  .ci-actions { justify-content: flex-start; margin-top: 1rem; padding-top: 0.75rem; }
  .ci-actions > .btn { flex: 1 1 auto; }
  :is(.ci-actions, .cand-actions) > .btn.danger { margin-right: 0; }
  .cand-group-head { gap: 0.75rem; padding: 1rem; }
  .cand-group-head .photo-wrap { width: 4rem; }
  .cand-group-head .photo-cap { display: none; }
  .cand-group-head .card-title { font-size: var(--text-body); }
  .cand-row { padding: 0.75rem 1rem 1rem; }
  .cand-main { grid-template-areas: "store price" "listing note" "seller seller" "score score"; column-gap: 0.75rem; }
  .cand-store, .cand-amount { font-size: var(--text-body); }
  .cand-listing { font-size: var(--text-sm); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .cand-score { justify-self: start; }
  .cand-actions { margin-top: 0.75rem; }
  .cand-actions > .btn { flex: 1 1 0; min-width: 0; padding-inline: 0.5rem; font-size: var(--text-sm); }
  .cand-actions > .btn.primary { flex-basis: 100%; order: -1; font-size: var(--text-md); }
  .cand-actions .ext { display: none; }
  .fyi-foot { flex-direction: column; align-items: stretch; text-align: center; }
}
/* ===== end screen: central ===== */

/* ===== screen: produtos ===== */
/* Produtos (catalog), Novo produto (entry + confirm) and Rejeitados.
   Catalog: large photo cards (ONLY the approved photo, else "Sem foto" + "Escolher foto")
   in an auto-fill grid, or a table (Lista); a search box and two segmented controls. */
.pl-analyses .analyses { margin: 0; }
.pl-analyses:has(.analysis) { margin: 0 0 1.5rem; }
.pl-tools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem; margin: 0 0 1.25rem;
}
.pl-search { position: relative; flex: 0 1 30rem; min-width: 14rem; }
.pl-search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--label-2); pointer-events: none; }
.pl-search input {
  min-height: 2.5rem; padding: 0 0.75rem 0 2.5rem; font-size: var(--text-row);
  background: var(--surface-1); border-radius: var(--radius-btn);
}
.pl-segs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.pl-view .seg { gap: 0.375rem; }

/* grid of cards */
.pl-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1.5rem;
}
.pcard {
  display: flex; flex-direction: column; min-width: 0;
  padding: 0.625rem 0.625rem 1rem; border-radius: 20px; background: var(--surface-1);
  transition: background-color 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .pcard:hover { background: var(--surface-1-hover); } }
.pcard-photo { position: relative; display: block; }
.pcard-paused { position: absolute; top: 0.625rem; left: 0.625rem; background: var(--surface-1); }
.photo-swap { display: none; }
.pcard-photo:has(.is-broken) .photo-swap, .pl-tr:has(.is-broken) .photo-swap { display: inline-flex; }
.pl-tr:has(.is-broken) .pl-pick.photo-swap { display: inline-flex; }
.pcard-body {
  display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0;
  padding: 0.875rem 0.375rem 0; color: var(--label); text-decoration: none;
}
.pcard-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em; font-size: var(--text-row); line-height: 1.35; font-weight: 600; letter-spacing: -0.005em;
}
.pcard-attrs {
  display: block; margin-top: 0.25rem; font-size: var(--text-caption); line-height: 1.3; color: var(--label-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pcard-price { display: block; margin-top: 0.75rem; }
.pl-price { display: block; font-weight: 700; letter-spacing: -0.005em; font-variant-numeric: tabular-nums; }
.pcard-price .pl-price { font-size: 1.625rem; line-height: 1.15; letter-spacing: -0.02em; }
.pl-price.is-muted { color: var(--label-2); font-weight: 600; }
.pcard-price .pl-price.is-muted { font-size: var(--text-lg); line-height: 1.5; letter-spacing: 0; }
.pl-note { display: block; font-size: var(--text-sm); font-weight: 400; line-height: 1.33; color: var(--label-2); overflow-wrap: anywhere; }
.pl-flags { display: flex; flex-direction: column; gap: 0.125rem; margin-top: 0.25rem; font-size: var(--text-sm); font-weight: 400; line-height: 1.33; color: var(--label); }
.pcard-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; margin-top: 0.75rem; }
.pcard-target { font-size: var(--text-sm); color: var(--label-2); white-space: nowrap; }
.chip-short, .pl-only-phone { display: none; }
.pcard-trend {
  display: flex; align-items: center; gap: 0.625rem; min-height: 24px; margin-top: 0.625rem;
  font-size: var(--text-sm); color: var(--label-2); white-space: nowrap;
}
.pl-change { font-weight: 600; }
.pcard-foot {
  display: flex; justify-content: space-between; gap: 0.75rem;
  margin-top: auto; padding-top: 0.625rem; border-top: 1px solid var(--separator-soft);
  font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); font-variant-numeric: tabular-nums;
}
.pcard-trend + .pcard-foot { margin-top: 0.75rem; }
.pcard .photo-pick { z-index: 1; }

/* list (a table on the Mac) */
/* One column grid for the whole table; every row is a subgrid of it, so a column's edge
   (e.g. "Melhor preço no Pix") lines up from row to row even when a cell sizes to its text. */
.pl-table {
  display: grid;
  grid-template-columns: minmax(15rem, 2.6fr) minmax(9.5rem, 1.3fr) max-content minmax(8rem, 1fr) 4.5rem max-content 7rem;
  background: var(--surface-1); border-radius: var(--radius); overflow: hidden; font-size: var(--text-md); line-height: 1.38; font-variant-numeric: tabular-nums;
}
.pl-tr {
  display: grid; align-items: center; grid-column: 1 / -1;
  grid-template-columns: subgrid;
  min-height: 6rem;
}
.pl-tr + .pl-tr { border-top: 1px solid var(--separator-soft); }
.pl-tr > [role="cell"], .pl-tr > [role="columnheader"] { padding: 0.875rem 1rem; min-width: 0; }
.pl-tr .num { text-align: right; }
.pl-thead { min-height: 0; border-bottom: 1px solid var(--separator); font-size: var(--text-caption); font-weight: 600; color: var(--label-2); letter-spacing: 0.01em; white-space: nowrap; }
.pl-thead + .pl-tr { border-top: 0; }
.pl-thead > [role="columnheader"] { padding-block: 0.75rem; }
.pl-prod { display: flex; align-items: center; gap: 1rem; }
.pl-prod-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.pl-name { color: var(--label); text-decoration: none; font-weight: 600; font-size: var(--text-row); line-height: 1.35; overflow-wrap: anywhere; }
.pl-attrs { margin-top: 0.125rem; color: var(--label-2); font-size: var(--text-sm); line-height: 1.33; }
.pl-pick { margin-top: 0.5rem; gap: 0.375rem; }
.pl-cell-price .pl-price { font-size: var(--text-body); white-space: nowrap; }
.pl-cell-price .pl-flags { align-items: flex-end; }
.pl-cell-target { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; white-space: nowrap; }
.pl-cell-target .chip-short { display: none; }
.pl-cell-trend { display: flex; align-items: center; gap: 0.625rem; font-size: var(--text-sm); color: var(--label-2); white-space: nowrap; }
.pl-cell-offers { font-size: var(--text-row); }
.pl-cell-freq { white-space: nowrap; }
.pl-sub { display: block; color: var(--label-2); font-size: var(--text-sm); }
.pl-only-narrow { display: none; }
.pl-tr > .pl-cell-go { display: flex; align-items: center; justify-content: flex-end; gap: 0.125rem; padding-inline: 0.25rem 0.5rem; }
.pl-cell-go > a { display: inline-flex; padding: 0.5rem 0.25rem; }
@media (hover: hover) and (pointer: fine) {
  .pl-tr:not(.pl-thead):hover { background: rgba(255, 255, 255, 0.04); }
  .pl-name:hover { color: var(--accent-text-hover); }
}
.pl-foot { margin-top: 1.5rem; font-size: var(--text-sm); line-height: 1.5; color: var(--label-2); max-width: var(--measure); }
.pl-foot a { font-weight: 600; text-decoration: none; }
.empty .btn { margin-top: 0.5rem; }
.empty-icon .icon { width: 24px; height: 24px; }


/* ── ••• per product (2026-11-19): a glass circle on the photo's top-right corner (Grade;
   dark glass, so it shows on a white approved photo too) or a grey circle at the end of
   the row (Lista). The menu is a popover placed by app.js; the confirmation is a modal
   <dialog> (_delete_dialog.html): an alert on the Mac, an action sheet on the iPhone. ── */
.pl-more, .pl-eye {
  appearance: none; border: 0; margin: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: transparent; color: var(--label);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.pl-more-dot {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(44, 44, 46, 0.82); color: var(--label);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: background-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.pcard-photo:has(.has-photo) .pl-more-dot { background: rgba(60, 60, 64, 0.78); }
.pl-more:active .pl-more-dot, .pl-eye:not(.is-off):active .pl-more-dot { transform: scale(0.92); }
.pl-more[aria-expanded="true"] .pl-more-dot { background: var(--surface-3); }
.pl-more:focus-visible, .pl-eye:focus-visible { outline: none; }
.pl-more:focus-visible .pl-more-dot, .pl-eye:focus-visible .pl-more-dot { outline: 2px solid var(--accent-text); outline-offset: 2px; }
/* the eye (Q59) sits left of the •••: a link to the best price's store page, in a new tab;
   with no price now, a dimmed, inert button whose tooltip says why */
.pl-acts { display: flex; align-items: center; gap: 6px; }
.pcard-photo .pl-acts { position: absolute; top: 8px; right: 8px; z-index: 2; }
.pl-eye { text-decoration: none; }
.pl-eye.is-off { cursor: default; }
.pl-eye.is-off .pl-more-dot { opacity: 0.45; }
.pl-tr .pl-more-dot { background: var(--fill); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.pl-tr .pl-more[aria-expanded="true"] .pl-more-dot { background: var(--surface-3); }

.pl-menu {
  position: fixed; inset: auto; margin: 0;
  width: 15rem; max-width: calc(100% - 1rem); padding: 5px; border: 0; border-radius: 12px;
  color: var(--label); background: rgba(44, 44, 46, 0.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  transform-origin: top right;
}
.pl-menu.is-up { transform-origin: bottom right; }
.pl-menu:popover-open { animation: toast-in 160ms var(--ease-out) both; }
.pl-menu-item {
  appearance: none; border: 0; margin: 0; cursor: pointer; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 2.25rem; padding: 0.4375rem 0.625rem; border-radius: 8px;
  font: inherit; font-size: var(--text-md); line-height: 1.25; text-align: left;
  color: var(--label); background: transparent;
  transition: background-color 120ms var(--ease-out);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pl-menu-item.is-danger { color: var(--red-text); }
.pl-menu-item .icon { flex: none; }
.pl-menu-item:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.pl-menu-item:active { background: rgba(255, 255, 255, 0.12); }

.pl-confirm {
  width: min(22rem, calc(100% - 2rem)); max-width: none; max-height: calc(100% - 2rem); overflow: auto;
  margin: auto; padding: 1.25rem 1.125rem 1rem; border: 0; border-radius: var(--radius-tile);
  background: #232325; color: var(--label); text-align: center;  /* the macOS alert's grey */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
}
.pl-confirm[open] {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "msg msg" "cancel go"; gap: 0.5rem;
  animation: toast-in 200ms var(--ease-out) both;
}
.pl-confirm.is-note[open] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "msg" "cancel"; }
.pl-confirm::backdrop { background: rgba(0, 0, 0, 0.55); }
html:has(.pl-confirm[open]) { overflow: hidden; }
.pl-confirm-msg { grid-area: msg; min-width: 0; margin-bottom: 0.375rem; }
.pl-confirm-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 0.625rem;
  border-radius: 12px; color: var(--red); background: color-mix(in srgb, var(--red) 16%, transparent);
}
.pl-confirm h2 { margin: 0 0 0.5rem; font-size: var(--text-row); line-height: 1.3; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.pl-confirm-text, .pl-confirm-keep { text-align: left; font-size: var(--text-sm); line-height: 1.45; }
.pl-confirm-text p { margin: 0 0 0.375rem; color: var(--label-2); }
.pl-confirm-text ul { margin: 0 0 0.625rem; padding-left: 1.125rem; color: var(--label); }
.pl-confirm .pl-confirm-keep { margin: 0; color: var(--label-2); }
.pl-confirm-cancel { grid-area: cancel; margin: 0; }
.pl-confirm-go { grid-area: go; }
.pl-confirm-cancel .btn, .pl-confirm-go .btn { width: 100%; }
.pl-confirm-cancel .btn { background: var(--surface-3); text-decoration: none; }
.pl-confirm-phone { display: none; }
@media (hover: hover) and (pointer: fine) {
  .pcard-photo .pl-more:hover .pl-more-dot { background: rgba(72, 72, 74, 0.92); }
  .pl-tr .pl-more:hover .pl-more-dot { background: var(--fill-strong); }
  .pcard-photo .pl-eye:not(.is-off):hover .pl-more-dot { background: rgba(72, 72, 74, 0.92); }
  .pl-tr .pl-eye:not(.is-off):hover .pl-more-dot { background: var(--fill-strong); }
  .pl-menu-item:hover { background: rgba(255, 255, 255, 0.08); }
  .pl-confirm-cancel .btn:hover { background: #48484a; }
}
@media (prefers-reduced-transparency: reduce) {
  .pl-more-dot, .pl-menu { background: var(--surface-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (pointer: coarse) {
  .pl-search input { min-height: 44px; }
  /* 44 px to tap; the circle drawn inside stays 32 px, in the same corner */
  .pl-more, .pl-eye { width: 44px; height: 44px; }
  .pl-acts { gap: 0; }
  .pcard-photo .pl-acts { top: 2px; right: 2px; }
  .pl-menu-item { min-height: 44px; }
}
@media (max-width: 1500px) {
  /* a mid Mac window: tighter cells, a smaller photo, and the 7-day label may go under its line */
  .pl-table { grid-template-columns: minmax(13rem, 2.6fr) minmax(9rem, 1.3fr) max-content minmax(6.5rem, 0.8fr) 3.5rem max-content 6.5rem; }
  .pl-tr > [role="cell"], .pl-tr > [role="columnheader"] { padding-inline: 0.625rem; }
  .pl-prod { gap: 0.75rem; }
  .pl-prod .photo-wrap { --ph-size: 56px !important; }
  .pl-prod .photo-cap { display: none; }
  .pl-cell-trend { flex-wrap: wrap; gap: 0.25rem 0.625rem; white-space: normal; }
}
@media (max-width: 1360px) {
  /* The table becomes a list: photo + name first, then the numbers in one wrapped line
     (below ~1050 px of content the seven columns squeeze the name into a narrow column). */
  .pl-table { display: block; }
  .pl-thead { display: none; }
  .pl-tr {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "prod prod" "price target" "trend offers" "freq freq";
    gap: 0.25rem 1rem; padding: 0.875rem 1rem; min-height: 0;
  }
  .pl-tr > [role="cell"] { padding: 0; }
  .pl-prod { grid-area: prod; margin-bottom: 0.5rem; }
  .pl-tr .pl-cell-price { grid-area: price; text-align: left; }
  .pl-cell-price .pl-flags { align-items: flex-start; }
  .pl-cell-target { grid-area: target; }
  .pl-tr .pl-cell-trend { flex-wrap: nowrap; white-space: nowrap; }
  .pl-cell-trend { grid-area: trend; }
  .pl-cell-offers { grid-area: offers; font-size: var(--text-sm); color: var(--label-2); }
  .pl-tr .pl-cell-freq { grid-area: freq; text-align: left; font-size: var(--text-sm); color: var(--label-2); }
  .pl-cell-freq .pl-sub { display: inline; }
  .pl-cell-freq .pl-sub::before { content: " · "; }
  .pl-only-narrow { display: inline; }
  /* the ••• stays, top right of the row; the chevron goes (the whole name is the link) */
  .pl-tr { position: relative; }
  .pl-tr > .pl-prod { padding-right: 5.75rem; }
  .pl-tr > .pl-cell-go { position: absolute; top: 0.625rem; right: 0.5rem; padding: 0; }
  .pl-cell-go > a { display: none; }
}
@media (max-width: 760px) {
  #produtos-head { position: relative; padding-top: 2.75rem; }
  #produtos-head .page-actions { position: absolute; top: -0.25rem; right: -0.5rem; }
  .btn.primary.pl-new { width: 44px; min-height: 44px; padding: 0; border-radius: 22px; background: transparent; color: var(--accent-text); }
  .pl-new .icon { width: 24px; height: 24px; }
  .pl-new-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pl-tools { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .pl-search { flex: none; min-width: 0; }
  .pl-search input { min-height: 44px; background: var(--fill); border-color: transparent; font-size: var(--text-row); }
  .pl-segs { flex-direction: column-reverse; align-items: stretch; }
  .pl-segs .seg-group { flex-wrap: nowrap; }
  .pl-segs .seg { flex: 1 1 auto; padding: 0 0.5rem; }
  .pl-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .pcard { padding: 0; border-radius: var(--radius); overflow: hidden; }
  .pcard .photo-tile { border-radius: 0; }
  .pcard-body { padding: 0.625rem 0.75rem 0.75rem; }
  .pcard-name { font-size: var(--text-md); line-height: 1.3; min-height: 2.6em; }
  .pcard-attrs { display: none; }
  .pcard-price { margin-top: 0.375rem; }
  .pcard-price .pl-price { font-size: var(--text-lg); line-height: 1.25; }
  .pcard-price .pl-price.is-muted { font-size: var(--text-md); }
  .pcard-price .pl-note { font-size: var(--text-caption); line-height: 1.3; }
  .pcard-price .pl-flags { font-size: var(--text-caption); }
  .pcard-chip { margin-top: auto; padding-top: 0.625rem; }
  .pcard-chip .chip-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pcard-chip .chip-short { display: inline-flex; }
  .pl-only-phone { display: inline; }
  .pcard-target { font-size: var(--text-caption); white-space: normal; }
  .pcard-trend { font-size: var(--text-caption); gap: 0.375rem; flex-wrap: wrap; white-space: normal; }
  .pcard-trend .spark { display: none; }
  .pcard-foot { flex-direction: column; gap: 0; border-top: 0; padding-top: 0.375rem; font-size: var(--text-caption); }
  .pcard-trend + .pcard-foot { margin-top: 0; }
  .pcard-paused { top: 8px; left: 8px; }
  .pl-prod .photo-wrap { --ph-size: 56px !important; }
  .pl-prod .photo-cap { display: none; }
  .pl-prod .photo-tile { border-radius: 10px; }
  /* the target and its chip get their own line under the price: side by side, a long
     chip ("Perto do alvo · 14,8% acima") ran over the price's last line */
  .pl-tr { grid-template-areas: "prod prod" "price price" "target target" "trend offers" "freq freq"; }
  .pl-cell-target { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0.375rem 0.625rem; margin-top: 0.25rem; }
  .pl-foot { margin-top: 1.25rem; }
  .pl-foot a { display: inline-flex; align-items: center; min-height: 44px; }

  /* the confirmation becomes an iOS action sheet: the message and the red action in one
     box, Cancelar in its own box below, rising from the bottom */
  .pl-confirm {
    inset: auto 0.5rem max(0.625rem, env(safe-area-inset-bottom)); width: auto; max-height: calc(100% - 1.5rem);
    margin: 0; padding: 0; border-radius: 0; background: transparent; box-shadow: none;
  }
  .pl-confirm[open] {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "msg" "go" "cancel"; gap: 0;
    animation: sheet-in 300ms var(--ease-out) both;
  }
  .pl-confirm.is-note[open] { grid-template-areas: "msg" "cancel"; }
  .pl-confirm-msg {
    margin: 0; padding: 0.875rem 1rem 0.75rem; background: var(--surface-2);
    border-radius: 14px 14px 0 0; border-bottom: 0.5px solid var(--separator);
  }
  .pl-confirm.is-note .pl-confirm-msg { border-radius: 14px; border-bottom: 0; }
  .pl-confirm-icon, .pl-confirm-mac { display: none; }
  p.pl-confirm-phone { display: block; }
  span.pl-confirm-phone { display: inline; }
  .pl-confirm h2 { margin-bottom: 0.375rem; font-size: var(--text-caption); font-weight: 600; color: var(--label-2); }
  .pl-confirm-text, .pl-confirm-keep { text-align: center; font-size: var(--text-xs); line-height: 1.4; color: var(--label-2); }
  .pl-confirm-text p { margin: 0 0 0.25rem; }
  .pl-confirm-go .btn, .pl-confirm-cancel .btn {
    min-height: 56px; background: var(--surface-2); font-size: 1.1875rem;
  }
  .pl-confirm-go .btn { border-radius: 0 0 14px 14px; color: var(--red-text); font-weight: 400; }
  .pl-confirm-cancel { margin-top: 0.5rem; }
  .pl-confirm-cancel .btn { border-radius: 14px; color: var(--accent-text); font-weight: 600; }
}
@media (max-width: 400px) {
  /* the smallest iPhones: "Todos · No alvo ou perto · Pausados" no longer fit on one line,
     so the filter wraps to two (each segment keeps its count) */
  .pl-segs .seg-group:not(.pl-view) { flex-wrap: wrap; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
@media (hover: hover) and (pointer: fine) {
  @media (max-width: 760px) {
    .pl-confirm-go .btn.destructive:hover, .pl-confirm-cancel .btn:hover { background: var(--surface-3); }
  }
}

/* ── Novo produto: steps, the entry page and the confirm page (2 columns) ── */
.np-steps {
  list-style: none; margin: -0.75rem 0 2rem; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem;
  font-size: var(--text-sm); font-weight: 600; color: var(--label-2);
}
.np-steps li { display: inline-flex; align-items: center; gap: 0.5rem; }
.np-step-n {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--fill); color: var(--label); font-size: var(--text-caption); font-variant-numeric: tabular-nums;
}
.np-steps li.current { color: var(--label); }
.np-steps li.current .np-step-n { background: var(--accent-fill); color: #fff; }
.np-steps li.done { color: var(--green); }
.np-steps li.done .np-step-n { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.np-layout { align-items: start; }
.np-aside { display: grid; gap: 1rem; position: sticky; top: calc(var(--banner-h) + 1.5rem); }
.np-photo { display: grid; grid-template-columns: 9rem minmax(0, 1fr); align-items: center; gap: 1rem; }
.np-photo-note { font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); }
.np-read { margin: 0; gap: 0.5rem; }
.np-read .offer-price strong { font-size: 1.75rem; letter-spacing: -0.02em; }
.np-read .chip { white-space: normal; }
.np-form .store-pick-name .chip { min-height: 1.5rem; padding: 0.0625rem 0.5rem; gap: 0.375rem; font-size: var(--text-caption); }
.np-form .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.np-form .store-pick .check > span { min-width: 0; }
.np-recap h2 { font-size: var(--text-lg); }
.np-next-list { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.5rem; font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); }
.np-next-list b { color: var(--label); font-weight: 600; }
.np-entry .link-paste {
  margin: 0; padding: 1.5rem; border-radius: var(--radius-tile); background: var(--surface-1);
}
.np-entry .link-paste input { background: var(--surface-2); }
.np-entry .paste-or { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--separator-soft); }
.np-entry .analyses:has(.analysis) { margin-top: 1.5rem; }
.np-entry .analysis { background: var(--surface-2); }
@media (max-width: 1100px) {
  .np-aside { position: static; order: -1; }
  .np-entry ~ .np-aside { order: 0; }
  .np-photo { grid-template-columns: 7.5rem minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .np-steps { margin: -0.5rem 0 1.5rem; gap: 0.5rem 1rem; }
  .np-entry .link-paste { padding: 1rem; }
  /* One column of full-width buttons (wrapping a column put the second one beside the
     first, off a 375 px screen once the text grew). */
  .np-form .actions { flex-direction: column-reverse; flex-wrap: nowrap; align-items: stretch; }
  .np-form .actions .btn { flex: none; min-height: 50px; }
}

/* ── Rejeitados: grouped by product; a table on the Mac, stacked rows on the iPhone ── */
.rj-head .how { margin-top: 0.5rem; }
.rj-list > h2 { margin: 0 0 1rem; }
.rj-group + .rj-group { margin-top: 2rem; }
.rj-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; margin: 0 0 0.75rem; }
.rj-group-title { margin: 0; font-size: var(--text-lg); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.rj-group-title a { color: var(--label); text-decoration: none; }
.rj-group-title.is-gone { color: var(--label-2); }
.rj-group-count { font-size: var(--text-sm); color: var(--label-2); font-variant-numeric: tabular-nums; }
.rj-table { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; font-size: var(--text-md); line-height: 1.38; }
.rj-tr { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(7rem, 1fr) minmax(10rem, 1.2fr) 8.5rem 11.5rem; align-items: center; }
.rj-tr + .rj-tr { border-top: 1px solid var(--separator-soft); }
.rj-tr > * { padding: 0.875rem 1rem; min-width: 0; }
.rj-thead { border-bottom: 1px solid var(--separator); font-size: var(--text-caption); font-weight: 600; color: var(--label-2); letter-spacing: 0.01em; white-space: nowrap; }
.rj-thead + .rj-tr { border-top: 0; }
.rj-thead > * { padding-block: 0.75rem; }
.rj-title { display: block; color: var(--label); text-decoration: none; font-size: var(--text-row); line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.rj-url, .rj-history { display: block; margin-top: 0.125rem; font-size: var(--text-sm); line-height: 1.35; color: var(--label-2); overflow-wrap: anywhere; }
.rj-history { margin-top: 0.375rem; max-width: var(--measure); }
.rj-when { font-size: var(--text-sm); line-height: 1.35; }
.rj-scope { display: block; color: var(--label-2); }
.rj-action { text-align: right; }
.rj-action .btn { white-space: nowrap; }
.rj-list .empty-icon { color: var(--green); }
.rj-foot { margin-top: 1.5rem; font-size: var(--text-sm); }
@media (hover: hover) and (pointer: fine) {
  .rj-tr:not(.rj-thead):hover { background: rgba(255, 255, 255, 0.04); }
  .rj-title:hover, .rj-group-title a:hover { color: var(--accent-text-hover); }
}
@media (max-width: 960px) {
  .rj-thead { display: none; }
  .rj-tr {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "store state" "ad ad" "when when" "action action";
    gap: 0.25rem 0.75rem; padding: 0.75rem 1rem;
  }
  .rj-tr > * { padding: 0; }
  .rj-store { grid-area: store; font-size: var(--text-sm); font-weight: 600; }
  .rj-state { grid-area: state; }
  .rj-ad { grid-area: ad; padding-block: 0.25rem; }
  .rj-when { grid-area: when; color: var(--label-2); }
  .rj-scope { display: inline; }
  .rj-scope::before { content: " · "; }
  .rj-action { grid-area: action; text-align: left; }
  .rj-action .btn { width: 100%; margin-top: 0.5rem; }
}
@media (max-width: 760px) {
  .rj-group-head { margin-bottom: 0.5rem; }
}
/* ===== end screen: produtos ===== */

/* ===== screen: produto ===== */
/* The body is re-rendered on every rule change; app.js keeps the changed block in place.
   The browser's own scroll anchoring would fight that adjustment, so it is off here. */
#product-body { overflow-anchor: none; }
/* The Product page (Produto.dc.html): "‹ Produtos", a header with the large Product Photo
   beside the name and the best price, the number tiles, the chart beside a small summary,
   the Offers (a table when there is room, one card per Offer when not: a container query),
   the alert rules folded to one line, finding more Offers beside the radar's signals, the
   photo picker, the readings, and the final checks beside "Excluir produto". */
.pd-back { margin: 0 0 0.25rem; }
.pd { display: block; }
.pd > .notice { margin: 0 0 1.5rem; }

/* header */
.pd-hero {
  display: grid; grid-template-columns: minmax(0, 25rem) minmax(0, 1fr);
  gap: 2rem 3rem; align-items: start; margin: 0 0 2.5rem;
}
.pd-hero-photo { min-width: 0; max-width: 25rem; }
.pd-photo-btn { display: flex; width: 100%; min-height: 2.5rem; margin-top: 0.75rem; }
.pd-photo-note { margin: 0.5rem 0 0; font-size: var(--text-sm); line-height: 1.4; color: var(--label-2); }
.pd-hero-text { min-width: 0; padding-top: 0.25rem; }
.pd-hero-text h1 { overflow-wrap: anywhere; }
.pd-hero-text .subtitle { margin-top: 0.5rem; font-size: var(--text-body); line-height: 1.5; max-width: var(--measure); }
/* A wide Mac: the best price sits beside the name (a column with a rule on its left)
   instead of under it, so the header has no empty right half. */
@media (min-width: 1600px) {
  .pd-hero-text {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(24rem, 1fr);
    grid-template-rows: auto auto 1fr; column-gap: 3rem; align-items: start;
  }
  .pd-hero-text > h1, .pd-hero-text > .subtitle, .pd-hero-text > .pd-hero-actions { grid-column: 1; }
  .pd-hero-text > .pd-hero-actions { align-self: start; }
  .pd-hero-text > .pd-price {
    grid-column: 2; grid-row: 1 / span 3; margin-top: 0; padding: 0.25rem 0 0.5rem 3rem;
    border-top: 0; border-left: 1px solid var(--separator);
  }
}
.pd-price {
  display: flex; flex-direction: column; align-items: flex-start;
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--separator);
}
.pd-price-label { font-size: var(--text-sm); font-weight: 600; color: var(--label-2); }
.pd-price-value {
  margin-top: 0.25rem; font-size: 3.5rem; line-height: 1.1; font-weight: 700;
  letter-spacing: -0.025em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pd-price-value .good { color: var(--green); }
.pd-price-value.is-none { color: var(--label-2); }
.pd-price-note { margin-top: 0.5rem; font-size: var(--text-row); line-height: 1.45; color: var(--label-2); }
.pd-price-gap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 1rem;
  font-size: var(--text-row); line-height: 1.4; color: var(--label-2);
}
.pd-store-link {
  display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 0.875rem; min-height: 2.75rem;
  font-size: var(--text-row); font-weight: 600; color: var(--accent-text); text-decoration: none;
}
@media (hover: hover) and (pointer: fine) { .pd-store-link:hover { text-decoration: underline; } }
.pd-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem; margin-top: 2rem; }
.pd-hero-actions .btn { min-height: 2.75rem; padding: 0 1.25rem; border-radius: var(--radius); font-size: var(--text-row); }

/* a paused Product, a full queue */
.pd-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin: 0 0 1.5rem;
  padding: 0.875rem 1.25rem; border-radius: var(--radius-tile); background: var(--surface-1);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orange) 35%, transparent);
}
.pd-banner-text { flex: 1 1 20rem; min-width: 0; display: grid; gap: 0.25rem; font-size: var(--text-row); line-height: 1.45; }
.pd-banner-text > p { max-width: var(--measure); }
.pd-banner-text p { margin: 0; }
.pd-banner .queue-heavy { margin: 0.25rem 0 0; padding-left: 1.25rem; }

/* number tiles, the chart and its summary */
.pd-kpis { margin: 0 0 1.5rem; }
.pd-kpis .kpi-value { font-size: var(--text-xl); line-height: 1.27; white-space: normal; }
.pd-kpis .kpi-value .money { font-size: var(--text-kpi); line-height: 1.19; }
.pd-kpis .kpi-sub .good { color: var(--green); }
.pd-help { margin: 0; font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); max-width: var(--measure); }
.pd-chart { padding: 1.25rem 1.25rem 1rem; gap: 0.5rem; }
.pd-chart > h2 { font-size: var(--text-xl); }
.pd-chart .price-chart { padding: 0; margin-top: 0.5rem; background: none; border-radius: 0; gap: 0.625rem; }
.pd-chart .chart-ranges { justify-self: start; }
.pd-chart .chart-legend { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); column-gap: 1.5rem; }
.pd-chart > .how { margin-top: 0.25rem; }
.pd-aside { padding: 0; gap: 0; overflow: hidden; }
.pd-aside-part { display: flex; flex-direction: column; gap: 0.375rem; padding: 1.125rem 1.375rem; }
.pd-aside-part + .pd-aside-part { margin-left: 1.375rem; padding-left: 0; border-top: 1px solid var(--separator); }
.pd-aside-value {
  font-size: var(--text-kpi); line-height: 1.19; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pd-aside-note, .pd-aside-rules { font-size: var(--text-sm); line-height: 1.4; color: var(--label-2); }
.pd-aside-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.pd-aside-title { font-size: var(--text-row); font-weight: 600; line-height: 1.35; }
.pd-aside-head a { font-size: var(--text-sm); font-weight: 600; text-decoration: none; white-space: nowrap; }

/* sections on the canvas */
.pd-section { min-width: 0; scroll-margin-top: 1rem; }
.pd-section > .how { margin-bottom: 0.875rem; }
.pd-section > .actions { margin-top: 0.75rem; }
.sec-count { flex: none; font-size: var(--text-md); color: var(--label-2); }
.pd-empty { margin: 0; font-size: var(--text-md); line-height: 1.45; }

/* Offers: one grid row per Offer under a header row; its notes run the full width below */
.pd-offers { container: pd-offers / inline-size; }
.pd-offers-grid { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; }
.pd-offers-head, .pd-offer-row {
  display: grid; align-items: start;
  grid-template-columns:
    minmax(6.5rem, 0.8fr) minmax(7.5rem, 0.9fr) minmax(6.5rem, 0.7fr) minmax(8rem, 1fr)
    minmax(11rem, 1.1fr) minmax(6.5rem, 0.7fr) minmax(12rem, 1.1fr) minmax(9rem, 0.9fr);
}
.pd-offers-head {
  border-bottom: 1px solid var(--separator); font-size: var(--text-caption); font-weight: 600;
  letter-spacing: 0.01em; color: var(--label-2); white-space: nowrap;
}
.pd-offers-head > span { padding: 0.75rem 0.875rem; }
.pd-offers-head > .num { text-align: right; }
.pd-offers-head > span:first-child, .oc:first-child { padding-left: 1rem; }
.pd-offers-head > span:last-child, .oc:last-child { padding-right: 1rem; }
.pd-offer + .pd-offer { border-top: 1px solid var(--separator); }
.pd-offer { scroll-margin-top: 1rem; }
.oc { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; padding: 0.875rem; font-size: var(--text-md); line-height: 1.38; }
.oc-label {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.oc-val { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; min-width: 0; overflow-wrap: break-word; }
.oc-pix .oc-val, .oc-card .oc-val { align-items: flex-end; text-align: right; }
.oc-pix strong { font-size: var(--text-row); font-weight: 700; }
.oc-store-name { font-size: var(--text-row); font-weight: 600; overflow-wrap: anywhere; }
.oc-sub { font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); }
.oc .chip { max-width: 100%; }
.oc .seller-name { font-size: var(--text-md); font-weight: 500; }
.oc-actions { align-items: flex-end; gap: 0.5rem; }
.oc-actions .btn { white-space: nowrap; }
.pd-store-link {
  display: inline-flex; align-items: center; min-height: 2rem;
  font-weight: 600; text-decoration: none; white-space: nowrap;
}
.pd-offer-notes { display: grid; gap: 0.5rem; padding: 0 1rem 1rem; min-width: 0; }
.pd-offer-notes > p { margin: 0; max-width: 72ch; line-height: 1.45; }
.pd-offer-notes .offer-more-body { margin-top: 0.5rem; }
.pd-offer-notes .offer-more-body p { margin: 0; }
.pd-offer-delete { padding-top: 0.25rem; }
/* A wide table: a late Offer's box reads as two columns (what happened | what to do), so
   no line runs the full 1500 px. */
@container pd-offers (min-width: 68rem) {
  .pd-offer-notes .late-box {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 2.5rem; align-items: start;
  }
  .pd-offer-notes .late-box > .info-why { grid-column: 1; grid-row: 1 / span 2; margin: 0; }
  .pd-offer-notes .late-box > .late-todo { grid-column: 2; margin: 0; }
  .pd-offer-notes .late-box > .late-read { grid-column: 2; }
  .pd-offer-notes .info-box:not(.late-box) > p { max-width: var(--measure); }
}
@container pd-offers (max-width: 67.99rem) {
  .pd-offers-grid { display: grid; gap: 12px; background: none; border-radius: 0; overflow: visible; }
  .pd-offers-head { display: none; }
  .pd-offer { background: var(--surface-1); border-radius: var(--radius-tile); }
  .pd-offer + .pd-offer { border-top: 0; }
  .pd-offer-row {
    grid-template-columns: minmax(0, 1fr) auto; padding: 1rem 1rem 0.25rem;
    grid-template-areas: "store status" "pix pix" "card card" "seller seller" "ship ship" "next next" "actions actions";
  }
  .oc, .oc:first-child, .oc:last-child { padding: 0; }
  .oc-store { grid-area: store; }
  .oc-status { grid-area: status; align-self: start; }
  .oc-pix { grid-area: pix; padding: 0.375rem 0 0.75rem; }
  .oc-pix .oc-val { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.5rem; text-align: left; }
  .oc-pix strong { font-size: 1.75rem; letter-spacing: -0.02em; }
  .oc-card { grid-area: card; }
  .oc-seller { grid-area: seller; }
  .oc-ship { grid-area: ship; }
  .oc-next { grid-area: next; }
  :is(.oc-card, .oc-seller, .oc-ship, .oc-next) {
    flex-direction: row; justify-content: space-between; align-items: center; gap: 0.75rem;
    min-height: 2.75rem; padding: 0.5rem 0; border-top: 1px solid var(--separator);
  }
  :is(.oc-card, .oc-seller, .oc-ship, .oc-next) > .oc-label {
    position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none;
    flex: none; color: var(--label-2);
  }
  :is(.oc-card, .oc-seller, .oc-ship, .oc-next) > .oc-val {
    flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center;
    gap: 0.25rem 0.5rem; text-align: right;
  }
  .oc-actions {
    grid-area: actions; flex-direction: row; flex-wrap: wrap; justify-content: space-between;
    align-items: center; padding: 0.75rem 0; border-top: 1px solid var(--separator);
  }
  .pd-offer-notes { padding: 0 1rem 1rem; }
}

/* "Regras de alerta": one summary line that opens to every rule */
.pd .rules-fold { background: none; border-radius: 0; }
.pd .rules-fold > summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem;
  padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--surface-1);
}
.pd .rules-fold[open] > summary { border-bottom: 0; }
.pd .rules-fold .fold-sum { flex: 1 1 24rem; min-width: 0; font-size: var(--text-row); line-height: 1.5; color: var(--label); }
.pd .rules-fold .fold-action {
  display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 1rem;
  border-radius: var(--radius-btn); background: var(--fill); color: var(--label);
  font-size: var(--text-md); font-weight: 600;
}
.pd .rules-fold .fold-action::after { content: none; }
.pd .rules-fold .when-open, .pd .rules-fold[open] .when-closed { display: none; }
.pd .rules-fold[open] .when-open { display: inline; }
/* Two labelled rows with no hole (2026-11-19): "Valores" (Preço-alvo | Frete) and
   "Escolhas" (Vendedores | Origem do envio); the blocks of a row share its height (grid
   stretch). Monitoramento runs the full width below, after a hairline. One column when
   the fold is narrower than 46rem (a narrow Mac window, the iPhone), in the same order. */
.pd .rules-fold { container: pd-rules / inline-size; }
.pd .rules-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 2.5rem; margin-top: 0.75rem; padding: 1.5rem; border-radius: 22px;
  background: var(--surface-1);
}
.pd .rules-row-label {
  grid-column: 1 / -1; margin: 0 0 -0.875rem;
  font-size: var(--text-xs); font-weight: 600; line-height: 1.3; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--label-2);
}
.pd .rules-grid > .rules-row-label ~ .rules-row-label { margin-top: 0.5rem; }
.pd .rule { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; scroll-margin-top: 1rem; }
.pd .rule > h3 { margin: 0; font-size: var(--text-lg); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.pd .rule-wide { grid-column: 1 / -1; }
.pd .rules-grid > .rule-wide { padding-top: 1.75rem; border-top: 1px solid var(--separator); }
@container pd-rules (max-width: 45.99rem) {
  .pd .rules-grid { grid-template-columns: minmax(0, 1fr); }
}
.rule-help { margin: 0; font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); max-width: var(--measure); }
.pd .rules-grid .rows { background: var(--surface-2); }
.pd .rules-grid select { background: var(--surface-1); }
.pd-target-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pd-target-field { display: inline-flex; align-items: center; gap: 0.5rem; }
.pd-target-field .unit { font-size: var(--text-row); }
.pd-target-field input { width: 10rem; font-variant-numeric: tabular-nums; }
.pd-target-form .error { flex-basis: 100%; }
/* Frete: "Frete abusivo acima de" on one line, "do preço · padrão 30%" under it; the "%"
   inside the field, after the number (no spinner arrows), digits right-aligned. */
.pd .frete-row { flex-wrap: nowrap; }
.pd .frete-row .row-label { flex: 1 1 auto; min-width: 0; }
.pd .frete-label { overflow-wrap: normal; }
.pct-field {
  display: inline-flex; align-items: center; gap: 0.375rem; flex: none;
  min-height: 40px; padding: 0 0.875rem; cursor: text;
  background: var(--surface-1); border: 1px solid var(--field-border); border-radius: var(--radius-btn);
  transition: border-color 160ms var(--ease-out);
}
.pct-field:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); border-color: var(--accent); }
.pct-field:has(input[aria-invalid="true"]) { border-color: var(--red); }
.pct-field input {
  width: 3.2ch; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none;
  text-align: right; font-variant-numeric: tabular-nums;
  appearance: textfield; -moz-appearance: textfield;
}
.pct-field input:focus { outline: none; }
.pct-field input::-webkit-outer-spin-button,
.pct-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pct-unit { font-size: var(--text-row); color: var(--label-2); }
/* The note under the rule just changed: a calm green box with a check, the choice in bold
   green, the rest in plain text, an optional smaller line. It stays (no fade-out). */
.rule-saved {
  display: flex; align-items: flex-start; gap: 0.75rem; margin-top: 0.25rem;
  padding: 0.75rem 1rem; border-radius: var(--radius);
  background: color-mix(in srgb, var(--green) 14%, transparent);
  animation: enter 180ms var(--ease-out) both;
}
.rule-saved > .icon { flex: none; margin-top: 0.125rem; color: var(--green); }
.rule-saved > p { margin: 0; min-width: 0; font-size: var(--text-md); line-height: 1.45; color: var(--label); max-width: var(--measure); }
.rule-saved strong { font-weight: 600; color: var(--green); }
.rule-saved small { display: block; margin-top: 0.25rem; font-size: var(--text-sm); color: var(--label-2); }
.rule-saved.is-error { background: color-mix(in srgb, var(--red) 16%, transparent); }
.rule-saved.is-error > .icon, .rule-saved.is-error strong { color: var(--red-text); }

/* finding more Offers; the radar's signals */
.pd-stores-fold { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; }
.pd-stores-fold > summary { list-style: none; cursor: pointer; }
.pd-stores-fold > summary::-webkit-details-marker { display: none; }
.pd-stores-fold .list-trail .chev { transition: transform 160ms var(--ease-out); }
.pd-stores-fold[open] .list-trail .chev { transform: rotate(90deg); }
.pd-stores-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; padding: 0.25rem 1rem 1rem; }
/* a long Store name or "Loja da marca …" chip shrinks (the chip ends in "…") instead of
   widening the row past the screen */
.pd .store-pick .check > span { min-width: 0; }
.pd-stores-body .rows { background: var(--surface-2); }
.pd-stores > .pd-help, .pd-stores > .info-box { margin-top: 0.75rem; }
.pd #product-discovery { gap: 0.625rem; margin-top: 1.75rem; }
.pd-subhead { margin: 0; font-size: var(--text-lg); line-height: 1.3; font-weight: 600; }
.pd .candidate { gap: 0.375rem; padding: 0.875rem 1rem; border-radius: var(--radius); background: var(--surface-1); }
.pd .candidate-list { gap: 0.625rem; }
.pd .run { padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--surface-1); }
.pd #product-signals > .how, .pd #product-discovery > .how { margin-bottom: 0.25rem; }

/* the photo picker and the records */
.pd #product-photo { margin-top: 0.5rem; scroll-margin-top: 1rem; }
.pd-kpis + #product-photo { margin: -1rem 0 2rem; }
.pd #product-photo > .sec-head { margin-top: 2rem; }
/* Verificações finais (a table) gets two thirds; "Excluir produto" (text and a button) one */
@media (min-width: 761px) {
  .pd-records { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2.5rem; }
}
@media (min-width: 761px) {
  .pd .table { font-size: var(--text-md); }
  .pd .table th { font-size: var(--text-caption); }
  .pd .table:not(.compact) :is(th, td) { padding: 0.75rem 1rem; }
}

/* narrower Mac windows, then the iPhone */
@media (max-width: 900px) {
  .pd-hero { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .pd-hero-photo { max-width: 25rem; }
}
@media (max-width: 760px) {
  .pd-hero { margin-bottom: 1.5rem; }
  .pd-hero-photo { max-width: none; }
  .pd-photo-btn { min-height: 44px; border-radius: var(--radius); font-size: var(--text-md); }
  .pd-hero-text h1 { font-size: 1.75rem; line-height: 1.21; letter-spacing: -0.015em; }
  .pd-price { margin-top: 1.25rem; padding-top: 1.25rem; }
  .pd-price-value { font-size: 2.75rem; }
  .pd-hero-actions { margin-top: 1.25rem; }
  .pd-hero-actions .btn { flex: 1 1 0; }
  .pd-banner { padding: 0.875rem 1rem; }
  .pd-kpis > .kpi:last-child { grid-column: 1 / -1; }
  .pd-kpis .kpi-value .money { font-size: 1.5rem; }
  .pd-kpis .kpi-value { font-size: var(--text-lg); }
  .pd-chart { padding: 1rem; }
  .pd-aside-part { padding: 1rem; }
  .pd-aside-part + .pd-aside-part { margin-left: 1rem; }
  .pd .rules-fold > summary { padding: 0.875rem 1rem; }
  /* the iPhone: one card per rule, the row labels as group headings on the canvas */
  .pd .rules-grid { padding: 0; border-radius: 0; background: none; gap: 0.75rem; }
  .pd .rules-grid > .rule { padding: 1rem; border-radius: var(--radius-tile); background: var(--surface-1); }
  .pd .rules-grid > .rule-wide { margin-top: 0.75rem; padding-top: 1rem; border-top: 0; }
  .pd .rules-row-label { margin: 0.5rem 1rem -0.25rem; }
  .pd .rules-grid > .rules-row-label ~ .rules-row-label { margin-top: 1rem; }
  .pd .rules-grid .row { flex-wrap: wrap; }
  /* a choice keeps its radio on the right, as in Ajustes; the Frete field stays beside its label */
  .pd .rules-grid :is(.choice, .frete-row) { flex-wrap: nowrap; }
  .pd-target-field input { width: 9rem; }
}
@media (pointer: coarse) {
  .pd-photo-btn, .pd-store-link, .pd-aside-head a, .pd .rules-fold .fold-action { min-height: 44px; }
  /* "defina em Regras de alerta" in the target tile, when there is no target */
  .pd-kpis .kpi-sub a { display: inline-flex; align-items: center; min-height: 44px; }
  .pd-aside-head a { display: inline-flex; align-items: center; }
}
/* ===== end screen: produto ===== */

/* ===== screen: lojas ===== */
/* Lojas (lojas.html): the numbers, one row per Store as a table on the Mac and an inset
   list on the iPhone (the same <a> rows), then [Incluir loja] | [Colar um link].
   A Store's page (loja.html + _store_card.html): "‹ Lojas", header with the initial tile,
   the numbers, how it reads / relearns / searches beside its Seller Badge rules and
   history, then its Offers. */
.sec-count { flex: none; font-size: var(--text-md); color: var(--label-2); white-space: nowrap; }
.lojas-kpis { margin: 0 0 1rem; }
.lojas-kpis .kpi-sub .chip { white-space: normal; max-width: 100%; }
.kpi-of { font-size: var(--text-body); font-weight: 600; color: var(--label-2); letter-spacing: 0; }
.lojas-kpis .kpi-sub .chip { margin-top: 0.125rem; }
.lojas-added { margin: 0 0 1.5rem; }
#lojas-como { margin: -1rem 0 2rem; }

/* initial tile: the Store's first letter (no logos: nothing is fetched) */
.store-avatar {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 9px; background: var(--fill);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--text-row); font-weight: 700; color: var(--label);
}
.store-avatar.is-large { flex-basis: 56px; width: 56px; height: 56px; border-radius: var(--radius-tile); font-size: 1.625rem; }

/* the Stores table: header + one <a> per Store, same grid template */
.store-table { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; }
.store-table-head, .store-line {
  display: grid; align-items: center;
  grid-template-columns: minmax(11rem, 1.2fr) minmax(13rem, 1.3fr) minmax(13rem, 1.4fr) 10rem 9rem 5rem 2rem;
}
.store-table-head {
  border-bottom: 1px solid var(--separator);
  font-size: var(--text-caption); font-weight: 600; color: var(--label-2); letter-spacing: 0.01em; white-space: nowrap;
}
.store-table-head > span { padding: 0.75rem 1rem; }
.store-table .num { text-align: right; }
.store-line {
  min-height: 5rem; color: var(--label); text-decoration: none; background: var(--surface-1);
  font-size: var(--text-md); line-height: 1.38; font-variant-numeric: tabular-nums;
  scroll-margin-top: 1rem; transition: background-color 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.store-line + .store-line { border-top: 1px solid var(--separator-soft); }
.store-line > span { padding: 0.75rem 1rem; min-width: 0; }
.store-line > .chev { padding: 0 0.75rem 0 0.25rem; justify-content: flex-end; }
.store-line:active { background: var(--surface-2); }
.store-line:target { box-shadow: inset 0 0 0 2px var(--accent); }
.store-line.is-stopped { background: color-mix(in srgb, var(--red) 7%, var(--surface-1)); }
.store-line small { display: block; margin-top: 0.125rem; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); overflow-wrap: anywhere; }
.sl-name { display: flex; align-items: center; gap: 0.875rem; }
.sl-text { min-width: 0; }
.sl-text strong { display: block; font-size: var(--text-row); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.sl-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.sl-how > span:not(.visually-hidden) { display: block; font-weight: 500; }
.sl-cost .money { font-size: var(--text-row); }
.sl-spend .money { display: block; font-size: var(--text-row); font-weight: 600; }
.sl-offers > span { font-size: var(--text-row); }
.sl-offers small { display: none; }
.store-table-empty { padding: 1.25rem 1rem; color: var(--label-2); }
@media (hover: hover) and (pointer: fine) {
  .store-line:hover { background: var(--surface-1-hover); }
  .store-line:hover .sl-text strong { color: var(--accent-text); }
}

/* [Incluir loja] | [Colar um link] and the blocked Stores */
.lojas-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr)); gap: 0 2rem; align-items: start; }
.lojas-more-col { min-width: 0; }
.lojas-more .store-add { margin: 0; }
.store-add-summary { width: fit-content; }
.store-add-summary .btn { pointer-events: none; }
.store-add[open] > .store-add-summary { margin-bottom: 0.75rem; }
.lojas-more .store-add-form { margin: 0; max-width: none; gap: 1rem; padding: 1.25rem; }
.lojas-more .link-paste { margin: 2.5rem 0 0; gap: 0; }
.lojas-more .link-paste > h2 { margin-bottom: 1rem; }
.lojas-more .link-paste > .group-help { margin: -0.5rem 0 1rem; }
.lojas-more .link-paste > .how { margin: 0 0 0.75rem; }
.lojas-more .paste-form .btn { min-height: 44px; }
.blocked-stores .list-row { min-height: 4rem; }
.blocked-stores .list-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }

/* a Store's page */
.store-page { min-width: 0; }
.store-head { margin-bottom: 1.5rem; }
.store-head-text { display: flex; align-items: flex-start; gap: 1.125rem; }
.store-head-body { min-width: 0; flex: 1 1 auto; }
.store-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.875rem; }
.store-title-chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.store-head .store-meta { margin-top: 0.375rem; font-size: var(--text-body); line-height: 1.5; overflow-wrap: anywhere; }
.store-head .store-status { margin-top: 0.25rem; font-size: var(--text-body); line-height: 1.5; max-width: var(--measure); }
.store-head .store-explain { margin-top: 0.75rem; max-width: var(--measure); font-size: var(--text-md); line-height: 1.5; }
.store-notice {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 0.75rem); z-index: 5;
  margin: 0 0 1.5rem; max-width: var(--measure); background: #0b2440;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
  animation: enter 180ms var(--ease-out) both;  /* the answer to an action enters once */
}
.store-notice.is-error { background: #3a1214; }
.store-kpis { margin: 0 0 0.5rem; }
.store-page .sec-head { flex-wrap: wrap; row-gap: 0.25rem; }
.store-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 32rem), 1fr)); gap: 0 2rem; align-items: start; }
.store-cols > * { min-width: 0; }
.store-page .sec-head .chip { flex: none; }
.store-page .sec-help.is-error { color: var(--red-text); }
.store-after { margin: 0.75rem 0 0; }
.store-h3 { margin: 1.5rem 0 0.5rem; font-size: var(--text-row); line-height: 1.4; font-weight: 600; }

/* how it reads / searches: numbered grouped list */
.rung-list { list-style: none; margin: 0; padding: 0; }
.rung-row { align-items: center; min-height: 4rem; }
.rung-num {
  flex: 0 0 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--text-sm); font-weight: 700; background: var(--fill); color: var(--gray-text);
}
.rung-row.fixed .rung-num { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.rung-row.failing .rung-num { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red-text); }
.rung-row.skipped .list-title { color: var(--label-2); }
.rung-row .list-title { font-size: var(--text-row); font-weight: 500; }
.rung-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin-top: 0.25rem; }
.rung-row .rung-cost { flex: none; font-size: var(--text-md); color: var(--label-2); white-space: nowrap; }
.rung-row .rung-cost b { color: var(--label); font-weight: 600; }
.store-notes { margin-top: 1rem; gap: 0.5rem; font-size: var(--text-md); line-height: 1.5; }
.store-notes p { max-width: var(--measure); }

/* relearn */
.store-page .store-relearn { display: block; border: 0; padding: 0; }
.store-page .store-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.store-page .relearn-form { flex: 1 1 100%; display: flex; flex-direction: column; align-items: stretch; gap: 0.625rem; padding: 1rem 1.25rem; }
.store-page .relearn-label { font-size: var(--text-sm); font-weight: 600; color: var(--label-2); white-space: normal; }
.store-page .relearn-form { min-width: 0; max-width: 100%; }
.relearn-pick { display: flex; flex-wrap: wrap; gap: 0.5rem; min-width: 0; }
.store-page .relearn-form select { flex: 1 1 16rem; min-height: 2.5rem; font-size: var(--text-md); width: 100%; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.store-page .relearn-cost { font-size: var(--text-sm); line-height: 1.5; }
.store-page .relearn-confirm {
  flex: 1 1 100%; padding: 1rem 1.25rem; border: 0; border-radius: var(--radius);
  background: var(--surface-1); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
}
.store-page .relearn-confirm-title { font-size: var(--text-row); }
.store-page .relearn-confirm-body { font-size: var(--text-md); line-height: 1.5; color: var(--label); }
.store-page .relearn-confirm-actions { margin-top: 0.375rem; }
.store-page .search-ladder-actions { margin-top: 0.75rem; }
.store-page .search-relearn { margin-top: 0.75rem; }
.store-fold-body { margin-top: 0.625rem; padding: 1rem; gap: 0; }
.store-fold-body .sec-help { margin: 0 0 0.25rem; }
.store-fold-body .btn { white-space: normal; text-align: left; }

/* Seller Badge rules */
.store-page .bar-list { display: block; font-size: var(--text-md); }
.store-page .bar-list > li.bar-row { display: block; padding: 0.875rem 1rem; }
.store-page .bar-list > li.bar-row + li.bar-row { border-top: 1px solid var(--separator); }
.bar-row p { margin-top: 0.5rem; line-height: 1.5; }
.store-page .official-answers .list-row .btn { flex: none; }
.store-page .seller-edit { margin-top: 0.75rem; }
.store-page .seller-form { margin-top: 0.625rem; max-width: none; padding: 1rem; gap: 1rem; }
.store-page .bar-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1rem; }
.store-page .bar-input input { width: 5rem; min-height: 2.5rem; }
.store-page .bar-input .unit { font-size: var(--text-sm); color: var(--label-2); }

/* history */
.store-page .timeline { display: block; }
.store-page .timeline li {
  display: flex; flex-direction: column; gap: 0.25rem; padding: 0.875rem 1rem;
  border-top: 1px solid var(--separator); font-size: var(--text-md); line-height: 1.5;
}
.store-page .timeline li:first-child { border-top: 0; }
.store-page .timeline time { font-size: var(--text-sm); font-weight: 600; }
.store-page .timeline .muted { font-size: var(--text-sm); }
.store-empty { color: var(--label-2); font-size: var(--text-md); line-height: 1.5; }

/* owner-added Store: edit / remove */
.store-page .store-manage { display: block; }
.store-page .store-edit > .store-add-form { margin-top: 0.625rem; max-width: none; padding: 1rem; gap: 1rem; }
.store-page .store-remove { margin-top: 1rem; }
.store-removed { display: grid; gap: 1rem; justify-items: start; padding: 1rem 0; }
.store-removed .notice { margin: 0; }

/* the Store's Offers: a table on the Mac */
.offer-table { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; }
.offer-table-head, .offer-line {
  display: grid; align-items: center;
  grid-template-columns: minmax(16rem, 2.2fr) minmax(10rem, 1fr) 9.5rem 9rem minmax(13rem, 1.5fr) 2rem;
}
.offer-table-head {
  border-bottom: 1px solid var(--separator);
  font-size: var(--text-caption); font-weight: 600; color: var(--label-2); letter-spacing: 0.01em; white-space: nowrap;
}
.offer-table-head > span, .offer-line > span { padding: 0.75rem 1rem; min-width: 0; }
.offer-table .num { text-align: right; }
.offer-line { min-height: 5.5rem; font-size: var(--text-md); line-height: 1.38; }
.offer-line + .offer-line { border-top: 1px solid var(--separator-soft); }
.ol-product { display: flex; align-items: flex-start; gap: 0.875rem; }
.ol-text { min-width: 0; }
.ol-name {
  display: block; color: var(--label); text-decoration: none; font-weight: 600; font-size: var(--text-row); line-height: 1.35;
  overflow-wrap: anywhere; text-wrap: pretty;
}
.ol-nophoto { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.75rem; margin-top: 0.375rem; font-size: var(--text-sm); }
.ol-nophoto .btn { gap: 0.375rem; }
.ol-seller { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.ol-seller-name { font-weight: 500; overflow-wrap: anywhere; }
.ol-price .money { font-size: var(--text-body); font-weight: 700; }
.ol-when small { display: block; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); }
.ol-open { display: inline-flex; justify-content: flex-end; padding: 0.5rem 0.75rem 0.5rem 0.25rem; color: var(--label-3); }
@media (hover: hover) and (pointer: fine) {
  .ol-name:hover { color: var(--accent-text-hover); }
}

/* narrower Macs: the Stores table and the Offers table fold into rows (1340: below it the
   columns' minimums no longer fit beside the 248 px sidebar and the wider type) */
@media (max-width: 1340px) {
  .store-table-head, .offer-table-head { display: none; }
  .store-line {
    grid-template-columns: 36px minmax(0, 1fr) auto 1.25rem;
    grid-template-areas: "av name spend chev" "av status status chev" "av how how chev";
    column-gap: 0.75rem; align-items: start; padding: 0.875rem 1rem;
  }
  .store-line > span { padding: 0; }
  .sl-name { display: contents; }
  .sl-name > .store-avatar { grid-area: av; margin-top: 0.125rem; }
  .sl-text { grid-area: name; }
  .sl-status { grid-area: status; display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; margin-top: 0.375rem; }
  .sl-status small { margin: 0; }
  .sl-how { grid-area: how; margin-top: 0.375rem; }
  .sl-how > span:not(.visually-hidden) { font-weight: 400; color: var(--label-2); font-size: var(--text-sm); }
  .sl-cost { display: none; }
  .sl-spend { grid-area: spend; text-align: right; }
  .sl-spend small { display: none; }
  .sl-offers { display: none; }
  .store-line > .chev { grid-area: chev; align-self: center; padding: 0; }
  .offer-line {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "product product" "seller price" "status when";
    gap: 0.5rem 1rem; padding: 0.875rem 1rem; align-items: start;
  }
  .offer-line > span { padding: 0; }
  .ol-product { grid-area: product; }
  .ol-seller { grid-area: seller; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; }
  .ol-price { grid-area: price; }
  .ol-status { grid-area: status; }
  .offer-line > :is(.ol-seller, .ol-status) { padding-left: calc(48px + 0.875rem); }
  .ol-when { grid-area: when; text-align: right; }
  .ol-open { display: none; }
}

/* iPhone */
@media (max-width: 760px) {
  #lojas-como { margin: -0.75rem 0 1.5rem; }
  .lojas-kpis .kpi-sub .chip { font-size: var(--text-caption); }
  .store-line { min-height: 56px; }
  .sl-how small { display: none; }
  .sl-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .store-kpis .kpi-value, .lojas-kpis .kpi-value { font-size: 1.5rem; }
  .lojas-more .store-add-form { padding: 1rem; }
  .lojas-more .link-paste { margin-top: 2rem; }
  .lojas-more .paste-form { flex-direction: column; }
  .store-add-summary .btn { min-height: 44px; }
  .store-head-text { gap: 0.875rem; }
  .store-avatar.is-large { flex-basis: 44px; width: 44px; height: 44px; border-radius: var(--radius); font-size: 1.25rem; }
  .store-head .page-actions { width: 100%; }
  .store-head .page-actions .btn { flex: 1 1 auto; min-height: 44px; }
  .rung-row { align-items: flex-start; }
  .rung-row .rung-num { margin-top: 0.875rem; }
  .rung-row .list-body { flex-direction: column; align-items: flex-start; gap: 0.375rem; }
  .rung-row .rung-cost { font-size: var(--text-sm); }
  .store-page .relearn-form { padding: 1rem; }
  .relearn-pick .btn, .store-page .store-actions > .btn, .store-page .relearn-confirm-actions .btn { flex: 1 1 100%; min-height: 44px; }
  .store-fold-body .search-ladder-actions .btn { flex: 1 1 100%; justify-content: flex-start; min-height: 44px; }
  .store-page .bar-fields { grid-template-columns: minmax(0, 1fr); }
  .store-page .seller-form-actions .btn { flex: 1 1 100%; min-height: 44px; }
  .offer-line > :is(.ol-seller, .ol-status) { padding-left: 0; }
  .offer-line { grid-template-areas: "product product" "seller status" "price when"; }
  .ol-status { justify-self: end; }
  .ol-nophoto .btn { min-height: 44px; }
}
@media (pointer: coarse) {
  .store-page .official-answers .btn, .ol-nophoto .btn, .store-page .bar-input input,
  .store-page .relearn-form select { min-height: 44px; }
}
/* ===== end screen: lojas ===== */

/* ===== screen: radar ===== */
/* Radar (redesign 2026-11-19): three number tiles, the last sinais as a table (a stacked
   list under 1100 px), the sites as cards (a stopped one spans the row with its relearn
   choices), the sweeps per Product as a table, then "Colar um link". #radar-body swaps
   itself in every 3 s while a sweep runs: nothing inside it enters except the notice. */
.rd-back { display: none; }
.rd-how { margin: -1.5rem 0 2rem; }
.radar-body { display: grid; gap: 0; }
.radar-body > .notice { margin: 0 0 1.5rem; max-width: var(--measure); animation: enter 180ms var(--ease-out) both; }
.rd-section > .how { margin: -0.5rem 0 1rem; }
.rd-section .sec-help + .how { margin-top: -0.75rem; }
.rd-note { margin: 0 0 1rem; font-size: var(--text-sm); line-height: 1.4; color: var(--label-2); max-width: var(--measure); }
.rd-empty {
  padding: 2rem 1.5rem; border-radius: var(--radius); background: var(--surface-1);
  font-size: var(--text-row); line-height: 1.5; color: var(--label-2);
}
.rd-lab {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.rd-paste-link .icon { flex: none; }

/* filters: "Todos / Só ativos", "Todos os produtos", one Product */
.rd-tools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem; margin: 0 0 0.75rem;
}
.rd-segs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; min-width: 0; }
.radar-product-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.625rem; min-width: 0; }
.radar-product-filter label { font-size: var(--text-sm); font-weight: 600; color: var(--label-2); white-space: nowrap; }
.radar-product-filter select {
  flex: 1 1 14rem; width: auto; min-width: 0; max-width: 24rem; min-height: 2.25rem;
  font-size: var(--text-md); background: var(--surface-1);
}

/* the sinais table: one grid for the header and every row */
.rd-table { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; }
.rd-tip-head, .rd-tip {
  display: grid; align-items: start;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr) 12rem minmax(12.5rem, 1fr) 8rem 7.5rem;
}  /* the Loja column keeps room for "mercadolivre.com.br" (it broke "shopee.com.b r" at 1440) */
.rd-tip-head, .rd-sweep-head {
  border-bottom: 1px solid var(--separator); font-size: var(--text-caption); font-weight: 600;
  letter-spacing: 0.01em; color: var(--label-2); white-space: nowrap;
}
.rd-tip-head > span, .rd-sweep-head > span { padding: 0.75rem 1rem; }
.rd-num { text-align: right; }
.rd-tips, .rd-sweeps { list-style: none; margin: 0; padding: 0; }
.rd-tip + .rd-tip, .rd-sweep + .rd-sweep { border-top: 1px solid var(--separator-soft); }
.rd-cell { padding: 0.875rem 1rem; min-width: 0; }
.rd-src { display: block; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); }
.rd-src b { font-weight: 600; color: var(--gray-text); }
.rd-title {
  display: block; margin-top: 0.125rem; font-size: var(--text-row); line-height: 1.35; font-weight: 600;
  color: var(--label); text-decoration: none; overflow-wrap: anywhere;
}
.rd-title svg { margin-left: 0.375rem; vertical-align: -1px; color: var(--accent-text); }
.rd-tip.is-expired .rd-title { color: var(--label-2); }
.rd-coupon { display: block; margin-top: 0.375rem; font-size: var(--text-sm); line-height: 1.4; overflow-wrap: anywhere; }
.rd-match .radar-match { display: block; }
.rd-match .radar-match a {
  display: block; margin-top: 0.375rem; font-size: var(--text-sm); line-height: 1.35; font-weight: 500;
  color: var(--label); text-decoration: none; overflow-wrap: anywhere;
}
.rd-more, .rd-none { display: block; font-size: var(--text-sm); line-height: 1.35; color: var(--label-2); }
.rd-more { margin-top: 0.25rem; }
.rd-price { text-align: right; }
.rd-price .radar-price { display: block; font-size: var(--text-body); font-weight: 700; font-variant-numeric: tabular-nums; }
.rd-usual { display: block; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rd-price .chip { margin-top: 0.375rem; }
.rd-store, .rd-seen { font-size: var(--text-sm); line-height: 1.35; }
.rd-store { overflow-wrap: anywhere; }
.rd-seen { color: var(--label-2); }
/* "Por quê" / "O que cada site respondeu": under the whole row */
.rd-why { grid-column: 1 / -1; margin: -0.625rem 0 0; padding: 0 1rem 0.5rem; max-width: none; }
.rd-why[open] { padding-bottom: 1rem; }
.rd-why-body {
  margin: 0.25rem 0 0; padding: 0.875rem 1rem; border-radius: var(--radius); background: var(--fill);
  font-size: var(--text-sm); line-height: 1.5; color: var(--label); display: grid; gap: 0.5rem;
}
.rd-why-body .candidate-meta { color: var(--gray-text); }
.rd-why-body .radar-expired { color: var(--gray-text); }
.rd-why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.625rem; }
.rd-why-list li { display: grid; gap: 0.25rem; max-width: var(--measure); }
.rd-why-list .radar-match a { margin-left: 0.5rem; font-weight: 600; color: var(--label); text-decoration: none; overflow-wrap: anywhere; }
.rd-reason { color: var(--label-2); }
.radar-alert { color: var(--label); }
@media (hover: hover) and (pointer: fine) {
  .rd-title:hover, .rd-match .radar-match a:hover, .rd-why-list .radar-match a:hover,
  .rd-sweep-name a:hover { color: var(--accent-text-hover); }
}
.radar-pages {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem; margin-top: 1rem;
}
.radar-pages .rd-note { margin: 0; }
.rd-page-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* the sites: cards; a stopped one spans the row with a red hairline. Flex, not a grid:
   the cards left on a row share it, so two working sites never sit beside an empty column. */
.rd-sites { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.rd-site { display: block; flex: 1 1 min(100%, 28rem); min-width: 0; scroll-margin-top: calc(var(--banner-h) + 1rem); }
.rd-site.is-stopped { flex-basis: 100%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent); }
.rd-site:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.rd-site-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem 1rem; }
.rd-site-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; min-width: 0; flex: 1 1 12rem; }
.rd-site-name h3 { margin: 0; font-size: var(--text-lg); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.rd-site.is-off h3 { color: var(--label-2); }
.rd-domain { flex: 1 1 100%; margin-top: -0.375rem; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); overflow-wrap: anywhere; }
.rd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1rem 1.5rem; margin: 1rem 0 0; }
.rd-facts > div { min-width: 0; }
.rd-facts dt { margin: 0 0 0.125rem; font-size: var(--text-sm); font-weight: 600; color: var(--label-2); }
.rd-facts dd { margin: 0; font-size: var(--text-md); line-height: 1.45; }
.rd-facts dd.rd-fact-note { margin-top: 0.125rem; }
.rd-fact-note { font-size: var(--text-sm); line-height: 1.4; color: var(--label-2); }
.rd-facts .rd-fact-note { font-size: var(--text-sm); }
.rd-switch-note { margin: 0.75rem 0 0; font-size: var(--text-sm); line-height: 1.4; color: var(--label-2); }
.rd-explain { margin: 1.25rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--separator-soft); gap: 0.875rem; }
.rd-explain dd { font-size: var(--text-md); line-height: 1.5; max-width: var(--measure); }
/* a full-width (stopped) card on a wide Mac: what / why / what to do side by side */
@media (min-width: 1341px) {
  .rd-site.is-stopped .rd-explain { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem; }
  .rd-site.is-stopped .rd-explain div { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0.25rem; }
}
.rd-relearn-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 2rem; margin: 1.25rem 0 0; }
.rd-relearn-grid > * { min-width: 0; }
.rd-mini { margin: 0 0 0.5rem; font-size: var(--text-md); font-weight: 600; color: var(--label); }
.rd-relearn > .rd-fact-note { margin: 0 0 0.75rem; }
.rd-relearn .search-ladder-actions { flex-direction: column; align-items: flex-start; margin: 0; }
.rd-relearn .search-ladder-actions .btn { height: auto; padding-block: 0.375rem; text-align: left; white-space: normal; line-height: 1.38; }
/* the ladder: one grouped list, the method in use tinted blue */
.rd-ladder { display: block; border-radius: var(--radius); background: var(--surface-2); overflow: hidden; }
.rd-ladder .rung {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.625rem 1rem; border: 0; border-radius: 0; background: transparent;
}
.rd-ladder .rung + .rung { border-top: 1px solid var(--separator); }
.rd-ladder .rung.fixed { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.rd-ladder .rung.failing { background: color-mix(in srgb, var(--red) 14%, transparent); }
.rd-rung-text { display: grid; gap: 0.0625rem; min-width: 0; flex: 1 1 12rem; }
.rd-ladder .rung { flex-wrap: wrap; row-gap: 0.125rem; }
.rd-ladder .rung-n { font-size: var(--text-sm); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--gray-text); }
.rd-ladder .rung.fixed .rung-n { color: var(--accent-text); }
.rd-ladder .rung.failing .rung-n { color: var(--red-text); }
.rd-ladder .rung-label { font-size: var(--text-md); line-height: 1.4; }
.rd-ladder .rung-cost { flex: none; font-size: var(--text-sm); color: var(--label-2); white-space: nowrap; }
.rd-fold { margin-top: 0.75rem; max-width: none; }
.rd-fold + .rd-fold { margin-top: 0.25rem; }
.rd-fold .ladder-wrap { margin-top: 0.625rem; gap: 0.5rem; }
.rd-fold .rd-mini { margin: 0; font-size: var(--text-sm); color: var(--label-2); }
.radar-url { margin: 0.625rem 0 0; }
.radar-url code {
  display: block; padding: 0.625rem 0.875rem; border-radius: var(--radius-btn); background: var(--surface-2);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--text-sm); line-height: 1.45;
  color: var(--label); overflow-wrap: anywhere;
}
/* the on/off switch (only the Radar has one): blue when on, the word beside it */
.switch {
  appearance: none; border: 0; background: transparent; color: var(--label); font: inherit;
  display: inline-flex; align-items: center; gap: 0.625rem; min-height: 44px; padding: 0 0.25rem;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.switch-track {
  position: relative; width: 44px; height: 26px; border-radius: 999px; flex: none;
  background: var(--fill-strong); transition: background-color 160ms var(--ease-out);
}
.switch-thumb {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 200ms var(--ease-out);
}
.switch[aria-checked="true"] .switch-track { background: var(--accent); }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(18px); }
.switch:active .switch-thumb { width: 26px; }
.switch[aria-checked="true"]:active .switch-thumb { transform: translateX(14px); }
.switch-label { font-size: var(--text-md); font-weight: 500; color: var(--label); }
.switch[disabled] { opacity: 0.6; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .switch-track, .switch-thumb { transition: none; }
}

/* the sweeps per Product */
.rd-sweep-head, .rd-sweep {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.7fr) minmax(0, 1fr) 22rem;
}
.rd-sweep > .rd-cell { padding: 0.75rem 1rem; }
.rd-sweep-name a {
  display: block; font-size: var(--text-row); font-weight: 600; line-height: 1.35;
  color: var(--label); text-decoration: none; overflow-wrap: anywhere;
}
.rd-sweep-name .chip { margin-top: 0.375rem; }
.rd-sweep-last, .rd-sweep-next { font-size: var(--text-md); line-height: 1.4; }
.rd-sweep-next { color: var(--label-2); }
.rd-sweep-action { text-align: right; }
.rd-sweep-action .btn { height: auto; padding-block: 0.375rem; white-space: normal; text-align: right; line-height: 1.3; }
.rd-sweep > .rd-why { margin-top: -0.375rem; }
.rd-sweep > .rd-why > summary { display: block; }  /* not the Product page's flex .run summary */
.rd-sweep .run-stores.rd-why-body { list-style: none; display: block; padding: 0.25rem 1rem; }
.rd-sweep .run-stores.rd-why-body li { padding: 0.625rem 0; gap: 0.25rem; font-size: var(--text-sm); }
.rd-sweep .run-stores.rd-why-body li + li { border-top: 1px solid var(--separator-soft); }

/* "Colar um link": the shared form in a tile */
.rd-paste { margin-top: 2.5rem; }
.rd-paste .link-paste { margin: 0; gap: 0.5rem; scroll-margin-top: calc(var(--banner-h) + 1rem); }
.rd-paste .group-help { max-width: var(--measure); margin-bottom: 0.5rem; }
.rd-paste .paste-form {
  flex-wrap: wrap; max-width: 56rem; padding: 1.25rem 1.375rem;
  border-radius: var(--radius-tile); background: var(--surface-1);
}
.rd-paste .paste-form input { flex: 1 1 20rem; min-width: 0; }
/* wide Mac with links in progress: the form on the left, "Cadastros em andamento" beside it */
@media (min-width: 1101px) {
  .rd-paste .link-paste:has(.analysis) {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 2.5rem; align-items: start;
  }
  .rd-paste .link-paste:has(.analysis) > * { grid-column: 1; }
  .rd-paste .link-paste:has(.analysis) > .analyses { grid-column: 2; grid-row: 1 / span 8; margin-top: 0; }
  .rd-paste .link-paste:has(.analysis) .paste-form { max-width: none; }
}

/* under 1340 px (as on Lojas) the two tables become stacked rows, each value with its label:
   below that the fixed columns leave the signal's name a sliver beside the sidebar */
@media (max-width: 1340px) {
  .rd-tip-head, .rd-sweep-head { display: none; }
  .rd-tip, .rd-sweep { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.875rem; padding: 0.875rem 1rem 0.375rem; }
  .rd-tip > .rd-cell, .rd-sweep > .rd-cell { padding: 0; }
  .rd-lab { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; color: var(--label-2); }
  .rd-lab::after { content: ": "; }
  .rd-match .rd-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .rd-sig { flex: 1 1 100%; }
  .rd-price { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin-top: 0.375rem; text-align: left; }
  .rd-price .radar-price, .rd-usual { display: inline; }
  .rd-price .chip { margin-top: 0; }
  .rd-state { order: 2; flex: 0 0 auto; margin-top: 0.375rem; }
  .rd-store { order: 3; color: var(--label-2); }
  .rd-seen { order: 4; }
  .rd-match { order: 5; flex: 1 1 100%; margin-top: 0.5rem; }
  .rd-match .rd-lab { display: block; margin-bottom: 0.25rem; }
  .rd-match .rd-lab::after { content: none; }
  .rd-why { order: 6; flex: 1 1 100%; margin: 0; padding: 0; }
  .rd-why[open] { padding-bottom: 0.5rem; }
  .rd-sweep-name, .rd-sweep-last, .rd-sweep-next { flex: 1 1 100%; }
  .rd-sweep-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; }
  .rd-sweep-name .chip { margin-top: 0; }
  .rd-sweep-last { margin-top: 0.125rem; color: var(--label-2); }
  .rd-sweep-action { flex: 1 1 100%; text-align: left; margin-top: 0.5rem; }
  .rd-sweep-action .btn { white-space: normal; text-align: left; }
  .rd-sweep > .rd-why { margin: 0; }
}
@media (max-width: 900px) {
  .rd-relearn-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .rd-back { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .rd-back .back-link { margin-bottom: 0; }
  .rd-paste-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    margin-right: -0.5rem; border-radius: 22px; color: var(--accent-text);
  }
  .rd-how { margin: -1rem 0 1.5rem; }
  .page-actions:has(.rd-paste-link) { display: none; }  /* on the iPhone: the link icon beside "‹ Mais" */
  /* nowrap: a wrapping column would size its line to the longest Product name in the select */
  .rd-tools { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .rd-segs { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0.5rem; }
  .radar-product-filter label { flex: 1 1 100%; }
  .radar-product-filter select { flex: 1 1 100%; width: 100%; max-width: none; }
  .radar-product-filter .btn { flex: 1 1 100%; }
  .rd-sites { gap: 12px; }
  .rd-site { padding: 1rem; }
  .rd-paste .paste-form { padding: 1rem; flex-wrap: nowrap; }  /* a column there (shared rule) */
  .rd-paste .paste-form input, .rd-paste .paste-form .btn { flex: none; }
  .radar-pages .btn { flex: 1 1 0; }
  .rd-page-btns { flex: 1 1 100%; }
}
@media (pointer: coarse) {
  .radar-product-filter select { min-height: 44px; }
}
/* ===== end screen: radar ===== */

/* ===== screen: custos ===== */
/* Custos (templates/custos.html, _costs_body.html, _cost_macros.html, _platform_figures.html):
   one tile per platform (verdict chip, the big figure, meter, projection, the provider's own
   numbers), "IA e o mês inteiro", "Por produto" as a table (stacked under 1100 px), then
   "Mais produtos" beside every "Como calculamos". Colour always goes with its word. */
.custos .page-header { margin-bottom: 0.5rem; }
.custos .page-header .subtitle { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; }
.custos > #como-custos { margin: 0 0 0.5rem; }
.costs-body > .notice { margin: 1.5rem 0 0; }
.cost-group > .sec-head:first-child { margin-top: 2.5rem; }

/* the platform tiles: 4 in a row only when each has room for its title and both chips
   (≥ 1800 px window); below that 2 × 2, and from 1380 px each tile puts its provider part
   ("Sem chave salva", the balance link) in a second column beside the figures. The IA row
   uses the same columns: the IA tile is one, "Um mês inteiro" takes the rest at its own
   height (no half-empty card). */
.cost-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: stretch; }
.cost-grid-ia { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.cost-grid-ia > .cost-month { align-self: start; }
@media (min-width: 1800px) {
  .cost-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cost-grid-ia > .cost-month { grid-column: span 3; }
}
@media (min-width: 1380px) and (max-width: 1799px) {
  .cost-platform {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(7, auto) 1fr;
    column-gap: 1.75rem; align-content: start;
  }
  .cost-platform > * { grid-column: 1; }
  .cost-platform > .cost-card-head { grid-column: 1 / -1; }
  .cost-platform > .cost-foot {
    grid-column: 2; grid-row: 2 / -1; align-self: start; margin-top: 0.25rem; padding: 0 0 0 1.75rem;
    border-top: 0; border-left: 1px solid var(--separator);
  }
}
.cost-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.375rem 0.5rem; }
.cost-card-head h3 { margin: 0; min-width: 0; font-size: var(--text-body); line-height: 1.4; font-weight: 600; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.cost-chips { display: inline-flex; flex-wrap: wrap; gap: 0.375rem; }
.cost-platform p { margin: 0; }
.cost-what { margin-top: -0.375rem !important; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); }
.cost-amount { margin-top: 0.25rem !important; font-size: var(--text-kpi); line-height: 1.19; font-weight: 700; letter-spacing: -0.02em; }
.cost-of { margin-top: -0.25rem !important; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); font-variant-numeric: tabular-nums; }
.cost-platform > .meter { margin: 0.25rem 0 0.125rem; }
.cost-line { font-size: var(--text-sm); line-height: 1.33; color: var(--label); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cost-count { color: var(--label-2); }
.cost-reach.is-yellow { color: var(--yellow); }
.cost-reach.is-red { color: var(--red-text); font-weight: 600; }
.cost-foot {
  display: flex; flex-direction: column; gap: 0.5rem; margin-top: auto; padding-top: 0.75rem;
  border-top: 1px solid var(--separator); min-width: 0;
}
.cost-foot:empty { display: none; }
.cost-figure {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; margin: 0;
  font-size: var(--text-sm); line-height: 1.33; color: var(--label); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.cost-figure-text { min-width: 0; }
.cost-source { margin: 0; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); overflow-wrap: anywhere; }
.cost-connect { margin: 0; font-size: var(--text-sm); line-height: 1.33; color: var(--label); overflow-wrap: anywhere; }
.cost-connect a, .cost-link { font-weight: 600; }
.cost-link {
  display: inline-flex; align-items: baseline; gap: 0.25rem; font-size: var(--text-sm); line-height: 1.33;
  color: var(--accent-text); text-decoration: none; overflow-wrap: anywhere;
}
.cost-link svg { flex: none; }
.cost-provider { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.5rem 0.75rem; min-width: 0; }
.cost-figures { display: flex; flex-direction: column; gap: 0.5rem; flex: 1 1 10rem; min-width: 0; }
.cost-refresh { flex: none; }
/* Q60: a Scraper with several keys lists each one under its total: its nickname, its own
   spend of its own cap (and the verdict word), a thin meter, its readings and its account. */
.cost-keys { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--separator); }
.cost-key { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.875rem 0; min-width: 0; }
.cost-key + .cost-key { border-top: 1px solid var(--separator); }
.cost-key-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; margin: 0; font-size: var(--text-md); line-height: 1.38; }
.cost-key-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.cost-key-figs { margin: 0; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); font-variant-numeric: tabular-nums; }
.cost-key-figs b { color: var(--label); font-weight: 600; }
.cost-key .meter { height: 6px; }

/* the month as a whole */
.cost-month { gap: 1rem; }
.cost-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem 2rem; }
.cost-bar { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.cost-bar-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 0.75rem; margin: 0; font-size: var(--text-md); line-height: 1.38; }
.cost-bar-name { font-weight: 600; }
.cost-bar-figs { color: var(--label-2); font-variant-numeric: tabular-nums; }
.cost-bar-figs b { color: var(--label); font-weight: 600; }
.cost-verdict { margin: 0; font-size: var(--text-md); line-height: 1.5; color: var(--label-2); max-width: var(--measure); }

/* per Product */
.cost-products-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 0.75rem 1.5rem; margin: 2.5rem 0 1rem;
}
.cost-products-title { flex: 1 1 26rem; min-width: 0; }
.cost-products-title .sec-help { margin: 0.375rem 0 0; }
.cost-apply-all { display: flex; flex-direction: column; align-items: flex-end; gap: 0.375rem; max-width: 30rem; }
.cost-apply-all small { font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); text-align: right; }
.cost-table { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; font-variant-numeric: tabular-nums; }
.cost-table-head, .cost-product {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr) minmax(15rem, 1fr) 14rem; align-items: start;
}
.cost-table-head {
  border-bottom: 1px solid var(--separator); font-size: var(--text-caption); font-weight: 600;
  color: var(--label-2); letter-spacing: 0.01em;
}
.cost-table-head > span { padding: 0.75rem 1rem; }
.cost-table-head .cost-act-head { text-align: right; }
.cost-product + .cost-product { border-top: 1px solid var(--separator-soft, rgba(84, 84, 88, 0.35)); }
.cost-cell { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; padding: 0.875rem 1rem; font-size: var(--text-md); line-height: 1.38; }
.cost-name { flex-direction: row; align-items: flex-start; gap: 0.875rem; }
.cost-name-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.125rem; flex: 1 1 auto; min-width: 0; }
.cost-name-line { overflow-wrap: anywhere; }
.cost-pname { color: var(--label); font-weight: 600; font-size: var(--text-row); line-height: 1.35; text-decoration: none; }
.cost-product.is-paused .cost-pname { color: var(--label-2); }
@media (hover: hover) and (pointer: fine) { .cost-pname:hover { color: var(--accent-text); } }
.cost-sub { display: block; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); overflow-wrap: anywhere; }
.cost-sub b { color: var(--label); font-weight: 600; }
.cost-nophoto { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; margin-top: 0.375rem; }
.cost-nophoto .btn { gap: 0.375rem; }
.cost-detail { margin-top: 0.25rem; }
.cost-detail-body { display: grid; gap: 0.25rem; margin-top: 0.375rem; max-width: 60ch; }
.cost-detail-body small { font-size: var(--text-sm); line-height: 1.4; overflow-wrap: anywhere; }
.cost-detail-body .cost-suggestion { color: var(--label); font-weight: 500; }
.cost-cell-label { display: none; }
.cost-sug .chip { align-self: flex-start; }
.cost-act { align-items: flex-end; }
.cost-after { margin: 1rem 0 0; max-width: var(--measure); }

/* more Products, and every "Como calculamos" */
.cost-end { align-items: start; }
.cost-scale-row .list-body { padding: 0.625rem 0; flex-wrap: wrap; }
.cost-scale-row .list-title { font-size: var(--text-row); }
.cost-folds { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; }
.cost-fold { max-width: none; padding: 0 1rem; color: var(--label); }
.cost-fold + .cost-fold > summary { border-top: 1px solid var(--separator); }
.cost-fold > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; width: auto;
  min-height: 3.25rem; font-size: var(--text-row); line-height: 1.4; color: var(--label);
}
.cost-fold > summary::after { color: var(--accent-text); }
.cost-fold > .how-body { margin: 0 0 1rem; font-size: var(--text-sm); }

@media (max-width: 1100px) {
  .cost-grid-ia { grid-template-columns: minmax(0, 1fr); }
  .cost-table-head { display: none; }
  .cost-product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "name name" "now sug" "act act"; padding: 0.875rem 1rem; gap: 0.75rem; }
  .cost-cell { padding: 0; }
  .cost-name { grid-area: name; }
  .cost-now { grid-area: now; }
  .cost-sug { grid-area: sug; }
  .cost-act { grid-area: act; align-items: stretch; }
  .cost-act:not(:has(form)) { display: none; }
  .cost-cell-label { display: block; font-size: var(--text-caption); font-weight: 600; letter-spacing: 0.01em; color: var(--label-2); }
}
@media (max-width: 760px) {
  .custos .page-header .page-actions { display: none; }  /* the same link is in "Como funciona" */
  .custos .page-header .subtitle { font-size: var(--text-sm); }
  .cost-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* the chips keep their size and go under the title when they do not fit beside it
     (a chip only wraps inside its pill when it alone is wider than the tile) */
  .cost-card-head > :is(.chip, .cost-chips) { flex: none; max-width: 100%; }
  .cost-amount { font-size: 1.75rem; }
  .cost-link { min-height: 44px; align-items: center; }
  .cost-products-head { margin-top: 2rem; }
  .cost-apply-all { align-items: stretch; max-width: none; width: 100%; }
  .cost-apply-all .btn { min-height: 50px; font-size: var(--text-body); }
  .cost-apply-all small { text-align: left; }
  .cost-act .btn { width: 100%; }
  .cost-fold > summary { min-height: 52px; }
}
/* A finger target: the Product's name is a link to its page (44 px on a touch screen). */
@media (pointer: coarse) {
  .cost-name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
  .cost-pname { display: flex; align-items: center; min-height: 44px; }
}
/* ===== end screen: custos ===== */

/* ===== screen: ajustes ===== */
/* Ajustes (redesign 2026-11-19, Ajustes.dc.html): iOS Settings grouped lists.
   Mac: the section index ("Seções": title + current value) in a 15rem column beside the
   sections; under 1100 px it sits above them. iPhone: the index is the grouped list with
   icon tiles (Gastos e IA, Quando checar, Alertas e busca, Avançado, Conexões), the
   sections follow. Each section: title, one help line, the inset list, "Como funciona".
   A picked choice shows a check on the right (a real radio underneath). One save bar that
   sticks above the tab bar while something is unsaved. Conexões save each account alone. */
.aj :is(.group, .fold, #connections, #eval-retest, .conn) { scroll-margin-top: calc(var(--banner-h) + 1rem); }
.aj-grid { display: grid; grid-template-columns: 20rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.aj-main { min-width: 0; }
/* The index stays in view while the sections scroll (no empty left column below it). */
.aj-grid > .section-index {
  position: sticky; top: calc(var(--banner-h) + 1.5rem);
  max-height: calc(100dvh - var(--banner-h) - 3rem); overflow-y: auto; overscroll-behavior: contain;
}
.aj-phone-only, .aj-phone-inline { display: none; }

/* the section index */
.section-index { min-width: 0; }
.aj-index-head { margin: 0 0 0.5rem 0.25rem; font-size: var(--text-sm); font-weight: 600; color: var(--label-2); }
.aj-index-lists { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; }
.aj-index-title { display: none; }
.aj-index-lists .list { background: transparent; border-radius: 0; }
.aj-index-lists .list-row { min-height: 3rem; background: transparent; }
.aj-index-lists .list-body { padding: 0.5rem 0; gap: 0.5rem; }
.aj-index-lists .list-title { font-size: var(--text-row); line-height: 1.3; white-space: nowrap; }
.aj-index-lists .list-trail { font-size: var(--text-sm); gap: 0.5rem; white-space: nowrap; }
.aj-index-lists .aj-icon, .aj-index-lists .aj-cell-sub { display: none; }
/* One list on the Mac: every group after the first opens with the inset separator. */
.aj-index-lists .aj-index-group .list-row:first-child > .list-body { border-top: 1px solid var(--separator); }
.aj-index-lists > .aj-index-part:first-child > .aj-index-group:first-child .list-row:first-child > .list-body { border-top: 0; }
.aj-index-foot { margin: 0.75rem 0.25rem 0; font-size: var(--text-sm); line-height: 1.4; color: var(--label-2); }

/* sections */
.aj .prefs-form { gap: 2.5rem; }
.aj .group { display: block; }
.aj .group > h2 { margin: 0; }
/* A sub-section title ("Quando a IA recusar", "Avaliados por loja…", "Outros Scrapers")
   is as large as the section titles beside it, a little lighter. */
.aj .group > h3, .aj .prefs-form .mini-head {
  margin: 0; font-size: var(--text-xl); line-height: 1.27; font-weight: 600; letter-spacing: -0.015em; color: var(--label);
}
.aj .prefs-form .mini-head { margin-top: 2rem; }
.aj .group-help { margin: 0.375rem 0 1rem; line-height: 1.45; max-width: var(--measure); }
.aj .group > .summary-line { margin: -0.5rem 0 1rem; color: var(--label); font-size: var(--text-row); }
.aj .group-foot { margin: 0.75rem 0 0; font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); max-width: var(--measure); }
.aj .group-foot a { font-weight: 600; text-decoration: none; }
.aj .choice .row-label small { max-width: var(--measure); }
.aj .connections .conn-subhead { margin-top: 2rem; }
.aj :is(.group, .aj-part) > :is(.how, .group-note) { margin-top: 0.75rem; }
.aj :is(.group, .aj-part) > .error, .aj .group > .rows + .error { margin-top: 0.5rem; }

/* A wide Mac (≥ 1800 px): each section puts its title and help in a column on the left and
   its list on the right, as macOS Settings does, so the lists are not 1,300 px wide with
   the field far from its name and the help is not a narrow strip above a wide list. */
@media (min-width: 1800px) {
  .aj :is(.group, .aj-part) {
    display: grid; grid-template-columns: [text] 22rem [list] minmax(0, 1fr); grid-template-rows: auto auto auto 1fr;
    column-gap: 2.5rem; row-gap: 0; align-content: start;
  }
  .aj :is(.group, .aj-part) > * { grid-column: list; min-width: 0; }
  .aj :is(.group, .aj-part) > :is(h2, h3, .group-help, .summary-line, .conn-title),
  .aj :is(.connections, .connections > .aj-part) > .how { grid-column: text; }
  .aj :is(.group, .aj-part) > .rows { grid-row: 1 / span 4; align-self: start; }
  .aj :is(.group, .aj-part) > .group-help { margin-bottom: 0.75rem; }
  .aj .group > .summary-line { margin: 0 0 0.75rem; }
  .aj .group > .aj-part { grid-column: 1 / -1; margin-top: 2.5rem; }
  .aj .prefs-form .mini-head, .aj .connections .conn-subhead { margin-top: 0; }
  .aj .conn-title { flex-direction: column; align-items: flex-start; gap: 0.25rem; margin-bottom: 0.25rem; }
  .aj .fold.advanced > .fold-body { padding-inline: 1.25rem; }
  .aj .advanced :is(.group, .aj-part) { grid-template-columns: [text] 20rem [list] minmax(0, 1fr); }
}

/* rows: a separator inset 1rem on both sides, as in iOS */
.aj .row {
  position: relative; gap: 1.5rem; min-height: 3.5rem; padding: 0.875rem 1rem;
}
.aj .row + .row, .aj .error + .row { border-top: 0; }
.aj .rows > :is(.row, .error) + .row::before {
  content: ""; position: absolute; top: 0; left: 1rem; right: 1rem; height: 1px; background: var(--separator);
}
.aj .row-label { flex: 1 1 auto; min-width: 0; font-size: var(--text-body); line-height: 1.4; }
.aj .row-label small { display: block; font-size: var(--text-sm); line-height: 1.33; color: var(--label-2); }
.aj .aj-row-title small { display: inline; }
.aj .row-input { flex: none; gap: 0.5rem; }
.aj .row-input input { width: 5rem; font-size: var(--text-row); font-variant-numeric: tabular-nums; }
.aj .row-input.money input { width: 6.5rem; }
.aj .row-input input[type="time"] { width: 7.5rem; text-align: left; }
.aj .row-input input[name="cep"] { width: 9rem; text-align: left; }
.aj .aj-slots .row-input { flex: 0 1 17rem; }
.aj .aj-slots .row-input input { width: 100%; text-align: left; }
.aj .row-input select { font-size: var(--text-row); }
.aj .unit { font-size: var(--text-md); }

/* Teto mensal: the month's spend, a small bar and the verdict in a chip */
.aj-spend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 0.375rem;
}
.aj .aj-spend small.spend { display: inline; color: var(--label-2); font-variant-numeric: tabular-nums; }
.aj .aj-spend small.spend .money { color: var(--label); font-weight: 600; }
.aj-spend .aj-meter { display: inline-block; width: 6rem; height: 6px; }

/* choices: the whole row picks; a check on the right marks the pick (and the name is bold) */
.aj .choice { cursor: pointer; flex-wrap: nowrap; }
@media (hover: hover) and (pointer: fine) { .aj .choice:hover { background: var(--surface-1-hover); } }
.aj .choice-name { display: block; }
.aj .choice:has(input:checked) .choice-name { font-weight: 600; }
.aj .row-label small.choice-cost { margin-top: 0.125rem; font-variant-numeric: tabular-nums; }
.aj .row-label small.choice-cost.warn { color: var(--orange); }
.aj .choice input[type="radio"] {
  width: 22px; height: 22px; margin: 0; border: 0; border-radius: 0; background-color: transparent; box-shadow: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 14'%3E%3Cpath d='M1.5 7.5 6.5 12 16.5 2' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 14'%3E%3Cpath d='M1.5 7.5 6.5 12 16.5 2' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 14px no-repeat;
}
.aj .choice input[type="radio"]:checked { background-color: var(--accent-text); box-shadow: none; }
.aj .choice:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: -2px; border-radius: var(--radius); }

/* Avançado: one tile; its settings sit on a darker well inside it */
.aj .fold.advanced { background: var(--surface-1); border: 0; border-radius: var(--radius); }
.aj .fold.advanced > summary { display: flex; flex-wrap: nowrap; align-items: center; gap: 1rem; min-height: 4.5rem; padding: 0.75rem 1rem; }
.aj-fold-text { flex: 1 1 auto; min-width: 0; }
.aj .fold.advanced .fold-title { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.015em; }
.aj .fold.advanced .fold-sum { display: block; margin-top: 0.125rem; line-height: 1.33; }
.aj .fold.advanced .fold-action { flex: none; font-size: var(--text-md); }
.fold.advanced .when-open, .fold.advanced[open] .when-closed { display: none; }
.fold.advanced[open] .when-open { display: inline; }
.aj .fold.advanced > .fold-body { gap: 2rem; padding: 1.5rem 1rem 1.5rem; }
.aj .advanced .group > h2 { font-size: var(--text-lg); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.aj .advanced .group-help { margin-bottom: 0.75rem; }
.aj .advanced .rows { background: var(--surface-2); }
.aj .advanced .row-input input { background: var(--surface-3); }
.aj .advanced .row-label small, .aj .advanced .unit { color: var(--gray-text); }
@media (hover: hover) and (pointer: fine) { .aj .advanced .choice:hover { background: var(--surface-3); } }

/* the save bar: a tile at the end of the form; it floats above the tab bar while unsaved */
.save-bar {
  flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1rem;
  padding: 0.875rem 1rem 0.875rem 1.25rem; border-radius: var(--radius-tile); background: var(--surface-1);
}
.save-text { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.625rem; flex: 1 1 18rem; min-width: 0; }
.save-state { display: none; }
.prefs-form.is-dirty .save-state:not(:empty) {
  display: inline-flex; align-items: center; gap: 0.375rem; min-height: 1.625rem; padding: 0.125rem 0.625rem;
  border-radius: var(--radius-chip); font-size: var(--text-caption); font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
  color: var(--orange); background: color-mix(in srgb, var(--orange) 16%, transparent);
}
.save-state::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.save-note { font-size: var(--text-sm); line-height: 1.4; color: var(--label-2); }
.save-note.when-dirty { display: none; }
.prefs-form.is-dirty .save-note.when-dirty { display: inline; }
.prefs-form.is-dirty .save-note.when-clean { display: none; }
.save-discard { display: none; }
.prefs-form.is-dirty .save-discard { display: inline-flex; }
.aj .btn.ghost.save-discard { background: var(--fill); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .aj .btn.ghost.save-discard:hover { background: var(--fill-strong); } }
.save-bar > .btn.primary { padding-inline: 1.25rem; }
.prefs-form.is-dirty .save-bar {
  position: sticky; bottom: calc(var(--tabbar-h, 0px) + 0.75rem); z-index: 30;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
}

/* Conexões: one row per account (name + state chips, actions, "Trocar chave") */
.aj .connections-block { margin-top: 2.5rem; }
.conn-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.conn-saves { font-size: var(--text-sm); font-weight: 600; color: var(--label-2); }
.aj .connections > .group-help { margin-bottom: 0.25rem; }
.aj .connections > .how { margin: 0.5rem 0 1rem; }
.conn { margin: 0 1rem; padding: 1rem 0; }
.conn + .conn { border-top: 1px solid var(--separator); }
.conn-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.conn-name { min-width: 0; }
.conn-name strong { font-size: var(--text-body); line-height: 1.4; font-weight: 600; }
.conn-name small { font-size: var(--text-sm); color: var(--label-2); }
.conn-chips { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; }
.conn-actions, .conn-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.75rem; }
.conn-form { max-width: 40rem; }
.conn-form.conn-zone { max-width: 46rem; }
.conn-zone label { flex: none; font-size: var(--text-sm); color: var(--label-2); }
.conn-zone input { flex: 1 1 12rem; min-width: 0; }
.conn-cost { font-size: var(--text-sm); color: var(--label-2); }
/* "Último teste: hoje 10:05, funcionou": kept across reloads, quieter than a fresh answer. */
.conn-last { margin: 0.5rem 0 0; font-size: var(--text-sm); color: var(--label-2); }
.conn-help { margin: 0.5rem 0 0; font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); max-width: var(--measure); }
.conn-replace { margin-top: 0.75rem; font-size: var(--text-sm); }
.conn-replace .conn-form { margin-top: 0.625rem; }
.conn-steps { margin: 0.75rem 0 0 1.25rem; padding: 0; color: var(--label-2); font-size: var(--text-md); display: grid; gap: 0.25rem; }
.conn-subhead { margin: 2rem 0 0; font-size: var(--text-xl); line-height: 1.27; font-weight: 600; letter-spacing: -0.015em; }
.conn-subhead + .group-help { margin-bottom: 0.25rem; }
.aj .connections .conn-subhead + .group-help + .how { margin: 0.5rem 0 1rem; }
.conn-note { margin: 0.75rem 0 0; font-size: var(--text-sm); padding: 0.5rem 0.75rem; border-radius: 10px; animation: enter 180ms var(--ease-out) both; }
.conn-note.ok { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.conn-note.error { color: var(--red-text); background: color-mix(in srgb, var(--red) 14%, transparent); font-weight: 500; }
.conn-note.info { color: var(--label-2); background: var(--fill); }
.conn-actions .conn-note { flex-basis: 100%; margin: 0 0 0.25rem; }

@media (max-width: 1100px) {
  .aj-grid { grid-template-columns: minmax(0, 1fr); }
  .aj-grid > .section-index { position: static; max-height: none; overflow: visible; }
}
/* Q60: a Scraper's keys, one row each inside its account (nickname + last 4, its state,
   Testar / Remover, "Trocar chave ou apelido" folded), then "Adicionar outra chave". */
.conn-keys { list-style: none; margin: 0.875rem 0 0; padding: 0; border-radius: 12px; background: var(--fill); }
.conn-key { padding: 0.875rem 1rem; min-width: 0; }
.conn-key + .conn-key { border-top: 1px solid var(--separator); }
.conn-key-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.conn-key-name { min-width: 0; overflow-wrap: anywhere; }
.conn-key-name strong { font-size: var(--text-row); font-weight: 600; }
.conn-key-name small { font-size: var(--text-sm); font-weight: 500; color: var(--label-2); margin-left: 0.25rem; }
.conn-key .conn-actions { margin-top: 0.625rem; }
.conn-key .conn-replace { margin-top: 0.625rem; }
.conn-add { margin-top: 0.875rem; }
.conn-add .conn-help { margin-top: 0.5rem; }
.conn-add-form input[name="apelido"] { flex: 0 1 12rem; }
/* iPhone: the index becomes the grouped list with icon tiles; inputs stay on the right */
@media (max-width: 760px) {
  .conn-key { padding: 0.75rem; }
  .conn-add-form input { flex: 1 1 100%; }
  .aj-phone-only { display: block; }
  .aj-mac-only, .aj-index-head { display: none; }
  .aj .page-header { margin-bottom: 0.5rem; }
  .aj-grid { gap: 0; }
  .aj-index-lists { background: transparent; border-radius: 0; overflow: visible; }
  .aj-index-title { display: block; margin: 2rem 0 0.75rem; font-size: var(--text-xl); }
  .aj-index-lists .list { background: var(--surface-1); border-radius: var(--radius); overflow: hidden; }
  .aj-index-lists .list-row { min-height: 3.5rem; }
  .aj-index-lists .list-body { padding: 0.625rem 0; }
  .aj-index-lists .list-title { font-size: var(--text-body); }
  .aj-index-lists .list-trail { font-size: var(--text-row); }
  .aj-index-lists .aj-icon { display: inline-flex; color: var(--label); }
  .aj-index-lists .aj-cell-sub { display: block; }
  .aj-index-lists .aj-index-group .list-row:first-child > .list-body { border-top: 0; }
  .aj-index-foot { margin: 0.5rem 1rem 0; }
  .aj-main { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--separator); }
  .aj .row { flex-wrap: nowrap; gap: 0.5rem 0.75rem; }
  .aj .row.aj-slots { flex-wrap: wrap; }
  .aj .aj-row-title small { display: block; }
  .aj .aj-spend-month { display: none; }  /* the footnote says the month once */
  .aj .aj-phone-inline { display: inline; }
  .aj .row-input { flex: none; margin-left: auto; justify-content: flex-end; }
  .aj .row-input input { width: 5rem; text-align: right; }
  .aj .row-input.money input { width: 5rem; }
  .aj .row-input input[type="time"] { width: 7.5rem; text-align: left; }
  .aj .row-input input[name="cep"] { width: 9rem; text-align: left; }
  .aj .aj-slots .row-input { flex: 1 1 100%; }
  .aj .aj-slots .row-input input { width: 100%; text-align: left; }
  .aj .aj-spend { gap: 0.25rem 0.5rem; }
  .aj .aj-spend .aj-meter { display: none; }  /* the chip says it; room for the field */
  .aj .fold.advanced > .fold-body { padding: 1.25rem 0.75rem; }
  .save-bar { padding: 0.75rem; gap: 0.625rem; }
  .save-text { flex-basis: 100%; }
  .save-bar .btn { flex: 1 1 0; min-height: 44px; }
  .conn-actions .btn, .conn-form .btn { flex: 1 1 auto; }
  .conn-zone label { flex-basis: 100%; }
}
/* ===== end screen: ajustes ===== */

/* ===== screen: acesso ===== */
/* Login and first-time setup (access.html), the Final Check page (verificacao.html).
   Login: one solid graphite card (#1c1c1e, radius 22) centred on the black canvas, the
   app's blue icon on top, a note under the card. No glow, no glass. */
.access-wrap {
  min-height: calc(100dvh - var(--banner-h));
  display: grid; place-items: center;
  padding: 4rem 1rem;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}
.access-col { width: min(100%, 28rem); }
.access-card {
  display: grid; gap: 1.25rem;
  padding: 2.5rem 2.25rem 2.25rem;
  background: var(--surface-1);
  border-radius: 22px;
  animation: card-in 280ms var(--ease-out) both;
}
/* After a wrong code the page comes back with the field shaking: the card does not enter
   again on top of it (one motion at a time). */
.access-card:has(.shake) { animation: none; }
.shake { animation: shake 300ms var(--ease-out); }
.access-icon {
  justify-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 15px;
  background: var(--accent-fill); color: #fff;
}
.access-head { text-align: center; }
.access-head h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; }
.access-sub { margin-top: 0.375rem; font-size: var(--text-row); line-height: 1.45; color: var(--label-2); }
.access-sub strong { color: var(--label); font-weight: 600; }
.access-form { display: grid; gap: 1.25rem; margin-top: 0.75rem; }
.access-head + .access-form { margin-top: 0.75rem; }
.access-form .field { gap: 0.5rem; }
.access-form .field > span { font-size: var(--text-sm); font-weight: 600; color: var(--label-2); }
.access-form input { height: 3rem; font-size: var(--text-row); }
.access-error {
  display: flex; align-items: flex-start; gap: 0.5rem; margin-top: -0.625rem;
  font-size: var(--text-sm); line-height: 1.4; font-weight: 400;
}
.access-error .icon { flex: none; margin-top: 0.1em; }
.access-submit { width: 100%; min-height: 3rem; font-size: var(--text-row); }
.access-note {
  margin-top: 1.25rem; padding-inline: 0.5rem;
  font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); text-align: center;
}
.access-card .tip { font-size: var(--text-sm); line-height: 1.45; background: var(--surface-2); border-radius: var(--radius-btn); padding: 0.75rem 0.875rem; }
.access-card .hint > summary { justify-self: center; }
.access-card .hint { justify-self: center; text-align: left; }

/* The two setup steps: a word in each, the current one in blue, a done one with ✓. */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem;
  font-size: var(--text-caption);
}
.steps li {
  display: inline-flex; align-items: center; min-height: 1.75rem;
  padding: 0 0.75rem; border-radius: 999px;
  background: var(--fill); color: var(--label-2); font-weight: 600;
}
.steps li.current { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); }
.steps li.done { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.steps li.done::before { content: "✓\00a0"; }

@media (max-width: 760px) {
  .access-wrap { padding-top: calc(1.5rem + env(safe-area-inset-top, 0px)); padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px)); }
  .access-card { padding: 2rem 1.25rem 1.5rem; }
  .access-submit { min-height: 50px; border-radius: var(--radius); font-size: var(--text-body); }
}

/* Final Check (verificacao.html): a detail page. Result and table left, capture right. */
.check-main { display: grid; gap: 2rem; }
.check-compare > .sec-head, .check-capture > .sec-head { margin-top: 0; }
.check-result { gap: 0.875rem; }
.check-result .sec-head { margin: 0; justify-content: flex-start; flex-wrap: wrap; gap: 0.5rem 0.75rem; }
.check-problems { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.375rem; font-size: var(--text-md); line-height: 1.45; }
.check-explain { font-size: var(--text-md); line-height: 1.5; }
.check-foot { font-size: var(--text-sm); color: var(--label-2); }
.check-result .how { margin-top: 0.125rem; }
.check-compare .table th[scope="row"] { color: var(--label-2); font-weight: 600; font-size: var(--text-sm); border-bottom: 0; vertical-align: top; }
.check-compare .table tbody tr + tr th[scope="row"] { border-top: 1px solid var(--separator); }
.check-compare .table td { vertical-align: top; }
.capture-link { display: grid; gap: 0.5rem; text-decoration: none; }
.capture {
  display: block; width: 100%; height: auto; max-height: 48rem; object-fit: contain; object-position: top;
  border-radius: var(--radius-tile); background: var(--surface-1);
}
.capture-open { font-size: var(--text-sm); color: var(--accent-text); }
.capture-none { font-size: var(--text-sm); line-height: 1.45; color: var(--label-2); }
@media (pointer: coarse) {
  .capture-open { display: inline-flex; align-items: center; min-height: 44px; }
}
/* ===== end screen: acesso ===== */
