/* ============================================
   NashMark AI - NHS Sovereign AI Architecture
   Accessible | Mobile-first | Animated
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0a0e17;
  color: #c8d0dc;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

:root {
  --site-max-width: 1320px;
  --site-gutter: clamp(16px, 4vw, 48px);
}

/* ========== MAIN CONTAINER ========== */
.main_page {
  width: min(var(--site-max-width), calc(100% - (var(--site-gutter) * 2)));
  max-width: none;
  margin: 0 auto;
  padding: 0 0 48px;
}

/* ========== NAVBAR ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1a2236;
}

.navbar-inner {
  width: min(var(--site-max-width), calc(100% - (var(--site-gutter) * 2)));
  max-width: none;
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 10px;
}

.brand-text {
  font-size: 0.85rem;
  color: #8b95a8;
  letter-spacing: 2px;
  font-weight: 500;
}

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background: #00d4ff;
  transition: all 0.3s;
  border-radius: 1px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-links a {
  color: #8b95a8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  padding: 8px 0;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: #00d4ff;
}

/* Mobile nav overlay */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: #0d111a;
    border-left: 1px solid #1e2d45;
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 8px;
    transition: right 0.3s ease;
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.2rem;
    padding: 16px 0;
    border-bottom: 1px solid #1e2d45;
    width: 100%;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
  }

  .nav-overlay.open {
    display: block;
  }
}

/* ========== ANIMATED LOGO ========== */
.logo-animated {
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(0,212,255,0.3)); }
  50% { filter: drop-shadow(0 0 20px rgba(0,212,255,0.6)); }
}

.logo-node {
  animation: nodeFloat 4s ease-in-out infinite;
}

.logo-node:nth-child(2) { animation-delay: 0s; }
.logo-node:nth-child(3) { animation-delay: 0.5s; }
.logo-node:nth-child(4) { animation-delay: 1s; }
.logo-node:nth-child(5) { animation-delay: 1.5s; }
.logo-node:nth-child(6) { animation-delay: 2s; }
.logo-node:nth-child(7) { animation-delay: 0.3s; }
.logo-node:nth-child(8) { animation-delay: 0.8s; }
.logo-node:nth-child(9) { animation-delay: 1.3s; }
.logo-node:nth-child(10) { animation-delay: 1.8s; }

