/* ============================================================
   برگه مزایده آرکان
   توکن‌ها و قواعدش در DESIGN.md است. هر تغییری اینجا باید آنجا هم بیفتد.
   ============================================================ */

/* ---------- فونت، محلی. هیچ درخواستی به بیرون نمی‌رود ---------- */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Black.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ---------- توکن‌ها ---------- */
:root {
  --ink: #14171A;
  --paper: #F4F6F4;
  --red: #ED1A44;
  --red-ink: #CE1039;
  --red-deep: #B20B30;
  --carbon: #F7E8EB;
  --graphite: #585E62;
  --rule: #7F857F;
  --hair: #C7CCC7;
  --paper-shade: #EDF0ED;

  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 16px;
  --s-lg: 32px;
  --s-xl: 64px;

  --wrap: 1120px;
  --font: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;

  /* عرض ستون‌های فهرست ردیف‌ها در دسکتاپ. یک جا تعریف می‌شود تا
     سرستون و سطرها هرگز از هم جدا نیفتند. */
  --cols: 56px 132px minmax(0, 1fr) 128px 148px 132px;
}

/* ---------- پایه ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  /* حروف فارسی به هم می‌چسبند. فاصله‌گذاری اتصال را می‌شکند. */
  letter-spacing: 0;
  overflow-wrap: break-word;
}

body.is-locked { overflow: hidden; }

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.35; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
/* height: auto لازم است. وگرنه صفت height روی تگ img، نسبت تصویرِ CSS را
   خنثی می‌کند و عکس‌های عمودی گوشی به ارتفاع صفت کشیده می‌شوند. */
img { display: block; max-width: 100%; height: auto; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

a { color: var(--red-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--red-deep); }

/* ---------- سطوح مرورگر: چیزهایی که هیچ سیستم طراحی‌ای صاحبشان نیست ---------- */
::selection { background: var(--red); color: #fff; }
:root { caret-color: var(--red-ink); accent-color: var(--red-ink); }
* { scrollbar-color: var(--rule) var(--paper); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--rule); border: 3px solid var(--paper); }

:focus-visible {
  outline: 2px solid var(--red-ink);
  outline-offset: 2px;
}

/* ---------- کمکی ---------- */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-md);
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* برچسب پیش‌چاپ فرم. قرمز، ۵۰۰، ریز. */
.lbl {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--red-ink);
}

/* مقدار واردشده. جوهر مشکی. */
.val {
  display: block;
  font-size: 1.125rem;
  font-weight: 900;
  line-height: 1.3;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.val--plain { font-weight: 400; font-size: 1rem; }
.unit { font-weight: 400; font-size: 0.8125rem; color: var(--graphite); }
.note { font-size: 0.8125rem; color: var(--graphite); line-height: 1.7; }

/* ---------- نوار نمونه ---------- */
.demobar {
  background: var(--red-ink);
  color: #fff;
  font-weight: 500;
  font-size: 0.875rem;
  text-align: center;
  padding: 10px var(--s-md);
}

/* ---------- سربرگ ---------- */
.hd {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
}

.hd__in {
  display: flex;
  align-items: center;
  gap: var(--s-md);
  min-height: 64px;
}

.hd__logo { display: flex; align-items: center; flex: none; }
.hd__logo svg, .hd__logo img { height: 26px; width: auto; }
/* لوگوی رسمی تک‌رنگ #333333 است. اینجا فقط رنگش به جوهر صفحه برمی‌گردد،
   شکلش دست نمی‌خورد. */
.hd__logo img { filter: none; }

.hd__name {
  display: none;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}
@media (min-width: 560px) { .hd__name { display: block; } }
.hd__sep { flex: 1; }

/* شمارش معکوس فشرده، فقط وقتی ساعت اصلی از قاب بیرون رفته باشد */
.hd__mini {
  display: flex;
  align-items: baseline;
  gap: var(--s-sm);
  font-size: 0.875rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease;
}
.hd__mini.is-on { opacity: 1; visibility: visible; }
.hd__mini b {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- بلوک عنوان برگه ---------- */
.sheet {
  border-top: 2px solid var(--rule);
  margin-top: 0;
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-md);
  padding: var(--s-md) 0;
}

.sheet__title h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
}
.sheet__title p { margin-top: var(--s-xs); }

