/* 1. Fonts */
@font-face { font-family:"Inter"; src:url("/static/assets/fonts/inter-cyrillic.woff2") format("woff2"); font-weight:100 900; font-display:swap; unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"Inter"; src:url("/static/assets/fonts/inter-latin.woff2") format("woff2"); font-weight:100 900; font-display:swap; unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+20BD,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"Manrope"; src:url("/static/assets/fonts/manrope-cyrillic.woff2") format("woff2"); font-weight:200 800; font-display:swap; unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family:"Manrope"; src:url("/static/assets/fonts/manrope-latin.woff2") format("woff2"); font-weight:200 800; font-display:swap; unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+20BD,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* 2. Tokens */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#070b14; --surface:#0d1422; --surface-2:#131c2e; --surface-3:#1a253a;
  --line:#1f2b42; --line-2:#2c3c5c;
  --ink:#eef3fb; --ink-2:#a8b5cb; --ink-3:#73829b;
  --accent:#2563eb; --accent-hover:#3b76f0; --accent-ink:#ffffff;
  --accent-text:#7aa7ff; --accent-weak:rgba(59,130,246,.14); --accent-glow:rgba(59,130,246,.35);
  --great:#34d399; --great-bg:rgba(52,211,153,.14);
  --good:#2dd4bf;  --good-bg:rgba(45,212,191,.13);
  --check:#fbbf24; --check-bg:rgba(251,191,36,.14);
  --suspicious:#f87171; --suspicious-bg:rgba(248,113,113,.14);
  --band:rgba(59,130,246,.28);
  --skeleton:#16203a; --skeleton-shine:#1f2c4a;
  --shadow-card:0 1px 0 rgba(255,255,255,.04) inset, 0 10px 30px rgba(0,0,0,.35);
  --shadow-pop:0 18px 50px rgba(0,0,0,.55);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg:#f4f6fb; --surface:#ffffff; --surface-2:#eef2f9; --surface-3:#e4eaf5;
  --line:#dde4f0; --line-2:#c5d0e3;
  --ink:#0b1424; --ink-2:#47556d; --ink-3:#6b7891;
  --accent:#1d4ed8; --accent-hover:#2457e6; --accent-ink:#ffffff;
  --accent-text:#1d4ed8; --accent-weak:rgba(29,78,216,.09); --accent-glow:rgba(29,78,216,.22);
  --great:#047857; --great-bg:#d9f5ea;
  --good:#0f766e;  --good-bg:#d5f3f0;
  --check:#a16207; --check-bg:#fbefd2;
  --suspicious:#b91c1c; --suspicious-bg:#fbe1e1;
  --band:rgba(29,78,216,.18);
  --skeleton:#e6ebf4; --skeleton-shine:#f2f5fa;
  --shadow-card:0 1px 2px rgba(11,20,36,.05), 0 8px 24px rgba(11,20,36,.06);
  --shadow-pop:0 18px 50px rgba(11,20,36,.18);
}
:root {
  --font-ui: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Manrope", var(--font-ui);
  --t-xs:12px; --t-sm:13px; --t-base:15px; --t-md:17px; --t-lg:21px; --t-xl:27px; --t-2xl:34px; --t-3xl:46px;
  --w-regular:400; --w-medium:500; --w-bold:650;
  --lh-tight:1.15; --lh-snug:1.3; --lh-body:1.55;
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px; --s8:64px;
  --r-sm:8px; --r-md:12px; --r-lg:18px; --r-pill:999px;
  --dur-fast:120ms; --dur-base:200ms; --ease:cubic-bezier(.2,.8,.2,1);
  --header-h:64px; --page-pad:clamp(16px,3vw,48px); --content-max:1440px;
}