@keyframes nodeFloat {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.logo-line {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawLine 2s ease forwards;
}

.logo-line:nth-child(11) { animation-delay: 0.1s; }
.logo-line:nth-child(12) { animation-delay: 0.2s; }
.logo-line:nth-child(13) { animation-delay: 0.3s; }
.logo-line:nth-child(14) { animation-delay: 0.4s; }
.logo-line:nth-child(15) { animation-delay: 0.5s; }

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

/* ========== HERO ========== */
.hero-section {
  text-align: center;
  padding: 60px 0 48px;
}

.hero-section h1 {
  font-size: 3.2rem;
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-section .subtitle {
  font-size: 1.1rem;
  color: #8b95a8;
  max-width: 520px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.hero-formula {
  display: inline-block;
  background: #111827;
  border: 1px solid #1e2d45;
  padding: 14px 32px;
  margin-bottom: 24px;
}

.hero-formula code {
  color: #00d4ff;
  font-size: 1.3rem;
}

/* ========== BUTTONS ========== */
.btn-cyan {
  display: inline-block;
  background: #00d4ff;
  color: #0a0e17;
  padding: 14px 32px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 4px;
  transition: all 0.2s;
  border: 2px solid #00d4ff;
  cursor: pointer;
}

.btn-cyan:hover {
  background: transparent;
  color: #00d4ff;
}

/* ========== NHS CARD ========== */
.nhs_card {
  margin: 32px 0;
  border: 2px solid #00d4ff;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.06) 0%, rgba(0, 50, 80, 0.1) 100%);
  text-align: left;
  padding: 28px;
  position: relative;
}

.nhs_card_title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #00d4ff;
}

.nhs_card_subtitle {
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 16px;
  color: white;
}

.nhs_card_desc {
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.7;
  color: #c8d0dc;
}

.nhs_card_arch {
  background: rgba(0, 0, 0, 0.35);
  border-left: 4px solid #00d4ff;
  padding: 18px 22px;
  margin: 18px 0;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.8;
  color: white;
}

.nhs_card_arch_step {
  margin: 4px 0;
  padding-left: 8px;
}

.nhs_card_arch_arrow {
  color: #00d4ff;
  font-weight: bold;
}

a.nhs_card_link {
  display: inline-block;
  background: #00d4ff;
  color: #0a0e17;
  padding: 14px 28px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 16px;
  border-radius: 4px;
  transition: all 0.2s;
  border: 2px solid #00d4ff;
}

a.nhs_card_link:hover {
  background: transparent;
  color: #00d4ff;
}

/* ========== SECTION HEADERS ========== */
.section-heading {
  text-align: center;
  margin-bottom: 36px;
}

.section-heading h2 {
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.section-heading p {
  font-size: 1rem;
  color: #8b95a8;
}

/* ========== CARDS ========== */
.cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cards-row-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.card-box {
  border: 1px solid #1e2d45;
  background: #0d111a;
  padding: 24px;
  transition: border-color 0.2s;
}

.card-box:hover {
  border-color: #00d4ff;
}

.card-box h3 {
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 12px;
}

.card-box h3.cyan {
  color: #00d4ff;
}

.card-box p {
  font-size: 0.95rem;
  color: #8b95a8;
  line-height: 1.6;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link:focus {
  outline: 2px solid #00d4ff;
  outline-offset: 3px;
}

/* Arch cards (numbered link cards) */
a.arch_card {
  display: block;
  text-align: left;
  border: 1px solid #1e2d45;
  background: #0d111a;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

a.arch_card:hover {
  border-color: #00d4ff;
  background: #111827;
  transform: translateY(-2px);
}

.arch_card_inner {
  padding: 24px;
}

.arch_card_number {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2.8rem;
  font-weight: bold;
  color: #00d4ff;
  opacity: 0.1;
  line-height: 1;
}

a.arch_card:hover .arch_card_number {
  opacity: 0.2;
}

.arch_card_title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #00d4ff;
  margin-bottom: 12px;
  padding-right: 40px;
}

.arch_card_body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #8b95a8;
  margin-bottom: 12px;
}

.arch_card_chapters {
  font-size: 0.85rem;
  color: #7aa1ff;
  font-style: italic;
  margin-bottom: 12px;
}

.arch_card_link_text {
  font-weight: 600;
  color: #00d4ff;
  font-size: 0.95rem;
}

a.arch_card:hover .arch_card_link_text {
  color: #ffffff;
}

/* ========== FLOW DIAGRAM ========== */
.flow_section {
  border: 1px solid #1e2d45;
  background: #0d111a;
  padding: 28px;
  margin: 32px 0;
}

.flow_diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.flow_step {
  background: #111827;
  border: 1px solid #1e2d45;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #c8d0dc;
  text-align: center;
  width: 100%;
  max-width: 480px;
}

.flow_step_highlight {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(0, 50, 80, 0.2) 100%);
  color: #00d4ff;
  border-color: #00d4ff;
}

.flow_step em {
  color: #8b95a8;
  font-weight: 400;
}

.flow_arrow {
  color: #00d4ff;
  font-size: 1.3rem;
  font-weight: bold;
}

/* ========== FINAL RULE ========== */
.final_rule {
  margin: 32px 0;
  border-left: 4px solid #00d4ff;
  background: rgba(0, 212, 255, 0.05);
  padding: 20px 24px;
}

.final_rule_text {
  font-size: 1.05rem;
  color: #ffffff;
  font-weight: 500;
}

/* ========== TWO COLUMN ========== */
.two_col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* ========== EQ BOX ========== */
.eq-box {
  border: 1px solid #1e2d45;
  background: #0d111a;
  padding: 32px;
  text-align: center;
}

.eq-box .eq-label {
  font-size: 0.85rem;
  color: #c5d9ff;
  margin-bottom: 20px;
}

.eq-box .eq-formula {
  font-size: 1.6rem;
  color: #00d4ff;
  font-weight: 300;
  margin-bottom: 24px;
}

.eq-box .eq-terms {
  text-align: left;
  font-size: 0.9rem;
  color: #8b95a8;
  margin-bottom: 20px;
}

.eq-box .eq-conclusion {
  border-top: 1px solid #1e2d45;
  padding-top: 16px;
  font-size: 0.95rem;
  color: #c8d0dc;
}

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid #1a2236;
  background: #0d111a;
  padding: 28px 24px;
  text-align: center;
}

.footer-inner {
  width: min(var(--site-max-width), calc(100% - (var(--site-gutter) * 2)));
  max-width: none;
  margin: 0 auto;
  font-size: 0.9rem;
  color: #5a6580;
}

/* ========== PAGE HEADERS (subpages) ========== */
.page_header_compact {
  padding: 40px 0 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #1a2236;
}

.page_header_compact .label {
  font-size: 0.9rem;
  color: #5a6580;
  margin-bottom: 8px;
}

.page_header_compact h1 {
  font-size: 2.2rem;
  font-weight: 300;
  color: #ffffff;
  line-height: 1.2;
}

.page_header_compact .subtitle {
  font-size: 1rem;
  color: #8b95a8;
  margin-top: 10px;
  max-width: 650px;
  line-height: 1.6;
}

/* ========== TOC ========== */
.toc {
  background: #0d111a;
  border: 1px solid #1e2d45;
  padding: 20px 24px;
  margin: 0 0 20px;
}

.toc_title {
  font-weight: 600;
  color: #00d4ff;
  font-size: 0.85rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.toc a {
  display: block;
  color: #8b95a8;
  text-decoration: none;
  font-size: 1rem;
  padding: 5px 0;
  transition: color 0.2s;
}

.toc a:hover {
  color: #00d4ff;
}

/* ========== SUBSECTIONS ========== */
.nhs_subsection {
  margin: 20px 0;
  border: 1px solid #1e2d45;
  background: #0d111a;
}

.nhs_subsection_header {
  background: rgba(0, 212, 255, 0.08);
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  padding: 14px 24px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #00d4ff;
}

.content_section_text {
  padding: 24px;
  font-size: 1rem;
  line-height: 1.8;
  color: #c8d0dc;
}

.content_section_text p {
  margin-bottom: 14px;
}

.content_section_text ul,
.content_section_text ol {
  margin: 10px 0 16px 28px;
  color: #8b95a8;
}

.content_section_text li {
  margin-bottom: 6px;
}

.content_section_text a {
  color: #00d4ff;
  text-decoration: none;
  font-weight: 500;
}

.content_section_text a:hover {
  text-decoration: underline;
}

.content_section_text pre {
  background: #111827;
  border: 1px solid #1e2d45;
  padding: 18px;
  margin: 16px 0;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #8b95a8;
}

.content_section_text code {
  background: #111827;
  padding: 3px 8px;
  font-size: 0.9em;
  color: #00d4ff;
}

/* ========== TABLES ========== */
.section_table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.95rem;
}

.section_table th {
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.section_table td {
  padding: 12px 14px;
  border-bottom: 1px solid #1e2d45;
  vertical-align: top;
  color: #8b95a8;
}

.section_table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* ========== POSITION BOX ========== */
.position_box {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.15);
  padding: 18px 20px;
  margin: 18px 0;
}

.position_box_title {
  font-weight: 600;
  color: #00d4ff;
  font-size: 0.85rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ========== BOTTOM NAV ========== */
.bottom_nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  margin-top: 24px;
  border-top: 1px solid #1e2d45;
}

.bottom_nav a {
  color: #8b95a8;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s;
  padding: 12px 0;
}

.bottom_nav a:hover {
  color: #00d4ff;
}

.bottom_nav a.primary {
  color: #00d4ff;
}

/* ========== MOBILE ========== */
@media (max-width: 768px) {
  html { font-size: 16px; }

  .main_page {
    width: min(100% - 32px, var(--site-max-width));
    padding: 0 0 32px;
  }

  .navbar-inner {
    width: min(100% - 32px, var(--site-max-width));
    padding: 12px 0;
  }

  .hero-section {
    padding: 32px 0 36px;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section .subtitle {
    font-size: 1rem;
  }

  .hero-formula code {
    font-size: 1.1rem;
  }

  /* Cards stack to 1 column */
  .cards-row,
  .cards-row-4,
  .cards_container {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .card-box,
  .arch_card_inner {
    padding: 20px;
  }

  .two_col {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .nhs_card {
    padding: 20px;
  }

  .nhs_card_title {
    font-size: 1.2rem;
  }

  .nhs_card_arch {
    font-size: 0.85rem;
    padding: 14px 16px;
  }

  .section-heading h2 {
    font-size: 1.5rem;
  }

  .page_header_compact h1 {
    font-size: 1.6rem;
  }

  .page_header_compact .subtitle {
    font-size: 0.95rem;
  }

  .content_section_text {
    padding: 18px;
  }

  .section_table {
    font-size: 0.85rem;
  }

  .section_table th,
  .section_table td {
    padding: 10px 12px;
  }

  .eq-box {
    padding: 24px;
  }

  .eq-box .eq-formula {
    font-size: 1.3rem;
  }

  .bottom_nav {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .bottom_nav a {
    padding: 8px 0;
  }
}

@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 1.6rem;
  }

  .nhs_card_arch {
    font-size: 0.8rem;
  }

  .arch_card_number {
    font-size: 2.2rem;
  }
}


/* ========== SHARED MOBILE MENU + DOWNLOAD CTA ========== */
.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.navbar .brand-logo + .brand-text {
  margin-left: 2px;
}

.nav-overlay[hidden] {
  display: none !important;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: min(84vw, 340px);
  height: 100vh;
  background: #0d111a;
  border-left: 1px solid #1e2d45;
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  padding: 22px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8b95a8;
  letter-spacing: 2px;
  font-size: 0.85rem;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #1e2d45;
}

.mobile-close {
  background: transparent;
  border: 0;
  color: #00d4ff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav a {
  color: #c8d0dc;
  text-decoration: none;
  font-size: 1.12rem;
  padding: 15px 0;
  border-bottom: 1px solid #1e2d45;
}

.mobile-nav a:hover,
.mobile-nav a:focus {
  color: #00d4ff;
}

.mobile-nav .mobile-download {
  margin-top: 18px;
  background: #00d4ff;
  color: #0a0e17;
  text-align: center;
  padding: 14px 18px;
  border-radius: 4px;
  font-weight: 700;
  border: 2px solid #00d4ff;
}

.mobile-nav .mobile-download:hover,
.mobile-nav .mobile-download:focus {
  background: transparent;
  color: #00d4ff;
}

body.menu-open {
  overflow: hidden;
}

.nhs_card_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

a.nhs_card_link.secondary {
  background: transparent;
  color: #00d4ff;
}

a.nhs_card_link.secondary:hover,
a.nhs_card_link.secondary:focus {
  background: #00d4ff;
  color: #0a0e17;
}

.download_panel {
  border: 1px solid #00d4ff;
  background: rgba(0, 212, 255, 0.06);
  padding: 20px 24px;
  margin: 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.download_panel strong {
  color: #ffffff;
  font-size: 1.05rem;
}

.download_panel p {
  color: #8b95a8;
  margin: 6px 0 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .download_panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .nhs_card_actions .nhs_card_link {
    width: 100%;
    text-align: center;
  }
}


/* ========== ORIGINAL BRAND LOGO LOCK ========== */
.hero-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto 30px;
  animation: none;
  filter: none;
}

.brand-logo {
  animation: none;
  filter: none;
}

/* Original animated NashMark header logo */
.animated-brand-logo {
  display: block;
  width: 100px;
  height: 120px;
  line-height: 0;
}

.animated-brand-logo svg {
  width: 100px;
  height: 120px;
  display: block;
  overflow: visible;
}

.brand {
  line-height: 0;
}

/* ========== RESPONSIVE BRAND SCALING FIX ========== */
@media (max-width: 768px) {
  .navbar-inner {
    padding: 10px 20px;
    min-height: 96px;
  }

  .animated-brand-logo {
    width: 76px;
    height: 92px;
  }

  .animated-brand-logo svg {
    width: 76px;
    height: 92px;
  }

  .hamburger {
    padding: 6px;
  }

  .hamburger span {
    width: 26px;
  }

  .hero-section {
    padding: 38px 0 44px;
  }

  .hero-logo {
    width: 118px;
    height: 118px;
    margin-bottom: 24px;
  }
}

@media (max-width: 480px) {
  .navbar-inner {
    padding: 8px 18px;
    min-height: 88px;
  }

  .animated-brand-logo {
    width: 68px;
    height: 82px;
  }

  .animated-brand-logo svg {
    width: 68px;
    height: 82px;
  }

  .hero-logo {
    width: 108px;
    height: 108px;
  }
}

/* ========== WIDTH / ACCESSIBILITY OVERRIDE ========== */
:root {
  --site-max-width: 1440px;
  --site-gutter: 20px;
}

.main_page,
.navbar-inner,
.footer-inner {
  width: 100%;
  max-width: var(--site-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}

.main_page {
  padding-bottom: 56px;
}

.navbar-inner {
  padding-top: 14px;
  padding-bottom: 14px;
}

.hero-section h1 {
  font-size: clamp(2.4rem, 4.8vw, 4.4rem);
}

.hero-section .subtitle,
.section-heading p,
.card-box p,
.nhs_card_desc,
.content_section_text,
.toc a,
.bottom_nav a {
  font-size: 1.08rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.card-box h3,
.arch_card_title,
.nhs_subsection_header {
  font-size: 1.22rem;
}

.cards-row {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.cards-row-4 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.card-box,
.arch_card_inner,
.nhs_card,
.eq-box,
.flow_section {
  padding: 32px;
}

.page_header_compact .subtitle {
  max-width: 900px;
  font-size: 1.08rem;
}

@media (max-width: 992px) {
  :root { --site-gutter: 18px; }

  .cards-row,
  .cards-row-4 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  :root { --site-gutter: 16px; }

  .main_page,
  .navbar-inner,
  .footer-inner {
    width: 100%;
    max-width: none;
    padding-left: var(--site-gutter);
    padding-right: var(--site-gutter);
  }

  .hero-section h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .hero-section .subtitle,
  .section-heading p,
  .card-box p,
  .nhs_card_desc,
  .content_section_text,
  .toc a,
  .bottom_nav a {
    font-size: 1rem;
  }

  .card-box,
  .arch_card_inner,
  .nhs_card,
  .eq-box,
  .flow_section {
    padding: 22px;
  }
}


/* ========== FINAL NAV BREAKPOINT FIX ========== */
/* One nav system at a time. Desktop never shows the mobile drawer. */
@media (min-width: 1101px) {
  .desktop-nav {
    display: flex !important;
  }

  .hamburger,
  .mobile-nav,
  .nav-overlay {
    display: none !important;
  }

  body.menu-open {
    overflow: auto !important;
  }
}

@media (max-width: 1100px) {
  .desktop-nav {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
  }

  .mobile-nav {
    display: flex !important;
    transform: translateX(100%);
  }

  .mobile-nav.open {
    transform: translateX(0);
  }

  .navbar-inner {
    width: 100%;
    max-width: none;
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 768px) {
  .mobile-nav {
    width: min(86vw, 340px);
  }
}

@media (max-width: 480px) {
  .mobile-nav {
    width: 88vw;
    padding: 18px 20px 28px;
  }
}


/* ========== ACCESSIBILITY + FLUID LAYOUT FINAL OVERRIDE ========== */
:root {
  --site-max-width: 1500px;
  --site-gutter: 12px;
  --text-main: #e4e9f2;
  --text-muted: #c4ccda;
  --text-soft: #b6c0d1;
  --panel-bg: #111722;
  --panel-border: #31415a;
}

html {
  font-size: 20px;
}

body {
  color: var(--text-main);
  line-height: 1.75;
}

.main_page,
.navbar-inner,
.footer-inner {
  width: 100%;
  max-width: var(--site-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}

.nav-links a {
  font-size: 1rem;
  color: var(--text-soft);
}

.hero-section .subtitle,
.section-heading p,
.card-box p,
.arch_card_body,
.nhs_card_desc,
.nhs_card_subtitle,
.content_section_text,
.content_section_text p,
.content_section_text li,
.toc a,
.bottom_nav a,
.eq-box .eq-terms,
.eq-box .eq-conclusion,
.download_panel p {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.card-box,
.arch_card,
.nhs_card,
.nhs_subsection,
.eq-box,
.toc,
.download_panel,
.flow_section {
  background: var(--panel-bg);
  border-color: var(--panel-border);
}

.card-box h3,
.arch_card_title,
.nhs_card_title,
.nhs_subsection_header,
.download_panel strong {
  font-size: 1.25rem;
}

.content_section_text ul,
.content_section_text ol {
  color: var(--text-muted);
  margin-left: 1.6rem;
}

.content_section_text li {
  margin-bottom: 0.55rem;
  line-height: 1.75;
}

.section_table {
  font-size: 1rem;
}

.section_table td {
  color: var(--text-muted);
}

.section_table th {
  color: #34e7ff;
}

.cards-row {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.cards-row-4 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.mobile-nav a {
  font-size: 1.2rem;
  color: var(--text-main);
}

@media (max-width: 1100px) {
  html { font-size: 19px; }
}

@media (max-width: 768px) {
  :root { --site-gutter: 14px; }
  html { font-size: 18px; }

  .hero-section .subtitle,
  .section-heading p,
  .card-box p,
  .arch_card_body,
  .nhs_card_desc,
  .nhs_card_subtitle,
  .content_section_text,
  .content_section_text p,
  .content_section_text li,
  .toc a,
  .bottom_nav a,
  .download_panel p {
    font-size: 1rem;
  }

  .card-box,
  .arch_card_inner,
  .nhs_card,
  .eq-box,
  .flow_section,
  .content_section_text {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  html { font-size: 17px; }
  .section_table { font-size: 0.95rem; }
}

/* ===== FINAL SITE-WIDE ACCESSIBILITY AND MOBILE MENU LOCK ===== */
:root {
  --site-max-width: 1500px;
  --site-gutter: 16px;
  --text-main: #e7edf7;
  --text-muted: #c7d0df;
  --text-soft: #b9c4d4;
  --line: #2a374d;
  --panel: #111722;
  --cyan: #00d4ff;
}

html { font-size: 18px; }
body { color: var(--text-main); background: #0a0e17; }

.main_page,
.navbar-inner,
.footer-inner {
  width: 100%;
  max-width: var(--site-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}

.main_page { padding-bottom: 60px; }
.navbar-inner { padding-top: 12px; padding-bottom: 12px; min-height: 112px; }

.nav-links { gap: 20px; }
.nav-links a { font-size: 1rem; color: var(--text-soft); }
.nav-links a:hover, .nav-links a.active { color: var(--cyan); }

.hero-section h1 { font-size: clamp(2.8rem, 5vw, 4.8rem); }
.section-heading h2 { font-size: clamp(2rem, 3.2vw, 3rem); }
.page_header_compact h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }

.hero-section .subtitle,
.section-heading p,
.card-box p,
.arch_card_body,
.nhs_card_desc,
.nhs_card_subtitle,
.content_section_text,
.content_section_text p,
.content_section_text li,
.toc a,
.bottom_nav a,
.download_panel p,
.section_table,
.final_rule_text {
  font-size: 1.06rem;
  color: var(--text-muted);
}

.card-box h3,
.arch_card_title,
.nhs_subsection_header,
.nhs_card_title { font-size: 1.25rem; }

.content_section_text { line-height: 1.8; }
.content_section_text ul, .content_section_text ol { margin-left: 1.5rem; }
.content_section_text li { margin-bottom: 0.45rem; }

.card-box,
.arch_card_inner,
.nhs_card,
.eq-box,
.flow_section,
.content_section_text,
.toc,
.download_panel {
  border-color: var(--line);
}

.cards-row { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.cards-row-4 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card-box, .arch_card_inner, .nhs_card, .eq-box, .flow_section { padding: 32px; }

.nav-overlay[hidden] { display: none !important; }
.nav-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1100 !important;
  background: rgba(0,0,0,0.72) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.mobile-nav {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  width: min(86vw, 380px) !important;
  height: 100vh !important;
  z-index: 1200 !important;
  background: #0d111a !important;
  border-left: 1px solid var(--line) !important;
  box-shadow: -20px 0 60px rgba(0,0,0,0.5) !important;
  transform: translateX(100%) !important;
  transition: transform 0.28s ease !important;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 32px;
}
.mobile-nav.open { transform: translateX(0) !important; }
.mobile-nav a { font-size: 1.18rem; color: var(--text-main); }
.mobile-nav .mobile-download { color: #0a0e17; }
body.menu-open { overflow: hidden !important; }

@media (min-width: 1101px) {
  .desktop-nav { display: flex !important; }
  .hamburger, #mobileNav, #navOverlay { display: none !important; visibility: hidden !important; pointer-events: none !important; }
  body.menu-open { overflow: auto !important; }
}

@media (max-width: 1100px) {
  html { font-size: 19px; }
  .desktop-nav { display: none !important; }
  .hamburger { display: flex !important; z-index: 1250 !important; }
  #mobileNav { display: flex !important; visibility: visible !important; }
  #mobileNav:not(.open) { pointer-events: none !important; }
  #mobileNav.open { pointer-events: auto !important; }
  .navbar-inner { max-width: none; min-height: 96px; }
  .animated-brand-logo { width: 76px; height: 92px; }
  .animated-brand-logo svg { width: 76px; height: 92px; }
}

@media (max-width: 768px) {
  :root { --site-gutter: 14px; }
  html { font-size: 18px; }
  .navbar-inner { min-height: 88px; padding-top: 8px; padding-bottom: 8px; }
  .animated-brand-logo { width: 68px; height: 82px; }
  .animated-brand-logo svg { width: 68px; height: 82px; }
  .hero-section { padding: 38px 0 44px; }
  .hero-section h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .hero-logo { width: 108px; height: 108px; margin-bottom: 24px; }
  .card-box, .arch_card_inner, .nhs_card, .eq-box, .flow_section, .content_section_text { padding: 20px; }
  .nhs_card_actions .nhs_card_link { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  :root { --site-gutter: 12px; }
  html { font-size: 17px; }
  .mobile-nav { width: 90vw !important; padding: 20px; }
  .section_table { font-size: 0.95rem; }
}

/* ===== FINAL MOBILE MENU FIX ===== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-inner {
  width: 100%;
}

.nav-overlay[hidden] {
  display: none !important;
}

.nav-overlay {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.78) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  z-index: 1190 !important;
}

.mobile-nav {
  box-sizing: border-box !important;
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  width: min(88vw, 380px) !important;
  max-width: 380px !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  padding: 24px !important;
  background: #0d111a !important;
  border-left: 1px solid #263246 !important;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.6) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  transform: translateX(105%) !important;
  transition: transform 0.28s ease !important;
  z-index: 1300 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.mobile-nav.open {
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

.mobile-nav-header {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 0 18px !important;
  margin: 0 0 24px !important;
  border-bottom: 1px solid #263246 !important;
}

.mobile-close {
  min-width: 44px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  color: #00d4ff !important;
}

.mobile-nav a {
  box-sizing: border-box !important;
  width: 100% !important;
  display: block !important;
  padding: 18px 0 !important;
  border-bottom: 1px solid #263246 !important;
  color: #e5e7eb !important;
  font-size: 1.18rem !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
}

.mobile-nav .mobile-download {
  margin-top: 22px !important;
  padding: 16px 18px !important;
  border: 2px solid #00d4ff !important;
  border-radius: 8px !important;
  background: #00d4ff !important;
  color: #071018 !important;
  text-align: center !important;
  font-weight: 800 !important;
  white-space: normal !important;
}

body.menu-open {
  overflow: hidden !important;
  touch-action: none !important;
}

body.menu-open .hamburger {
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (min-width: 1101px) {
  .desktop-nav { display: flex !important; }
  .hamburger,
  #mobileNav,
  #navOverlay {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  body.menu-open { overflow: auto !important; touch-action: auto !important; }
}

@media (max-width: 1100px) {
  .desktop-nav { display: none !important; }
  .hamburger {
    display: flex !important;
    z-index: 1180 !important;
  }
  #mobileNav {
    visibility: visible !important;
  }
}

@media (max-width: 768px) {
  .mobile-nav {
    left: 0 !important;
    right: auto !important;
    width: 100vw !important;
    max-width: none !important;
    border-left: 0 !important;
    padding: 24px clamp(22px, 7vw, 40px) 36px !important;
    transform: translateX(105%) !important;
  }

  .mobile-nav.open {
    transform: translateX(0) !important;
  }

  .nav-overlay {
    background: rgba(0, 0, 0, 0.86) !important;
  }
}


/* ===== NASHMARKAI LEGAL CENTRE / TABBED TEMPLATE ===== */
.legal-centre-page .subtitle { max-width: 980px; }
.legal-centre-shell {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 24px;
  align-items: start;
  margin: 24px 0 40px;
}
.legal-tabs {
  position: sticky;
  top: 136px;
  border: 1px solid var(--line, #2a374d);
  background: var(--panel, #111722);
  padding: 12px;
}
.legal-tab {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: transparent;
  color: var(--text-muted, #c7d0df);
  border: 1px solid transparent;
  padding: 12px 10px;
  font: inherit;
  cursor: pointer;
}
.legal-tab span {
  color: var(--cyan, #00d4ff);
  font-weight: 800;
  min-width: 34px;
}
.legal-tab:hover,
.legal-tab:focus,
.legal-tab.active {
  border-color: rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.08);
  color: #ffffff;
  outline: none;
}
.legal-panels .legal-panel { display: block; margin: 0 0 20px; }
body.legal-js .legal-panels .legal-panel { display: none; }
body.legal-js .legal-panels .legal-panel.active { display: block; }
.legal-panel h3 {
  color: #ffffff;
  font-size: 1.18rem;
  margin: 1.25rem 0 0.5rem;
}
.legal-panel h3:first-child { margin-top: 0; }
.legal-panel a { color: var(--cyan, #00d4ff); }
.legal-footer {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 24px;
  align-items: start;
  text-align: left;
}
.legal-footer-brand strong { color: #ffffff; }
.legal-footer-brand span { color: #8b95a8; }
.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}
.legal-footer-links a {
  color: #c8d0dc;
  text-decoration: none;
  border-bottom: 1px solid rgba(200,208,220,0.35);
  font-size: 0.92rem;
}
.legal-footer-links a:hover,
.legal-footer-links a:focus {
  color: #00d4ff;
  border-bottom-color: #00d4ff;
}
@media (max-width: 900px) {
  .legal-centre-shell { grid-template-columns: 1fr; }
  .legal-tabs {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
  }
  .legal-footer { grid-template-columns: 1fr; }
  .legal-footer-links { justify-content: flex-start; }
}

/* ===== GAIEM: GENAI EVALUATION MATRIX ===== */
.gaiem-static-brand {
  gap: 12px;
  color: #e5e7eb;
  font-size: .82rem;
  letter-spacing: .16em;
  font-weight: 700;
}
.gaiem-static-brand img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.gaiem-page h2 {
  color: #f7fbff;
  font-size: 2.5rem;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.16;
  font-weight: 300;
  margin-bottom: 18px;
}
.gaiem-kicker {
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .76rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.gaiem-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 58px;
  border-bottom: 1px solid #1a2236;
  background:
    radial-gradient(circle at 78% 30%, rgba(0, 132, 255, .16), transparent 32%),
    radial-gradient(circle at 20% 0%, rgba(0, 212, 255, .08), transparent 28%),
    #0a0e17;
}
.gaiem-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image:
    linear-gradient(rgba(0,212,255,.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.25) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}
.gaiem-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: center;
}
.gaiem-version {
  display: inline-flex;
  padding: 7px 12px;
  margin: 4px 0 18px;
  border: 1px solid rgba(0,212,255,.45);
  background: rgba(0,212,255,.08);
  color: #a6efff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .82rem;
}
.gaiem-hero h1 {
  color: #ffffff;
  font-size: 5rem;
  font-size: clamp(3rem, 7.4vw, 6.7rem);
  line-height: .94;
  letter-spacing: -.05em;
  font-weight: 760;
  margin: 0 0 28px;
  max-width: 820px;
}
.gaiem-hero h1 span { color: #00d4ff; }
.gaiem-lead {
  color: #e5edf7;
  font-size: clamp(1.16rem, 2vw, 1.52rem);
  line-height: 1.5;
  max-width: 760px;
  margin-bottom: 18px;
}
.gaiem-summary,
.gaiem-body-copy {
  color: #98a6b9;
  max-width: 760px;
  line-height: 1.82;
}
.gaiem-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 18px;
}
.gaiem-outline-button {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid rgba(0,212,255,.65);
  color: #b9f5ff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 4px;
}
.gaiem-outline-button:hover,
.gaiem-outline-button:focus {
  color: #071018;
  background: #00d4ff;
}
.gaiem-author {
  color: #6f7e92;
  font-size: .86rem;
}
.gaiem-matrix-visual {
  position: relative;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(0,212,255,.38);
  background: linear-gradient(145deg, rgba(10,23,43,.96), rgba(5,11,23,.98));
  box-shadow: 0 34px 90px rgba(0,0,0,.45), inset 0 0 80px rgba(0,132,255,.07);
  transform: perspective(1000px) rotateY(-3deg) rotateX(1deg);
}
.gaiem-matrix-visual::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(104,224,255,.08);
  pointer-events: none;
}
.gaiem-cube-title {
  color: #ffffff;
  font-size: 5rem;
  font-size: clamp(3.4rem, 7vw, 6.4rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.05em;
  margin-bottom: 24px;
  text-shadow: 0 0 30px rgba(0,212,255,.18);
}
.gaiem-cube-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(0,212,255,.3);
  border-left: 1px solid rgba(0,212,255,.3);
}
.gaiem-cube-grid div {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-right: 1px solid rgba(0,212,255,.3);
  border-bottom: 1px solid rgba(0,212,255,.3);
  color: #c8eff8;
  text-align: center;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(0,115,255,.045);
}
.gaiem-visual-strip {
  margin-top: 22px;
  color: #7f90a7;
  font-size: .65rem;
  letter-spacing: .12em;
  text-align: center;
}
.gaiem-stat-band {
  border-bottom: 1px solid #1a2236;
  background: #0d121d;
}
.gaiem-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 26px 0;
}
.gaiem-stats div {
  min-width: 0;
  padding: 4px 18px;
  text-align: center;
  border-right: 1px solid #202b3d;
}
.gaiem-stats div:last-child { border-right: 0; }
.gaiem-stats strong {
  display: block;
  color: #ffffff;
  font-size: 1.8rem;
  line-height: 1.1;
}
.gaiem-stats span {
  display: block;
  color: #7f8da1;
  font-size: .73rem;
  line-height: 1.35;
  margin-top: 6px;
}
.gaiem-section {
  padding: 82px 0 34px;
  border-bottom: 1px solid #172033;
}
.gaiem-section-dark { background: #080c14; }
.gaiem-section-heading {
  max-width: 900px;
  margin: 0 auto 38px;
  text-align: center;
}
.gaiem-section-heading p:last-child {
  color: #91a0b4;
  max-width: 760px;
  margin: 0 auto;
}
.gaiem-purpose-grid .card-box { min-height: 220px; }
.gaiem-flow {
  display: grid;
  grid-template-columns: repeat(11, auto);
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 0 20px;
}
.gaiem-flow > div {
  width: 205px;
  padding: 22px 18px;
  border: 1px solid #26354c;
  background: #101722;
}
.gaiem-flow > div span {
  display: block;
  color: #00d4ff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  margin-bottom: 12px;
}
.gaiem-flow > div strong {
  display: block;
  color: #f4f8ff;
  font-size: .94rem;
  line-height: 1.35;
  margin-bottom: 10px;
}
.gaiem-flow > div small {
  display: block;
  color: #8391a5;
  font-size: .72rem;
  line-height: 1.5;
}
.gaiem-flow > b {
  align-self: center;
  color: #00d4ff;
  font-size: 1.5rem;
}
.gaiem-two-column,
.gaiem-results-grid,
.gaiem-open-source {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: clamp(42px, 7vw, 88px);
  align-items: center;
}
.gaiem-evaluator-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.gaiem-evaluator-list span {
  padding: 9px 12px;
  border: 1px solid #25344b;
  background: #0f1622;
  color: #c9d4e2;
  font-size: .78rem;
}
.gaiem-callout {
  padding: clamp(28px, 5vw, 52px);
  border-left: 4px solid #00d4ff;
  background: linear-gradient(135deg, rgba(0,212,255,.085), rgba(0,83,175,.04));
}
.gaiem-callout-label {
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  font-weight: 800;
}
.gaiem-callout blockquote {
  color: #ffffff;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.3;
  font-weight: 300;
  margin: 16px 0 20px;
}
.gaiem-callout p { color: #91a0b4; }
.gaiem-domain-code {
  color: #6f839e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .69rem;
  letter-spacing: .06em;
  margin-bottom: 12px;
}
.gaiem-domain-card { min-height: 270px; }
.gaiem-result-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.gaiem-result-cards div {
  padding: 22px 16px;
  border: 1px solid #26364d;
  background: #101722;
}
.gaiem-result-cards strong {
  display: block;
  color: #00d4ff;
  font-size: 1.72rem;
  line-height: 1.1;
}
.gaiem-result-cards span {
  display: block;
  color: #8997aa;
  font-size: .72rem;
  line-height: 1.45;
  margin-top: 8px;
}
.gaiem-result-note {
  padding: 34px;
  border: 1px solid #26364d;
  background: #0f1622;
}
.gaiem-result-note h3 {
  color: #ffffff;
  font-size: 1.28rem;
  margin-bottom: 16px;
}
.gaiem-result-note p {
  color: #95a3b6;
  margin-bottom: 14px;
}
.gaiem-boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  max-width: 1080px;
  margin: 0 auto;
}
.gaiem-boundary-card {
  padding: 34px;
  border: 1px solid #26354b;
  background: #101722;
}
.gaiem-boundary-card > span {
  display: inline-block;
  padding: 6px 10px;
  margin-bottom: 20px;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
}
.gaiem-boundary-card.implemented > span {
  color: #8effc1;
  background: rgba(53,207,128,.1);
  border: 1px solid rgba(53,207,128,.35);
}
.gaiem-boundary-card.proposed > span {
  color: #ffd88c;
  background: rgba(255,181,58,.09);
  border: 1px solid rgba(255,181,58,.3);
}
.gaiem-boundary-card h3 {
  color: #ffffff;
  font-size: 1.35rem;
  margin-bottom: 14px;
}
.gaiem-boundary-card p { color: #91a0b4; }
.gaiem-check-list {
  list-style: none;
  margin-top: 24px;
}
.gaiem-check-list li {
  position: relative;
  padding: 8px 0 8px 28px;
  color: #aeb9c8;
}
.gaiem-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #00d4ff;
  font-weight: 800;
}
.gaiem-terminal {
  border: 1px solid #26364d;
  background: #05080e;
  box-shadow: 0 28px 70px rgba(0,0,0,.38);
}
.gaiem-terminal-bar {
  display: flex;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid #1b2638;
  background: #0e1420;
}
.gaiem-terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334158;
}
.gaiem-terminal pre {
  overflow-x: auto;
  padding: 28px;
  margin: 0;
}
.gaiem-terminal code {
  color: #9cecff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .78rem;
  line-height: 1.9;
}
.gaiem-final-cta {
  padding: 88px 0 46px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 100%, rgba(0,132,255,.16), transparent 38%),
    #080c14;
}
.gaiem-final-cta h2 {
  max-width: 860px;
  margin: 0 auto 18px;
}
.gaiem-final-cta p:not(.gaiem-kicker) {
  color: #93a1b5;
  max-width: 720px;
  margin: 0 auto 28px;
}
@media (max-width: 1100px) {
  .gaiem-hero-grid { grid-template-columns: 1fr; }
  .gaiem-matrix-visual { max-width: 720px; transform: none; }
  .gaiem-stats { grid-template-columns: repeat(3, 1fr); }
  .gaiem-stats div:nth-child(3) { border-right: 0; }
  .gaiem-stats div:nth-child(-n+3) { margin-bottom: 18px; }
}
@media (max-width: 850px) {
  .gaiem-two-column,
  .gaiem-results-grid,
  .gaiem-open-source,
  .gaiem-boundary-grid { grid-template-columns: 1fr; }
  .gaiem-result-cards { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .gaiem-hero { padding-top: 52px; }
  .gaiem-hero h1 { font-size: clamp(2.65rem, 15vw, 4rem); }
  .gaiem-actions { flex-direction: column; }
  .gaiem-actions a { text-align: center; }
  .gaiem-cube-grid div { min-height: 62px; font-size: .61rem; }
  .gaiem-stats { grid-template-columns: repeat(2, 1fr); }
  .gaiem-stats div { border-right: 1px solid #202b3d !important; margin-bottom: 18px; }
  .gaiem-stats div:nth-child(even) { border-right: 0 !important; }
  .gaiem-stats div:nth-last-child(-n+2) { margin-bottom: 0; }
  .gaiem-section { padding-top: 62px; }
  .gaiem-static-brand span { display: none; }
}


/* ===== HOMEPAGE GAIEM MODULE ===== */
.homepage-gaiem-section {
  padding: 28px 0 54px;
}
.homepage-gaiem-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  gap: clamp(36px, 6vw, 78px);
  align-items: center;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid rgba(0,212,255,.42);
  background:
    radial-gradient(circle at 82% 32%, rgba(0,128,255,.17), transparent 34%),
    linear-gradient(145deg, #0e1624, #080d16);
  box-shadow: 0 30px 76px rgba(0,0,0,.28);
}
.homepage-gaiem-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .08;
  background-image:
    linear-gradient(rgba(0,212,255,.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.4) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}
.homepage-gaiem-copy,
.homepage-gaiem-matrix { position: relative; }
.homepage-gaiem-kicker {
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .72rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.homepage-gaiem-version {
  display: inline-block;
  color: #a8efff;
  border: 1px solid rgba(0,212,255,.35);
  background: rgba(0,212,255,.07);
  padding: 5px 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .72rem;
  margin-bottom: 16px;
}
.homepage-gaiem-card h2 {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: -.04em;
  margin-bottom: 18px;
}
.homepage-gaiem-card h2 span { color: #00d4ff; }
.homepage-gaiem-lead {
  color: #dbe7f3 !important;
  font-size: 1.12rem;
  line-height: 1.55;
  margin-bottom: 14px;
}
.homepage-gaiem-card p { color: #91a0b4; }
.homepage-gaiem-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}
.homepage-gaiem-link {
  color: #a6efff;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,212,255,.5);
  font-weight: 700;
}
.homepage-gaiem-matrix {
  padding: 26px;
  border: 1px solid rgba(0,212,255,.28);
  background: rgba(3,10,20,.74);
}
.homepage-gaiem-matrix > strong {
  display: block;
  color: #ffffff;
  font-size: clamp(2.8rem, 5vw, 5.6rem);
  line-height: 1;
  letter-spacing: -.04em;
  margin-bottom: 18px;
}
.homepage-gaiem-matrix > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(0,212,255,.28);
  border-left: 1px solid rgba(0,212,255,.28);
}
.homepage-gaiem-matrix span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 65px;
  padding: 8px;
  color: #beeef7;
  border-right: 1px solid rgba(0,212,255,.28);
  border-bottom: 1px solid rgba(0,212,255,.28);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
}
.homepage-gaiem-matrix small {
  display: block;
  color: #66778f;
  font-size: .6rem;
  letter-spacing: .11em;
  text-align: center;
  margin-top: 16px;
}
@media (max-width: 920px) {
  .homepage-gaiem-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .homepage-gaiem-actions { flex-direction: column; align-items: stretch; }
  .homepage-gaiem-actions a { text-align: center; }
  .homepage-gaiem-matrix span { min-height: 54px; font-size: .58rem; }
}

.gaiem-text-button {
  display: inline-flex;
  align-items: center;
  padding: 14px 4px;
  color: #9cecff;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,212,255,.4);
  font-weight: 700;
}
.gaiem-text-button:hover,
.gaiem-text-button:focus { color: #ffffff; border-bottom-color: #ffffff; }
.gaiem-final-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ===== GAIEM EXPANDED LONG-FORM PAGE ===== */
.gaiem-longform-page {
  background: #080c14;
}
.gaiem-longform-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(34px, 5vw, 72px);
  align-items: start;
  padding-top: 68px;
  padding-bottom: 96px;
}
.gaiem-page-toc {
  position: sticky;
  top: 92px;
}
.gaiem-page-toc-inner {
  padding: 22px;
  border: 1px solid #233149;
  background: #0c121d;
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
}
.gaiem-page-toc strong {
  display: block;
  color: #ffffff;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 14px;
}
.gaiem-page-toc a {
  display: block;
  padding: 8px 0;
  color: #91a0b4;
  text-decoration: none;
  font-size: .84rem;
  line-height: 1.35;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.gaiem-page-toc a:last-child { border-bottom: 0; }
.gaiem-page-toc a:hover,
.gaiem-page-toc a:focus { color: #00d4ff; }
.gaiem-longform-content {
  min-width: 0;
}
.gaiem-content-section {
  scroll-margin-top: 92px;
  padding: clamp(42px, 6vw, 72px);
  margin-bottom: 30px;
  border: 1px solid #1f2a3e;
  background: #0b111b;
  box-shadow: 0 22px 58px rgba(0,0,0,.2);
}
.gaiem-content-section-dark {
  background:
    radial-gradient(circle at 100% 0, rgba(0,123,255,.08), transparent 32%),
    #080d16;
  border-color: #26344c;
}
.gaiem-content-section h2 {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -.035em;
  margin-bottom: 24px;
}
.gaiem-content-section h3 {
  color: #dff8ff;
  font-size: clamp(1.28rem, 2vw, 1.72rem);
  line-height: 1.25;
  margin: 32px 0 14px;
}
.gaiem-content-section h4 {
  color: #c8e9f3;
  font-size: 1rem;
  margin: 24px 0 10px;
}
.gaiem-content-section p,
.gaiem-content-section li {
  color: #aab6c7;
  font-size: 1rem;
  line-height: 1.78;
}
.gaiem-content-section p + p { margin-top: 16px; }
.gaiem-content-section a { color: #65def5; }
.gaiem-content-section ul {
  margin: 16px 0 20px 22px;
}
.gaiem-content-section li { margin-bottom: 7px; }
.gaiem-content-section code {
  color: #a9efff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.gaiem-module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 28px;
}
.gaiem-module-grid span,
.gaiem-domain-chip-grid span {
  display: flex;
  align-items: center;
  min-height: 66px;
  padding: 16px;
  color: #d4f8ff;
  border: 1px solid rgba(0,212,255,.25);
  background: rgba(0,212,255,.055);
  font-size: .86rem;
  font-weight: 700;
}
.gaiem-topic-block {
  margin-top: 34px;
  padding: clamp(22px, 3vw, 34px);
  border-left: 3px solid #00d4ff;
  background: rgba(255,255,255,.022);
}
.gaiem-topic-block:first-of-type { margin-top: 24px; }
.gaiem-topic-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.gaiem-topic-heading > span {
  font-size: 1.75rem;
  line-height: 1;
}
.gaiem-topic-heading h3 { margin: 0; }
.gaiem-topic-heading .gaiem-domain-code {
  margin: 0 0 4px;
  color: #6fdff5;
  font-size: .72rem;
  line-height: 1.3;
}
.gaiem-code-label {
  color: #7fe8fb;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: .7rem;
  font-weight: 800;
  margin: 24px 0 9px;
}
.gaiem-inline-code {
  overflow-x: auto;
  margin: 0 0 22px;
  padding: 18px 20px;
  border: 1px solid #26364d;
  background: #05080e;
}
.gaiem-inline-code code { font-size: .82rem; }
.gaiem-file-card {
  margin-top: 24px;
  padding: 26px;
  border: 1px solid #273650;
  background: #080d16;
}
.gaiem-file-card h3 { margin-top: 0; }
.gaiem-process-flow {
  display: grid;
  gap: 9px;
  margin: 28px 0;
}
.gaiem-process-flow span {
  padding: 14px 16px;
  color: #d4f7ff;
  border: 1px solid rgba(0,212,255,.25);
  background: rgba(0,212,255,.05);
  font-size: .88rem;
  line-height: 1.45;
}
.gaiem-process-flow b {
  color: #00d4ff;
  text-align: center;
  font-weight: 400;
}
.gaiem-two-list-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.gaiem-domain-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 24px;
}
.gaiem-status-list {
  display: grid;
  gap: 14px;
}
.gaiem-status-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 24px;
  border: 1px solid #273650;
  background: rgba(255,255,255,.02);
}
.gaiem-status-row h3 { margin-top: 0; }
.gaiem-status {
  display: inline-flex;
  justify-content: center;
  padding: 7px 10px;
  font-size: .66rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  border: 1px solid;
}
.gaiem-status.implemented {
  color: #8effc1;
  border-color: rgba(53,207,128,.45);
  background: rgba(53,207,128,.08);
}
.gaiem-status.present {
  color: #8bdfff;
  border-color: rgba(0,174,255,.45);
  background: rgba(0,174,255,.08);
}
.gaiem-status.planned {
  color: #ffd88c;
  border-color: rgba(255,181,58,.42);
  background: rgba(255,181,58,.075);
}
.gaiem-roadmap {
  margin-top: 16px;
  border: 1px solid #293850;
  background: #080d16;
}
.gaiem-roadmap summary {
  cursor: pointer;
  padding: 19px 22px;
  color: #e5f9ff;
  font-size: 1rem;
  font-weight: 800;
  list-style-position: inside;
}
.gaiem-roadmap[open] summary {
  border-bottom: 1px solid #26344a;
  background: rgba(0,212,255,.045);
}
.gaiem-roadmap > ul,
.gaiem-roadmap > p {
  margin-left: 42px;
  margin-right: 28px;
}
.gaiem-roadmap > ul { margin-top: 22px; }
.gaiem-roadmap > p { margin-bottom: 26px; }
.gaiem-task-list li::marker { content: "☐  "; color: #00d4ff; }
.gaiem-project-status {
  text-align: center;
  background:
    radial-gradient(circle at 50% 100%, rgba(0,132,255,.16), transparent 44%),
    #080d16;
}
.gaiem-status-badge {
  display: inline-block;
  margin: 0 auto 18px;
  padding: 9px 14px;
  color: #c6f6ff;
  border: 1px solid rgba(0,212,255,.4);
  background: rgba(0,212,255,.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1rem;
}
.gaiem-project-status .gaiem-final-actions { margin-top: 28px; }
@media (max-width: 1080px) {
  .gaiem-longform-layout { grid-template-columns: 1fr; }
  .gaiem-page-toc { position: static; }
  .gaiem-page-toc-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 16px;
  }
  .gaiem-page-toc strong { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .gaiem-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gaiem-domain-chip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gaiem-two-list-columns { grid-template-columns: 1fr; gap: 0; }
  .gaiem-status-row { grid-template-columns: 1fr; gap: 12px; }
  .gaiem-status { justify-self: start; }
}
@media (max-width: 620px) {
  .gaiem-longform-layout { padding-top: 34px; }
  .gaiem-content-section { padding: 28px 22px; }
  .gaiem-page-toc-inner { grid-template-columns: 1fr; }
  .gaiem-module-grid,
  .gaiem-domain-chip-grid { grid-template-columns: 1fr; }
  .gaiem-topic-block { padding: 22px 18px; }
  .gaiem-roadmap > ul,
  .gaiem-roadmap > p { margin-left: 26px; margin-right: 22px; }
}

/* ========== TRUTHFARIAN FRAMEWORK REPOSITORY BADGE ========== */
.truthfarian-link {
  color: #00d4ff;
  text-decoration-color: rgba(0, 212, 255, 0.6);
  text-underline-offset: 4px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.truthfarian-link:hover,
.truthfarian-link:focus-visible {
  color: #7feaff;
  text-decoration-color: #7feaff;
}

.truthfarian-badge {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid #1e2d45;
  background: #0d111a;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.truthfarian-badge:hover {
  border-color: #00d4ff;
  background: #111827;
  transform: translateY(-2px);
}

.truthfarian-badge:focus-visible {
  outline: 2px solid #00d4ff;
  outline-offset: 4px;
}

.truthfarian-badge img {
  display: block;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.truthfarian-badge > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.truthfarian-badge strong {
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.35;
}

.truthfarian-badge > span > span {
  color: #8b95a8;
  font-size: 0.92rem;
  line-height: 1.55;
}

@media (max-width: 620px) {
  .truthfarian-badge {
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
  }

  .truthfarian-badge img {
    flex-basis: 68px;
    width: 68px;
    height: 68px;
  }
}

/* ==========================================================
   Navigation active-state correction
   ========================================================== */
.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--cyan, #00d4ff) !important;
  border-bottom: 2px solid currentColor;
}

.mobile-nav a.active,
.mobile-nav a[aria-current="page"] {
  color: var(--cyan, #00d4ff) !important;
  font-weight: 700 !important;
  border-bottom-color: var(--cyan, #00d4ff) !important;
  background: rgba(0, 212, 255, 0.08) !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* ===== COOKIE CONSENT AND GOOGLE ANALYTICS CONTROL ===== */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.cookie-consent-root,
.cookie-consent-root * {
  box-sizing: border-box;
}

.cookie-consent-banner {
  position: fixed;
  z-index: 10000;
  right: 22px;
  bottom: 22px;
  left: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  color: #e8edf7;
  background: rgba(8, 14, 25, 0.98);
  border: 1px solid rgba(0, 212, 255, 0.42);
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(12px);
}

.cookie-consent-banner[hidden],
.cookie-preferences-overlay[hidden] {
  display: none !important;
}

.cookie-consent-copy {
  max-width: 760px;
}

.cookie-consent-kicker {
  margin: 0 0 6px;
  color: #00d4ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.cookie-consent-copy h2,
.cookie-preferences-dialog h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.2;
}

.cookie-consent-copy p,
.cookie-preferences-intro,
.cookie-category-row p,
.cookie-category-row small,
.cookie-preferences-policy {
  color: #adb7ca;
}

.cookie-consent-copy p {
  margin: 0 0 8px;
  line-height: 1.6;
}

.cookie-consent-copy a,
.cookie-preferences-policy a {
  color: #7de9ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent-actions,
.cookie-preferences-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.cookie-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cookie-button:focus-visible,
.cookie-dialog-close:focus-visible,
.legal-footer-cookie-button:focus-visible,
.cookie-toggle-input:focus-visible + .cookie-toggle {
  outline: 3px solid rgba(125, 233, 255, 0.72);
  outline-offset: 3px;
}

.cookie-button-primary {
  color: #031019;
  background: #00d4ff;
  border-color: #00d4ff;
}

.cookie-button-primary:hover {
  background: #75e9ff;
  border-color: #75e9ff;
}

.cookie-button-secondary {
  color: #edf4ff;
  background: transparent;
  border-color: #56647d;
}

.cookie-button-secondary:hover {
  background: #141d2c;
  border-color: #8090aa;
}

.cookie-preferences-overlay {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 7, 15, 0.78);
}

.cookie-preferences-dialog {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 26px;
  color: #edf4ff;
  background: #09111f;
  border: 1px solid rgba(0, 212, 255, 0.42);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
}

.cookie-dialog-open {
  overflow: hidden;
}

.cookie-preferences-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.cookie-dialog-close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #e7edf7;
  background: transparent;
  border: 1px solid #56647d;
  border-radius: 8px;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.cookie-dialog-close:hover {
  background: #141d2c;
}

.cookie-preferences-intro {
  margin: 8px 0 22px;
  line-height: 1.6;
}

.cookie-category-list {
  display: grid;
  gap: 12px;
}

.cookie-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px;
  background: #0d1727;
  border: 1px solid #24344e;
  border-radius: 10px;
}

.cookie-category-row h3,
.cookie-category-row strong {
  display: block;
  margin: 0 0 5px;
  color: #ffffff;
  font-size: 1rem;
}

.cookie-category-row p,
.cookie-category-row small {
  display: block;
  margin: 0;
  line-height: 1.5;
}

.cookie-category-control {
  cursor: pointer;
}

.cookie-category-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: #7de9ff;
  background: rgba(0, 212, 255, 0.10);
  border: 1px solid rgba(0, 212, 255, 0.28);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.cookie-toggle-wrap {
  position: relative;
  flex: 0 0 50px;
  width: 50px;
  height: 28px;
}

.cookie-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cookie-toggle {
  position: absolute;
  inset: 0;
  background: #35425a;
  border-radius: 999px;
  transition: background-color 160ms ease;
}

.cookie-toggle::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 160ms ease;
}

.cookie-toggle-input:checked + .cookie-toggle {
  background: #00d4ff;
}

.cookie-toggle-input:checked + .cookie-toggle::after {
  transform: translateX(22px);
}

.cookie-preferences-actions {
  margin-top: 22px;
}

.cookie-preferences-policy {
  margin: 16px 0 0;
  font-size: 0.88rem;
}

.legal-footer-cookie-button {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.legal-footer-cookie-button:hover {
  color: #7de9ff;
}

@media (max-width: 820px) {
  .cookie-consent-banner {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    right: 12px;
    bottom: 12px;
    left: 12px;
    padding: 20px;
  }

  .cookie-consent-actions,
  .cookie-preferences-actions {
    justify-content: stretch;
  }

  .cookie-consent-actions .cookie-button,
  .cookie-preferences-actions .cookie-button {
    flex: 1 1 180px;
  }
}

@media (max-width: 520px) {
  .cookie-consent-actions,
  .cookie-preferences-actions {
    flex-direction: column;
  }

  .cookie-consent-actions .cookie-button,
  .cookie-preferences-actions .cookie-button {
    width: 100%;
    flex-basis: auto;
  }

  .cookie-preferences-dialog {
    padding: 20px;
  }

  .cookie-category-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .cookie-category-control {
    flex-direction: row;
    align-items: center;
  }
}

/* ==========================================================
   CONTAINED GLOBAL NAVIGATION
   FDP remains one global link; its page buttons handle section navigation.
   ========================================================== */
.navbar-inner {
  gap: clamp(18px, 2.2vw, 38px);
}

.navbar .brand {
  flex: 0 0 90px;
  width: 90px;
  min-width: 90px;
}

.navbar .animated-brand-logo,
.navbar .animated-brand-logo svg {
  width: 90px;
  height: 108px;
}

.desktop-nav {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: clamp(10px, 1.15vw, 18px);
}

.desktop-nav > a {
  flex: 0 0 auto;
  font-size: clamp(0.82rem, 1.02vw, 1rem);
  line-height: 1.35;
}

@media (min-width: 1201px) {
  .desktop-nav {
    display: flex !important;
  }

  .hamburger,
  #mobileNav,
  #navOverlay {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 1200px) {
  .desktop-nav {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
    flex: 0 0 auto;
  }

  #mobileNav {
    display: flex !important;
    visibility: visible !important;
  }

  #mobileNav:not(.open) {
    pointer-events: none !important;
  }

  #mobileNav.open {
    pointer-events: auto !important;
  }

  #navOverlay:not([hidden]) {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}
