/* ============================================================================
   ClinicRelay — design system
   Operations infrastructure for specialty clinics: clinical slate-navy, relay
   blue, vital mint. Sora (display) · Inter (body) · JetBrains Mono (data)
   ========================================================================== */

:root {
  /* Brand ink / clinical navy (from the ClinicRelay logo) */
  --ink: #163863;
  --ink-900: #0d2545;
  --ink-800: #143257;
  --ink-700: #1d4470;
  --ink-600: #285285;

  /* Relay teal (primary brand / CTA — from the logo) */
  --brand: #1499b5;
  --brand-600: #0d7e95;
  --brand-700: #0a6072;
  --brand-400: #4ab9ce;
  --brand-050: #e5f5f8;

  /* Vital mint (healthy / complete / available status) */
  --mint: #10b981;
  --mint-600: #059a6b;
  --mint-700: #047857;
  --mint-400: #4bd6a6;
  --mint-050: #e6f8f1;

  /* Accents / status */
  --amber: #f59e0b;
  --amber-600: #d17f04;
  --amber-050: #fef3e0;
  --orange: #f5701c;
  --rose: #f43f5e;
  --red: #e11d48;
  --red-050: #fdeaef;
  --cyan: #0ea5b7;

  /* Neutrals */
  --white: #ffffff;
  --paper: #f5f8fc;
  --paper-2: #e9eff7;
  --line: #e4e9f2;
  --line-2: #d3dbe9;
  --slate: #55627a;
  --slate-2: #7a869e;
  --text: #0f1b30;

  /* On-dark */
  --d-text: #eaf1fb;
  --d-muted: #9db0cc;
  --d-line: rgba(255, 255, 255, 0.1);
  --d-card: rgba(255, 255, 255, 0.04);

  /* Type */
  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii + shadow */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 48, 0.06), 0 2px 8px rgba(15, 27, 48, 0.05);
  --shadow: 0 12px 30px rgba(15, 27, 48, 0.08), 0 2px 8px rgba(15, 27, 48, 0.05);
  --shadow-lg: 0 30px 70px rgba(15, 27, 48, 0.16), 0 8px 24px rgba(15, 27, 48, 0.08);
  --shadow-brand: 0 16px 40px rgba(20, 153, 181, 0.28);

  --wrap: 1200px;
  --nav-h: 66px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }
::selection { background: var(--brand); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-tight { max-width: 940px; }
section { position: relative; }

/* ---------- Utility ---------- */
.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-600);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow.on-dark { color: var(--brand-400); }
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.6;
}
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); margin: 16px 0 14px; }
.section-head p { font-size: 18px; color: var(--slate); margin: 0; }
.text-brand { color: var(--brand-600); }
.text-mint { color: var(--mint-600); }
.grad-text {
  background: linear-gradient(100deg, var(--brand) 10%, #21c6c9 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 13px 22px;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn .ic { width: 18px; height: 18px; }
.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { background: var(--brand-700); transform: translateY(-2px); box-shadow: 0 20px 46px rgba(20, 153, 181, 0.36); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-700); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper); }
.btn-ghost.on-dark { color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost.on-dark:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.5); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: var(--r-sm); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 10px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  background: var(--brand-050);
  color: var(--brand-700);
  border: 1px solid rgba(20, 153, 181, 0.2);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(20, 153, 181, 0.16); }
.pill.mint { background: var(--mint-050); color: var(--mint-700); border-color: rgba(16, 185, 129, 0.28); }
.pill.mint .dot { background: var(--mint); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16); }
.pill.amber { background: var(--amber-050); color: var(--amber-600); border-color: rgba(245, 158, 11, 0.28); }
.pill.amber .dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18); }

/* ---------- Icons ---------- */
.ic { width: 24px; height: 24px; stroke-width: 1.9; flex: none; }

/* ---------- Nav ---------- */
.kicker-band {
  background: var(--ink-900);
  color: var(--d-muted);
  font-size: 12.5px;
  text-align: center;
  padding: 7px 16px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.kicker-band b { color: var(--brand-400); font-weight: 600; }
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand span b { font-weight: 700; color: var(--brand); }
.brand-img { height: 30px; width: auto; display: block; }
.brand-mk { height: 30px; width: auto; display: block; }
.brand-fallback { display: none; align-items: center; gap: 10px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > a, .has-dropdown > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 13px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-700);
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-links > a:hover, .has-dropdown > a:hover { color: var(--brand-700); background: var(--paper); }
.chev { width: 15px; height: 15px; opacity: 0.6; }
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 340px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s ease;
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: flex; gap: 12px; padding: 11px 12px; border-radius: var(--r); transition: background 0.15s; }
.dropdown a:hover { background: var(--paper); }
.dropdown .di { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--brand-050); color: var(--brand-700); }
.dropdown .di .ic { width: 20px; height: 20px; }
.dropdown a > span:last-child { display: flex; flex-direction: column; }
.dropdown a b { font-size: 14px; color: var(--ink); font-weight: 600; }
.dropdown a span span { font-size: 12.5px; color: var(--slate-2); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: none; color: var(--ink); padding: 6px; }
.nav-mobile-cta { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 82% -10%, rgba(20, 153, 181, 0.1), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--paper) 100%);
  overflow: hidden;
  padding: 70px 0 60px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(80% 60% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.5;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 52px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); letter-spacing: -0.03em; margin: 20px 0 20px; }
