@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap');

/*
Theme Name: SSIMOE Shadcn
Description: A lightweight, shadcn-inspired theme for SSIMOE.
Version: 1.5
*/

:root {
  color-scheme: dark;
  --background: #06121b;
  --foreground: #f1f5f9;
  --muted: #0b1924;
  --muted-foreground: #a7b5c2;
  --border: #243846;
  --primary: #60a5fa;
  --primary-foreground: #06121b;
  --radius: 0.5rem;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --nav-background: #06121b;
  --nav-border: #1b2c39;
  --nav-panel: #0b1924;
  --nav-hover: #122331;
  --nav-text: #f1f5f9;
  --nav-muted: #c2ccd5;
  --control-background: #0b1924;
  --control-border: #263b4b;
  --action-background: #112736;
  --action-border: #31516a;
  --action-hover: #19384b;
  --support-card-background: #0b1924;
  --support-card-text: #c2ccd5;
  --support-card-heading: #f8fafc;
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #0f172a;
  --muted: #f8fafc;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-foreground: #ffffff;
  --nav-background: #ffffff;
  --nav-border: #e2e8f0;
  --nav-panel: #ffffff;
  --nav-hover: #f1f5f9;
  --nav-text: #334155;
  --nav-muted: #64748b;
  --control-background: #ffffff;
  --control-border: #cbd5e1;
  --action-background: #f8fafc;
  --action-border: #cbd5e1;
  --action-hover: #f1f5f9;
  --support-card-background: #f8fafc;
  --support-card-text: #475569;
  --support-card-heading: #0f172a;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
  font-family: 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
  direction: rtl;
}

a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 1rem; }
.mt-8 { margin-top: 2rem; }

