/* The shared layout for every page and every theme.
   Colours, corners and shadows are variables; each theme file in
   static/themes/ sets them (and nothing else). Mobile first: one narrow column
   that also looks fine on a laptop. Every tap target is at least --tap tall. */

/* ---- defaults and the category palette ---- */
:root {
  --tap: 48px;
  --radius: 14px;
  --radius-small: 10px;
  --shadow: none;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* The category colours (app/categories.py PALETTE): 12 hues and their second
     shades, each in two versions:
     -dark is bright but not neon, for dark themes; -light is deeper, so it shows
     on white. A rainbow theme picks one set (--red: var(--red-dark), ...) and
     the text colour on it (--rainbow-ink). Checked for WCAG AA in the tests. */
  --red-dark: #ff6b6b;    --red-light: #c92a2a;
  --orange-dark: #ff9f43; --orange-light: #c2410c;
  --amber-dark: #ffc145;  --amber-light: #b45309;
  --yellow-dark: #f2e05a; --yellow-light: #a16207;
  --lime-dark: #b5e655;   --lime-light: #4d7c0f;
  --green-dark: #5fd38d;  --green-light: #15803d;
  --teal-dark: #3fd0c0;   --teal-light: #0f766e;
  --cyan-dark: #5cc8f0;   --cyan-light: #0e7490;
  --blue-dark: #6aa8ff;   --blue-light: #1d4ed8;
  --indigo-dark: #9a8cff; --indigo-light: #4338ca;
  --violet-dark: #c58bf2; --violet-light: #7e22ce;
  --pink-dark: #f487c0;   --pink-light: #be185d;
  /* Their second shades ("red-2"): paler on dark themes, darker on light ones. */
  --red-2-dark: #ffb4b4;  --red-2-light: #7f1d1d;
  --orange-2-dark: #ffcf9e;  --orange-2-light: #7c2d12;
  --amber-2-dark: #ffe0a1;  --amber-2-light: #78350f;
  --yellow-2-dark: #fff3b0;  --yellow-2-light: #713f12;
  --lime-2-dark: #dcf5a8;  --lime-2-light: #365314;
  --green-2-dark: #a9ecc3;  --green-2-light: #14532d;
  --teal-2-dark: #a3ece4;  --teal-2-light: #134e4a;
  --cyan-2-dark: #aee3f8;  --cyan-2-light: #164e63;
  --blue-2-dark: #b6d3ff;  --blue-2-light: #1e3a8a;
  --indigo-2-dark: #cdc6ff;  --indigo-2-light: #312e81;
  --violet-2-dark: #e2c3fa;  --violet-2-light: #581c87;
  --pink-2-dark: #fac3df;  --pink-2-light: #831843;
}

/* A category's colour: --c is its fill (chip, bar, chart line), --c-ink the
   text on it. Single-accent themes don't set --red etc., so --c falls back to
   their accent. --pick is the true hue, for the colour picker in Settings. */
