/* ============================================================
   GeneticRX — Design System / Layout Mockups
   Dark-green-first theme with light mode via [data-theme]
   ============================================================ */

:root, [data-theme="dark"] {
  --bg: #070c09;
  --surface: #0a120e;
  --card: #0d1712;
  --card-2: #0b1410;
  --text: #eef2ec;
  --muted: #7c9186;
  --border: #1a2620;
  --border-soft: #131e18;

  --primary: #7ee8b0;
  --primary-strong: #97f0c1;
  --primary-deep: #1c6b41;
  --primary-soft: rgba(126, 232, 176, 0.12);
  --primary-contrast: #06130b;

  --purple: #b8a4f5;
  --orange: #f5b878;
  --pink: #f596b8;
  --gold: #e8d68a;
  --cyan: #7ee0da;
  --lime: #b8e34d;

  --danger: #f28b8b;
  --warning: #f0c078;
  --info: #8ab8f0;
  --success: #7ee8b0;

  --chart-1: #7ee8b0;
  --chart-2: #b8a4f5;
  --chart-3: #f5b878;
  --chart-4: #f596b8;
  --chart-5: #7ee0da;
  --chart-6: #e8d68a;
  --chart-grid: rgba(255, 255, 255, 0.05);
  --chart-tick: #7c9186;

  --shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.4);

  /* frosted-glass surfaces, pre-computed for broad browser support */
  --glass-nav: rgba(7, 12, 9, 0.82);
  --glass-bar: rgba(7, 12, 9, 0.85);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f6f1;
  --surface: #ffffff;
  --card: #ffffff;
  --card-2: #f0f5ec;
  --text: #14261b;
  --muted: #5c6f62;
  --border: #d9e4da;
  --border-soft: #e6ede5;

  --primary: #1d7a4b;
  --primary-strong: #15603a;
  --primary-deep: #0e462b;
  --primary-soft: #e2f2e8;
  --primary-contrast: #ffffff;

  --purple: #7b2cbf;
  --orange: #d96406;
  --pink: #c9184a;
  --gold: #b07d10;
  --cyan: #0f8b8d;
  --lime: #5d8a00;

  --danger: #d32222;
  --warning: #c07400;
  --info: #1c6dd0;
  --success: #128a4d;

  --chart-1: #1d9a5f;
  --chart-2: #7b2cbf;
  --chart-3: #e07b12;
  --chart-4: #d81e5b;
  --chart-5: #0f8b8d;
  --chart-6: #b8860b;
  --chart-grid: rgba(20, 40, 27, 0.08);
  --chart-tick: #5c6f62;

  --shadow: 0 12px 28px rgba(18, 55, 34, 0.12);
  --shadow-soft: 0 3px 12px rgba(18, 55, 34, 0.08);

  /* frosted-glass surfaces, pre-computed */
  --glass-nav: rgba(243, 246, 241, 0.82);
  --glass-bar: rgba(243, 246, 241, 0.85);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
.h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.h3 { font-size: 1.25rem; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.section { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer; transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-contrast); }
.btn-primary:hover { background: var(--primary-strong); text-decoration: none; }
.btn-outline { border-color: var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--muted); padding: 8px 12px; }
.btn-ghost:hover { color: var(--text); background: var(--primary-soft); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 0.85rem; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn[disabled], .btn.loading { opacity: 0.6; pointer-events: none; }
.btn .spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin 0.8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-green   { background: var(--primary-soft); color: var(--primary); border-color: rgba(46,158,99,.35); }
.badge-purple  { background: rgba(176,105,245,.13); color: var(--purple); border-color: rgba(176,105,245,.35); }
.badge-orange  { background: rgba(255,158,44,.13); color: var(--orange); border-color: rgba(255,158,44,.4); }
.badge-pink    { background: rgba(255,77,143,.13); color: var(--pink); border-color: rgba(255,77,143,.35); }
.badge-gold    { background: rgba(242,193,78,.14); color: var(--gold); border-color: rgba(242,193,78,.4); }
.badge-cyan    { background: rgba(55,197,192,.13); color: var(--cyan); border-color: rgba(55,197,192,.35); }
.badge-danger  { background: rgba(255,92,92,.13); color: var(--danger); border-color: rgba(255,92,92,.35); }
.badge-warning { background: rgba(255,176,58,.13); color: var(--warning); border-color: rgba(255,176,58,.35); }
.badge-muted   { background: var(--card-2); color: var(--muted); border-color: var(--border); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: 999px; background: var(--card-2); border: 1px solid var(--border);
  font-size: 0.82rem; color: var(--muted); white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); display: inline-block; }