/* 3. Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--line-2) transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: var(--w-regular) var(--t-base)/var(--lh-body) var(--font-ui);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: var(--w-bold); line-height: var(--lh-tight); }
h1 { font-family: var(--font-display); font-size: var(--t-2xl); }
h2 { font-family: var(--font-display); font-size: var(--t-xl); }
h3 { font-size: var(--t-md); }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-weak); color: var(--ink); }

/* 4. Layout */
#app { display: block; min-height: 100vh; }
.rail {
  position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center; gap: var(--s5);
  padding: 0 var(--page-pad); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line);
}
.rail .brand, .brand {
  display: flex; align-items: center; gap: var(--s2); flex: none; min-width: 0; color: var(--ink); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; flex: none; border-radius: var(--r-sm);
  background: url('/static/assets/va-mark.svg?v=2') center/contain no-repeat;
}
.brand-name { font-family: var(--font-display); font-size: var(--t-md); font-weight: var(--w-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.brand-accent { color: var(--accent-text); }
.navlinks { display: flex; gap: var(--s1); flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.navlinks::-webkit-scrollbar { display: none; }
.rail a {
  padding: var(--s2) var(--s3); border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--t-sm);
  font-weight: var(--w-medium); white-space: nowrap; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.rail a:hover { color: var(--ink); background: var(--surface-2); }
.rail a.active { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
.rail-foot { flex: none; }
.admin-menu { position: relative; flex: none; font-size: var(--t-xs); }
.admin-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s1);
  min-height: 32px; padding: 0 var(--s3); border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2); font-size: var(--t-xs); transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.admin-menu summary::-webkit-details-marker { display: none; }
.admin-menu[open] summary, .admin-menu summary:hover { border-color: var(--line-2); color: var(--ink); background: var(--surface-3); }
.admin-menu > div {
  position: absolute; right: 0; top: calc(100% + var(--s2)); min-width: 220px; display: grid;
  background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: var(--s2);
}
.admin-menu > div a { padding: var(--s2) var(--s3); border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--t-sm); }
.admin-menu > div a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
#account { border-radius: var(--r-pill); white-space: nowrap; }
#theme { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: var(--r-sm); flex: none; }
main#view, main { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--page-pad) var(--s8); outline: none; width: 100%; }
.site-footer {
  display: flex; flex-wrap: wrap; gap: var(--s5); align-items: center; padding: var(--s6) var(--page-pad);
  border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--t-sm);
}
.site-footer > span { flex: 1; }
.site-footer a { color: var(--ink-2); }

/* 5. Primitives */
button { cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s4);
  border-radius: var(--r-sm); border: 1px solid transparent; background: var(--accent); color: var(--accent-ink);
  font-weight: var(--w-medium); font-size: var(--t-sm); text-decoration: none;
  transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--accent-hover); box-shadow: 0 6px 20px var(--accent-glow); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.on .i { fill: currentColor; }
.btn.secondary { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--line-2); background: var(--surface-3); box-shadow: none; }
.btn.danger { background: transparent; color: var(--suspicious); border-color: var(--line); }
.btn.small { min-height: 32px; padding: 0 var(--s3); font-size: var(--t-xs); }
.ghost { background: none; border: 0; color: var(--ink-2); padding: var(--s2) var(--s3); border-radius: var(--r-sm); transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.ghost:hover { background: var(--surface-2); color: var(--ink); }

input:not([type=checkbox]):not([type=radio]), select, textarea {
  min-height: 40px; padding: 0 var(--s3); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--ink); font: inherit; font-size: var(--t-sm); min-width: 0;
}
textarea { padding: var(--s2) var(--s3); min-height: 72px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); outline: none;
}
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238ca0bf' fill='none' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--s3) center; padding-right: 32px;
}
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fav-btn.on .i { fill: currentColor; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--s3);
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: var(--t-sm); text-decoration: none; cursor: pointer; transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.chip:hover { border-color: var(--line-2); text-decoration: none; }
.chip.on, .chip[aria-pressed="true"] { background: var(--accent-weak); color: var(--accent-text); border-color: var(--accent); }
.chip small { color: var(--ink-3); }
.chip .x { background: none; border: 0; color: inherit; padding: 0 0 0 4px; font-size: 15px; line-height: 1; }
.chip[data-cat]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cat-c, var(--ink-3)); }
.chip[data-cat="great"] { --cat-c: var(--great); }
.chip[data-cat="good"] { --cat-c: var(--good); }
.chip[data-cat="check"] { --cat-c: var(--check); }
.chip[data-cat="suspicious"] { --cat-c: var(--suspicious); }
.grow { flex: 1; min-width: 200px; }

.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 var(--s2); border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: var(--w-medium); }
.tag.great { background: var(--great-bg); color: var(--great); }
.tag.good { background: var(--good-bg); color: var(--good); }
.tag.check { background: var(--check-bg); color: var(--check); }
.tag.suspicious { background: var(--suspicious-bg); color: var(--suspicious); }
.priority-label { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--s2); border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: var(--w-medium); background: var(--accent-weak); color: var(--accent-text); }

.switch { display: inline-flex; align-items: center; gap: var(--s3); cursor: pointer; }
.switch input {
  appearance: none; width: 38px; height: 22px; border-radius: var(--r-pill); background: var(--line); position: relative;
  transition: background var(--dur-base) var(--ease); border: 0; padding: 0; cursor: pointer;
}
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-ink); transition: transform var(--dur-base) var(--ease); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
label.check { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); color: var(--ink); cursor: pointer; }

