:root {
  --paper: #efe6d6;
  --card: #fbf7f0;
  --ink: #241910;
  --muted: #5c5146;
  --copper: #c45a28;
  --copper-deep: #8f3814;
  --teal: #0e6b66;
  --gold: #f0c14a;
  --line: #e3d5c2;
  --dark: #241910;
  --cream: #f6efe4;
  --mast-h: 76px;
  --dock-h: 76px;
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(36, 25, 16, 0.045) 0.7px, transparent 0.7px);
  background-size: 8px 8px;
  font-family: "Figtree", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  padding-bottom: var(--dock-h);
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, .btn { font-family: inherit; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -40px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { top: 8px; }

.spine {
  display: none;
}

.mast {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--mast-h);
  display: grid;
  grid-template-areas:
    "brand"
    "actions"
    "langs";
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  background: var(--dark);
  color: var(--cream);
}
.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.brand img { width: 40px; height: 40px; flex: 0 0 auto; }
.brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d9c3ae;
}
.brand strong {
  font-family: "Young Serif", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}
.mast-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}
.mast-actions .btn { width: 100%; }
.langs {
  grid-area: langs;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.langs a {
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 7px;
  color: #d9c3ae;
}
.langs a[aria-current="page"] {
  color: var(--ink);
  background: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
}
.btn-in { background: var(--gold); color: var(--ink); }
.btn-up { background: #1a7f78; color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--gold);
  box-shadow: inset 0 0 0 1.5px var(--gold);
}
.btn:hover { filter: brightness(1.06); }

.tape {
  overflow: hidden;
  direction: ltr;
  background: var(--copper);
  color: #fffaf3;
  border-block: 1px solid #9a3e16;
}
.tape-track {
  display: flex;
  gap: 2.4rem;
  width: max-content;
  padding: 8px 0;
  animation: marquee 32s linear infinite;
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
.tape.alt { background: var(--dark); color: var(--gold); border-color: #3a2c22; }
.tape.alt .tape-track { animation-duration: 38s; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.stations {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px;
  background: rgba(239, 230, 214, 0.96);
  scrollbar-width: none;
}
.stations::-webkit-scrollbar { display: none; }
.stations a {
  flex: 0 0 auto;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 700;
}
.stations a span {
  display: inline-block;
  margin-inline-end: 6px;
  color: var(--copper-deep);
  font-variant-numeric: tabular-nums;
}

.wrap {
  width: min(1120px, calc(100% - 1.5rem));
  margin-inline: auto;
}
.hero {
  display: grid;
  gap: 1.1rem;
  padding: 1.3rem 0 0.4rem;
}
.hero > * { min-width: 0; }
.issue {
  margin: 0 0 0.4rem;
  color: var(--copper-deep);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1, h2, h3 {
  font-family: "Young Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
}
h1 { font-size: clamp(2.15rem, 7vw, 4.5rem); max-width: 14ch; }
.lede {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.22rem;
  line-height: 1.45;
  max-width: 38rem;
  margin: 0.8rem 0 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.hero-actions .btn { min-height: 56px; padding-inline: 22px; font-size: 1.05rem; }
.warn {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.plate {
  background: var(--dark);
  color: var(--cream);
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.plate p { margin: 0; }
.plate .label {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.address {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(0.86rem, 2.5vw, 1.02rem);
  line-height: 1.45;
  color: #f3d7b4;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.plate .meta { color: #cbb9a6; font-size: 0.88rem; }
.plate-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 1rem 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.crumb a { color: var(--teal); }

.board {
  list-style: none;
  margin: 0.4rem 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 8px;
}
.board li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 12px 14px;
}
.board b { font-weight: 700; }
.board em { font-style: normal; color: var(--teal); font-weight: 700; font-size: 0.92rem; }
.num {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
}

.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 1.4rem 0 0.7rem;
}
.slider-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.slider-nav { display: flex; gap: 6px; }
.slider-nav button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}
.slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.slide {
  flex: 0 0 min(340px, 84%);
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 6px solid var(--teal);
  padding: 16px 16px 18px;
  min-width: 0;
}
.slide strong {
  display: block;
  font-family: "Young Serif", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 0.45rem;
}
.slide p { margin: 0; color: var(--muted); font-family: "Newsreader", Georgia, serif; font-size: 1.05rem; }

.piece {
  background: var(--card);
  border: 1px solid var(--line);
  border-inline-start: 6px solid var(--copper);
  padding: clamp(1rem, 3vw, 2rem);
  margin: 1rem 0;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0.7rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.piece h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); max-width: 18ch; }
.prose {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.14rem;
  line-height: 1.75;
  max-width: 68ch;
  margin-top: 0.9rem;
}
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-inline-start: 1.2rem; }
.prose li { margin: 0.35rem 0; }
.prose a { color: var(--teal); }
.cover {
  width: min(100%, 760px);
  margin: 0.4rem 0 0.8rem;
  border: 1px solid var(--line);
}
figcaption { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.6rem; }

.criteria { display: grid; gap: 12px; margin-top: 1rem; }
.criteria div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
.criteria b { font-variant-numeric: tabular-nums; }
.track { grid-column: 1 / -1; height: 7px; background: #e7dccb; }
.track i { display: block; height: 100%; width: var(--w); background: var(--teal); }

.event-card {
  display: grid;
  gap: 6px;
  background: var(--dark);
  color: var(--cream);
  padding: clamp(1rem, 3vw, 1.6rem);
  margin: 1rem 0;
}
.event-card h2 { color: var(--gold); font-size: clamp(1.7rem, 4vw, 2.5rem); max-width: 16ch; }
.event-card p { margin: 0.3rem 0; max-width: 65ch; font-family: "Newsreader", Georgia, serif; font-size: 1.08rem; }
.when {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--gold);
  font-size: 0.95rem;
}

.faq { display: grid; gap: 10px; margin: 0.8rem 0 1.4rem; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 14px 14px 6px;
}
.faq-item h3 {
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}
.faq-item p {
  margin: 0 0 0.7rem;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.05rem;
}

.foot {
  display: grid;
  gap: 1rem;
  padding: 1.4rem 0 1rem;
  border-top: 1px solid var(--line);
}
.age {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 2px solid var(--copper-deep);
  border-radius: 50%;
  color: var(--copper-deep);
  font-weight: 800;
}
.foot p { margin: 0.3rem 0; color: var(--muted); max-width: 70ch; }
.foot a { color: var(--teal); }

.dock {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: rgba(36, 25, 16, 0.96);
}
.dock .btn { width: 100%; min-height: 52px; }

html[lang="ar"] body { font-family: "Readex Pro", "Figtree", sans-serif; }
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] .slide strong,
html[lang="ar"] .brand strong { font-family: "Readex Pro", "Young Serif", serif; }
html[lang="ar"] .prose,
html[lang="ar"] .lede,
html[lang="ar"] .faq-item p,
html[lang="ar"] .event-card p,
html[lang="ar"] .slide p {
  font-family: "Noto Naskh Arabic", "Times New Roman", serif;
  line-height: 1.95;
}
html[lang="ar"] .tape-track { animation-duration: 36s; }

@media (min-width: 800px) {
  .mast {
    grid-template-areas: "brand langs actions";
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-inline: 22px;
  }
  .mast-actions {
    display: flex;
    width: auto;
  }
  .mast-actions .btn { width: auto; }
  .langs { justify-content: center; }
  .dock { display: none; }
  body { padding-bottom: 0; }
  .foot { grid-template-columns: 1.5fr 0.7fr; align-items: start; }
  .foot .age { justify-self: end; }
}

@media (min-width: 960px) {
  .spine {
    display: block;
    position: fixed;
    inset-inline-start: 10px;
    top: 42%;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 0.22em;
    font-size: 12px;
    font-weight: 700;
    color: #8d7564;
    pointer-events: none;
  }
  .stations {
    position: sticky;
    top: var(--mast-h);
    z-index: 25;
  }
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: end;
    padding-top: 1.8rem;
  }
  .wrap { width: min(1120px, calc(100% - 5rem)); }
}

@media (max-width: 380px) {
  .btn { padding-inline: 10px; font-size: 0.95rem; }
  .brand strong { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tape-track { animation: none; }
}

@media print {
  .mast-actions, .dock, .tape, .slider-nav, .spine { display: none !important; }
  body { background: #fff; padding: 0; }
  .piece, .plate, .event-card { break-inside: avoid; }
}