.chip { max-width: 100%; }
.chip .mono, .chip .small { word-break: break-all; }

/* ---------- Cards ---------- */
.card { min-width: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px;
}
.card.hover { transition: all 0.2s ease; }
.card.hover:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 1.02rem; font-weight: 700; }

.grid { display: grid; gap: 20px; min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ---------- KPI tiles ---------- */
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi .kpi-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.kpi .kpi-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.kpi .kpi-sub { font-size: 0.8rem; color: var(--muted); }
.kpi .kpi-icon {
  width: 38px; height: 38px; border-radius: 10px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 1.1rem;
  background: var(--primary-soft); margin-bottom: 6px;
}

/* ---------- Public nav ---------- */
.pub-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass-nav);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.pub-nav-inner { display: flex; align-items: center; gap: 26px; padding: 14px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: var(--text); letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: block; width: 34px; height: 34px; border-radius: 9px;
  flex: none; object-fit: contain;
}
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--muted); font-weight: 500; font-size: 0.93rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { color: var(--text); background: var(--primary-soft); text-decoration: none; }
.nav-links a.active { color: var(--primary); font-weight: 700; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* theme toggle */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; font-size: 1rem; color: var(--muted); transition: all 0.18s;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 60px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 380px at 85% 10%, rgba(46,158,99,0.16), transparent 65%),
    radial-gradient(500px 300px at 10% 80%, rgba(176,105,245,0.09), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; position: relative; }
.hero-ctas { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 0.85rem; color: var(--muted); }

