/* CortX Diagnostics - shared styles */
:root {
  --navy: #13287a;
  --navy-dark: #0b1a52;
  --blue: #1e4fb8;
  --gold: #c8a24a;
  --ink: #1d2433;
  --muted: #5b6475;
  --bg: #ffffff;
  --bg-soft: #f3f6fb;
  --line: #e2e7f0;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(19, 40, 122, 0.08);
  --max: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e7ecf6;
    --muted: #a9b4c8;
    --bg: #0c1224;
    --bg-soft: #141d33;
    --line: #26324f;
    --shadow: none;
  }
}

:root[data-theme="dark"] {
  --ink: #e7ecf6;
  --muted: #a9b4c8;
  --bg: #0c1224;
  --bg-soft: #141d33;
  --line: #26324f;
  --shadow: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 12px; color: var(--navy); }
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 { color: #c9d6f5; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.lead { font-size: 1.1rem; color: var(--muted); max-width: 760px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: #fff;
  transition: transform .15s ease, background .15s ease;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn:hover { background: var(--navy-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
[data-theme="dark"] .btn-outline { color: #c9d6f5; border-color: #c9d6f5; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1a1500; }
.btn-gold:hover { background: #b08c36; border-color: #b08c36; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand img { height: 44px; width: auto; }
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--navy); }
.nav-links a.active {
  color: var(--navy);
  background: var(--bg-soft);
  box-shadow: inset 0 -2px 0 var(--gold);
}
[data-theme="dark"] .nav-links a.active { color: #c9d6f5; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
}
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  color: var(--ink);
  font-size: 1rem;
  flex-shrink: 0;
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .nav-wrap { position: relative; }
}

/* Hero */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(120deg, rgba(11, 26, 82, 0.96) 0%, rgba(19, 40, 122, 0.88) 55%, rgba(30, 79, 184, 0.6) 100%), var(--navy-dark);
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.hero h1 { color: #fff; }
.hero .lead { color: #d6def2; }
.hero .eyebrow { color: #e3c77e; }
.hero-img {
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  width: 100%;
  height: auto;
}
.hero-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  max-width: none;
  aspect-ratio: 1026 / 802;
  object-fit: fill;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 75%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 75%, transparent 100%);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(6, 14, 42, 0.95) 0%, rgba(6, 14, 42, 0) 40%),
    linear-gradient(to right, rgba(6, 14, 42, 0.92) 0%, rgba(6, 14, 42, 0.5) 45%, rgba(6, 14, 42, 0) 75%);
}
.hero { min-height: clamp(560px, 86vh, 800px); background: #0a1740; }
.hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: none;
  margin: 0;
  width: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  padding: clamp(150px, 36vh, 300px) 16px 56px max(16px, 4vw);
}
.hero-content h1 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.6rem); max-width: 900px; }
.hero-content h1 span { color: var(--gold); }
.hero-content .lead { color: #e6ecfa; max-width: 880px; }
.hero-links { margin-top: 18px; gap: 28px; }
.hero-links a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
}
.hero-links a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
}

/* Page banner (inner pages) */
.page-banner {
  background: linear-gradient(120deg, var(--navy-dark), var(--navy));
  color: #fff;
  padding: 56px 0;
}
.page-banner h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-banner .lead { color: #d6def2; }
.page-banner .eyebrow { color: #e3c77e; }

/* Cards & grids */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 32px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card .icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.card p { color: var(--muted); margin: 0 0 8px; }
.card ul { padding-left: 18px; color: var(--muted); margin: 8px 0 0; }
.card .card-link { font-weight: 600; text-decoration: none; }

/* Check list */
.checks { list-style: none; padding: 0; margin: 12px 0; }
.checks li { padding: 6px 0 6px 28px; position: relative; }
.checks li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--gold);
  font-weight: 700;
}

