/* پلاک. Layout and component vocabulary inspired by bama.ir, with Pelak's blue accents.
   Pelak keeps its name and federated search. Asset sources: docs/design-assets.md.
   The server's CSP allows no inline styles: every style lives here. */
@font-face { font-family: Vazirmatn; src: url('assets/vazirmatn-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('assets/vazirmatn-medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('assets/vazirmatn-bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ink: #191D29;          /* Bama's text ink */
  --ink-2: #595C67;        /* ink at 72% on white, as a solid */
  --muted: #7D8089;        /* placeholders, footer */
  --tile: #272D3F;         /* selected tile / segment */
  --field: #F4F5F7;        /* filled inputs and the big search fields */
  --soft: #F9F9FB;         /* outline-button fill */
  --soft-2: #ECEEF3;       /* segmented-control track */
  --border: #D9DFEE;       /* outlined tiles and buttons */
  --divider: #EDEEF1;      /* row and section rules */
  --accent: #2854DC;
  --accent-press: #2046BB;
  --link: #2854DC;
  --chip: #EDF2FF;
  --warn: #5E4500; --warn-bg: #FFF5D1;
  --bad: #8A1C1C;
  --r: 12px; --r-s: 8px;
  --wrap: 1024px;
}

* { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: #fff; color: var(--ink); font: 400 16px/1.6 Vazirmatn, Tahoma, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
ul { list-style: none; margin: 0; padding: 0; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.wrap { max-width: calc(var(--wrap) + 32px); margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 50; padding: 8px 14px; border-radius: var(--r-s); background: var(--ink); color: #fff; }
.skip:focus { top: 8px; }

/* ── Header: nav at the start, logo in the middle, actions at the end ── */
.top { position: relative; border-bottom: 1px solid var(--divider); background: #fff; }
.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 72px; }
.nav { display: flex; gap: 24px; font-weight: 500; font-size: 15px; }
.nav a { padding: 6px 0; }
.nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }
.actions { display: flex; justify-content: flex-end; gap: 8px; }
.icon-btn { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: var(--r); background: var(--field); color: var(--ink); }
.menu-btn { display: none; }
.home .top { border-bottom: 0; }
.header-search { padding-inline: 14px; font-size: 14px; }

/* Logo: «پلاک» on a small plate, with the blue strip of an Iranian plate at its left end. */
.logo { display: inline-flex; align-items: stretch; height: 40px; border: 2.5px solid var(--ink); border-radius: 9px; overflow: hidden; background: #fff; }
.logo b { display: grid; place-items: center; padding: 0 12px 2px; font-size: 22px; font-weight: 700; line-height: 1; }
.logo i { width: 14px; background: #1747D6; position: relative; }
.logo i::before, .logo i::after { content: ''; position: absolute; inset-inline: 4px; height: 3px; border-radius: 1px; }
.logo i::before { top: 7px; background: #23A455; }
.logo i::after { top: 13px; background: #fff; box-shadow: 0 3px 0 #E5343B; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: var(--r); border: 0; font-weight: 700; font-size: 15px; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-press); }
.btn-outline { background: var(--soft); border: 1px solid var(--border); color: var(--ink); font-weight: 500; }
.btn-outline:hover { border-color: var(--accent); background: var(--chip); color: var(--link); }
.btn:disabled { opacity: .6; }

/* ── Fields ── */
.sel { position: relative; display: block; }
.sel select { appearance: none; width: 100%; height: 48px; padding: 0 16px 0 36px; border: 0; border-radius: var(--r-s); background: var(--field); font-size: 14px; }
.sel::after { content: ''; position: absolute; left: 16px; top: 50%; width: 7px; height: 7px; border: solid var(--ink); border-width: 0 0 1.6px 1.6px; transform: translateY(-70%) rotate(-45deg); pointer-events: none; }
.sel.sm select { height: 40px; }
.fld { position: relative; display: block; }
.fld input { width: 100%; height: 40px; padding: 0 12px; padding-inline-end: 40px; border: 0; border-radius: var(--r-s); background: var(--field); font-size: 14px; }
.fld input::placeholder, .bigfield input::placeholder { color: var(--muted); }
.fld .clear { position: absolute; inset-inline-end: 4px; top: 4px; }
.clear { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--r-s); background: none; color: var(--ink-2); }
.clear .icon { width: 16px; height: 16px; }
.clear[hidden] { display: none; }
input[type="search"]::-webkit-search-cancel-button { display: none; }

/* Brand/model suggestions (a combobox): the list opens under its field. */
.combo-list { position: absolute; z-index: 30; top: calc(100% + 6px); inset-inline: 0; max-height: 320px; overflow-y: auto; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); box-shadow: 0 12px 32px rgba(25, 29, 41, .14); text-align: start; }
.combo-list[hidden] { display: none; }
.combo-list li { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: var(--r-s); cursor: pointer; font-size: 15px; }
.combo-list li[aria-selected="true"], .combo-list li[data-i]:hover { background: var(--field); }
.combo-list li.none { color: var(--ink-2); font-size: 14px; cursor: default; }
.combo-list .ic { width: 30px; height: 20px; object-fit: contain; flex: none; }
.combo-list .hint { margin-inline-start: auto; color: var(--muted); font-size: 12px; }
.mark-ikco { filter: grayscale(1) contrast(1.3) brightness(.6); }
.mark-saipa { filter: brightness(0); }

/* ── Home hero ── */
.hero { padding: 40px 0 0; text-align: center; }
.hero h1 { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.5; }
.hero .sub { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.search-launch { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 64px; margin: 32px 0 0; padding: 0 24px; border: 0; border-radius: var(--r); background: var(--field); color: var(--muted); font-size: 15px; text-align: start; }
.search-launch .icon { width: 24px; height: 24px; color: var(--accent); }
.search-launch:hover { background: var(--chip); box-shadow: inset 0 0 0 1px var(--border); }
.search { text-align: start; }
.bigpair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bigfield { position: relative; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 20px; padding-inline-end: 12px; background: var(--field); border-radius: var(--r); }
.bigfield .cap { flex: none; padding-inline-end: 12px; border-inline-end: 1px solid var(--border); font-weight: 700; font-size: 15px; line-height: 28px; }
.bigfield input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 16px; outline: none; }
.bigfield:focus-within { box-shadow: 0 0 0 2px var(--link); }
.search-ranges { display: grid; gap: 20px; margin-top: 20px; }
.search-location-year { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; align-items: end; }
.range-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.range-group legend { padding: 0; margin-bottom: 10px; font-size: 15px; font-weight: 500; }
.range-group legend span { color: var(--ink-2); font-size: 13px; font-weight: 400; }
.year-group legend { font-size: 13px; font-weight: 400; color: var(--ink-2); margin-bottom: 8px; }
.search-dialog .year-group .sel::after { top: 50%; }
.range-group .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.price-pair > * { min-width: 0; }
.price-field input { height: 44px; font-size: 14px; }
.price-field .clear { top: 6px; }
.price-field .combo-list { max-height: 240px; }
.price-field .combo-list li { flex-wrap: wrap; column-gap: 8px; padding-block: 6px; font-size: 13px; }
.price-field .combo-list .hint { font-size: 11px; }
.field-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; }

.types { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding-bottom: 30px; border-bottom: 1px solid var(--divider); }
.type { position: relative; display: grid; justify-items: center; gap: 4px; width: 96px; padding: 12px 0; border-radius: var(--r); background: #fff; font-size: 14px; color: var(--ink); border: 0; flex: none; }
.type .pic { width: 48px; height: 48px; object-fit: contain; }
.type[aria-pressed="true"] { background: var(--tile); color: #fff; font-weight: 700; }
.type[aria-pressed="true"]::after { content: ''; position: absolute; bottom: -31px; width: 32px; height: 2px; border-radius: 9px; background: var(--accent); }
.types .scope { margin: 0; margin-inline-start: 8px; color: var(--muted); font-size: 13px; text-align: start; max-width: 220px; line-height: 1.8; }
.types .btn-outline { margin-inline-start: auto; padding-inline: 12px; }

/* Model photos echo the reference's open, horizontal vehicle strip. */
.model-section { position: relative; padding: 72px 0 12px; }
.model-section[hidden] { display: none; }
.model-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4.6); gap: 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; padding-block: 8px; }
.model-rail a { display: grid; justify-items: center; gap: 16px; padding: 12px 0; font-size: 14px; white-space: nowrap; scroll-snap-align: start; }
.model-rail img { width: 100%; height: 112px; object-fit: contain; }
.model-rail a:hover { color: var(--link); }
.rail-next { position: absolute; left: 0; top: 50%; width: 40px; height: 40px; background: var(--soft); border: 1px solid var(--ink-2); z-index: 1; }
.rail-controls { display: flex; flex-direction: row-reverse; gap: 8px; }
.rail-controls .icon-btn { width: 40px; height: 40px; border: 1px solid var(--ink-2); background: var(--soft); }
.flip { display: inline-flex; transform: scaleX(-1); }

/* ── Home sections ── */
.sec { padding: 80px 0 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.sec h2 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.5; }
.sec .lead { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }

.ready { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.ready a { position: relative; display: block; height: 280px; overflow: hidden; border-radius: var(--r); background: var(--tile); color: #fff; scroll-snap-align: start; }
.ready a:first-child { grid-column: span 2; }
.ready a::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(15,20,27,.86), transparent 72%); }
.ready a > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ready-copy { position: absolute; inset: auto 20px 20px; z-index: 1; display: grid; gap: 12px; }
.ready .q { font-weight: 700; font-size: 22px; line-height: 1.6; }
.ready .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ready .tags span { padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.18); font-size: 11px; line-height: 20px; }
.ready a:focus-visible { outline-offset: -4px; outline-color: var(--accent); }

.trending-section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
.trending-section .sec-head { flex-direction: column; align-items: flex-start; justify-content: space-between; margin: 0; padding-block: 4px; }
.trending-section .lead { max-width: 210px; margin-top: 10px; font-size: 14px; }
.trending-section .btn-outline { height: 44px; padding-inline: 12px; font-size: 14px; }
.trending-gallery { position: relative; min-width: 0; }
.trending { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(144px, calc((100% - 48px) / 4.15)); gap: 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.filter-card { position: relative; display: block; height: 288px; overflow: hidden; border-radius: var(--r); background: var(--soft); scroll-snap-align: start; }
.filter-card > img { position: absolute; inset: auto 0 0; display: block; width: 100%; height: auto; object-fit: contain; }
.filter-card::after { content: ''; position: absolute; inset: 0; border: 1px solid transparent; border-radius: inherit; pointer-events: none; }
.filter-caption { position: absolute; top: 16px; inset-inline: 14px; display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.filter-symbol { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid #E7E7ED; border-radius: 50%; background: rgba(255,255,255,.5); }
.filter-symbol .icon { width: 16px; height: 16px; stroke-width: 1.5; }
.filter-cutout > img { position: absolute; inset: auto 4px 20px; width: calc(100% - 8px); height: 174px; object-fit: contain; object-position: center bottom; }
.filter-card:hover::after { border-color: #D9DCE4; box-shadow: inset 0 -3px 0 var(--accent); }
.filter-card:focus-visible { outline-offset: -3px; }
.trending-gallery::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 28px; background: linear-gradient(90deg,#fff,rgba(255,255,255,0)); pointer-events: none; }
.trending-controls { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.trending-controls[hidden] { display: none; }
.trending-controls .icon-btn { z-index: 1; width: 36px; height: 40px; border: 1px solid var(--ink-2); background: var(--soft); pointer-events: auto; }
.trending-controls .icon-btn:disabled { visibility: hidden; }

.classes { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 24px; }
.classes a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--divider); }
.classes .t { display: block; font-weight: 700; font-size: 15px; }
.classes .r { display: block; font-size: 13px; color: var(--ink-2); }
.classes .pic { display: block; width: 140px; height: 74px; }
.classes .pic img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .16)); }
.go-dot { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--chip); color: var(--link); }
.go-dot .icon { width: 18px; height: 18px; }

.brands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.brands a { display: grid; justify-items: center; align-content: center; gap: 12px; height: 124px; border: 1px solid var(--border); border-radius: var(--r); }
.brands a:hover { border-color: var(--accent); background: var(--soft); }
.brands .mark { height: 42px; width: 92px; object-fit: contain; }
.brands .mark.text { display: grid; place-items: center; font: 700 24px/1 Vazirmatn, Tahoma, sans-serif; letter-spacing: 1px; }
.brands .n { font-size: 15px; }

.sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sources li { min-width: 0; }
.sources a { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; height: 100%; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r); }
.sources a:hover, .sources a:focus-visible { border-color: var(--accent); background: var(--soft); }
.site-logo { width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--divider); object-fit: cover; }
.sources .n { font-weight: 700; font-size: 17px; }
.about { margin: 32px 0 0; max-width: 760px; color: var(--ink-2); font-size: 13px; line-height: 2; }
.src-ico { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--divider); object-fit: cover; flex: none; }
.src-badge .src-ico { width: 16px; height: 16px; border: 0; }

.foot { margin-top: 88px; border-top: 1px solid var(--divider); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; min-height: 56px; padding-block: 12px; font-size: 12px; color: var(--muted); }
.foot nav { display: flex; gap: 16px; }
.foot a:hover { color: var(--ink); }

/* ── Results page ── */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 16px 0 12px; font-size: 14px; }
.crumbs .icon { width: 14px; height: 14px; transform: scaleX(-1); }
.crumbs span:last-child { color: var(--ink-2); }
.layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 64px; }