.c-red    { --c: var(--red, var(--accent));    --pick: var(--red, var(--red-light)); }
.c-orange { --c: var(--orange, var(--accent)); --pick: var(--orange, var(--orange-light)); }
.c-amber  { --c: var(--amber, var(--accent));  --pick: var(--amber, var(--amber-light)); }
.c-yellow { --c: var(--yellow, var(--accent)); --pick: var(--yellow, var(--yellow-light)); }
.c-lime   { --c: var(--lime, var(--accent));   --pick: var(--lime, var(--lime-light)); }
.c-green  { --c: var(--green, var(--accent));  --pick: var(--green, var(--green-light)); }
.c-teal   { --c: var(--teal, var(--accent));   --pick: var(--teal, var(--teal-light)); }
.c-cyan   { --c: var(--cyan, var(--accent));   --pick: var(--cyan, var(--cyan-light)); }
.c-blue   { --c: var(--blue, var(--accent));   --pick: var(--blue, var(--blue-light)); }
.c-indigo { --c: var(--indigo, var(--accent)); --pick: var(--indigo, var(--indigo-light)); }
.c-violet { --c: var(--violet, var(--accent)); --pick: var(--violet, var(--violet-light)); }
.c-pink   { --c: var(--pink, var(--accent));   --pick: var(--pink, var(--pink-light)); }
.c-red-2 { --c: var(--red-2, var(--accent)); --pick: var(--red-2, var(--red-2-light)); }
.c-orange-2 { --c: var(--orange-2, var(--accent)); --pick: var(--orange-2, var(--orange-2-light)); }
.c-amber-2 { --c: var(--amber-2, var(--accent)); --pick: var(--amber-2, var(--amber-2-light)); }
.c-yellow-2 { --c: var(--yellow-2, var(--accent)); --pick: var(--yellow-2, var(--yellow-2-light)); }
.c-lime-2 { --c: var(--lime-2, var(--accent)); --pick: var(--lime-2, var(--lime-2-light)); }
.c-green-2 { --c: var(--green-2, var(--accent)); --pick: var(--green-2, var(--green-2-light)); }
.c-teal-2 { --c: var(--teal-2, var(--accent)); --pick: var(--teal-2, var(--teal-2-light)); }
.c-cyan-2 { --c: var(--cyan-2, var(--accent)); --pick: var(--cyan-2, var(--cyan-2-light)); }
.c-blue-2 { --c: var(--blue-2, var(--accent)); --pick: var(--blue-2, var(--blue-2-light)); }
.c-indigo-2 { --c: var(--indigo-2, var(--accent)); --pick: var(--indigo-2, var(--indigo-2-light)); }
.c-violet-2 { --c: var(--violet-2, var(--accent)); --pick: var(--violet-2, var(--violet-2-light)); }
.c-pink-2 { --c: var(--pink-2, var(--accent)); --pick: var(--pink-2, var(--pink-2-light)); }
/* Not categorised yet, and special categories (Owed by people): always grey. */
.c-none { --c: var(--grey); --c-ink: var(--grey-ink); --bar-fill: var(--grey); --pick: var(--grey); }

/* ---- page ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
}
main { max-width: 36rem; margin: 0 auto; padding: 1rem 1rem 2.5rem; }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.15rem; margin-top: 1.75rem; }
h3 { font-size: 1rem; margin-top: 1.25rem; }
a { color: var(--link, var(--accent)); }
small, .muted { color: var(--muted); }
code { overflow-wrap: anywhere; }
.small-text { font-size: 0.85rem; margin: 0.3rem 0; }
.error { color: var(--danger-text, var(--danger)); }
.warning, .status-warning { color: var(--warn); }
.status-ok { color: var(--ok); }
.status-mismatch { color: var(--danger-text, var(--danger)); }
.status-undone { color: var(--muted); }

/* ---- header: name, Personal/Business switch, menu ---- */
header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--header-bg, var(--surface));
  border-bottom: 1px solid var(--line);
  /* Rainbow themes draw a thin stripe along the bottom (--header-stripe). */
  background-image: var(--header-stripe, none);
  background-size: 100% 4px;
  background-repeat: no-repeat;
  background-position: bottom;
}
header form { margin: 0; }
header a.brand { color: var(--text); text-decoration: none; font-size: 1.1rem;
                 min-height: var(--tap); display: inline-flex; align-items: center; }
.switch { display: flex; border: 1px solid var(--accent); border-radius: 999px; overflow: hidden; }
.switch button {
  min-height: var(--tap);
  padding: 0 0.9rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-text, var(--accent));
  font-size: 0.95rem;
}
.switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
header nav { order: 3; width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; }
header nav a, header nav button.link {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}
header nav button.link { color: var(--muted); }

/* ---- forms, fields and buttons ---- */
.stack { display: flex; flex-direction: column; gap: 1rem; }
label { display: flex; flex-direction: column; gap: 0.3rem; color: var(--muted); }
input, textarea, select {
  font: inherit;
  font-size: 1rem;             /* 16 px: phones don't zoom in on fields */
  min-height: var(--tap);
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--field-border, var(--muted));
  border-radius: var(--field-radius, var(--radius-small));
  background: var(--field-bg, var(--bg));
  color: var(--text);
  max-width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 1.25rem; height: 1.25rem;
                                               accent-color: var(--accent); flex: none; }
input[type="file"] { padding: 0.6rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px; }
label.inline { flex-direction: row; align-items: center; gap: 0.6rem; min-height: var(--tap); color: var(--text); }