.field { display: flex; flex-direction: column; gap: var(--s1); font-size: var(--t-sm); color: var(--ink-2); }
.field input, .field select { color: var(--ink); font-size: var(--t-base); }
.field .help, .help { font-size: var(--t-xs); color: var(--ink-3); }
.fgroup { display: flex; flex-direction: column; gap: var(--s2); }
.fgroup > label:first-child { font-size: var(--t-xs); font-weight: var(--w-medium); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.fgroup small { display: block; margin-top: var(--s2); line-height: var(--lh-body); color: var(--ink-3); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }

/* 6. Components */
.page-head, .feed-hero {
  position: relative; isolation: isolate; border-bottom: 1px solid var(--line); color: #eef3fb;
  margin: 0 calc(var(--page-pad) * -1) var(--s6); padding: var(--s7) var(--page-pad);
  background:
    radial-gradient(900px 480px at 85% 0%, rgba(37,99,235,.35), transparent 60%),
    radial-gradient(600px 400px at 10% 120%, rgba(45,212,191,.10), transparent 60%),
    repeating-linear-gradient(118deg, transparent 0 72px, rgba(122,167,255,.06) 72px 73px),
    #060a13;
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); min-height: 200px; }
.page-head > div { max-width: 720px; }
.feed-hero { position: relative; min-height: 420px; display: flex; flex-direction: column; justify-content: center; gap: var(--s4); }
.feed-hero-copy { max-width: 660px; }
.page-head h1, .feed-hero h1 { font-family: var(--font-display); font-size: clamp(32px, 4vw, var(--t-3xl)); line-height: var(--lh-tight); letter-spacing: -.03em; font-weight: var(--w-bold); color: #eef3fb; }
.page-head p, .feed-hero p { color: #a8b5cb; font-size: var(--t-md); max-width: 60ch; }
.eyebrow { font-size: var(--t-xs); font-weight: var(--w-bold); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.accent-text { color: var(--accent-text); }
.page-head .eyebrow, .feed-hero .eyebrow { color: #7aa7ff; }
.page-head .accent-text, .feed-hero .accent-text { color: #7aa7ff; }
.page-head a, .feed-hero a { color: #9cc0ff; }
.page-head .btn { color: var(--accent-ink); }
.hero-run { position: absolute; top: var(--s5); right: var(--page-pad); }

.ask {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); max-width: 760px;
  padding: var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.ask input { flex: 1 1 auto; min-width: 160px; }
.feed-hero .ask {
  max-width: 760px; background: rgba(13,20,34,.82); border-color: #2c3c5c; backdrop-filter: blur(10px); box-shadow: var(--shadow-pop);
}
.feed-hero .ask input { background: transparent; border: 0; min-height: 48px; font-size: var(--t-md); color: #eef3fb; }
.feed-hero .ask .btn { min-height: 48px; }
.ask-icon { margin-left: var(--s3); color: var(--ink-3); }
.feed-hero .ask-icon { color: #c9d6ea; }
#askExamples { margin: -6px 0 var(--s4); }
.feed-hero #askExamples { flex-wrap: nowrap; overflow-x: auto; }
.feed-hero #askExamples .chip { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: #c9d6ea; }
.parsed { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4) var(--s5); margin-bottom: var(--s4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }
.parsed strong { font-weight: var(--w-bold); }

.suggest-wrap { position: relative; }
.suggest-list {
  position: absolute; left: 0; right: 0; top: calc(100% + var(--s1)); background: var(--surface-3); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-pop); max-height: 280px; overflow-y: auto; z-index: 40; padding: var(--s1);
}
.suggest-item { padding: var(--s2) var(--s3); border-radius: var(--r-sm); cursor: pointer; font-size: var(--t-sm); display: flex; align-items: baseline; gap: var(--s2); justify-content: space-between; }
.suggest-item:hover, .suggest-item.hi { background: var(--surface-2); }
.suggest-item mark { background: none; color: var(--accent-text); font-weight: var(--w-bold); padding: 0; }
.suggest-item small { flex: none; }

/* карточка объявления */
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s5); }
.list.list-xl { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); }
.list > .empty, .list > p { grid-column: 1 / -1; }
.list-xl .title { font-size: var(--t-lg); }
.list-xl .price { font-size: var(--t-xl); }

.row {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; cursor: pointer;
  transition: transform var(--dur-base) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.row:hover, .row:focus-visible { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow-card); }
.thumb { position: relative; aspect-ratio: 16/10; background: var(--surface-2); overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-base) var(--ease); }
.row:hover .thumb img { transform: scale(1.03); }
.thumb.catalog img { filter: saturate(.6); }
.no-photo { display: grid; place-items: center; gap: var(--s1); height: 100%; color: var(--ink-3); font-size: var(--t-sm); }
.photo-label { position: absolute; left: var(--s3); bottom: var(--s3); background: rgba(7,11,20,.72); color: #eef3fb; height: 24px; display: inline-flex; align-items: center; padding: 0 var(--s2); border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: var(--w-medium); }
.thumb-badges { position: absolute; top: var(--s3); left: var(--s3); right: 56px; display: flex; flex-wrap: wrap; gap: 6px; }
.thumb-badges .tag { backdrop-filter: blur(8px); background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid color-mix(in srgb, currentColor 40%, transparent); }
.thumb .fav-btn {
  position: absolute; top: var(--s3); right: var(--s3); width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(7,11,20,.6); color: #fff; border: 0; backdrop-filter: blur(6px);
  transition: background var(--dur-fast) var(--ease);
}
.thumb .fav-btn:hover { background: rgba(7,11,20,.8); }
.thumb .fav-btn.on { color: #ff6b81; }
.info { padding: var(--s4) var(--s4) var(--s2); display: grid; gap: 6px; min-width: 0; }
.title { font-size: var(--t-md); font-weight: var(--w-bold); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { font-size: var(--t-sm); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: var(--s2); font-size: var(--t-xs); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.meta > span + span::before { content: "·"; margin-right: var(--s2); color: var(--line-2); }
.pricebox { margin-top: auto; padding: var(--s2) var(--s4) var(--s3); display: grid; gap: 6px; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.price { font-family: var(--font-display); font-size: var(--t-lg); font-weight: var(--w-bold); letter-spacing: -.02em; white-space: nowrap; color: var(--ink); }
.gap { font-size: var(--t-sm); font-weight: var(--w-medium); }
.gap.great { color: var(--great); } .gap.good { color: var(--good); } .gap.check { color: var(--check); } .gap.suspicious { color: var(--suspicious); }
.gap.provisional, .gap .muted { color: var(--ink-3); font-weight: var(--w-regular); font-size: var(--t-xs); }
.market-range { font-size: var(--t-xs); color: var(--ink-3); }
.market-range:empty { display: none; }
.row-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s4); border-top: 1px solid var(--line); }
.freshness { font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.compare-btn { min-height: 30px; padding: 0 var(--s2); font-size: var(--t-xs); gap: 6px; display: inline-flex; align-items: center; }
.compare-btn[aria-pressed="true"] { color: var(--accent-text); background: var(--accent-weak); }

/* рейтинг и шкала */
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--ink-2); vertical-align: middle; }
.rating b { color: var(--ink); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.rbars { display: inline-flex; gap: 2px; }
.seg { width: 4px; height: 12px; border-radius: 2px; background: var(--line-2); }
.rating.great .seg.on { background: var(--great); } .rating.good .seg.on { background: var(--good); }
.rating.check .seg.on { background: var(--check); } .rating.suspicious .seg.on { background: var(--suspicious); }
.rating.big { font-size: var(--t-sm); gap: var(--s2); }
.rating.big .seg { width: 6px; height: 16px; }
.ruler { position: relative; height: 22px; margin-top: var(--s2); }
.ruler .track { position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: var(--line); }
.ruler .band { position: absolute; top: 6px; height: 10px; border-radius: 5px; background: var(--band); }
.ruler .fairtick { position: absolute; top: 3px; width: 2px; height: 16px; background: var(--ink-3); transform: translateX(-1px); }
.ruler .mark {
  position: absolute; top: 2px; width: 18px; height: 18px; border-radius: 50%; transform: translateX(-9px);
  background: var(--cat, var(--accent)); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--cat, var(--accent));
}
.ruler-legend { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--ink-3); margin-top: var(--s1); }
.ruler.big { height: 30px; margin-top: var(--s3); }
.ruler.big .track { top: 13px; } .ruler.big .band { top: 9px; height: 12px; border-radius: 6px; }
.ruler.big .fairtick { top: 5px; height: 22px; } .ruler.big .mark { top: 4px; width: 22px; height: 22px; transform: translateX(-11px); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s5); margin-bottom: var(--s4); min-width: 0; }
.panel h2 { font-size: var(--t-md); margin-bottom: var(--s1); }
.hint { color: var(--ink-2); font-size: var(--t-sm); margin-bottom: var(--s4); max-width: 70ch; }
.panel:has(> table) { overflow-x: auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s4); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s3); margin: 0 0 var(--s5); }
.stats > span { display: flex; flex-direction: column; gap: 2px; padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink-3); font-size: var(--t-xs); }
.stats b { font-family: var(--font-display); font-size: var(--t-xl); font-weight: var(--w-bold); color: var(--ink); }
.stats.ops-summary { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.empty {
  grid-column: 1 / -1; display: grid; justify-items: center; gap: var(--s2); text-align: center;
  padding: var(--s8) var(--s5); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-md); color: var(--ink-2);
}
.empty::before { content: ""; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-weak); box-shadow: inset 0 0 0 1px var(--accent-glow); }
.empty strong { font-size: var(--t-lg); color: var(--ink); font-family: var(--font-display); }
.empty-action { display: inline-block; margin-top: var(--s4); text-decoration: none; }