.hero .lead { font-size: 19px; color: var(--slate); max-width: 560px; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-trust { margin-top: 30px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; color: var(--slate-2); font-size: 13px; }
.hero-trust .avatars { display: flex; }
.hero-trust .avatars span { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; margin-left: -9px; background: linear-gradient(135deg, var(--brand), var(--ink)); display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; }
.hero-trust .stars { color: var(--amber); display: inline-flex; }
.hero-trust .stars .ic { width: 15px; height: 15px; }

/* Hero visual — routing console mock */
.hero-visual { position: relative; }
.console {
  position: relative;
  background: linear-gradient(165deg, var(--ink-800), var(--ink-900));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  color: var(--d-text);
  overflow: hidden;
}
.console::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 80% 0%, rgba(20, 153, 181, 0.18), transparent 60%);
  pointer-events: none;
}
.console-bar { display: flex; align-items: center; gap: 8px; padding-bottom: 14px; }
.console-bar .dots { display: flex; gap: 6px; }
.console-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.console-bar .title { font-family: var(--font-mono); font-size: 12px; color: var(--d-muted); margin-left: 6px; }
.console-bar .live { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--mint-400); display: inline-flex; align-items: center; gap: 6px; }
.console-bar .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); } 70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.console-body { display: grid; gap: 10px; }
.c-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.06); }
.c-row .ci { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.c-row .ci .ic { width: 18px; height: 18px; }
.c-row .lab { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.c-row .lab b { font-size: 13.5px; font-weight: 600; color: #fff; }
.c-row .lab span { font-family: var(--font-mono); font-size: 11px; color: var(--d-muted); }
.c-row .amt { margin-left: auto; font-family: var(--font-mono); font-weight: 600; font-size: 12px; text-align: right; white-space: nowrap; }
.ci.bl { background: rgba(20, 153, 181, 0.18); color: var(--brand-400); }
.ci.mn { background: rgba(16, 185, 129, 0.16); color: var(--mint-400); }
.ci.am { background: rgba(245, 158, 11, 0.16); color: var(--amber); }
.ci.rd { background: rgba(244, 63, 94, 0.16); color: #ff8a9e; }
.amt.up { color: var(--mint-400); }
.amt.warn { color: var(--amber); }
.amt.crit { color: #ff8a9e; }
.console-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.console-foot .recovered { font-family: var(--font-mono); font-size: 12px; color: var(--d-muted); }
.console-foot .recovered b { color: var(--mint-400); font-size: 16px; }
.float-chip {
  position: absolute;
  background: #fff;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line);
}
.float-chip .ic { width: 18px; height: 18px; }
.float-chip.one { bottom: -18px; left: -22px; }
.float-chip.two { top: 30px; right: -22px; }
.float-chip .ok { color: var(--mint-600); }
.float-chip .am { color: var(--amber-600); }

/* ---------- Logos strip ---------- */
.logos { padding: 34px 0 8px; }
.logos p { text-align: center; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate-2); margin-bottom: 22px; }
.logo-row { display: flex; align-items: center; justify-content: center; gap: 46px; flex-wrap: wrap; opacity: 0.75; }
.logo-row .lg { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink-700); letter-spacing: -0.01em; }
.logo-row .lg .ic { width: 22px; height: 22px; color: var(--slate); }

/* ---------- Sections shell ---------- */
.pad { padding: 92px 0; }
.pad-sm { padding: 64px 0; }
.bg-paper { background: var(--paper); }
.bg-ink { background: var(--ink-900); color: var(--d-text); }
.bg-ink h1, .bg-ink h2, .bg-ink h3 { color: #fff; }
.bg-ink .section-head p { color: var(--d-muted); }

/* ---------- Feature cards ---------- */
.grid { display: grid; gap: 24px; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card .cico { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(150deg, var(--brand-050), #fff); border: 1px solid rgba(20, 153, 181, 0.18); color: var(--brand-700); margin-bottom: 18px; }
.card .cico .ic { width: 25px; height: 25px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--slate); margin: 0; }
.card .learn { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--brand-700); }
.card .learn .ic { width: 15px; height: 15px; transition: transform 0.2s; }
.card:hover .learn .ic { transform: translateX(4px); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(150px, auto); gap: 18px; }
.bento .b { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; position: relative; overflow: hidden; }
.bento .b.dark { background: linear-gradient(160deg, var(--ink-800), var(--ink-900)); color: var(--d-text); border-color: rgba(255, 255, 255, 0.08); }
.bento .b.dark h3 { color: #fff; }
.bento .b.dark p { color: var(--d-muted); }
.b-6 { grid-column: span 6; }
.b-4 { grid-column: span 4; }
.b-3 { grid-column: span 3; }
.b-2 { grid-column: span 2; }
.bento .b h3 { font-size: 18px; margin-bottom: 8px; }
.bento .b p { font-size: 14.5px; color: var(--slate); margin: 0; }
.bento .b .bico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-050); color: var(--brand-700); margin-bottom: 16px; }
.bento .b.dark .bico { background: rgba(20, 153, 181, 0.18); color: var(--brand-400); }

/* ---------- Steps / how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { position: relative; padding-top: 20px; }
.step .num { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--brand-700); border: 1.5px solid rgba(20, 153, 181, 0.3); background: var(--brand-050); width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 18px; }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--slate); font-size: 15px; margin: 0; }
.step .line { position: absolute; top: 40px; left: 56px; right: -13px; height: 1.5px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px); }
.steps .step:last-child .line { display: none; }

/* ============================================================================
   THE DEMO — Intake / triage-routing analyzer
   ========================================================================== */
.analyzer { position: relative; }
.analyzer-shell {
  background: linear-gradient(170deg, var(--ink-800), var(--ink-900));
  border-radius: var(--r-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.analyzer-top {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}
.analyzer-top .mark { width: 26px; height: 26px; }
.analyzer-top .t { font-family: var(--font-display); font-weight: 600; color: #fff; font-size: 15px; }
.analyzer-top .tag { font-family: var(--font-mono); font-size: 11px; color: var(--brand-400); border: 1px solid rgba(20, 153, 181, 0.4); border-radius: 6px; padding: 3px 8px; }
.analyzer-top .status { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--d-muted); display: inline-flex; align-items: center; gap: 7px; }
.analyzer-top .status .d { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: pulse 1.8s infinite; }
.analyzer-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; min-height: 560px; }

/* Input side */
.an-input { padding: 24px; border-right: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; gap: 16px; }
.an-input .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--d-muted); display: flex; align-items: center; justify-content: space-between; }
.an-input textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r);
  color: var(--d-text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  padding: 14px;
  resize: vertical;
  min-height: 210px;
  transition: border-color 0.15s;
}
.an-input textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 153, 181, 0.18); }
.an-input textarea::placeholder { color: rgba(157, 176, 204, 0.5); }
.an-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.an-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--d-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.an-fields input, .an-fields select {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: var(--d-text);
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 10px 11px;
}
.an-fields input:focus, .an-fields select:focus { outline: none; border-color: var(--brand); }
.an-fields select option { background: var(--ink-800); }
.an-samples { display: flex; flex-wrap: wrap; gap: 7px; }
.an-samples button {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--d-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  padding: 6px 12px;
  transition: all 0.15s;
}
.an-samples button:hover { color: var(--brand-400); border-color: var(--brand); }
.an-run { margin-top: auto; }

