/* Shared Styles for Header (Navigation) & Footer */
* {
  box-sizing: border-box;
}

img,
video,
canvas,
svg,
picture {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Variables (based on Tailwind slate/emerald/sky palette) */
:root {
  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-400: #94a3b8;
  --color-white: #ffffff;

  --color-sky-400: #38bdf8;
  --color-sky-500: #0ea5e9;

  --font-sans: "Inter", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Base Reset (Minimal) */
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-slate-400);
  background-color: var(--color-slate-950);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

/* Utility-like Mixins */
.war-room-panel {
  background: rgba(2, 6, 23, 0.4);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(30, 41, 59, 1);
  /* slate-800 */
}

/* --- HEADER STYLES --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: transparent !important;
  border-bottom: 1px solid rgba(30, 41, 59, 1);
}

/* Layer 1: Removed backdrop-filter to eliminate flicker */
.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -2;
  /* Solid background instead of blur for performance */
  background-color: #020617;
  opacity: 0.95;
  transform: translateZ(0);
  pointer-events: none;
}

/* Layer 2: The Tint & Shadow (Dynamic) */
.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background-color: #020617;
  opacity: 0;
  box-shadow: none;
  transition: opacity 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  transform: translateZ(0);
  will-change: opacity, box-shadow;
  pointer-events: none;
}

/* On scroll, add extra darkness and shadow */
.site-header.scrolled::after {
  opacity: 0.15;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-container {
  max-width: 80rem;
  /* max-w-7xl */
  margin: 0 auto;
  padding: 0 1rem;
  /* px-4 */
  height: 5rem;
  /* h-20 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  .header-container {
    padding-left: 1.5rem;
    /* sm:px-6 */
    padding-right: 1.5rem;
  }
}

/* Brand Section */
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: fit-content;
}

.brand-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-sky-400);
}

@media (min-width: 768px) {
  .brand-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
}

.brand-text {
  font-weight: 700;
  letter-spacing: -0.05em;
  /* tracking-tighter */
  font-size: 1.125rem;
  /* text-lg */
  text-transform: uppercase;
  color: var(--color-white);
}

@media (min-width: 768px) {
  .brand-text {
    font-size: 1.25rem;
    /* text-xl */
  }
}

/* Navigation Links */
.header-nav {
  display: none;
}

@media (min-width: 1024px) {
  .header-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    /* gap-10 */
    font-size: 0.75rem;
    /* text-xs */
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    /* tracking-widest */
    color: var(--color-slate-400);
  }
}

.header-nav a:hover {
  color: var(--color-white);
}

/* --- FOOTER STYLES --- */
.site-footer {
  padding-top: 5rem;
  /* pt-20 */
  padding-bottom: 3rem;
  /* pb-12 */
  border-top: 1px solid rgba(30, 41, 59, 0.5);
  /* border-slate-800/50 */
  background-color: var(--color-slate-950);
}

@media (min-width: 768px) {
  .site-footer {
    padding-top: 8rem;
    /* md:pt-32 */
  }
}

.footer-container {
  max-width: 80rem;
  /* max-w-7xl */
  margin: 0 auto;
  padding: 0 1.5rem;
  /* px-6 */
}

/* Main Grid */
.footer-main-grid {
  display: grid;
  gap: 3rem;
  /* gap-12 */
  margin-bottom: 4rem;
  /* mb-16 */
  align-items: start;
}

@media (min-width: 768px) {
  .footer-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6rem;
    /* md:gap-24 */
    margin-bottom: 6rem;
    /* md:mb-24 */
  }
}