.row.skeleton { pointer-events: none; cursor: default; }
.sk, .row.skeleton .thumb { background: linear-gradient(90deg, var(--skeleton) 0%, var(--skeleton-shine) 50%, var(--skeleton) 100%); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; border-radius: 6px; }
.row.skeleton .thumb { border-radius: 0; }
.sk { display: block; height: 12px; }
.sk-title { height: 16px; width: 70%; }
.sk-line { width: 90%; }
.sk-line.short { width: 55%; }
.sk-price { height: 22px; width: 45%; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.toast {
  position: fixed; left: 50%; bottom: var(--s5); transform: translate(-50%, 16px); opacity: 0;
  background: var(--surface-3); color: var(--ink); border: 1px solid var(--line-2); padding: var(--s3) var(--s4);
  border-radius: var(--r-md); box-shadow: var(--shadow-pop); font-size: var(--t-sm); pointer-events: none;
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease); z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.scrim { position: fixed; inset: 0; background: rgba(3,6,12,.6); backdrop-filter: blur(2px); z-index: 40; }
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(760px, 100vw); background: var(--bg); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-pop); transform: translateX(102%); transition: transform 260ms var(--ease); overflow-y: auto; z-index: 50;
}
.drawer.open { transform: none; }
.drawer .inner { padding: var(--s5) var(--s6) var(--s7); }
.drawer .top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.drawer h1 { font-size: var(--t-xl); }
.listing-freshness { margin-top: var(--s2); }
.drawer h3 { margin: var(--s6) 0 var(--s3); font-size: var(--t-md); }
.drawer .photo { aspect-ratio: 16/10; border-radius: var(--r-md); background: var(--surface-2) center/cover no-repeat; margin: var(--s4) 0 var(--s2); }
.gallery { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: var(--s1); margin-bottom: var(--s2); }
.gallery .g { flex: none; width: 88px; height: 60px; border-radius: var(--r-sm); border: 2px solid transparent; padding: 0; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.gallery .g img { width: 100%; height: 100%; object-fit: cover; }
.gallery .g.active, .gallery .g:hover { border-color: var(--accent); }
.bigprice { font-family: var(--font-display); font-size: var(--t-2xl); font-weight: var(--w-bold); letter-spacing: -.02em; margin-top: var(--s4); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin: var(--s4) 0; }
.kv > div { background: var(--surface); padding: var(--s3); }
.kv small { display: block; color: var(--ink-3); font-size: var(--t-xs); }
.kv span { font-weight: var(--w-medium); }
.receipt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s2) var(--s4); font-variant-numeric: tabular-nums; }
.receipt .line { display: flex; align-items: baseline; gap: var(--s2); padding: var(--s2) 0; }
.receipt .line + .line { border-top: 1px dashed var(--line); }
.receipt .dots { flex: 1; border-bottom: 1px dotted var(--line-2); transform: translateY(-4px); min-width: 12px; }
.receipt .plus { color: var(--great); font-weight: var(--w-bold); }
.receipt .minus { color: var(--suspicious); font-weight: var(--w-bold); }
.receipt .total { margin: var(--s2) calc(var(--s4) * -1) 0; padding: var(--s3) var(--s4); background: var(--accent-weak); border-top: 0; font-weight: var(--w-bold); }
.notes { display: flex; flex-direction: column; gap: var(--s2); margin: var(--s3) 0; }
.note { padding: var(--s3); border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: var(--t-sm); }
.note.good { background: var(--great-bg); border-color: transparent; }
.note.bad { background: var(--check-bg); border-color: transparent; }
.note.scam { background: var(--suspicious-bg); border-color: transparent; }
.desc { white-space: pre-wrap; max-height: 280px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3) var(--s4); font-size: var(--t-sm); color: var(--ink-2); }
mark.ev { color: inherit; border-radius: 3px; padding: 0 2px; }
mark.ev.pos { background: var(--great-bg); box-shadow: inset 0 -2px 0 var(--great); }
mark.ev.neg { background: var(--check-bg); box-shadow: inset 0 -2px 0 var(--check); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s6); }
#reportListing { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
#reportListing label { flex: 1 1 100%; font-weight: var(--w-medium); }
.passport { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--s2); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s3); display: flex; flex-direction: column; gap: 1px; }
.tile small { color: var(--ink-3); font-size: var(--t-xs); }
.tile b { font-weight: var(--w-bold); font-size: var(--t-base); }
.tile span { color: var(--ink-3); font-size: var(--t-xs); }
.tile.ok b { color: var(--great); } .tile.bad b { color: var(--suspicious); } .tile.mid b { color: var(--check); } .tile.none b { color: var(--ink-3); font-weight: var(--w-regular); }