/* Compact dark navbar inspired by the reference. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--nav-text);
  background: var(--nav-background);
  border-bottom: 1px solid var(--nav-border);
}

.header-inner {
  width: 100%;
  max-width: none;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-right: 1.25rem;
  padding-left: 1.25rem;
}

.site-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.65rem;
  color: var(--nav-text);
  font-family: var(--font-sans);
  line-height: 1;
  transition: opacity 0.2s ease;
}

.site-logo-mark {
  display: block;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.site-logo-name {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--nav-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-logo-name.is-rtl {
  font-family: Arial, Tahoma, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

.site-logo:hover,
.site-logo:focus-visible {
  opacity: 0.88;
}

.main-nav {
  margin-left: 2.9rem;
}

html[dir="rtl"] .main-nav {
  direction: rtl;
}

html[dir="rtl"] .header-inner,
html[dir="rtl"] .header-actions {
  direction: ltr;
}

.main-nav ul.lean-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav ul.lean-menu > li {
  position: relative;
}

.main-nav ul.lean-menu > li > a {
  display: block;
  padding: 0.5rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  color: var(--nav-text);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.main-nav ul.lean-menu > li > a:hover,
.main-nav ul.lean-menu > li > a:focus-visible,
.main-nav ul.lean-menu > li.current-menu-item > a,
.main-nav ul.lean-menu > li.current_page_item > a,
.main-nav ul.lean-menu > li.current-menu-ancestor > a {
  color: var(--primary);
  background: transparent;
  border-color: transparent;
}

.submenu-toggle {
  display: none;
}

.header-control {
  display: inline-flex;
  min-width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  color: var(--nav-text);
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle {
  border-color: var(--control-border);
  border-radius: 999px;
  background: var(--control-background);
}

.header-control:hover,
.header-control:focus-visible,
.header-control[aria-expanded="true"] {
  background: var(--nav-hover);
  border-color: var(--control-border);
}

.header-control svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.theme-icon-light {
  display: none !important;
}

:root[data-theme="light"] .theme-icon-dark {
  display: none !important;
}

:root[data-theme="light"] .theme-icon-light {
  display: block !important;
}

.language-switcher {
  position: relative;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  direction: ltr;
}

.language-switch-label {
  color: var(--nav-muted);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  transition: color 0.15s ease;
}

.language-switch-label.is-current {
  color: var(--nav-text);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.language-switch-track {
  display: flex;
  width: 48px;
  height: 27px;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: #5e6265;
}

.language-switch-track > span {
  display: block;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.18s ease;
}

.language-switch[aria-pressed="true"] .language-switch-track > span {
  transform: translateX(21px);
}

.language-switch:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.language-extra {
  display: inline-flex;
  min-width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  padding: 0 0.3rem;
  border-radius: 0.25rem;
  color: var(--nav-muted);
  font-size: 0.6875rem;
  font-weight: 600;
}

.language-extra:hover,
.language-extra:focus-visible,
.language-extra.is-current {
  color: var(--nav-text);
  background: var(--nav-hover);
}

.main-nav ul.lean-menu > li > ul {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  display: none;
  min-width: 200px;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  background: var(--nav-panel);
  border: 1px solid var(--control-border);
  border-radius: 0.5rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

html[dir="rtl"] .main-nav ul.lean-menu > li > ul {
  right: 0;
  left: auto;
}

.main-nav ul.lean-menu > li > ul > li > a {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 0.3rem;
  color: var(--nav-muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.main-nav ul.lean-menu > li > ul > li > a:hover,
.main-nav ul.lean-menu > li > ul > li > a:focus-visible {
  color: var(--nav-text);
  background: var(--nav-hover);
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--action-border);
  border-radius: 0.5rem;
  color: var(--nav-text);
  background: var(--action-background);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--action-hover);
  border-color: var(--primary);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--control-border);
  border-radius: 0.5rem;
  color: var(--nav-text);
  background: var(--control-background);
  cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-toggle-icon {
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ssimoe-legacy-support {
  margin: 2rem 0;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--support-card-background);
  color: var(--support-card-text);
}

.ssimoe-legacy-support h2 {
  margin: 0 0 0.5rem;
  color: var(--support-card-heading);
  font-size: 1.25rem;
}

.ssimoe-legacy-support p {
  margin: 0 0 0.75rem;
}

.ssimoe-legacy-support a {
  color: #60a5fa;
  font-weight: 600;
}

html[data-theme="dark"] body {
  background-color: var(--background);
  color: var(--foreground);
}

html[data-theme="dark"] main [style*="background: white"],
html[data-theme="dark"] main [style*="background:white"],
html[data-theme="dark"] main [style*="background-color: white"],
html[data-theme="dark"] main [style*="background-color:white"] {
  color: #e2e8f0 !important;
  background-color: #0b1924 !important;
  border-color: #243846 !important;
}

html[data-theme="dark"] main [style*="background: white"] *,
html[data-theme="dark"] main [style*="background:white"] *,
html[data-theme="dark"] main [style*="background-color: white"] *,
html[data-theme="dark"] main [style*="background-color:white"] * {
  color: inherit !important;
}

html[data-theme="dark"] main [style*="background: white"] a,
html[data-theme="dark"] main [style*="background:white"] a,
html[data-theme="dark"] main [style*="background-color: white"] a,
html[data-theme="dark"] main [style*="background-color:white"] a {
  color: #93c5fd !important;
}

@media (min-width: 1101px) {
  .main-nav ul.lean-menu > li:hover > ul,
  .main-nav ul.lean-menu > li:focus-within > ul {
    display: block;
  }
}

@media (min-width: 1101px) and (max-width: 1450px) {
  .header-inner {
    flex-wrap: nowrap;
    gap: 0.65rem;
  }

  .main-nav {
    flex: 0 1 auto;
    margin-left: 2rem;
  }

  .header-actions {
    gap: 0.35rem;
    margin-left: auto;
  }

  .site-logo {
    gap: 0.5rem;
  }

  .site-logo-mark {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
  }

  .site-logo-name {
    font-size: 0.64rem;
    letter-spacing: 0.075em;
  }

  .site-logo-name.is-rtl {
    font-size: 0.88rem;
    letter-spacing: 0;
  }

  .main-nav ul.lean-menu > li > a {
    padding-right: 0.4rem;
    padding-left: 0.4rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 1100px) {
  .container {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .header-inner {
    min-height: 64px;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .site-logo {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-logo-mark {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .site-logo-name {
    font-size: clamp(0.62rem, 1.8vw, 0.8rem);
    letter-spacing: 0.05em;
    white-space: normal;
  }

  .site-logo-name.is-rtl {
    font-size: 0.8rem;
    letter-spacing: 0;
  }

  .site-logo-name > span {
    white-space: nowrap;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    margin: 0;
    padding: 0.5rem 1rem 0.75rem;
    background: var(--nav-background);
    border-bottom: 1px solid var(--nav-border);
  }

  html[dir="rtl"] .main-nav {
    direction: rtl;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul.lean-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .main-nav ul.lean-menu > li > a {
    padding: 0.7rem 0.75rem;
  }

  .main-nav ul.lean-menu > li.has-submenu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .main-nav ul.lean-menu > li.has-submenu > a {
    flex: 1 1 auto;
  }

  .submenu-toggle {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    color: var(--nav-muted);
    background: transparent;
    cursor: pointer;
  }

  .submenu-toggle:hover,
  .submenu-toggle:focus-visible {
    color: var(--nav-text);
    background: var(--nav-hover);
  }

  .submenu-toggle svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
    transition: transform 0.15s ease;
  }

  .submenu-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .main-nav ul.lean-menu > li > ul {
    display: none;
    flex: 0 0 100%;
    position: static;
    min-width: 0;
    margin: 0.25rem 0 0.5rem 0.75rem;
    box-shadow: none;
  }

  .main-nav ul.lean-menu > li.has-submenu.is-submenu-open > ul {
    display: block;
  }

  .main-nav {
    margin-left: 0;
  }

  .header-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-end;
    gap: 0.25rem;
  }

  .header-control {
    min-width: 32px;
    width: 32px;
    height: 34px;
    padding: 0;
  }

  .theme-toggle svg {
    width: 16px;
    height: 16px;
  }

  .language-switcher {
    gap: 0.2rem;
  }

  .language-switch-track {
    width: 42px;
    height: 24px;
    padding: 3px;
  }

  .language-switch-track > span {
    width: 18px;
    height: 18px;
  }

  .language-switch[aria-pressed="true"] .language-switch-track > span {
    transform: translateX(18px);
  }

  .btn-primary {
    min-height: 36px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8125rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .home-hero {
    padding: 2.5rem 0 !important;
  }

  .home-hero-title {
    font-size: clamp(2rem, 7vw, 2.5rem) !important;
    line-height: 1.12 !important;
    margin-bottom: 1rem !important;
  }

  .home-hero-copy {
    padding: 0 0.25rem;
    margin-bottom: 1.5rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }

  .home-hero-actions {
    flex-wrap: wrap;
    gap: 0.75rem !important;
  }

  .home-feature-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1rem !important;
    margin-top: 1rem !important;
  }

  .home-feature-card {
    min-width: 0;
    padding: 1.25rem !important;
  }
}

@media (min-width: 601px) and (max-width: 1100px) {
  .header-inner {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .site-logo {
    flex: 0 1 auto;
  }

  .site-logo-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .site-logo-name {
    font-size: clamp(0.5rem, 1.25vw, 0.68rem);
    letter-spacing: 0.035em;
  }

  .site-logo-name.is-rtl {
    font-size: clamp(0.7rem, 1.45vw, 0.8rem);
  }

  .header-actions {
    flex: 0 0 auto;
    width: auto;
  }
}

@media (max-width: 380px) {
  .site-logo {
    flex: 1 1 auto;
    gap: 0.45rem;
  }

  .site-logo-mark {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .site-logo-name {
    font-size: 0.56rem;
    letter-spacing: 0.045em;
  }

  .site-logo-name.is-rtl {
    font-size: 0.72rem;
  }

  .header-inner {
    gap: 0.25rem;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .header-actions {
    gap: 0.1rem;
  }

  .header-control {
    min-width: 28px;
    width: 28px;
    height: 32px;
  }

  .language-switcher {
    gap: 0.15rem;
  }

  .language-switch-track {
    width: 38px;
  }

  .language-switch[aria-pressed="true"] .language-switch-track > span {
    transform: translateX(14px);
  }

  .language-extra {
    min-width: 22px;
    padding: 0 0.2rem;
  }

  .nav-toggle {
    width: 34px;
    height: 34px;
  }

  .btn-primary {
    min-height: 34px;
    padding-right: 0.35rem;
    padding-left: 0.35rem;
    font-size: 0.75rem;
  }

  .home-hero {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .home-hero-title {
    font-size: 2rem !important;
  }

  .home-hero-actions a {
    padding: 0.65rem 0.9rem !important;
    font-size: 0.9rem !important;
  }
}

.site-footer {
  --footer-background: #0b1924;
  --footer-foreground: #f1f5f9;
  --footer-muted: #a7b5c2;
  --footer-border: #243846;
  position: relative;
  margin-top: 4rem;
  padding: 3.25rem 0 1.25rem;
  border-inline-start: 4px solid #82a57a;
  color: var(--footer-foreground);
  background: var(--footer-background);
}

:root[data-theme="light"] .site-footer {
  --footer-background: #f5f1e9;
  --footer-foreground: #181818;
  --footer-muted: #4b4945;
  --footer-border: #c9c1b5;
}

.site-footer-brand {
  margin-bottom: 2.5rem;
}

.site-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: inherit;
}

.site-footer-logo img {
  display: block;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
}

.site-footer-logo-name {
  display: flex;
  flex-direction: column;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-transform: uppercase;
}

.site-footer-logo-name.is-rtl {
  font-family: 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0;
  line-height: 1.8;
  text-transform: none;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-footer-section {
  min-width: 0;
  padding: 0 2rem;
}

.site-footer-section:first-child {
  padding-inline-start: 0;
}

.site-footer-section + .site-footer-section {
  border-inline-start: 1px solid var(--footer-border);
}

.site-footer-section h2 {
  margin: 0 0 0.75rem;
  color: var(--footer-foreground);
  font-size: 0.95rem;
  font-weight: 700;
}

.site-footer-section p,
.site-footer-section > a {
  display: block;
  margin: 0 0 0.45rem;
  color: var(--footer-foreground);
  font-size: 0.9rem;
}

.site-footer-section > a,
.site-footer-links a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-footer-section a:hover,
.site-footer-section a:focus-visible {
  color: #315e36;
}

:root:not([data-theme="light"]) .site-footer-section a:hover,
:root:not([data-theme="light"]) .site-footer-section a:focus-visible {
  color: #93c5fd;
}

.site-footer-links,
.site-footer-social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer-links a,
.site-footer-social li {
  color: var(--footer-foreground);
  font-size: 0.9rem;
}

.site-footer-note {
  margin-top: 0.85rem !important;
  color: var(--footer-muted) !important;
  font-size: 0.8rem !important;
}

.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--footer-border);
}

.site-footer-bottom p {
  margin: 0;
  color: var(--footer-muted);
  font-size: 0.8rem;
}

.site-footer-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.25rem;
  color: #fff;
  background: #111;
  font-size: 0.85rem;
  font-weight: 600;
}

.library-page {
  padding-bottom: clamp(3rem, 7vw, 6rem);
  background: var(--background);
}

.library-container {
  max-width: 1120px;
}

.library-intro {
  display: block;
  padding: clamp(3.5rem, 7vw, 6rem) 0 0;
}

.library-intro-copy {
  max-width: 720px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 1rem;
  line-height: 1.8;
}

.library-jump-nav {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.library-jump-nav a {
  white-space: nowrap;
}

.library-category-list {
  display: grid;
  gap: 1rem;
}

.library-category {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--muted);
  scroll-margin-top: 100px;
}

.library-category-heading {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.library-category-heading h2 {
  margin: 0 0 0.35rem;
  color: var(--foreground);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.35;
}

.library-category-heading p {
  max-width: 780px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.92rem;
  line-height: 1.7;
}

.library-document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.library-document {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--muted);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.library-document:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.library-document-type {
  display: inline-flex;
  margin-bottom: 0.75rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(96, 165, 250, 0.1);
  font-size: 0.72rem;
  font-weight: 700;
}

.library-document h3 {
  margin: 0 0 0.55rem;
  color: var(--foreground);
  font-size: 1.03rem;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.library-document > p {
  flex: 1;
  margin: 0 0 1.15rem;
  color: var(--muted-foreground);
  font-size: 0.86rem;
  line-height: 1.7;
}

.library-document-link,
.library-document-unavailable {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--action-border);
  border-radius: 0.35rem;
  color: var(--foreground);
  background: var(--action-background);
  font-size: 0.82rem;
  font-weight: 650;
}

.library-document-link:hover,
.library-document-link:focus-visible {
  border-color: var(--primary);
  background: var(--action-hover);
}

.library-document-unavailable {
  color: var(--muted-foreground);
}

.library-empty {
  margin: 0;
  padding: 1rem 1.2rem;
  border: 1px dashed var(--border);
  border-radius: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.library-contribute {
  scroll-margin-top: 90px;
}

.library-contribute > div > p:last-child {
  max-width: 650px;
  margin: 0;
  line-height: 1.8;
}

.library-section-heading {
  max-width: 850px;
  margin-bottom: 2rem;
}

@media (max-width: 850px) {
  .library-document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .library-document-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer-top:hover,
.site-footer-top:focus-visible {
  color: #fff;
  background: #315e36;
}

@media (max-width: 800px) {
  .site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2rem;
  }

  .site-footer-section:nth-child(3) {
    grid-column: 1 / -1;
    padding-inline-start: 0;
    border-inline-start: 0;
  }
}

@media (max-width: 560px) {
  .site-footer {
    padding-top: 2.5rem;
  }

  .site-footer-logo {
    gap: 0.75rem;
  }

  .site-footer-logo img {
    width: 58px;
    height: 58px;
  }

  .site-footer-logo-name {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
  }

  .site-footer-logo-name.is-rtl {
    font-size: 1rem;
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
    row-gap: 1.5rem;
  }

  .site-footer-section,
  .site-footer-section:first-child,
  .site-footer-section:nth-child(3) {
    grid-column: auto;
    padding: 1.25rem 0 0;
    border-top: 1px solid var(--footer-border);
    border-inline-start: 0;
  }

  .site-footer-bottom {
    align-items: flex-start;
    margin-top: 1.75rem;
  }
}

.home-page {
  margin: 0;
}

.home-hero {
  display: flex;
  min-height: min(680px, calc(100svh - 64px));
  align-items: center;
  padding: clamp(4rem, 9vw, 7rem) 0;
  color: #f1f5f9;
  background-color: #06121b;
  background-image: linear-gradient(90deg, rgba(6, 18, 27, 0.98) 0%, rgba(6, 18, 27, 0.91) 40%, rgba(6, 18, 27, 0.55) 70%, rgba(6, 18, 27, 0.22) 100%), url("assets/homepage-hero.jpg");
  background-position: center, right 42% center;
  background-repeat: no-repeat;
  background-size: cover, cover;
}

.home-hero-inner {
  width: 100%;
}

.home-hero-content {
  max-width: 700px;
}

.home-hero-eyebrow {
  margin: 0 0 1rem;
  color: #9ad2c5;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.home-hero-title {
  max-width: 700px;
  margin: 0 0 1.25rem;
  color: #fff;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.home-hero-copy {
  max-width: 620px;
  margin: 0 0 2rem;
  color: #d3dee6;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.75;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.home-hero-primary,
.home-hero-secondary {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.home-hero-primary {
  color: #06121b;
  background: #9ad2c5;
}

.home-hero-primary:hover,
.home-hero-primary:focus-visible {
  background: #b7e4d9;
  transform: translateY(-1px);
}

.home-hero-secondary {
  border-color: rgba(241, 245, 249, 0.55);
  color: #f1f5f9;
  background: rgba(6, 18, 27, 0.35);
}

.home-hero-secondary:hover,
.home-hero-secondary:focus-visible {
  border-color: #f1f5f9;
  background: rgba(241, 245, 249, 0.12);
}

:root[data-theme="light"] .home-hero {
  color: #0f172a;
  background-color: #e8f1f1;
  background-image: linear-gradient(90deg, rgba(248, 250, 252, 0.97) 0%, rgba(248, 250, 252, 0.91) 42%, rgba(248, 250, 252, 0.62) 70%, rgba(248, 250, 252, 0.2) 100%), url("assets/homepage-hero.jpg");
}

:root[data-theme="light"] .home-hero-title {
  color: #102333;
}

:root[data-theme="light"] .home-hero-eyebrow {
  color: #256b5a;
}

:root[data-theme="light"] .home-hero-copy {
  color: #344b5c;
}

:root[data-theme="light"] .home-hero-primary {
  color: #fff;
  background: #155e75;
}

:root[data-theme="light"] .home-hero-primary:hover,
:root[data-theme="light"] .home-hero-primary:focus-visible {
  background: #0e4d61;
}

:root[data-theme="light"] .home-hero-secondary {
  border-color: #64748b;
  color: #102333;
  background: rgba(255, 255, 255, 0.65);
}

:root[data-theme="light"] .home-hero-secondary:hover,
:root[data-theme="light"] .home-hero-secondary:focus-visible {
  border-color: #102333;
  background: #fff;
}

.home-trackers {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.home-trackers > h2 {
  margin: 0 0 1.5rem;
  color: var(--foreground);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 400;
  line-height: 1.15;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tracker-card {
  --tracker-card-bg: #b8e4e9;
  --tracker-card-text: #102333;
  --tracker-card-icon: #102333;
  position: relative;
  display: flex;
  min-height: 205px;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem;
  overflow: visible;
  border: 0;
  border-radius: 0.35rem;
  color: var(--tracker-card-text);
  background-color: var(--tracker-card-bg);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tracker-card:hover,
.tracker-card:focus-visible {
  color: var(--tracker-card-text);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  transform: translateY(-3px);
}

.tracker-card-prices {
  --tracker-card-bg: #b8e4e9;
}

.tracker-card-spending {
  --tracker-card-bg: #d5e7a5;
}

.tracker-card-library {
  --tracker-card-bg: #83aaf5;
}

.tracker-card-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: -1.9rem;
  margin-bottom: 1rem;
  border-radius: 0.3rem;
  color: #fff;
  background: #06121b;
}

.tracker-card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.tracker-card-title {
  margin-bottom: 0.55rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.tracker-card-description {
  max-width: 34rem;
  margin-bottom: 1rem;
  color: rgba(16, 35, 51, 0.8);
  font-size: 0.94rem;
  line-height: 1.55;
}

.tracker-card-action {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border-radius: 50%;
  color: #fff;
  background: #06121b;
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.tracker-card:hover .tracker-card-action,
.tracker-card:focus-visible .tracker-card-action {
  transform: translateX(3px);
}

:root[data-theme="dark"] .tracker-card-prices {
  --tracker-card-bg: #174451;
  --tracker-card-text: #f1f5f9;
  --tracker-card-icon: #f1f5f9;
}

:root[data-theme="dark"] .tracker-card-spending {
  --tracker-card-bg: #3d4b2b;
  --tracker-card-text: #f1f5f9;
  --tracker-card-icon: #f1f5f9;
}

:root[data-theme="dark"] .tracker-card-library {
  --tracker-card-bg: #293f69;
  --tracker-card-text: #f1f5f9;
  --tracker-card-icon: #f1f5f9;
}

:root[data-theme="dark"] .tracker-card-description {
  color: #d4e0e8;
}

:root[data-theme="dark"] .tracker-card-icon,
:root[data-theme="dark"] .tracker-card-action {
  color: #f1f5f9;
  background: #06121b;
}

html[dir="rtl"] .tracker-card-action {
  transform: scaleX(-1);
}

html[dir="rtl"] .tracker-card:hover .tracker-card-action,
html[dir="rtl"] .tracker-card:focus-visible .tracker-card-action {
  transform: scaleX(-1) translateX(3px);
}

@media (max-width: 800px) {
  .home-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tracker-card-library {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .home-hero {
    min-height: 570px;
    align-items: flex-end;
    padding: 3.5rem 0;
    background-image: linear-gradient(0deg, rgba(6, 18, 27, 0.98) 0%, rgba(6, 18, 27, 0.88) 47%, rgba(6, 18, 27, 0.2) 100%), url("assets/homepage-hero.jpg");
    background-position: center, center 35%;
  }

  :root[data-theme="light"] .home-hero {
    background-image: linear-gradient(0deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.91) 48%, rgba(248, 250, 252, 0.24) 100%), url("assets/homepage-hero.jpg");
  }

  .home-hero-content {
    max-width: none;
  }

  .home-hero-title {
    font-size: clamp(2.25rem, 11vw, 3.2rem) !important;
  }

  .home-hero-copy {
    font-size: 1rem;
  }

  .home-hero-actions {
    align-items: stretch;
  }

  .home-hero-primary,
  .home-hero-secondary {
    flex: 1 1 auto;
  }

  .home-feature-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .tracker-card-library {
    grid-column: auto;
  }
}

html[dir="rtl"] .home-hero {
  background-image: linear-gradient(270deg, rgba(6, 18, 27, 0.98) 0%, rgba(6, 18, 27, 0.91) 40%, rgba(6, 18, 27, 0.55) 70%, rgba(6, 18, 27, 0.22) 100%), url("assets/homepage-hero.jpg");
  background-position: center, left 42% center;
}

html[dir="rtl"] .home-hero-content {
  margin-left: auto;
  text-align: right;
}

html[dir="rtl"] .home-hero-title,
html[dir="rtl"] .home-hero-eyebrow,
html[dir="rtl"] .home-trackers > h2 {
  letter-spacing: 0;
}

html[dir="rtl"] .home-hero-primary > span {
  transform: scaleX(-1);
}

@media (max-width: 600px) {
  html[dir="rtl"] .home-hero {
    background-image: linear-gradient(0deg, rgba(6, 18, 27, 0.98) 0%, rgba(6, 18, 27, 0.88) 47%, rgba(6, 18, 27, 0.2) 100%), url("assets/homepage-hero.jpg");
    background-position: center, center 35%;
  }
}

.about-page {
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.about-eyebrow {
  margin: 0 0 0.85rem;
  color: #72c6b5;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.about-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.about-jump-nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--foreground);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.about-jump-nav a:hover,
.about-jump-nav a:focus-visible {
  border-color: var(--primary);
  background: var(--muted);
}

.about-content {
  padding-top: 0.25rem;
}

.about-section {
  display: block;
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 90px;
}

.about-section-heading {
  margin-bottom: 1.5rem;
}

.about-section-heading h2 {
  margin: 0;
  color: var(--foreground);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 400;
  line-height: 1.15;
}

.about-section-heading .about-eyebrow {
  color: var(--primary);
}

.about-section-copy {
  max-width: 720px;
  color: var(--muted-foreground);
  font-size: 1rem;
  line-height: 1.8;
}

.about-section-copy p {
  margin: 0 0 1rem;
}

.about-section-copy p:last-child {
  margin-bottom: 0;
}

.about-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.about-work-card.tracker-card {
  min-height: 230px;
  border-radius: 0.35rem;
}

.tracker-card-blogs {
  --tracker-card-bg: #f0c2a1;
}

:root[data-theme="dark"] .tracker-card-blogs {
  --tracker-card-bg: #684638;
  --tracker-card-text: #f1f5f9;
  --tracker-card-icon: #f1f5f9;
}

.about-work-card .tracker-card-title {
  font-size: 1.25rem;
}

.about-work-card .tracker-card-description {
  margin-bottom: 1rem;
  font-size: 0.94rem;
  line-height: 1.55;
}

.about-work-card.tracker-card-library .tracker-card-description,
.about-work-card.tracker-card-blogs .tracker-card-description {
  color: rgba(16, 35, 51, 0.82);
}

:root[data-theme="dark"] .about-work-card.tracker-card-library .tracker-card-description,
:root[data-theme="dark"] .about-work-card.tracker-card-blogs .tracker-card-description {
  color: #d4e0e8;
}

.about-mission-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.about-mission,
.about-values {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--muted);
  scroll-margin-top: 90px;
}

.about-mission h3,
.about-values > h3 {
  margin: 0 0 1rem;
  color: var(--foreground);
  font-size: 1.15rem;
}

.about-mission h4,
.about-values-intro h4 {
  margin: 1.1rem 0 0.35rem;
  color: var(--foreground);
  font-size: 0.98rem;
}

.about-mission p,
.about-values-intro p,
.about-values article p {
  margin: 0 0 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.about-mission-principles {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
  padding-inline-start: 1.25rem;
  color: var(--muted-foreground);
  line-height: 1.65;
}

.about-mission-conclusion {
  font-weight: 700;
}

.about-values article {
  display: flex;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: var(--background);
}

.about-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0.65rem;
}

.about-values > h3 {
  grid-column: 1 / -1;
}

.about-values-intro {
  grid-column: 1 / -1;
}

.about-values-intro p:last-child {
  margin-bottom: 0.25rem;
}

.about-values h4 {
  margin: 0 0 0.25rem;
  color: var(--foreground);
  font-size: 0.95rem;
}

.about-values article p {
  font-size: 0.88rem;
}

.about-corrections {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--primary);
  border-radius: 0.45rem;
  background: var(--background);
}

.about-corrections h3 {
  margin: 0 0 0.4rem;
  color: var(--foreground);
  font-size: 1rem;
}

.about-corrections > p {
  margin: 0 0 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.about-work-with-us h4 {
  margin: 0 0 0.5rem;
  color: var(--foreground);
}

.about-corrections a,
.about-inline-cta {
  display: inline-flex;
  margin-top: 0.6rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.about-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.about-team-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--muted);
  overflow: hidden;
}

.about-team-card > img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  object-position: center 25%;
  background: var(--muted);
}

.about-team-card-content {
  padding: 1.25rem;
}

.about-team-role {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-team-subrole {
  margin: 0 0 0.65rem;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  font-weight: 600;
}

.about-team-card h3 {
  margin: 0 0 0.75rem;
  color: var(--foreground);
  font-size: 1.25rem;
}

.about-team-card-content > p:not(.about-team-role):not(.about-team-subrole) {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.7;
}

.about-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(3rem, 7vw, 6rem);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid #31516a;
  border-radius: 0.75rem;
  color: #f1f5f9;
  background: linear-gradient(90deg, rgba(6, 18, 27, 0.96), rgba(6, 18, 27, 0.78)), url("assets/homepage-hero.jpg") center 42% / cover;
  scroll-margin-top: 90px;
}

.about-support .about-eyebrow {
  color: #9ad2c5;
}

.about-support h2 {
  margin: 0 0 0.65rem;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-weight: 400;
  line-height: 1.15;
}

.about-support p {
  max-width: 650px;
  margin: 0;
  color: #c9d6df;
  line-height: 1.7;
}

:root[data-theme="light"] .about-support {
  border-color: #c8d8dc;
  color: #102333;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.96), rgba(248, 250, 252, 0.82)), url("assets/homepage-hero.jpg") center 42% / cover;
}

:root[data-theme="light"] .about-support h2 {
  color: #102333;
}

:root[data-theme="light"] .about-support p {
  color: #3b5361;
}

:root[data-theme="light"] .about-support .about-eyebrow {
  color: #256b5a;
}

.about-team-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.about-team-topics li {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  font-size: 0.72rem;
}

.about-team-purpose {
  margin-top: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--muted);
}

.about-team-purpose h3 {
  margin: 0 0 0.5rem;
  color: var(--foreground);
}

.about-team-purpose p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.about-team-purpose .about-team-purpose-lead {
  margin-bottom: 0.5rem;
  color: var(--foreground);
  font-weight: 600;
}

.about-support-reasons {
  margin-top: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--muted);
}

.about-support-reasons .about-section-heading {
  margin-bottom: 0.75rem;
}

.about-support-reasons > p,
.about-support-grid p,
.about-support-summary p {
  color: var(--muted-foreground);
  line-height: 1.7;
}

.about-support-reasons > p {
  margin: 0;
}

.about-support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.about-support-grid article {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
}

.about-support-grid h3,
.about-support-summary h3 {
  margin: 0 0 0.5rem;
  color: var(--foreground);
  font-size: 1rem;
}

.about-support-grid p,
.about-support-summary p {
  margin: 0;
  font-size: 0.9rem;
}

.about-support-summary {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.about-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.about-contact-grid > div {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--muted);
}

.about-contact-grid h3 {
  margin: 0 0 0.5rem;
  color: var(--foreground);
  font-size: 0.9rem;
}

.about-contact-grid p,
.about-contact-grid a {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.about-contact-grid a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.about-contact-note {
  margin: 1rem 0 0;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.about-contact-note a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

html[dir="rtl"] .about-eyebrow,
html[dir="rtl"] .about-section-heading h2,
html[dir="rtl"] .about-support h2,
html[dir="rtl"] .about-team-role {
  letter-spacing: 0;
}

html[dir="rtl"] .about-card-link > span,
html[dir="rtl"] .about-inline-cta > span,
html[dir="rtl"] .about-support > a > span {
  transform: scaleX(-1);
}

@media (max-width: 760px) {
  .about-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-mission-content {
    grid-template-columns: 1fr;
  }

  .about-contact-grid {
    grid-template-columns: 1fr;
  }

  .about-team-grid {
    grid-template-columns: 1fr;
  }

  .about-support {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .about-values {
    grid-template-columns: 1fr;
  }

  .about-jump-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .about-jump-nav a {
    flex: 0 0 auto;
  }

  .about-work-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-work-card.tracker-card {
    min-height: 190px;
  }
}

.about-work-section .about-section-heading {
  max-width: 850px;
  margin-bottom: 2rem;
}

.about-work-section .about-section-heading h2,
.about-role-heading h2 {
  max-width: 800px;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
}

.about-section-intro {
  max-width: 760px;
  margin: 1.25rem 0 0;
  color: var(--muted-foreground);
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-work-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.about-contact-intro {
  margin-bottom: 1.5rem;
}

.about-work-card h3,
.about-reporting-callout h3 {
  margin: 0 0 0.75rem;
  color: inherit;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.about-work-card p,
.about-reporting-callout p {
  margin: 0 0 0.75rem;
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.88;
}

.about-work-card strong {
  font-weight: 700;
}

.about-card-topics {
  margin-top: auto;
  padding-top: 1rem;
  color: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.6;
  opacity: 0.75;
}

.about-work-card .tracker-card-action {
  margin-top: 0.75rem;
}

.about-why-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(250px, 0.7fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.about-why-layout .about-section-copy {
  max-width: 760px;
  font-size: 1.05rem;
}

.about-reporting-callout {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--muted);
}

.about-reporting-callout h3 {
  color: var(--foreground);
}

.about-reporting-callout p {
  color: var(--muted-foreground);
}

.about-reporting-callout .about-card-topics {
  display: block;
  color: var(--primary);
}

.about-role-heading {
  max-width: 850px;
  margin-bottom: 2rem;
}

.about-role-heading > p:last-child {
  max-width: 720px;
  margin: 1rem 0 0;
  color: var(--muted-foreground);
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.about-audience-grid article {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--muted);
}

.about-audience-grid h3 {
  margin: 0 0 0.5rem;
  color: var(--foreground);
  font-size: 1.1rem;
}

.about-audience-grid p {
  margin: 0;
  color: var(--muted-foreground);
  line-height: 1.65;
}

.about-library-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(3rem, 7vw, 6rem);
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid #31516a;
  border-radius: 0.65rem;
  color: #f1f5f9;
  background: linear-gradient(90deg, rgba(6, 18, 27, 0.96), rgba(6, 18, 27, 0.78)), url("assets/homepage-hero.jpg") center 42% / cover;
}

.about-library-cta h2 {
  margin: 0;
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-weight: 400;
}

.about-library-cta .about-eyebrow {
  color: #9ad2c5;
}

.about-library-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.about-library-actions .home-hero-primary {
  white-space: nowrap;
}

.about-contact-link {
  color: inherit;
  font-weight: 600;
  text-underline-offset: 0.2em;
}

:root[data-theme="light"] .about-library-cta {
  border-color: #c8d8dc;
  color: #102333;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.96), rgba(248, 250, 252, 0.82)), url("assets/homepage-hero.jpg") center 42% / cover;
}

:root[data-theme="light"] .about-library-cta .about-eyebrow {
  color: #256b5a;
}

.blog-hero {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  color: #f1f5f9;
  background:
    linear-gradient(90deg, rgba(6, 18, 27, 0.98), rgba(6, 18, 27, 0.78)),
    url("assets/homepage-hero.jpg") center 42% / cover;
}

.blog-hero-content {
  max-width: 1200px;
}

.blog-hero h1 {
  max-width: 760px;
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.blog-hero-content > p:last-child {
  max-width: 650px;
  margin: 0;
  color: #d3dee6;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.75;
}

:root[data-theme="light"] .blog-hero {
  color: #102333;
  background:
    linear-gradient(90deg, rgba(248, 250, 252, 0.97), rgba(248, 250, 252, 0.82)),
    url("assets/homepage-hero.jpg") center 42% / cover;
}

:root[data-theme="light"] .blog-hero h1 {
  color: #102333;
}

:root[data-theme="light"] .blog-hero-content > p:last-child {
  color: #344b5c;
}

.blog-listing {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(4rem, 7vw, 6rem);
}

.blog-listing-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.blog-listing-heading .about-eyebrow {
  color: var(--primary);
}

.blog-listing-heading h2 {
  margin: 0;
  color: var(--foreground);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  font-weight: 400;
}

.blog-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.blog-post-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--muted);
}

.blog-post-card.is-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.blog-post-image {
  display: block;
  min-height: 220px;
  overflow: hidden;
  background: var(--background);
}

.blog-post-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.blog-post-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.blog-post-category {
  color: var(--primary);
  font-weight: 700;
}

.blog-post-content h2 {
  margin: 0.85rem 0 0.4rem;
  color: var(--foreground);
  font-size: clamp(1.2rem, 2.1vw, 1.65rem);
  line-height: 1.3;
}

.blog-post-content h2 a:hover,
.blog-post-content h2 a:focus-visible {
  color: var(--primary);
}

.blog-post-author,
.single-post-author {
  margin: 0 0 0.9rem;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.blog-post-excerpt {
  margin: 0 0 1.25rem;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  line-height: 1.75;
}

.blog-translation-pending {
  margin: 0 0 1.25rem;
  color: var(--muted-foreground);
  font-size: 0.85rem;
  font-weight: 600;
}

.blog-translation-notice {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--muted);
}

.blog-translation-notice h2 {
  margin: 0 0 0.5rem;
  color: var(--foreground);
  font-size: 1.2rem;
}

.blog-translation-notice p {
  margin: 0 0 1rem;
  color: var(--muted-foreground);
}

.blog-translation-notice a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  color: var(--primary);
  font-weight: 700;
}

.blog-read-more span {
  transition: transform 0.15s ease;
}

.blog-read-more:hover span,
.blog-read-more:focus-visible span {
  transform: translateX(3px);
}

.blog-empty {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--muted-foreground);
  background: var(--muted);
}

.blog-listing .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.blog-listing .page-numbers {
  display: inline-flex;
  min-width: 2.5rem;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  color: var(--foreground);
}

.blog-listing .page-numbers.current,
.blog-listing .page-numbers:hover,
.blog-listing .page-numbers:focus-visible {
  border-color: var(--primary);
  background: var(--muted);
}

.single-post-page {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(4rem, 7vw, 6rem);
}

.single-post-page > .single-post {
  max-width: 920px;
}

.single-post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--primary);
  font-weight: 600;
}

.single-post-header h1 {
  margin: 1rem 0 0.75rem;
  color: var(--foreground);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.single-post-image {
  max-height: 560px;
  margin-top: 2rem;
  overflow: hidden;
  border-radius: 0.6rem;
  background: var(--muted);
}

.single-post-image img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.single-post-body {
  max-width: 760px;
  margin: 2.5rem auto 0;
  color: var(--foreground);
  font-size: 1.05rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.single-post-body > * {
  max-width: 100%;
}

.single-post-body h2,
.single-post-body h3,
.single-post-body h4 {
  margin-top: 2.25rem;
  color: var(--foreground);
  line-height: 1.3;
}

.single-post-body p,
.single-post-body li {
  color: var(--muted-foreground);
}

.single-post-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.single-post-body img,
.single-post-body iframe,
.single-post-body video {
  max-width: 100%;
  height: auto;
}

.single-post-pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 760px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.single-post-pagination a {
  color: var(--primary);
  font-weight: 600;
}

html[dir="rtl"] .blog-hero h1,
html[dir="rtl"] .blog-post-content,
html[dir="rtl"] .single-post {
  letter-spacing: 0;
}

html[dir="rtl"] .blog-read-more:hover span,
html[dir="rtl"] .blog-read-more:focus-visible span {
  transform: translateX(-3px);
}

@media (max-width: 760px) {
  .blog-post-card.is-featured {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .blog-hero {
    padding: 3.5rem 0;
    background-position: center, center 35%;
  }

  .blog-post-grid {
    grid-template-columns: 1fr;
  }

  .blog-post-card.is-featured {
    grid-column: auto;
  }

  .single-post-pagination {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .about-why-layout {
    grid-template-columns: 1fr;
  }

  .about-audience-grid {
    grid-template-columns: 1fr;
  }

  .about-support-grid {
    grid-template-columns: 1fr;
  }

  .about-library-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .about-work-grid {
    grid-template-columns: 1fr;
  }

  .about-work-card {
    min-height: 270px;
  }

  .about-library-actions .home-hero-primary {
    white-space: normal;
  }
}

body.blog {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
}

body.blog > .site-header,
body.blog > .blog-page,
body.blog > .site-footer {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.publications-page,
.single-publication-page,
.methodology-page {
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.publications-content,
.methodology-sections {
  max-width: 1120px;
  margin-inline: auto;
}

.publications-content {
  padding-top: clamp(2rem, 4vw, 3.5rem);
}

.publications-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.28fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.publications-sidebar {
  position: sticky;
  top: 90px;
  padding-top: 1.5rem;
}

.publications-sidebar h2 {
  margin: 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 400;
}

.publications-sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.publications-sidebar li {
  border-bottom: 1px solid var(--border);
}

.publications-sidebar a {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.publications-sidebar a:hover,
.publications-sidebar .is-active a {
  color: var(--primary);
}

.publications-main {
  min-width: 0;
}

.publications-release-calendar {
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.publications-release-calendar h2,
.publications-release-calendar p {
  margin: 0;
}

.publications-release-calendar h2,
.methodology-sections h2,
.single-publication h2 {
  color: var(--foreground);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
}

.publications-release-calendar p {
  color: var(--muted-foreground);
  line-height: 1.7;
}

.publications-release-calendar p + p {
  grid-column: 2;
}

.publications-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 1rem;
  padding: 1.5rem 0;
}

.publications-filters h2 {
  width: 100%;
  margin: 0;
  color: var(--foreground);
  font-size: 1rem;
}

.publications-filters label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted-foreground);
  font-size: 0.85rem;
  font-weight: 600;
}

.publications-filters select {
  min-width: 190px;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--control-border);
  border-radius: 0.4rem;
  color: var(--foreground);
  background: var(--control-background);
  font: inherit;
}

.publications-filters .home-hero-primary {
  min-height: 44px;
  margin: 0;
  cursor: pointer;
}

.publications-clear-filter {
  padding: 0.65rem 0;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.publications-list {
  border-top: 1px solid var(--border);
}

.publication-list-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem) 0;
  border-bottom: 1px solid var(--border);
}

.publication-list-thumbnail {
  display: block;
  width: 96px;
  aspect-ratio: 0.72;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--background);
}

.publication-list-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.publication-metadata p time {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.publication-thumbnail-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: var(--muted);
}

.publication-thumbnail-placeholder svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.publication-list-main time,
.single-publication-header time {
  display: block;
  margin-top: 0.65rem;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.publication-type-tag {
  display: inline-flex;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  color: var(--primary);
  background: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.publication-list-item h2 {
  margin: 0.5rem 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.3;
}

.publication-list-item h2 a {
  color: var(--foreground);
}

.publication-metadata {
  margin-bottom: 0.5rem;
}

.publication-metadata p {
  margin: 0.15rem 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.publication-metadata p strong {
  color: var(--foreground);
  font-weight: 600;
}

.publication-metadata .publication-type-tag {
  padding: 0;
  color: var(--foreground);
  background: none;
  font-size: inherit;
  font-weight: 600;
}

.publication-list-item p,
.single-publication-key-message p,
.single-publication-citation p,
.methodology-sections p,
.methodology-sections dd {
  color: var(--muted-foreground);
  line-height: 1.75;
}

.publication-list-item p {
  max-width: 760px;
  margin: 0;
}

.publication-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.publication-download-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--action-border);
  border-radius: 0.4rem;
  color: var(--foreground);
  background: var(--action-background);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.publication-download-button:hover,
.publication-download-button:focus-visible {
  border-color: var(--primary);
  background: var(--action-hover);
}

.publication-download-button.is-secondary {
  color: var(--muted-foreground);
}

.publications-empty {
  margin: 0;
  padding: 2rem 0;
  color: var(--muted-foreground);
}

.publications-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.publications-pagination a,
.publications-pagination span {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  color: var(--foreground);
}

.publications-pagination .current {
  color: var(--primary-foreground);
  background: var(--primary);
}

.single-publication-page {
  max-width: 1000px;
}

.single-publication {
  max-width: 820px;
  margin-inline: auto;
  padding-top: clamp(2rem, 5vw, 4rem);
}

.publication-back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--primary);
  font-weight: 600;
}

.single-publication-header h1 {
  margin: 0.75rem 0;
  color: var(--foreground);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.single-publication-metadata {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.1rem;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.single-publication-metadata p {
  margin: 0;
}

.single-publication-metadata p strong {
  color: var(--foreground);
}

.single-publication-cover {
  margin-top: 1.5rem;
}

.single-publication-cover img {
  display: block;
  max-width: min(100%, 260px);
  height: auto;
  border: 1px solid var(--border);
}

.single-publication-key-message,
.single-publication-citation,
.single-publication-related {
  margin-top: 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--muted);
}

.single-publication-key-message h2,
.single-publication-citation h2,
.single-publication-related h2 {
  margin: 0 0 0.75rem;
}

.single-publication-key-message p,
.single-publication-citation p {
  margin: 0;
}

.single-publication-content {
  margin-top: 2rem;
  color: var(--foreground);
  line-height: 1.8;
}

.single-publication-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.single-publication-downloads .home-hero-primary,
.single-publication-downloads .home-hero-secondary {
  min-height: 46px;
  margin: 0;
}

.publication-methodology-link {
  margin-top: 1.5rem;
  font-weight: 600;
}

.publication-methodology-link a {
  color: var(--primary);
}

.single-publication-related ul {
  margin: 0;
  padding-inline-start: 1.2rem;
}

.single-publication-related a {
  color: var(--primary);
}

.methodology-page {
  max-width: 100%;
}

.methodology-hero {
  min-height: 520px;
}

.methodology-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: clamp(2rem, 5vw, 4rem);
}

.methodology-sections section {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--muted);
  scroll-margin-top: 90px;
}

.methodology-sections section:first-child,
.methodology-sections section:last-child {
  grid-column: 1 / -1;
}

.methodology-sections h2 {
  margin: 0 0 0.75rem;
}

.methodology-sections p {
  margin: 0 0 0.8rem;
}

.methodology-sections p:last-child {
  margin-bottom: 0;
}

.methodology-sections dl {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
  gap: 0.35rem 1rem;
  margin: 1rem 0 0;
}

.methodology-sections dt {
  color: var(--foreground);
  font-weight: 700;
}

.methodology-sections dd {
  margin: 0;
}

.methodology-sections a {
  color: var(--primary);
}

.home-latest-publication {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.data-dashboards {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.data-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.data-page {
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.data-content {
  max-width: 1120px;
  margin-inline: auto;
}

.data-dashboard-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 90px;
}

.data-section-heading {
  max-width: 860px;
  margin-bottom: 1.5rem;
}

.data-section-intro {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--muted-foreground);
  line-height: 1.75;
}

.data-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}

.data-summary-card {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--muted);
}

.data-summary-card p,
.data-summary-card span {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.data-summary-card strong {
  color: var(--foreground);
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.data-summary-primary {
  border-color: #b8e4e9;
  background: #b8e4e9;
  color: #102333;
}

.data-summary-primary p,
.data-summary-primary span,
.data-summary-primary strong {
  color: #102333;
}

:root[data-theme="dark"] .data-summary-primary {
  border-color: #174451;
  background: #174451;
}

:root[data-theme="dark"] .data-summary-primary p,
:root[data-theme="dark"] .data-summary-primary span,
:root[data-theme="dark"] .data-summary-primary strong {
  color: #f1f5f9;
}

.data-panel {
  margin-top: 1rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--muted);
}

.data-components-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.data-components-grid .data-panel {
  margin-top: 0;
}

.data-panel-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.data-panel-heading h3 {
  margin: 0 0 0.35rem;
  color: var(--foreground);
  font-size: 1.1rem;
}

.data-panel-heading p,
.data-inline-note,
.data-method-note {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
  line-height: 1.65;
}

.data-source-tag {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.data-chart-scroll,
.data-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.data-trend-chart {
  display: grid;
  grid-template-columns: repeat(10, minmax(62px, 1fr));
  align-items: end;
  gap: 0.5rem;
  min-width: 740px;
  padding: 1.25rem 0 0.25rem;
}

.data-trend-column {
  display: flex;
  min-width: 0;
  height: 205px;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 0.35rem;
  text-align: center;
}

.data-trend-value,
.data-trend-month,
.data-trend-change {
  color: var(--muted-foreground);
  font-size: 0.68rem;
  white-space: nowrap;
}

.data-trend-value {
  color: var(--foreground);
  font-weight: 600;
}

.data-trend-track {
  display: flex;
  width: 100%;
  height: 125px;
  align-items: end;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to top, transparent 24%, var(--border) 25%, transparent 26%, transparent 49%, var(--border) 50%, transparent 51%, transparent 74%, var(--border) 75%, transparent 76%);
}

.data-trend-track span {
  display: block;
  width: min(34px, 60%);
  min-height: 3px;
  border-radius: 0.3rem 0.3rem 0 0;
  background: #174451;
}

:root[data-theme="dark"] .data-trend-track span {
  background: #9ad2c5;
}

.data-method-note {
  margin-top: 0.75rem;
}

.data-method-note a {
  color: var(--primary);
  font-weight: 600;
}

.data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: var(--foreground);
  background: var(--background);
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}

.data-table th {
  color: var(--foreground);
  background: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.data-table td {
  color: var(--muted-foreground);
}

.data-table .data-number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table-compact {
  min-width: 470px;
}

.budget-data-table {
  min-width: 1100px;
  font-size: 0.78rem;
}

.budget-data-table th,
.budget-data-table td {
  padding: 0.55rem 0.6rem;
}

.data-inline-note {
  margin-top: 0.75rem;
}

.data-sources-panel {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--muted);
}

.data-sources-panel h2 {
  margin: 0 0 0.75rem;
  color: var(--foreground);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
}

.data-sources-panel p,
.data-sources-panel li {
  color: var(--muted-foreground);
  line-height: 1.7;
}

.data-sources-panel details {
  margin-top: 0.75rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}

.data-sources-panel summary {
  color: var(--foreground);
  font-weight: 700;
  cursor: pointer;
}

.data-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.data-download-actions .home-hero-primary,
.data-download-actions .home-hero-secondary {
  margin: 0;
}

.home-latest-snapshot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.5rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--border);
}

.home-latest-snapshot h2 {
  margin: 0 0 0.5rem;
  color: var(--foreground);
  font-size: 1.25rem;
}

.home-latest-snapshot p:not(.about-eyebrow) {
  margin: 0;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.home-latest-snapshot .home-hero-secondary {
  margin: 0;
  flex: 0 0 auto;
}

.home-latest-publication .publication-type-tag {
  margin-bottom: 0.5rem;
}

.home-latest-publication h2 {
  margin: 0.25rem 0 0.75rem;
  color: var(--foreground);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.home-latest-publication h2 a {
  color: inherit;
}

.home-latest-publication > p:not(.home-hero-eyebrow) {
  max-width: 680px;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.home-latest-publication .home-hero-secondary {
  margin-top: 0.25rem;
}

html[dir="rtl"] .single-publication-header h1 {
  letter-spacing: 0;
}

@media (max-width: 760px) {
  .publications-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .publications-sidebar {
    position: static;
    padding-top: 0;
  }

  .publications-sidebar ul {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding: 0.35rem 0 0.6rem;
  }

  .publications-sidebar li {
    flex: 0 0 auto;
    border: 0;
  }

  .publications-sidebar a {
    min-height: 36px;
    padding: 0 0.65rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: nowrap;
  }

  .publication-list-item {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 0.8rem;
  }

  .publication-list-thumbnail {
    width: 80px;
    grid-row: span 2;
  }

  .publication-downloads {
    grid-column: 2;
  }

  .publications-main {
    width: 100%;
  }

  .publications-release-calendar {
    grid-template-columns: 1fr;
  }

  .publications-release-calendar p + p {
    grid-column: auto;
  }

  .methodology-sections {
    grid-template-columns: 1fr;
  }

  .methodology-sections section:first-child,
  .methodology-sections section:last-child {
    grid-column: auto;
  }

  .data-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .data-components-grid {
    grid-template-columns: 1fr;
  }

  .home-latest-snapshot {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .publications-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .publications-filters label,
  .publications-filters select,
  .publications-filters .home-hero-primary {
    width: 100%;
  }

  .methodology-sections dl {
    grid-template-columns: 1fr;
  }

  .publication-list-item {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0.65rem;
  }

  .publication-list-thumbnail {
    width: 64px;
  }

  .publication-downloads {
    grid-column: 1 / -1;
  }
}
