:root {
  --parchment: #EDE4D3;
  --ink: #231F1A;
  --ink-soft: #5A5246;
  --line: #D3C8B2;
  --felt: #1B4332;
  --brass: #B08D57;
  --burgundy: #7A2E2E;
}
/* The web app's own fonts: Inter for text, Zilla Slab for the title. */
@font-face { font-family: "Inter"; font-weight: 400; src: url("fonts/Inter-Regular.otf") format("opentype"); }
@font-face { font-family: "Inter"; font-weight: 600; src: url("fonts/Inter-SemiBold.otf") format("opentype"); }
@font-face { font-family: "Inter"; font-weight: 700; src: url("fonts/Inter-Bold.otf") format("opentype"); }
@font-face { font-family: "Zilla Slab"; font-weight: 700; src: url("fonts/ZillaSlab-Bold.ttf") format("truetype"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  /* The same felt table as the app: a soft light at the top and a faint diagonal weave. */
  background: var(--felt);
  background-image:
    radial-gradient(ellipse at 30% -10%, rgba(255,255,255,0.05), transparent 50%),
    repeating-linear-gradient(45deg, rgba(0,0,0,0.015) 0px, rgba(0,0,0,0.015) 2px, transparent 2px, transparent 4px);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  line-height: 1.7;
}
html[lang="ar"] body { font-family: "Inter", "Tahoma", sans-serif; }
html[lang="ar"] h1 { font-family: Calibri, "Segoe UI", Tahoma, sans-serif; }
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 16px 48px;
}
/* The app's header: the logo in the start corner, the title in the middle in dark Zilla Slab. */
.brand {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--parchment);
  margin-bottom: 18px;
}
.brand .logo {
  width: 92px;
  height: 92px;
  object-fit: contain;
  justify-self: start;
}
.brand .name {
  font-family: "Zilla Slab", serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.35);
  direction: ltr;
  text-align: center;
}
.brand .lang { justify-self: end; }
.titleblock { text-align: center; }
.titleblock .name { display: block; }
.titleblock .tagline {
  display: block;
  direction: ltr;
  margin-top: 2px;
  font-size: 14px;
  color: rgba(237, 228, 211, 0.75);
  line-height: 1.4;
}
/* Narrow screens: the language switch gets its own row at the end, and the logo and title share the row below it. */
@media (max-width: 640px) {
  .brand {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "lang lang"
      "logo title";
    row-gap: 8px;
  }
  .brand .lang { grid-area: lang; justify-self: end; }
  .brand .logo { grid-area: logo; width: 76px; height: 76px; }
  .titleblock { grid-area: title; }
  .brand .name { font-size: 28px; }
  .titleblock .tagline { font-size: 13px; }
}
.lang {
  display: inline-flex;
  border: 1.5px solid rgba(237, 228, 211, 0.55);
  border-radius: 999px;
  overflow: hidden;
}
.lang button {
  border: none;
  background: transparent;
  color: var(--parchment);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 16px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] {
  background: var(--parchment);
  color: var(--ink);
}
.card {
  background: var(--parchment);
  border-radius: 16px;
  padding: 26px 22px 30px;
}
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.jump a {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.55);
}
section { scroll-margin-top: 16px; }
section + section {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1.5px solid var(--line);
}
h1 {
  margin: 0 0 4px;
  font-size: 26px;
  color: var(--ink-soft);
}
.updated {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ink-soft);
}
h2 {
  margin: 26px 0 4px;
  font-size: 19px;
  color: var(--ink);
}
p { margin: 0; font-size: 16.5px; }
a { color: var(--burgundy); }
[data-lang] { display: none; }
html[lang="en"] [data-lang="en"], html[lang="ar"] [data-lang="ar"] { display: block; }
html[lang="en"] .jump [data-lang="en"], html[lang="ar"] .jump [data-lang="ar"] { display: inline-block; }
html[lang="ar"] body { line-height: 1.9; }
html[lang="ar"] p { font-size: 18px; }
html[lang="ar"] h2 { font-size: 21px; }
.email { direction: ltr; unicode-bidi: isolate; display: inline-block; }
footer {
  margin-top: 28px;
  text-align: center;
  color: rgba(237, 228, 211, 0.65);
  font-size: 13px;
}
