/* Bargnz — the four BRAND themes (DECIDED Nov 16, 2026:
   planning/discovery-round-2-decisions.md "BRAND THEMES" +
   brand/README.md; restored Nov 18, 2026 after the display
   release shipped four generic palettes under other names).
     Graphite Volt   — PRIMARY/DEFAULT: graphite bg, volt lime
                       primary, sky secondary
     Midnight Signal — deep navy bg, signal orange primary
     Ultraviolet     — black-violet bg, violet primary, gold
                       secondary
     Daylight        — light: pale-grey bg, white surface, deep
                       blue primary, orange secondary
   Obsidian Teal was cut by Matt on Nov 16, 2026 — it does not
   come back. */
:root {
  /* Palette constants — the single source of truth every theme and
     every theme swatch derives from (founder, Nov 18, 2026: the
     swatches must be reflective of the actual themes). */
  --c-volt: #A3E635;
  --c-volt-dark: #1a2405;
  --c-sky: #38BDF8;
  --c-graphite-bg: #101214;
  --c-graphite-surface: #1A1D20;
  --c-graphite-border: #2e333a;
  --c-graphite-text: #e8eaed;
  --c-graphite-muted: #9aa3ad;
  --c-signal-bg: #0A1428;
  --c-signal-surface: #141F34;
  --c-signal: #FF7A1A;
  --c-uv-bg: #0C0A12;
  --c-uv-surface: #16151E;
  --c-uv: #9D8CFF;
  --c-uv-gold: #FFC24B;
  --c-daylight-bg: #F6F7F9;
  --c-white-surface: #ffffff;
  --c-daylight-blue: #1E50C8;
  /* Product-photo tile (GitLab #64): merchant masters are shot on
     white, so every product image sits on a clean white tile in
     EVERY theme and is fit whole (contain) — never cropped. */
  --img-tile: #ffffff;
  /* :root itself carries Graphite Volt — the default before any
     script runs, the look the site has always shipped. */
  --bg: var(--c-graphite-bg);
  --surface: var(--c-graphite-surface);
  --surface-2: #22262b;
  --border: var(--c-graphite-border);
  --text: var(--c-graphite-text);
  --muted: var(--c-graphite-muted);
  --primary: var(--c-volt);
  --primary-dark: var(--c-volt-dark);
  --secondary: var(--c-sky);
  --link: var(--secondary);
  --danger: #f87171;
  --warn: #fbbf24;
  --prose: #cfd4da;
  /* Fallback-Z ground (founder, Nov 18, 2026): transparent in the
     dark themes — the bare Z sits on the card's own surface. The
     Daylight block overrides it with graphite: the Z never sits on
     a light ground, it carries its ground with it. */
  --fallback-field: transparent;
  color-scheme: dark;
}
/* Color schemes: the head script in base.html resolves the stored
   choice to one of the four brand themes on <html data-theme> /
   data-theme-resolved before paint. Stored values left by the
   display release (dark / light / midnight / system) are mapped
   onto these names at read time — see base.html and
   LEGACY_THEME_MAP in routes.py. Every surface colors through
   these variables — a theme is a full palette, never a filter or
   inversion. The same blocks scope the theme-picker swatches
   (.palette-*), so a swatch's fill IS its theme and can never
   drift from it. */
