/* CyberGrid design system — v2 (light, corporate)
   ======================================================================
   Single source of truth: colors, typography, spacing, shadows, components,
   animations. Every page imports this. Token names preserved from v1 so
   existing inline styles continue to work — only values shift to a refined
   light palette suited to an established professional security firm. */

:root {
  /* --- Palette ----------------------------------------------------- */
  --bg:           #ffffff;          /* page base                   */
  --bg-2:         #f5f8fc;          /* alternating sections        */
  --bg-3:         #ebf0f7;          /* hover / chips               */
  --bg-4:         #e0e7f1;          /* dividers / deep hover       */
  --paper:        #0b1d36;          /* deep navy — primary text    */
  --paper-mute:   #4a5d7a;          /* secondary text              */
  --paper-dim:    #8593a8;          /* labels, captions            */
  --paper-soft:   #aab4c4;          /* on subtle bg                */

  --accent:       #1d4ed8;          /* corporate blue              */
  --accent-bright:#2563eb;
  --accent-deep:  #1e3a8a;
  --accent-soft:  rgba(29, 78, 216, 0.10);
  /* --accent-hover was missing — used by every button:hover in 12+ files.
     Resolved to nothing, so buttons literally disappeared on hover. Fixed
     here once; every reference now darkens cleanly instead of vanishing. */
  --accent-hover: #1e40af;          /* one shade darker than --accent */

  /* Backwards-compat aliases (the old --cyan tokens are referenced widely) */
  --cyan:         var(--accent);
  --cyan-bright:  var(--accent-bright);
  --cyan-deep:    var(--accent-deep);
  --cyan-soft:    var(--accent-soft);

  --teal:         #0f766e;          /* secondary accent            */
  --gold:         #b45309;          /* premium/quaternary accent   */

  --rule:         rgba(11, 29, 54, 0.08);
  --rule-strong:  rgba(11, 29, 54, 0.16);

  /* Semantic colors — readable on white */
  --ok:           #15803d;
  --warn:         #b45309;
  --danger:       #b91c1c;
  --critical:     #7f1d1d;

  /* Elevation & geometry */
  --shadow-xs:    0 1px 2px 0 rgba(11, 29, 54, 0.04);
  --shadow-sm:    0 1px 3px 0 rgba(11, 29, 54, 0.06), 0 1px 2px -1px rgba(11, 29, 54, 0.04);
  --shadow:       0 4px 12px -2px rgba(11, 29, 54, 0.08), 0 2px 4px -2px rgba(11, 29, 54, 0.04);
  --shadow-md:    0 6px 18px -4px rgba(11, 29, 54, 0.10), 0 3px 6px -3px rgba(11, 29, 54, 0.05);
  --shadow-lg:    0 16px 40px -12px rgba(11, 29, 54, 0.18), 0 8px 16px -8px rgba(11, 29, 54, 0.08);
  --shadow-accent:0 14px 40px -16px rgba(29, 78, 216, 0.45);

  --radius-sm:    4px;
  --radius:       8px;
  --radius-lg:    14px;
  --radius-full:  999px;

  /* Motion */
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:       0.15s;
  --t-med:        0.3s;
}

/* --- Reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--paper);
  line-height: 1.55;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* `overflow-x: clip` prevents horizontal scroll but — unlike `hidden` —
     does NOT create a new containing block for sticky positioning. Required
     for the pricing-jump-nav (and any future sticky element) to actually
     pin to the viewport. Falls back to `hidden` in old browsers. */
  overflow-x: clip;
  min-height: 100vh;
}

/* Subtle background atmosphere — a faint blue glow + grid for tech feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(11, 29, 54, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 29, 54, 0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at top, rgba(0,0,0,0.55) 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at top, rgba(0,0,0,0.55) 30%, transparent 75%);
}
body::after {
  content: '';
  position: fixed;
  top: -300px; left: 50%;
  transform: translateX(-50%);
  width: 1200px; height: 700px;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.10) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

::selection { background: var(--accent); color: #fff; }

/* --- Layout -------------------------------------------------------- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}
.container--narrow { max-width: 820px; }
.container--wide   { max-width: 1440px; }

/* --- Typography ---------------------------------------------------- */
.font-serif { font-family: 'Fraunces', Georgia, serif; }
.font-mono  { font-family: 'JetBrains Mono', ui-monospace, monospace; }

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 450;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--paper);
}
h1 { font-size: clamp(42px, 5.4vw, 76px); letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(34px, 4.0vw, 52px); }
h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; }
h4 { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; }