/* کادر شماره برگه */
.serial {
  flex: none;
  border: 2px solid var(--ink);
  padding: var(--s-sm) var(--s-md);
  text-align: center;
  min-width: 84px;
}
.serial .lbl { color: var(--graphite); font-size: 0.75rem; }
.serial b {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- ساعت ---------- */
.clock {
  border: 1px solid var(--rule);
  padding: var(--s-md);
}

.clock__lbl {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  flex-wrap: wrap;
  margin-bottom: var(--s-sm);
  padding-bottom: var(--s-sm);
  /* خط زیر برچسب، نه روی لبه جعبه. فرم خط افقی دارد، زبانه کناری ندارد.
     یک پیکسل کافی است: تأکید از رنگ برچسب و درشتی ارقام زیرش می‌آید. */
  border-bottom: 1px solid var(--red);
}
.clock__lbl .lbl { display: inline; }

/* حالت «تمدید شد». برچسب پر می‌شود، نه اینکه فقط عدد عوض شود. */
.clock__flag {
  display: none;
  background: var(--red-ink);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 2px var(--s-sm);
}
.clock.is-extended .clock__flag { display: inline-block; }

/* خانه ساعت دو نیمه دارد: شمارش معکوس، و برنامه بسته شدن بقیه ردیف‌ها.
   بدون نیمه دوم، نیمی از خانه در دسکتاپ خالی می‌ماند. */
.clock__grid { display: grid; gap: var(--s-md); }
/* بدون این، نوار افقی برنامه بسته شدن، خانه را از عرض صفحه پهن‌تر می‌کند
   و کل صفحه روی موبایل به‌هم می‌ریزد. */
.clock__grid > * { min-width: 0; }

.clock__slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}

.clock__sched { border-top: 1px solid var(--hair); padding-top: var(--s-sm); min-width: 0; }

/* موبایل: یک نوار افقی قابل کشیدن. چهار سطر جدول روی ۳۶۰ پیکسل
   نصف صفحه اول را می‌خورد. */
.clock__sched ol {
  display: flex;
  gap: 1px;
  margin-top: 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.clock__sched li {
  flex: none;
  scroll-snap-align: start;
  display: grid;
  gap: 0;
  background: var(--paper);
  padding: 6px 12px;
  text-align: center;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.clock__sched li b { font-weight: 700; }
.clock__sched li span { color: var(--graphite); font-size: 0.8125rem; }
.clock__sched li.is-next { background: var(--carbon); }
.clock__sched li.is-next b, .clock__sched li.is-next span { color: var(--red-ink); }

.clock__rule {
  margin-top: var(--s-md);
  padding-top: var(--s-sm);
  border-top: 1px solid var(--hair);
  display: grid;
  gap: var(--s-sm);
  align-items: start;
}
.clock__rule p { max-width: 68ch; }
.clock__rule .btn--ghost { justify-self: start; width: auto; }
@media (min-width: 768px) {
  .clock__rule { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-md); }
}
.clock__slot {
  background: var(--paper);
  padding: var(--s-sm) var(--s-xs);
  text-align: center;
}
.clock__slot b {
  display: block;
  font-size: clamp(2rem, 11vw, 3.25rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.clock__slot i {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--graphite);
  margin-top: var(--s-xs);
}

.sheet__lede {
  margin-top: var(--s-md);
  max-width: 62ch;
}

/* ---------- عنوان بخش ---------- */
.sec {
  margin-top: var(--s-lg);
  border-top: 2px solid var(--rule);
  padding-top: var(--s-md);
}
@media (min-width: 768px) { .sec { margin-top: var(--s-xl); } }
.sec__h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-md);
  flex-wrap: wrap;
  margin-bottom: var(--s-md);
}
.sec__h h2 { font-size: 1.5rem; }

