/* ==============================================================================
   Antidot Data Dynamics B.V. — Mobile-First High-Performance Design System
   Amsterdam-IX Carrier Telemetry & Deterministic Edge Interconnect
   ============================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d111a;
  --bg-card: rgba(18, 24, 38, 0.72);
  --bg-card-hover: rgba(26, 34, 52, 0.85);
  --bg-glass: rgba(13, 17, 26, 0.82);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  --border-subtle: rgba(255, 255, 255, 0.04);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent: #2563eb;
  --accent-light: #38bdf8;
  --accent-hover: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.35);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --warning: #f59e0b;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --container-max: 1200px;
  --header-height: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Base Reset & Optimizations */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  background-image: 
    radial-gradient(ellipse 60% 40% at 50% -10%, rgba(37, 99, 235, 0.14), transparent),
    radial-gradient(circle at 90% 20%, rgba(16, 185, 129, 0.06), transparent 35%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

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

/* Typography Fluidity */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* Header & Nav */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  max-width: 100vw !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 9, 14, 0.88);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 0 16px var(--accent-glow);
}

.brand span {
  font-weight: 400;
  color: var(--text-secondary);
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Desktop Nav */
nav.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

nav.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
  padding: 8px 0;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--text-primary);
}

nav.main-nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-light);
}

/* Nav CTA & Status */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--success);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* Mobile Toggle Hamburger Button */
.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.mobile-toggle:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.1);
}

.hamburger-icon {
  width: 20px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-toggle.active .hamburger-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-toggle.active .hamburger-icon span:nth-child(2) {
  opacity: 0;
  transform: scale(0.2);
}

.mobile-toggle.active .hamburger-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Backdrop Overlay */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-backdrop.open {
  display: block;
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 18px var(--accent-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 24px var(--accent-glow);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--border-color);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--text-muted);
  color: #fff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* Hero Section */
.hero-section {
  padding: clamp(36px, 8vh, 80px) 0 clamp(32px, 6vh, 64px);
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-full);
  font-size: clamp(0.75rem, 2.5vw, 0.85rem);
  color: var(--text-secondary);
  margin-bottom: clamp(16px, 3vh, 24px);
  max-width: 100%;
  box-sizing: border-box;
}

.badge-pill span {
  color: var(--accent-light);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: clamp(1.85rem, 5.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: clamp(14px, 2.5vh, 20px);
  line-height: 1.18;
}

.gradient-text {
  background: linear-gradient(135deg, #60a5fa 10%, #38bdf8 45%, #34d399 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-desc {
  font-size: clamp(0.95rem, 2.5vw, 1.18rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto clamp(24px, 4vh, 36px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Grids & Layouts */
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: clamp(14px, 2.5vw, 24px);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Modern Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 28px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card:active {
  transform: scale(0.985);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--accent-light);
}

.card h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  margin-bottom: 10px;
}

.card p {
  color: var(--text-secondary);
  font-size: clamp(0.88rem, 2vw, 0.95rem);
  line-height: 1.6;
}

/* Telemetry & Metrics Panel */
.metrics-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 32px);
  margin: clamp(24px, 4vh, 48px) 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.metrics-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #2563eb, #10b981);
}

.metrics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(16px, 3vh, 24px);
  flex-wrap: wrap;
  gap: 12px;
}

.metrics-title h3 {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
}

.metrics-title p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.metric-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: clamp(14px, 2.5vw, 20px);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.metric-box:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: var(--bg-card-hover);
}

.metric-box .label {
  font-size: clamp(0.72rem, 1.8vw, 0.8rem);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.metric-box .val {
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.metric-box .sub {
  font-size: clamp(0.72rem, 1.8vw, 0.8rem);
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Section Head */
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(24px, 5vh, 48px);
}

.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-secondary);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
}

