:root {
  color-scheme: dark;
  --base: #11141b;
  --panel: #1a202a;
  --field: #222b39;
  --line: #323d4f;
  --text: #f5f7fb;
  --muted: #b2bfd1;
  --accent: #daff75;
  --ease: cubic-bezier(.18,.78,.26,1);
  font: 15px/1.45 system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--base); color: var(--text); }
button, input, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1,h2,h3,p { margin: 0; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.shell { width: min(100%, 1230px); margin: auto; padding: 0 30px 105px; }
.top, .brand, .header-actions, .search-row, .tabs, .feed-heading, .meta, .figures,
.attributes, .dialog-heading, .two-columns, .dialog-actions { display: flex; align-items: center; gap: 10px; }
.top { min-height: 76px; justify-content: space-between; padding-block: 8px; }
.brand, .brand > div { min-width: 0; }
.mark { width: 40px; height: 40px; flex: none; border-radius: 12px; color: var(--accent); background: #202a23; border: 1px solid #4b5a39; display: grid; place-items: center; }
.mark svg { width: 34px; height: 34px; }
.brand h1 { font-size: 17px; font-weight: 800; letter-spacing: -.035em; line-height: 1.2; }
.status { color: var(--muted); font-size: 12px; }
.status span { display: inline-block; width: 7px; height: 7px; background: #889ab1; border-radius: 50%; margin-right: 5px; }
.status[data-state="live"] span { background: var(--accent); }
.status[data-state="paused"] span { background: #ffc384; }
.icon-button, .filter-button, .primary, .trial-chip { min-height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--field); font-weight: 680; }
.icon-button { min-width: 42px; padding:0 8px; font-size: 19px; }
.primary, .trial-chip { color: #152000; background: var(--accent); border-color: transparent; }
.trial-chip { font-size: 11px; min-height: 34px; }
button { transition: background-color .18s, transform .18s var(--ease); }
button:active:not(:disabled) { transform: scale(.96); }

.dock { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 3px; padding: 7px 8px max(7px, env(safe-area-inset-bottom)); width: min(100%, 610px); background: #181e28; border: 1px solid var(--line); border-radius: 15px 15px 0 0; }
.dock button { display: grid; place-items: center; flex: 1; min-width: 0; gap: 3px; padding: 8px 1px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 11px; }
.dock button[aria-current] { color: var(--accent); background: #2b3626; }
.dock-icon { display: grid; place-items: center; width: 21px; height: 21px; font-size: 19px; line-height: 1; }
.feed-icon::before { content:"☷"; }
.search-icon::before { content:"⌕"; }
.user-icon::before { content:"◎"; }

.section-intro { padding: 28px 0 18px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.section-intro h2 { font-size: clamp(30px,6vw,58px); font-weight: 760; letter-spacing: -.06em; line-height: 1; }
.section-intro p { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.feed-intro { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,46%); align-items: center; gap: 18px; min-height: 255px; padding: 24px; border: 1px solid #44543a; border-radius: 19px; background: #161e20; }
.feed-intro::before { content:""; position:absolute; inset:0; z-index:-1; background: radial-gradient(ellipse at 8% 105%, #34452c, transparent 68%), linear-gradient(90deg,#daff7510 1px,transparent 1px) 0 0 / 26px 26px, linear-gradient(#daff7510 1px,transparent 1px) 0 0 / 26px 26px; }
.feed-intro > div { align-self: end; }
.feed-intro p { color: var(--accent); font-weight: 650; letter-spacing: .035em; }
.feed-intro:has(.cover[hidden]) { grid-template-columns: 1fr; min-height: 158px; }
.cover { position: relative; grid-area: 1 / 2 / span 2; align-self: stretch; min-height: 160px; overflow: hidden; border-radius: 11px; background: var(--field); }
.cover img { width: 100%; height:100%; position: absolute; object-fit: cover; object-position:center 44%; transition: transform .55s var(--ease); }
.cover:hover img, .cover:focus-visible img { transform: scale(1.05); }
.cover span { position: absolute; inset: auto 0 0; padding: 30px 12px 10px; background: linear-gradient(transparent,#0c121beF); font-weight: 700; font-size: 13px; }
.hero-stats { grid-column: 1; display: flex; flex-wrap: wrap; gap: 9px 18px; margin: 0; }
.hero-stats dt { color: var(--muted); font-size: 11px; }
.hero-stats dd { color: var(--accent); margin:0; font-size: 21px; font-weight: 750; font-variant-numeric: tabular-nums; }
.search-intro, .favorites-intro { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.search-row { flex: 1; }
.search { display: flex; flex:1; min-width:0; align-items: center; gap:8px; height: 44px; padding:0 11px; border:1px solid var(--line); border-radius:9px; background:var(--panel); }
.search input { width:100%; border:0; background:transparent; }
.tabs button, .feed-heading select { min-height:36px; border:1px solid var(--line); border-radius:7px; padding:0 9px; background:var(--base); }
.tabs button[aria-pressed="true"] { color:var(--accent); background:#273223; }
.feed-heading { justify-content:space-between; margin:15px 0 10px; color:var(--muted); font-size:13px; }
#filter-count { margin-left:5px; color:var(--accent); }
.feed { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; align-items:start; }
.card { display:grid; gap:10px; padding:9px; border:1px solid var(--line); border-radius:12px; background:var(--panel); transition:border-color .22s; }
.card:hover { border-color:#70819b; }
.thumb { height:168px; position:relative; display:grid; place-items:center; overflow:hidden; border-radius:7px; background:var(--field); }
.thumb img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.photo-placeholder,.market,.meta { color:var(--muted); font-size:12px; }
.favorite { position:absolute; right:6px; top:6px; background:#131924eF; }
.favorite[aria-pressed="true"] { color:var(--accent); }
.details { min-width:0; }
.meta { justify-content:space-between; gap:4px; }
.title { font-size:16px; margin:3px 0; }
.price { font-size:22px; white-space:nowrap; font-weight:780; letter-spacing:-.03em; }
.figures,.attributes { flex-wrap:wrap; gap:5px 8px; }
.discount,.attributes span { padding:2px 6px; border-radius:5px; background:var(--field); font-size:11px; }
.discount { background:#354328; color:var(--accent); font-weight:750; }
.description { font-size:13px; color:var(--muted); }
.description p { padding:8px 0; white-space:pre-wrap; }
.avito { display:flex; min-height:40px; align-items:center; justify-content:space-between; padding:0 10px; border:1px solid var(--line); border-radius:7px; font-weight:700; text-decoration:none; }
.avito:hover { color:var(--accent); }
.notice,.access-card,.account-card,.saved-row,.plan-box,#comparison { border:1px solid var(--line); border-radius:13px; background:var(--panel); padding:16px; }
.notice,.section-note { color:var(--muted); }
.access-card { margin:14px 0; }
.access-card p,.account-card p { color:var(--muted); margin:7px 0 13px; }

#comparison { margin:0 0 12px; }
#comparison h3 { margin-bottom:9px; }
.comparison-scroll { overflow:auto; }
#comparison table { border-collapse:collapse; font-size:13px; }
#comparison th, #comparison td { min-width:120px; padding:8px; text-align:left; border-bottom:1px solid var(--line); }
#comparison th:first-child { position:sticky; left:0; background:var(--panel); min-width:75px; color:var(--muted); }
.dashboard-list { display:grid; gap:9px; margin-top:15px; }
.saved-row { display:flex; align-items:center; gap:10px; border-left:3px solid var(--line); }
.saved-row:has([aria-checked=true]) { border-left-color:var(--accent); }
.edit-search { flex:1; text-align:left; border:0; background:none; padding:3px; }
.edit-search strong,.edit-search span { display:block; overflow-wrap:anywhere; }
.edit-search span { color:var(--muted); font-size:13px; margin-top:4px; }
.search-toggle { border:0; border-radius:30px; background:#495569; padding:3px; width:44px; flex:none; }
.search-toggle::before { content:""; display:block; width:20px; height:20px; border-radius:50%; background:white; transition:transform .23s var(--ease); }
.search-toggle[aria-checked=true] { background:var(--accent); }
.search-toggle[aria-checked=true]::before { transform:translateX(18px); background:#222d11; }

.plan-grid,.account-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:14px; margin-top:14px; }
.plan-box { min-width:0; margin:0; }
.plan-box legend { color:var(--muted); padding:0 6px; }
.plan-options,.term-options { display:grid; gap:8px; }
.choice { display:flex; gap:8px; align-items:center; padding:11px; border:1px solid var(--line); border-radius:9px; cursor:pointer; }
.choice:has(input:checked) { border-color:var(--accent); background:#303a26; }
.choice span { flex:1; }
.choice small { display:block; color:var(--muted); }
.choice > strong { white-space:nowrap; }
.plan-total { margin-top:12px; padding:12px; background:var(--accent); color:#172000; border-radius:8px; font-weight:750; }
.account-card:first-child { background:linear-gradient(125deg,#242f40,var(--panel)); }
.methodology summary { font-weight:700; }
progress { width:min(100%,280px); accent-color:var(--accent); }

dialog { color:var(--text); background:var(--panel); border:1px solid var(--line); width:min(490px,calc(100% - 22px)); max-height:calc(100dvh - 20px); padding:17px; border-radius:18px; }
dialog::backdrop { background:#070b14ad; }
.dialog-heading { justify-content:space-between; margin-bottom:13px; }
.dialog-heading h2 { font-size:22px; }
dialog label { display:block; flex:1; min-width:0; margin-bottom:10px; color:var(--muted); font-size:13px; }
dialog input, dialog select { display:block; width:100%; height:42px; margin-top:4px; padding:0 8px; border:1px solid var(--line); border-radius:7px; background:var(--field); }
input[type=radio], input[type=checkbox] { accent-color:var(--accent); }
.dialog-actions .primary { flex:1; }
.error { color:#ffa9a9; margin:7px 0; }
.search-models { margin:0 0 9px; border:1px solid var(--line); border-radius:8px; }
.model-options { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.model-options label { flex:none; position:relative; margin:0; }
.model-options input { position:absolute; width:1px; height:1px; opacity:0; }
.model-options span { display:block; padding:4px 7px; border:1px solid var(--line); border-radius:5px; cursor:pointer; }
.model-options input:checked + span { color:#162000; background:var(--accent); }
.model-options input:focus-visible + span { outline:2px solid var(--accent); outline-offset:2px; }
.inline-check { display:flex !important; align-items:center; gap:8px; }
.inline-check input { width:18px; height:18px; margin:0; }

@media(min-width:1000px) {
  .shell { width:min(calc(100% - 190px),1230px); margin-left:190px; }
  .dock { left:18px; top:88px; bottom:auto; width:153px; transform:none; flex-direction:column; border-radius:13px; }
  .dock button { display:flex; text-align:left; gap:9px; padding:9px; font-size:13px; }
}
@media(max-width:700px) {
  .shell { padding-inline:13px; }
  .top { min-height:61px; }
  .toolbar .search-row { flex-basis: 100%; }
  .feed-intro { min-height:180px; gap:8px; padding:13px; }
  .cover { min-height:143px; }
  .cover span { font-size:11px; }
  .feed { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .thumb { height:135px; }
  .card { padding:6px; }
  .title { font-size:14px; }
  .price { font-size:19px; }
  .meta { align-items:start; flex-direction:column; }
  .plan-grid,.account-grid { grid-template-columns:1fr; }
  .section-intro h2 { font-size:clamp(27px,7vw,42px); }
}
@media(max-width:360px) {
  .card .price { font-size:17px; }
  .cover { min-height:120px; }
  .dock button { font-size:10px; }
}
@media(prefers-reduced-motion:no-preference) {
  @keyframes arrive { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
  .mark svg { animation: arrive .42s var(--ease) backwards; }
  .cover,.card-enter,#comparison,.saved-row { animation:arrive .32s var(--ease) backwards; }
  .card-enter:nth-child(2n) { animation-delay:55ms; }
  dialog[open] { animation:arrive .25s var(--ease); }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none !important; } }