/* Output side */
.an-output { padding: 24px; overflow-y: auto; max-height: 660px; }
.an-empty { height: 100%; min-height: 480px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--d-muted); gap: 16px; padding: 30px; }
.an-empty .rad { width: 92px; height: 92px; opacity: 0.9; }
.an-empty h4 { color: #fff; font-size: 18px; margin: 0; }
.an-empty p { font-size: 13.5px; max-width: 340px; margin: 0; }

.an-loading { display: flex; flex-direction: column; gap: 12px; padding: 20px 0; }
.an-loading .ln { height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.14) 37%, rgba(255, 255, 255, 0.06) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.an-scan { text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--brand-400); padding: 12px; }

/* Result blocks */
.res-head { display: flex; align-items: center; gap: 16px; padding: 4px 0 18px; }
.risk-gauge { position: relative; width: 92px; height: 92px; flex: none; }
.risk-gauge svg { transform: rotate(-90deg); }
.risk-gauge .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.risk-gauge .val b { font-family: var(--font-mono); font-size: 26px; font-weight: 700; line-height: 1; color: #fff; }
.risk-gauge .val span { font-size: 9px; font-family: var(--font-mono); color: var(--d-muted); letter-spacing: 0.1em; }
.res-head .meta { min-width: 0; }
.res-head .meta .rl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--d-muted); }
.res-head .meta h3 { color: #fff; font-size: 22px; margin: 3px 0 6px; }
.res-head .meta .sub { font-size: 13px; color: var(--d-muted); margin: 0; }
.risk-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 100px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.risk-badge.ok { background: rgba(16, 185, 129, 0.16); color: #4bd6a6; }
.risk-badge.watch { background: rgba(245, 158, 11, 0.16); color: var(--amber); }
.risk-badge.risk { background: rgba(245, 112, 28, 0.18); color: #ff9d5c; }
.risk-badge.critical { background: rgba(244, 63, 94, 0.2); color: #ff8a9e; }

.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.res-stat { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r); padding: 13px; }
.res-stat .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--d-muted); }
.res-stat .v { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: #fff; margin-top: 4px; line-height: 1.2; }
.res-stat .v.up { color: var(--mint-400); }
.res-stat .v.warn { color: var(--amber); }
.res-stat .v.sm { font-size: 14px; }

.res-block { margin-bottom: 18px; }
.res-block > .rb-head { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--d-muted); margin-bottom: 10px; }
.res-block > .rb-head .ic { width: 15px; height: 15px; color: var(--brand-400); }
.res-block > .rb-head .n { margin-left: auto; background: rgba(255, 255, 255, 0.08); border-radius: 100px; padding: 2px 9px; font-size: 10px; color: var(--d-text); }

/* Routing destination banner */
.route-to { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-radius: var(--r); background: rgba(20, 153, 181, 0.1); border: 1px solid rgba(20, 153, 181, 0.3); margin-bottom: 18px; }
.route-to .rti { width: 40px; height: 40px; border-radius: 10px; background: rgba(20, 153, 181, 0.2); color: var(--brand-400); display: grid; place-items: center; flex: none; }
.route-to .rtb { min-width: 0; flex: 1; }
.route-to .rtb .q { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--d-muted); }
.route-to .rtb b { display: block; color: #fff; font-size: 15px; font-weight: 600; margin-top: 2px; }
.route-to .rtb span { font-size: 12.5px; color: var(--d-muted); }
.route-to.crit { background: rgba(244, 63, 94, 0.12); border-color: rgba(244, 63, 94, 0.4); }
.route-to.crit .rti { background: rgba(244, 63, 94, 0.2); color: #ff8a9e; }

/* Escalation banner (emergent) */
.escalate { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: rgba(244, 63, 94, 0.14); border: 1px solid rgba(244, 63, 94, 0.45); margin-bottom: 18px; color: #ffd9df; }
.escalate .ic { width: 20px; height: 20px; color: #ff8a9e; flex: none; margin-top: 1px; }
.escalate b { color: #fff; display: block; margin-bottom: 2px; font-size: 14px; }
.escalate p { margin: 0; font-size: 12.5px; line-height: 1.55; color: #ffc2cb; }

.finding { display: flex; gap: 12px; padding: 13px 14px; border-radius: var(--r); background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.07); margin-bottom: 8px; }
.finding .fi { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.finding .fi .ic { width: 16px; height: 16px; }
.finding.warn .fi { background: rgba(245, 158, 11, 0.16); color: var(--amber); }
.finding.bad .fi { background: rgba(244, 63, 94, 0.16); color: #ff8a9e; }
.finding.ok .fi { background: rgba(16, 185, 129, 0.16); color: #4bd6a6; }
.finding.info .fi { background: rgba(20, 153, 181, 0.16); color: var(--brand-400); }
.finding .fb { min-width: 0; flex: 1; }
.finding .fb b { font-size: 13.5px; color: #fff; font-weight: 600; display: block; }
.finding .fb p { font-size: 12.5px; color: var(--d-muted); margin: 3px 0 0; line-height: 1.5; }
.finding .fbadge { font-family: var(--font-mono); font-weight: 700; font-size: 10px; color: var(--amber); flex: none; align-self: center; text-transform: uppercase; letter-spacing: 0.05em; }

.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.doc-chip { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; font-size: 12.5px; border: 1px solid rgba(255, 255, 255, 0.08); }
.doc-chip .ic { width: 15px; height: 15px; flex: none; }
.doc-chip.have { background: rgba(16, 185, 129, 0.09); color: #a7e8cf; }
.doc-chip.have .ic { color: #4bd6a6; }
.doc-chip.miss { background: rgba(244, 63, 94, 0.09); color: #ffb4be; }
.doc-chip.miss .ic { color: #ff8a9e; }
.doc-chip b { color: #fff; font-weight: 600; }

/* Checklist */
.checklist { display: grid; gap: 8px; }
.check-row { display: flex; gap: 11px; align-items: flex-start; padding: 11px 13px; border-radius: 9px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.07); }
.check-row .cb { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid rgba(255, 255, 255, 0.25); flex: none; margin-top: 1px; display: grid; place-items: center; }
.check-row .cb .ic { width: 12px; height: 12px; color: var(--mint-400); opacity: 0; }
.check-row.done .cb { background: rgba(16, 185, 129, 0.2); border-color: var(--mint); }
.check-row.done .cb .ic { opacity: 1; }
.check-row .ct { min-width: 0; flex: 1; }
.check-row .ct b { display: block; font-size: 13px; color: var(--d-text); font-weight: 500; }
.check-row .ct span { font-size: 11px; font-family: var(--font-mono); color: var(--d-muted); }
.check-row .owner { font-size: 10.5px; font-family: var(--font-mono); color: var(--brand-400); background: rgba(20, 153, 181, 0.12); border: 1px solid rgba(20, 153, 181, 0.25); border-radius: 100px; padding: 3px 8px; flex: none; align-self: center; white-space: nowrap; }

.email-box { background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--r); overflow: hidden; }
.email-box .eh { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.02); }
.email-box .eh .to { font-family: var(--font-mono); font-size: 11px; color: var(--d-muted); }
.email-box .eh button { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--brand-400); background: rgba(20, 153, 181, 0.12); border: 1px solid rgba(20, 153, 181, 0.35); border-radius: 6px; padding: 4px 10px; display: inline-flex; align-items: center; gap: 5px; }
.email-box .eh button .ic { width: 13px; height: 13px; }
.email-box pre { margin: 0; padding: 15px; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.7; color: var(--d-text); white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; }

.ops-summary { background: rgba(20, 153, 181, 0.07); border: 1px solid rgba(20, 153, 181, 0.24); border-radius: var(--r); padding: 15px 16px; font-size: 13.5px; line-height: 1.65; color: var(--d-text); }
.ops-summary .ic { width: 15px; height: 15px; color: var(--brand-400); }
.ops-summary b { color: #fff; }

.an-cta-row { display: flex; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* ---------- Specialties / industries ---------- */
.ind-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.ind-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 100px; border: 1.5px solid var(--line-2); background: #fff; font-weight: 600; font-size: 14px; color: var(--ink-700); transition: all 0.15s; }
.ind-tab .ic { width: 17px; height: 17px; }
.ind-tab:hover { border-color: var(--brand); color: var(--brand-700); }
.ind-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.ind-panel { display: none; }
.ind-panel.active { display: block; animation: fade 0.4s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ind-body { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.ind-body img { border-radius: var(--r-lg); box-shadow: var(--shadow); width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.ind-body h3 { font-size: 28px; margin-bottom: 14px; }
.ind-body .il { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.ind-body .il li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; color: var(--slate); }
.ind-body .il li .ic { width: 20px; height: 20px; color: var(--mint-600); flex: none; margin-top: 1px; }
.ind-body .il li b { color: var(--ink); font-weight: 600; }

/* ---------- Stats band ---------- */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-band .s { text-align: center; }
.stat-band .s b { font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; letter-spacing: -0.03em; display: block; line-height: 1; }
.stat-band .s.teal b { color: var(--mint-400); }
.stat-band .s.blue b { color: var(--brand-400); }
.stat-band .s span { font-size: 14px; color: var(--d-muted); margin-top: 10px; display: block; }

/* ---------- Split / feature detail ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.rev .split-media { order: -1; }
.split h2 { font-size: clamp(26px, 3.6vw, 38px); }
.split .lead { font-size: 17px; color: var(--slate); }
.split .fl { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 16px; }
.split .fl li { display: flex; gap: 13px; }
.split .fl li .fli { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-050); color: var(--brand-700); display: grid; place-items: center; flex: none; }
.split .fl li .fli .ic { width: 18px; height: 18px; }
.split .fl li b { display: block; color: var(--ink); margin-bottom: 2px; }
.split .fl li p { font-size: 14px; color: var(--slate); margin: 0; }
.split-media { position: relative; }
.split-media img { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; }
.media-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; }
.quote .stars { color: var(--amber); display: inline-flex; margin-bottom: 14px; }
.quote .stars .ic { width: 16px; height: 16px; }
.quote p { font-size: 15px; color: var(--ink-700); line-height: 1.6; flex: 1; }
.quote .by { display: flex; align-items: center; gap: 11px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.quote .av { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--ink)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.quote .by b { font-size: 14px; color: var(--ink); }
.quote .by span { font-size: 12.5px; color: var(--slate-2); display: block; }

/* ---------- Pricing ---------- */
.price-toggle { display: inline-flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 100px; padding: 6px; margin: 0 auto 44px; }
.price-toggle button { border: none; background: none; padding: 9px 20px; border-radius: 100px; font-weight: 600; font-size: 14px; color: var(--slate); transition: all 0.15s; }
.price-toggle button.active { background: var(--ink); color: #fff; }
.price-toggle .save { font-size: 11px; color: var(--mint-700); font-weight: 700; font-family: var(--font-mono); }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 32px; position: relative; transition: transform 0.2s, box-shadow 0.2s; }
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.price-card.feat { border: 1.5px solid var(--brand); box-shadow: var(--shadow-brand); }
.price-card.feat::before { content: "Most popular"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; padding: 5px 14px; border-radius: 100px; }
.price-card .pn { font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.price-card .pd { font-size: 13.5px; color: var(--slate); min-height: 40px; margin: 6px 0 18px; }
.price-card .amt { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.price-card .amt b { font-family: var(--font-display); font-size: 46px; font-weight: 700; letter-spacing: -0.03em; }
.price-card .amt span { color: var(--slate); font-size: 14px; }
.price-card .anote { font-size: 12.5px; color: var(--slate-2); margin-bottom: 22px; font-family: var(--font-mono); }
.price-card .pfeat { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.price-card .pfeat li { display: flex; gap: 10px; font-size: 14px; color: var(--ink-700); align-items: flex-start; }
.price-card .pfeat li .ic { width: 18px; height: 18px; color: var(--mint-600); flex: none; margin-top: 1px; }
.price-card .pfeat li.off { color: var(--slate-2); }
.price-card .pfeat li.off .ic { color: var(--line-2); }
.price-card .btn { margin-top: 26px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; align-items: center; gap: 16px; padding: 22px 4px; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--ink); }
.faq-q .ic { width: 20px; height: 20px; color: var(--brand-700); margin-left: auto; transition: transform 0.25s; flex: none; }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a p { padding: 0 4px 22px; color: var(--slate); font-size: 15px; margin: 0; max-width: 700px; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; border-radius: var(--r-xl); overflow: hidden; background: linear-gradient(150deg, var(--ink-800), var(--ink-900)); padding: 64px; text-align: center; color: #fff; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 50% 0%, rgba(20, 153, 181, 0.24), transparent 60%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; font-size: clamp(28px, 4vw, 42px); }
.cta-band p { color: var(--d-muted); font-size: 18px; max-width: 560px; margin: 0 auto 28px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { background: var(--ink-900); color: var(--d-muted); padding: 66px 0 30px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 34px; padding-bottom: 44px; }
.footer .brand { color: #fff; margin-bottom: 14px; }
.fdesc { font-size: 13.5px; line-height: 1.6; max-width: 280px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { height: 36px; padding: 0 13px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.12); display: inline-flex; align-items: center; gap: 8px; color: var(--d-muted); transition: all 0.15s; }
.footer-social a:hover { color: #fff; border-color: var(--brand); background: rgba(20, 153, 181, 0.12); }
.footer-social .ic { width: 17px; height: 17px; }
.footer h5 { color: #fff; font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { font-size: 13.5px; color: var(--d-muted); transition: color 0.15s; display: inline-flex; align-items: center; gap: 6px; }
.footer ul a:hover { color: var(--brand-400); }
.footer .ext { width: 13px; height: 13px; opacity: 0.7; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 12.5px; flex-wrap: wrap; gap: 10px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 13px 17px; border-radius: var(--r); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; transition: all 0.3s ease; max-width: 340px; }
.toast .ic { width: 18px; height: 18px; flex: none; }
.toast.ok .ic { color: var(--mint-400); }
.toast.err .ic { color: #ff8a9e; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 50px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 30px; margin-bottom: 8px; }
.auth-card .sub { color: var(--slate); margin-bottom: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-700); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r);
  font-family: inherit; font-size: 14.5px; color: var(--ink); background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 153, 181, 0.14); }
.field .hint { font-size: 12px; color: var(--slate-2); margin-top: 6px; }
.auth-alt { text-align: center; margin-top: 22px; font-size: 14px; color: var(--slate); }
.auth-alt a { color: var(--brand-700); font-weight: 600; }
.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--slate-2); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: #fff; font-weight: 600; font-size: 14px; color: var(--ink); transition: all 0.15s; }
.oauth-btn:hover { background: var(--paper); border-color: var(--line-2); }
.auth-aside { background: linear-gradient(160deg, var(--ink-800), var(--ink-900)); color: var(--d-text); display: flex; flex-direction: column; justify-content: center; padding: 56px; position: relative; overflow: hidden; }
.auth-aside::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 40px 40px; }
.auth-aside > * { position: relative; }
.auth-aside h2 { color: #fff; font-size: 30px; }
.auth-aside .apoints { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }
.auth-aside .apoints li { display: flex; gap: 12px; font-size: 15px; color: var(--d-text); }
.auth-aside .apoints li .ic { width: 22px; height: 22px; color: var(--mint-400); flex: none; }
.auth-aside .amini { margin-top: 34px; padding: 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-lg); }
.auth-aside .amini p { font-size: 14px; font-style: italic; color: #fff; margin: 0 0 12px; }
.auth-aside .amini .by { font-size: 12.5px; color: var(--d-muted); font-family: var(--font-mono); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { background: linear-gradient(180deg, var(--ink-900), var(--ink-800)); color: var(--d-text); padding: 66px 0 60px; text-align: center; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 0%, rgba(47,91,234,.16), transparent 60%); }
.page-hero > * { position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(32px, 5vw, 52px); margin: 16px 0 14px; }
.page-hero p { color: var(--d-muted); font-size: 18px; max-width: 620px; margin: 0 auto; }

/* ============================================================================
   THE APP — /dashboard operations workspace
   ========================================================================== */
.app { background: var(--paper); min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.app-side { background: var(--ink-900); color: var(--d-text); padding: 20px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.app-side .brand { color: #fff; padding: 4px 8px 20px; }
.app-nav { display: grid; gap: 3px; }
.app-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--d-muted); transition: all 0.15s; }
.app-nav a .ic { width: 18px; height: 18px; }
.app-nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.app-nav a.active { background: rgba(20, 153, 181, 0.16); color: var(--brand-400); }
.app-nav .sep { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #56657f; padding: 16px 12px 6px; }
.app-side .user { margin-top: auto; padding: 12px; border-radius: var(--r); background: rgba(255, 255, 255, 0.04); display: flex; align-items: center; gap: 10px; }
.app-side .user .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--ink)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.app-side .user .un { font-size: 13px; min-width: 0; }
.app-side .user .un b { color: #fff; display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-side .user .un span { font-size: 11px; color: var(--d-muted); }
.app-main { padding: 26px 32px 60px; overflow-x: hidden; min-width: 0; }
.app-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.app-head h1 { font-size: 26px; margin: 0; }
.app-head .sub { color: var(--slate); font-size: 14px; margin: 4px 0 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.kpi .kt { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--slate); font-weight: 500; }
.kpi .kt .ic { width: 15px; height: 15px; color: var(--brand-700); }
.kpi .kv { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; color: var(--ink); }
.kpi .kd { font-size: 12px; margin-top: 4px; font-family: var(--font-mono); }
.kpi .kd.up { color: var(--mint-700); }
.kpi .kd.warn { color: var(--amber-600); }
.kpi .kd.crit { color: var(--red); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { font-size: 17px; margin: 0; display: inline-flex; align-items: center; gap: 9px; }
.panel-head h3 .ic { width: 18px; height: 18px; color: var(--brand-700); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate-2); padding: 8px 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--ink-700); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--paper); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 100px; font-size: 11px; font-weight: 600; font-family: var(--font-mono); }
.tag.ok { background: var(--mint-050); color: var(--mint-700); }
.tag.watch { background: var(--amber-050); color: var(--amber-600); }
.tag.risk { background: #fff0e6; color: var(--orange); }
.tag.critical { background: var(--red-050); color: var(--red); }
.tag.plain { background: var(--paper-2); color: var(--slate); }
.tag.brand { background: var(--brand-050); color: var(--brand-700); }
.app-toolbar { display: flex; gap: 10px; flex-wrap: wrap; }
.avatar-sm { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--ink)); color: #fff; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }

/* ---------- Routing board (queues) ---------- */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.qcol { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; min-height: 120px; }
.qcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.qcol-head .ic { width: 16px; height: 16px; color: var(--brand-700); }
.qcol-head .cnt { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--slate-2); background: #fff; border: 1px solid var(--line); border-radius: 100px; padding: 1px 8px; }
.qcard { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: 10px; padding: 11px 12px; margin-bottom: 9px; cursor: default; transition: box-shadow 0.15s, transform 0.15s; }
.qcard:last-child { margin-bottom: 0; }
.qcard:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.qcard.lv-critical { border-left-color: var(--red); }
.qcard.lv-risk { border-left-color: var(--orange); }
.qcard.lv-watch { border-left-color: var(--amber); }
.qcard.lv-ok { border-left-color: var(--mint); }
.qcard .qc-top { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.qcard .qc-type { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--slate-2); }
.qcard .qc-score { margin-left: auto; font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.qcard.lv-critical .qc-score { background: var(--red-050); color: var(--red); }
.qcard.lv-risk .qc-score { background: #fff0e6; color: var(--orange); }
.qcard.lv-watch .qc-score { background: var(--amber-050); color: var(--amber-600); }
.qcard.lv-ok .qc-score { background: var(--mint-050); color: var(--mint-700); }
.qcard .qc-subj { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.35; margin-bottom: 4px; }
.qcard .qc-meta { font-size: 11px; color: var(--slate); display: flex; align-items: center; gap: 6px; }

/* ---------- Referral pipeline (kanban) ---------- */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: start; }
.pcol { min-width: 0; }
.pcol-head { display: flex; align-items: center; gap: 7px; padding: 0 4px 10px; font-size: 12px; font-weight: 700; color: var(--ink); }
.pcol-head .dotp { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pcol-head .cnt { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--slate-2); }
.pcol-body { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; min-height: 90px; display: grid; gap: 9px; align-content: start; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px; }
.pcard .pc-spec { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand-700); margin-bottom: 4px; }
.pcard .pc-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.pcard .pc-from { font-size: 11px; color: var(--slate); margin-top: 2px; }
.pcard .pc-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.pcard .pc-age { font-family: var(--font-mono); font-size: 10px; color: var(--slate-2); margin-left: auto; }

/* ---------- Call summary cards ---------- */
.call-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.call-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; border-top: 3px solid var(--brand); }
.call-card.lv-critical { border-top-color: var(--red); }
.call-card.lv-risk { border-top-color: var(--orange); }
.call-card.lv-watch { border-top-color: var(--amber); }
.call-card.lv-ok { border-top-color: var(--mint); }
.call-card .cc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.call-card .cc-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-050); color: var(--brand-700); display: grid; place-items: center; flex: none; }
.call-card .cc-ic .ic { width: 19px; height: 19px; }
.call-card .cc-who b { font-size: 14.5px; color: var(--ink); display: block; }
.call-card .cc-who span { font-size: 11.5px; color: var(--slate-2); font-family: var(--font-mono); }
.call-card .cc-time { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--slate-2); }
.call-card .cc-summary { font-size: 13.5px; color: var(--ink-700); line-height: 1.55; margin: 0 0 14px; }
.call-card .cc-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.call-card .cc-foot .lbl { font-size: 11px; color: var(--slate-2); }
.call-card .cc-foot .own { font-size: 12px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Staff workload ---------- */
.workload { display: grid; gap: 12px; }
.wl-row { display: grid; grid-template-columns: 210px 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.wl-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.wl-who .av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--ink)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.wl-who b { font-size: 14px; color: var(--ink); display: block; }
.wl-who span { font-size: 11.5px; color: var(--slate-2); }
.wl-bar-wrap { min-width: 0; }
.wl-bar { height: 10px; border-radius: 100px; background: var(--paper-2); overflow: hidden; }
.wl-bar i { display: block; height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--brand), var(--brand-400)); }
.wl-bar i.hot { background: linear-gradient(90deg, var(--orange), var(--rose)); }
.wl-bar i.warm { background: linear-gradient(90deg, var(--amber), #f7b64b); }
.wl-bar-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--slate); font-family: var(--font-mono); }
.wl-stat { text-align: right; }
.wl-stat b { font-family: var(--font-display); font-size: 22px; color: var(--ink); display: block; line-height: 1; }
.wl-stat span { font-size: 10.5px; color: var(--slate-2); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Brand studio (live GPT-Image-2) ---------- */
.studio-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; }
.studio-out { background: var(--paper-2); border: 1px dashed var(--line-2); border-radius: var(--r-lg); min-height: 380px; display: grid; place-items: center; overflow: hidden; position: relative; }
.studio-out img { width: 100%; height: 100%; object-fit: cover; }
.studio-out .ph { text-align: center; color: var(--slate-2); padding: 30px; }
.studio-out .ph .ic { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--line-2); }

/* ---------- Misc ---------- */
.notice { background: var(--amber-050); border: 1px solid rgba(245,158,11,.3); border-radius: var(--r); padding: 12px 16px; font-size: 13px; color: #7a5600; display: flex; gap: 10px; align-items: flex-start; }
.notice .ic { width: 17px; height: 17px; color: var(--amber-600); flex: none; margin-top: 1px; }
.notice.brand { background: var(--brand-050); border-color: rgba(47,91,234,.3); color: var(--brand-700); }
.notice.brand .ic { color: var(--brand-700); }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner.dark { border-color: rgba(15,27,48,.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden, .hide { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .board { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .hero-grid, .split, .split.rev .split-media, .ind-body, .auth-wrap { grid-template-columns: 1fr; }
  .split.rev .split-media { order: 0; }
  .hero-visual { max-width: 520px; margin: 0 auto; }
  .analyzer-grid { grid-template-columns: 1fr; }
  .an-input { border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
  .g-3, .g-4, .steps, .quotes, .price-grid, .stat-band { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth-aside { display: none; }
  .app { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .b-6, .b-4, .b-3, .b-2 { grid-column: span 2; }
  .call-grid { grid-template-columns: 1fr; }
  .studio-grid { grid-template-columns: 1fr; }
  .wl-row { grid-template-columns: 1fr auto; }
  .wl-bar-wrap { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 720px) {
  .nav-links { position: fixed; top: calc(var(--nav-h) + 30px); left: 16px; right: 16px; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; box-shadow: var(--shadow-lg); display: none; }
  .nav.open .nav-links { display: flex; }
  .nav-toggle { display: block; }
  .nav-cta .btn-sm { display: none; }
  .nav-cta .nav-toggle { display: block; }
  .has-dropdown .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; width: auto; padding: 4px 0 4px 12px; }
  .nav-mobile-cta { display: grid; gap: 8px; margin-top: 8px; }
  .kicker-band { display: none; }
  .step .line { display: none; }
  .board, .pipeline { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .g-3, .g-4, .steps, .quotes, .price-grid, .stat-band, .footer-grid, .kpis, .doc-grid, .res-stats, .an-fields, .bento { grid-template-columns: 1fr; }
  .b-6, .b-4, .b-3, .b-2 { grid-column: span 1; }
  .cta-band { padding: 40px 24px; }
  .pad { padding: 62px 0; }
  .float-chip { display: none; }
  .res-stats { grid-template-columns: 1fr 1fr; }
  .doc-grid { grid-template-columns: 1fr; }
}
