/* زبان شکل هم‌خانوادهٔ زرپوش با رنگ خود تبریز: زیتونی تیره برای ستون‌ها و انتخاب، مسی فقط برای عمل اصلی، سفید برای کارت. */
:root {
  color-scheme: light;
  --bg: #e6ebdd; --bg-soft: #f5f7f0; --surface: #ffffff; --field: #f0f3e8;
  --ink: #2b3024; --soft: #565c4c; --line: #e3e8d8; --field-line: #8a8f7d;
  --brand: #3f4a36; --brand-hover: #4c5843; --brand-tint: #dfe6d1; --on-brand: #ffffff; --on-brand-soft: #dde4d0;
  --copper: #c67f48; --copper-hover: #d28f5b; --copper-ink: #8a4e22; --copper-light: #f1c9a5; --copper-tint: #f8e7d7; --on-copper: #27190d;
  --danger: #a5272c; --danger-tint: #f9e6e4; --success: #2f6b45; --success-tint: #e1f0e5;
  --radius: 26px; --gap: 16px;
  --shadow: 0 10px 30px #2b30240d; --shadow-s: 0 2px 10px #2b30240f;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: Vazirmatn, Tahoma, Arial, sans-serif;
}

@font-face { font-family: Vazirmatn; src: url('/vazirmatn.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

* { box-sizing: border-box; }
html { scroll-padding-top: 16px; scroll-behavior: smooth; scrollbar-color: #a9b598 var(--bg); scrollbar-width: thin; }
body { margin: 0; display: flex; flex-direction: column; gap: var(--gap); min-height: 100dvh; padding: var(--gap); background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.8; font-variant-numeric: tabular-nums; caret-color: var(--copper-ink); accent-color: var(--brand); }
::selection { background: var(--copper-light); color: var(--on-copper); }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, label.choice, select, input[type="checkbox"] { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; padding: 0; }
a { color: var(--copper-ink); text-decoration-thickness: 1px; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.panel :focus-visible { outline-color: var(--copper); }
h1, h2, h3, h4, p, dl, dd, ul, ol, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
h1, h2 { text-wrap: balance; }
[hidden] { display: none !important; }
.symbol-bank, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 20; inset: 12px 16px auto auto; transform: translateY(-200%); padding: 10px 18px; border-radius: 22px; background: var(--ink); color: #fff; }
.skip-link:focus { transform: none; }

/* سربرگ */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: none; fill: none; stroke: var(--copper); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--copper); }
.brand strong { display: block; font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.header-nav { display: none; align-items: center; gap: 4px; font-size: .9375rem; }
.header-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 14px; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.header-nav a:hover { background: var(--bg); }

/* قاب صفحه */
.main-layout { flex: 1; display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.main-layout:focus { outline: none; }

/* جست‌وجو: تنها فیلتر صفحه؛ معامله، نوع، محله و قیمت از همین نوشته فهمیده می‌شود. */
.search { flex: 1 0 100%; display: flex; align-items: center; gap: 8px; min-height: 56px; padding-inline: 20px 8px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); color: var(--soft); }
.search:focus-within { outline: 3px solid var(--brand); outline-offset: 3px; }
.search input { flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ink); }
.search input:focus-visible { outline: none; }
.feed-read { margin: -4px 0; padding-inline: 20px; font-size: .85rem; color: var(--soft); }
.content { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.feed-empty[hidden] { display: none; }
.feed-empty { display: grid; justify-items: center; gap: 16px; padding: 32px 16px; border-radius: var(--radius); background: var(--surface); text-align: center; color: var(--soft); }

/* فرم داخل پنجره: نقش و چهار خط مرحله */
.roles { display: flex; gap: 8px; }
.choice { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; text-align: center; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.choice:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 3px; }
.role { flex: 1; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-s); font-size: .9375rem; transition: background-color .2s, color .2s; }
.role .icon { color: var(--copper); }
.role:has(input:checked) { background: var(--brand); color: var(--on-brand); font-weight: 650; }
.role:has(input:checked) .icon { color: var(--copper-light); }
.agency, .agency-login, .agency-profile { display: grid; gap: 10px; }
.agency-chip span { margin-inline-end: auto; }
.agency-files { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; max-height: 220px; overflow-y: auto; }
.agency-files li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 18px; border-radius: var(--radius); background: var(--surface); font-size: .875rem; }
.agency-chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 8px 2px 18px; border-radius: var(--radius); background: var(--brand-tint); font-weight: 650; font-size: .9rem; }
.progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.progress-steps li::before { content: ""; display: block; height: 6px; border-radius: 3px; background: var(--surface); transition: background-color .3s var(--ease); }
.progress-steps .is-complete::before { background: var(--brand); }
.progress-steps .is-current::before { background: var(--copper); }
.progress-steps span { display: none; }