html[data-theme-resolved="graphite-volt"], .palette-graphite-volt {
  --bg: var(--c-graphite-bg);
  --surface: var(--c-graphite-surface);
  --surface-2: #22262b;
  --border: var(--c-graphite-border);
  --text: var(--c-graphite-text);
  --muted: var(--c-graphite-muted);
  --primary: var(--c-volt);
  --primary-dark: var(--c-volt-dark);
  --secondary: var(--c-sky);
  --link: var(--secondary);
  --danger: #f87171;
  --warn: #fbbf24;
  --prose: #cfd4da;
  color-scheme: dark;
}
html[data-theme-resolved="midnight-signal"], .palette-midnight-signal {
  /* Brand tokens: bg #0A1428, primary orange #FF7A1A. The brand
     doc names no surface or secondary for this theme; both are
     DERIVED, not new colors. Surface: the bg stepped up by
     exactly Graphite Volt's bg->surface delta (+10,+11,+12) =
     #141F34; surface-2 and border step from it by Graphite
     Volt's own surface->surface-2 (+8,+9,+11) and
     surface->border (+20,+22,+26) deltas. Secondary: the brand
     sky #38BDF8 (the brand's secondary hue), 8.6:1 on the navy
     bg. Text/muted/prose are navy-tinted neutrals; --primary-dark
     is the near-black foreground that sits on the orange (7.4:1).
     Every text-bearing pair in this palette measures >= 4.5:1
     (contrast table in the release commit). */
  --bg: var(--c-signal-bg);
  --surface: var(--c-signal-surface);
  --surface-2: #1C283F;
  --border: #28354E;
  --text: #E9EEF8;
  --muted: #97A5C4;
  --primary: var(--c-signal);
  --primary-dark: #160B02;
  --secondary: var(--c-sky);
  --link: var(--secondary);
  --danger: #f87171;
  --warn: #fbbf24;
  --prose: #C9D4EA;
  color-scheme: dark;
}
html[data-theme-resolved="ultraviolet"], .palette-ultraviolet {
  /* Brand tokens: bg #0C0A12, primary violet #9D8CFF, secondary
     gold #FFC24B. Surface DERIVED exactly as Midnight Signal's:
     bg + Graphite Volt's (+10,+11,+12) step = #16151E;
     surface-2 / border by the same relative deltas. Text/muted/
     prose are violet-tinted neutrals; every text-bearing pair
     measures >= 4.5:1. */
  --bg: var(--c-uv-bg);
  --surface: var(--c-uv-surface);
  --surface-2: #1E1E29;
  --border: #2A2B38;
  --text: #EDEAF6;
  --muted: #A79FC4;
  --primary: var(--c-uv);
  --primary-dark: #150F24;
  --secondary: var(--c-uv-gold);
  --link: var(--secondary);
  --danger: #f87171;
  --warn: #fbbf24;
  --prose: #CFC9E6;
  color-scheme: dark;
}
html[data-theme-resolved="daylight"], .palette-daylight {
  /* Brand tokens: bg #F6F7F9, surface white #FFFFFF, primary
     deep blue #1E50C8, secondary orange #FF7A1A.
     CONTRAST CALL (documented per the founder rule — no brand
     color changed): the orange measures 2.6:1 as running text
     on white, so it stays the theme's secondary for ACCENTS and
     badge fills (the dark badge text on it measures 6.3:1),
     while the text roles that resolve through --link (links,
     the % off figure) use Daylight's own deep-blue primary
     instead (6.9:1 on white). --primary-dark is white: it is the
     foreground that sits ON the primary (buttons), and white on
     the deep blue measures 6.9:1. */
  --bg: var(--c-daylight-bg);
  --surface: var(--c-white-surface);
  --surface-2: #ECEEF1;
  --border: #D9DEE6;
  --text: #16181D;
  --muted: #5A6472;
  --primary: var(--c-daylight-blue);
  --primary-dark: #ffffff;
  --secondary: var(--c-signal);
  --link: var(--primary);
  --danger: #dc2626;
  --warn: #b45309;
  --prose: #2E333B;
  /* The bare-Z fallback carries its graphite ground in Daylight
     (founder rule, Nov 18, 2026: the Z never sits on a light
     ground). #101214 is the Graphite Volt bg — the retired tile's
     own graphite. */
  --fallback-field: #101214;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; gap: 16px; flex-wrap: wrap; }
.logo { font-size: 28px; font-weight: 800; letter-spacing: 1px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-z { color: var(--primary); }
.main-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.main-nav a { color: var(--text); font-weight: 600; }
.nav-user { color: var(--muted); font-weight: 600; }
/* Theme picker (founder's own mock, Nov 18, 2026 — the design
   reference is filed at planning/releases/v2026.11.18-display/
   design-reference-picker-mock.png): one circle in the header,
   immediately right of the auth action, carrying a dark ring with
   an accent outer ring and filled with the CURRENT theme as a
   diagonal split (surface top-left / accent bottom-right, split
   running top-right to bottom-left). Clicking opens a rounded-
   card popover directly under the circle with a 2x2 grid of
   circular swatches in brand order — top-left to bottom-right:
   Graphite Volt, Midnight Signal, Ultraviolet, Daylight. The
   popover's background is the CURRENTLY SELECTED theme's surface
   (var(--surface) resolved on <html>), so the card re-themes the
   moment a new theme is picked (founder, Nov 18, 2026). The
   selected swatch carries the same dark ring + accent outer
   ring; unselected swatches carry a thin grey ring. No visible
   words — names live in aria-labels/titles.
   SINGLE SOURCE OF TRUTH (founder, Nov 18, 2026): every swatch is
   rendered from its own theme's variables — the swatch element
   carries that theme's palette scope (.palette-graphite-volt /
   -midnight-signal / -ultraviolet / -daylight, the same blocks
   that theme the page) and its fill is var(--surface) /
   var(--primary), so a swatch can never drift from the theme it
   selects. The rings resolve var(--primary) inside that same
   scope: the toggle's ring is the current theme's accent, a
   selected swatch's ring is its own theme's accent. */
.theme-picker { position: relative; display: inline-flex; flex: none; }
.swatch-fill { background: linear-gradient(to top left, var(--primary) 50%, var(--surface) 50%); }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 3px solid #17191c; box-shadow: 0 0 0 3px var(--primary);
}
.theme-popover {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 70;
  display: grid; grid-template-columns: repeat(2, 44px); gap: 10px; padding: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
.theme-popover[hidden] { display: none; }
.theme-swatch {
  width: 44px; height: 44px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid #c9cdc2;
}
.theme-swatch:hover { border-color: #9aa08e; }
.theme-swatch[aria-pressed="true"] {
  border: 3px solid #17191c; box-shadow: 0 0 0 3px var(--primary);
}
/* Category nav (Option B, Nov 17, 2026): no raw OS scrollbar. Without
   JS every item renders wrapped in the row; with JS (.cat-nav-js) the
   row is single-line and the script moves overflow into "More". */
.cat-nav { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 10px; }
.cat-nav-js { flex-wrap: nowrap; }
.cat-nav a { color: var(--muted); font-size: 13px; white-space: nowrap; }
.cat-nav a:hover { color: var(--primary); }
.cat-nav a.active { color: var(--primary); font-weight: 700; }
.cat-nav-more { position: relative; margin-left: auto; flex: 0 0 auto; }
.cat-nav-more[hidden] { display: none; }
.cat-nav-more-btn {
  background: transparent; border: none; padding: 0; cursor: pointer;
  display: inline-block; vertical-align: baseline; line-height: 1.5;
  color: var(--muted); font: inherit; font-size: 13px; white-space: nowrap;
}
.cat-nav-more-btn:hover, .cat-nav-more-btn[aria-expanded="true"] { color: var(--primary); }
.cat-nav-more-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  display: flex; flex-direction: column; min-width: 210px; padding: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
}
.cat-nav-more-menu[hidden] { display: none; }
.cat-nav-more-menu a { padding: 8px 10px; border-radius: 6px; font-size: 14px; }
.cat-nav-more-menu a:hover { background: var(--surface); text-decoration: none; }

/* buttons + badges */
.btn {
  display: inline-block; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); padding: 7px 14px; border-radius: 8px; font-weight: 600;
  cursor: pointer; font-size: 14px;
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn-primary { background: var(--primary); color: var(--primary-dark); border-color: var(--primary); }
.btn-primary:hover { filter: brightness(1.08); }
/* .main-nav a's link color out-specifies .btn-primary's text
   color, which left the header Sign up button white-on-lime
   with no contrast (founder, Nov 18, 2026): the on-primary
   foreground for primary buttons in the header nav. This was a
   hardcoded #000 (the on-lime value) until the brand themes
   landed; it now resolves each theme's own --primary-dark —
   near-black on lime/orange/violet, white on Daylight's deep
   blue, where black measured only 3.0:1. */
.main-nav a.btn-primary { color: var(--primary-dark); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-lg { padding: 11px 22px; font-size: 16px; }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px;
  font-weight: 700; letter-spacing: .4px; text-transform: uppercase; vertical-align: middle;
}
/* Role badges render the role name in title case ("Scout", not
   "AGENT · SCOUT" — founder, Nov 18, 2026), so the generic badge
   uppercase transform is lifted for agent badges; the literal
   "AGENT" badges (agents page, nav) are already uppercase text. */
.badge-agent { background: var(--secondary); color: #08222f; text-transform: none; }
.badge-pop { background: var(--primary); color: var(--primary-dark); }
.badge-new { background: var(--surface-2); color: var(--primary); border: 1px solid var(--primary); }
.badge-code { background: var(--surface-2); color: var(--warn); border: 1px dashed var(--warn); text-transform: none; }
.badge-state { background: var(--surface-2); color: var(--muted); }
.badge-live { color: var(--primary); }
.badge-expired, .badge-sold_out { color: var(--danger); }
.badge-price_changed { color: var(--warn); }

/* flashes */
.flashes { margin: 16px 0 0; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; border: 1px solid var(--border); background: var(--surface); }
.flash-ok { border-color: var(--primary); }
.flash-error { border-color: var(--danger); }

/* feed */
.page-title { font-size: 30px; margin: 24px 0 8px; }
.lede { color: var(--muted); max-width: 640px; }
.section-title { font-size: 20px; margin: 28px 0 12px; color: var(--text); }
/* sort picker (Option D): right-justified cluster — circular direction
   toggle + pill naming the active sort; the pill opens a center modal.
   Actions sit at the right edge for right-thumb reach (founder rule). */
.feed-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sort-cluster { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; flex: 0 0 auto; }
.dir-toggle {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.dir-toggle:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.sort-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--primary); background: var(--primary);
  color: var(--primary-dark); font: inherit; font-weight: 700; font-size: 15px;
}
.sort-pill:hover { filter: brightness(1.08); }
.sort-modal-overlay {
  position: fixed; inset: 0; z-index: 100; padding: 16px;
  background: rgba(0, 0, 0, .62);
  display: flex; align-items: center; justify-content: center;
}
.sort-modal-overlay[hidden] { display: none; }
.sort-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; width: 100%; max-width: 340px; padding: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}
.sort-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 4px; }
.sort-modal-title { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.sort-modal-close {
  background: transparent; border: none; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; padding: 0;
}
.sort-modal-close:hover { color: var(--text); background: var(--surface-2); }
.sort-options { list-style: none; margin: 0; padding: 4px 0; }
.sort-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 12px 12px; border-radius: 10px;
  color: var(--text); font-weight: 600; font-size: 16px;
}
.sort-option:hover, .sort-option:focus { background: var(--surface-2); text-decoration: none; }
.sort-option.active { color: var(--primary); }
.sort-option-check { color: var(--primary); flex: 0 0 auto; }
.deal-list { display: flex; flex-direction: column; gap: 12px; }
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
/* Desktop deal-layout toggle (Gallery / List / Compact, Nov 17, 2026):
   the toggle is hidden below 1024px and the feed keeps the current
   single-column list there (mobile unchanged). On desktop the layout
   is driven entirely by <html data-deal-layout> over the SAME card
   markup — no template duplication. The whole-card .card-link overlay
   and the raised controls are layout-independent in every layout
   (cards carry no Get Deal button since Nov 18, 2026 — the whole
   card is the link to the deal page). */