/* ---------- رکورد ویژه: ردیفی که دارد بسته می‌شود ---------- */
.feature {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.feature__band {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  flex-wrap: wrap;
  background: var(--red-ink);
  color: #fff;
  padding: 6px var(--s-md);
  font-weight: 700;
  font-size: 1rem;
}
.feature__band .num { font-weight: 900; }

.feature__body { display: grid; grid-template-columns: 1fr; }

.feature__fig { margin: 0; border-bottom: 1px solid var(--hair); }
.feature__fig img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 42%;
}

.feature__data { padding: var(--s-md); }
.feature__name { font-size: 1.375rem; font-weight: 700; }
.feature__meta { color: var(--graphite); font-size: 1rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  margin: var(--s-md) 0;
}
.facts > div { background: var(--paper); padding: var(--s-sm) var(--s-md); }
.facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.facts--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- دکمه ---------- */
.btn {
  display: block;
  width: 100%;
  background: var(--red-ink);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  padding: 14px var(--s-md);
  text-align: center;
  border: 1px solid var(--red-ink);
  transition: background .15s ease;
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn:active { transform: translateY(1px); }
.btn:disabled {
  background: var(--carbon);
  border-color: var(--hair);
  color: var(--graphite);
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  font-size: 1rem;
  padding: 10px var(--s-md);
}
.btn--ghost:hover { background: var(--carbon); }

/* ---------- فهرست ردیف‌ها ---------- */
.lots__head { display: none; }

.lots { border-top: 1px solid var(--rule); }

.lot {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0 var(--s-md);
  border-bottom: 1px solid var(--hair);
  padding: var(--s-md) 0;
  background: var(--paper);
}
.lot:hover { background: var(--paper-shade); }

.lot.is-closed { background: var(--carbon); color: var(--graphite); }
.lot.is-closed:hover { background: var(--carbon); }
.lot.is-closed .val { color: var(--graphite); }

/* کادر شماره ردیف، الهام از کادر کد استان روی پلاک */
.lot__no {
  grid-row: 1 / span 2;
  align-self: start;
  border: 2px solid var(--ink);
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.125rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.lot.is-closed .lot__no { border-color: var(--graphite); color: var(--graphite); }

.lot__main { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-md); }
.lot__fig { margin: 0; }
.lot__fig img { width: 96px; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--hair); }

.lot__name {
  font-size: 1.125rem;
  font-weight: 700;
  text-align: start;
  padding: 0;
  color: inherit;
}
/* یک کنترل واقعی، ولی تمام سطر قابل کلیک است */
.lot__name::after {
  content: "";
  position: absolute;
  inset: 0;
}
.lot__name:focus-visible { outline: none; }
.lot__name:focus-visible::after { outline: 2px solid var(--red-ink); outline-offset: -2px; }

.lot__meta { color: var(--graphite); font-size: 0.875rem; }

.lot__facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  margin-top: var(--s-sm);
}
.lot__facts > div { background: inherit; padding: 6px var(--s-sm); }
.lot .lot__facts > div { background: var(--paper); }
.lot.is-closed .lot__facts > div { background: var(--carbon); }
.lot__facts .val { font-size: 1rem; }
/* روی گوشی‌های باریک، سه خانه کنار هم عدد را می‌شکند. خانه سوم (زمان) تمام‌عرض می‌شود. */
@media (max-width: 479px) {
  .lot__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lot__facts > div:last-child { grid-column: 1 / -1; }
}