/* dashboard preview card */
.preview-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden;
}
.preview-top {
  padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 8px;
}
.preview-top .tl { display: flex; gap: 5px; }
.preview-top .tl span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.preview-top .url {
  margin-left: 10px; font-size: 0.75rem; color: var(--muted); background: var(--card-2);
  border: 1px solid var(--border-soft); border-radius: 6px; padding: 3px 12px;
}
.preview-body { padding: 18px; display: grid; gap: 14px; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mini-kpi { background: var(--card-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px; }
.mini-kpi .v { font-weight: 800; font-size: 1.15rem; }
.mini-kpi .l { font-size: 0.7rem; color: var(--muted); }

/* ---------- Brand / visual highlight band ---------- */
.brand-band { padding: 54px 0; background: var(--surface); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.brand-band-inner { display: grid; grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr); align-items: center; gap: 48px; }
.band-img { display: block; width: 100%; max-width: 520px; height: 320px; margin: 0 auto; object-fit: cover; object-position: center; border-radius: 22px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.band-copy { min-width: 0; }
.band-copy .lead { max-width: 56ch; }

/* ---------- Feature highlight grid ---------- */
.feature-card { display: flex; gap: 14px; }
.feature-card .f-icon {
  width: 42px; height: 42px; flex: none; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  background: var(--primary-soft); border: 1px solid var(--border-soft);
}
.feature-card h3 { font-size: 1rem; margin-bottom: 4px; }
.feature-card p { font-size: 0.9rem; color: var(--muted); }

/* colored top strip variants */
.strip-green  { border-top: 3px solid var(--primary); }
.strip-purple { border-top: 3px solid var(--purple); }
.strip-orange { border-top: 3px solid var(--orange); }
.strip-pink   { border-top: 3px solid var(--pink); }
.strip-cyan   { border-top: 3px solid var(--cyan); }
.strip-gold   { border-top: 3px solid var(--gold); }

/* ---------- CTA band ---------- */
.cta-band {
  border-radius: 20px; border: 1px solid var(--border);
  background:
    radial-gradient(600px 260px at 20% 0%, rgba(46,158,99,0.22), transparent 60%),
    radial-gradient(500px 260px at 90% 100%, rgba(176,105,245,0.14), transparent 60%),
    var(--card);
  padding: 56px; text-align: center; margin: 40px 0;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead th {
  text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); font-weight: 700; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: var(--card-2); white-space: nowrap;
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--primary-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
td .sub { display: block; font-size: 0.78rem; color: var(--muted); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.84rem; font-weight: 600; }
.field .hint { font-size: 0.78rem; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 14px; border-radius: 10px; font-size: 0.93rem;
  background: var(--card-2); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; transition: border-color 0.15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input::placeholder { color: var(--muted); opacity: 0.7; }
textarea.input { resize: vertical; min-height: 110px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field.error .input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255,92,92,0.12); }
.field .error-msg { font-size: 0.78rem; color: var(--danger); font-weight: 500; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.form-grid .span-2 { grid-column: span 2; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--muted); }
.check input { margin-top: 3px; accent-color: var(--primary); width: 15px; height: 15px; }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px; cursor: pointer;
  background: var(--border); transition: 0.2s;
}
.switch .slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  left: 3px; top: 3px; background: #fff; transition: 0.2s;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .t-label { font-size: 0.92rem; font-weight: 600; }
.toggle-row .t-desc { font-size: 0.8rem; color: var(--muted); }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: calc(100vh - 130px); display: flex; align-items: center; justify-content: center; padding: 60px 0; }
.auth-card { width: min(460px, 92vw); background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 36px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 24px; }
.auth-form { display: grid; gap: 16px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.auth-alt { text-align: center; font-size: 0.88rem; color: var(--muted); margin-top: 20px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.8rem; margin: 8px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.oauth-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.strength { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 8px; }
.strength span { display: block; height: 100%; width: 45%; border-radius: 999px; background: linear-gradient(90deg, var(--warning), var(--success)); }

/* state demo strip */
.state-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; width: min(980px, 94vw); }

/* toast / banner */
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px;
  border-radius: 10px; font-size: 0.88rem; border: 1px solid;
}
.toast-success { background: rgba(63,214,143,.1); border-color: rgba(63,214,143,.4); color: var(--success); }
.toast-error { background: rgba(255,92,92,.1); border-color: rgba(255,92,92,.4); color: var(--danger); }
.toast-info { background: rgba(74,163,255,.1); border-color: rgba(74,163,255,.4); color: var(--info); }
.toast-warning { background: rgba(255,176,58,.1); border-color: rgba(255,176,58,.4); color: var(--warning); }

/* Support workspace */
.stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.stat { padding:18px; border:1px solid var(--border); border-radius:18px; background:var(--card); box-shadow:var(--shadow); }
.stat-label { display:block; color:var(--muted); font-size:.75rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; }
.stat-value { display:block; margin-top:7px; font-size:1.8rem; font-weight:800; line-height:1; }
.search-wrap { display:flex; align-items:center; gap:10px; }
.search-wrap .input { flex:1; min-width:0; }
.search-icon { color:var(--muted); font-size:1.15rem; }
.dropzone { padding:24px; text-align:center; border:1px dashed var(--border); border-radius:14px; background:var(--card-2); color:var(--muted); }
.chat { display:grid; gap:12px; }
.chat-msg { max-width:88%; padding:14px 16px; border:1px solid var(--border); border-radius:18px; background:var(--card-2); }
.chat-msg p { margin:6px 0 0; }
.chat-msg.user { justify-self:end; background:var(--primary-soft); border-color:rgba(46,158,99,.32); }
.chat-msg.assistant { justify-self:start; }


/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--border-soft); background: var(--surface);
  padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .logo { padding: 4px 8px 18px; border-bottom: 1px solid var(--border-soft); margin-bottom: 14px; }
.side-group { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
.side-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  color: var(--muted); font-size: 0.9rem; font-weight: 500; margin-bottom: 2px;
}
.side-link:hover { background: var(--primary-soft); color: var(--text); text-decoration: none; }
.side-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.side-link .ic { width: 20px; text-align: center; }
.side-link .count { margin-left: auto; font-size: 0.72rem; background: var(--danger); color: #fff; border-radius: 999px; padding: 1px 7px; font-weight: 700; }

.app-main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px; padding: 12px 26px;
  background: var(--glass-bar); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar .search { flex: 1; max-width: 420px; position: relative; }
.topbar .search .input { padding-left: 36px; background: var(--card); }
.topbar .search::before { content: "⌕"; position: absolute; left: 13px; top: 8px; color: var(--muted); font-size: 1.05rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.bell { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; font-size: 1rem; }
.bell:hover { color: var(--primary); border-color: var(--primary); }
.bell .pip { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff; font-size: 0.66rem; font-weight: 700; border-radius: 999px; padding: 1px 5px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
}
.user-chip .u-name { font-size: 0.88rem; font-weight: 600; line-height: 1.2; }
.user-chip .u-role { font-size: 0.72rem; color: var(--muted); }

.app-content { padding: 26px; display: grid; gap: 22px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.6rem; margin-bottom: 4px; }
.page-head .sub { color: var(--muted); font-size: 0.92rem; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; min-width: 0; }
.tab {
  padding: 10px 16px; font-size: 0.9rem; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
  border-radius: 8px 8px 0 0;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 26px; display: grid; gap: 18px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: -26px; top: 5px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--card); border: 3px solid var(--primary);
}
.tl-item.tl-purple::before { border-color: var(--purple); }
.tl-item.tl-orange::before { border-color: var(--orange); }
.tl-item.tl-pink::before { border-color: var(--pink); }
.tl-item .tl-time { font-size: 0.75rem; color: var(--muted); }
.tl-item .tl-title { font-size: 0.92rem; font-weight: 600; }
.tl-item .tl-desc { font-size: 0.84rem; color: var(--muted); }

/* ---------- Lineage tree ---------- */
.tree { display: flex; flex-direction: column; align-items: center; gap: 0; }
.tree .node {
  background: var(--card-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 18px; text-align: center; font-size: 0.85rem; font-weight: 600; min-width: 180px;
}
.tree .node .sub { font-weight: 400; color: var(--muted); font-size: 0.75rem; }
.tree .node.root { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(176,105,245,.12); }
.tree .node.parent-f { border-color: var(--pink); }
.tree .node.parent-m { border-color: var(--cyan); }
.tree .branch { width: 2px; height: 22px; background: var(--border); }
.tree .split { display: flex; gap: 40px; position: relative; flex-wrap: wrap; }
.tree .split::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 2px; background: var(--border); }
.tree .split > div { display: flex; flex-direction: column; align-items: center; }
.tree .split .branch { height: 18px; }

/* ---------- Alerts ---------- */
.alert-row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: flex-start;
  padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card);
}
.alert-row.sev-critical { border-left: 3px solid var(--danger); }
.alert-row.sev-warning { border-left: 3px solid var(--warning); }
.alert-row.sev-info { border-left: 3px solid var(--info); }
.sev-icon {
  width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 1.05rem;
}
.sev-critical .sev-icon { background: rgba(255,92,92,.12); }
.sev-warning .sev-icon { background: rgba(255,176,58,.12); }
.sev-info .sev-icon { background: rgba(74,163,255,.12); }
.alert-row .a-title { font-weight: 700; font-size: 0.95rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.alert-row .a-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.alert-row .a-evidence {
  margin-top: 8px; font-size: 0.82rem; color: var(--muted);
  background: var(--card-2); border: 1px solid var(--border-soft); border-radius: 8px; padding: 8px 12px;
}
.alert-row .a-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-bar .input, .filter-bar select.input { width: auto; }
.filter-chip {
  padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--border); color: var(--muted); cursor: pointer; background: var(--card);
}
.filter-chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* ---------- Progress ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.progress.p-purple span { background: var(--purple); }
.progress.p-orange span { background: var(--orange); }
.progress.p-pink span { background: var(--pink); }

