@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/vazirmatn-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C, U+200F, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/vazirmatn-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #070706;
  --ink: #f4efe4;
  --muted: #b5a68a;
  --gold: #e2b34a;
  --gold-deep: #8d6d22;
  --line: rgba(226, 179, 74, 0.28);
  --panel: #100e0a;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Vazirmatn, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.9;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

.wrap {
  width: min(44rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

header {
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 0.95rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0;
}

.brand img {
  height: 2.55rem;
  width: auto;
  display: block;
}

nav {
  display: flex;
  gap: 1.15rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--gold);
}

main { flex: 1; padding-bottom: 3rem; }

h1 {
  margin: 2.4rem 0 0.8rem;
  font-size: clamp(2.1rem, 6vw, 3.35rem);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.5;
}

h2 a { text-decoration: none; }

.lede {
  margin: 0;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 450;
  line-height: 1.85;
}

.define,
.quiet,
.series-line,
.follow {
  color: var(--muted);
}

.define { margin: 1.1rem 0 0; }

.kicker {
  margin: 2.6rem 0 0.35rem;
  color: var(--gold);
  font-size: 0.92rem;
}

.facts {
  display: flex;
  gap: 1rem;
  margin: 0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.player {
  direction: ltr;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.95rem;
  align-items: center;
  margin-top: 0.4rem;
  padding: 0.95rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
}

.play {
  width: 3.35rem;
  height: 3.35rem;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.player audio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.play svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: #1a1408;
}

.play .icon-pause { display: none; }

.play[data-state="pause"] .icon-play { display: none; }

.play[data-state="pause"] .icon-pause { display: block; }

.transport {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
}

.elapsed,
.total {
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  color: var(--muted);
  min-width: 4.6rem;
}

.elapsed { text-align: right; }

.total { text-align: left; }

.seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--gold) var(--p, 0%), #3a3220 var(--p, 0%));
  cursor: pointer;
}

.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--gold);
  border: 0;
}

.seek::-moz-range-thumb {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--gold);
  border: 0;
}

.parts {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
}

.parts a {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.parts .num {
  color: var(--gold);
  font-weight: 650;
}

.parts .len { color: var(--muted); font-size: 0.92rem; }

.prior { margin-top: 2.8rem; }

.prose { margin-top: 2rem; max-width: 38rem; }

.prose p,
.faq p { margin: 0.4rem 0 0.9rem; }

.crumbs {
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.crumbs a { color: var(--muted); }

.faq { margin-top: 2.2rem; }

.faq h2 { font-size: 1.15rem; margin-top: 1.3rem; }

.feed-line a { color: var(--gold); }

.foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--line);
}

.foot img { width: 9.5rem; height: auto; }

.foot a { color: var(--muted); text-decoration: none; }

.desk-wrap {
  display: grid;
  gap: 2.4rem;
  margin-top: 1.4rem;
  align-items: start;
}

.desk {
  display: grid;
  gap: 1.15rem;
}

.desk label {
  display: grid;
  gap: 0.35rem;
}

.field-name {
  color: var(--ink);
  font-weight: 650;
}

.field-hint {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.desk-side h2 { font-size: 1.35rem; }

.desk-open button {
  width: 100%;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.8rem;
  align-items: baseline;
  text-align: right;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.85rem 0;
  cursor: pointer;
}

.desk input,
.desk textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  line-height: 1.8;
  padding: 0.7rem 0.8rem;
}

.desk textarea { resize: vertical; }

.desk button {
  justify-self: start;
  border: 0;
  background: var(--gold);
  color: #1a1408;
  font: inherit;
  font-weight: 650;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
}

#status { min-height: 1.6rem; color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (min-width: 900px) {
  .desk-wrap { grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 0.7fr); }
}

@media (max-width: 640px) {
  .bar { flex-wrap: wrap; }
  .player { grid-template-columns: 1fr; }
  .transport { grid-template-columns: auto 1fr auto; }
  .parts a { grid-template-columns: 2rem 1fr; }
  .parts .len { grid-column: 2; }
}