/* Table Responsive (Mobile-friendly) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  margin-bottom: 32px;
  position: relative;
}

.table-scroll-hint {
  display: none;
  font-size: 0.78rem;
  color: var(--accent-light);
  padding: 8px 16px;
  background: rgba(37, 99, 235, 0.1);
  border-bottom: 1px solid var(--border-color);
  text-align: right;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
}

th, td {
  padding: clamp(12px, 2.5vw, 18px) clamp(12px, 2.5vw, 20px);
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge-online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 600;
}

/* FAQ Accordion */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item.active {
  border-color: rgba(56, 189, 248, 0.4);
}

.faq-question {
  width: 100%;
  padding: clamp(16px, 3vw, 20px);
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  gap: 12px;
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  min-width: 20px;
  text-align: center;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent-light);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 clamp(16px, 3vw, 20px);
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding-bottom: clamp(16px, 3vw, 20px);
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: clamp(0.88rem, 2vw, 0.95rem);
  line-height: 1.65;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  font-size: 16px; /* CRITICAL: prevents iOS Safari auto-zoom on input focus */
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
footer.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: clamp(40px, 6vh, 64px) 0 calc(clamp(24px, 4vh, 36px) + var(--safe-bottom));
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 40px);
  margin-bottom: clamp(24px, 4vh, 40px);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 12px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color 0.2s ease;
  display: inline-block;
  padding: 3px 0;
}

.footer-col ul li a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: calc(20px + var(--safe-bottom));
  right: 20px;
  left: 20px;
  max-width: 420px;
  margin: 0 auto;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: #fff;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==============================================================================
   RESPONSIVE & MOBILE-FIRST BREAKPOINTS
   ============================================================================== */

@media (max-width: 990px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 62px;
  }

  /* Hamburger toggle appears */
  .mobile-toggle {
    display: flex;
  }

  /* Hide status pill in header to save room */
  .nav-cta .status-indicator {
    display: none;
  }

  /* Client Portal button in header becomes compact */
  .nav-cta .btn-sm {
    display: none;
  }

  /* Slide-Over Drawer for Mobile Navigation */
  nav.main-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 82vw);
    height: 100vh;
    height: 100dvh;
    background: rgba(11, 15, 24, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
    z-index: 1060;
    padding: 24px 20px calc(24px + var(--safe-bottom)) 20px;
    gap: 8px;
    transform: translateX(105%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  /* Drawer Header */
  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
  }

  .drawer-title {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 700;
  }

  .drawer-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
  }

  nav.main-nav a {
    width: 100%;
    padding: 13px 16px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
  }

  nav.main-nav a:hover,
  nav.main-nav a:active {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
    color: var(--text-primary);
  }

  nav.main-nav a.active {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--accent-light);
  }

  nav.main-nav a.active::after {
    display: none;
  }

  nav.main-nav a::after {
    content: "›";
    font-size: 1.2rem;
    color: var(--text-muted);
  }

  /* Drawer Status Pill */
  .drawer-status-box {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .drawer-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--success);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
  }

  /* Table scroll hint visible on mobile */
  .table-scroll-hint {
    display: block;
  }
}

@media (max-width: 640px) {
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }

  /* Hero buttons full width on small screens */
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  /* Metrics 2x2 grid on mobile */
  .metrics-grid-mobile {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}

@media (max-width: 380px) {
  .brand span {
    display: none;
  }
  .brand-badge {
    display: none;
  }
  .metric-box .val {
    font-size: 1.25rem;
  }
}


/* Global Mobile Overflow Prevention */
section, main, footer, header, .container, .hero-section, .hero-title, 
.hero-desc, .hero-actions, .badge-pill, .metrics-grid-mobile,
.grid-2, .grid-3, .grid-4, .footer-grid, .footer-bottom,
table, .table-responsive, pre, code {
  max-width: 100vw !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
}

.hero-title br {
  display: none;
}

@media (max-width: 860px) {
  .hero-title {
    font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
    word-break: break-word !important;
  }
  
  .gradient-text {
    word-break: break-word !important;
  }
  
  .badge-pill {
    font-size: 0.82rem !important;
    white-space: normal !important;
    text-align: center !important;
  }
}
