/* Mawaeed. "Editorial Ledger": navy and copper on warm paper, clear 1px rules, modest corners.
   One stylesheet, logical properties throughout (right to left), light and dark. */
:root {
  --bg-page: #faf9f6; --bg-surface: #ffffff; --bg-subtle: #f3f1ec; --bg-hero: #eff4f9;
  --text-primary: #111827; --text-secondary: #4b5563;
  --brand-primary: #0f2942; --brand-hover: #1e3a5f; --brand-accent: #b45309; --on-brand: #ffffff;
  --border-default: #dcd9d0; --border-strong: #b8b4a8; --focus-ring: #0284c7;
  --badge-confirmed-bg: #ecfdf5; --badge-confirmed-text: #065f46; --badge-confirmed-border: #a7f3d0;
  --badge-expected-bg: #fffbeb; --badge-expected-text: #92400e; --badge-expected-border: #fde68a;
  --font-sans: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", system-ui, sans-serif;
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.5rem; --space-6: 2rem; --space-8: 3rem;
  --radius-sm: 6px; --radius-md: 10px; --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgb(15 41 66 / 5%); --shadow-card-hover: 0 4px 12px rgb(15 41 66 / 8%);
  --container-max: 1120px; --content-max: 780px;
  color-scheme: light;
}
/* Dark: by the system setting unless the visitor chose light; or by the visitor's own choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-page: #0b111a; --bg-surface: #131c2a; --bg-subtle: #1a2536; --bg-hero: #162234;
    --text-primary: #f3f4f6; --text-secondary: #9ca3af;
    --brand-primary: #38bdf8; --brand-hover: #7dd3fc; --brand-accent: #fbbf24; --on-brand: #0b111a;
    --border-default: #263347; --border-strong: #3b4d68; --focus-ring: #38bdf8;
    --badge-confirmed-bg: #064e3b; --badge-confirmed-text: #6ee7b7; --badge-confirmed-border: #047857;
    --badge-expected-bg: #451a03; --badge-expected-text: #fcd34d; --badge-expected-border: #92400e;
    --shadow-card: 0 1px 2px rgb(0 0 0 / 30%); --shadow-card-hover: 0 4px 14px rgb(0 0 0 / 45%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg-page: #0b111a; --bg-surface: #131c2a; --bg-subtle: #1a2536; --bg-hero: #162234;
  --text-primary: #f3f4f6; --text-secondary: #9ca3af;
  --brand-primary: #38bdf8; --brand-hover: #7dd3fc; --brand-accent: #fbbf24; --on-brand: #0b111a;
  --border-default: #263347; --border-strong: #3b4d68; --focus-ring: #38bdf8;
  --badge-confirmed-bg: #064e3b; --badge-confirmed-text: #6ee7b7; --badge-confirmed-border: #047857;
  --badge-expected-bg: #451a03; --badge-expected-text: #fcd34d; --badge-expected-border: #92400e;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 30%); --shadow-card-hover: 0 4px 14px rgb(0 0 0 / 45%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.75;
  color: var(--text-primary); background: var(--bg-page);
  font-variant-numeric: lining-nums tabular-nums;
}
a { color: var(--brand-primary); text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: 3px; }
svg { flex: none; }
.wrap { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: var(--space-4); }
.skip { position: absolute; top: -100px; inset-inline-start: var(--space-4); background: var(--brand-primary); color: var(--on-brand); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); font-weight: 700; z-index: 1000; text-decoration: none; }
.skip:focus { top: var(--space-3); color: var(--on-brand); }

/* Header */
.site-header { background: var(--bg-surface); border-block-end: 1px solid var(--border-default); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: var(--space-3); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--brand-primary); min-height: 44px; padding-inline: var(--space-1); }
.brand-name { font-size: 1.375rem; font-weight: 700; }
.main-nav { display: none; align-items: center; gap: var(--space-1); }
.main-nav a { text-decoration: none; color: var(--text-primary); font-size: .9375rem; font-weight: 700; padding: .5rem .875rem; border-radius: var(--radius-pill); min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.main-nav a:hover { background: var(--bg-subtle); }
.main-nav a[aria-current="page"] { background: var(--brand-primary); color: var(--on-brand); }
.header-actions { display: flex; align-items: center; gap: var(--space-2); }
.icon-btn, .menu-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-width: 44px; min-height: 44px; padding-inline: var(--space-3);
  background: var(--bg-subtle); color: var(--text-primary); border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  font: inherit; font-size: .9375rem; font-weight: 700; cursor: pointer; list-style: none;
}
.icon-btn:hover, .menu-trigger:hover { border-color: var(--border-strong); background: var(--bg-subtle); }
.menu-trigger::-webkit-details-marker { display: none; }
.mobile-menu { position: relative; }
.mobile-drawer {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 32px));
  background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover); padding: var(--space-2); display: grid; gap: 2px; z-index: 100;
}
.mobile-drawer a { display: flex; align-items: center; min-height: 44px; padding-inline: var(--space-3); border-radius: var(--radius-sm); text-decoration: none; color: var(--text-primary); font-size: .9375rem; font-weight: 700; }
.mobile-drawer a:hover, .mobile-drawer a[aria-current="page"] { background: var(--bg-subtle); color: var(--brand-primary); }
/* A wide screen shows a short row of sections on one line; the drop-down, which holds every
   section, is there at all widths. */