/* کارت فرم */
form, .form-step { display: grid; gap: 14px; min-width: 0; }
.form-step:not([hidden]) { animation: step-in .32s var(--ease); }
@keyframes step-in { from { opacity: .4; transform: translateY(6px); } }
.step-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.step-heading h2 { font-size: 1.25rem; line-height: 1.6; font-weight: 800; }
.step-heading h2:focus { outline: none; }
.field-group { display: grid; gap: 6px; min-width: 0; }
/* برچسب تا وقتی خانه خالی است همان متن کم‌رنگ داخل خانه است؛ با پرشدن، کوچک بالای آن می‌آید. */
.field-group > label { display: none; padding-inline: 20px; font-size: .75rem; color: var(--soft); }
.field-group:has(:is(input, textarea):not(:placeholder-shown)) > label { display: block; }
legend { padding: 0 8px; font-size: .85rem; font-weight: 650; }
legend { margin-bottom: 6px; }
input[type="text"], input[type="tel"], select, textarea { display: block; width: 100%; min-height: 52px; padding: 10px 20px; border: 0; border-radius: var(--radius); background-color: var(--surface); box-shadow: var(--shadow-s); transition: box-shadow .2s; }
textarea { min-height: 110px; resize: none; border-radius: 22px; line-height: 1.9; }
select { appearance: none; padding-inline-end: 46px; background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(-45deg, transparent 50%, var(--soft) 50%); background-size: 6px 6px; background-position: 20px 23px, 26px 23px; background-repeat: no-repeat; }
input::placeholder, textarea::placeholder { color: var(--soft); opacity: .85; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--danger); }
.field-hint, .form-footnote { padding-inline: 20px; font-size: .8rem; color: var(--soft); }
.field-hint:empty { display: none; }
.field-error { padding-inline: 20px; font-size: .8125rem; color: var(--danger); font-weight: 650; }
.two-fields { display: grid; gap: 14px; }

/* انتخاب‌ها */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented .choice, .property-choice { background: var(--surface); box-shadow: var(--shadow-s); transition: background-color .2s, color .2s; }
.segmented .choice { border-radius: var(--radius); font-size: .9375rem; }
.segmented .choice:hover, .property-choice:hover { background: var(--brand-tint); }
.segmented .choice:has(input:checked), .property-choice:has(input:checked) { background: var(--brand); color: var(--on-brand); font-weight: 650; }
.property-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.property-choice { flex-direction: column; gap: 2px; min-height: 72px; padding: 8px 4px; border-radius: 22px; font-size: .82rem; }
.property-choice .icon { color: var(--copper-ink); }
.property-choice:has(input:checked) .icon { color: var(--copper-light); }
.choice:has([aria-invalid="true"]) { box-shadow: 0 0 0 2px var(--danger); }
.location-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.location-suggestions button { min-height: 44px; padding: 4px 18px; border-radius: 22px; background: var(--copper-tint); color: var(--copper-ink); font-size: .85rem; font-weight: 650; }
.location-suggestions button:hover { background: var(--copper-light); }

