/* Mithris — SRE Governance Platform
   Shared design system */

:root {
  /* Accent — cool cyan-blue (oklch 0.72 0.13 220) */
  --accent: oklch(0.74 0.13 220);
  --accent-2: oklch(0.62 0.13 220);
  --accent-soft: color-mix(in oklch, var(--accent) 14%, transparent);
  --accent-line: color-mix(in oklch, var(--accent) 30%, transparent);

  /* Graphite scale */
  --bg: #07090d;
  --bg-1: #0b0e14;
  --bg-2: #11151e;
  --surface: #161b26;
  --surface-2: #1c2230;
  --border: #232a39;
  --border-strong: #2f3848;
  --border-faint: #1a202c;

  /* Text */
  --text: #e9ecf1;
  --text-2: #b1b8c4;
  --muted: #7b8492;
  --faint: #565d6c;

  /* Semantic */
  --ok: oklch(0.78 0.14 150);
  --warn: oklch(0.80 0.13 80);
  --danger: oklch(0.70 0.17 25);

  /* Typography */
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Layout */
  --shell: 1240px;
  --shell-wide: 1360px;
  --gutter: clamp(20px, 4vw, 40px);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "cv11";
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 80% -10%, color-mix(in oklch, var(--accent) 8%, transparent) 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, color-mix(in oklch, var(--accent) 5%, transparent) 0%, transparent 55%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent-soft); color: var(--text); }

/* Typography */
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.035em; font-weight: 460; }
h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -0.028em; }
h3 { font-size: clamp(20px, 1.6vw, 24px); letter-spacing: -0.018em; }
h4 { font-size: 16px; letter-spacing: -0.01em; }
p  { margin: 0; line-height: 1.55; color: var(--text-2); }

.mono   { font-family: var(--f-mono); font-feature-settings: "ss01", "ss02"; }
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 20%, transparent);
  border-radius: 1px;
  display: inline-block;
}

.muted { color: var(--muted); }
.dim   { color: var(--faint); }

/* Layout */
.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.shell-wide { max-width: var(--shell-wide); }

section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
section + section { border-top: 1px solid var(--border-faint); }

.section-head { max-width: none; margin-bottom: 56px; display: flex; flex-direction: column; gap: 18px; }
.section-head .lead { font-size: 18px; color: var(--text-2); max-width: 88ch; }

/* ───────── NAV ───────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  background: color-mix(in oklch, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--border-faint);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-left { display: flex; align-items: center; gap: 44px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 14px; color: var(--text-2); position: relative;
  transition: color .15s ease;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }
.nav-links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 1px; background: var(--accent);
}
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; letter-spacing: -0.01em; font-size: 17px; }
.logo-mark { width: 22px; height: 22px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #051018;
  font-weight: 550;
}
.btn-primary:hover { background: color-mix(in oklch, var(--accent) 88%, white); transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--border-strong); }
.btn-link {
  height: auto; padding: 0;
  color: var(--text);
  border: 0;
}
.btn-link:hover { color: var(--accent); }
.btn-link::after { content: " →"; transition: transform .15s ease; }
.btn-link:hover::after { transform: translateX(3px); }

.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 9px; }

/* Pills, badges, chips */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--text-2);
  letter-spacing: 0.02em;
}
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }
.chip-ok .dot { background: var(--ok); }
.chip-warn .dot { background: var(--warn); }
.chip-danger .dot { background: var(--danger); }

.tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: color-mix(in oklch, var(--surface) 60%, transparent);
}

/* Cards */
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--border-strong); }
.card-hd { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.card-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: grid; place-items: center;
  color: var(--accent);
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--text-2); }

/* Grid system for cards */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Surface variations */
.surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.surface-quiet { background: var(--bg-2); border: 1px solid var(--border-faint); border-radius: var(--r); }

/* Code block / terminal look */
.term {
  font-family: var(--f-mono);
  font-size: 12.5px;
  background: var(--bg);
  border: 1px solid var(--border-faint);
  border-radius: 8px;
  color: var(--text-2);
  line-height: 1.7;
  padding: 16px 18px;
}
.term .kw { color: var(--accent); }
.term .com { color: var(--faint); }
.term .num { color: var(--warn); }
.term .ok { color: var(--ok); }
.term .err { color: var(--danger); }

/* Grid background */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--border) 55%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--border) 55%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 30%, black 30%, transparent 75%);
  pointer-events: none;
  opacity: 0.6;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-faint);
  padding: 64px 0 28px;
  background: linear-gradient(180deg, transparent, color-mix(in oklch, var(--bg-1) 60%, transparent));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 56px;
}
.footer-col h5 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-2); font-size: 14px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-faint);
  font-size: 13px; color: var(--muted);
}
.footer-bottom .mono { font-size: 11px; }
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Hero */
.hero { padding: clamp(32px, 4vw, 56px) 0 clamp(48px, 6vw, 80px); position: relative; overflow: hidden; }
.hero h1 .accent { color: var(--accent); }
.hero .ribbon { color: var(--text-2); }