.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3); }
.chart svg text, svg text { fill: var(--ink-3); font-size: 11px; font-family: var(--font-ui); }
.hbars { display: flex; flex-direction: column; gap: var(--s2); }
.hbrow { display: grid; grid-template-columns: 150px 1fr 56px; gap: var(--s3); align-items: center; font-size: var(--t-sm); }
.hblabel { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbtrack { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.hbfill { display: block; height: 100%; background: var(--band); border-right: 2px solid var(--accent-text); border-radius: 5px; }
.hbn { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin: var(--s3) 0 var(--s2); }
.progress > div { height: 100%; background: var(--accent); transition: width var(--dur-base) var(--ease); }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: var(--s2); background: var(--great); }
.status-dot.bad { background: var(--suspicious); } .status-dot.warn { background: var(--check); } .status-dot.off { background: var(--ink-3); }

table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-sm); }
th { text-align: left; font-size: var(--t-xs); font-weight: var(--w-medium); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; background: var(--surface-2); }
th, td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: var(--surface-2); }
.cmp { table-layout: fixed; min-width: 720px; }
.cmp th:first-child, .cmp td:first-child { position: sticky; left: 0; background: var(--surface); width: 180px; z-index: 1; }
.cmp thead th img, .compare-photo-placeholder { width: 100%; aspect-ratio: 16/10; height: auto; object-fit: cover; border-radius: var(--r-sm); }
.compare-photo-placeholder { display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); font-size: var(--t-sm); }
.comparison-price { font-family: var(--font-display); font-size: var(--t-lg); font-weight: var(--w-bold); margin: var(--s2) 0; color: var(--ink); }
.cmp td.best { color: var(--great); background: var(--great-bg); font-weight: var(--w-medium); }
.compare-diff-toggle { display: inline-flex; align-items: center; gap: var(--s2); margin-bottom: var(--s4); }

