:root {
  color-scheme: light;
  /* Brand palette (BRAND.md §3) */
  --blog-ink: #083344; /* Deep Blue-Teal */
  --blog-accent: #06b6d4; /* Electric Cyan */
  --blog-accent-dark: #0e7490;
  --blog-slate: #1e293b; /* Neutral Dark - body text */
  --blog-muted: #475569;
  --blog-faint: #64748b;
  --blog-soft: #f0fdfa; /* Glacier Ice */
  --blog-mist: #f8fafc; /* Clean Mist */
  --blog-bg: #f8fafc;
  --blog-line: #e2e8f0;
  --blog-card: #ffffff;
  /* Layout tokens - every content block shares ONE width (the header/frame),
     so the hero image, prose, tables, and CTAs all line up edge-to-edge. */
  --blog-frame: 1152px; /* matches landing max-w-6xl */
  --blog-post: var(--blog-frame); /* article content column */
  --blog-read: var(--blog-frame); /* text measure = frame (uniform width) */
  --blog-pad: clamp(16px, 4vw, 24px);
  --blog-header-height: 65px;
  --blog-radius: 14px;
  --blog-shadow: 0 12px 34px -14px rgba(8, 51, 68, 0.18);
}

* {
  box-sizing: border-box;
}

body.blog-page {
  margin: 0;
  color: var(--blog-slate);
  background:
    radial-gradient(ellipse 80% 50% at 15% -8%, rgb(6 182 212 / 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 92% 4%, rgb(8 51 68 / 0.07), transparent 50%),
    linear-gradient(180deg, #f0fdfa 0%, #f8fafc 34%);
  background-attachment: fixed;
  font-family:
    "DM Sans",
    Tajawal,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"].blog-page,
[dir="rtl"] .blog-article-body,
[dir="rtl"] .blog-hero,
[dir="rtl"] .blog-card,
[dir="rtl"] .blog-cta,
[dir="rtl"] .blog-methodology,
[dir="rtl"] .blog-breadcrumbs {
  font-family: Tajawal, "DM Sans", system-ui, sans-serif;
}

.blog-page a {
  color: var(--blog-accent-dark);
}

.blog-shell {
  width: 100%;
  max-width: var(--blog-frame);
  margin-inline: auto;
  padding-inline: var(--blog-pad);
}

/* ── Header ── */

.blog-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgb(8 51 68 / 0.08);
  background: rgb(255 255 255 / 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.blog-header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.blog-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blog-ink);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.blog-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.blog-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.92rem;
  font-weight: 600;
}

.blog-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blog-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-nav-link:hover,
.blog-nav-link[aria-current="page"] {
  color: var(--blog-ink);
}

.blog-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.blog-nav-caret {
  width: 13px;
  height: 13px;
  transition: transform 0.2s ease;
}

/* Separate tap target for the caret so the "Blog" text still navigates home
   while a tap on the caret opens and closes categories without JS. */
.blog-nav-caret-btn {
  display: inline-flex;
  align-items: center;
  order: 2;
  margin: -8px -6px -8px -2px; /* enlarge hit area without shifting layout */
  padding: 8px 6px;
  color: var(--blog-muted);
  cursor: pointer;
}

.blog-nav-trigger {
  order: 1;
}

.blog-nav-toggle:checked ~ .blog-nav-caret-btn .blog-nav-caret {
  transform: rotate(90deg);
}

.blog-nav-toggle:checked ~ .blog-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* CSS-only dropdown (no client JS in blog output) */
.blog-dropdown {
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 10px);
  min-width: 264px;
  padding: 8px;
  border: 1px solid var(--blog-line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 44px -16px rgba(8, 51, 68, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
}

.blog-dropdown::before {
  /* hover bridge so the menu doesn't close in the gap */
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -10px;
  height: 10px;
}

/* `.blog-dropdown` prefix raises specificity above `.blog-page a` so the
   category text is navy (ink), not the generic link blue. */
.blog-dropdown .blog-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--blog-ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.blog-dropdown-item:hover,
.blog-dropdown-item.blog-dropdown-active {
  background: var(--blog-soft);
}

.blog-dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: var(--blog-soft);
  color: var(--blog-accent);
  box-shadow: inset 0 0 0 1px rgb(6 182 212 / 0.2);
}

.blog-dropdown-icon .blog-cat-icon {
  width: 18px;
  height: 18px;
}

/* ── Language switch (ported from landing LangSwitch) ── */

.blog-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
}

.blog-lang-light {
  border: 1px solid rgb(8 51 68 / 0.15);
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 1px 2px rgba(8, 51, 68, 0.06);
}

.blog-lang-dark {
  border: 1px solid rgb(255 255 255 / 0.2);
  background: rgb(255 255 255 / 0.1);
}

.blog-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    box-shadow 0.4s ease;
}

