/* =====================================================================
   Cadillac Seville FA — Heritage Archive
   زبان طراحی: الهام‌گرفته از Mercedes-Benz Classic — سیاه و سفید، تصاویر
   تمام‌عرض، تیترهای سبک و بزرگ، فاصله‌گذاری سخاوتمندانه، جزئیات ظریف.
   صفحه‌های مستندات فنی روی زمینهٔ روشن برای خوانایی طولانی‌مدت.
   ===================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant-garamond-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant-garamond-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../fonts/cormorant-garamond-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --black: #000;
  --ink: #111;
  --ink-2: #333;
  --grey-1: #f8f8f8;
  --grey-2: #f0f0f0;
  --grey-3: #e2e2e2;
  --grey-4: #bbb;
  --grey-5: #9f9f9f;
  --grey-6: #767676;
  --grey-7: #4d4d4d;
  --line: #e2e2e2;
  --line-dark: rgba(255, 255, 255, .18);
  --blue: #0078d6;
  --blue-dark: #005ba1;
  --champagne: #b9a27a;          /* تنها رنگ تأکیدی؛ برای جزئیات بسیار کم */
  --font: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  --serif: 'Cormorant', 'Georgia', 'Times New Roman', serif;
  --maxw: 1360px;
  --readw: 820px;
  --gutter: clamp(16px, 4vw, 64px);
  --header-h: 72px;
  --ease: cubic-bezier(.25, .1, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.95; font-weight: 400;
  color: var(--ink); background: #fff;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: #000; color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- English inside Persian ---------- */
.en, .term, .num { direction: ltr; unicode-bidi: isolate; }
.en { font-family: var(--serif); font-size: 1.06em; letter-spacing: .01em; }
/* ارقام هم‌قد (lining) برای فونت سریف انگلیسی */
.en, .h-en, .eyebrow, .brand-en, .fact b, .year b, .link-list .idx, .link-list small, .teaser .kicker,
.statement blockquote, .not-found b, .lb-count, .scroll-cue, .facts li::before { font-variant-numeric: lining-nums; }
.term {
  font-family: var(--font); font-size: .86em; font-weight: 500; letter-spacing: .01em;
  color: var(--ink-2); background: var(--grey-2); border-radius: 2px; padding: .05em .4em;
  white-space: nowrap;
}
.prose .term { white-space: normal; }
.num { font-feature-settings: 'tnum'; }
.h-en {
  display: block; direction: ltr; unicode-bidi: isolate; text-align: right;
  font-family: var(--serif); font-weight: 400; font-style: italic; font-size: .6em;
  letter-spacing: .02em; color: var(--grey-6); margin-top: .2em;
}

/* ---------- Skip link ---------- */
.skip { position: absolute; inset-inline-start: -9999px; top: 0; z-index: 9999; background: #fff; color: #000; padding: 12px 20px; }
.skip:focus { inset-inline-start: 12px; top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 500; height: var(--header-h);
  background: #000; color: #fff; transition: background .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid var(--line-dark);
}
.site-header.is-overlay:not(.is-solid) {
  background: linear-gradient(to bottom, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
  border-bottom-color: transparent;
}
.header-inner {
  height: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; justify-self: start; }
.brand img { width: 34px; height: 34px; object-fit: contain; filter: grayscale(1) brightness(1.6); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-fa { font-size: 15px; font-weight: 500; letter-spacing: 0; }
.brand-en { font-family: var(--serif); font-size: 12px; letter-spacing: .28em; color: rgba(255, 255, 255, .62); direction: ltr; text-align: right; }

.main-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  position: relative; display: block; padding: 8px 14px; font-size: 15px; color: rgba(255, 255, 255, .78);
  transition: color .2s var(--ease);
}
.main-nav a::after {
  content: ''; position: absolute; inset-inline: 14px; bottom: 0; height: 1px; background: #fff;
  transform: scaleX(0); transition: transform .3s var(--ease);
}
.main-nav a:hover, .main-nav a.current { color: #fff; }
.main-nav a:hover::after, .main-nav a.current::after { transform: scaleX(1); }

.header-tools { justify-self: end; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
  background: none; border: 0; color: #fff; cursor: pointer; font-size: 14px;
}
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.icon-btn kbd { font-family: var(--font); font-size: 11px; color: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .3); padding: 0 6px; border-radius: 2px; }
.icon-btn:hover { color: rgba(255, 255, 255, .7); }
.nav-toggle { display: none; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px;
  padding: 0 28px; font-size: 15px; font-weight: 500; border: 1px solid transparent; border-radius: 0;
  cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-light { background: #fff; color: #000; }
.btn-light:hover { background: var(--grey-3); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-outline:hover { background: #fff; color: #000; }
.btn-dark { background: #000; color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-outline-dark { background: transparent; color: #000; border-color: rgba(0, 0, 0, .55); }
.btn-outline-dark:hover { background: #000; color: #fff; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; }
.link-arrow::after { content: '‹'; font-size: 1.35em; line-height: 1; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(-5px); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: block; direction: ltr; text-align: right; font-family: var(--serif); font-size: 15px;
  letter-spacing: .32em; text-transform: uppercase; color: var(--grey-6); margin-bottom: 18px;
}
.band-dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: rgba(255, 255, 255, .7); }

/* ---------- Home hero ---------- */
.hero {
  position: relative; min-height: min(92vh, 900px); background: #000; color: #fff;
  display: flex; align-items: flex-end; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; animation: hero-zoom 18s var(--ease) forwards; }
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .45) 38%, rgba(0, 0, 0, .1) 70%, rgba(0, 0, 0, .35) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) clamp(56px, 9vh, 110px); }
.hero h1 { margin: 0 0 18px; font-size: clamp(36px, 5.6vw, 76px); line-height: 1.25; font-weight: 300; letter-spacing: -.01em; max-width: 14em; }
.hero p { margin: 0; max-width: 640px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.9; color: rgba(255, 255, 255, .82); font-weight: 300; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.scroll-cue {
  position: absolute; z-index: 2; bottom: 28px; inset-inline-end: var(--gutter);
  font-family: var(--serif); letter-spacing: .3em; font-size: 12px; color: rgba(255, 255, 255, .6);
  writing-mode: vertical-rl; direction: ltr;
}

/* Hero روشن: عکس استودیویی بدون تیره‌کردن (سبک Mercedes-Benz Classic) */
.hero.hero-light { display: block; min-height: 0; background: #ecebe9; color: #000; overflow: visible; }
.hero.hero-light::after { display: none; }
.hero-light .hero-media { position: relative; inset: auto; aspect-ratio: 1920 / 1197; max-height: 92vh; overflow: hidden; background: #e9e8e6; }
.hero-light .hero-media img { object-position: center bottom; animation: none; }
.hero-light .hero-inner { position: absolute; z-index: 2; inset: 0 0 auto 0; max-width: none; padding: calc(var(--header-h) + clamp(8px, 1.6vw, 24px)) var(--gutter) 0; pointer-events: none; }
.hero-light .hero-inner > * { width: min(38%, 440px); margin-left: 0; margin-right: auto; }
.hero-light .eyebrow { color: var(--grey-6); margin-bottom: 14px; }
.hero-light h1 { font-size: clamp(28px, 3.3vw, 50px); color: #000; max-width: none; margin: 0; }
.hero-bar { background: #fff; border-bottom: 1px solid var(--line); }
.hero-bar-inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(28px, 4vw, 48px) var(--gutter); display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.hero-bar p { margin: 0; flex: 1 1 420px; max-width: 700px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.95; color: var(--ink-2); font-weight: 300; }
.hero-bar .hero-actions { margin: 0; }

/* هدر روی hero روشن: متن تیره تا قبل از اسکرول */
.site-header.is-light:not(.is-solid) { background: transparent; border-bottom-color: transparent; color: #000; }
.is-light:not(.is-solid) .main-nav a { color: rgba(0, 0, 0, .66); }
.is-light:not(.is-solid) .main-nav a:hover, .is-light:not(.is-solid) .main-nav a.current { color: #000; }
.is-light:not(.is-solid) .main-nav a::after { background: #000; }
.is-light:not(.is-solid) .brand-en { color: rgba(0, 0, 0, .5); }
.is-light:not(.is-solid) .brand img { filter: grayscale(1) brightness(.25); }
.is-light:not(.is-solid) .icon-btn { color: #000; }
.is-light:not(.is-solid) .icon-btn kbd { color: rgba(0, 0, 0, .5); border-color: rgba(0, 0, 0, .3); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; background: #000; color: #fff; min-height: clamp(360px, 58vh, 620px);
  display: flex; align-items: flex-end; overflow: hidden;
}
.page-hero.compact { min-height: 0; padding-top: calc(var(--header-h) + 64px); }
.page-hero .hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.page-hero:not(.compact)::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .35) 50%, rgba(0, 0, 0, .3) 100%);
}
.page-hero-inner { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) clamp(40px, 6vw, 72px); }
.page-hero h1 { margin: 0 0 14px; font-size: clamp(32px, 4.4vw, 60px); line-height: 1.3; font-weight: 300; }
.page-hero p { margin: 0; max-width: 720px; color: rgba(255, 255, 255, .78); font-size: 17px; font-weight: 300; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { border-bottom: 1px solid var(--line); background: #fff; font-size: 13.5px; color: var(--grey-6); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 auto; padding: 14px var(--gutter); max-width: var(--maxw); }
.breadcrumb li + li::before { content: '/'; margin: 0 10px; color: var(--grey-4); }
.breadcrumb a:hover { color: #000; }
.breadcrumb [aria-current] { color: #000; }

/* ---------- Bands (home sections) ---------- */
.band { padding: clamp(64px, 9vw, 128px) 0; }
.band-dark { background: #000; color: #fff; }
.band-grey { background: var(--grey-1); }
.band + .band-dark, .band-dark + .band-dark { border-top: 1px solid var(--line-dark); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.band-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: clamp(36px, 5vw, 64px); flex-wrap: wrap; }
.band-head h2 { margin: 0; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.3; font-weight: 300; }
.band-head p { margin: 10px 0 0; max-width: 620px; color: var(--grey-6); font-size: 16.5px; }
.band-dark .band-head p { color: rgba(255, 255, 255, .62); }
.band-dark .link-arrow { color: #fff; }

/* Statement */
.statement { max-width: 980px; margin: 0 auto; text-align: center; }
.statement blockquote {
  margin: 0 0 28px; direction: ltr; font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(26px, 3.4vw, 44px); line-height: 1.35;
}
.statement blockquote::before { content: '“'; } .statement blockquote::after { content: '”'; }
.statement .cite { display: block; font-size: 14px; color: var(--grey-5); letter-spacing: .02em; margin-bottom: 40px; }
.statement p { max-width: 760px; margin: 0 auto; font-size: 18px; font-weight: 300; color: rgba(255, 255, 255, .8); line-height: 2.05; }

/* Teaser cards */
.teasers { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 36px); }
.teaser { display: flex; flex-direction: column; color: inherit; }
.teaser-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #1a1a1a; }
.teaser-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), opacity .4s; }
.teaser:hover .teaser-media img { transform: scale(1.05); }
.teaser-body { padding-top: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.teaser .kicker { font-family: var(--serif); letter-spacing: .26em; font-size: 13px; color: var(--grey-5); direction: ltr; text-align: right; text-transform: uppercase; }
.teaser h3 { margin: 0; font-size: 24px; font-weight: 400; line-height: 1.45; }
.teaser p { margin: 0; color: var(--grey-6); font-size: 15.5px; flex: 1; }
.band-dark .teaser p { color: rgba(255, 255, 255, .62); }
.teaser .link-arrow { margin-top: 8px; }

/* Facts strip */
.facts-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-dark); }
.fact { padding: 36px 28px 8px 0; border-inline-start: 1px solid var(--line-dark); }
.fact:first-child { border-inline-start: 0; padding-inline-start: 0; }
.fact { padding-inline-start: 28px; }
.fact b { display: block; direction: ltr; text-align: right; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.6vw, 64px); line-height: 1.1; }
.fact span { display: block; margin-top: 10px; color: rgba(255, 255, 255, .62); font-size: 15px; }

/* Timeline (horizontal) */
.timeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; border-top: 1px solid #000; scrollbar-width: thin; }
.year { scroll-snap-align: start; padding: 28px 28px 8px 28px; border-inline-start: 1px solid var(--line); }
.year:first-child { border-inline-start: 0; padding-inline-start: 0; }
.year b { display: block; font-family: var(--serif); font-size: 56px; font-weight: 400; line-height: 1; direction: ltr; text-align: right; }
.year h3 { margin: 18px 0 8px; font-size: 18px; font-weight: 500; }
.year p { margin: 0; font-size: 15px; color: var(--grey-6); }

/* Link list (quick access) */
.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(24px, 4vw, 72px); border-top: 1px solid var(--grey-3); }
.link-list a {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 16px;
  padding: 22px 0; border-bottom: 1px solid var(--grey-3); transition: padding .3s var(--ease);
}
.link-list .idx { font-family: var(--serif); font-size: 18px; color: var(--grey-5); direction: ltr; text-align: right; }
.link-list strong { display: block; font-size: 17.5px; font-weight: 500; }
.link-list small { display: block; direction: ltr; text-align: right; font-family: var(--serif); font-size: 15px; color: var(--grey-6); font-style: italic; }
.link-list .go { font-size: 24px; color: var(--grey-5); transition: transform .3s var(--ease), color .3s; }
.link-list a:hover { padding-inline-start: 10px; }
.link-list a:hover .go { color: #000; transform: translateX(-6px); }

/* Split feature */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split-media { aspect-ratio: 16 / 11; overflow: hidden; background: #111; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split h2 { margin: 0 0 20px; font-size: clamp(28px, 3.2vw, 44px); font-weight: 300; line-height: 1.35; }
.split p { margin: 0 0 18px; font-size: 17px; color: var(--grey-6); }
.band-dark .split p { color: rgba(255, 255, 255, .7); }

/* ---------- Article layout (inner pages) ---------- */
.article { max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(64px, 8vw, 120px); display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.article.no-aside { grid-template-columns: minmax(0, 1fr); }
.article.no-aside .prose { margin-inline: auto; }
.aside { position: sticky; top: calc(var(--header-h) + 28px); max-height: calc(100vh - var(--header-h) - 56px); overflow-y: auto; scrollbar-width: thin; font-size: 14.5px; }
.aside-details > summary { display: none; }
.aside-title { font-size: 12.5px; letter-spacing: .08em; color: var(--grey-6); margin: 0 0 12px; font-weight: 500; }
.aside-block + .aside-block { margin-top: 36px; }
.toc-list { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid var(--grey-3); }
.toc-list a { display: block; padding: 6px 16px; margin-inline-start: -1px; border-inline-start: 2px solid transparent; color: var(--grey-6); line-height: 1.6; transition: color .2s, border-color .2s; }
.toc-list a:hover { color: #000; }
.toc-list a.active { color: #000; border-inline-start-color: #000; font-weight: 500; }
.side-links { list-style: none; margin: 0; padding: 0; }
.side-links a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--grey-3); color: var(--ink-2); }
.side-links a::after { content: '‹'; color: var(--grey-5); }
.side-links a:hover, .side-links a.current { color: #000; }
.side-links a.current { font-weight: 500; }

/* ---------- Prose ---------- */
.prose { max-width: var(--readw); min-width: 0; font-size: 17px; line-height: 2.05; }
.prose > :first-child { margin-top: 0; }
.prose .lead { font-size: 20px; font-weight: 300; line-height: 1.95; color: var(--ink-2); margin-bottom: 40px; }
.prose h2 {
  margin: 88px 0 28px; padding-top: 28px; border-top: 1px solid #000;
  font-size: clamp(25px, 2.6vw, 34px); font-weight: 400; line-height: 1.45; scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h2:first-child, .prose .lead + h2 { margin-top: 0; }
.prose h3 { margin: 48px 0 16px; font-size: 21px; font-weight: 500; line-height: 1.55; }
.prose h4 { margin: 32px 0 12px; font-size: 17.5px; font-weight: 500; }
.prose h3 .h-en { font-size: .7em; } .prose h4 .h-en { font-size: .78em; }
.prose p { margin: 0 0 20px; }
.prose a:not(.btn) { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.prose a:not(.btn):hover { color: var(--blue-dark); }
.prose ul, .prose ol { margin: 0 0 22px; padding-inline-start: 26px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--grey-6); }
.prose b, .prose strong { font-weight: 700; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.sec-top { float: inline-end; margin-top: 10px; font-size: 13px; font-weight: 400; color: var(--grey-5) !important; text-decoration: none !important; }
.sec-top:hover { color: #000 !important; }
.lead-note { font-size: 15px; color: var(--grey-6); border-inline-start: 2px solid #000; padding-inline-start: 16px; }

/* Figures */
.prose figure { margin: 36px 0; }
.prose figure a { display: block; background: var(--grey-1); cursor: zoom-in; }
.prose figure img { margin: 0 auto; max-height: 1100px; width: auto; }
.prose figcaption { margin-top: 12px; font-size: 14px; color: var(--grey-6); line-height: 1.8; border-inline-start: 2px solid var(--grey-3); padding-inline-start: 12px; }
.prose figcaption .en { color: var(--grey-5); font-size: 1.05em; }
.prose > a[data-lightbox] { display: block; margin: 28px 0; cursor: zoom-in; }

/* Tables */
.table-wrap { margin: 28px 0 32px; overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 2px solid #000; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.75; }
.prose caption { caption-side: top; text-align: start; padding: 0 0 12px; font-weight: 500; }
.prose th { text-align: start; font-weight: 500; font-size: 13.5px; color: var(--grey-6); padding: 12px 14px; border-bottom: 1px solid #000; white-space: nowrap; background: #fff; }
.prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:hover td { background: var(--grey-1); }
.prose td.n, .prose td.c, .prose th.n { direction: ltr; unicode-bidi: isolate; white-space: nowrap; font-feature-settings: 'tnum'; }
.prose td.n { text-align: left; }
.prose td.c { font-weight: 500; text-align: center; }
.prose table.parts td:nth-child(1) { width: 56px; }
.prose table.parts td:nth-child(3), .prose table.parts td:nth-child(4) { width: 92px; }
.prose table.parts td:nth-child(5) { width: 130px; }
.prose table.parts tr:has(td:first-child:empty) td:nth-child(2) { color: var(--grey-6); }

/* Callouts */
.note, .warn, .caution, .tip, .notice { margin: 28px 0; padding: 20px 24px; background: var(--grey-1); border-inline-start: 3px solid #000; font-size: 15.5px; }
.warn { background: #fdf2f1; border-color: #c0392b; }
.caution { background: #fdf8ec; border-color: #c08a14; }
.tip { background: #f0f6fb; border-color: var(--blue); }
.note > b, .warn > b, .caution > b, .tip > b, .notice > b { display: block; margin-bottom: 6px; font-size: 14px; letter-spacing: .02em; }
.note p:last-child, .warn p:last-child, .caution p:last-child, .tip p:last-child, .notice p:last-child { margin-bottom: 0; }

/* Footnotes (body parts) */
.footnotes { list-style: none; padding: 0 !important; margin: -12px 0 32px !important; font-size: 14px; color: var(--grey-6); }
.footnotes li { margin-bottom: 4px; }
.footnotes b { display: inline-block; min-width: 22px; color: #000; }

/* Glossary */
.glossary { list-style: none; margin: 20px 0 40px; padding: 0 !important; border-top: 1px solid var(--line); }
.glossary li { display: grid; grid-template-columns: minmax(180px, 34%) 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); margin: 0; }
.glossary .g-en { direction: ltr; unicode-bidi: isolate; text-align: right; font-weight: 500; font-size: 15px; }
.glossary .g-fa { font-size: 16px; }
.glossary .g-fa small { display: block; color: var(--grey-6); font-size: 14.5px; margin-top: 4px; line-height: 1.85; }

/* Trivia facts */
.facts { list-style: none; padding: 0 !important; counter-reset: fact; border-top: 1px solid var(--line); }
.facts li { counter-increment: fact; position: relative; padding: 22px 64px 22px 0; border-bottom: 1px solid var(--line); margin: 0; }
.facts li::before { content: counter(fact, decimal-leading-zero); position: absolute; inset-inline-start: 0; top: 22px; font-family: var(--serif); font-size: 22px; color: var(--grey-5); direction: ltr; }

.spec-list { columns: 2; column-gap: 40px; }
.spec-list li { break-inside: avoid; }

/* Year badges */
.years { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 22px; }
.year-badge { font-family: var(--font); direction: ltr; font-size: 13px; border: 1px solid var(--grey-4); padding: 2px 12px; cursor: pointer; background: #fff; }
.year-badge.on { background: #000; color: #fff; border-color: #000; }

/* Section index cards (hub pages) */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
.hub .teaser h3 { font-size: 21px; }
.hub .teaser-media { aspect-ratio: 16 / 10; background: var(--grey-2); }
.hub .teaser-media.paper img { object-fit: contain; padding: 18px; background: var(--grey-1); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 28px 0 48px; }
.gallery a { position: relative; display: block; overflow: hidden; background: var(--grey-2); aspect-ratio: 3 / 2; cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; }
.gallery a:hover img { transform: scale(1.05); opacity: .9; }
.gallery .cap { position: absolute; inset-inline: 0; bottom: 0; padding: 18px 10px 6px; font-size: 12px; color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent); direction: ltr; text-align: right; }
.gallery.portrait a { aspect-ratio: 3 / 4; }
.gallery.contain a { background: var(--grey-1); }
.gallery.contain img { object-fit: contain; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, .96); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 94vw; }
.lightbox img { max-width: 94vw; max-height: 84vh; object-fit: contain; background: #fff; }
.lb-cap { margin-top: 14px; color: rgba(255, 255, 255, .75); font-size: 14px; text-align: center; max-width: 80ch; }
.lb-count { font-family: var(--serif); letter-spacing: .2em; color: rgba(255, 255, 255, .5); direction: ltr; margin-inline-start: 12px; }
.lb-btn { position: absolute; background: none; border: 1px solid rgba(255, 255, 255, .3); color: #fff; width: 52px; height: 52px; cursor: pointer; font-size: 26px; line-height: 1; transition: background .2s, border-color .2s; }
.lb-btn:hover { background: #fff; color: #000; border-color: #fff; }
.lb-close { top: 20px; inset-inline-end: 20px; }
.lb-prev { inset-inline-start: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { inset-inline-end: 20px; top: 50%; transform: translateY(-50%); }
.lb-btn[hidden] { display: none; }

/* ---------- Search ---------- */
.search-modal { position: fixed; inset: 0; z-index: 950; background: rgba(0, 0, 0, .7); backdrop-filter: blur(6px); display: none; justify-content: center; align-items: flex-start; padding: 12vh 20px 20px; }
.search-modal.open { display: flex; }
.search-panel { width: 100%; max-width: 760px; background: #fff; display: flex; flex-direction: column; max-height: 76vh; }
.search-panel input { width: 100%; border: 0; border-bottom: 1px solid #000; padding: 26px 28px; font-family: var(--font); font-size: 20px; font-weight: 300; outline: none; background: #fff; }
.search-results { overflow-y: auto; }
.search-results a { display: block; padding: 16px 28px; border-bottom: 1px solid var(--line); }
.search-results a:hover, .search-results a.sel { background: var(--grey-1); }
.r-title { font-size: 16px; font-weight: 500; }
.r-title mark { background: #fff2a8; color: inherit; }
.r-meta { font-size: 13px; color: var(--grey-6); margin-top: 2px; }
.r-snip { font-size: 13.5px; color: var(--grey-7); margin-top: 4px; line-height: 1.8; }
.search-empty { padding: 32px 28px; color: var(--grey-6); font-size: 15px; }
.search-foot { padding: 10px 28px; border-top: 1px solid var(--line); font-size: 12px; color: var(--grey-6); display: flex; gap: 20px; background: var(--grey-1); }
.search-foot kbd { font-family: var(--font); border: 1px solid var(--grey-4); padding: 0 6px; background: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: #000; color: rgba(255, 255, 255, .62); font-size: 14.5px; }
.footer-top { max-width: var(--maxw); margin: 0 auto; padding: 72px var(--gutter) 48px; display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand .brand-fa { color: #fff; font-size: 18px; font-weight: 400; display: block; margin-bottom: 4px; }
.footer-brand .brand-en { display: block; margin-bottom: 18px; }
.footer-brand p { margin: 0; max-width: 380px; line-height: 2; }
.site-footer h4 { margin: 0 0 18px; color: #fff; font-size: 14.5px; font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--line-dark); }
.footer-bottom div { max-width: var(--maxw); margin: 0 auto; padding: 22px var(--gutter); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(255, 255, 255, .45); }

/* Back to top */
.to-top { position: fixed; z-index: 400; bottom: 24px; inset-inline-end: 24px; width: 48px; height: 48px; background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, .25); cursor: pointer; font-size: 20px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* 404 */
.not-found { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; background: #000; color: #fff; padding: calc(var(--header-h) + 40px) 20px 60px; }
.not-found b { display: block; font-family: var(--serif); font-size: clamp(90px, 16vw, 180px); font-weight: 400; line-height: 1; }
.not-found p { color: rgba(255, 255, 255, .7); margin: 18px 0 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .article { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; max-height: none; overflow: visible; order: -1; border: 1px solid var(--line); padding: 0; }
  .aside-details > summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; cursor: pointer; font-weight: 500; list-style: none; }
  .aside-details > summary::-webkit-details-marker { display: none; }
  .aside-details > summary::after { content: '+'; font-size: 22px; font-weight: 300; line-height: 1; }
  .aside-details[open] > summary::after { content: '−'; }
  .aside-details[open] > summary { border-bottom: 1px solid var(--line); }
  .aside-details > .aside-block { padding: 16px 20px; }
  .aside-details > .aside-block + .aside-block { margin-top: 0; border-top: 1px solid var(--line); }
  .aside .toc-list { columns: 2; column-gap: 24px; border: 0; }
  .aside .toc-list a { border: 0; padding: 4px 0; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .teasers { grid-template-columns: 1fr 1fr; }
  .facts-strip { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: #000; padding: 24px var(--gutter);
    opacity: 0; transform: translateY(-12px); visibility: hidden; overflow-y: auto;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
  }
  .main-nav.open { opacity: 1; transform: none; visibility: visible; transition: opacity .3s var(--ease), transform .3s var(--ease); }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { font-size: 24px; font-weight: 300; padding: 18px 0; border-bottom: 1px solid var(--line-dark); }
  .main-nav a::after { display: none; }
  .nav-toggle { display: inline-flex; }
  .icon-btn .lbl, .icon-btn kbd { display: none; }
  .link-list { grid-template-columns: 1fr; }
  .glossary li { grid-template-columns: 1fr; gap: 4px; }
  .spec-list { columns: 1; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .prose { font-size: 16px; }
  .brand-en { display: none; }
  .teasers { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .aside .toc-list { columns: 1; }
  .hero { min-height: 86vh; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero.hero-light { min-height: 0; }
  .hero-light .hero-media { max-height: none; }
  .hero-light .hero-inner { position: static; padding: 28px var(--gutter) 0; background: #fff; pointer-events: auto; }
  .hero-light .hero-inner > * { width: auto; }
  .hero-bar-inner { padding-top: 16px; }
  .scroll-cue { display: none; }
  .facts li { padding-inline-start: 0; padding-top: 52px; }
  .facts li::before { top: 18px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
  .prose h2 { margin-top: 64px; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .aside, .breadcrumb, .search-modal, .lightbox, .to-top, .sec-top, .hero-media, .page-hero .hero-media { display: none !important; }
  body { font-size: 11pt; }
  .page-hero, .page-hero.compact { min-height: 0; padding: 0; background: #fff; color: #000; }
  .page-hero::after { display: none; }
  .page-hero p, .page-hero .eyebrow { color: #333; }
  .article { display: block; padding: 0; }
  .prose { max-width: none; }
  .prose figure, .table-wrap, tr { break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* شمارندهٔ بازدید (فوتر) */
.visit-count { color: rgba(255, 255, 255, .6); }
.visit-count b { color: #fff; font-weight: 500; margin-inline-start: 4px; }
