:root {
  --paper: #e7e1d4;
  --sheet: #f6f3ec;
  --ink: #1c1915;
  --muted: #5e584e;
  --faint: #8a8174;
  --line: #d3cbbd;
  --saffron: #d85a1a;
  --saffron-deep: #b8430d;
  --cream: #fff8f3;
  --teal: #1f4f4a;
  --shadow: 0 18px 40px rgba(28, 25, 21, 0.12);
  --measure: 42rem;
  --header: 4.5rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(255, 252, 247, 0.55), rgba(255, 252, 247, 0) 22rem),
    repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(28, 25, 21, 0.035) 32px);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}
:lang(ar) body {
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", sans-serif;
  line-height: 1.85;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; }
:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}
::selection { background: #f0c2a8; color: var(--ink); }

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 0.9rem;
  z-index: 20;
}
.skip:focus { top: 0.6rem; }

.topline, .mast, .wrap, .foot { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 0 0.35rem;
  color: var(--muted);
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.issue { white-space: nowrap; }

.langs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem 0.85rem;
  margin: 0;
  padding: 0 0 0.2rem;
  list-style: none;
  overflow-x: auto;
  min-width: 0;
  flex: 1 1 auto;
}
.langs a { white-space: nowrap; }
.langs a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.langs a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--saffron);
}
.langs a:hover { border-bottom-color: var(--ink); }

.mast-wrap {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(246, 243, 236, 0.94);
  border-block: 1px solid var(--ink);
  backdrop-filter: blur(8px);
}
.mast {
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 36px; height: 36px; }
.brand-name {
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 1.05rem;
}
.brand-name span { color: var(--saffron); }
.brand small {
  display: block;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.actions { display: flex; gap: 0.5rem; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.35rem 1rem;
  text-decoration: none;
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--cream); }
.btn-hot {
  background: var(--saffron);
  border-color: var(--saffron-deep);
  color: var(--cream);
}
.btn-hot:hover { background: var(--saffron-deep); color: var(--cream); }
.btn-light {
  background: var(--cream);
  color: var(--ink);
  border-color: transparent;
}
.btn-light:hover { background: #fff; color: var(--ink); }
.menu-toggle { display: none; }

.hero { padding: 2.4rem 0 1.2rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.72fr);
  gap: 2rem 2.5rem;
  align-items: end;
}
.kicker {
  margin: 0 0 0.6rem;
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron-deep);
}
h1, h2, h3 {
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
h1 { font-size: clamp(2.35rem, 5.4vw, 4.15rem); margin: 0 0 1rem; max-width: 14ch; }
.lede { font-size: 1.18rem; max-width: 38rem; margin: 0 0 1rem; }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  color: var(--muted);
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-size: 0.86rem;
}

.slip {
  background: var(--ink);
  color: var(--cream);
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: var(--shadow);
  position: relative;
}
.slip:before {
  content: "";
  position: absolute;
  inset-inline: 0.6rem;
  top: -7px;
  height: 14px;
  background:
    radial-gradient(circle at 8px 7px, var(--paper) 6px, transparent 7px) left center / 18px 14px repeat-x;
}
.slip p { margin: 0.35rem 0; }
.slip .label {
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: #e7b49a;
}
.domain {
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-all;
}
.slip-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.fine { color: #c9c0b4; font-size: 0.86rem; }

.jump {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.2rem 0 1rem;
  scrollbar-width: thin;
}
.jump a {
  flex: 0 0 auto;
  text-decoration: none;
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-size: 0.84rem;
  border: 1px solid var(--line);
  background: var(--sheet);
  padding: 0.4rem 0.7rem;
}
.jump a:hover { border-color: var(--ink); }

.sheet {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 0.4rem 1.3rem 2rem;
}
.piece {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, var(--measure)) minmax(11rem, 16rem);
  gap: 0.4rem 1.6rem;
  padding: 2.4rem 0 2.1rem;
  border-top: 1px solid var(--line);
}
.piece:first-child { border-top: 0; }
.index-no {
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-weight: 700;
  color: var(--saffron);
  padding-top: 0.35rem;
}
.piece h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); margin: 0 0 0.9rem; letter-spacing: -0.03em; }
.piece p { margin: 0 0 0.95rem; }
.piece ul, .piece ol { margin: 0 0 1rem; padding-inline-start: 1.15rem; }
.piece li { margin: 0.28rem 0; }
.note {
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
  border-inline-start: 2px solid var(--teal);
  padding-inline-start: 0.8rem;
  margin-top: 0.4rem;
}
.note strong { display: block; color: var(--ink); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.3rem; }
blockquote {
  margin: 1rem 0 1.1rem;
  padding: 0.2rem 0 0.2rem 1rem;
  border-inline-start: 3px solid var(--saffron);
  font-size: 1.22rem;
  line-height: 1.45;
}

.table-wrap { overflow-x: auto; margin: 0.4rem 0 1.1rem; }
table { width: 100%; border-collapse: collapse; font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif; font-size: 0.92rem; line-height: 1.45; }
th, td { text-align: start; vertical-align: top; padding: 0.65rem 0.7rem; border-bottom: 1px solid var(--line); }
th { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
tbody tr:hover { background: rgba(216, 90, 26, 0.05); }

.band {
  margin: 1.4rem 0 0;
  background: var(--teal);
  color: #f3f7f6;
  padding: 1.5rem 1.3rem;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 1rem;
  align-items: center;
}
.band h2 { margin: 0 0 0.4rem; font-size: 1.7rem; color: white; }
.band p { margin: 0; max-width: 40rem; }
.band .actions { justify-content: flex-end; }

.faq details { border-top: 1px solid var(--line); padding: 0.75rem 0; }
.faq summary {
  cursor: pointer;
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}
.faq details p { margin: 0.6rem 0 0.2rem; }

.foot {
  padding: 1.6rem 0 5.5rem;
  color: var(--muted);
  font-family: "Segoe UI", "Avenir Next", system-ui, sans-serif;
  font-size: 0.86rem;
}
.foot-grid { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
  margin-inline-end: 0.5rem;
}

.dock {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 9;
  background: var(--sheet);
  border-top: 1px solid var(--ink);
  padding: 0.55rem;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.dock .btn { width: 100%; }

@media (max-width: 980px) {
  .piece { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .note { grid-column: 2; }
  .band { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .actions.desk { display: none; }
  .actions.desk.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--sheet);
    border-bottom: 1px solid var(--ink);
    padding: 0.7rem;
  }
  .actions.desk.open .btn { width: 100%; }
  .mast-wrap { position: sticky; }
  .hero-grid { grid-template-columns: 1fr; }
  h1 { max-width: none; }
  .sheet { padding-inline: 0.85rem; }
  .dock { display: grid; }
  .piece { grid-template-columns: 1fr; }
  .index-no { padding-top: 0; }
  .note { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