/* دکمه‌ها */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 24px; border-radius: var(--radius); font-weight: 650; white-space: nowrap; text-decoration: none; transition: background-color .2s, transform .2s var(--ease); }
.button:active { transform: scale(.98); }
.button-primary { background: var(--copper); color: var(--on-copper); }
.button-primary:hover { background: var(--copper-hover); }
.button-accent { background: var(--brand); color: var(--on-brand); }
.button-accent:hover { background: var(--brand-hover); }
.button-secondary { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }
.button-secondary:hover { background: var(--brand-tint); }
.button:disabled { opacity: .45; cursor: default; }
.link-button { justify-self: start; min-height: 44px; color: var(--copper-ink); font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.icon-button, .edit-button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-s); }
.icon-button:hover, .edit-button:hover { background: var(--brand-tint); }
.edit-button { color: var(--copper-ink); }
.form-actions { display: flex; gap: 10px; }
.form-actions .button-primary { flex: 1; }

/* خطا، خلاصه، پذیرش، پایان */
.error-summary { padding: 12px 18px; border-radius: 22px; background: var(--danger-tint); color: var(--danger); font-size: .88rem; }
.error-summary ul { margin-top: 4px; padding-inline-start: 18px; list-style: disc; }
.error-summary a { color: inherit; }
.notice, .api-status { padding: 12px 18px; border-radius: 22px; background: var(--surface); font-size: .88rem; }
.request-summary { display: grid; gap: 8px; }
.summary-section { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-s); }
.summary-section dt { font-size: .78rem; color: var(--soft); }
.summary-section dd { white-space: pre-line; overflow-wrap: anywhere; font-weight: 650; font-size: .92rem; }
.consent-group { display: grid; gap: 6px; }
.consent-row { display: flex; gap: 12px; align-items: start; padding-inline: 8px; font-size: .9rem; }
.consent-row input { width: 22px; height: 22px; flex: none; margin: 4px 0 0; }
.consent-links { display: flex; gap: 10px; padding-inline: 8px; font-size: .85rem; }
.consent-links a { min-height: 44px; display: inline-flex; align-items: center; }
.success-panel { display: grid; gap: 12px; justify-items: start; }
.success-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--success-tint); color: var(--success); }
.success-panel h2 { font-size: 1.15rem; line-height: 1.7; }
.success-panel h2:focus { outline: none; }
.success-panel p { color: var(--soft); font-size: .9rem; }
.success-panel .success-code { padding: 4px 16px; border-radius: 16px; background: var(--copper-tint); color: var(--copper-ink); font-weight: 650; }
.success-actions { display: flex; flex-wrap: wrap; gap: 10px; }

summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 8px; height: 8px; margin-inline-end: 6px; border: solid var(--soft); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .25s var(--ease); }
details[open] > summary::after { transform: rotate(225deg); }
/* کارت فشردهٔ آگهی با قاب عکس ۴:۳ */
.listing-grid { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
.listing-entry { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; transition: box-shadow .3s; }
.listing-entry:hover { box-shadow: 0 14px 36px #2b30241a; }
.listing-cover, .listing-hero { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border-radius: 18px; background: var(--bg); overflow: hidden; }
.listing-cover img, .listing-hero img, .listing-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.listing-cover img { transition: transform .5s var(--ease); }
.listing-cover:hover img { transform: scale(1.03); }
.listing-photo-empty { display: grid; place-items: center; align-content: center; gap: 6px; width: 100%; height: 100%; min-height: 120px; padding: 12px; border-radius: 18px; text-align: center; color: var(--soft); font-size: .8rem; background: var(--bg); }
.listing-photo-empty .icon { width: 32px; height: 32px; color: var(--copper); }
.listing-badge { position: absolute; top: 10px; padding: 1px 12px; border-radius: 14px; font-size: .75rem; font-weight: 650; }
.listing-badge-source { inset-inline-start: 10px; background: var(--brand); color: var(--on-brand); }
.listing-badge-count { inset-inline-end: 10px; background: var(--copper-tint); color: var(--copper-ink); }
.listing-entry .listing-badge { top: 6px; padding-inline: 8px; font-size: .6875rem; }
.listing-entry .listing-badge-source { inset-inline-start: 6px; }
.listing-entry .listing-badge-count { display: none; }
.listing-entry .listing-badge-none { display: block; inset-inline-end: 6px; }
.listing-body { display: grid; gap: 2px; min-width: 0; padding-inline-end: 4px; }
.listing-body h4 { font-size: .9375rem; font-weight: 650; line-height: 1.7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-original { font-size: .8125rem; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-place { font-size: .8125rem; color: var(--soft); overflow-wrap: anywhere; }
.listing-entry .listing-place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-price { font-size: 1.125rem; font-weight: 800; }
.listing-price small { display: block; font-size: .75rem; font-weight: 500; color: var(--copper-ink); }
.listing-table { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.listing-table div { display: flex; flex-direction: column; justify-content: center; min-height: 72px; padding: 6px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-s); overflow-wrap: anywhere; }
.listing-table dt { order: 2; font-size: .72rem; color: var(--soft); }
.listing-table dd { font-size: .88rem; font-weight: 700; }

/* جزئیات آگهی: روی موبایل برگه‌ای از پایین، روی دسکتاپ پنجرهٔ وسط */
.sheet { inset: auto 0 0; width: 100%; max-width: 100%; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 32px 32px 0 0; background: var(--bg-soft); color: var(--ink); }
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .35s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } }
.sheet::backdrop { background: #2b302480; }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 6px; font-size: .85rem; color: var(--soft); }
.sheet-bar h2 { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
#request-dialog .sheet-body { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 8px 18px 0; }
.sheet-body > * { flex: none; }
.listing-hero { border-radius: 24px; }
.listing-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px; margin: -4px; scrollbar-width: thin; }
.listing-thumb { flex: 0 0 76px; aspect-ratio: 4 / 3; padding: 0; border-radius: 14px; overflow: hidden; background: var(--bg); }
.listing-thumb[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg-soft), 0 0 0 4px var(--copper); }
.listing-thumb:focus-visible { outline-offset: 1px; }
.listing-full-photo { font-size: .8rem; }
#listing-dialog-content h2 { font-size: 1.375rem; font-weight: 800; line-height: 1.5; }
#listing-dialog-content h2:focus, .listing-description:focus { outline: none; }
#listing-dialog-content .listing-original { white-space: normal; }
.listing-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.listing-chips li { padding: 3px 14px; border-radius: 22px; background: var(--surface); color: var(--soft); font-size: .78rem; }
.listing-chips .is-present { background: var(--brand); color: var(--on-brand); font-weight: 650; }
.listing-description { white-space: pre-line; overflow-wrap: anywhere; font-size: .9375rem; color: var(--soft); }
.listing-description.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.listing-details { padding: 0 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-s); }
.listing-details summary { min-height: 48px; font-weight: 650; font-size: .9rem; }
.listing-specifications { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .85rem; padding-bottom: 12px; }
.listing-specifications dt { color: var(--soft); }
.listing-specifications dd { overflow-wrap: anywhere; }
.listing-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.listing-links .link-button { display: inline-flex; align-items: center; }
.listing-dialog-foot { position: sticky; bottom: 0; margin-top: auto; margin-inline: -18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--bg-soft); }