button {
  font: inherit;
  font-weight: 600;
  min-height: var(--tap);
  padding: 0 1.1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-small);
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--text); outline-offset: 2px; }
button.secondary { background: transparent; color: var(--accent-text, var(--accent)); }
button.danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); margin: 1rem 0; }
button.warn { background: var(--warn); border-color: var(--warn); color: var(--on-warn, var(--bg)); }
button.small { font-size: 0.9rem; padding: 0 0.9rem; margin: 0; }
button.link { background: none; border: 0; color: var(--link, var(--accent)); padding: 0; font-weight: normal; }
.inline-form { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.5rem; }

/* Small "open/close" details inside a row (Edit, Show lines, Rename ...). */
details summary { color: var(--link, var(--accent)); cursor: pointer; min-height: var(--tap);
                  display: flex; align-items: center; }

/* ---- cards and rows ---- */
.card { background: var(--surface); border-radius: var(--radius); padding: 0.9rem 1rem;
        margin: 1rem 0; box-shadow: var(--shadow); border: var(--card-border, 0); }
.card h2 { margin-top: 0.25rem; font-size: 1.05rem; word-break: break-word; }
.rows { list-style: none; padding: 0; margin: 0; }
.rows li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows small { display: block; }
.rows details { margin-top: 0.25rem; font-size: 0.95rem; }

.warnings { border-left: 4px solid var(--danger); padding: 0.25rem 0.75rem; margin: 1rem 0; }
.warnings h3 { margin: 0.25rem 0; color: var(--danger-text, var(--danger)); }
.warnings ul { padding-left: 1.1rem; margin: 0.25rem 0; }

dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 1rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.35rem 0.45rem; border-bottom: 1px solid var(--line); }
td { font-variant-numeric: tabular-nums; }