/* Identity Column */
.footer-identity {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  /* space-y-8 */
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-box {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.25rem;
  background-color: rgba(56, 189, 248, 0.2);
  /* bg-sky-500/20 */
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-box i {
  color: var(--color-sky-400);
  width: 0.75rem;
  height: 0.75rem;
}

.footer-tagline {
  color: var(--color-slate-500);
  font-size: 0.75rem;
  /* text-xs */
  line-height: 1.625;
  max-width: 24rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  /* tracking-wider */
}

/* Navigation Sub-grid */
.footer-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  /* gap-12 */
}

.footer-section-title {
  font-size: 0.625rem;
  /* text-[10px] */
  font-family: var(--font-mono);
  color: var(--color-slate-600);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 2rem;
  /* mb-8 */
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* space-y-4 */
}

.footer-links li a {
  font-size: 0.75rem;
  /* text-xs */
  font-weight: 500;
  color: var(--color-slate-400);
}

.footer-links li a:hover {
  color: var(--color-white);
}

.footer-links li a i {
  width: 0.75rem;
  height: 0.75rem;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.25rem;
}

/* Bottom Bar */
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--color-slate-800);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.copyright,
.bottom-links {
  font-size: 0.75rem;
  /* text-xs */
  font-family: var(--font-mono);
  color: var(--color-slate-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.bottom-links {
  display: flex;
  gap: 2.5rem;
}

/* --- GLOBAL TYPOGRAPHY & VARIABLES --- */
:root {
  /* Extended Palette */
  --color-accent-red: #be123c;
  /* Crisis Red */
  --color-accent-blue: #0ea5e9;
  /* Strategic Blue */
  --color-bg: #f8fafc;
  --color-card-bg: #ffffff;
  --color-text-main: #334155;
  --color-text-heading: #1e293b;
  --color-border: #e2e8f0;

  /* Font Families */
  --font-serif: "Merriweather", serif;
}

/* Utilities */
.font-serif {
  font-family: var(--font-serif);
}

.text-accent-red {
  color: var(--color-accent-red);
}

.text-accent-blue {
  color: var(--color-accent-blue);
}

/* --- WHITEPAPER LAYOUT --- */
.wp-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--color-bg);
}

@media (min-width: 1024px) {
  .wp-container {
    grid-template-columns: 20rem minmax(0, 1fr);
  }
}

/* Sidebar */
.wp-sidebar {
  background: var(--color-card-bg);
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  height: auto;
  z-index: 40;
}

@media (max-width: 1023px) {
  .wp-sidebar {
    padding: 1rem 1rem 0 1rem;
    /* Reduce padding on mobile */
    overflow: hidden;
    /* Prevent container from scrolling, let list scroll */
    width: 100%;
    max-width: 100vw;
  }
}

@media (min-width: 1024px) {
  .wp-sidebar {
    padding: 4rem 2.5rem;
    border-right: 1px solid var(--color-border);
    border-bottom: none;
    position: sticky;
    top: 5rem;
    /* Below sticky header */
    height: calc(100vh - 5rem);
    overflow-y: auto;
  }
}

.wp-nav-brand {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.125rem;
  color: var(--color-slate-900);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.wp-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  /* Smooth scroll on iOS */
  scrollbar-width: none;
  /* Hide scrollbar Firefox */
}

.wp-nav-list::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar Chrome/Safari */
}

@media (min-width: 1024px) {
  .wp-nav-list {
    flex-direction: column;
    gap: 0;
    overflow-x: visible;
    padding-bottom: 0;
  }
}

.wp-nav-link {
  display: block;
  white-space: nowrap;
  padding: 0.5rem 0;
  color: var(--color-slate-500);
  font-size: 0.8125rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

@media (min-width: 1024px) {
  .wp-nav-link {
    white-space: normal;
    padding: 0.75rem 0 0.75rem 1.25rem;
    border-bottom: none;
    border-left: 2px solid transparent;
    font-size: 0.8125rem;
    /* Reduced from 0.875rem */
    line-height: 1.4;
  }
}

.wp-nav-link:hover,
.wp-nav-link.active {
  color: var(--color-slate-900);
}

@media (min-width: 1024px) {

  .wp-nav-link:hover,
  .wp-nav-link.active {
    border-left-color: var(--color-accent-red);
  }
}

@media (max-width: 1023px) {
  .wp-nav-link.active {
    border-bottom-color: var(--color-accent-red);
  }
}

.wp-nav-num {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--color-accent-red);
  margin-right: 0.5rem;
}

/* Main Content Area */
.wp-main-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.wp-content {
  padding: 3rem 1.25rem;
  width: 100%;
  max-width: 100%;
  background-color: var(--color-white);
}

@media (min-width: 768px) {
  .wp-content {
    padding: 5rem 4rem;
  }
}

@media (min-width: 1280px) {
  .wp-content {
    padding: 6rem 8rem;
    max-width: 64rem;
    /* Balanced width for desktop */
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.02);
  }
}

/* Article Typography (Prose) */
.wp-article {
  margin: 0 auto;
}

.wp-article h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--color-text-heading);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .wp-article h1 {
    font-size: 3.75rem;
  }
}

.wp-article h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-heading);
  margin-top: 3.5rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .wp-article h2 {
    font-size: 2rem;
    margin-top: 5rem;
  }
}