.blog-lang-light .blog-lang-btn {
  color: var(--blog-muted);
}

.blog-lang-light .blog-lang-btn:hover {
  color: var(--blog-ink);
  background: rgb(8 51 68 / 0.06);
}

.blog-lang-light .blog-lang-active {
  background: var(--blog-ink);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(8, 51, 68, 0.2);
}

.blog-lang-dark .blog-lang-btn {
  color: rgb(255 255 255 / 0.65);
}

.blog-lang-dark .blog-lang-btn:hover {
  color: #ffffff;
  background: rgb(255 255 255 / 0.1);
}

.blog-lang-dark .blog-lang-active {
  background: #ffffff;
  color: var(--blog-ink);
}

.blog-lang-flag {
  width: 20px;
  height: 13px;
  flex: none;
  border-radius: 2px;
  overflow: hidden;
}

.blog-lang-ar {
  font-family: Tajawal, sans-serif;
}

/* ── Main / hero ── */

.blog-main {
  /* padding-block only - keep .blog-shell's inline padding so main aligns with the header */
  padding-block: 40px 72px;
}

.blog-hero {
  max-width: var(--blog-frame);
  padding: 20px 0 12px;
}

.blog-post-page .blog-hero {
  max-width: var(--blog-post);
}

.blog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--blog-accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-eyebrow-icon {
  display: inline-flex;
  color: var(--blog-accent);
}

.blog-eyebrow-icon .blog-cat-icon {
  width: 16px;
  height: 16px;
}

.blog-hero h1,
.blog-article-header h1 {
  margin: 0;
  color: var(--blog-ink);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* Category page: the category icon sits inline before the title. */
.blog-hero-title-icon {
  display: inline-flex;
  vertical-align: baseline;
  margin-inline-end: 0.4em;
  color: var(--blog-accent);
}

.blog-hero-title-icon .blog-cat-icon {
  width: 0.82em;
  height: 0.82em;
}

.blog-hero-lede {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--blog-muted);
  font-size: 1.14rem;
}

.blog-section {
  padding: 30px 0;
}