/* ---- lists of lines (transactions, import check, review, receipts) ---- */
.lines { list-style: none; padding: 0; margin: 0; }
.lines li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.lines li:last-child { border-bottom: 0; }
.line-main { display: flex; gap: 0.6rem; align-items: baseline; }
.line-main .date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.line-main .payee { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.line-main .raw { display: block; font-size: 0.75rem; }
.line-main .date-kind { display: block; font-size: 0.7rem; }
.line-main .amount, .amount { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.line-extra { display: flex; gap: 0.3rem 1rem; align-items: center; flex-wrap: wrap; font-size: 0.85rem; margin-top: 0.3rem; }
.category { color: var(--muted); }
.category.review { color: var(--warn); }
.tx .line-extra { justify-content: space-between; }
.tx .date { color: var(--muted); }
.tx details { margin-top: 0.3rem; font-size: 0.95rem; }
.just-saved { background: var(--highlight, var(--surface)); }
.note { display: block; color: var(--text); font-style: italic; overflow-wrap: anywhere; }
.note-marker { font-weight: 600; font-style: normal; color: var(--accent-text, var(--accent)); }
/* One link per line instead of its forms: a big enough tap. */
.change-link { display: inline-flex; align-items: center; min-height: var(--tap); }
form.undo { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
form.undo small { display: block; margin-top: 0.4rem; }

/* ---- category chips and bars ---- */
/* Rainbow themes: a filled pill in the category's colour. Single-accent themes
   set --chip-fill: transparent, so the chip is just its name. */
.chip {
  display: inline-block;
  max-width: 100%;
  padding: var(--chip-pad, 0.1rem 0.65rem);
  border-radius: 999px;
  background: var(--chip-fill, var(--c));
  color: var(--chip-ink, var(--c-ink, var(--rainbow-ink, var(--on-accent))));
  font-weight: 600;
  overflow-wrap: anywhere;
}
.category .chip { font-size: 0.85rem; }
.bar { height: 8px; margin-top: 0.4rem; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--bar-fill, var(--c)); }

/* ---- view tabs and period picker ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.tabs a {
  display: inline-flex; align-items: center; min-height: var(--tap);
  padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; white-space: nowrap; color: var(--text);
}
.tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.period { margin: 0.5rem 0 1rem; }
.period-nav { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin: 0.5rem 0; }
.period-nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 0.5rem;
                white-space: nowrap; text-decoration: none; font-weight: 600; }
.period-form, .filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.period-form label, .filters label { flex: 1 1 8rem; min-width: 0; font-size: 0.85rem; }
.period-form input, .period-form select, .filters input, .filters select { width: 100%; }
.filters { margin-bottom: 1rem; }

/* ---- Summary ---- */
.total-card { background: var(--total-bg, var(--surface)); border-radius: var(--radius);
              padding: var(--total-pad, 1.1rem 1.2rem); margin: 1rem 0; box-shadow: var(--shadow);
              border: var(--card-border, 0); }
.total-card p { margin: 0.2rem 0; }
.big { font-size: 2.6rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em;
       font-variant-numeric: tabular-nums; overflow-wrap: anywhere; color: var(--total-text, var(--text)); }
.figures { list-style: none; padding: 0; margin: 0; }
.figures li { padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.figures li:last-child { border-bottom: 0; }
.figures .line-main { align-items: center; }
.figures .line-extra { gap: 0.2rem 1rem; color: var(--muted); }
.figures li.sum { font-weight: 600; }

/* Wide tables scroll sideways inside their box, never the whole page. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0.5rem 0; }
.table-scroll table { width: auto; min-width: 100%; }
.table-scroll th, .table-scroll td { white-space: nowrap; }
.num { text-align: right; }
table.over-time tbody th, table.over-time tfoot th { font-weight: normal; position: sticky; left: 0; background: var(--bg); }
table.over-time tfoot th, table.over-time tfoot td { font-weight: 600; }

/* ---- trend chart (SVG drawn on the server) ---- */
.chart { margin: 0.5rem 0 1rem; }
.chart svg { width: 100%; height: 180px; display: block; border-bottom: 1px solid var(--line); }
.chart rect.bar-total { fill: var(--chart-bar); }
/* Lines: single-accent themes colour them by order (--series-0 ... 5);
   rainbow themes leave those unset, so each line is its category's colour. */
.series-0 { --line-colour: var(--series-0, var(--c)); }
.series-1 { --line-colour: var(--series-1, var(--c)); }
.series-2 { --line-colour: var(--series-2, var(--c)); }
.series-3 { --line-colour: var(--series-3, var(--c)); }
.series-4 { --line-colour: var(--series-4, var(--c)); }
.series-5 { --line-colour: var(--series-5, var(--c)); }
.chart polyline { stroke: var(--line-colour, var(--c)); }
.chart figcaption { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-top: 0.4rem; }
.swatch { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 3px; margin-right: 0.3rem;
          vertical-align: -0.1rem; background: var(--line-colour, var(--c)); }
.bar-swatch { background: var(--chart-bar); }
/* Labels under the chart: one equal cell per bar; they never widen the page. */
.chart-labels { display: grid; font-size: 0.7rem; color: var(--muted); text-align: center; margin-top: 0.15rem; }
.chart-labels span { min-width: 0; overflow: hidden; white-space: nowrap; }

/* ---- collapsible sections (design pass B) ---- */
/* <details class="section">: a full-width header with the name and count, and
   an arrow that points right when closed and down when open. No JavaScript. */
details.section { margin: 1rem 0; background: var(--surface); border-radius: var(--radius);
                  box-shadow: var(--shadow); border: var(--card-border, 0); }
details.section > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--tap);
  padding: 0.6rem 1rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::after {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2.5px solid var(--accent-text, var(--accent));
  border-bottom: 2.5px solid var(--accent-text, var(--accent));
  transform: rotate(-45deg);
  margin-right: 0.25rem;
}
details.section[open] > summary::after { transform: rotate(45deg); margin-top: -0.3rem; }
details.section[open] > summary { border-bottom: 1px solid var(--line); }
.section-body { padding: 0.25rem 1rem 1rem; }
.section-body > h2:first-child, .section-body > p:first-child { margin-top: 0.5rem; }
/* A section inside a section (Categories → Personal / Business). */
.section-body details.section { margin: 0.75rem 0 0; background: var(--bg); box-shadow: none; }
.section-body details.section > summary { font-size: 1rem; }

/* ---- review list ---- */
.groups { list-style: none; padding: 0; margin: 0; }
.groups > li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.groups > li:last-child { border-bottom: 0; }
.group .line-main .payee { font-weight: 600; }
.group .line-main .raw { font-weight: normal; }
.group .amount { text-align: right; }
.group .amount .count { display: block; font-size: 0.75rem; font-weight: normal; }
.group .lines .payee { font-weight: normal; }
.rate-form { border-top: 1px solid var(--line); padding-top: 0.5rem; }
.rate-day { border-top: 1px solid var(--line); padding: 0.25rem 0; }
/* Rule fields appear only when "Also save as a rule" is ticked (pure CSS). */
.rule-box { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem; align-items: center; }
.rule-box > label { color: var(--text); min-height: var(--tap); justify-content: center; }
.rule-fields { grid-column: 1 / -1; display: none; flex-direction: column; gap: 0.5rem; }
.rule-toggle:checked ~ .rule-fields { display: flex; }
.receipt-question { border-top: 1px solid var(--line); padding-top: 0.5rem; margin-top: 0.75rem; }
.receipt-question:first-of-type { border-top: 0; margin-top: 0; }
.receipt-question h3 { margin: 0.25rem 0; overflow-wrap: anywhere; }
fieldset.choices { border: 0; margin: 0; padding: 0; }
/* One choice per row; the whole row is the tap target. */
label.choice { flex-direction: row; align-items: flex-start; gap: 0.6rem; color: var(--text);
               padding: 0.75rem 0; min-height: var(--tap); border-bottom: 1px solid var(--line); cursor: pointer; }
label.choice input { margin-top: 0.15rem; }
label.choice span { min-width: 0; overflow-wrap: anywhere; }
label.choice small { display: block; }
.choice-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice-buttons .reason { flex-basis: 100%; }

/* ---- receipts ---- */
.receipt-photo { margin: 0 0 1rem; }
/* The photo never makes the page wider than the phone; tall receipts scroll. */
.receipt-photo img { display: block; max-width: 100%; max-height: 70vh; height: auto;
                     border: 1px solid var(--line); border-radius: var(--radius-small); }
.receipt-photo figcaption { margin-top: 0.35rem; overflow-wrap: anywhere; }
.line-forms .inline-form + .inline-form { margin-top: 0.75rem; border-top: 1px solid var(--line); padding-top: 0.75rem; }

/* ---- settings: theme and colour pickers ---- */
.picker { border: 0; margin: 0.5rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.picker legend { color: var(--muted); margin-bottom: 0.3rem; padding: 0; }
.picker label { flex-direction: row; align-items: center; gap: 0.5rem; min-height: var(--tap);
                padding: 0 0.75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); }
.picker label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.picker.themes { flex-direction: column; }
.picker.themes label { border-radius: var(--radius-small); }
.dot { display: inline-block; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--pick);
       box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.5); flex: none; }
