:root {
  --forest: #142e26;
  --forest-deep: #0a211a;
  --teal: #006170;
  --gold: #f2b13e;
  --gold-soft: #fff1cf;
  --ivory: #f7f3ea;
  --paper: #fffdf8;
  --sage: #e8f0e9;
  --ink: #142e26;
  --ink-soft: #5e6d66;
  --line: #d7e0d9;
  --danger: #a63b2b;
  --shadow: 0 24px 70px rgba(20, 46, 38, 0.11);
  --shadow-soft: 0 10px 30px rgba(20, 46, 38, 0.07);
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 96% -10%, rgba(242, 177, 62, 0.17), transparent 70%),
    radial-gradient(650px 420px at -10% 27%, rgba(0, 97, 112, 0.08), transparent 70%),
    var(--ivory);
  font-family: "Montserrat", sans-serif;
  -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body { font-family: "Almarai", sans-serif; }
button, select { font: inherit; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(242, 177, 62, 0.75);
  outline-offset: 3px;
}
.shell {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  inset-inline-start: 18px;
  top: 14px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  color: white;
  background: var(--forest);
  font-size: 12px;
  font-weight: 700;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid rgba(20, 46, 38, 0.12);
  background: rgba(247, 243, 234, 0.88);
  backdrop-filter: blur(18px);
}
.header-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}
.amf-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px 13px 13px 3px;
  color: var(--paper);
  background: var(--forest);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong {
  color: var(--forest);
  font-size: 22px;
  letter-spacing: -0.055em;
}
.brand-copy strong span { color: var(--teal); }
.brand-copy small {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-inline-start: auto;
}
.desktop-nav a, .mobile-nav a {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.desktop-nav a:hover, .mobile-nav a:hover { color: var(--teal); }
.language-button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 97, 112, 0.22);
  border-radius: 999px;
  color: var(--teal);
  background: rgba(255, 253, 248, 0.75);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.language-button span:first-child {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--forest);
  background: var(--gold);
  font-family: "Almarai", sans-serif;
  font-size: 11px;
}
.mobile-nav { display: none; }

.hero {
  min-height: 545px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  align-items: center;
  gap: clamp(50px, 8vw, 110px);
  padding-block: clamp(70px, 10vw, 122px) clamp(64px, 8vw, 96px);
}
.eyebrow, .analysis-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow::before {
  width: 32px;
  height: 1px;
  background: var(--gold);
  content: "";
}
h1 {
  max-width: 820px;
  margin: 20px 0 22px;
  color: var(--forest);
  font-size: clamp(47px, 7vw, 82px);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.98;
  text-wrap: balance;
}
html[dir="rtl"] h1 { letter-spacing: -0.025em; line-height: 1.18; }
h1 em { color: var(--teal); font-style: normal; }
.hero-copy-block > p {
  max-width: 650px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 28px;
}
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary {
  color: white;
  background: var(--forest);
  box-shadow: 0 10px 24px rgba(20, 46, 38, 0.18);
}
.button-primary:hover { background: var(--teal); }
.button-quiet {
  border-color: #cad5cc;
  color: var(--forest);
  background: rgba(255, 253, 248, 0.68);
}
.hero-panel {
  position: relative;
  min-height: 345px;
  padding: 25px;
  overflow: hidden;
  border: 1px solid rgba(20, 46, 38, 0.14);
  border-radius: 2px var(--radius-xl) var(--radius-xl) var(--radius-xl);
  color: white;
  background:
    radial-gradient(260px 220px at 100% 0%, rgba(242, 177, 62, 0.28), transparent 70%),
    linear-gradient(145deg, var(--forest), var(--forest-deep));
  box-shadow: var(--shadow);
}
html[dir="rtl"] .hero-panel {
  border-radius: var(--radius-xl) 2px var(--radius-xl) var(--radius-xl);
}
.hero-panel::after {
  position: absolute;
  right: -74px;
  bottom: -95px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(255, 255, 255, 0.025), 0 0 0 64px rgba(255, 255, 255, 0.02);
  content: "";
}
.hero-panel-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #cbeed9;
}
.live-pill i, .source-status i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: #5bd08a;
  box-shadow: 0 0 0 4px rgba(91, 208, 138, 0.15);
}
.coverage-number {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  color: var(--gold);
  font-size: 76px;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
}
.hero-panel > strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 4px;
  font-size: 15px;
}
.coverage-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.14);
}
.coverage-grid span {
  display: grid;
  gap: 4px;
  padding: 13px 10px;
  background: rgba(10, 33, 26, 0.85);
}
.coverage-grid b { color: white; font-size: 16px; }
.coverage-grid small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
  line-height: 1.35;
}
.hero-panel > p {
  position: relative;
  z-index: 1;
  max-width: 34ch;
  margin: 17px 0 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
  line-height: 1.6;
}