/* ---------- Charts ---------- */
.chart-box { position: relative; height: 240px; width: 100%; }
.chart-box.tall { height: 300px; }
.chart-box.short { height: 160px; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); margin-top: 10px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }

/* ---------- Empty & loading states ---------- */
.empty {
  border: 1px dashed var(--border); border-radius: 12px; padding: 36px; text-align: center;
  color: var(--muted); background: var(--card-2);
}
.empty .e-icon { font-size: 1.8rem; margin-bottom: 8px; }
.skeleton { display: grid; gap: 10px; }
.skeleton .sk { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--card-2) 25%, var(--border-soft) 50%, var(--card-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border-soft); padding: 56px 0 36px; margin-top: 60px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer ul a { color: var(--muted); font-size: 0.9rem; }
.footer ul a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border-soft); padding-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 0.82rem; }

/* ---------- Flow steps (how it works) ---------- */
.flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flow .step {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 16px; font-size: 0.88rem; font-weight: 600; white-space: nowrap;
}
.flow .step.hl { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.flow .arrow { color: var(--primary); font-weight: 800; }

/* ---------- Responsive hardening ---------- */
img, video, canvas { max-width: 100%; }
.grid > *, .app-content > *, .app-content > .card, .page-head > * { min-width: 0; }
.flow { max-width: 100%; min-width: 0; }
.chart-box { min-width: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  /* data tables scroll horizontally instead of blowing out the layout */
  table { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  /* horizontal step/badge rows scroll instead of forcing page width */
  .flow { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .page-head .head-actions { flex-wrap: wrap; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  /* Keep the public home hero as a true two-column composition on tablets
     and small laptops. Collapse only when the content can no longer breathe. */
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr); gap: 32px; }
  .brand-band-inner { grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr); gap: 32px; }
  .band-img { max-width: 100%; height: 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 64px minmax(0, 1fr); }
  .sidebar { padding: 14px 8px; }
  .sidebar .logo-text, .side-link span:not(.ic):not(.count), .side-group { display: none; }
  .side-link { justify-content: center; padding: 10px; }
  .side-link .count { position: absolute; transform: translate(14px, -12px); }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .brand-band-inner { grid-template-columns: 1fr; gap: 28px; }
  .band-img { max-width: 700px; height: 300px; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .form-grid, .state-strip, .oauth-row, .stats { grid-template-columns: 1fr; }
  .pub-nav-inner { gap: 12px; }
  /* inline-styled grids collapse to a single column on phones */
  [style*="display:grid"][style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  /* long code-like text (file paths, IDs) wraps instead of stretching cards */
  .mono, .chip .mono, .chip .small { word-break: break-all; }
  .chip { flex-wrap: wrap; }
  .nav-links { display: none; }
  .mini-kpis { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 48px 0; }
  .cta-band { padding: 36px 22px; }
  .topbar .search { display: none; }
  .alert-row { grid-template-columns: 1fr; }
  .app-content { padding: 16px; }
  .form-grid .span-2 { grid-column: span 1; }
}

/* mobile nav toggle fallback */
.mobile-nav-btn { display: none; }
@media (max-width: 720px) {
  .mobile-nav-btn { display: inline-flex; }
  .nav-login { display: none; }
  .nav-actions { gap: 8px; }
  .mobile-menu {
    display: none;
    flex-direction: column;
    padding: 10px 22px 16px;
    border-top: 1px solid var(--border-soft);
    background: var(--glass-bar);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .mobile-menu a { padding: 11px 4px; color: var(--text); font-size: 0.95rem; font-weight: 600; border-bottom: 1px solid var(--border-soft); }
  .mobile-menu a:last-child { border-bottom: none; }
  .mobile-menu a.active, .mobile-menu a:hover { color: var(--primary); }
}


/* ---------- Cross-browser support ---------- */
/* Opaque fallback when neither backdrop-filter form is supported (old browsers) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pub-nav, .topbar { background: var(--bg); }
}

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

/* small screens never scroll horizontally: inline flex rows wrap and the
   page clips any residual edge ornament */
@media (max-width: 1020px) {
  html, body { overflow-x: hidden; }
  [style*="display:flex"] { flex-wrap: wrap !important; }
}

/* tablets & small laptops: public links move into the burger menu */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-nav-btn { display: inline-flex; }
}

/* very small phones: primary CTA moves into the burger menu */
@media (max-width: 430px) {
  .nav-actions .btn-primary { display: none; }
}

@media(max-width:640px){.search-wrap{align-items:stretch;flex-direction:column}.search-icon{display:none}.chat-msg{max-width:100%}}


/* ============================================================
   Layout rhythm hardening — 2026-10-02
   Shared public theme: predictable spacing, clean navigation,
   and consistent separation between sibling components.
   ============================================================ */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
}

.pub-nav-inner {
  gap: 18px;
  padding-block: 12px;
}
.pub-nav-inner > .logo { flex: 0 0 auto; }
.pub-nav-inner > .nav-links {
  flex: 0 1 auto;
  margin-left: auto;
  gap: 2px;
  min-width: 0;
}
.pub-nav-inner > .nav-actions {
  flex: 0 0 auto;
  gap: 8px;
}
.pub-nav .nav-actions > .btn-primary,
.pub-nav .nav-actions > .nav-get-started {
  display: none;
}
.nav-links a { padding: 7px 10px; }

.section { padding-block: 64px; }
.section-head { margin-bottom: 32px; }
.grid { row-gap: 24px; column-gap: 24px; }
.card { padding: 24px; }
.card-head { margin-bottom: 14px; }
.preview-body { padding: 16px; gap: 12px; }
.mini-kpis { gap: 8px; }
.chart-box { height: 190px; }
.chart-box.tall { height: 260px; }
.chart-box.short { height: 130px; }

.brand-band { padding-block: 48px; }
.brand-band-inner { gap: 56px; }
.band-copy { display: flex; flex-direction: column; justify-content: center; }

.table-wrap { margin-top: 24px; }
.cta-band { margin-block: 32px; padding: 48px; }

.public-stack { display: grid; gap: 16px; }
.public-stack > * { min-width: 0; }
.public-card-grid { display: grid; gap: 24px; }
.public-card-grid.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.public-card-grid.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.public-card-grid.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.flow-stack { display: grid; gap: 16px; }
.flow-stack > .card { margin: 0 !important; }

.status-layout,
.status-components { gap: 20px; }

@media (max-width: 1020px) {
  .brand-band-inner { gap: 32px; }
  .grid { gap: 20px; }
}
@media (max-width: 720px) {
  .section { padding-block: 48px; }
  .section-head { margin-bottom: 28px; }
  .card { padding: 20px; }
  .grid { gap: 16px; }
  .public-card-grid.grid-2,
  .public-card-grid.grid-3,
  .public-card-grid.grid-4 { grid-template-columns: 1fr; }
  .flow-stack { gap: 12px; }
  .cta-band { padding: 32px 22px; }
}




/* ---------- Public home visual density — 2026-10-02 ---------- */
.public-home .hero { padding: 64px 0 48px; }
.public-home .hero-grid { gap: 40px; }
.public-home .hero .lead { max-width: 58ch; }
.public-home .preview-body { padding: 14px; gap: 11px; }
.public-home .mini-kpi { padding: 9px 10px; }
.public-home .mini-kpi .v { font-size: 1.08rem; }
.public-home .chart-box.short { height: 138px; }
.public-home .brand-band { padding: 44px 0; background: var(--bg); border-top: 0; border-bottom: 0; }
.public-home .brand-band-inner { gap: 40px; }
.public-home .band-img { height: 280px; }
.public-home .section { padding: 60px 0; }
.public-home .section-head { margin-bottom: 28px; }
.public-home .home-section-headline { font-size: clamp(1.35rem, 2.1vw, 1.75rem); }
/* Keep the requested brand sentence on one line on desktop and tablet; let narrow phones wrap to avoid horizontal overflow. */
@media (min-width: 721px) {
  .public-home .home-section-headline { white-space: nowrap; font-size: clamp(1.1rem, 1.9vw, 1.75rem); }
}
.public-home .section[style*="padding-top:20px"] { padding-top: 18px !important; }
.public-home .section .chart-box { height: 190px; }
.public-home .table-wrap { margin-top: 18px !important; }
.public-home .cta-band { padding: 44px; margin: 24px 0; }
.public-home .footer { margin-top: 44px; padding-top: 44px; }

@media (max-width: 1020px) {
  .public-home .hero { padding-top: 54px; }
  .public-home .brand-band { padding: 40px 0; }
  .public-home .band-img { height: 260px; }
}

@media (max-width: 900px) {
  .public-home .hero { padding: 48px 0 40px; }
  .public-home .hero-grid { gap: 28px; }
  .public-home .preview-card { max-width: 720px; margin: 0 auto; width: 100%; }
  .public-home .brand-band { padding: 38px 0; }
  .public-home .band-img { height: 280px; }
}

@media (max-width: 720px) {
  .public-home .hero { padding: 38px 0 32px; }
  .public-home .hero-ctas { margin-top: 20px; }
  .public-home .hero-note { margin-top: 14px; }
  .public-home .preview-body { padding: 12px; }
  .public-home .mini-kpis { gap: 7px; }
  .public-home .mini-kpi { padding: 8px; }
  .public-home .mini-kpi .v { font-size: 1rem; }
  .public-home .mini-kpi .l { font-size: .66rem; }
  .public-home .chart-box.short { height: 120px; }
  .public-home .section { padding: 48px 0; }
  .public-home .section .chart-box { height: 175px; }
  .public-home .cta-band { padding: 32px 20px; }
}


/* ---------- Public mobile navigation contract ---------- */
.pub-mobile-toggle { display: none; }
.public-mobile-nav { display: none; }
@media (max-width:900px) {
  .pub-mobile-toggle { display: inline-flex; }
  .public-mobile-nav { display: none; flex-direction: column; }
  .public-mobile-nav[data-open="true"] { display: flex; }
  .pub-nav .nav-actions { order:4; }
  .pub-nav .pub-mobile-toggle { order:3; }
}


/* ---------- Public page spacing corrections — 2026-10-04 ---------- */
.public-security-grid {
  row-gap: 28px;
  column-gap: 24px;
}
.public-security-secondary {
  margin-top: 28px;
  row-gap: 28px;
  column-gap: 24px;
}
.public-security-secondary > .card {
  min-width: 0;
}
@media (max-width: 720px) {
  .public-security-grid,
  .public-security-secondary {
    row-gap: 18px;
  }
  .public-security-secondary {
    margin-top: 18px;
  }
}

/* Owner-approved dashboard preview chart: stable dual-scale SVG independent of Chart.js/CDN availability. */
.public-home .home-environment-chart { width: 100%; height: 138px; min-width: 0; }
.public-home .home-environment-plot { display: block; width: 100%; height: 100%; overflow: visible; }
.public-home .home-chart-grid line { stroke: var(--chart-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.public-home .home-chart-labels { fill: var(--chart-tick); font: 10px Inter, sans-serif; }
.public-home .home-chart-temperature, .public-home .home-chart-humidity { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.public-home .home-chart-temperature-fill { fill: rgba(126, 232, 176, 0.14); stroke: none; }
.public-home .home-chart-temperature { stroke: var(--chart-1); }
.public-home .home-chart-humidity { stroke: var(--chart-4); }
.public-home .brand-band { background: #0b1711; }
@media (max-width: 720px) { .public-home .home-environment-chart { height: 120px; } }


/* Owner-approved public homepage chart and leaf-band correction — 2026-10-25 */
.public-home .brand-band {
  background-color: #0b1711;
  background-image: radial-gradient(ellipse at 18% 50%, rgba(54, 125, 91, .12), transparent 55%);
  border-top: 1px solid rgba(126, 232, 176, .08);
  border-bottom: 1px solid rgba(126, 232, 176, .08);
}
.public-home .brand-band-inner { align-items: center; }
.public-home .band-img { display: block; width: 100%; min-width: 0; object-fit: cover; }
.public-home .home-data-section { background: var(--surface); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.public-home .home-demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.public-home .home-demo-card { min-width: 0; padding: 22px; overflow: hidden; }
.public-home .home-chart-subtitle { margin: 8px 0 18px; min-height: 2.5em; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.public-home .home-stage-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 16px; align-items: center; }
.public-home .home-stage-donut { display: block; width: 100%; max-width: 220px; height: auto; margin-inline: auto; }
.public-home .home-donut-track { fill: none; stroke: var(--border-soft); stroke-width: 25; }
.public-home .home-donut-segment { fill: none; stroke-width: 25; transform: rotate(-90deg); transform-origin: 90px 90px; stroke-linecap: butt; }
.public-home .stage-seedling { background: #e9d98a; color: #e9d98a; stroke: #e9d98a; }
.public-home .stage-clone { background: #7bded8; color: #7bded8; stroke: #7bded8; }
.public-home .stage-veg { background: #6fe0ac; color: #6fe0ac; stroke: #6fe0ac; }
.public-home .stage-flower { background: #b39aef; color: #b39aef; stroke: #b39aef; }
.public-home .stage-mother { background: #ed8bb5; color: #ed8bb5; stroke: #ed8bb5; }
.public-home .home-donut-total { fill: var(--text); font-size: 24px; font-weight: 700; }
.public-home .home-donut-caption { fill: var(--muted); font-size: 11px; }
.public-home .home-chart-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; list-style: none; padding: 0; margin: 14px 0 0; color: var(--muted); font-size: .76rem; }
.public-home .home-stage-legend { display: grid; gap: 10px; margin: 0; }
.public-home .home-stage-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) max-content; align-items: center; gap: 5px; min-width: 0; }
.public-home .home-stage-legend strong { color: var(--text); font-weight: 600; }
.public-home .legend-swatch { display: inline-block; width: 10px; height: 10px; flex: 0 0 10px; border-radius: 3px; }
.public-home .home-yield-chart { min-width: 0; }
.public-home .home-yield-axis { display: flex; justify-content: space-between; margin: 0 0 12px 0; padding-bottom: 7px; border-bottom: 1px solid var(--border-soft); color: var(--muted); font-size: .65rem; }
.public-home .home-yield-rows { display: grid; gap: 17px; }
.public-home .home-yield-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(54px, 1fr) auto; gap: 9px; align-items: center; min-width: 0; }
.public-home .home-yield-name { min-width: 0; color: var(--text); font-size: .75rem; line-height: 1.35; overflow-wrap: anywhere; }
.public-home .home-yield-track { display: block; width: 100%; height: 12px; overflow: hidden; border-radius: 4px; background: var(--surface-2, rgba(255,255,255,.05)); }
.public-home .home-yield-bar { display: block; width: var(--yield); height: 100%; border-radius: 4px; background: var(--purple); }
.public-home .home-yield-row strong { white-space: nowrap; color: var(--text); font-size: .72rem; font-weight: 600; }
.public-home .home-vpd-chart { display: block; width: 100%; height: auto; overflow: visible; }
.public-home .home-vpd-grid line { stroke: var(--chart-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.public-home .home-vpd-labels { fill: var(--chart-tick); font: 10px Inter, sans-serif; }
.public-home .home-vpd-target { fill: rgba(126, 232, 176, .08); stroke: rgba(126, 232, 176, .35); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.public-home .home-chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.public-home .home-target-swatch { background: rgba(126, 232, 176, .25); border: 1px dashed rgba(126, 232, 176, .6); }
.public-home .home-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.public-home .home-vpd-area { fill: rgba(123, 222, 216, .16); stroke: none; }
.public-home .home-vpd-line { fill: none; stroke: #7bded8; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.public-home .home-legend-note { color: var(--muted); }
.public-home .home-inventory-wrap { margin-top: 22px !important; }
.public-home .home-inventory { width: 100%; table-layout: auto; }
.public-home .home-inventory th, .public-home .home-inventory td { vertical-align: middle; }
.public-home .home-inventory th { white-space: nowrap; }
.public-home .home-inventory td:first-child { min-width: 200px; }
.public-home .home-inventory td:first-child strong { display: block; overflow-wrap: anywhere; line-height: 1.35; }
.public-home .home-inventory td:first-child .sub { display: block; margin-top: 4px; }
.public-home .home-inventory .badge { white-space: normal; }
.public-home .home-environment-chart { height: 164px; margin: 14px 0 0; }
.public-home .home-environment-plot { width: 100%; height: 100%; overflow: hidden; }
.public-home .home-chart-labels { font: 10px Inter, sans-serif; }
.public-home .home-chart-time { font-size: 10px; }
.public-home .preview-top { flex-wrap: wrap; gap: 8px; }
@media (max-width: 1100px) {
  .public-home .home-demo-grid { grid-template-columns: minmax(0, 1fr); }
  .public-home .home-stage-layout { max-width: 460px; margin-inline: auto; }
}
@media (max-width: 720px) {
  .public-home .home-demo-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .public-home .home-demo-card:last-child { grid-column: auto; }
  .public-home .home-demo-card { padding: 18px; }
  .public-home .home-chart-subtitle { min-height: 0; }
  .public-home .home-stage-layout { grid-template-columns: minmax(120px, .9fr) minmax(120px, 1.1fr); gap: 12px; max-width: none; }
  .public-home .home-inventory-wrap { overflow-x: auto; }
  .public-home .home-inventory { min-width: 760px; }
  .public-home .home-environment-chart { height: 148px; }
  .public-home .home-chart-labels { font-size: 10px; }
}

/* Public home: audience rows (3 across, no boxes) */
.public-home .home-audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.public-home .home-audience-row { border-top: 2px solid var(--border-soft); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.public-home .home-audience-row h3 { font-size: 1.05rem; }
.public-home .home-audience-row p { color: var(--muted); font-size: .92rem; line-height: 1.55; }
.public-home .home-audience-row a { margin-top: auto; font-weight: 600; }
@media (max-width: 900px) { .public-home .home-audience { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.pub-nav .nav-signup { white-space: nowrap; }
.mobile-menu .mobile-signup { font-weight: 700; color: var(--green); }