/* The colour picker: one round 48 px swatch per colour; the name is there for
   screen readers. The radio itself is hidden but still takes the keyboard. */
.picker.swatches { gap: 0.35rem; }
.picker.swatches label { position: relative; width: var(--tap); padding: 0; justify-content: center; border-radius: 50%; }
.picker.swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.picker.swatches .dot { width: 2rem; height: 2rem; }
.picker.swatches label:has(input:checked) { border: 3px solid var(--text); box-shadow: none; }
.picker.swatches label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Installed app (no browser bar): keep clear of a notch or the home bar. ---- */
@media (display-mode: standalone) {
  body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
}
/* A very narrow phone (320 px): smaller total and tighter header. */
@media (max-width: 360px) {
  .big { font-size: 2.1rem; }
  .switch button { padding: 0 0.7rem; font-size: 0.9rem; }
  header nav { gap: 0 0.8rem; }
}

/* Mercado Pago screenshots (Step C): the image next to its rows on wide
   screens, above them on a phone. */
.shot-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) { .shot-grid { grid-template-columns: minmax(200px, 320px) 1fr; } }
.shot-image { width: 100%; max-height: 80vh; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; }
.shot-table input { min-width: 0; padding: 0.3rem; font-size: 0.9rem; }
.shot-table input[type="checkbox"] { width: auto; }
.row-problem td { background: var(--warning-bg, rgba(255, 170, 0, 0.15)); }