/* Filter panel: a bordered column with a grey head, sections split by rules. Every control is one backend parameter. */
.filters { border: 1px solid var(--divider); border-radius: var(--r) var(--r) 0 0; background: #fff; }
.f-head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 16px; background: var(--field); border-bottom: 1px solid var(--divider); border-radius: var(--r) var(--r) 0 0; }
.f-head b { font-size: 16px; }
.f-head .start { display: flex; align-items: center; gap: 4px; }
.link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--link); font-size: 14px; padding: 0; }
.link .icon { width: 16px; height: 16px; }
.f-head .x { display: none; }
.f-sec { padding: 20px 16px; border-bottom: 1px solid var(--divider); }
.f-sec:last-child { border-bottom: 0; }
.f-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.f-title b { font-size: 16px; }
.f-title .u { color: var(--ink-2); font-size: 14px; font-weight: 400; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stack { display: grid; gap: 8px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: var(--r); background: var(--soft-2); }
.seg.two { grid-template-columns: 1fr 1fr; }
.seg button { height: 32px; border: 0; border-radius: var(--r-s); background: none; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--tile); color: #EFF1F5; }

/* Sites: which answered, how many ads each, and what each could not filter. Ticking only hides or shows; it never re-queries. */
.srcs li label { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 4px 10px; padding: 7px 0; font-size: 14px; cursor: pointer; }
.srcs input { appearance: none; width: 20px; height: 20px; margin: 0; border: 1.6px solid var(--ink); border-radius: 6px; display: grid; place-items: center; }
.srcs input:checked { background: var(--ink); }
.srcs input:checked::after { content: ''; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.srcs .cnt { color: var(--ink-2); font-size: 13px; }
.srcs .why { grid-column: 3 / 5; margin-top: -4px; font-size: 12px; color: var(--warn); }
.srcs li.off label { color: var(--muted); cursor: default; }
.srcs li.off input { border-color: var(--border); }
.srcs li.off .src-ico { filter: grayscale(1); opacity: .5; }
.srcs li.bad .why { color: var(--bad); }
.srcs li.wait .why { color: var(--muted); }

/* List */
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--divider); }
.list-head h1 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.5; }
.list-head .meta { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.sort { flex: none; width: 160px; }
.sort select { background: var(--soft); }
.notice { display: flex; gap: 10px; margin: 16px 0 0; padding: 12px 16px; border-radius: var(--r); background: var(--warn-bg); color: var(--warn); font-size: 14px; line-height: 1.8; }
.notice .icon { margin-top: 3px; }
.toolbar, .src-row { display: none; }

.rows > li { border-bottom: 1px solid var(--divider); }
.row { display: grid; grid-template-columns: 240px 1fr auto; gap: 0 16px; padding: 24px 0; }
.ph { position: relative; grid-row: 1 / 3; width: 240px; height: 160px; border-radius: var(--r-s); overflow: hidden; background: var(--field); display: grid; place-items: center; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-icon { display: grid; place-items: center; width: 100%; height: 100%; color: #C3C9DA; }
.ph-icon .icon { width: 44%; height: 44%; stroke-width: 1.2; }
.src-badge { position: absolute; bottom: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--r-s); background: rgba(39, 45, 63, .72); color: #EFF1F5; font-size: 12px; backdrop-filter: blur(4px); }
.src-badge .icon { width: 13px; height: 13px; }
.body { display: grid; align-content: start; gap: 8px; min-width: 0; padding-top: 4px; }
.r-title { font-size: 16px; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.row:hover .r-title { color: var(--link); }
.r-spec { font-size: 14px; }
.r-meta { display: grid; gap: 4px; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.r-meta span { display: flex; align-items: center; gap: 6px; }
.r-meta .icon { width: 15px; height: 15px; }
.end { grid-row: 1 / 3; grid-column: 3; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding: 4px 0 2px; }
.end .price { margin-top: auto; }
.badge:empty { display: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--r-s); font-size: 12px; background: var(--field); color: var(--ink-2); }
.badge .icon { width: 14px; height: 14px; }
.price { font-size: 14px; white-space: nowrap; }
.price b { font-size: 16px; font-weight: 700; }
.price.none { color: var(--ink-2); }
.more-wrap { display: flex; justify-content: center; padding: 32px 0 0; }
.more-wrap[hidden] { display: none; }

/* Loading, empty and error states */
.skel { display: grid; grid-template-columns: 240px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--divider); }
.skel i { display: block; height: 18px; margin-bottom: 12px; border-radius: var(--r-s); background: linear-gradient(90deg, var(--field) 0, #E9EBEF 40%, var(--field) 80%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.skel i:first-child { grid-row: 1 / 5; height: 160px; margin: 0; }
.skel i:nth-child(2) { width: 70%; margin-top: 4px; }
.skel i:nth-child(3) { width: 45%; }
.skel i:nth-child(4) { width: 30%; }
@keyframes shimmer { to { background-position: -300% 0; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } }
.state { display: grid; justify-items: center; gap: 12px; padding: 56px 16px; text-align: center; }
.state .icon { width: 40px; height: 40px; color: #C3C9DA; stroke-width: 1.4; }
.state p { margin: 0; color: var(--ink-2); max-width: 420px; }
.state b { font-size: 17px; }

/* Photo credits page */
.page { padding-top: 32px; }
.page h1 { margin: 0 0 8px; font-size: 26px; }
.page p { margin: 0 0 16px; color: var(--ink-2); max-width: 720px; }
.credits { display: grid; gap: 0; margin-top: 24px; border-top: 1px solid var(--divider); }
.credits li { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--divider); font-size: 14px; }
.credits img { width: 120px; height: 64px; object-fit: contain; }
.credits b { display: block; font-size: 15px; }
.credits a { color: var(--link); }

/* Native modal keeps focus inside the search and supports Escape. */
body.searching { overflow: hidden; }
.search-dialog { width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 24px; border: 1px solid var(--divider); border-radius: 16px; color: var(--ink); background: #fff; }
.search-dialog::backdrop { background: rgba(25,29,41,.4); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dialog-head h2 { font-size: 20px; margin: 0; }
.dialog-head .icon-btn { width: 40px; height: 40px; background: none; }
.search-dialog .bigfield { height: 56px; }
.search-dialog .bigfield .cap { font-weight: 500; font-size: 14px; }
.search-dialog .bigfield input { font-size: 14px; }
.field-label { display: block; font-size: 13px; margin-bottom: 8px; color: var(--ink-2); }
.search-dialog .sel::after { top: calc(50% + 14px); }
.keyword { display: block; margin-top: 20px; }
.keyword input { width: 100%; height: 48px; border-radius: var(--r-s); background: var(--field); border: 0; padding: 0 16px; font-size: 14px; }
.keyword input::placeholder { color: var(--muted); }
.dialog-go { width: 100%; margin-top: 24px; }

/* ── Tablet and phone ── */
@media (max-width: 1023px) {
  .classes, .sources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout > main { min-width: 0; }
  .filters { display: none; }
  .crumbs { display: none; }
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: sticky; top: 0; z-index: 5; padding: 12px 0 8px; background: #fff; }
  .toolbar .btn { height: 44px; width: 100%; background: var(--field); font-weight: 500; font-size: 14px; }
  .toolbar .n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 12px; }
  .toolbar .n:empty { display: none; }
  .toolbar .sort { width: auto; }
  .toolbar .sort select { height: 44px; background: var(--field); font-weight: 500; }
  .src-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 12px; scrollbar-width: none; margin-inline: -16px; }
  .src-row:empty { display: none; }
  .src-row button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-s); background: var(--chip); color: var(--link); font-size: 14px; }
  .src-row button[aria-pressed="false"] { background: var(--field); color: var(--muted); text-decoration: line-through; }
  .src-row button[disabled] { background: #fff; border: 1px dashed var(--border); color: var(--muted); text-decoration: none; }
  .src-row button[disabled] .src-ico { filter: grayscale(1); opacity: .5; }
  .src-row .c { font-size: 12px; opacity: .8; }
  .list-head .sort { display: none; }
  .list-head { padding: 8px 0 12px; }
  .list-head h1 { font-size: 18px; }

  /* The same filter panel becomes a full-screen sheet. */
  body.sheet .filters { display: block; position: fixed; inset: 0; z-index: 20; border: 0; border-radius: 0; overflow-y: auto; padding-bottom: 88px; }
  body.sheet { overflow: hidden; }
  .f-head { position: sticky; top: 0; z-index: 2; border-radius: 0; }
  .f-head .x { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; margin-inline-start: -10px; }
  .f-head .x .icon { width: 22px; height: 22px; }
  .sheet-go { display: none; }
  body.sheet .sheet-go { display: block; position: fixed; z-index: 21; inset: auto 0 0 0; padding: 12px 16px 16px; background: #fff; border-top: 1px solid var(--divider); }
  body.sheet .sheet-go .btn { width: 100%; }
}
@media (min-width: 1024px) { .sheet-go { display: none; } }

@media (max-width: 719px) {
  .top .wrap { height: 60px; grid-template-columns: 48px 1fr 48px; justify-items: center; }
  .nav { display: none; }
  body.menu .nav { display: flex; flex-direction: column; gap: 0; position: absolute; top: 60px; inset-inline: 0; z-index: 40; padding: 4px 16px 8px; background: #fff; border-bottom: 1px solid var(--divider); box-shadow: 0 12px 24px rgba(25, 29, 41, .08); }
  body.menu .nav a { padding: 12px 0; border-bottom: 1px solid var(--divider); }
  body.menu .nav a:last-child { border-bottom: 0; }
  body.menu .nav a[aria-current] { box-shadow: none; font-weight: 700; }
  .menu-btn { display: grid; width: 44px; height: 44px; background: none; justify-self: start; }
  .actions .icon-btn { width: 44px; height: 44px; }
  .header-search { display: none; }
  .logo { height: 34px; }
  .logo b { font-size: 19px; padding: 0 10px 2px; }
  .hero { padding-top: 28px; }
  .hero h1 { font-size: 24px; }
  .hero .sub { font-size: 14px; }
  .search-launch { margin-top: 24px; height: 60px; padding-inline: 16px; font-size: 13px; }
  .bigpair { grid-template-columns: 1fr; }
  .bigfield { height: 56px; padding: 0 16px; padding-inline-end: 8px; }
  .bigfield .cap { min-width: 44px; }
  .types { gap: 12px; margin-top: 24px; }
  .type { width: 80px; font-size: 12px; }
  .types .scope { display: none; }
  .types .btn-outline { display: inline-flex; font-size: 12px; height: 44px; padding-inline: 8px; }
  .model-section { padding-top: 32px; }
  .model-rail { grid-auto-columns: 43%; gap: 16px; }
  .model-rail img { height: 88px; }
  .model-rail a { font-size: 12px; gap: 8px; }
  .rail-next { width: 32px; height: 36px; }
  .sec { padding-top: 56px; }
  .sec h2 { font-size: 19px; }
  .sec .lead { font-size: 14px; }
  .sec-head .btn-outline { display: none; }
  .ready { grid-auto-columns: 78%; margin-inline: -16px; padding-inline: 16px; }
  .ready a { height: 256px; }
  .ready a:first-child { grid-column: auto; }
  .ready .q { font-size: 21px; }
  .ready-copy { inset-inline: 16px; bottom: 16px; }
  .rail-controls { gap: 4px; }
  .rail-controls .icon-btn { width: 32px; height: 36px; }
  .sec-head { gap: 10px; margin-bottom: 20px; }
  .trending-section { display: block; }
  .trending-section .sec-head { margin-bottom: 20px; }
  .trending-section .lead { max-width: none; margin-top: 6px; }
  .trending-gallery { margin-inline: -16px; }
  .trending { grid-auto-columns: 42%; gap: 12px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .filter-card { height: 256px; }
  .filter-caption { top: 14px; inset-inline: 12px; font-size: 13px; }
  .filter-symbol { width: 28px; height: 28px; }
  .filter-cutout > img { height: 152px; }
  .trending-controls { inset-inline: 16px; }
  .trending-controls .icon-btn { width: 32px; height: 36px; }
  .classes { grid-template-columns: 1fr; }
  .classes a { padding: 14px 0; }
  .classes .pic { width: 128px; height: 68px; }
  .brands { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .brands a { height: 104px; gap: 8px; }
  .brands .mark { height: 34px; }
  .site-logo { width: 44px; height: 44px; border-radius: 10px; }
  .sources { grid-template-columns: 1fr; gap: 8px; }
  .sources a { padding: 14px 16px; }
  .foot { margin-top: 56px; }

  .row { grid-template-columns: 128px 1fr; grid-template-rows: auto 1fr; gap: 0 12px; padding: 16px 0; }
  .ph { width: 128px; height: 104px; grid-row: 1 / 3; }
  .src-badge { bottom: 6px; inset-inline-start: 6px; height: 22px; font-size: 11px; padding: 0 6px; }
  .body { gap: 4px; padding-top: 0; }
  .r-title { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .r-spec { font-size: 13px; }
  .r-meta { margin-top: 4px; font-size: 12px; gap: 2px; }
  .r-meta .where { display: none; }
  .end { grid-row: 2; grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0 0; }
  .end .price { order: -1; margin-top: 0; }
  .end .badge { height: 22px; font-size: 11px; padding: 0 6px; }
  .end .badge .icon { width: 13px; height: 13px; }
  .price { font-size: 13px; }
  .price b { font-size: 16px; }
  .notice { font-size: 13px; padding: 10px 12px; }
  .skel { grid-template-columns: 128px 1fr; gap: 12px; padding: 16px 0; }
  .skel i:first-child { height: 104px; }
  .credits li { grid-template-columns: 88px 1fr; }
  .credits img { width: 88px; height: 48px; }
  .search-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; padding: 20px; }
  .search-dialog .bigfield { height: 52px; }
  .dialog-head { margin-bottom: 16px; }
  .search-dialog .combo-list { max-height: 220px; }
}
@media (max-width: 359px) {
  .types .btn-outline { font-size: 11px; }
  .type { width: 68px; }
  .hero h1 { font-size: 21px; }
  .classes .pic { width: 104px; }
  .classes a { gap: 8px; }
  .classes .r { font-size: 12px; }
}
@media (max-width: 479px) {
  .range-group .price-pair, .search-location-year { grid-template-columns: 1fr; }
}