.blog-section-title {
  margin: 0 0 20px;
  color: var(--blog-ink);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── Grids & cards ── */

.blog-grid {
  display: grid;
  gap: 20px;
}

.blog-grid-categories {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.blog-grid-cards {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Category cards - whole card is a link, icon-led, no "read more" */
.blog-category-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  background: linear-gradient(180deg, #ffffff 0%, var(--blog-soft) 100%);
  box-shadow: var(--blog-shadow);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-category-card:hover {
  transform: translateY(-3px);
  border-color: rgb(6 182 212 / 0.5);
  box-shadow: 0 18px 40px -16px rgba(6, 182, 212, 0.32);
}

.blog-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 12px;
  background: var(--blog-ink);
  color: #ffffff;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.blog-category-card:hover .blog-category-icon {
  background: var(--blog-accent);
  color: var(--blog-ink);
}

.blog-category-icon .blog-cat-icon {
  width: 24px;
  height: 24px;
}

.blog-category-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.blog-category-title {
  color: var(--blog-ink);
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.25;
}

.blog-category-desc {
  color: var(--blog-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.blog-category-arrow {
  margin-inline-start: auto;
  align-self: center;
  color: var(--blog-accent-dark);
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.blog-category-card:hover .blog-category-arrow {
  transform: translateX(3px);
}

[dir="rtl"] .blog-category-card:hover .blog-category-arrow {
  transform: translateX(-3px);
}

/* Post cards - hero thumbnail on top */
.blog-post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  background: var(--blog-card);
  box-shadow: var(--blog-shadow);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-post-card:hover {
  transform: translateY(-3px);
  border-color: rgb(6 182 212 / 0.5);
  box-shadow: 0 20px 44px -18px rgba(6, 182, 212, 0.3);
}

.blog-card-media {
  display: block;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: var(--blog-soft);
  border-bottom: 1px solid var(--blog-line);
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-post-card:hover .blog-card-media img {
  transform: scale(1.03);
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 22px;
}

.blog-card-eyebrow {
  margin: 0;
  color: var(--blog-accent-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.blog-card-body h3 {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.3;
}

.blog-card-body h3 a {
  color: var(--blog-ink);
  text-decoration: none;
}

.blog-card-body h3 a:hover {
  color: var(--blog-accent-dark);
}

.blog-card-desc {
  margin: 0;
  color: var(--blog-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.blog-card-meta {
  margin: 4px 0 0;
  color: var(--blog-faint);
  font-size: 0.84rem;
  font-weight: 600;
}

.blog-card-sep {
  margin: 0 8px;
  color: var(--blog-line);
}

.blog-empty {
  padding: 48px 24px;
  border: 1px dashed var(--blog-line);
  border-radius: var(--blog-radius);
  background: rgb(255 255 255 / 0.6);
  color: var(--blog-muted);
  text-align: center;
}

.blog-empty p {
  margin: 0;
}

/* ── Breadcrumbs ── */

.blog-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
  color: var(--blog-faint);
  font-size: 0.85rem;
  font-weight: 600;
}

.blog-breadcrumbs-post {
  max-width: var(--blog-post);
  margin-inline: auto;
}

.blog-crumb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--blog-faint);
  text-decoration: none;
  transition: color 0.15s ease;
}

.blog-crumb:hover {
  color: var(--blog-ink);
}

.blog-crumb-current {
  /* Show the full trail - wrap onto the next line when long rather than
     truncating with an ellipsis. The breadcrumbs container is flex-wrap. */
  color: var(--blog-ink);
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.blog-crumb-home {
  width: 15px;
  height: 15px;
}

.blog-crumb-sep {
  width: 14px;
  height: 14px;
  flex: none;
  color: #94a3b8;
}

[dir="rtl"] .blog-crumb-sep {
  transform: scaleX(-1);
}

/* ── Article ── */

.blog-article {
  max-width: var(--blog-post);
  margin-inline: auto;
}

.blog-article-header {
  max-width: var(--blog-read);
  margin: 0 auto 8px;
}

/* Post title - smaller than the listing/hero H1 for a calmer article header. */
.blog-article-header h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
}

/* Category chip lives inline in the meta row (first item, before the date). */
.blog-article-cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blog-accent-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.blog-article-cat:hover {
  color: var(--blog-ink);
}

.blog-article-cat-icon {
  display: inline-flex;
  color: var(--blog-accent);
}

.blog-article-cat-icon .blog-cat-icon {
  width: 15px;
  height: 15px;
}

.blog-article-meta,
.blog-article-window {
  color: var(--blog-faint);
  font-size: 0.9rem;
  font-weight: 600;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 16px 0 0;
}

.blog-article-window {
  margin: 8px 0 0;
  font-weight: 500;
}

.blog-hero-figure {
  margin: 28px auto;
  max-width: var(--blog-post);
}

.blog-hero-figure img,
.blog-article-body img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  background: #ffffff;
}

/* Table of contents */
.blog-toc {
  max-width: var(--blog-read);
  margin: 0 auto 8px;
  padding: 18px 22px;
  border: 1px solid var(--blog-line);
  border-inline-start: 3px solid var(--blog-accent);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.7);
}

.blog-toc-title {
  margin: 0 0 10px;
  color: var(--blog-ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.blog-toc ol {
  margin: 0;
  padding-inline-start: 1.1em;
  color: var(--blog-muted);
}

.blog-toc li {
  margin: 6px 0;
}

.blog-toc a {
  color: var(--blog-muted);
  text-decoration: none;
}

.blog-toc a:hover {
  color: var(--blog-accent-dark);
  text-decoration: underline;
}

.blog-article-body {
  color: var(--blog-slate);
  font-size: 1.06rem;
}

/* Text elements read at a comfortable measure; media spans the content column. */
.blog-article-body > p,
.blog-article-body > ul,
.blog-article-body > ol,
.blog-article-body > blockquote,
.blog-article-body > h2,
.blog-article-body > h3 {
  max-width: var(--blog-read);
  margin-inline: auto;
}

.blog-article-body h2 {
  margin: 40px auto 14px;
  color: var(--blog-ink);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  scroll-margin-top: 84px;
}

.blog-article-body h3 {
  margin: 26px auto 10px;
  color: var(--blog-ink);
  font-size: 1.24rem;
  font-weight: 700;
}

.blog-article-body p {
  margin: 0 auto 18px;
}

.blog-article-body ul,
.blog-article-body ol {
  margin: 0 auto 18px;
  padding-inline-start: 1.3em;
}

.blog-article-body li {
  margin: 6px 0;
}

.blog-article-body blockquote {
  padding: 4px 18px;
  border-inline-start: 3px solid var(--blog-accent);
  color: var(--blog-muted);
  font-style: italic;
}

.blog-article-body a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

/* Tables - brand data density (§5.1) */
.blog-article-body table {
  width: 100%;
  max-width: var(--blog-post);
  margin: 22px auto 28px;
  border-collapse: collapse;
  overflow-wrap: break-word;
  font-size: 0.9rem;
  border: 1px solid var(--blog-line);
  border-radius: 12px;
  overflow: hidden;
}

.blog-article-body th,
.blog-article-body td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--blog-line);
  text-align: start;
  vertical-align: top;
}

/* Notable-tenders tables: keep the Closing date on one line, but let the long
   prose "Why it is notable" column (always the LAST cell) wrap freely - a
   nowrap there forced the table wider than the page (horizontal scroll).
   The date is always the second-to-last column, at position 4 (5-col health
   table) or 5 (6-col weekly table); :nth-last-child(2) pins it in both while
   never matching the 2-column tables elsewhere on the page. */
.blog-article-body th:nth-child(4):nth-last-child(2),
.blog-article-body td:nth-child(4):nth-last-child(2),
.blog-article-body th:nth-child(5):nth-last-child(2),
.blog-article-body td:nth-child(5):nth-last-child(2) {
  white-space: nowrap;
}

.blog-article-body th {
  background: var(--blog-ink);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.blog-article-body tbody tr:nth-child(odd) td {
  background: #ffffff;
}

.blog-article-body tbody tr:nth-child(even) td {
  background: var(--blog-soft);
}

.blog-article-body tbody tr:last-child td {
  border-bottom: none;
}

/* ── Charts (inline HTML bars - no SVG, no JS) ── */

.blog-chart {
  /* full content width, shares the same left edge as the prose and header */
  margin: 26px 0 30px;
}

.blog-chart-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.blog-chart-title {
  color: var(--blog-ink);
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.blog-chart-sub {
  color: var(--blog-muted);
  font-size: 0.95rem;
}

.blog-chart-rows {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.blog-chart-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.blog-chart-label {
  color: var(--blog-slate);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.blog-chart-meter {
  display: flex;
  align-items: center;
  gap: 14px;
}

.blog-chart-track {
  flex: 1;
  min-width: 0;
  height: 26px;
  border-radius: 8px;
  background: rgb(8 51 68 / 0.06);
  overflow: hidden;
}

.blog-chart-bar {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #083344 0%, #06b6d4 100%);
}

[dir="rtl"] .blog-chart-bar {
  background: linear-gradient(270deg, #083344 0%, #06b6d4 100%);
}

.blog-chart-value {
  flex: none;
  min-width: 3ch;
  color: var(--blog-ink);
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: end;
}

/* ── CTA (inline + full) ── */

.blog-cta {
  position: relative;
  max-width: var(--blog-post);
  margin: 40px auto;
  padding: 34px 36px;
  border-radius: 20px;
  overflow: hidden;
  /* Ellipse glow extends past the corner so it fades with no visible edge,
     over a gradient that fully covers the panel. */
  background:
    radial-gradient(120% 130% at 100% 0%, rgb(6 182 212 / 0.3) 0%, transparent 62%),
    linear-gradient(120deg, #083344 0%, #0c4a5e 50%, #0e7490 100%);
  color: #ffffff;
  box-shadow: 0 24px 60px -22px rgba(8, 51, 68, 0.55);
}

.blog-cta-inline {
  margin: 34px auto;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.blog-cta-full {
  text-align: start;
}

.blog-cta-body {
  position: relative;
  z-index: 1;
}

/* Beats `.blog-article-body h2` specificity so the inline CTA title stays white */
.blog-cta .blog-cta-title,
.blog-article-body .blog-cta .blog-cta-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.blog-cta-subtitle {
  max-width: 620px;
  margin: 12px 0 0;
  color: rgb(255 255 255 / 0.82);
  font-size: 1rem;
}

.blog-cta-full .blog-cta-subtitle {
  margin-bottom: 24px;
}

/* Scoped under .blog-cta so the white text beats the generic .blog-page a color. */
.blog-cta .blog-cta-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 12px;
  /* Solid electric-blue brand fill (not a gradient); deepens to navy on hover. */
  background: var(--blog-accent);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px -8px rgba(6, 182, 212, 0.5);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.blog-cta .blog-cta-button:hover {
  background: var(--blog-ink);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(8, 51, 68, 0.55);
}

.blog-cta-arrow {
  font-weight: 800;
  transition: transform 0.2s ease;
}

.blog-cta-button:hover .blog-cta-arrow {
  transform: translateX(3px);
}

[dir="rtl"] .blog-cta-button:hover .blog-cta-arrow {
  transform: translateX(-3px);
}

/* ── Methodology / related / prev-next ── */

.blog-methodology {
  max-width: var(--blog-read);
  margin: 40px auto 0;
  padding: 22px 24px;
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  background: rgb(255 255 255 / 0.7);
}

.blog-methodology h2 {
  margin: 0 0 10px;
  color: var(--blog-ink);
  font-size: 1.1rem;
  font-weight: 700;
}

.blog-methodology p {
  margin: 0;
  color: var(--blog-muted);
  font-size: 0.95rem;
}

.blog-prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: var(--blog-post);
  margin: 40px auto 0;
}

.blog-pn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  background: var(--blog-card);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.blog-pn:hover {
  border-color: rgb(6 182 212 / 0.5);
  transform: translateY(-2px);
}

.blog-pn-next {
  text-align: end;
}

.blog-pn-dir {
  color: var(--blog-accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.blog-pn-title {
  color: var(--blog-ink);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

.blog-pn-slot {
  /* empty grid cell - keeps a lone prev/next aligned to its side */
  visibility: hidden;
}

.blog-related {
  max-width: var(--blog-frame);
  margin: 48px auto 0;
}

.blog-related h2 {
  margin: 0 0 20px;
  color: var(--blog-ink);
  font-size: 1.4rem;
  font-weight: 700;
}

/* ── Footer (ported from landing) ── */

.blog-footer {
  margin-top: 24px;
  background: var(--blog-ink);
  color: #94a3b8;
}

.blog-footer-inner {
  /* padding-block only - keep .blog-shell's inline padding so footer content
     doesn't hug the screen edges on mobile (a `padding: 40px 0` shorthand would
     zero the inline padding). */
  padding-block: 40px;
}

.blog-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

/* Mirror the header brand so the footer matches it: same logo size, weight and
   tracking. `.blog-footer` prefix also raises specificity above `.blog-page a`
   so the wordmark stays white, not the generic link blue. */
.blog-footer .blog-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.blog-footer-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.blog-footer-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 0.86rem;
}

.blog-footer-tagline {
  color: #cbd5e1;
}

.blog-footer-links a {
  color: #67e8f9;
  text-decoration: none;
}

.blog-footer-links a:hover {
  text-decoration: underline;
}

.blog-footer-copy {
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: 0.8rem;
  text-align: center;
}

/* ── Responsive ── */

@media (max-width: 760px) {
  :root {
    --blog-header-height: 59px;
  }

  body.blog-page {
    padding-top: calc(var(--blog-header-height) + env(safe-area-inset-top, 0px));
  }

  .blog-header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    padding-top: env(safe-area-inset-top, 0px);
  }

  .blog-header-inner {
    min-height: 58px;
    gap: 10px;
  }

  .blog-brand span {
    display: none;
  }

  .blog-nav {
    gap: 14px;
    font-size: 0.88rem;
  }

  .blog-dropdown {
    position: fixed;
    inset-inline: 17px;
    top: calc(var(--blog-header-height) + 8px);
    box-sizing: border-box;
    min-width: 0;
  }

  .blog-lang-btn span:not(.blog-lang-ar) {
    display: none;
  }

  .blog-lang-btn .blog-lang-ar {
    display: inline;
  }

  .blog-main {
    padding-block: 24px 56px;
  }

  .blog-article-body {
    font-size: 1.01rem;
  }

  .blog-article-header h1 {
    font-size: clamp(1.78rem, 8vw, 2.28rem);
    line-height: 1.12;
  }

  /* Only the wide notable-tenders tables (≥5 columns) scroll horizontally on
     phones. Smaller tables (2-col deadline windows, Q&A, category counts) keep
     display:table + width:100% so they fill the column instead of shrinking to
     their short content and looking cropped. */
  .blog-article-body table:has(td:nth-child(5)) {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Charts: smaller type so bars/labels stay legible (not oversized) on phones;
     labels are real text and wrap naturally to two lines when long. */
  .blog-chart-title {
    font-size: 1.08rem;
  }

  .blog-chart-sub,
  .blog-chart-label {
    font-size: 0.9rem;
  }

  .blog-chart-value {
    font-size: 0.92rem;
    min-width: 2.5ch;
  }

  .blog-chart-track {
    height: 22px;
  }

  .blog-chart-rows {
    gap: 15px;
  }

  .blog-chart-meter {
    gap: 10px;
  }

  .blog-cta {
    padding: 26px 22px;
  }

  .blog-cta-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .blog-prevnext {
    grid-template-columns: 1fr;
  }

  .blog-footer-inner {
    padding-block: 28px;
  }

  .blog-footer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-footer-copy {
    text-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ── Market hubs and public tools (src/seo/*) ─────────────────────────────── */
.hub-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.hub-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--blog-card);
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
}
.hub-kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--blog-ink);
  line-height: 1.1;
}
.hub-kpi-label {
  font-size: 0.875rem;
  color: var(--blog-muted);
}
.hub-note {
  font-size: 0.875rem;
  color: var(--blog-faint);
}
.hub-faq h3 {
  margin-bottom: 4px;
}
.hub-links,
.hub-related {
  margin-top: 32px;
}
.hub-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.hub-links-group h3 {
  font-size: 1rem;
  margin: 0 0 8px;
  color: var(--blog-ink);
}
.hub-links ul,
.hub-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.hub-links a,
.hub-related a {
  color: var(--blog-accent-dark);
  text-decoration: none;
}
.hub-links a:hover,
.hub-related a:hover {
  text-decoration: underline;
}
.hub-count {
  font-size: 0.8125rem;
  color: var(--blog-faint);
}
.hub-tool {
  display: grid;
  gap: 16px;
  padding: 20px;
  background: var(--blog-card);
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
}
.hub-tool fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.hub-tool legend,
.hub-field {
  font-weight: 600;
  color: var(--blog-slate);
}
.hub-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.hub-check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 400;
}
.hub-field {
  display: grid;
  gap: 6px;
}
.hub-field select,
.hub-field input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--blog-line);
  border-radius: 10px;
  background: #fff;
}
.hub-tool .blog-cta-button {
  justify-self: start;
  border: 0;
  cursor: pointer;
}
.hub-result {
  margin-top: 20px;
  padding: 20px;
  background: var(--blog-soft);
  border-radius: var(--blog-radius);
}
.hub-result-count {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blog-ink);
}
@media (max-width: 720px) {
  .hub-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.blog-cta-subtitle a {
  color: inherit;
  text-decoration: underline;
}
/* Tool form submit and result CTA reuse the CTA button look outside the CTA box. */
.hub-tool .blog-cta-button,
.hub-result .blog-cta-button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--blog-accent);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}
.hub-tool .blog-cta-button:hover,
.hub-result .blog-cta-button:hover {
  background: var(--blog-ink);
}
