@font-face {
  font-family: IRANYekan;
  src: url('/assets/fonts/iranyekan/iranyekanwebregular.woff2') format('woff2');
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: IRANYekan;
  src: url('/assets/fonts/iranyekan/iranyekanwebbold.woff2') format('woff2');
  font-display: swap;
  font-weight: 700;
}
:root {
  color-scheme: dark;
  --bg: #0a0e16;
  --surface: #111925;
  --text: #f2f5fa;
  --muted: #b5c0d1;
  --accent: #9ecaff;
  --line: #34435a;
  --focus: #b4d8ff;
  font-family: system-ui, sans-serif;
  scroll-behavior: smooth;
}
html[lang="fa"] { font-family: IRANYekan, system-ui, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: radial-gradient(ellipse 68rem 36rem at 70% 1rem, #142135 0%, var(--bg) 72%);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { color: var(--text); }
a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(73rem, calc(100% - 2.5rem)); margin-inline: auto; }
.skip {
  position: absolute;
  z-index: 5;
  inset-inline-start: 1rem;
  inset-block-start: -12rem;
  padding: .65rem 1rem;
  background: var(--focus);
  color: #0c1727;
}
.skip:focus { inset-block-start: 1rem; color: #0c1727; }
.mast { border-bottom: 1px solid var(--line); background: #0a0e16e8; }
.mast-inner, .mast-links, .footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; }
.mast-inner, .footer-inner { justify-content: space-between; min-height: 4.15rem; }
.mast-inner a { display: inline-flex; min-height: 2.75rem; align-items: center; text-decoration: none; }
.brand { color: var(--text); font-weight: 700; }
.mast-links a { color: var(--muted); font-size: .875rem; }
.mast-links a:hover { color: var(--text); }
.lang { padding-inline: .8rem; border: 1px solid var(--line); border-radius: 2px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, .31fr);
  align-items: end;
  gap: clamp(1.75rem, 5vw, 5rem);
  padding-block: clamp(3rem, 8vw, 7rem) clamp(2.5rem, 6vw, 4.5rem);
}
.eyebrow, .contents > p {
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.08;
  letter-spacing: -.043em;
  font-weight: 650;
  text-wrap: balance;
}
html[dir="rtl"] :is(h1, h2, h3, .eyebrow, .contents > p) { letter-spacing: normal; }
html[dir="rtl"] h1 { max-width: 19ch; line-height: 1.32; }
.hero-deck { max-width: 43rem; font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--muted); margin: 1.3rem 0 0; }
.contents { border-inline-start: 1px solid var(--line); padding-inline-start: 1.15rem; }
.contents > p { margin-block-end: .4rem; color: var(--muted); letter-spacing: .08em; }
.contents a { display: flex; align-items: center; min-height: 2.65rem; gap: .65rem; color: var(--text); text-decoration: none; }
.contents a:hover { color: var(--accent); text-decoration: underline; }
.contents span, .section-index, .item-index { font-variant-numeric: tabular-nums; color: var(--accent); }
.explore {
  padding: clamp(.85rem, 2.6vw, 1.45rem);
  border: 1px solid var(--line);
  background: var(--surface);
}
.explore-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr) minmax(0, .95fr) auto;
  gap: .8rem;
  align-items: end;
}
.explore label { min-width: 0; display: grid; gap: .35rem; color: var(--muted); font-size: .85rem; }
.explore input, .explore select, .reset {
  min-height: 2.75rem;
  min-width: 0;
  border: 1px solid #586b82;
  border-radius: 2px;
  color: var(--text);
  background: #0a101a;
  padding: .48rem .65rem;
}
.explore input, .explore select { width: 100%; font-size: 1rem; }
.explore input::placeholder { color: #a1aec0; opacity: 1; }
.explore [data-active="true"] { border-color: var(--accent); background: #172740; }
.reset { font-size: .87rem; }
.reset:hover { background: #21334e; }
.status { margin: .75rem 0 0; color: var(--muted); font-size: .88rem; }
.empty { padding-block: 2rem 4rem; color: var(--muted); }
.collection { padding-block: clamp(2.5rem, 5.6vw, 5.25rem) 0; scroll-margin: 1rem; }
.collection-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-block-end: 1.1rem;
}
.section-index { font-size: .9rem; }
.collection-head h2 { font-size: clamp(1.7rem, 3vw, 2.55rem); margin: 0; line-height: 1.25; letter-spacing: -.035em; }
.collection-head p { margin: .3rem 0 0; color: var(--muted); }
.entry h3 { margin: 0; line-height: 1.24; letter-spacing: -.024em; }
html[dir="rtl"] .entry h3 { line-height: 1.5; }
.entry h3 a { color: var(--text); text-decoration: none; }
.entry h3 a:hover { color: var(--accent); text-decoration: underline; }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: start;
  gap: clamp(1.35rem, 4vw, 3.5rem);
  padding-block: clamp(1.6rem, 3.8vw, 3rem);
}
.feature h3 { font-size: clamp(1.6rem, 3.1vw, 2.55rem); }
.item-kicker { margin-block-end: .65rem; }
.feature-visual { margin: 0; min-width: 0; }
.feature-visual img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}
.feature-visual figcaption {
  color: var(--muted);
  font-size: .83rem;
  margin-block-start: .65rem;
  border-inline-start: 1px solid var(--line);
  padding-inline-start: .75rem;
}
.ledger {
  display: grid;
  grid-template-columns: 2.1rem minmax(0,1fr);
  gap: .8rem;
  border-bottom: 1px solid var(--line);
  padding-block: 1.6rem;
}
.ledger h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
.item-index { font-size: .84rem; color: var(--muted); padding-block-start: .15rem; }
.meta, .summary, .limitation { margin: .6rem 0 0; }
.meta { color: var(--accent); font-size: .83rem; }
.summary { max-width: 65ch; color: var(--muted); }
.limitation { border-inline-start: 2px solid #7c9ec5; padding-inline-start: .8rem; color: var(--muted); font-size: .9rem; }
.tags, .related ul, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; }
.tags, .related ul { list-style: none; padding: 0; }
.tags { margin: .9rem 0; }
.tags li {
  color: var(--muted);
  background: #131e2d;
  border: 1px solid var(--line);
  padding: .14rem .5rem;
  font-size: .8rem;
}
.actions { margin-block-start: 1.05rem; }
.actions a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .89rem; font-weight: 700; }
.actions .primary, .actions .download { padding: .48rem .72rem; border-radius: 2px; text-decoration: none; }
.actions .primary { color: #0a1828; background: #b1d5ff; }
.actions .primary:hover { background: #e0edff; }
.actions .download { border: 1px solid #586b82; }
.actions .download:hover { background: var(--surface); }
.related { margin-block-start: 1rem; font-size: .85rem; color: var(--muted); }
.related > span { font-weight: 700; }
.related ul { gap: .25rem 1rem; margin: .25rem 0 0; }
.related a { display: inline-block; padding-block: .23rem; }
.footer { margin-block-start: clamp(2.5rem, 6vw, 5.5rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.footer-inner { padding-block: .75rem; }

@media (max-width: 850px) {
  .explore-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-fields .query { grid-column: 1 / -1; }
  .explore-fields button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 670px) {
  .hero, .feature { grid-template-columns: minmax(0, 1fr); }
  .contents { display: flex; flex-wrap: wrap; gap: 0 .8rem; }
  .contents > p { flex-basis: 100%; }
}
@media (max-width: 400px) {
  .shell { width: calc(100% - 1.75rem); }
  .mast-inner { gap: .25rem .5rem; }
  .mast-links { gap: .45rem; }
  .explore-fields { grid-template-columns: minmax(0, 1fr); }
  .ledger { grid-template-columns: 1.35rem minmax(0,1fr); gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
