/* Odel · Etimad market intelligence — design tokens */
:root {
  color-scheme: light;
  --navy: #0d1a1f;
  --navy-2: #12242b;
  --navy-line: rgba(255, 255, 255, 0.10);
  --cyan: #23baec;
  --cyan-ink: #0b6f93;

  --page: #f3f6f8;
  --surface: #ffffff;
  --surface-2: #f7f9fa;
  --ink: #0f1b20;
  --ink-2: #46505a;
  --muted: #6f7984;
  --grid: #e3e8ec;
  --axis: #c3ccd3;
  --border: rgba(13, 26, 31, 0.10);
  --mark-muted: #b9c4cc;

  /* validated categorical slots (light, on #ffffff) */
  --s1: #1593d4;
  --s2: #eb6834;
  --s3: #12a35e;
  --s4: #6a4fe0;
  /* sequential (blue) */
  --seq-lo: #e4f3fb;
  --seq-hi: #0b4f75;
  --good: #0f7a3d;
  --focus: #1593d4;
  --shadow: 0 1px 0 rgba(13, 26, 31, 0.04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0a1418;
    --surface: #13232b;
    --surface-2: #172b34;
    --ink: #eef3f5;
    --ink-2: #b9c5cc;
    --muted: #8b99a2;
    --grid: #213640;
    --axis: #334953;
    --border: rgba(255, 255, 255, 0.10);
    --mark-muted: #4b5f69;
    --s1: #1593cc;
    --s2: #e5672f;
    --s3: #14a565;
    --s4: #9a6cf0;
    --seq-lo: #183440;
    --seq-hi: #5cc8f2;
    --good: #3fcf7f;
    --focus: #5cc8f2;
    --cyan-ink: #5cc8f2;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0a1418;
  --surface: #13232b;
  --surface-2: #172b34;
  --ink: #eef3f5;
  --ink-2: #b9c5cc;
  --muted: #8b99a2;
  --grid: #213640;
  --axis: #334953;
  --border: rgba(255, 255, 255, 0.10);
  --mark-muted: #4b5f69;
  --s1: #1593cc;
  --s2: #e5672f;
  --s3: #14a565;
  --s4: #9a6cf0;
  --seq-lo: #183440;
  --seq-hi: #5cc8f2;
  --good: #3fcf7f;
  --focus: #5cc8f2;
  --cyan-ink: #5cc8f2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid var(--navy-line);
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; flex-shrink: 0; }
.brand img { height: 30px; width: auto; display: block; }
.brand span { font-size: 14px; color: #9fb2bb; border-inline-start: 1px solid var(--navy-line); padding-inline-start: 14px; line-height: 1.2; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: #b7c6cd; text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 6px; white-space: nowrap;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="true"] { color: #fff; box-shadow: inset 0 -2px 0 var(--cyan); border-radius: 0; }
.actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 16px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--cyan); color: #06222c; }
.btn-primary:hover { background: #4cc9f1; }
.btn-ghost { background: transparent; color: #dce7ec; border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.18); color: #dce7ec;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.06); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #eef4f6;
  background: radial-gradient(1200px 520px at 15% 0%, rgba(35, 186, 236, 0.16), transparent 60%), var(--navy);
}
.hero-mark { position: absolute; inset-inline-end: -120px; bottom: -160px; width: 560px; opacity: 0.06; pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; padding-top: 72px; padding-bottom: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.22; font-weight: 700; margin: 0 0 20px; letter-spacing: -0.5px; text-wrap: balance; }
.hero .lede { font-size: 17px; color: #b8c8cf; max-width: 34em; margin: 0 0 28px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.strip-card { background: rgba(255, 255, 255, 0.035); border: 1px solid var(--navy-line); border-radius: 14px; padding: 22px 22px 16px; }
.strip-card h2 { font-size: 15px; font-weight: 600; margin: 0 0 4px; color: #fff; }
.strip-card p { margin: 0; font-size: 13px; color: #93a8b1; line-height: 1.6; }
#bidStrip { width: 100%; height: auto; display: block; margin: 14px 0 6px; overflow: visible; }
#bidStrip text { font-family: inherit; }
.strip-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: #a8bac2; }
.strip-legend span { display: inline-flex; align-items: center; gap: 6px; }
.strip-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.strip-tip {
  position: fixed; z-index: 80; pointer-events: none; background: #fff; color: #0f1b20; font-size: 13px; line-height: 1.5;
  padding: 8px 10px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); max-width: 280px; opacity: 0; transition: opacity 0.12s;
}
.strip-tip b { display: block; font-size: 14px; }
.figures { border-top: 1px solid var(--navy-line); }
.figures .wrap { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding-top: 0; padding-bottom: 0; gap: 0; }
.figure { padding: 22px 0 24px; border-inline-start: 1px solid var(--navy-line); padding-inline-start: 22px; }
.figure:first-child { border-inline-start: 0; padding-inline-start: 0; }
.figure b { display: block; font-size: 26px; font-weight: 600; color: #fff; line-height: 1.25; }
.figure span { font-size: 13px; color: #93a8b1; }

/* ---------- sections ---------- */
.section { padding: 76px 0 64px; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: 0; }
.sec-topic { font-size: 14px; font-weight: 600; color: var(--cyan-ink); margin: 0 0 6px; }
.section h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.3; margin: 0 0 12px; font-weight: 700; max-width: 26em; text-wrap: balance; }
.sec-lede { font-size: 16.5px; color: var(--ink-2); max-width: 46em; margin: 0 0 36px; }
.sec-body { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 40px; align-items: start; }
.rail { position: sticky; top: 88px; }
.callout { position: relative; padding: 4px 0 18px; margin-bottom: 6px; }
.callout b { display: block; font-size: 44px; line-height: 1.15; font-weight: 700; color: var(--ink); }
.callout span { display: block; color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.callout::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 4px; width: 26px; height: 3px; background: var(--cyan); border-radius: 2px;
}
.findings { list-style: none; margin: 0; padding: 0; }
.findings li { padding: 14px 0; border-top: 1px solid var(--border); color: var(--ink-2); font-size: 15px; }
.findings li strong { color: var(--ink); font-weight: 600; }
.note { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.65; }

.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 18px 12px; min-width: 0; box-shadow: var(--shadow); }
.panel.wide { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.panel h3 { font-size: 15.5px; font-weight: 600; margin: 0; line-height: 1.5; color: var(--ink); }
.panel .sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; line-height: 1.5; }
.view-toggle {
  font: inherit; font-size: 12px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 9px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.view-toggle:hover { color: var(--ink); }
.chart { width: 100%; height: 300px; direction: ltr; }
.chart.h-sm { height: 240px; }
.chart.h-lg { height: 430px; }
.chart.h-xl { height: 520px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin: 6px 0 2px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 10px; border-radius: 2px; display: inline-block; }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.minis .mini h4 { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 4px 0 0; }

/* tables */
.tbl-wrap { overflow-x: auto; max-height: 420px; overflow-y: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { font-weight: 600; color: var(--ink-2); background: var(--surface); position: sticky; top: 0; z-index: 1; font-size: 12.5px; }
table.data td.n, table.data th.n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tbody tr:hover { background: var(--surface-2); }

/* compare table */
.compare td:first-child { color: var(--ink-2); }
.compare td b { font-weight: 600; }

/* ---------- explorer ---------- */
.filters { display: grid; grid-template-columns: 2fr repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.filters input, .filters select {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; min-width: 0; width: 100%;
}
.filter-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -6px 0 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.linkbtn { font: inherit; font-size: 13px; background: none; border: 0; color: var(--cyan-ink); cursor: pointer; padding: 2px 4px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; border-inline-start: 1px solid var(--border); }
.kpi:first-child { border-inline-start: 0; }
.kpi b { display: block; font-size: 24px; font-weight: 600; line-height: 1.3; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.ex-charts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.is-stale { opacity: 0.55; transition: opacity 0.15s; }
#tenderTable th.sortable { cursor: pointer; user-select: none; }
#tenderTable th.sortable::after { content: ""; display: inline-block; width: 0.8em; }
#tenderTable th[aria-sort="ascending"]::after { content: " ▲"; font-size: 9px; }
#tenderTable th[aria-sort="descending"]::after { content: " ▼"; font-size: 9px; }
#tenderTable tbody tr.row { cursor: pointer; }
#tenderTable td.name { max-width: 360px; }
#tenderTable td.name small { display: block; color: var(--muted); font-size: 12px; }
tr.bids-row > td { background: var(--surface-2); padding: 10px 14px 14px; }
.bids-list { width: 100%; border-collapse: collapse; font-size: 13px; }
.bids-list td { padding: 5px 8px; border-bottom: 1px solid var(--border); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.tag.ok::before { content: "✓"; font-weight: 700; color: var(--good); }
.tag.no::before { content: "✕"; font-weight: 700; color: var(--muted); }
.tag.win { background: var(--s1); color: #fff; border-color: transparent; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px 4px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .btns { display: flex; gap: 8px; }
.pbtn { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 5px 12px; cursor: pointer; }
.pbtn:disabled { opacity: 0.4; cursor: default; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- playbook ---------- */
.playbook { list-style: none; counter-reset: p; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.playbook li { counter-increment: p; display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 20px 0; border-top: 1px solid var(--border); }
.playbook li::before {
  content: counter(p); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--cyan); font-weight: 700; font-size: 15px;
}
:root[data-theme="dark"] .playbook li::before { background: #1d3a46; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .playbook li::before { background: #1d3a46; } }
.playbook h3 { margin: 0 0 4px; font-size: 16.5px; font-weight: 600; line-height: 1.5; }
.playbook p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------- download + method ---------- */
.download {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background: var(--navy); color: #e6eef1;
  border-radius: 14px; padding: 28px 32px; margin-bottom: 36px;
}
.download h3 { margin: 0 0 6px; font-size: 20px; color: #fff; }
.download p { margin: 0; color: #a8bac2; font-size: 14.5px; }
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.method-grid h3 { font-size: 15.5px; margin: 0 0 6px; }
.method-grid p { margin: 0; color: var(--ink-2); font-size: 14px; }

footer { background: var(--navy); color: #93a8b1; font-size: 13px; }
footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap; }
footer img { height: 26px; display: block; }
footer a { color: #cfe3ea; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .sec-body { grid-template-columns: 1fr; }
  .rail { position: static; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters label:first-child { grid-column: 1 / -1; }
  .ex-charts { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .brand span { display: none; }
  .btn-label-long { display: none; }
  .hero .wrap { padding-top: 44px; padding-bottom: 36px; }
  .figures .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure, .figure:first-child { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--navy-line); padding: 14px 0; }
  .charts { grid-template-columns: 1fr; }
  .minis { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-inline-start: 0; border-top: 1px solid var(--border); }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .filters { grid-template-columns: 1fr 1fr; }
  .playbook { grid-template-columns: 1fr; }
  .download { grid-template-columns: 1fr; padding: 22px; }
  .method-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0 44px; }
  .callout b { font-size: 36px; }
  .chart { height: 280px; }
  .chart.h-lg { height: 420px; }
  .chart.h-xl { height: 520px; }
}
@media print {
  .topbar, .view-toggle, .filters, .pager { display: none; }
  .rail { position: static; }
}

/* ---------- password gate ---------- */
.locked .topbar, .locked main, .locked footer { display: none; }
.gate {
  min-height: 100vh; display: grid; place-items: center; padding: 24px; color: #eef4f6;
  background: radial-gradient(900px 480px at 80% 0%, rgba(35, 186, 236, 0.16), transparent 60%), var(--navy);
}
.gate-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 10px; }
.gate-card img { height: 44px; width: auto; align-self: flex-start; margin-bottom: 18px; }
.gate-card h1 { font-size: 28px; margin: 0; line-height: 1.3; }
.gate-card p { margin: 0 0 14px; color: #a8bac2; font-size: 15px; }
.gate-card label { font-size: 13px; color: #b7c6cd; }
.gate-card input {
  font: inherit; font-size: 16px; color: #fff; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px; padding: 11px 12px; direction: ltr; text-align: right;
}
.gate-card input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.gate-card .btn { justify-content: center; padding: 12px 16px; font-size: 15px; margin-top: 6px; }
.gate-card .btn:disabled { opacity: 0.7; cursor: progress; }
.gate-err { min-height: 1.6em; color: #ffb4a1 !important; font-size: 14px !important; margin: 4px 0 0 !important; }
.btn[aria-busy="true"] { cursor: progress; opacity: 0.85; }