/* 7. Pages */
/* --- лента --- */
.feed-tools { display: grid; gap: var(--s3); margin-bottom: var(--s4); }
.feed-tools > div:first-child strong { font-size: var(--t-md); font-weight: var(--w-bold); }
.feed-tools .fgroup { gap: var(--s2); }
.brandchip {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); padding: 5px var(--s3) 5px 5px; border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: var(--w-medium);
  cursor: pointer; transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.brandchip:hover { border-color: var(--accent); transform: translateY(-1px); }
.brand-glyph { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--accent); }
.brand-glyph img { width: 28px; height: 28px; object-fit: contain; }
.brand-glyph svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; }
.brand-initials { font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--ink); letter-spacing: -.04em; }
.brandchip .brand-glyph { flex: 0 0 22px; width: 22px; height: 22px; }
.brandchip .brand-glyph img { width: 16px; height: 16px; }
.brandchip .brand-initials { font-size: 10px; }
.searchchip small { opacity: .7; font-weight: var(--w-regular); }
.brandrow { gap: var(--s2); }
.filters {
  display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; padding: var(--s3); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: var(--s5);
}
.filters select, .filters input { min-height: 36px; font-size: var(--t-sm); }

/* --- поиск --- */
.geo-controls { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: var(--s5); }
.geo-toggle { display: flex; align-items: center; gap: var(--s3); border: 0; padding: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.geo-check { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--accent-ink); }
.geo-toggle[aria-pressed="true"] .geo-check { border-color: var(--accent); background: var(--accent); }
.geo-toggle strong, .geo-toggle small { display: block; }
.geo-toggle small { margin-top: 3px; color: var(--ink-2); }
.geo-radius { display: flex; align-items: center; gap: var(--s2); color: var(--ink-2); white-space: nowrap; }
.geo-radius select { min-height: 36px; }
.subscription-link { align-self: center; white-space: nowrap; }
.browse { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.fpanel { position: sticky; top: calc(var(--header-h) + var(--s4)); max-height: calc(100dvh - var(--header-h) - var(--s6)); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); }
.fpanel summary { font-size: var(--t-md); font-weight: var(--w-bold); cursor: pointer; list-style: none; margin-bottom: var(--s3); }
.fpanel summary::-webkit-details-marker { display: none; }
.fpanel > details > summary { grid-column: 1 / -1; }
.filter-grid, .advanced-grid { display: grid; gap: var(--s4); }
.advanced-filters { border-top: 1px solid var(--line); padding-top: var(--s4); margin-top: var(--s4); }
.advanced-filters summary { font-size: var(--t-sm); color: var(--accent-text); cursor: pointer; margin: 0; list-style: none; }
.advanced-filters summary::-webkit-details-marker { display: none; }
.car-select { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
.car-select-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.car-select-pick { display: grid; gap: var(--s1); min-width: 0; }
.car-select-pick > label { color: var(--ink-2); font-size: var(--t-xs); }
.car-select-pick select { width: 100%; min-width: 0; }
.all-cars-toggle { display: flex; align-items: center; gap: var(--s3); cursor: pointer; }
.all-cars-toggle input { width: 18px; min-height: 18px; flex: none; accent-color: var(--accent); }
.all-cars-toggle strong, .all-cars-toggle small { display: block; }
.all-cars-toggle small { margin-top: 2px; color: var(--ink-2); font-weight: var(--w-regular); }
.model-mods { grid-column: 1 / -1; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.model-mods > .muted { display: block; margin-bottom: var(--s2); font-size: var(--t-xs); }
.model-mods .chip { cursor: pointer; }
.model-mods .chip small { display: inline; margin: 0 0 0 4px; color: var(--ink-2); font-size: 11px; line-height: 1; }
#breset { justify-self: start; grid-column: 1 / -1; min-height: 30px; padding: 0; border: 0; background: none; color: var(--ink-2); font-size: var(--t-xs); }
.bhead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s4); }
.bhead > div { flex: 1 1 auto; }
#btotal { font-size: var(--t-md); }