em, .accent-italic { font-style: italic; color: var(--accent); }

p { color: var(--paper-mute); }
strong, b { color: var(--paper); font-weight: 600; }

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}
.eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}
.section-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-top: 14px;
  border-top: 2px solid var(--accent);
  display: inline-block;
  width: fit-content;
  font-weight: 600;
}

/* --- Nav ----------------------------------------------------------- */
.nav {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
}
.logo-mark { width: 28px; height: 28px; color: var(--paper); }
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  color: var(--paper-mute);
  position: relative;
  padding: 6px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--paper); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 2px; background: var(--accent); border-radius: 1px;
}
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 11px 26px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  margin-left: 10px;
  min-width: 140px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.nav-cta:hover {
  background: var(--accent-bright) !important;
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}
.nav-toggle {
  display: none;
  background: none; border: none;
  color: var(--paper); cursor: pointer; padding: 8px;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* --- Buttons ------------------------------------------------------- */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 14px 26px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  border-radius: var(--radius);
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}
.btn-primary svg { width: 16px; height: 16px; }

.btn-secondary {
  background: transparent;
  color: var(--paper);
  padding: 14px 4px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 2px solid var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--t-fast);
}
.btn-secondary:hover { color: var(--accent); border-color: var(--accent); }

.btn-ghost {
  background: #fff;
  color: var(--paper);
  border: 1px solid var(--rule-strong);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover {
  background: var(--bg-2);
  border-color: var(--paper);
  transform: translateY(-1px);
}

/* --- Badges -------------------------------------------------------- */
.badge {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-3);
  color: var(--paper-mute);
  border: 1px solid var(--rule);
}
.badge-yes      { background: rgba(21, 128, 61, 0.10);  color: var(--ok);       border-color: rgba(21, 128, 61, 0.28); }
.badge-no       { background: var(--bg-3);              color: var(--paper-dim); border-color: var(--rule); }
.badge-required { background: rgba(180, 83, 9, 0.10);   color: var(--warn);     border-color: rgba(180, 83, 9, 0.28); }
.badge-critical { background: rgba(127, 29, 29, 0.10);  color: var(--critical); border-color: rgba(127, 29, 29, 0.28); }
.badge-high     { background: rgba(185, 28, 28, 0.10);  color: var(--danger);   border-color: rgba(185, 28, 28, 0.28); }
.badge-medium   { background: rgba(180, 83, 9, 0.10);   color: var(--warn);     border-color: rgba(180, 83, 9, 0.28); }
.badge-low      { background: rgba(29, 78, 216, 0.10);  color: var(--accent);   border-color: rgba(29, 78, 216, 0.28); }
.badge-info     { background: var(--bg-3);              color: var(--paper-mute); border-color: var(--rule); }
.badge-fixed    { background: rgba(21, 128, 61, 0.10);  color: var(--ok);       border-color: rgba(21, 128, 61, 0.28); }

/* --- Cards --------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  padding: 28px;
  border-radius: var(--radius-lg);
  transition: all var(--t-med) var(--ease);
  box-shadow: var(--shadow-xs);
}
.card:hover {
  border-color: var(--rule-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* Icon containers */
.icon-tile {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile.ok    { background: rgba(21, 128, 61, 0.10);  color: var(--ok); }
.icon-tile.warn  { background: rgba(180, 83, 9, 0.10);   color: var(--warn); }
.icon-tile.teal  { background: rgba(15, 118, 110, 0.10); color: var(--teal); }
.icon-tile.gold  { background: rgba(180, 83, 9, 0.10);   color: var(--gold); }
.icon-tile.lg    { width: 56px; height: 56px; border-radius: var(--radius-lg); }
.icon-tile.lg svg{ width: 28px; height: 28px; }

/* Eyebrow + small icon row */
.crumbs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--paper-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.crumbs svg { width: 14px; height: 14px; color: var(--accent); }

/* --- Sections ------------------------------------------------------ */
section { padding: 96px 0; position: relative; z-index: 2; }
.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  margin-bottom: 56px;
  align-items: start;
}

/* Alt-bg section (subtle gray) */
.section-alt { background: var(--bg-2); }

/* --- Page hero (for non-homepage pages) ---------------------------- */
.page-hero {
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--rule);
}
.page-hero h1 { margin-bottom: 22px; max-width: 18ch; }
.page-hero .lead {
  font-size: 19px;
  color: var(--paper-mute);
  max-width: 60ch;
  line-height: 1.6;
}