@media (min-width: 1100px) {
  .main-nav { display: flex; flex-wrap: nowrap; flex: 1 1 0; min-width: 0; justify-content: center; }
  .main-nav a { padding-inline: .8rem; }
}

/* Text */
main { padding-block: var(--space-5) var(--space-8); }
main > h1, main > .lead, main > .explain, main > .faq, main > .sources, main > .crumbs, main > p, main > .note, main > .tool, main > .result, main > .table-wrap, main > section.result { max-width: var(--content-max); }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.35; font-weight: 700; margin: 0 0 var(--space-2); }
h2 { font-size: 1.25rem; line-height: 1.4; font-weight: 700; margin: var(--space-6) 0 var(--space-3); }
h3 { font-size: 1.0625rem; line-height: 1.4; margin: var(--space-5) 0 var(--space-1); }
p { margin: 0 0 var(--space-3); }
.lead { font-size: 1rem; color: var(--text-secondary); margin-block-end: var(--space-5); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); list-style: none; padding: 0; margin: 0 0 var(--space-3); font-size: .8125rem; color: var(--text-secondary); }
.crumbs li + li::before { content: "/"; margin-inline-end: var(--space-2); color: var(--border-strong); }
.crumbs a { text-decoration: none; padding-block: 6px; display: inline-block; }
.crumbs a:hover { text-decoration: underline; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: var(--radius-pill); font-size: .8125rem; font-weight: 700; line-height: 1.5; border: 1px solid transparent; white-space: nowrap; }
.status-announced { background: var(--badge-confirmed-bg); color: var(--badge-confirmed-text); border-color: var(--badge-confirmed-border); }
.status-expected { background: var(--badge-expected-bg); color: var(--badge-expected-text); border-color: var(--badge-expected-border); }

/* The answer: a big figure on a tinted leaf with a ruled edge */
.result {
  background: var(--bg-hero); border: 1px solid var(--border-strong); border-inline-start: 4px solid var(--brand-primary);
  border-radius: var(--radius-md); padding: var(--space-5); margin-block: 0 var(--space-5);
}
.big { font-size: clamp(2rem, 6vw, 2.75rem); font-weight: 700; line-height: 1.2; color: var(--brand-primary); margin: var(--space-1) 0 var(--space-2); }
.sub { margin: 0; font-size: .9375rem; color: var(--text-secondary); }
.result > .sub:first-child { font-weight: 700; }
.hero .result { border-inline-start-color: var(--brand-accent); margin: 0; }
.hero .result > .sub:first-child { color: var(--brand-accent); font-size: .875rem; }
.hero .big { color: var(--text-primary); font-size: clamp(1.5rem, 4.5vw, 2.125rem); line-height: 1.25; }

/* Forms */
.tool { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: var(--space-4); margin-block-end: var(--space-5); }
.tool .result, .tool [data-planner-out] .result { margin-block: var(--space-4) 0; }
form { display: grid; gap: var(--space-4); }
.row { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 600px) { .row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.field { display: grid; gap: var(--space-1); min-width: 0; }
label, legend { font-size: .9375rem; font-weight: 700; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--space-3); }
legend { padding: 0; font-size: 1.0625rem; }
input, select {
  width: 100%; min-height: 46px; padding: .5rem .75rem; font: inherit; font-size: 1rem;
  color: var(--text-primary); background: var(--bg-page); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
button[type="submit"] {
  min-height: 48px; padding: .75rem 1.5rem; background: var(--brand-primary); color: var(--on-brand); border: 0;
  border-radius: var(--radius-sm); font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; width: 100%;
}
button[type="submit"]:hover { background: var(--brand-hover); }
@media (min-width: 600px) { button[type="submit"] { width: auto; justify-self: start; } }

/* Home */
.hero { display: grid; grid-template-columns: 1fr; gap: var(--space-4); margin-block: var(--space-2) var(--space-6); }
@media (min-width: 860px) { .hero { grid-template-columns: 1.25fr 1fr; align-items: center; } .hero .search { order: -1; } }
.search { display: block; }
.search label { display: block; margin-block-end: var(--space-2); }
.search-input { position: relative; }
.search-input svg { position: absolute; inset-inline-start: .875rem; top: 50%; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; }
.search-input input { min-height: 48px; padding-inline-start: 2.75rem; background: var(--bg-surface); border-width: 1.5px; border-radius: var(--radius-md); }
.search-status { min-height: 1.75em; margin: var(--space-1) 0 0; font-size: .9375rem; color: var(--text-secondary); }
[data-group] > h2 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding-block-end: var(--space-2); border-block-end: 1px solid var(--border-default); }
.more { font-size: .875rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }

/* Cards */
.cards { list-style: none; padding: 0; margin: 0 0 var(--space-4); display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards li {
  position: relative; display: grid; grid-template-columns: 1fr auto; column-gap: var(--space-2); align-content: start;
  background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: var(--space-4); box-shadow: var(--shadow-card);
}
.cards li:hover, .cards li:focus-within { border-color: var(--brand-primary); box-shadow: var(--shadow-card-hover); }
.cards a { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; text-decoration: none; }
.cards a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-md); }
.card-arrow { color: var(--text-secondary); margin-block-start: 3px; }
.cards p { grid-column: 1 / -1; margin: var(--space-2) 0 0; font-size: .9375rem; line-height: 1.6; color: var(--text-secondary); }

/* Tables: ruled like a ledger; on a phone each row becomes a small card */
.table-wrap { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; margin-block-end: var(--space-5); }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
caption { text-align: start; padding: var(--space-3) var(--space-4); font-weight: 700; font-size: 1rem; background: var(--bg-subtle); border-block-end: 1px solid var(--border-default); }
th, td { padding: var(--space-3) var(--space-4); text-align: start; vertical-align: top; border-block-end: 1px solid var(--border-default); }
th { background: var(--bg-subtle); font-weight: 700; color: var(--text-secondary); font-size: .875rem; }
tbody tr:last-child td { border-block-end: 0; }
@media (max-width: 640px) {
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  table, caption, tbody, tr, td { display: block; width: 100%; }
  tbody tr { padding: var(--space-3) var(--space-4); border-block-end: 2px solid var(--border-default); }
  tbody tr:last-child { border-block-end: 0; }
  td { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding: 6px 0; border-block-end: 1px dashed var(--border-default); text-align: end; }
  tbody tr td:last-child { border-block-end: 0; }
  td::before { content: attr(data-label); flex: none; max-width: 45%; font-weight: 700; color: var(--text-secondary); font-size: .8125rem; text-align: start; }
}
.note { background: var(--badge-expected-bg); border: 1px solid var(--badge-expected-border); color: var(--badge-expected-text); border-radius: var(--radius-md); padding: var(--space-4); font-size: .9375rem; line-height: 1.65; margin-block-end: var(--space-5); }

/* Questions */
.faq details { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); margin-block-end: var(--space-2); }
.faq summary { list-style: none; padding: var(--space-3) var(--space-4); font-weight: 700; font-size: 1rem; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.25rem; color: var(--brand-primary); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 var(--space-4) var(--space-4); font-size: .9375rem; color: var(--text-secondary); }

/* Sources: the mark of a checked page */
.sources { background: var(--bg-surface); border: 1px solid var(--border-strong); border-inline-start: 4px solid var(--brand-accent); border-radius: var(--radius-md); padding: var(--space-4); margin-block-start: var(--space-6); }
.sources-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-block-end: var(--space-3); }
.sources-head h2 { margin: 0; font-size: 1.125rem; }
.review-date { display: inline-flex; align-items: center; gap: 5px; font-size: .8125rem; font-weight: 700; background: var(--bg-subtle); padding: 3px 10px; border-radius: var(--radius-pill); }
.sources ul { margin: 0 0 var(--space-3); padding-inline-start: 1.25rem; font-size: .9375rem; }
.sources li a { font-weight: 700; }
.checked { color: var(--text-secondary); font-size: .8125rem; white-space: nowrap; }
.unofficial { margin: 0; font-size: .8125rem; line-height: 1.6; color: var(--text-secondary); padding-block-start: var(--space-2); border-block-start: 1px solid var(--border-default); }

/* Adverts: a labelled box of fixed height, plainly not part of the page */
.ad-slot { margin-block: var(--space-4); }
.ad-label { display: block; text-align: center; font-size: .75rem; color: var(--text-secondary); margin-block-end: 4px; }
.ad-frame { width: 100%; min-height: 100px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-subtle); contain: layout paint; }
@media (min-width: 768px) { .ad-frame { min-height: 90px; } .ad-slot[data-ad="bottom"] .ad-frame { min-height: 120px; } }

/* Footer */
.site-footer { background: var(--bg-surface); border-block-start: 1px solid var(--border-default); padding-block: var(--space-6); font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-5); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-brand { font-size: 1.25rem; font-weight: 700; color: var(--brand-primary); margin-block-end: var(--space-1); }
.footer-note { font-size: .8125rem; color: var(--text-secondary); }
.footer-title { font-weight: 700; margin-block-end: var(--space-2); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }
.site-footer li a:hover { text-decoration: underline; }

[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { .cards li { transition: border-color .15s ease, box-shadow .15s ease; } }
@media print { .site-header, .site-footer, .related, .ad-slot, .search, form, .icon-btn { display: none; } body { background: #fff; } }