.feed-controls { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.layout-toggle { display: none; }
@media (min-width: 1024px) {
  /* View toggle (founder's reference, Nov 18, 2026 — design filed
     at planning/releases/v2026.11.18-display/
     design-reference-view-toggle-mock.png): a dark segmented pill,
     List / Gallery / Dense left to right. The pill is dark in
     every theme (like the reference), so its colors come from the
     graphite palette constants, not the resolved theme: muted
     grey icons on graphite, the selected view a filled volt
     circle with a dark icon. */
  .layout-toggle {
    display: inline-flex; gap: 4px; padding: 4px; margin: 18px 0 8px;
    background: var(--c-graphite-surface); border: 1px solid var(--c-graphite-border); border-radius: 999px;
  }
  .layout-btn {
    width: 38px; height: 38px; border: none; border-radius: 50%; cursor: pointer;
    background: transparent; color: var(--c-graphite-muted);
    display: inline-flex; align-items: center; justify-content: center;
  }
  .layout-btn:hover { color: var(--c-graphite-text); }
  .layout-btn.active { background: var(--c-volt); color: var(--c-volt-dark); }

  html[data-deal-layout="list"] .deal-list { display: flex; flex-direction: column; gap: 12px; }

  html[data-deal-layout="gallery"] .deal-list {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  }
  html[data-deal-layout="gallery"] .deal-list .deal-card { flex-direction: column; gap: 10px; height: 100%; }
  html[data-deal-layout="gallery"] .deal-list .deal-thumb { flex: none; width: 100%; height: 168px; }
  html[data-deal-layout="gallery"] .deal-list .deal-body { display: flex; flex-direction: column; }
  /* The price row carries the margin-top:auto now (see the price
     alignment block below); the foot follows it at a fixed gap.
     The foot row WRAPS (founder, Nov 18, 2026 — scoutwrap): the
     poster is a two-line block with the badge beneath the name,
     and the row wraps rather than clipping the badge at the
     card's right edge. */
  html[data-deal-layout="gallery"] .deal-list .deal-foot { padding-top: 8px; flex-wrap: wrap; }
  html[data-deal-layout="gallery"] .deal-list .deal-poster { min-width: 0; }
  html[data-deal-layout="gallery"] .deal-list .deal-score,
  html[data-deal-layout="gallery"] .deal-list .deal-comments { flex: none; }

  /* Compact (founder redesign, Nov 18, 2026; FINAL SPEC, founder
     decision Nov 18, 2026): the image stays FULL size — the same
     168px thumb as Gallery, no shrink — and the card shows ONLY
     the image, the sale price (.price), and the original price
     (.was). Everything else is hidden in this layout only: the
     descriptor row (.deal-meta), the percentage-off text (.off),
     the promo badge (.badge-code), the whole foot (.deal-foot:
     score / comments / poster / save), and the title.
     The title is NOT display:none: the whole-card click lives in
     .deal-title a.card-link::after, an absolutely positioned
     overlay whose containing block is the card itself (the link
     and the title are both unpositioned). display:none on the
     title would remove the anchor's box and kill the overlay —
     and with it every click on a compact card. Instead the title
     collapses to zero height with its text clipped: the anchor
     and its ::after still render (an absolutely positioned
     pseudo-element is not clipped by an unpositioned ancestor's
     overflow), so the overlay still covers the card. min-height:0
     is required because .deal-body is a flex column, where a flex
     item's automatic minimum size is its content size. */
  html[data-deal-layout="compact"] .deal-list {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  }
  html[data-deal-layout="compact"] .deal-list .deal-card { flex-direction: column; gap: 7px; padding: 10px; height: 100%; }
  html[data-deal-layout="compact"] .deal-list .deal-thumb { flex: none; width: 100%; height: 168px; }
  html[data-deal-layout="compact"] .deal-list .deal-body { display: flex; flex-direction: column; }
  html[data-deal-layout="compact"] .deal-list .deal-title {
    height: 0; min-height: 0; overflow: hidden; margin: 0; padding: 0; font-size: 0; line-height: 0;
  }
  html[data-deal-layout="compact"] .deal-list .deal-prices .price { font-size: 16px; }
  html[data-deal-layout="compact"] .deal-list .deal-meta,
  html[data-deal-layout="compact"] .deal-list .deal-prices .off,
  html[data-deal-layout="compact"] .deal-list .deal-prices .badge-code,
  html[data-deal-layout="compact"] .deal-list .deal-foot { display: none; }
}
.deal-card {
  display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px;
  position: relative; cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.deal-card:hover { border-color: var(--primary); transform: translateY(-2px); }
/* Whole-card click target (Matt, Nov 17, 2026): the title link's overlay
   stretches over the whole card, so clicking anywhere on the card opens
   the deal. The link itself stays unpositioned so the overlay anchors to
   the card; every other control (merchant, poster, Save) is
   raised above the overlay and keeps its own action. */
.deal-title a.card-link::after {
  content: ""; position: absolute; inset: 0; border-radius: 12px;
}
.deal-card a:not(.card-link), .deal-card button, .deal-card form {
  position: relative; z-index: 1;
}
.deal-thumb { position: relative; flex: 0 0 96px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--img-tile); display: flex; align-items: center; justify-content: center; }
/* Expired card treatment (GitLab #33): the photo greys out and
   an EXPIRED stamp overlays the thumb — display only, and the
   stamp is absolutely positioned so the card's geometry is
   identical to a live card's. */
.deal-card-expired .deal-thumb img { filter: grayscale(1); }
.expired-stamp { position: absolute; top: 8px; right: 8px; transform: rotate(8deg); color: var(--danger); border: 2px solid var(--danger); background: var(--surface); border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; letter-spacing: .08em; pointer-events: none; }
/* Smart fit (GitLab #64): the whole product photo is visible —
   contain on the white tile, never center-cropped. */
.deal-thumb img { width: 100%; height: 100%; object-fit: contain; }
/* Imageless deals get an intentional branded fallback — merchant
   name under the merchant's logo or the bare Z — never a bare
   placeholder letter. */
.deal-thumb:has(.thumb-fallback), .deal-detail-thumb:has(.thumb-fallback) {
  background: radial-gradient(120% 120% at 30% 20%, var(--surface-2), var(--surface));
}
.thumb-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; text-align: center; }
/* Fallback tier 3 (founder, Nov 18, 2026): the BARE Z replaces the
   tiled badge. The field is a square at ~72% of the thumb frame and
   the transparent Z fills most of it, centered. --fallback-field is
   transparent in the dark themes (the Z sits directly on the card)
   and graphite in Daylight (the Z carries its ground). The field's
   radius matches the retired tile's: 8px card / 18px big / 6px
   mobile. Scoped under .thumb-fallback so these win over the
   generic .deal-thumb img cover rule. */