/* Two column */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Steps */
.steps {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 32px;
  counter-reset: step;
}
.step {
  border-left: 4px solid var(--gold);
  background: var(--bg);
  padding: 18px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.step .num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
}
.step p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* Tabs (used on Products and Stay Informed) */
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--line);
  margin-bottom: 28px;
}
.tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn[aria-selected="true"] {
  color: var(--navy);
  border-bottom-color: var(--gold);
}
[data-theme="dark"] .tab-btn[aria-selected="true"] { color: #c9d6f5; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Product feature rows */
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 860px) { .product-hero { grid-template-columns: 1fr; } }
.badge {
  display: inline-block;
  background: var(--bg-soft);
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0 6px 6px 0;
}
[data-theme="dark"] .badge { color: #c9d6f5; }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.95rem;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table th { color: var(--navy); width: 36%; }
[data-theme="dark"] .spec-table th { color: #c9d6f5; }

/* Forms */
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.form label { font-size: 0.9rem; font-weight: 600; display: grid; gap: 6px; }
.form input, .form select, .form textarea {
  font: inherit;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.form textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--muted); }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list strong { display: block; color: var(--navy); }
[data-theme="dark"] .contact-list strong { color: #c9d6f5; }

/* Callout & disclaimer */
.callout {
  background: var(--bg-soft);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 24px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer {
  background: var(--navy-dark);
  color: #c9d3ea;
  padding: 56px 0 24px;
  font-size: 0.95rem;
}
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a { color: #c9d3ea; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand img { height: 44px; width: auto; margin-bottom: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 36px;
  padding-top: 18px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.cta-band {
  background: linear-gradient(120deg, var(--navy), var(--blue));
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
}
.cta-band h2, .cta-band h3 { color: #fff; }
.cta-band p { color: #dbe4fa; }
.cta-band .btn-outline { color: #fff; border-color: #fff; }
.cta-band .btn-outline:hover { background: #fff; color: var(--navy); }

.quote-block {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  margin-top: 28px;
}
[data-theme="dark"] .quote-block { color: #c9d6f5; }

details.faq {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
  background: var(--bg);
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
}
[data-theme="dark"] details.faq summary { color: #c9d6f5; }
details.faq p, details.faq ul { color: var(--muted); margin: 10px 0 0; }

.faq-group { margin-bottom: 40px; }

/* Photography */
.photo {
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-soft);
}
/* Photos show at their FULL natural proportions (no cropping, no zoom).
   The surrounding frame is only for rounded corners and shadow. */
.photo img {
  width: 100%;
  height: auto;
  display: block;
}
.photo figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(11, 26, 82, 0.85);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.photo-band {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
}
.photo-band { align-items: start; }
@media (max-width: 860px) { .photo-band { grid-template-columns: 1fr 1fr; } .photo-band .photo:first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .photo-band { grid-template-columns: 1fr; } }

/* Mobile responsiveness */
img, video, iframe { max-width: 100%; }
.form input, .form select, .form textarea { font-size: 16px; } /* prevents iOS zoom */

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  section { padding: 48px 0; }
  .container { padding: 0 18px; }
  .hero .hero-content { padding: 120px 18px 40px; }
  .hero .hero-content h1 { font-size: 1.85rem; }
  .hero-links { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-bg { width: 100%; height: 100%; transform: none; left: 0; aspect-ratio: auto; object-fit: cover; object-position: 60% center; -webkit-mask-image: none; mask-image: none; }
  .hero .hero-content { padding-top: 130px; }
  .hero { min-height: 620px; }
  .page-banner { padding: 40px 0; }
  .btn-row .btn { width: 100%; text-align: center; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .steps { grid-template-columns: 1fr; }
  .product-hero { gap: 24px; }
  .spec-table th, .spec-table td { display: block; width: 100%; padding: 6px 0; }
  .spec-table th { padding-top: 12px; border-bottom: none; }
  .spec-table td { padding-bottom: 12px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { white-space: nowrap; flex-shrink: 0; }
  .cta-band { padding: 32px 20px; }
  .card { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; }
  .nav-wrap { min-height: 64px; }
  .brand img { height: 38px; }
  .split, .product-hero { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .hero .hero-content h1 { font-size: 1.6rem; }
  .brand img { height: 32px; }
}

/* ==========================================================
   Page-level building blocks (added with the content update)
   ========================================================== */

/* Full-width photo banner used at the top of inner pages.
   The image sits behind a navy gradient so text stays readable. */
.banner-photo {
  position: relative;
  color: #fff;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
}
.banner-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.banner-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(6, 14, 42, 0.92) 10%, rgba(6, 14, 42, 0.45) 60%, rgba(6, 14, 42, 0.25));
}
.banner-photo .container {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  padding-bottom: 48px;
}
.banner-photo h1 { color: #fff; }
.banner-photo .lead { color: #e6ecfa; }
.banner-photo .eyebrow { color: #e3c77e; }

/* Icon-led card used for services and values */
.feature-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(19, 40, 122, 0.14); }
.feature-card .chip {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.feature-card p { color: var(--muted); margin: 0 0 8px; }
.feature-card ul { padding-left: 18px; color: var(--muted); margin: 8px 0 0; }

/* Numbered value rows: a Feature / Benefit / Usability trio, as cards */
.value-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.value-row > div { padding: 20px 22px; border-right: 1px solid var(--line); }
.value-row > div:last-child { border-right: none; }
.value-row .head { font-weight: 700; color: var(--navy); background: var(--bg-soft); }
[data-theme="dark"] .value-row .head { color: #c9d6f5; }
.value-row .quote { font-style: italic; color: var(--muted); }
@media (max-width: 720px) {
  .value-row { grid-template-columns: 1fr; }
  .value-row > div { border-right: none; border-bottom: 1px solid var(--line); }
  .value-row > div:last-child { border-bottom: none; }
}

/* Location blocks (used on contact, partner and services pages) */
.location {
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  background: var(--bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.location strong { display: block; color: var(--navy); margin-bottom: 4px; }
[data-theme="dark"] .location strong { color: #c9d6f5; }
.location p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Two-up image + text row with a gold rule above the eyebrow */
.lead-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
}

/* Small inline stat chips (e.g. "256 Hz", "32 channels") */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.stat {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat b { display: block; font-size: 1.5rem; color: var(--navy); }
[data-theme="dark"] .stat b { color: #c9d6f5; }
.stat span { font-size: 0.85rem; color: var(--muted); }

.reveal-note { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }

/* ----------------------------------------------------------
   Dropdown menus in the header (Services, Stay Informed)
   Desktop: appear on hover / keyboard focus.
   Mobile: the .nav-links panel opens; submenus are always listed under their parent.
   ---------------------------------------------------------- */
.nav-links > li { position: relative; }
.nav-links > li.has-menu > a::after {
  content: " \25BE";           /* small down-arrow to show a dropdown exists */
  font-size: 0.75em;
}
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: min(380px, calc(100vw - 32px));
  min-width: 280px;
  max-height: min(70vh, 620px);
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(19, 40, 122, 0.16);
  z-index: 200;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.submenu a { white-space: normal; line-height: 1.35; font-size: 0.9rem; padding: 9px 12px; }
.has-menu:hover > .submenu,
.has-menu:focus-within > .submenu { display: block; }
/* Keep the larger Stay Informed menu inside the viewport when the header
   is narrow and the navigation is aligned toward the right. */
.nav-links > li:nth-child(4) > .submenu { left: auto; right: 0; }
@media (max-width: 960px) {
  .nav-links > li.has-menu > a::after { content: ""; }
  .submenu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 6px 14px;
    min-width: 0;
    width: auto;
    max-width: none;
    max-height: none;
    overflow: visible;
  }
  .submenu a { white-space: normal; font-size: 0.88rem; padding: 7px 12px; color: var(--muted); }
  .nav-links > li:nth-child(4) > .submenu { left: auto; right: auto; }
}

/* Clickable tiles: a whole card that links to a page.
   The link wraps the card, so the card keeps its normal look. */
a.tile { display: block; color: inherit; text-decoration: none; height: 100%; }
a.tile .feature-card,
a.tile .card { height: 100%; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
a.tile:hover .feature-card,
a.tile:hover .card { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(19, 40, 122, 0.16); border-color: var(--gold); }
a.tile:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: var(--radius); }
.tile-cta { color: var(--navy); font-weight: 600; font-size: 0.92rem; margin-top: 10px; display: inline-block; }
[data-theme="dark"] .tile-cta { color: #c9d6f5; }

/* Article page layout */
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--blue); }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(220px, 1fr);
  gap: 40px;
  align-items: start;
}
.article-main p { color: var(--ink); font-size: 1.02rem; }
.article-h { margin-top: 32px; font-size: 1.5rem; }
.article-aside { position: sticky; top: 96px; }
@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
}

/* Category filter buttons on the Stay Informed page */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; }
.filter-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.filter-btn[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ----------------------------------------------------------
   Photo layout on the home page
   Row 1: one full-width photo. Row 2: two photos side by side.
   Each image keeps its own proportions, so nothing is cropped.
   ---------------------------------------------------------- */
.photo-stack { display: grid; gap: 22px; margin-top: 32px; }
.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;      /* top-aligned, so heights may differ without gaps */
}
@media (max-width: 720px) {
  .photo-pair { grid-template-columns: 1fr; }
}

/* Cards and steps: a gentle fade and rise as they scroll into view.
   Only active when JavaScript runs (html.js-reveal). */
.js-reveal .reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.js-reveal .reveal-up.is-visible { opacity: 1; transform: none; }
/* Keep the hover lift working after the scroll reveal has finished */
.js-reveal .reveal-up.is-visible:hover { transform: translateY(-6px); }
/* Staggered delays so a row of cards appears in sequence */
.js-reveal .reveal-up[data-delay="1"] { transition-delay: .08s; }
.js-reveal .reveal-up[data-delay="2"] { transition-delay: .16s; }
.js-reveal .reveal-up[data-delay="3"] { transition-delay: .24s; }
.js-reveal .reveal-up[data-delay="4"] { transition-delay: .32s; }

/* Photos lift slightly on hover (no zoom, so the picture stays whole) */
.photo { transition: transform .3s ease, box-shadow .3s ease; }
.photo:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(19, 40, 122, 0.18); }

/* ----------------------------------------------------------
   Mobile refinements (phones 360px to 720px)
   ---------------------------------------------------------- */
@media (max-width: 720px) {
  /* Stats wrap into two tidy columns */
  .stats { grid-template-columns: repeat(2, 1fr); }
  /* Long headings scale down so they never overflow */
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }
  /* Banners: shorter, text stays readable */
  .banner-photo { min-height: 300px; }
  .banner-photo .container { padding-top: 90px; padding-bottom: 32px; }
  /* Tiles and cards take the full width */
  .grid { grid-template-columns: 1fr; }
  /* Article layout stacks */
  .article-layout { grid-template-columns: 1fr; }
  /* Tables and spec blocks never overflow sideways */
  .value-row { overflow-wrap: anywhere; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .hero .hero-content h1 { font-size: 1.6rem; }
}

/* ----------------------------------------------------------
   Focus effect for boxes (cards, feature tiles, process steps)
   - The box under the cursor (or keyboard focus) lifts and gets a gold accent.
   - Its neighbours in the same group soften, so attention stays on one box.
   Applies to every .card, .feature-card and .step on the site.
   ---------------------------------------------------------- */
.card,
.feature-card,
.step {
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease,
              border-color .35s ease, opacity .35s ease;
}
.card:hover,
.feature-card:hover,
.step:hover,
.card:focus-within,
.feature-card:focus-within,
.step:focus-within {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 18px 44px rgba(19, 40, 122, 0.16);
}
/* Steps: a gold bar grows along the left edge on hover */
.step { position: relative; }
.step::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .35s ease;
}
.step:hover::after { transform: scaleY(1); }
/* Icon chips brighten and tilt slightly when their card is hovered */
.card:hover .chip,
.feature-card:hover .chip,
.card:hover .icon,
.feature-card:hover .icon {
  transform: rotate(-6deg) scale(1.08);
  transition: transform .35s ease;
}
.chip, .icon { transition: transform .35s ease; }
/* Focus on one box in a group: siblings in the same grid soften */
.grid:hover > .card:not(:hover),
.grid:hover > .feature-card:not(:hover),
.grid:hover > a.tile:not(:hover) > .card,
.grid:hover > a.tile:not(:hover) > .feature-card,
.steps:hover > .step:not(:hover) {
  opacity: .72;
}
/* Keyboard users get the same focus ring */
a.tile:focus-visible .card,
a.tile:focus-visible .feature-card { outline: 3px solid var(--gold); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-reveal .reveal-up { opacity: 1; transform: none; }
  .card:hover, .feature-card:hover, .step:hover { transform: none; }
}

/* Next-step block on the Contact page: centred intro, logo, then four action tiles */
.next-step-inner { text-align: center; }
.next-step-logo { height: 64px; width: auto; margin: 0 auto 18px; }   /* logo has a transparent background */
.next-step-grid { text-align: left; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.next-step-tagline { margin-top: 36px; }

/* Figures inside an article section: a responsive grid, images shown whole */
.article-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 20px 0 8px;
}
.article-fig { margin: 0; }
.article-fig figcaption { position: static; display: inline-block; margin-top: 10px; background: var(--navy); }

/* Figures inside an article section: a responsive grid, images shown whole */
.article-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 20px 0 8px;
}
.article-fig { margin: 0; }
.article-fig figcaption { position: static; display: inline-block; margin-top: 10px; background: var(--navy); }

/* ----------------------------------------------------------
   Rich article blocks (used by article-page.js renderBlock)
   ---------------------------------------------------------- */
.article-sec { margin-bottom: 8px; }
.article-kicker {                 /* small gold line under a section heading */
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .04em;
  margin: -4px 0 14px;
}
.block-label { font-weight: 600; color: var(--ink); margin: 14px 0 10px; }

/* Bullet lists shown as pills: easy to scan symptoms and risk factors */
.pill-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill-list li {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: .95rem;
  color: var(--ink);
  transition: border-color .25s ease, transform .25s ease;
}
.pill-list li:hover { border-left-color: var(--gold); transform: translateY(-2px); }

/* Boxed panels: used for the NCSE part of the non-convulsive seizures article */
.article-panel {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 4px 24px 18px;
  margin: 24px 0;
}
.article-panel .pill-list li { background: var(--bg); }

/* Key message box */
.key-message {
  background: linear-gradient(120deg, var(--navy), var(--blue));
  color: #fff;
  border-left: 5px solid var(--gold);
  padding: 22px 26px;
}
.key-message h3 { color: #e3c77e; margin-bottom: 6px; }
.key-message p { color: #fff !important; font-size: 1.05rem; }

/* Contact strip at the end of an article */
.contact-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 18px 0 24px;
}
.contact-strip a { font-weight: 600; }

@media (max-width: 720px) {
  .article-panel { padding: 2px 16px 14px; }
  .pill-list li { font-size: .9rem; }
}


/* More article blocks: normal bullets, sub-headings, info cards */
.bullet-list { padding-left: 22px; margin: 0 0 16px; }
.bullet-list li { margin-bottom: 8px; }
.article-h3 { margin-top: 22px; font-size: 1.2rem; }
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 6px 0 20px;
}
.info-card { border-top: 3px solid var(--gold); }
.info-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.info-card .checks { margin: 6px 0 0; }
.info-card .checks li { padding: 4px 0 4px 24px; font-size: .95rem; }
.info-card-label { font-weight: 600; color: var(--ink) !important; margin: 4px 0 0 !important; }
.info-card-note { font-style: italic; margin-top: 10px !important; }


/* Short highlighted answer at the start of a Q&A section (e.g. "Yes.") */
.answer-badge {
  display: inline-block;
  background: var(--gold);
  color: #1a1500 !important;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 16px;
  margin: 2px 0 10px;
}


/* Article table (e.g. Protecting Brain Health). Desktop: normal table.
   Phones: each row becomes a card, with column names shown from data-label. */
.table-wrap { overflow-x: auto; margin: 10px 0 20px; }
.info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .97rem;
}
.info-table th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
}
.info-table td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.info-table td:first-child { font-weight: 700; color: var(--navy); width: 24%; }
[data-theme="dark"] .info-table td:first-child { color: #c9d6f5; }
.info-table tbody tr:nth-child(even) td { background: var(--bg-soft); }
.info-table tbody tr { transition: background .2s ease; }
.info-table tbody tr:hover td { background: rgba(200, 162, 74, 0.12); }
@media (max-width: 720px) {
  .info-table, .info-table tbody, .info-table tr, .info-table td { display: block; width: 100%; }
  .info-table thead { display: none; }
  .info-table { border: none; }
  .info-table tr {
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    border-radius: 10px;
    margin-bottom: 12px;
    background: var(--bg);
  }
  .info-table td { border-top: none; padding: 8px 14px; }
  .info-table td:first-child { width: 100%; font-size: 1.05rem; padding-top: 14px; }
  .info-table td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gold);
  }
  .info-table tbody tr:nth-child(even) td { background: transparent; }
}

/* Highlighted note line */
.note-line {
  background: rgba(200, 162, 74, 0.12);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 14px;
}