.section {
  padding-block: clamp(58px, 8vw, 92px);
  scroll-margin-top: 30px;
}
.explore-section {
  background: rgba(255, 253, 248, 0.54);
  border-block: 1px solid rgba(20, 46, 38, 0.08);
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 27px;
}
.section-heading h2 {
  max-width: 750px;
  margin: 10px 0 0;
  color: var(--forest);
  font-size: clamp(30px, 4vw, 45px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.08;
}
html[dir="rtl"] .section-heading h2 { letter-spacing: -0.02em; line-height: 1.35; }
.section-heading > p {
  max-width: 470px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.75;
}
.explorer {
  overflow: hidden;
  border: 1px solid rgba(20, 46, 38, 0.15);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.explorer-status {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  background: #edf5ef;
  font-size: 10px;
}
.source-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--teal);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.source-status.error { color: var(--danger); }
.source-status.error i {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(166, 59, 43, 0.12);
}
.explorer-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 0.75fr) minmax(410px, 1.7fr) auto;
  align-items: end;
  gap: 18px;
  padding: 22px 24px 12px;
}
.control-field, .scope-field { min-width: 0; }
.control-field { display: grid; gap: 8px; }
.control-field > span, .scope-field legend {
  padding: 0;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.control-field select {
  width: 100%;
  min-height: 43px;
  padding: 9px 35px 9px 12px;
  border: 1px solid #c9d6cc;
  border-radius: 11px;
  outline: none;
  color: var(--forest);
  background: white;
  font-size: 12px;
  font-weight: 700;
}
html[dir="rtl"] .control-field select { padding: 9px 12px 9px 35px; }
.scope-field { margin: 0; padding: 0; border: 0; }
.scope-field legend { margin-bottom: 8px; }
.segmented {
  min-height: 43px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border: 1px solid #cfdbd2;
  border-radius: 11px;
  background: #f4f7f3;
}
.segmented button {
  border: 0;
  border-radius: 8px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.segmented button.active {
  color: white;
  background: var(--teal);
  box-shadow: 0 3px 10px rgba(0, 97, 112, 0.18);
}
.toolbar-actions { display: flex; gap: 7px; }
.icon-button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #cfdbd2;
  border-radius: 11px;
  color: var(--teal);
  background: white;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.icon-button:hover { border-color: var(--teal); }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 10px 24px 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--line);
}
.kpi-card {
  position: relative;
  min-height: 145px;
  padding: 17px;
  border: 0;
  color: var(--ink);
  background: var(--paper);
  text-align: start;
  cursor: pointer;
  transition: background 160ms ease;
}
.kpi-card:hover { background: #f5f9f5; }
.kpi-card.active { background: var(--forest); }
.kpi-card.active::before {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: var(--gold);
  content: "";
}
.kpi-label {
  min-height: 29px;
  display: block;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.45;
}
.kpi-card.active .kpi-label,
.kpi-card.active .kpi-meta,
.kpi-card.active .kpi-change { color: rgba(255, 255, 255, 0.62); }
.kpi-value {
  display: block;
  margin: 7px 0 5px;
  color: var(--forest);
  font-size: clamp(23px, 2.5vw, 31px);
  font-weight: 700;
  letter-spacing: -0.055em;
}
.kpi-card.active .kpi-value { color: white; }
.kpi-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.kpi-meta, .kpi-change {
  color: #7c8a83;
  font-size: 8px;
  font-weight: 600;
}
.kpi-change.positive { color: #277b52; }
.kpi-change.negative { color: var(--danger); }
.kpi-card.active .kpi-change.positive { color: #8de0b0; }
.kpi-card.active .kpi-change.negative { color: #ffc0a7; }
.skeleton {
  display: block;
  width: 72%;
  height: 29px;
  margin: 12px 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #e4ebe5 25%, #f4f7f4 40%, #e4ebe5 60%);
  background-size: 350% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { to { background-position: -135% 0; } }

.analysis-shell {
  margin: 0 24px 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.analysis-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.analysis-header h3 {
  margin: 5px 0 0;
  color: var(--forest);
  font-size: 22px;
  letter-spacing: -0.045em;
}
.metric-tabs {
  max-width: 67%;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: thin;
}
.metric-tab {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #d0dcd3;
  border-radius: 999px;
  color: var(--ink-soft);
  background: white;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}
.metric-tab.active {
  border-color: var(--teal);
  color: white;
  background: var(--teal);
}
.analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(300px, 0.72fr);
}
.chart-card, .context-card { min-width: 0; padding: 22px; }
.chart-card {
  border-inline-end: 1px solid var(--line);
  background: linear-gradient(145deg, #fbfdfb, #f1f6f2);
}
.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.card-heading h4 { margin: 0; color: var(--forest); font-size: 14px; }
.card-heading p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}
.count-chip {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--teal);
  background: #e1eeea;
  font-size: 8px;
  font-weight: 800;
}
.bar-chart {
  min-height: 280px;
  display: grid;
  align-content: center;
  gap: 12px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.3fr) minmax(160px, 1fr) minmax(83px, auto);
  align-items: center;
  gap: 12px;
}
.bar-label {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-row.focus .bar-label { color: var(--forest); font-weight: 800; }
.bar-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe9e1;
}
.bar-zero {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(20, 46, 38, 0.35);
}
.bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), #4c9c88);
  transform-origin: left center;
  animation: grow-bar 560ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
.bar-row.focus .bar-fill { background: linear-gradient(90deg, #db9424, var(--gold)); }
.bar-fill.negative { background: linear-gradient(90deg, #ca795d, #9d4a34); }
@keyframes grow-bar { from { transform: scaleX(0.02); } }
.bar-value {
  color: var(--forest);
  font-size: 9px;
  font-weight: 800;
  text-align: end;
  white-space: nowrap;
}
.bar-value small {
  display: block;
  margin-top: 2px;
  color: #85928b;
  font-size: 7px;
  font-weight: 600;
}
.chart-empty {
  align-self: center;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}
.context-card { background: var(--paper); }
.context-hero {
  padding: 18px;
  border-radius: var(--radius-md);
  color: white;
  background: var(--forest);
}
.context-hero > span, .context-stats span, .trend-heading span {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.context-hero strong {
  display: block;
  margin: 8px 0 3px;
  color: var(--gold);
  font-size: 30px;
  letter-spacing: -0.06em;
}
.context-hero small { color: rgba(255, 255, 255, 0.65); font-size: 8px; }
.context-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 14px 0 21px;
  background: var(--line);
}
.context-stats > div {
  min-width: 0;
  padding: 12px 8px;
  background: var(--paper);
}
.context-stats span, .trend-heading span { color: var(--ink-soft); line-height: 1.4; }
.context-stats strong {
  display: block;
  margin: 7px 0 3px;
  overflow: hidden;
  color: var(--forest);
  font-size: 13px;
  text-overflow: ellipsis;
}
.context-stats small {
  display: block;
  overflow: hidden;
  color: #87938d;
  font-size: 7px;
  line-height: 1.35;
  text-overflow: ellipsis;
}
.trend-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.trend-heading strong { color: var(--teal); font-size: 9px; }
.trend-chart { min-height: 115px; }
.trend-chart svg {
  width: 100%;
  height: 115px;
  display: block;
  overflow: visible;
}
.trend-chart .grid-line { stroke: #e0e7e1; stroke-width: 1; }
.trend-chart .trend-area { fill: url(#trend-gradient); }
.trend-chart .trend-line {
  fill: none;
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}
.trend-chart .trend-dot { fill: var(--gold); stroke: var(--paper); stroke-width: 2; }
.trend-chart text {
  fill: #87938d;
  font-family: "Montserrat", sans-serif;
  font-size: 7px;
}
html[dir="rtl"] .trend-chart text { font-family: "Almarai", sans-serif; }
.data-view-bar {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  background: #fbfcfa;
  font-size: 8px;
}
.view-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 9px;
  background: var(--sage);
}
.view-tabs button {
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}
.view-tabs button.active {
  color: var(--teal);
  background: white;
  box-shadow: 0 2px 7px rgba(20, 46, 38, 0.09);
}
.analysis-shell.table-mode .analysis-grid { display: none; }
.table-panel[hidden] { display: none; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 9px; }
th, td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  white-space: nowrap;
}
th {
  color: var(--ink-soft);
  background: #f5f8f5;
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
td { color: var(--forest); font-weight: 600; }
tr.focus-row td:first-child { color: var(--teal); font-weight: 800; }
.metadata-panel { background: var(--paper); }
.metadata-panel summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 20px;
  color: var(--forest);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.metadata-panel summary::-webkit-details-marker { display: none; }
.metadata-panel summary span:last-child {
  color: var(--teal);
  font-size: 18px;
  transition: transform 160ms ease;
}
.metadata-panel[open] summary span:last-child { transform: rotate(45deg); }
.metadata-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 0.7fr;
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}
.metadata-grid > div { padding: 16px 20px; background: #fbfcfa; }
.metadata-grid span {
  color: var(--teal);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.metadata-grid p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.55;
}
.metadata-grid code { color: var(--forest); font-size: 8px; }
.explorer-footer {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  background: #f6f8f5;
  font-size: 8px;
  line-height: 1.5;
}
.explorer-footer a {
  flex: 0 0 auto;
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.theme-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 13px;
}
.theme-card {
  min-height: 225px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid rgba(20, 46, 38, 0.14);
  border-radius: var(--radius-lg);
  color: var(--forest);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  text-align: start;
}
button.theme-card {
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
button.theme-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.theme-card.feature {
  color: white;
  background:
    radial-gradient(220px 180px at 100% 0%, rgba(242, 177, 62, 0.28), transparent 70%),
    var(--teal);
}
.theme-number, .theme-arrow, .soon {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 9px;
  color: var(--teal);
  background: var(--sage);
  font-size: 9px;
  font-weight: 800;
}
.theme-arrow { align-self: flex-end; margin-top: -30px; }
.theme-card.feature .theme-number, .theme-card.feature .theme-arrow {
  color: var(--forest);
  background: var(--gold);
}
.theme-card strong {
  margin-top: auto;
  font-size: 17px;
  letter-spacing: -0.035em;
}
.theme-card small {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.6;
}
.theme-card.feature small { color: rgba(255, 255, 255, 0.7); }
.theme-card.muted { background: #edf3ee; }
.soon {
  align-self: flex-end;
  width: auto;
  margin-top: -30px;
  border-radius: 999px;
  color: #7a642d;
  background: var(--gold-soft);
  text-transform: uppercase;
}

.knowledge-section {
  color: white;
  background:
    radial-gradient(620px 390px at 95% 0%, rgba(242, 177, 62, 0.16), transparent 70%),
    var(--forest);
}
.light-heading h2 { color: white; }
.light-heading > p { color: rgba(255, 255, 255, 0.62); }
.knowledge-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr 0.75fr;
  gap: 13px;
}
.knowledge-lead, .knowledge-card {
  min-height: 258px;
  display: flex;
  flex-direction: column;
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-lg);
  text-decoration: none;
}
.knowledge-lead {
  background:
    radial-gradient(250px 200px at 100% 0%, rgba(242, 177, 62, 0.22), transparent 72%),
    rgba(255, 255, 255, 0.08);
}
.knowledge-card { background: rgba(255, 255, 255, 0.045); }
a.knowledge-lead, a.knowledge-card { transition: transform 180ms ease, background 180ms ease; }
a.knowledge-lead:hover, a.knowledge-card:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}
.tag, .knowledge-card > span {
  align-self: flex-start;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--gold);
  background: rgba(242, 177, 62, 0.1);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.knowledge-lead h3, .knowledge-card h3 {
  max-width: 17ch;
  margin: auto 0 9px;
  color: white;
  font-size: clamp(20px, 2.4vw, 29px);
  letter-spacing: -0.045em;
  line-height: 1.15;
}
.knowledge-card h3 { font-size: 19px; }
.knowledge-lead p, .knowledge-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  line-height: 1.65;
}
.knowledge-lead > strong { margin-top: 18px; color: var(--gold); font-size: 9px; }

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid rgba(20, 46, 38, 0.14);
}
.method-grid article {
  padding: 28px 24px;
  border-inline-end: 1px solid rgba(20, 46, 38, 0.14);
}
.method-grid article:last-child { border-inline-end: 0; }
.method-grid span { color: var(--gold); font-size: 10px; font-weight: 800; }
.method-grid h3 { margin: 34px 0 8px; color: var(--forest); font-size: 17px; }
.method-grid p { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.65; }
.source-priority {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 17px;
  margin-top: 22px;
  padding: 20px 23px;
  border: 1px solid rgba(20, 46, 38, 0.13);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.72);
}
.source-priority > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.source-priority > span { color: #a1ada6; }
html[dir="rtl"] .source-priority > span { transform: scaleX(-1); }
.priority-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: white;
  background: var(--forest);
  font-size: 9px;
  font-weight: 800;
}
.priority-badge.secondary { background: var(--teal); }
.priority-badge.outline {
  border: 1px solid var(--gold);
  color: #8a641d;
  background: var(--gold-soft);
}
.source-priority p { min-width: 0; margin: 0; }
.source-priority strong, .source-priority small { display: block; }
.source-priority strong { color: var(--forest); font-size: 9px; }
.source-priority small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 7px;
  line-height: 1.45;
}

.site-footer {
  padding-block: 28px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--forest-deep);
}
.footer-inner {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 30px;
}
.footer-brand p, .footer-note { margin: 0; }
.footer-brand strong, .footer-brand small, .footer-ar strong, .footer-ar small { display: block; }
.footer-brand strong, .footer-ar strong { color: white; font-size: 9px; }
.footer-brand small, .footer-ar small { margin-top: 5px; font-size: 8px; }
.footer-ar {
  padding-inline-start: 28px;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.15);
  font-family: "Almarai", sans-serif;
}
.footer-note {
  max-width: 440px;
  justify-self: end;
  font-size: 7px;
  line-height: 1.55;
  text-align: end;
}
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: min(360px, calc(100% - 40px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: white;
  background: var(--forest);
  box-shadow: 0 16px 35px rgba(20, 46, 38, 0.28);
  font-size: 10px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}
html[dir="rtl"] .toast { right: auto; left: 20px; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  .desktop-nav { gap: 18px; }
  .explorer-toolbar { grid-template-columns: 0.8fr 1.4fr; }
  .toolbar-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .analysis-grid { grid-template-columns: 1.15fr 0.85fr; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .shell { width: min(100% - 32px, 1240px); }
  .desktop-nav { display: none; }
  .mobile-nav {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 10px 16px 12px;
    border-top: 1px solid rgba(20, 46, 38, 0.08);
    scrollbar-width: none;
  }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav a { flex: 0 0 auto; }
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 45px;
  }
  .hero-panel { min-height: 315px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 13px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .analysis-header { align-items: flex-start; flex-direction: column; }
  .metric-tabs { max-width: 100%; width: 100%; }
  .analysis-grid { grid-template-columns: 1fr; }
  .chart-card { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .metadata-grid, .knowledge-grid { grid-template-columns: 1fr; }
  .metadata-grid { gap: 0; background: transparent; }
  .metadata-grid > div { border-top: 1px solid var(--line); }
  .knowledge-lead, .knowledge-card { min-height: 220px; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .method-grid article:nth-child(2) { border-inline-end: 0; }
  .method-grid article:nth-child(-n + 2) { border-bottom: 1px solid rgba(20, 46, 38, 0.14); }
  .source-priority { grid-template-columns: 1fr; }
  .source-priority > span { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-note { grid-column: 1 / -1; justify-self: start; text-align: start; }
}
@media (max-width: 580px) {
  .shell { width: min(100% - 24px, 1240px); }
  .header-inner { min-height: 72px; gap: 12px; }
  .amf-mark { width: 38px; height: 38px; }
  .brand-copy strong { font-size: 20px; }
  .brand-copy small {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .language-button { padding: 7px; }
  #language-label { display: none; }
  .mobile-nav { padding-inline: 12px; }
  .hero { gap: 34px; padding-block: 52px 61px; }
  h1 { font-size: clamp(42px, 13vw, 58px); }
  .hero-actions .button { flex: 1 1 auto; }
  .hero-panel { min-height: 300px; padding: 21px; }
  .coverage-number { font-size: 65px; }
  .section { padding-block: 55px; }
  .section-heading h2 { font-size: 31px; }
  .explorer { margin-inline: -4px; border-radius: 21px; }
  .explorer-status { display: block; padding: 12px 16px; }
  #status-detail { display: block; margin-top: 7px; line-height: 1.5; }
  .explorer-toolbar {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 18px 16px 9px;
  }
  .segmented { min-height: 48px; }
  .toolbar-actions { grid-column: auto; }
  .icon-button { flex: 1; }
  .kpi-grid { margin: 9px 16px 18px; }
  .kpi-card { min-height: 132px; padding: 14px; }
  .kpi-value { font-size: 24px; }
  .analysis-shell { margin: 0 16px 18px; }
  .analysis-header, .chart-card, .context-card { padding: 17px; }
  .bar-chart { min-height: 250px; gap: 15px; }
  .bar-row {
    grid-template-columns: minmax(78px, 0.35fr) minmax(80px, 1fr) auto;
    gap: 7px;
  }
  .bar-label, .bar-value { font-size: 8px; }
  .context-stats { grid-template-columns: 1fr; }
  .context-stats > div { padding: 10px 7px; }
  .data-view-bar { align-items: flex-start; flex-direction: column; }
  .metadata-panel summary, .data-view-bar { padding-inline: 16px; }
  .explorer-footer { align-items: flex-start; flex-direction: column; padding-inline: 16px; }
  .theme-grid, .method-grid { grid-template-columns: 1fr; }
  .theme-card { min-height: 200px; }
  .method-grid article, .method-grid article:nth-child(2) {
    border-inline-end: 0;
    border-bottom: 1px solid rgba(20, 46, 38, 0.14);
  }
  .method-grid article:last-child { border-bottom: 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-ar {
    padding: 18px 0 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