.wp-section-idx {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  background: var(--color-slate-900);
  color: var(--color-white);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  margin-right: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.wp-subtitle {
  font-size: 1.25rem;
  color: var(--color-accent-red);
  font-weight: 600;
  margin-bottom: 4rem;
  display: block;
  line-height: 1.5;
  max-width: 48rem;
}

@media (min-width: 768px) {
  .wp-subtitle {
    font-size: 1.5rem;
  }
}

.wp-article p {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--color-text-main);
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .wp-article p {
    font-size: 1.25rem;
  }
}

.wp-article strong {
  color: var(--color-slate-900);
  font-weight: 700;
}

.wp-article ul,
.wp-article ol {
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.wp-article li {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

@media (min-width: 768px) {
  .wp-article li {
    font-size: 1.25rem;
  }
}

/* Components */
.highlight-box {
  background-color: #fff1f2;
  /* rose-50 */
  border-left: 5px solid var(--color-accent-red);
  padding: 2.5rem;
  margin: 3.5rem 0;
  font-style: italic;
  font-family: var(--font-serif);
  color: #881337;
  /* rose-900 */
  font-size: 1.25rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .highlight-box {
    font-size: 1.5rem;
    padding: 3rem;
  }
}

/* Data Table */
.table-wrapper {
  overflow-x: auto;
  margin: 3.5rem 0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: white;
  min-width: 600px;
}

@media (min-width: 768px) {
  .data-table {
    font-size: 1rem;
  }
}

.data-table th,
.data-table td {
  padding: 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

/* Ensure first column has enough width to prevent wrapping */
.data-table td:first-child,
.data-table th:first-child {
  min-width: 150px;
  white-space: nowrap;
}

.data-table th {
  background-color: var(--color-slate-50);
  color: var(--color-slate-600);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.data-table tr:last-child td {
  font-weight: 800;
  background-color: #f8fafc;
  color: var(--color-accent-red);
  border-bottom: none;
}

/* Vantage Dark Card */
.nav-card-dark {
  background: linear-gradient(135deg, var(--color-slate-900) 0%, #020617 100%);
  color: var(--color-white);
  border-radius: 1rem;
  padding: 2.5rem;
  margin: 4rem 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
  .nav-card-dark {
    padding: 4rem;
  }
}

.nav-card-dark::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
  border-radius: 50%;
  transform: translate(25%, -25%);
  pointer-events: none;
}

.dark-card-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-white);
  margin-bottom: 1rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .dark-card-title {
    font-size: 2.5rem;
  }
}

.nav-card-dark p {
  color: #cbd5e1 !important;
  /* light slate for secondary text */
  font-size: 1.125rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .nav-card-dark p {
    font-size: 1.25rem;
  }
}

.dark-card-subtitle {
  color: var(--color-accent-blue);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.dark-grid-metrics {
  display: grid;
  gap: 2.5rem;
  margin: 3rem 0;
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  .dark-grid-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

.metric-box h4 {
  color: var(--color-accent-blue);
  font-weight: 800;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-box p {
  color: var(--color-slate-400);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Button */
.btn-action {
  display: inline-block;
  background-color: var(--color-sky-500);
  color: white;
  padding: 1.25rem 2.5rem;
  border-radius: 0.5rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-action:hover {
  background-color: var(--color-sky-400);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  color: white;
}

/* CTA Footer */
.cta-box {
  background-color: #0f172a;
  /* Explicit slate-900 */
  color: #f8fafc;
  /* Explicit slate-50 */
  padding: 3rem;
  margin-top: 5rem;
  border-radius: 1rem;
  border-left: 8px solid var(--color-accent-red);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .cta-box {
    padding: 5rem;
  }
}

@media (max-width: 767px) {
  .cta-box {
    padding: 1.5rem;
    border-left-width: 4px;
  }

  .cta-box h2 {
    font-size: 1.5rem;
    padding-bottom: 1rem;
  }
}

.cta-box h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0;
  padding-bottom: 1.5rem;
}

.cta-box ul {
  margin-top: 2.5rem;
  padding-left: 0;
  list-style: none;
}

.cta-box li {
  color: #cbd5e1 !important;
  /* Explicit slate-300 */
  margin-bottom: 1.5rem;
  padding-left: 2rem;
  position: relative;
  font-size: 1.125rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .cta-box li {
    font-size: 1.25rem;
  }
}

.cta-box li strong {
  color: #ffffff !important;
}

.cta-box li::before {
  content: "→";
  color: #fb7185;
  /* rose-400 for better visibility on dark */
  position: absolute;
  left: 0;
  font-weight: 900;
}