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

  :root {
    --navy:      #0B1F3A;
    --navy-mid:  #122848;
    --navy-card: #162f52;
    --cyan:      #00C1D4;
    --cyan-dim:  #007f8c;
    --coral:     #E05A4B;
    --coral-light: #EC9A8F;
    --slate:     #4A6480;
    --text:      #D8E6F3;
    --text-dim:  #D4E4F0;
    --white:     #F0F6FC;
    --black:	     #000000;
    --border:    rgba(0,193,212,.18);
    --extreme:   #2D0000;
    --severe:    #9E0000;
    --strong:    #FF6900;
    --moderate:  #FFC866;
  }

  html { scroll-behavior: smooth; }

  body {
    font-family: 'Inter', sans-serif;
    background: var(--navy);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  /* ── HEADER ──────────────────────────────── */
  header {
    background: var(--navy-mid);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
  }

  .logo-block {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .logo-icon {
    width: 36px; height: 36px;
    background: var(--cyan);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }

  .logo-icon svg { fill: var(--navy); width: 20px; height: 20px; }

  .logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--white);
    line-height: 1.2;
  }

  .logo-sub {
    font-size: .7rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  nav { display: flex; gap: .25rem; margin-left: auto;}

  nav a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    padding: .4rem .75rem;
    border-radius: 6px;
    transition: color .2s, background .2s;
    white-space: nowrap;
  }

  nav a:hover, nav a.active {
    color: var(--cyan);
    background: rgba(0,193,212,.1);
  }

  /* ── HERO BAND ──────────────────────────── */
  .hero {
    background: linear-gradient(135deg, #0B1F3A 0%, #0e2e50 60%, #0d3050 100%);
    padding: 3.5rem 2rem 3rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
  }

  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 60% 80% at 80% 50%, rgba(0,193,212,.07) 0%, transparent 70%),
      radial-gradient(ellipse 40% 60% at 20% 80%, rgba(224,90,75,.05) 0%, transparent 60%);
    pointer-events: none;
  }

  .hero-inner {
    max-width: 900px;
    position: relative;
  }

  .hero-eyebrow {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: .8rem;
  }

  .hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 1rem;
  }

  .hero h1 span { color: var(--cyan); }

  .hero-desc {
    font-size: .95rem;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 680px;
    margin-bottom: 1.5rem;
  }

  .status-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: rgba(0,193,212,.1);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: .3rem .85rem;
    font-size: .75rem;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--cyan);
  }

  .pulse-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 0 0 rgba(0,193,212,.6);
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0,193,212,.6); }
    70%  { box-shadow: 0 0 0 7px rgba(0,193,212,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,193,212,0); }
  }

   /* ── NAVIGATION MENU FOR MOBILE ─── */
  .nav-toggle {
      display: none;          /* hidden on desktop */
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      width: 32px;
      height: 32px;
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 0;
      margin-top:5px;
    }
    
    .nav-toggle span {
      display: block;
      width: 100%;
      height: 2px;
      background: var(--cyan);
      border-radius: 2px;
      transition: transform .25s, opacity .25s;
    }
    
    /* animate into an X when open */
    .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    
    @media (max-width: 780px) {
      /*.logo-text { font-size: .85rem; }*/
      .logo-sub { font-size: .62rem; }
      
      header {
        flex-wrap: wrap;
        height: auto;
        padding: .75rem 1.25rem;
      }
    
      .nav-toggle { display: flex; }
    
      nav#mainNav {
        display: none;              /* collapsed by default */
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin-top: .75rem;
        border-top: 1px solid var(--border);
        padding-top: .5rem;
      }
    
      nav#mainNav.open { display: flex; }
    
      nav#mainNav a {
        padding: .65rem .5rem;
        font-size: .85rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(0,193,212,.08);
      }
  }
    
  /* ── LANG SWITCH ─── */
  .lang-switch {
      display: flex;
      align-items: center;
      gap: 2px;
      margin-left: auto;
      padding: 3px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 999px;
  }
    
  .lang-switch a {
      display: inline-block;
      padding: 4px 12px;
      font-family: "Space Grotesk", sans-serif;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.03em;
      color: var(--text-dim);
      text-decoration: none;
      border-radius: 999px;
      transition: color 0.2s ease, background 0.2s ease;
  }
    
  .lang-switch a:hover {
    color: var(--white);
  }
    
  .lang-switch a.active {
    color: var(--navy, #0a1628);
    background: var(--cyan);
  }

  /* Collapse into the mobile nav on small screens, next to the toggle button */
  @media (max-width: 768px) {
    .lang-switch {
      order: -1;
      margin-left: 50;
      margin-right: 8px;
      
    }
  }

  /* ── DISCLAIMER ─────────────────────────────────────── */
  .disclaimer-box { 
    background:rgba(224,90,75,.06); 
    border:1px solid rgba(224,90,75,.22); 
    border-left:3px solid var(--coral); 
    border-radius:0 10px 10px 0; 
    padding:1rem 1.25rem; 
  }
  .disclaimer-box p { 
    font-size:.82rem; 
    color:var(--text-dim); 
    line-height:1.6; 
  }
  .disclaimer-box strong { color: var(--coral); }
  
  /* ── PULSE DIVIDER (signature element) ─── */
  .pulse-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--cyan) 30%, var(--coral) 70%, transparent 100%);
    opacity: .35;
    margin: 0;
  }

  /* ── MAIN LAYOUT ────────────────────────── */
  main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
  }

  /* ── SECTION HEADERS ──────────────────── */
  .section-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: .6rem;
  }

  .section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: .6rem;
  }

  .section-lead {
    font-size: .9rem;
    color: var(--text-dim);
    line-height: 1.75;
    /*max-width: 780px;*/
  }
  
  .section-lead a {
    color: var(--cyan);
    text-decoration: none;
    transition: opacity .2s;
  }
  
  /* ── FIGURE CARDS ────────────────────── */
  .fig-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
  }

  .fig-card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .25s, box-shadow .25s;
  }

  .fig-card:hover {
    border-color: rgba(0,193,212,.4);
    box-shadow: 0 4px 24px rgba(0,193,212,.08);
  }

  .fig-card img {
    width: 100%;
    display: block;
    background: #0a1a30;
  }

  .fig-caption {
    padding: .85rem 0.5rem;
    font-size: 0.84rem;
    color: var(--text-dim);
    line-height: 1.5;
    border-top: 1px solid var(--border);
    font-style: italic;
  }

  /* ── DEFINITION BOX ──────────────────── */
  .def-box {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--cyan);
    border-radius: 0 10px 10px 0;
    padding: 1.25rem 1.5rem;
    margin-top: 1.25rem;
  }

  .def-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin-top: .75rem;
  }

  .def-box li {
    font-size: .88rem;
    color: var(--text);
    line-height: 1.6;
    padding-left: 1.1rem;
    position: relative;
  }

  .def-box li::before {
    content: '▸';
    color: var(--cyan);
    position: absolute;
    left: 0;
    font-size: .7rem;
    top: .1em;
  }

  /* ── REFERENCE CITATION ──────────────── */
  .cite-block {
    margin-top: 1.25rem;
    background: rgba(0,0,0,.2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: .82rem;
    color: var(--text-dim);
    line-height: 1.6;
  }

  .cite-block a {
    color: var(--cyan);
    text-decoration: none;
    transition: opacity .2s;
  }

  .cite-block a:hover { opacity: .75; text-decoration: underline; }

  /* ── SST TREND FIGURE (full-width) ───── */
  .fig-full {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1.5rem;
    transition: border-color .25s;
  }

  .fig-full:hover { border-color: rgba(0,193,212,.4); }

  .fig-full img {
    width: 100%;
    display: block;
  }

  .fig-full .fig-caption {
    border-top: 1px solid var(--border);
  }

  /* ── DETREND EXPLAINER ───────────────── */
  .detrend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
  }

  @media (max-width: 680px) {
    .detrend-grid { grid-template-columns: 1fr; }
    .fig-grid { grid-template-columns: 1fr; }
    nav a { font-size: .7rem; padding: .35rem .55rem; }
  }

  /* ── FOOTER ──────────────────────────── */
  footer {
    background: var(--navy-mid);
    border-top: 1px solid var(--border);
    padding: 1.75rem 2rem;
    text-align: center;
    font-size: .76rem;
    color: var(--text-dim);
    line-height: 1.8;
  }

  footer a { color: var(--cyan); text-decoration: none; }
  footer a:hover { text-decoration: underline; }

  /* ── COPERNICUS TAG ───────────────────── */
  .data-tag {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(0,193,212,.07);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .25rem .65rem;
    font-size: .72rem;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-dim);
    margin-top: .75rem;
  }

  .data-tag span { color: var(--cyan); font-weight: 600; }


  .data-tag a {
      color: inherit;
      text-decoration: none;
  }

  /* Lightbox */
.fig-card img { cursor: zoom-in; }
.fig-card:hover {
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 15, 30, 0.92);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#lightbox.open { display: flex; }

#lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 60px rgba(0, 0, 0, .6);
  cursor: zoom-out;
}

#lightbox-caption {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .8rem;
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
  pointer-events: none;
}

#lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: rgba(0,193,212,.12);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--cyan);
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
}

#lightbox-close:hover { background: rgba(0,193,212,.28); }