/* روش کار: روی موبایل کارت روشن، روی دسکتاپ ستون تیره */
.how-it-works { display: none; }
.site-header .button { min-height: 48px; padding-block: 6px; }
.how-steps { display: grid; gap: 12px; }
.how-steps li { display: flex; gap: 12px; align-items: center; }
.how-steps .icon { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--field); color: var(--copper-ink); }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; font-size: .8125rem; color: var(--soft); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 4px; }
.site-footer p { font-weight: 650; color: var(--ink); }
.pager { display: flex; align-items: center; gap: 12px; }
.pager button:first-child .icon { transform: scaleX(-1); }
.pager button:disabled { opacity: .4; cursor: default; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 8px; color: var(--soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* صفحه‌های حقوقی */
.policy-page { width: min(760px, calc(100% - 24px)); margin: 16px auto 40px; padding: 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.policy-back { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
.policy-note { display: table; margin-block: 4px 12px; padding: 2px 12px; border-radius: 999px; color: var(--brand); background: var(--brand-tint); font-size: .75rem; font-weight: 600; }
.policy-page h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 20px; line-height: 1.6; }
.policy-page section { margin-top: 22px; }
.policy-page h2 { font-size: 1.05rem; margin-bottom: 6px; }
.policy-page section p { color: #45483e; line-height: 2.05; overflow-wrap: anywhere; max-width: 70ch; }
.policy-page nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 12px; font-size: .875rem; }
.policy-page nav a { min-height: 44px; display: inline-flex; align-items: center; }

@media (min-width: 560px) {
  .two-fields { grid-template-columns: 1fr 1fr; }
  .policy-page { padding: 32px; margin-top: 32px; }
}

@media (min-width: 701px) {
  .sheet { inset: 0; width: min(720px, calc(100% - 40px)); max-height: calc(100dvh - 40px); margin: auto; border-radius: var(--radius); }
  .sheet::backdrop { backdrop-filter: blur(3px); }
  .sheet-bar { padding: 20px 28px 6px; }
  .sheet-body { padding: 8px 28px 0; }
  .listing-dialog-foot { margin-inline: -28px; padding-inline: 28px; }
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing-entry .listing-badge-count { display: block; inset-inline-end: 6px; }
  .listing-entry { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 8px; padding: 12px 12px 14px; }
  .listing-body { padding-inline: 6px; }
}

@media (min-width: 1001px) {
  :root { --gap: 20px; }
  body { padding: 20px 40px; }
  .site-header { flex-wrap: nowrap; gap: 20px; padding: 14px 24px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
  .header-nav { display: flex; }
  .search { order: -1; flex: 1 1 auto; min-height: 48px; background: var(--bg); box-shadow: none; }
  .brand { order: -2; }
  .main-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
  .site-footer > * { flex: 1; }
  .site-footer .pager { justify-content: center; }
  .site-footer nav { justify-content: flex-end; }
  .panel { border-radius: var(--radius); background: var(--brand); color: var(--on-brand); }
  /* ستون چپ */
  .how-it-works { display: grid; align-content: space-between; gap: 28px; padding: 22px; font-size: .8125rem; color: var(--on-brand-soft); }
  .site-header > .button { display: none; }
  .how-steps { gap: 16px; }
  .how-steps .icon { background: var(--brand-hover); color: var(--copper-light); }
}

/* قاب ثابت دسکتاپ: صفحه اسکرول ندارد و آگهی‌ها صفحه‌بندی می‌شوند، مگر پنجره خیلی کوتاه باشد. */
@media (min-width: 1001px) and (min-height: 600px) {
  body { height: 100dvh; overflow: hidden; }
  .main-layout { min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .content, .feed { display: flex; flex-direction: column; min-height: 0; }
  .feed { flex: 1; }
  .listing-grid { flex: 1; min-height: 0; grid-template-rows: repeat(var(--rows, 2), minmax(0, 1fr)); }
  .listing-entry { grid-template-rows: minmax(0, 1fr) auto; }
  .listing-entry .listing-cover { aspect-ratio: auto; height: 100%; }
}

@media (min-width: 1300px) {
  .listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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

@media (forced-colors: active) {
  html { scrollbar-color: auto; }
  .choice:has(input:checked) { outline: 2px solid Highlight; }
  .progress-steps .is-current::before, .progress-steps .is-complete::before { background: Highlight; }
}