/* Lifecycle ribbon */
.lifecycle {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--border);
}
.lifecycle-step {
  background: var(--surface);
  padding: 22px 20px;
  position: relative;
  transition: background .2s ease;
}
.lifecycle-step h4 { font-size: 14px; margin-bottom: 6px; }
.lifecycle-step .step-num { font-family: var(--f-mono); font-size: 10.5px; color: var(--accent); letter-spacing: 0.16em; margin-bottom: 14px; }
.lifecycle-step.is-current { background: linear-gradient(180deg, color-mix(in oklch, var(--accent) 14%, var(--surface)) 0%, var(--surface) 100%); }
.lifecycle-step .desc { font-size: 13px; color: var(--muted); }
@media (max-width: 880px) { .lifecycle { grid-template-columns: 1fr; } }

/* Two-up: text + visual */
.two-up { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.two-up.reverse { grid-template-columns: 1fr 1.05fr; }
.two-up.reverse .visual { order: -1; }
@media (max-width: 980px) { .two-up, .two-up.reverse { grid-template-columns: 1fr; } .two-up.reverse .visual { order: 0; } }

/* Stat strip */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border-faint);
  border-bottom: 1px solid var(--border-faint);
}
.stat-strip > div { padding: 24px; border-right: 1px solid var(--border-faint); }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip .v { font-size: 32px; letter-spacing: -0.03em; }
.stat-strip .v .unit { color: var(--muted); font-size: 16px; margin-left: 2px; }
.stat-strip .l { font-family: var(--f-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; margin-top: 6px; }
@media (max-width: 760px) { .stat-strip { grid-template-columns: 1fr 1fr; } .stat-strip > div:nth-child(2n) { border-right: 0; } }

/* CTA block */
.cta-block {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 56px;
  background:
    radial-gradient(600px 300px at 80% -20%, color-mix(in oklch, var(--accent) 18%, transparent), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
  display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center;
}
@media (max-width: 760px) { .cta-block { grid-template-columns: 1fr; padding: 36px; } }

/* Animated dot pulses */
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
.pulse { animation: pulse 2.2s ease-in-out infinite; transform-origin: center; }

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* Dashboard / readiness scoring mock */
.readiness-ring {
  width: 64px; height: 64px; position: relative;
  display: grid; place-items: center;
  font-family: var(--f-mono);
}
.readiness-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.readiness-ring .v { font-size: 14px; font-weight: 500; color: var(--text); }

.readiness-bar {
  height: 6px; border-radius: 99px;
  background: color-mix(in oklch, var(--border) 50%, transparent);
  overflow: hidden;
}
.readiness-bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklch, var(--accent) 70%, white));
  border-radius: 99px;
}