/* برچسب بدون رزرو: کادر جوهر، بدون رنگ سوم. */
.tag {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: middle;
  white-space: nowrap;
}
.feature__band .tag { border-color: #fff; color: #fff; }

/* مُهر فروخته شد. تنها چیزی روی صفحه که با شبکه هم‌راستا نیست. */
.stamp {
  display: inline-block;
  border: 2px solid var(--red-ink);
  color: var(--red-ink);
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 2px 10px;
  transform: rotate(-3deg);
  white-space: nowrap;
}

/* ---------- بخش استدلال ---------- */
.why p { max-width: 68ch; margin-bottom: var(--s-md); }
.why p b { font-weight: 700; }
.why__grid { display: grid; gap: var(--s-lg); }

.bars { border: 1px solid var(--rule); padding: var(--s-md); margin: 0 0 var(--s-md); align-self: start; }
.bar { margin-bottom: var(--s-md); }
.bar:last-of-type { margin-bottom: 0; }
.bar__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-sm); }
.bar__val {
  font-size: 1.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.bar__track { margin-top: 6px; height: 14px; border-bottom: 1px solid var(--hair); }
.bar__fill { height: 100%; background: var(--ink); }
.bar--hi .bar__fill { background: var(--red); }
.bar--hi .bar__val { color: var(--red-ink); }

/* ---------- بنر خودشان، با پرتره ---------- */
.quote {
  margin: var(--s-lg) 0 0;
  border: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: var(--s-md);
  align-items: end;
}
.quote__fig {
  align-self: stretch;
  background: var(--paper-shade);
  border-inline-end: 1px solid var(--hair);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--s-sm) var(--s-sm) 0;
}
.quote__fig img { width: 100%; height: auto; }
.quote__body { padding: var(--s-md) var(--s-md) var(--s-md) 0; }
.quote__q { margin: 0; }
.quote__q p { font-size: 1.125rem; font-weight: 700; line-height: 1.6; max-width: 34ch; }
.quote__a { margin-top: var(--s-md); max-width: 60ch; }

/* ---------- مسیر خریدار ---------- */
.path { margin-top: var(--s-lg); }
.path h3 { font-size: 1.25rem; margin-bottom: var(--s-sm); }
.path__list { border-top: 1px solid var(--rule); max-width: 72ch; }
.path__list li {
  display: flex;
  align-items: baseline;
  gap: var(--s-md);
  padding: var(--s-sm) 0;
  border-bottom: 1px solid var(--hair);
}
.path__list li b {
  flex: none;
  width: 32px; height: 32px;
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-weight: 900;
  align-self: start;
}

/* ---------- فوتر ---------- */
.ft {
  margin-top: var(--s-lg);
  border-top: 2px solid var(--rule);
  padding: var(--s-md) 0 var(--s-xl);
  font-size: 0.875rem;
  color: var(--graphite);
}
.ft p { margin-bottom: var(--s-sm); max-width: 70ch; }
.ft b { color: var(--ink); font-weight: 700; }

.ft__contact {
  border: 1px solid var(--rule);
  padding: var(--s-md);
  margin-bottom: var(--s-lg);
  color: var(--ink);
}
.ft__contact h2 { font-size: 1.5rem; margin-bottom: var(--s-xs); }
.ft__who { font-weight: 700; font-size: 1rem; }
.ft__links { display: flex; flex-wrap: wrap; gap: var(--s-sm) var(--s-lg); font-size: 1.125rem; font-weight: 700; }
.ft__links a { color: var(--red-ink); }

/* ---------- کشوی جزئیات ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(20, 23, 26, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.scrim.is-on { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 41;
  width: min(560px, 100%);
  background: var(--paper);
  border-inline-start: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .24s cubic-bezier(.32, .72, 0, 1);
  visibility: hidden;
}
.drawer.is-on { transform: translateX(0); visibility: visible; }
/* بدون این، display: flex صفت hidden را خنثی می‌کند و کشو از درخت
   دسترس‌پذیری بیرون نمی‌رود. */
.drawer[hidden], .scrim[hidden] { display: none; }

/* سربرگ و پای کشو ثابت‌اند و باید مثل «قاب» دیده شوند: زمینه یک پله تیره‌تر،
   خط دو پیکسلی جوهر، و دکمه بستن با متن. بدنه روی کاغذ می‌ماند و اسکرول می‌خورد. */
.drawer__hd {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--s-md);
  padding: var(--s-sm) var(--s-md);
  background: var(--paper-shade);
  border-bottom: 2px solid var(--ink);
}
.drawer__hd h2 { font-size: 1rem; flex: 1; }
.drawer__x {
  flex: none;
  min-width: 44px; height: 44px;
  padding: 0 var(--s-sm);
  display: flex; align-items: center; gap: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.drawer__x svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 2; flex: none; }