/* --- каталог --- */
.catalog-tools { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s4); }
.catalog-tools input { width: min(360px, 70%); }
.catalog-popular { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s5); }
.catalog-popular > span { margin-right: var(--s2); font-size: var(--t-sm); color: var(--ink-2); }
.catalog-popular button { display: inline-flex; align-items: center; gap: var(--s2); }
.catalog-popular .brand-glyph { width: 22px; height: 22px; flex-basis: 22px; }
.catalog-popular .brand-glyph img { width: 18px; height: 18px; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.catalog-choice { border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; color: var(--ink); }
.catalog-choice.brand-choice { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color var(--dur-fast) var(--ease); }
.catalog-choice.brand-choice:hover { border-color: var(--accent); }
.brand-choice-copy { flex: 1; min-width: 0; }
.brand-choice-copy strong, .model-choice-copy strong { display: block; margin-bottom: 4px; font-size: var(--t-base); font-weight: var(--w-bold); color: var(--ink); }
.brand-choice-copy > span, .model-choice-copy > span { display: flex; justify-content: space-between; gap: var(--s2); color: var(--ink-3); font-size: var(--t-xs); }
.catalog-choice.model-choice { display: flex; flex-direction: column; align-items: stretch; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color var(--dur-fast) var(--ease); }
.catalog-choice.model-choice:hover { border-color: var(--accent); }
.model-choice > img, .model-placeholder { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--surface-2); }
.model-placeholder { display: flex; flex-direction: column; gap: var(--s2); justify-content: center; align-items: center; color: var(--ink-3); }
.model-placeholder svg { width: 64px; height: 42px; stroke: var(--ink-3); fill: none; stroke-width: 2; }
.model-placeholder small { font-size: var(--t-xs); }
.model-choice-copy { padding: var(--s3); }

/* --- топ --- */
.top-periods { margin-bottom: var(--s5); }

/* --- рынок --- */
.market-shortlist { margin-top: var(--s3); }
#mres:has(#trend) { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
#mres .panel { margin-top: 0; }

/* --- мои поиски --- */
.rows-simple > * + * { border-top: 1px solid var(--line); }
.srow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s4) 0; }
.srow small { display: block; color: var(--ink-3); font-size: var(--t-xs); }

/* --- вход / аккаунт --- */
.login { max-width: 360px; margin: 18vh auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s6); }
.login form { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s4); }
.auth-layout { display: grid; grid-template-columns: 1fr 440px; gap: var(--s7); align-items: center; max-width: 1040px; margin: var(--s7) auto; }
.auth-intro h1 { font-size: clamp(32px, 4vw, 52px); line-height: var(--lh-tight); margin: var(--s4) 0 var(--s5); }
.auth-intro p { color: var(--ink-2); max-width: 35ch; font-size: var(--t-md); margin-bottom: var(--s6); }
.auth-box { background: var(--surface); border: 1px solid var(--line); padding: var(--s6); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.auth-box h2 { font-size: var(--t-xl); }
.auth-box form { margin-top: var(--s5); }
.auth-box label { display: grid; gap: var(--s2); font-size: var(--t-sm); margin: var(--s4) 0; }
.auth-box input { width: 100%; min-height: 44px; }
.auth-box .btn { width: 100%; }
.auth-status { font-size: var(--t-sm); margin: var(--s3) 0; color: var(--ink-2); overflow-wrap: anywhere; }
.auth-divider { display: flex; align-items: center; gap: var(--s4); font-size: var(--t-xs); color: var(--ink-3); margin: var(--s5) 0; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.auth-links { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s6); font-size: var(--t-sm); }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--s5); }
.account-grid h2 { margin-bottom: var(--s3); }
.account-grid h3 { margin-top: var(--s5); }
.account-grid .btn, .account-grid a { margin-top: var(--s4); display: inline-block; }