/* --- Stat cards ---------------------------------------------------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background-color: #fff;
}
.stat-card {
  background: #fff;
  padding: 26px 28px;
  position: relative;
}
.stat-card .num {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--paper);
}
.stat-card .num .unit { font-size: 28px; color: var(--paper-mute); margin-left: 4px; }
.stat-card .lbl {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--paper-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 12px;
  font-weight: 600;
}
.stat-card .src {
  font-size: 12px;
  color: var(--paper-mute);
  margin-top: 10px;
  line-height: 1.5;
}
.stat-card .src a { color: var(--accent); border-bottom: 1px solid transparent; }
.stat-card .src a:hover { border-color: var(--accent); }

/* --- Pill chip / tool chip ---------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--paper);
  font-weight: 600;
}
.chip svg { width: 14px; height: 14px; color: var(--accent); }
.chip.accent { background: var(--accent-soft); border-color: rgba(29, 78, 216, 0.2); color: var(--accent-deep); }

/* --- Footer -------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--rule);
  padding: 72px 0 36px;
  background: var(--bg-2);
}
.foot-inner {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.foot-inner.foot-4col {
  /* legacy 4-column footer (Logo+tagline / Product / Company / Legal) */
  grid-template-columns: 2fr 1fr 1fr 1fr;
}
.foot-tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 14.5px;
  color: var(--paper-mute);
  max-width: 44ch;
  margin-top: 16px;
  line-height: 1.65;
}
@media (max-width: 1100px) {
  .foot-inner { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 24px; }
}
.foot-col h4 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 700;
}
.foot-col a {
  display: block;
  color: var(--paper-mute);
  font-size: 14px;
  padding: 6px 0;
}
.foot-col a:hover { color: var(--paper); }
.foot-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--paper-dim);
  gap: 24px;
  flex-wrap: wrap;
  letter-spacing: 0.04em;
}

/* --- Animations ---------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.9s var(--ease) forwards;
}
.reveal:nth-child(1) { animation-delay: 0.05s; }
.reveal:nth-child(2) { animation-delay: 0.15s; }
.reveal:nth-child(3) { animation-delay: 0.25s; }
.reveal:nth-child(4) { animation-delay: 0.35s; }
.reveal:nth-child(5) { animation-delay: 0.45s; }
.reveal:nth-child(6) { animation-delay: 0.55s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.in-view { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.in-view.visible { opacity: 1; transform: translateY(0); }

@keyframes pulse-node {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.15); }
}
.node-pulse   { transform-origin: center; animation: pulse-node 2.6s ease-in-out infinite; }
.node-pulse-2 { transform-origin: center; animation: pulse-node 2.6s ease-in-out infinite 0.5s; }
.node-pulse-3 { transform-origin: center; animation: pulse-node 2.6s ease-in-out infinite 1.1s; }
.node-pulse-4 { transform-origin: center; animation: pulse-node 2.6s ease-in-out infinite 1.7s; }

@keyframes scan-sweep {
  0%   { transform: translateY(-20%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(120%); opacity: 0; }
}
.scan-line { animation: scan-sweep 4s var(--ease) infinite; }

@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.float-soft { animation: float-soft 6s ease-in-out infinite; }

@keyframes shimmer {
  0%   { background-position: -300px 0; }
  100% { background-position: 300px 0; }
}

@keyframes spin-slow { to { transform: rotate(360deg); } }
.spin-slow { animation: spin-slow 30s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- Utilities ---------------------------------------------------- */
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.serif { font-family: 'Fraunces', Georgia, serif; }
.cyan { color: var(--accent); }
.cyan-bright { color: var(--accent-bright); }
.muted { color: var(--paper-mute); }
.dim { color: var(--paper-dim); }
.text-center { text-align: center; }
.no-underline { text-decoration: none; }
.grid { display: grid; }
.flex { display: flex; }

.divider { height: 1px; background: var(--rule); margin: 56px 0; }

/* --- Responsive --------------------------------------------------- */
@media (max-width: 1100px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .container { padding: 0 22px; }
  section { padding: 64px 0; }
  .section-head { grid-template-columns: 1fr; gap: 28px; margin-bottom: 44px; }
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .foot-bottom { font-size: 10px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 22px;
    background: #fff;
    border: 1px solid var(--rule);
    padding: 16px;
    gap: 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
  }
  .nav-toggle { display: block; }
}