.drawer__x:hover { background: var(--carbon); }

.drawer__bd {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
}
.drawer__ft {
  flex: none;
  border-top: 2px solid var(--ink);
  padding: var(--s-md);
  background: var(--paper-shade);
}
.drawer__ft .facts > div { background: var(--paper); }
.drawer__ft .step { background: var(--paper); }
.drawer__ft .step.is-on { background: var(--ink); }

/* گالری */
.gal { display: grid; gap: 1px; background: var(--hair); }
.gal__main { background: var(--paper); }
.gal__main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 45%; }
.gal__thumbs { display: flex; gap: 1px; background: var(--hair); overflow-x: auto; }
.gal__thumbs button { flex: none; padding: 0; background: var(--paper); }
.gal__thumbs img { width: 88px; aspect-ratio: 3 / 2; object-fit: cover; opacity: .55; }
.gal__thumbs button.is-on img, .gal__thumbs button:hover img { opacity: 1; }

.d-block { padding: var(--s-md); border-bottom: 1px solid var(--hair); }
.d-block > h3 {
  font-size: 1rem;
  margin-bottom: var(--s-sm);
}

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.specs > div { background: var(--paper); padding: var(--s-sm) var(--s-md); }
/* شبکه دو ستونه با تعداد فرد، یک خانه خالی خاکستری جا می‌گذارد.
   آخرین خانه تمام عرض را می‌گیرد تا خانه خالی نماند. */
