/* Design tokens shared by every page (extracted from offer.css when the
   feed got styled) — the compare-workbench card language's palette.
   Light/dark follows the OS via prefers-color-scheme (no JS toggle);
   `color-scheme` here and the shell's <meta name="color-scheme"> keep the
   UA's own first paint on the right side. Link this BEFORE the page
   stylesheet. */

:root {
  --ink: #1a1a1a; --ink-soft: #5b5b5b; --ink-faint: #8a8a8a;
  --line: #e6e6e3; --bg: #faf9f7; --card: #ffffff; --surface: #fbfbf9;
  --accent: #0f6d5f; --warn: #b06a00; --miss: #a33; --chip: #f1f0ec;
  --hatch1: #efeee9; --hatch2: #e9e8e2;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9e6e1; --ink-soft: #a8a49c; --ink-faint: #79756d;
    --line: #333029; --bg: #151412; --card: #1e1c19; --surface: #232120;
    --accent: #54c6ad; --warn: #d99a45; --miss: #e58585; --chip: #2b2925;
    --hatch1: #26241f; --hatch2: #2d2b25;
    color-scheme: dark;
  }
}

/* The `hidden` attribute must always win. The search island (issue 00046,
   search.js) toggles visibility by setting `el.hidden` on the baseline offer
   list and pager and on its own results surface — but the UA's
   `[hidden] { display: none }` is an *author-overridable* rule, and
   `ul.offers`/`nav.pager`/`form.filters` each set `display: flex` (feed.css),
   which beats it (author origin, and higher specificity than `[hidden]`).
   Without this reset the baseline stays visible under the island's hydrated
   results. `!important` keeps a component `display` rule from ever silently
   defeating `hidden` again. */
[hidden] { display: none !important; }

/* The «Продажа» badge (issue 00107): shared by the feed card and the
   detail page (both link theme.css), so it lives here rather than in
   feed.css/offer.css. Plain, boxed pill in the accent color — distinct
   from the freshness chip's plain faint text — deliberately minimal;
   the stylebook pass is out of scope for this issue. */
.badge.sale {
  display: inline-block; align-self: flex-start;
  font-size: 12px; font-weight: 600; padding: 2px 9px;
  border-radius: 999px; background: var(--accent); color: var(--card);
}

/* The Offer Ref 404's suggestion list (issue rl-6mt5). The error pages link
   theme.css and feed.css, and no other page draws this list. The rule lives
   here for the same reason .site-foot does: no one page stylesheet reaches
   the error pages. The list is a short column of clickable Refs, so it drops
   the marker and sits at the text's own left edge. */
ul.suggestions { list-style: none; margin: 8px 0 0; padding: 0; }
ul.suggestions li { margin: 4px 0; }
ul.suggestions a { color: var(--accent); }

/* The generic 404's way out (issue rl-6mt5). Every other anchor rule in
   theme.css and feed.css is qualified by a class or a parent, so this link
   drew in the UA's own blue — the «this page is not ours» tell. It takes the
   accent, the same as ul.suggestions a above. */
a.way-out { color: var(--accent); }

/* The footer is the page's quietest line, and every page ends with it (issue
   rl-7tyw). It holds the year line always, plus «Написать нам: @bot» — the
   door for everything the rest of the page has no place for — where the page
   names a Market. It lives here and not in feed.css because no one page
   stylesheet reaches every page: the feed links feed.css, the Offer page
   offer.css, and theme.css is what they share. Its padding matches .wrap's,
   so the lines sit under the column and not against the viewport edge. */
/* The bottom padding is the «Отмеченные · N» chip's room. The chip is fixed
   to the viewport floor (marks.css), so the page's last line must end above
   the band it holds or the two sit on top of each other — the walk found
   that on the feed, 2026-08-04. 80px matches the clearance `main.wrap`
   already keeps for the same chip. */
.site-foot {
  max-width: 680px; margin: 0 auto; padding: 16px 16px 80px;
  border-top: 1px solid var(--line);
}
.site-foot a.support-door {
  font-size: 13px; color: var(--ink-soft); text-decoration: none;
}
.site-foot a.support-door:hover { color: var(--accent); }
/* Telegram's mark, before the handle: it says which application the door
   opens, so it rides the text baseline at the text's own size. The alt text
   carries the same word for a reader who never sees it. */
.site-foot .door-mark {
  width: 1em; height: 1em; vertical-align: -0.15em; margin-right: 4px;
}
/* The year line sits under the door, muted and smaller than it: it is the
   line a reader passes over, not one the page asks anything of. */
.site-foot .foot-year {
  margin: 6px 0 0; font-size: 12px; color: var(--ink-soft);
}