.thumb-fallback.z-fallback { width: 100%; height: 100%; }
.fallback-field { display: flex; align-items: center; justify-content: center; height: 70%; aspect-ratio: 1 / 1; background: var(--fallback-field); border-radius: 8px; }
.thumb-fallback .fallback-z { height: 88%; width: auto; max-width: 92%; object-fit: contain; }
/* Fallback tier 2 (founder, Nov 18, 2026): merchant logo tile. The
   logo asset is served UNMODIFIED (contain, never cropped or
   recolored); it identifies the seller only. */
.fallback-logo { max-width: 78%; max-height: 54px; object-fit: contain; }
.fallback-merchant { font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); line-height: 1.25; }
.thumb-fallback.big { gap: 12px; }
/* The detail thumb stretches to its grid row (tall pages make it
   far taller than wide), so the big field is height-driven but
   capped square at 250px — the Z stays the panel's focal point
   without swallowing it. */
.thumb-fallback.big .fallback-field { height: 78%; max-height: 250px; max-width: 250px; border-radius: 18px; }
.thumb-fallback.big .fallback-logo { max-height: 120px; }
.thumb-fallback.big .fallback-merchant { font-size: 14px; }
.deal-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.deal-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.merchant { font-weight: 700; color: var(--text); }
.deal-time { color: var(--muted); }
.deal-title { margin: 4px 0 6px; font-size: 17px; }
.deal-title a { color: var(--text); }
.deal-prices { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.deal-prices .price { font-size: 20px; font-weight: 800; color: var(--primary); }
.deal-prices.big .price { font-size: 32px; }
.deal-prices .was { color: var(--muted); text-decoration: line-through; }
.deal-prices .off { color: var(--link); font-weight: 700; }
.deal-foot { display: flex; gap: 14px; align-items: center; margin-top: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
/* Price alignment (founder, Nov 18, 2026): the price line sits on a
   common horizontal line across every card in a row regardless of
   title length. The card body is a flex column (above) and the
   price row takes margin-top:auto, so title-length variance is
   absorbed in the space above the prices and the prices + foot
   block is glued to the card's bottom edge at a constant offset.
   Grid cards are equal-height per row (grid stretch), so
   bottom-anchored price lines align across the row; in list rows
   the price block sits at the same bottom-anchored position in
   every row. The poster block under the foot is two lines tall
   (badge beneath the name — scoutwrap, Nov 18, 2026) uniformly
   across agent cards, so its height is constant and never shifts
   the price line either. */
.deal-card .deal-prices { margin-top: auto; }
.deal-grid .deal-card { height: 100%; }
.deal-grid .deal-foot { flex-wrap: wrap; }
.deal-grid .deal-poster { min-width: 0; }
.deal-grid .deal-score, .deal-grid .deal-comments { flex: none; }
.deal-foot .btn { margin-left: auto; }
.empty-state { background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; padding: 32px; text-align: center; color: var(--muted); }

/* deal detail */
.deal-detail { margin-top: 24px; }
.banner { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.banner-expired { border-color: var(--danger); background: rgba(248, 113, 113, .08); }
.banner-warn { border-color: var(--warn); background: rgba(251, 191, 36, .08); }
.deal-detail-grid { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
@media (max-width: 720px) { .deal-detail-grid { grid-template-columns: 1fr; } }
/* Polish (Nov 18, 2026): the thumb pins to the TOP of its grid cell
   at a square aspect. As a plain grid item it stretched to the
   right column's full height (measured 280x789 on /deal/6) and the
   cover-fit photo was cropped into a tall slot, product cut off on
   both sides. Square matches the product photos (square masters)
   and the card treatment. The big fallback field is height-driven
   at 78% capped 250px, so it lands ~218px inside the square. */
.deal-detail-thumb { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-height: 240px; display: flex; align-items: center; justify-content: center; overflow: hidden; align-self: start; aspect-ratio: 1 / 1; }
.deal-detail-thumb img { width: 100%; height: 100%; object-fit: contain; }
.deal-detail-main h1 { margin: 6px 0 10px; font-size: 28px; }
.poster-line, .verified-line { color: var(--muted); font-size: 14px; }
/* Byline row (GitLab #32): a centered flex row so the avatar, the
   "Posted by" text and the agent role badge share one cross axis.
   As a plain inline row the badge — vertical-align: middle against
   the x-height — rendered visibly low next to the poster name
   (measured +1.30px off the name text's center). Same pattern as
   .deal-meta. */
.poster-line { display: flex; align-items: center; flex-wrap: wrap; column-gap: 6px; }
.deal-actions { --action-row-h: 48px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.deal-actions .btn-lg { height: var(--action-row-h); display: inline-flex; align-items: center; }
.deal-actions .micro-disclosure { flex-basis: 100%; }
/* Action-row layout (GitLab #33, founder Nov 19, 2026): the
   thumbs are NO LONGER pushed to the far right — that push now
   belongs to the Mark-as-expired control at the row's far end.
   This supersedes the Flip 24 vote-controls alignment. */
.vote-controls { display: flex; align-items: center; gap: 8px; }
.vote-controls .deal-score { color: var(--muted); font-size: 14px; margin-right: 2px; }
.save-star-btn { height: var(--action-row-h); min-width: var(--action-row-h); display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 8px; }
.save-star-btn svg { width: 22px; height: 22px; display: block; }
.save-star-btn.is-saved { color: var(--primary); border-color: var(--primary); }
.vote-btn { height: var(--action-row-h); min-width: var(--action-row-h); display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 8px; }
.vote-btn svg { width: 20px; height: 20px; display: block; }
/* Mark as expired (GitLab #33): far right of the action row via
   the form's auto margin; same 48px row treatment as the star
   and thumbs. The armed ("Are you sure?") state reads as a
   warning; the reported state is inert. When the row gets tight
   the button collapses to its stopwatch icon — the tooltip
   (title attribute) carries the words — except while armed, so
   the confirm question is never invisible. */
.mark-expired-form { margin-left: auto; display: inline-flex; }
.mark-expired-btn { height: var(--action-row-h); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border-radius: 8px; }
.mark-expired-btn svg { width: 20px; height: 20px; display: block; }
.mark-expired-btn.is-armed { color: var(--danger); border-color: var(--danger); }
.mark-expired-btn[disabled] { color: var(--muted); cursor: default; }
@media (max-width: 640px) {
  .mark-expired-btn { min-width: var(--action-row-h); padding: 0 12px; }
  .mark-expired-btn .mark-expired-label { display: none; }
  .mark-expired-btn.is-armed .mark-expired-label { display: inline; }
}
.downvote-reason-prompt { flex-basis: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.downvote-reason-prompt[hidden] { display: none; }
.reason-prompt-label { color: var(--muted); font-size: 14px; }
.reason-chip, .reason-dismiss { padding: 5px 12px; font-size: 13px; }
.micro-disclosure { color: var(--muted); font-size: 12px; margin-top: 6px; }
.deal-tools select, .admin-controls select {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px;
}
.deal-description { white-space: pre-wrap; margin: 16px 0; }
.deal-tools, .admin-controls {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding: 14px 0;
}
.admin-controls { background: var(--surface); border: 1px solid var(--warn); border-radius: 10px; padding: 12px; }
/* Get alerts (redesigned Nov 19, 2026 — GitLab #20/#21): the alert
   box is a finished card in its own right — surface, border, radius,
   even padding — with NO rule above it (the founder flagged the two
   stray horizontal lines the old border-top stack drew over the
   heading). Inside: ONE product-keyword form — the merchant and
   category subscribes that used to sit below it are gone from the
   deal page entirely (GitLab #28: the form asked for the same
   email three times). */
.alert-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin: 16px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.alert-box-title { font-size: 16px; }
/* Alerts bell icon (GitLab #66, founder spec Nov 23, 2026): a
   line-style ringing bell drawn as an inline SVG in the toggle —
   stroke currentColor, no hardcoded color, no raster — so it
   follows the theme (dark today, any future theme) automatically.
   Sized subtly against the 16px title text. */
.alert-bell-icon {
  width: 20px; height: 15px; margin-right: 8px;
  vertical-align: -2px; flex: none;
}
/* Alerts expansion panel (founder spec, Nov 20, 2026): the
   slim toggle bar is the box's only always-visible row; the
   panel below it renders collapsed (hidden attribute). */
.alert-box-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: 0; padding: 0;
  cursor: pointer; color: inherit; font: inherit; text-align: left;
}
.alert-chevron {
  flex: none; margin-left: 12px; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.15s ease;
}
/* Alerts paused notice (GitLab #33): replaces the signup form
   inside the panel on expired deal pages. */
.alert-paused-notice { color: var(--muted); margin: 0; }
.alert-box-toggle[aria-expanded="true"] .alert-chevron {
  transform: rotate(225deg);
}
.alert-panel { display: flex; flex-direction: column; gap: 10px; }
.alert-panel[hidden] { display: none; }
.alert-box-sub { color: var(--muted); font-size: 13.5px; margin: 0; }
.alert-box input[type="email"], .alert-box input[type="text"],
.alert-fields input[type="text"], .alert-fields input[type="number"],
.alert-box input[type="number"] {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 11px; font: inherit; font-size: 14.5px;
}
.alert-box input:focus, .alert-fields input:focus {
  outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary);
}
.alert-submit-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.alert-submit-row input[type="email"] { flex: 1; min-width: 200px; }
/* Keyword chips: the selected row shows what the alert will match
   (each chip removable); the palette row offers the product's other
   words — model/spec tokens, leftovers, the category — one tap to
   add; the creator row under the palette turns a typed keyword
   into a chip of the same kind. The chip row is the source of
   truth: a hidden field mirrors its tokens and is what actually
   submits. The server pre-loads the default chips into that field,
   so a no-JS submit still files the default product watch. */
.alert-keyword { display: flex; flex-direction: column; gap: 8px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip-row-label { color: var(--muted); font-size: 13px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 11px; font-size: 13.5px; font-weight: 600;
}
.chip-x {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0;
}
.chip-x:hover { color: var(--text); }
.chip-palette { cursor: pointer; border-style: dashed; color: var(--muted); font-weight: 500; }
.chip-palette:hover { color: var(--text); border-color: var(--primary); }
.chip-palette.chip-used { opacity: 0.45; }
.chip-creator { display: flex; gap: 8px; align-items: center; }
.alert-chip-input { flex: 1; min-width: 0; }
.chip-add-btn { flex: none; }
/* Alert fields + slider pairs: one pattern on every surface —
   label above, full-width rows, themed controls. */
.alert-fields, .alert-slider-fields { display: flex; flex-direction: column; gap: 12px; }
.alert-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.alert-field-label { font-weight: 600; font-size: 14px; }
.alert-slider-row { display: flex; gap: 12px; align-items: center; }
.alert-slider { flex: 1; accent-color: var(--primary); min-width: 120px; }
.alert-slider-number { width: 96px; flex: none; }
/* Match mode + the compact A2 layout (GitLab #31, Flip 26 —
   founder-picked mockup design A2): the Any/All segmented toggle
   shares the Keywords label line (no row of its own), the two
   slider fields sit side by side, and the email + Watch row
   stays on one row. The layout rules are scoped to the deal
   page's .alert-form-primary so the account alerts page keeps
   its stacked fields. The toggle's active pill uses the same
   primary pairing as .btn-primary. */
.alert-kw-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.alert-match-toggle { display: inline-flex; align-items: center; gap: 6px; }
.alert-match-label { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.segmented { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.seg-btn { border: none; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; padding: 5px 12px; min-height: 32px; border-radius: 999px; cursor: pointer; }
.seg-btn.is-active { background: var(--primary); color: var(--primary-dark); }
.alert-form-primary .alert-slider-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.alert-form-primary .alert-slider-row { flex-wrap: wrap; gap: 8px; }
.alert-form-primary .alert-slider { min-width: 100px; }
.alert-form-primary .alert-slider-number { width: 84px; }
.alert-form-primary .alert-submit-row { flex-wrap: nowrap; }
.alert-form-primary .alert-submit-row input[type="email"] { min-width: 0; }
.alert-form-primary .chip { padding: 3px 10px; }
/* Deal-page image picker (Nov 19, 2026 — GitLab #22): main photo
   with a thumbnail row under it inside the same framed card; the
   active thumbnail carries the theme's primary ring. Single-image
   deals render no row and look exactly as before.
   GitLab #27 (Nov 19, 2026): the gallery is FOUR images total
   (main + up to 3 thumbs) and the thumbnail row fits on a SINGLE
   line — nowrap, and the thumbs shrink to fit the strip width
   instead of wrapping to a second row. */
/* Smart fit (GitLab #64): the gallery block is a white tile inside
   the framed card; the frame's overflow opens up so the hover
   full-view panel can extend past it, and the gallery clips its
   own corners instead. */
.deal-detail-thumb:has(.deal-gallery) { aspect-ratio: auto; display: block; position: relative; overflow: visible; }
.deal-gallery { background: var(--img-tile); border-radius: 11px; overflow: hidden; }
.deal-detail-thumb img.deal-gallery-main { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: var(--img-tile); display: block; }
.gallery-thumbs { display: flex; gap: 8px; padding: 8px; flex-wrap: nowrap; }
.gallery-thumb {
  flex: 0 1 56px; min-width: 0; width: 56px; height: 56px; padding: 0; cursor: pointer;
  border: 2px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--img-tile);
  transition: border-color 140ms ease-out;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-thumb.active { border-color: var(--primary); }
/* Hover full view (GitLab #64): hovering the main photo opens this
   panel with the COMPLETE image enlarged at its natural aspect —
   contain, never cropped. The gallery script toggles .is-open on
   mouseenter of the main image and removes it on mouse-leave of
   the hero frame; the panel's image follows gallery switching.
   pointer-events: none so the panel never traps the cursor.
   Animation (GitLab #66): the panel used to pop via display
   none/block — too jarring. It now fades + settles with a quick
   140ms ease-out (opacity + a subtle scale/translate from the
   hero's top-left); closing is the same 140ms, with visibility
   flipping only after the fade so dismissal never lingers. */
.gallery-zoom {
  position: absolute; top: 0; left: 0; z-index: 40;
  width: min(620px, 92vw); padding: 12px;
  background: var(--img-tile); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transform: scale(0.97) translateY(4px);
  transform-origin: top left;
  transition: opacity 140ms ease-out, transform 140ms ease-out,
    visibility 0s linear 140ms;
}
.gallery-zoom.is-open {
  opacity: 1; visibility: visible;
  transform: scale(1) translateY(0);
  transition: opacity 140ms ease-out, transform 140ms ease-out,
    visibility 0s;
}
.gallery-zoom img { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
@media (prefers-reduced-motion: reduce) {
  .gallery-zoom { transition: none; }
  .gallery-thumb { transition: none; }
}

/* comments */
.comment-form textarea, .comment textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 10px; margin-bottom: 8px;
}
.comment { border-left: 2px solid var(--border); padding: 8px 0 8px 14px; margin-top: 10px; }
.comment-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.comment-body { margin: 4px 0; white-space: pre-wrap; }
.reply-box summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.empty-note { color: var(--muted); }

/* forms */
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; display: flex; flex-direction: column; gap: 14px; margin: 16px 0 32px;
}
.form-card.narrow { max-width: 440px; }
.form-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.form-card input, .form-card select, .form-card textarea {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 9px 11px; font-size: 15px; font-weight: 400;
}
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row label { flex: 1; min-width: 180px; justify-content: flex-end; }
.hint { color: var(--muted); font-weight: 400; font-size: 12px; }
.form-note { color: var(--muted); font-size: 14px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }

/* Post a Deal rework (issue #62): draft-style layout with a live
   preview, category chips, the extract loading state + side game,
   and the deal page's poster-take block. Theme variables only. */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .post-layout { grid-template-columns: 1fr; } }
.post-preview-wrap { position: sticky; top: 16px; }
.post-preview-wrap [hidden] { display: none !important; }
.preview-heading { font-size: 16px; margin: 4px 0 10px; color: var(--muted); }
.pv-category { margin: 8px 0 0; }
.chip-field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 600; font-size: 14px; }
.chip-toggle { position: relative; cursor: pointer; }
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle.chip-on { border-color: var(--primary); background: var(--surface); box-shadow: inset 0 0 0 1px var(--primary); }
.post-loading { text-align: center; padding: 30px 16px; }
.post-loading[hidden] { display: none; }
.spinner {
  width: 38px; height: 38px; margin: 0 auto 12px; border-radius: 50%;
  border: 4px solid var(--border); border-top-color: var(--primary);
  animation: post-spin 0.8s linear infinite;
}
@keyframes post-spin { to { transform: rotate(360deg); } }
.post-loading-text { color: var(--muted); }
.tag-game { margin-top: 18px; }
.tag-game-field {
  position: relative; height: 180px; overflow: hidden;
  border: 1px dashed var(--muted); border-radius: 10px;
}
.falling-tag {
  position: absolute; top: -36px; border: 0; border-radius: 999px;
  background: var(--primary); color: var(--c-volt-dark);
  padding: 4px 10px; font-weight: 700; cursor: pointer;
  animation: tag-fall 4.2s linear forwards;
}
@keyframes tag-fall { to { transform: translateY(240px); } }
.deal-poster-note {
  border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: 10px; padding: 12px 16px; margin: 14px 0;
  background: var(--surface);
}
.deal-poster-note h3 { margin: 0 0 6px; font-size: 15px; }
.deal-poster-note p { margin: 0; }
.deal-poster-note .poster-note-by { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* admin */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--muted); font-size: 13px; }
.data-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.table-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .table-row { grid-template-columns: 1fr; } }
.pending-note { background: var(--surface); border: 1px dashed var(--warn); border-radius: 10px; padding: 12px 16px; color: var(--text); }

/* prose + footer */
.prose { max-width: 760px; margin: 24px 0 40px; }
.prose h1 { font-size: 30px; }
.prose h2 { font-size: 20px; margin-top: 26px; }
.prose p, .prose li { color: var(--prose); }
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 24px 0 36px; background: var(--surface); }
.footer-disclosure { font-weight: 700; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; }
.footer-fine { color: var(--muted); font-size: 13px; }

/* Accounts (addendum C) + alert preferences (addendum B) */
.account-nav { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0 20px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.account-nav a { color: var(--muted); font-weight: 600; font-size: 14px; }
.account-nav a:hover { color: var(--primary); }
.avatar-preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.check-label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check-label input { width: auto; margin-top: 3px; }
.danger-zone { border-color: #7f1d1d; }
.row-actions { white-space: nowrap; }
.alert-form { display: block; margin: 8px 0; }

/* Patch additions (UX wireframes + amendment v2.4) */
/* Header search (founder, Nov 18, 2026): the form is the flex-growing
   middle section of the header — it expands to fill the space between
   the wordmark and the main nav, capped at 640px; past the cap the
   header's space-between splits the leftover into equal gaps on both
   sides, so the form sits centered. The input fills the form. Mobile
   keeps its own full-width row (the max-width:720px rule below). */
.search-form { flex: 1 1 auto; max-width: 640px; margin: 0 16px; }
.search-form input { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 7px 12px; width: 100%; min-width: 0; font: inherit; font-size: 0.9rem; }
.search-form input::placeholder { color: var(--muted); }
.avatar-mini { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
/* Poster block (founder, Nov 18, 2026 — scoutwrap): the byline is a
   two-line block: avatar + "by <name>" on the first line (.poster-id),
   the agent role badge on its own line BENEATH the name. The badge is
   never ellipsized or clipped; only an over-long NAME truncates,
   inside .poster-id. This replaces the single-line poster whose
   trailing badge was cut off at the card's right edge in the grid
   layouts (the poster span shrank under flex and its overflow:hidden
   clipped the badge). */
.deal-poster { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; max-width: 100%; }
.poster-id { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.poster-id .avatar-mini { flex: none; }
.poster-id a { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Badge alignment (founder, Nov 18, 2026): on its own line the
   badge indents to the NAME TEXT, not the avatar — its left edge
   lines up with the "by <name>" text, i.e. avatar width (20px)
   + the poster-id gap (6px) = 26px. Without this the badge sat
   flush under Scott's Z avatar, shifted left of the name. */
.deal-poster .badge-agent { flex: none; margin-left: 26px; }
.price-history-slot { border: 1px dashed var(--border); border-radius: 8px; min-height: 64px; display: flex; align-items: center; padding: 0 14px; margin: 10px 0; }
.check-price { color: var(--secondary); font-weight: 700; }
.amazon-price-disclaimer { color: var(--muted); font-size: 13px; }
.dedup-panel { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.char-counter { float: right; font-size: 0.78rem; font-weight: 600; }
.discount-preview { min-height: 1.2em; margin: 0 0 4px; color: var(--primary); font-weight: 600; }
.comment-report select { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); border-radius: 6px; font-size: 0.78rem; padding: 2px 4px; }
/* Polish (Nov 18, 2026): the OAuth block shares the form card's
   width and left edge (440px, left-aligned) — centered at 520px it
   floated on a different axis than the form under it. */
.oauth-buttons { max-width: 440px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.btn-oauth { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); text-align: center; }
.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 500; text-align: center; }
.btn-google:hover { background: #f8f9fa; text-decoration: none; }
.btn-google-g { width: 18px; height: 18px; flex: none; }
.btn-oauth:hover { border-color: var(--primary); text-decoration: none; }
.oauth-divider { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 4px 0 0; }
.profile-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 10px; flex-wrap: wrap; }
.queue-item { display: flex; gap: 14px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin: 8px 0; flex-wrap: wrap; }
.queue-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 260px; flex: 1; }
.queue-item-main .hint { font-size: 0.82rem; }
.risk-score { color: var(--warn); }
.north-star .stat-num { color: var(--primary); }
.as-of { color: var(--muted); margin-top: -8px; }
.btn-danger { background: var(--danger); color: #1a0505; }
@media (max-width: 720px) { .search-form { order: 3; width: 100%; margin: 8px 0 0; } .search-form input { width: 100%; } }

/* Mobile feed header: title shrinks, the sort cluster wraps under it but
   stays right-justified (right-thumb reach, founder rule). */
@media (max-width: 720px) {
  .page-title { font-size: 24px; margin: 18px 0 6px; }
  .feed-header { flex-wrap: wrap; }
  .sort-cluster { margin: 10px 0 6px auto; }
}
@media (max-width: 480px) {
  .deal-thumb { flex-basis: 72px; height: 72px; }
  .fallback-field { border-radius: 6px; }
  .fallback-merchant { font-size: 9px; }
  .deal-prices .price { font-size: 18px; }
  .deal-card { gap: 10px; padding: 12px; }
}

/* Black Friday Price Tracker (issue #49): volt-lime/graphite
   brand styling through the theme variables — DROPPED wears the
   volt fill, FLAT sits muted, FAKE DEAL reads in danger. */
.tracker-head { max-width: 820px; }
.tracker-intro { color: var(--prose); line-height: 1.55; }
.tracker-stamp { color: var(--muted); font-size: 14px; }
.tracker-tally { font-weight: 700; }
.tally-dropped { color: var(--primary); }
.tally-flat { color: var(--muted); }
.tally-fake { color: var(--danger); }
.tracker-grid { display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  margin-top: 20px; }
.tracker-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; display: flex; flex-direction: column;
  gap: 10px; }
.tracker-card-head { display: flex; gap: 10px; align-items: flex-start;
  justify-content: space-between; }
.tracker-name { font-size: 18px; line-height: 1.3; margin: 0; }
.tracker-badge { font-size: 12px; font-weight: 800; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tracker-badge--dropped { background: var(--primary); color: var(--primary-dark); }
.tracker-badge--flat { background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); }
.tracker-badge--fake { background: var(--surface-2); color: var(--danger);
  border: 1px solid var(--danger); }
.tracker-merchant { color: var(--muted); margin: 0; font-size: 14px; }
.tracker-prices { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.tracker-now { font-size: 30px; font-weight: 800; color: var(--primary); }
.tracker-move { font-weight: 700; font-size: 14px; }
.tracker-move--dropped { color: var(--primary); }
.tracker-move--flat { color: var(--muted); }
.tracker-move--fake { color: var(--danger); }
.tracker-facts { list-style: none; margin: 0; padding: 0; display: grid;
  gap: 6px; font-size: 14px; }
.tracker-fact-note { color: var(--muted); }
.tracker-history h3 { font-size: 13px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin: 4px 0 6px; }
.tracker-history ul { list-style: none; margin: 0; padding: 0; display: grid;
  gap: 4px; font-size: 14px; }
.tracker-base-tag { color: var(--primary); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; }
.tracker-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.tracker-foot { color: var(--muted); font-size: 14px; line-height: 1.55;
  max-width: 820px; margin-top: 24px; }
.tracker-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--primary);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.tracker-banner strong { color: var(--primary); }