/* ============================================================================
 * Skeleton placeholders for /app dashboard while initial fetch is in flight.
 * dashboard.js overwrites the entire #dash-main subtree on first render, so
 * these styles only matter for the first ~200-800ms. Done right, the
 * perceived load is near-instant; done wrong, you stare at "Loading…".
 * ============================================================================ */
@keyframes skel-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skel-line, .skel-stat, .skel-card {
  background: linear-gradient(90deg, var(--bg-2) 0px, var(--bg-3) 50%, var(--bg-2) 100%);
  background-size: 400px 100%;
  background-repeat: no-repeat;
  animation: skel-shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}
.skel-line { height: 14px; margin: 8px 0; }
.skel-line.skel-line-lg { height: 36px; margin: 0; }
.skel-line.skel-line-xl { height: 28px; margin: 12px 0 6px; }
.skel-line.skel-h2     { height: 22px; margin-bottom: 18px; }
.skel-line.skel-mono   { height: 11px; margin-bottom: 14px; }
.skel-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.skel-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-bottom: 48px; }
.skel-stat { background: var(--bg-2); padding: 24px 28px; }
.skel-section { margin-bottom: 48px; }
.skel-card { height: 200px; border: 1px solid var(--rule); }
@media (max-width: 880px) { .skel-stat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .skel-stat-grid { grid-template-columns: 1fr; } }

/* ============================================================================
 * Mobile polish: shrink chatbot button on small screens so it doesn't cover
 * primary CTAs; tighter hero padding; lift pricing sticky-jump-nav inside
 * its container instead of full-bleed on mobile where horizontal scroll hurts.
 * ============================================================================ */
@media (max-width: 480px) {
  .cg-chat-btn { bottom: 14px !important; right: 14px !important; width: 50px !important; height: 50px !important; }
  .hero { padding-top: 32px !important; padding-bottom: 24px !important; }
  .pricing-jump-nav { padding: 8px 0 !important; }
  .pricing-jump-nav .container { gap: 4px !important; font-size: 10.5px !important; }
  .pricing-jump-nav a { padding: 5px 8px !important; }
  .foot-inner { grid-template-columns: 1fr !important; gap: 24px !important; }
  .foot-tagline { font-size: 13.5px !important; }
}

/* ============================================================================
 * COMPREHENSIVE MOBILE RESPONSIVENESS BLOCK
 * Added after the user (correctly) flagged that several pages have horizontal
 * scroll / cut-off cards at mobile widths. Covers:
 *  - Every multi-column grid CSS class (.services-grid, .price-grid, etc.)
 *  - Every common inline `grid-template-columns: 1fr 1fr...` pattern
 *  - Hero sections that put text + visualization side-by-side
 *  - The pricing jump-nav chip strip that can overflow on narrow viewports
 *  - Footer columns
 *  - Sticky-nav padding so content isn't covered
 * Strategy: progressive collapse — 1100px → 880px → 640px → 480px breakpoints.
 * ============================================================================ */

/* ---------- 1100px and below: collapse 4-column layouts to 2 ---------- */
@media (max-width: 1100px) {
  .stats-grid,
  .comp-grid,
  .steps,
  .what-grid,
  .skel-stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* New 3-up service grid on homepage hero — keep 3 cols but tighten gap */
  div[style*="grid-template-columns:1fr 1.05fr 1fr"] {
    gap: 10px !important;
  }
}