/* --- подписка --- */
.plan-name { display: block; font-size: var(--t-lg); margin-bottom: var(--s3); }
.offer-price { display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; margin: var(--s5) 0 var(--s2); }
.offer-price strong { font-family: var(--font-display); font-size: 44px; font-weight: var(--w-bold); color: var(--accent-text); }
.offer-price span, .offer-regular { color: var(--ink-2); font-size: var(--t-sm); }
.demo-list { margin-top: var(--s5); }
.demo-car { display: flex; gap: var(--s3); align-items: center; padding: var(--s4) 0; border-top: 1px solid var(--line); }
.demo-car img { width: 96px; height: 64px; object-fit: cover; border-radius: var(--r-sm); }
.demo-car strong { font-size: var(--t-sm); }
.demo-car p { margin: var(--s1) 0 0; font-size: var(--t-xs); color: var(--ink-2); }

/* --- о сервисе / блог --- */
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: var(--s6) 0 var(--s4); }
.method-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s4); }
.step-number { display: block; color: var(--accent-text); font-weight: var(--w-bold); font-size: var(--t-2xl); font-family: var(--font-display); margin-bottom: var(--s5); }
.method-grid p, .about-bottom p { color: var(--ink-2); line-height: var(--lh-body); }
.about-bottom { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--s4); margin-top: var(--s5); }
.journal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s5); }
.journal-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.journal-card img { display: block; width: 100%; height: 220px; object-fit: cover; }
.journal-card > div { padding: var(--s5); }
.journal-card h2 { font-size: var(--t-xl); margin: var(--s3) 0; }
.journal-card p { min-height: 60px; color: var(--ink-2); line-height: var(--lh-body); }
.guide-article { max-width: 760px; margin: var(--s6) auto; padding: var(--s6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.guide-article p { font-size: var(--t-md); line-height: var(--lh-body); color: var(--ink-2); }

/* --- админка --- */
#view:is([data-page="stats"],[data-page="base"],[data-page="settings"],[data-page="users"],[data-page="audit"],[data-page="reports"],[data-page="ops"]) .page-head {
  min-height: 0; margin: 0 0 var(--s5); padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.ops-table { overflow-x: auto; }
.ops-table table { width: 100%; min-width: 680px; }
.ops-table td { overflow-wrap: anywhere; }

/* 8. Responsive */
@media (max-width: 1200px) {
  .browse { grid-template-columns: 260px minmax(0, 1fr); }
  .list.list-xl { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
}
@media (max-width: 960px) {
  html { scroll-padding-top: 110px; }
  .rail { height: auto; flex-wrap: wrap; padding-top: var(--s2); padding-bottom: var(--s2); row-gap: 0; }
  .admin-menu, #account, #theme { margin-left: 0; }
  #account { margin-left: auto; }
  .navlinks { order: 10; flex-basis: 100%; padding-bottom: var(--s2); }
  .browse { grid-template-columns: minmax(0, 1fr); }
  .fpanel { position: static; max-height: none; }
  .auth-layout { grid-template-columns: minmax(0, 1fr); }
  #mres:has(#trend) { grid-template-columns: minmax(0, 1fr); }
  .drawer { width: 100vw; }
}
@media (max-width: 720px) {
  .page-head { flex-direction: column; align-items: flex-start; gap: var(--s3); }
  .page-head, .feed-hero { min-height: 0; padding: var(--s6) var(--page-pad); }
  .page-head h1, .feed-hero h1 { font-size: 30px; }
  .feed-hero .ask { flex-direction: column; align-items: stretch; }
  .feed-hero .ask .btn { width: 100%; }
  .list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .filters select, .filters input { flex: 1 1 140px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-grid, .journal-grid, .about-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .list, .list.list-xl { grid-template-columns: minmax(0, 1fr); }
  .brand-name { font-size: var(--t-base); }
  .btn, .chip, input:not([type=checkbox]):not([type=radio]), select, textarea { min-height: 44px; }
  .btn.small { min-height: 36px; }
  .row-actions .compare-btn { min-height: 40px; }
  .drawer .inner { padding: var(--s4); }
  .method-grid, .journal-grid, .about-bottom { grid-template-columns: minmax(0, 1fr); }
}

/* 9. Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