/* Detail list (definition) */
dl.detail { display: grid; grid-template-columns: 1fr; gap: 14px; }
dl.detail > div { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 14px 0; border-top: 1px solid var(--border-faint); }
dl.detail dt { font-family: var(--f-mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
dl.detail dd { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; }
@media (max-width: 640px) { dl.detail > div { grid-template-columns: 1fr; gap: 6px; } }

/* Maturity step */
.maturity {
  display: grid; gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.maturity-row {
  display: grid; grid-template-columns: 70px 1fr 1.6fr 140px;
  gap: 24px; align-items: center;
  background: var(--surface);
  padding: 28px 24px;
}
.maturity-row .lv { font-family: var(--f-mono); font-size: 26px; color: var(--accent); }
.maturity-row h3 { font-size: 19px; }
.maturity-row .desc { font-size: 14px; color: var(--text-2); }
.maturity-row .meter { display: flex; align-items: center; gap: 8px; }
.maturity-row .meter .readiness-bar { flex: 1; }
.maturity-row .meter .val { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .maturity-row { grid-template-columns: 1fr; gap: 8px; padding: 20px; }
}

/* Industry pill row */
.industry-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}

/* Tabs */
.tabs {
  display: inline-flex; padding: 4px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  gap: 2px;
}
.tabs button {
  height: 32px; padding: 0 14px;
  font-size: 13px; color: var(--text-2);
  border-radius: 7px;
  transition: all .15s ease;
}
.tabs button[aria-selected="true"] {
  background: var(--surface); color: var(--text);
  box-shadow: 0 0 0 1px var(--border);
}
.tabs button:hover { color: var(--text); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--f-sans);
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  background: var(--bg-1);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* Page hero (inner pages) */
.page-hero { padding: clamp(36px, 4.5vw, 60px) 0 clamp(28px, 3.5vw, 48px); position: relative; }
.page-hero h1 { font-size: clamp(36px, 5vw, 56px); }
.page-hero .lead { font-size: 19px; color: var(--text-2); max-width: 90ch; margin-top: 22px; }

/* Topology svg styling */
.topo line { stroke: var(--border-strong); stroke-width: 1; }
.topo line.active { stroke: var(--accent); stroke-opacity: 0.6; }
.topo .node circle { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1; }
.topo .node.ok circle { stroke: var(--accent); fill: color-mix(in oklch, var(--accent) 14%, var(--surface)); }
.topo .node.warn circle { stroke: var(--warn); fill: color-mix(in oklch, var(--warn) 14%, var(--surface)); }
.topo .node text { fill: var(--text-2); font-family: var(--f-mono); font-size: 9px; }

/* Utility */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mb-12 { margin-bottom: 12px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-12 { margin-top: 12px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

/* Tweaks panel injected later */
.tweaks-host { position: fixed; right: 20px; bottom: 20px; z-index: 100; }

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { background: var(--bg-2); }
.nav-toggle svg { width: 18px; height: 18px; }

/* Mobile menu — hidden on desktop, shown by media query below */
.mobile-menu { display: none; }

@media (max-width: 920px) {
  /* Nav switches to mobile: hamburger + slide-down menu */
  .nav-toggle { display: inline-flex; }
  .nav-left .nav-links { display: none; }
  .nav-right .btn-ghost,
  .nav-right .btn-primary { display: none; }
  .nav-left { gap: 0; }

  .mobile-menu {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    z-index: 49;
    padding: 16px var(--gutter) 24px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .mobile-menu.is-open { display: block; }
  .mobile-menu a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border-faint);
  }
  .mobile-menu a:last-child { border-bottom: 0; }
  .mobile-menu .ctas {
    display: flex; gap: 10px;
    margin-top: 18px;
    flex-direction: column;
  }
  .mobile-menu .ctas .btn { justify-content: center; }
}

/* ─── Type & section padding scale down on mobile ─── */
@media (max-width: 880px) {
  section { padding: clamp(48px, 8vw, 80px) 0; }
  .section-head { margin-bottom: 36px; }
  h1 { font-size: clamp(30px, 7.5vw, 44px) !important; word-wrap: break-word; overflow-wrap: anywhere; }
  h2 { font-size: clamp(24px, 5.5vw, 34px) !important; word-wrap: break-word; overflow-wrap: anywhere; }
  .page-hero .lead, .lead { font-size: 16px !important; }
  .cta-block { padding: 28px !important; }
  .cta-block h2 { font-size: 24px !important; }
  /* hero h1 had hardcoded <br> — let it wrap on narrow viewports */
  .hero h1 br { display: none; }
}

/* ─── Collapse inline two-up / multi-col grids to single column ─── */
@media (max-width: 880px) {
  /* Hero grid, two-up sections, contact grid, etc. — collapse any inline grid that uses fr columns */
  .hero-grid,
  .shell > [style*="grid-template-columns:1.05fr 1fr"],
  .shell > [style*="grid-template-columns:1.2fr 1fr"],
  .shell > [style*="grid-template-columns:1.4fr"],
  .shell > [style*="grid-template-columns:1.05fr"],
  .shell [style*="grid-template-columns:1.05fr 1fr"],
  .shell [style*="grid-template-columns:1.2fr 1fr"],
  .shell [style*="grid-template-columns:1.4fr"],
  .shell [style*="display:grid"][style*="1.4fr 1fr"],
  .shell [style*="display:grid"][style*="1.2fr 1fr"],
  .shell [style*="display:grid"][style*="1.05fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  /* 6-col phase ribbon */
  .shell [style*="grid-template-columns:repeat(6,1fr)"],
  .shell [style*="grid-template-columns:repeat(6, 1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }
  /* 3-col cards collapse to 1 */
  .position-band {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  /* page-hero with side-by-side */
  .page-hero .shell > [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  /* OHA hero grid (side-by-side) */
  .page-hero [style*="grid-template-columns:1.2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  .nav-right .btn-primary { height: 32px; padding: 0 12px; font-size: 12.5px; }
  .logo { font-size: 16px; }
  .shell [style*="grid-template-columns:repeat(6,1fr)"],
  .shell [style*="grid-template-columns:repeat(6, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  .stat-strip > div { padding: 18px; }
  .stat-strip .v { font-size: 26px; }
  /* Big inline padding on cta blocks etc */
  section { padding: clamp(40px, 7vw, 64px) 0; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 28px; margin-bottom: 36px; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }
  /* Stat strip + tabs handle on phone */
  .form-tabs { flex-wrap: wrap; }
  /* OHA / inner page section-head with row layout collapse */
  .shell .section-head[style*="flex-direction:row"] {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

/* Tweaks panel placement on mobile */
@media (max-width: 640px) {
  .tweaks-host { right: 12px; bottom: 12px; }
  .tweaks-card { width: calc(100vw - 24px) !important; max-width: 320px; }
}