/* ---------- 880px and below: collapse most 2/3-column grids to 1 ---------- */
@media (max-width: 880px) {
  /* Named CSS grids */
  .services-grid,
  .method-grid,
  .samples-grid,
  .quote-grid,
  .price-grid,
  .pt-tier-wrap,
  .compare-grid,
  .method-pillars,
  .att-grid,
  .stats-grid,
  .skel-stat-grid {
    grid-template-columns: 1fr !important;
  }

  /* Inline 3-up, 2-up, and asymmetric column grids */
  div[style*="grid-template-columns:1fr 1.05fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1.4fr"],
  div[style*="grid-template-columns: 1fr 1.4fr"],
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:1.4fr 1fr"],
  div[style*="grid-template-columns: 1.4fr 1fr"],
  div[style*="grid-template-columns:1.5fr 1fr"],
  div[style*="grid-template-columns: 1.5fr 1fr"],
  dl[style*="grid-template-columns:1fr 1fr"],
  dl[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Hero sections that put text + SVG side-by-side */
  .hero > .container,
  .pt-hero .container,
  .s2-hero > .container,
  .ab-hero .container,
  .ab-hero .container[style],
  .signin-shell {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .pt-art,
  .s2-art,
  div.hero-art {
    display: none !important;  /* Hide decorative SVG on mobile to save space */
  }

  /* Pricing family-head: left label col + right blurb col → stack */
  .family-head,
  .pricing-family-head {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Section heads that put label + h2 side-by-side */
  .section-head[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    text-align: left !important;
    justify-items: start !important;
  }

  /* Footer: now 1 column. Already has 5-col grid in main rule. */
  .foot-inner {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .foot-tagline {
    font-size: 14px !important;
    max-width: none !important;
  }

  /* Pricing jump nav: wrap chips, shrink padding */
  .pricing-jump-nav {
    padding: 8px 0 !important;
  }
  .pricing-jump-nav .container {
    gap: 4px !important;
    font-size: 11px !important;
  }
  .pricing-jump-nav a {
    padding: 4px 9px !important;
    font-size: 10.5px !important;
  }

  /* Hero text shouldn't go full font-size on small screens */
  h1 { font-size: clamp(32px, 8vw, 56px) !important; }
  h2 { font-size: clamp(26px, 6vw, 38px) !important; }

  /* Container padding shrinks */
  .container, .container--narrow, .container--wide {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Main nav: hide link cluster, keep logo + CTA visible — relies on existing .nav-toggle */
  /* (already handled by existing rule near the bottom of this file) */
}

/* ---------- 640px and below: tighter spacing, single-col stat grids ---------- */
@media (max-width: 640px) {
  .app-stat-grid,
  .skel-stat-grid,
  .stats-grid,
  .comp-grid,
  .steps,
  .what-grid {
    grid-template-columns: 1fr !important;
  }
  /* Help center TOC sticky → static (already in help.html @980 rule) */

  /* Hide the auxiliary "JUMP TO" label on tiny screens — chips alone are enough */
  .pricing-jump-nav .container > span:first-child { display: none !important; }
}

/* ---------- 480px: chatbot + utility cleanup ---------- */
@media (max-width: 480px) {
  /* Chatbot already shrinks here per earlier rule — also push it down a bit
     so it doesn't cover floating CTAs near the bottom of the viewport */
  .cg-chat-btn { bottom: 12px !important; right: 12px !important; }

  /* Container padding shrinks further */
  .container, .container--narrow, .container--wide {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Hero CTA stack rather than wrap awkwardly */
  .hero-ctas, .ctas {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary,
  .ctas .btn-primary,
  .ctas .btn-secondary,
  .ctas .btn-ghost {
    justify-content: center !important;
    width: 100% !important;
  }

  /* Comparison tables: scroll horizontally rather than wrap weirdly */
  .comp-table, .comp { overflow-x: auto !important; }

  /* Buttons in nav-cta — wider tap target */
  .nav-cta { min-width: 0 !important; padding: 10px 16px !important; font-size: 13px !important; }
}

/* ============================================================================
 * MOBILE RESPONSIVENESS — PATCH 2
 * User caught 3 patterns my first responsive block missed:
 *  (1) inline `grid-template-columns:auto 1fr` on the homepage "three services"
 *      intro (label-LEFT + paragraph-RIGHT layout) — the LEFT column was
 *      collapsing to the arrow icon's width while the RIGHT column wrapped
 *      every word onto its own line.
 *  (2) `.stat-strip` (the 4-up industry-stats grid on the homepage) was using
 *      `repeat(4, 1fr)` and I'd added a rule for `.stats-grid` — wrong class.
 *  (3) /sample-report text overflowing — long tokens like CVE IDs, URLs, and
 *      <pre> blocks pushing the layout wider than viewport. Catch-all overflow
 *      treatment for tables + code blocks + long-string elements.
 * ============================================================================ */

@media (max-width: 880px) {
  /* (1) auto + 1fr label-then-paragraph layout: stack vertically */
  div[style*="grid-template-columns:auto 1fr"],
  div[style*="grid-template-columns: auto 1fr"],
  div[style*="grid-template-columns:1fr auto"],
  div[style*="grid-template-columns: 1fr auto"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* (2) .stat-strip — the actual class used on the homepage 4-up stats.
     Drop to 2-up at tablet, 1-up at phone (below). Borders need to be redone
     because the original used a 1px gap trick for cell separators. */
  .stat-strip {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Hero on homepage uses inline grid-template-columns:1fr 1fr inside the
     .hero > .container — already handled in patch 1, but the OUTER content
     (text vs. SVG) still uses an inline 1fr 1fr or similar — also handle the
     more general "2 columns of equal" pattern with column-count-1 fallback. */
  .hero .container,
  section.hero > div {
    grid-template-columns: 1fr !important;
  }

  /* (3) /sample-report and any other page: wrap or scroll long content. */
  table, .comp-table, .findings-chart, pre, code {
    max-width: 100% !important;
    overflow-x: auto !important;
  }
  pre, code {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: anywhere !important;
  }
  /* Long URLs, CVE IDs, long unbroken tokens: let them break */
  .report p, .report li, .report td, .report dd,
  .h-q p, .h-q li,
  .legal-body p, .legal-body li,
  .faq-a p {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
}

@media (max-width: 640px) {
  /* Stat strip goes single column on phones */
  .stat-strip { grid-template-columns: 1fr !important; }
  /* Pricing comparison table — already has overflow-x:auto from patch 1; make
     sure the table cells don't force a min-width that exceeds the viewport */
  .comp-table { display: block !important; }
  .comp-table tbody, .comp-table thead, .comp-table tr { display: block !important; }
  .comp-table thead { display: none !important; }
  .comp-table tbody tr {
    border-bottom: 1px solid var(--rule);
    padding: 14px 0;
    margin-bottom: 8px;
  }
  .comp-table tbody td {
    display: block !important;
    padding: 6px 0 !important;
    border: none !important;
  }
  .comp-table .center { text-align: left !important; }
}

/* ============================================================================
 * MOBILE RESPONSIVENESS — PATCH 3 (catch-all for every remaining grid pattern)
 * After the user's third report of mobile breakage, audited every distinct
 * grid-template-columns value across all 21 public pages and added explicit
 * collapse rules. Plus a nuclear-option wildcard at <640px that single-
 * columns ANY remaining inline-styled grid that wasn't already named.
 * Safe because admin/app inline grids all have their own @media class rules.
 * ============================================================================ */

@media (max-width: 880px) {
  /* Every distinct inline pattern seen on public pages */
  div[style*="grid-template-columns:1.05fr 0.95fr"],
  div[style*="grid-template-columns: 1.05fr 0.95fr"],
  div[style*="grid-template-columns:1.1fr 1fr"],
  div[style*="grid-template-columns: 1.1fr 1fr"],
  div[style*="grid-template-columns:1.3fr 1fr"],
  div[style*="grid-template-columns: 1.3fr 1fr"],
  div[style*="grid-template-columns:1.4fr 1fr"],
  div[style*="grid-template-columns: 1.4fr 1fr"],
  div[style*="grid-template-columns:220px 1fr"],
  div[style*="grid-template-columns: 220px 1fr"],
  div[style*="grid-template-columns:240px 1fr"],
  div[style*="grid-template-columns: 240px 1fr"],
  div[style*="grid-template-columns:260px 1fr"],
  div[style*="grid-template-columns: 260px 1fr"],
  div[style*="grid-template-columns:280px 1fr"],
  div[style*="grid-template-columns: 280px 1fr"],
  div[style*="grid-template-columns:repeat(2"],
  div[style*="grid-template-columns: repeat(2"],
  div[style*="grid-template-columns:repeat(3"],
  div[style*="grid-template-columns: repeat(3"],
  div[style*="grid-template-columns:repeat(4"],
  div[style*="grid-template-columns: repeat(4"],
  div[style*="grid-template-columns:repeat(5"],
  div[style*="grid-template-columns: repeat(5"],
  div[style*="grid-template-columns:repeat(7"],
  div[style*="grid-template-columns: repeat(7"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

@media (max-width: 640px) {
  /* Nuclear option: collapse every remaining inline-styled grid on the
     public site. Admin/app pages have their own class-based @media rules
     so this doesn't affect them. */
  body:not(.admin-shell):not(.app-shell-body) [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  /* Long unbroken strings (CVE IDs, sample URLs, long hostnames) break */
  body * {
    overflow-wrap: anywhere !important;
  }
  /* But don't let nav-cta wrap */
  .nav-cta { overflow-wrap: normal !important; white-space: nowrap !important; }
}