.specs > div:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- نقشه کارشناسی بدنه ---------- */
.chk { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: var(--s-md); align-items: start; }
.chk__map { width: 132px; height: auto; }
.chk__map .outline { fill: none; stroke: var(--rule); stroke-width: 2; }
.chk__map .panel { fill: var(--paper); stroke: var(--rule); stroke-width: 1; }
.chk__map .panel--paint { fill: url(#hatch); }
.chk__map .panel--swap { fill: var(--ink); }
.chk__map .pn { font-size: 13px; font-weight: 700; fill: var(--ink); }
.chk__map .pn--on { fill: var(--paper); }

.legend { display: grid; gap: var(--s-sm); }
.legend__row { display: flex; align-items: center; gap: var(--s-sm); font-size: 1rem; }
.legend__sw { flex: none; width: 20px; height: 20px; border: 1px solid var(--rule); background: var(--paper); }
.legend__sw--paint { background-image: repeating-linear-gradient(45deg, var(--graphite) 0 2px, transparent 2px 5px); }
.legend__sw--swap { background: var(--ink); }
.legend__n {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.panels { margin-top: var(--s-sm); border-top: 1px solid var(--hair); }
.panels li {
  display: flex;
  align-items: baseline;
  gap: var(--s-sm);
  padding: 5px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 0.875rem;
}
.panels li b {
  flex: none;
  min-width: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.panels li span { flex: 1; }
.panels li em { font-style: normal; font-weight: 700; }
.panels li.is-paint em { color: var(--ink); }
.panels li.is-ok em { color: var(--graphite); font-weight: 400; }

/* ---------- دفتر پیشنهادها ---------- */
.ledger { border: 1px solid var(--hair); }
.ledger li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-sm);
  padding: var(--s-sm) var(--s-md);
  border-bottom: 1px solid var(--hair);
  font-size: 1rem;
}
.ledger li:last-child { border-bottom: 0; }
.ledger li.is-top { background: var(--paper-shade); }
.ledger b {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.ledger small { color: var(--graphite); font-size: 0.8125rem; }
.ledger li.is-fresh { animation: ink-set .28s ease-out; }

/* تنها لحظه حرکت‌دار صفحه: مرکب که روی کاغذ می‌نشیند */
@keyframes ink-set {
  from { opacity: .25; transform: translateY(-2px); }
  to   { opacity: 1;   transform: none; }
}
.is-printing { animation: ink-set .2s ease-out; }

/* ---------- پله‌های پیشنهاد ---------- */
.steps { display: flex; gap: var(--s-sm); margin-bottom: var(--s-sm); flex-wrap: wrap; }
.step {
  flex: 1 1 auto;
  border: 1px solid var(--rule);
  padding: 8px var(--s-sm);
  font-size: 0.875rem;
  font-weight: 700;
  min-height: 44px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.step:hover { background: var(--carbon); }
.step.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.bidmsg {
  min-height: 24px;
  margin-top: var(--s-sm);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--red-ink);
}

/* ---------- از ۷۶۸ پیکسل به بالا ---------- */
@media (min-width: 768px) {
  .sheet__head { padding-top: var(--s-lg); }
  .clock__grid { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: start; }
  .clock__sched { border-top: 0; border-inline-start: 1px solid var(--hair); padding: 0 var(--s-md); }
  .clock__sched ol {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 2px var(--s-md);
    overflow: visible;
    background: none;
    border: 0;
  }
  .clock__sched li {
    display: flex;
    align-items: baseline;
    gap: var(--s-sm);
    padding: 0;
    text-align: start;
    background: none;
  }
  .clock__sched li.is-next { background: none; }

  /* سرستون‌های چاپ‌شده فهرست. در موبایل نیست چون آنجا هر سطر برچسب خودش را دارد. */
  .lots__head {
    display: grid;
    grid-template-columns: var(--cols);
    gap: 0 var(--s-md);
    border-bottom: 2px solid var(--rule);
    padding-bottom: 6px;
  }

  .lot {
    grid-template-columns: var(--cols);
    gap: 0 var(--s-md);
    align-items: center;
    padding: var(--s-sm) 0;
  }
  .lot__no { grid-row: auto; align-self: center; }
  .lot__main { display: contents; }
  .lot__fig img { width: 132px; }
  .lot__facts {
    display: contents;
  }
  .lot__facts > div {
    background: transparent;
    padding: 0;
  }
  .lot .lot__facts > div, .lot.is-closed .lot__facts > div { background: transparent; }
  /* در دسکتاپ برچسب‌ها سرستون می‌شوند، ولی display: none آن‌ها را از درخت
     دسترس‌پذیری هم بیرون می‌برد. پس فقط از دید پنهان می‌شوند. */
  .lot__facts .lbl {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .why__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); align-items: start; }
  .quote { grid-template-columns: 200px minmax(0, 1fr); }
  .chk { grid-template-columns: 160px minmax(0, 1fr); }
  .chk__map { width: 160px; }

  .specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .specs > div:last-child:nth-child(odd) { grid-column: auto; }
}

@media (min-width: 1024px) {
  .wrap { padding-inline: var(--s-lg); }

  /* رکورد ویژه فقط اینجا دو ستونه می‌شود. در ۷۶۸ ستون داده آن‌قدر باریک
     می‌شد که «بالاترین پیشنهاد» در سه سطر می‌شکست. */
  .feature__body { grid-template-columns: 1.1fr 1fr; }
  .feature__fig { border-bottom: 0; border-inline-end: 1px solid var(--hair); }
  .feature__fig img { height: 100%; aspect-ratio: auto; min-height: 420px; object-position: center 52%; }
  .facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts--3 > div:last-child:nth-child(odd) { grid-column: auto; }
}

/* ---------- حرکت کمتر ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .drawer { transition: none; }
}

/* ---------- حالت کنتراست اجباری ---------- */
@media (forced-colors: active) {
  .chk__map .panel { fill: Canvas; stroke: CanvasText; }
  .chk__map .panel--swap { fill: CanvasText; }
  .chk__map .pn { fill: CanvasText; }
  .chk__map .pn--on { fill: Canvas; }
  .legend__sw { border-color: CanvasText; }
  .bar__fill { background: CanvasText; }
  .stamp, .serial, .lot__no { border-color: CanvasText; }
}

/* ---------- چاپ ---------- */
@media print {
  .hd, .demobar, .drawer, .scrim, .btn, .steps { display: none !important; }
  body { background: #fff; }
}
