/* MintSift — AI Customer Feedback Intelligence · Customer Signal Observatory / Insight Discovery Lab */

:root {
  --bg: #FDFCF8;
  --ink: #1E293B;
  --primary: #14B8A6;
  --secondary: #F59E0B;
  --trend: #2563EB;
  --risk: #DC2626;
  --line: #E7E5E4;
  --muted: #64748B;
  --bg-soft: #F5F4F0;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 28px);
  --container: min(var(--max), calc(100% - 2 * var(--gutter)));
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(30, 41, 59, 0.05), 0 12px 32px rgba(30, 41, 59, 0.04);
  --shadow-lg: 0 8px 28px rgba(30, 41, 59, 0.08), 0 24px 48px rgba(30, 41, 59, 0.05);
  --display: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --primary-soft: rgba(20, 184, 166, 0.1);
  --secondary-soft: rgba(245, 158, 11, 0.12);
  --trend-soft: rgba(37, 99, 235, 0.1);
  --risk-soft: rgba(220, 38, 38, 0.1);
  --header-h: 68px;
  --announce-h: 40px;
  --site-top-h: calc(var(--announce-h) + var(--header-h));
  --card-gap: 20px;
  --card-pad: clamp(18px, 2.5vw, 24px);
  --lab-grid:
    radial-gradient(circle, rgba(20, 184, 166, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231, 229, 228, 0.45) 0, rgba(231, 229, 228, 0.45) 1px, transparent 1px),
    linear-gradient(transparent 47px, rgba(231, 229, 228, 0.25) 47px, rgba(231, 229, 228, 0.25) 48px, transparent 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.auth-page {
  background: var(--bg-soft);
  background-image: none;
  min-height: 100vh;
}

body.auth-page .auth-sift {
  min-height: 100vh;
}

body.modal-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, p { margin: 0; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-shell main { flex: 1; }

h1, h2, h3, h4, .hero-title, .page-title {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.muted { color: var(--muted); }
.text-accent { color: var(--primary); }

.text-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

.text-link:hover { color: var(--ink); }

/* ── Announcement bar ── */
.announce-bar {
  position: relative;
  z-index: 110;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  min-height: var(--announce-h);
  padding: 8px 16px;
  background: linear-gradient(90deg, var(--ink) 0%, #334155 50%, var(--primary) 100%);
  color: rgba(253, 252, 248, 0.92);
  font-size: 0.84rem;
  font-weight: 500;
  text-align: center;
  border-bottom: 1px solid rgba(20, 184, 166, 0.25);
}

.announce-bar span { font-weight: 500; }

.announce-bar a {
  color: var(--secondary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.announce-bar a:hover { color: #FCD34D; }

/* ── Site header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(20, 184, 166, 0.04);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand:hover { color: var(--ink); opacity: 0.9; text-decoration: none; }

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--primary) 0%, #0D9488 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.25);
  flex-shrink: 0;
}

.logo-mark svg { width: 22px; height: 22px; display: block; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-text span {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.nav-main {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
  padding-inline: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--bg-soft);
  border-color: var(--line);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 4px;
}

@media (max-width: 1180px) {
  .brand-text span { display: none; }
}

@media (max-width: 1024px) {
  .nav-link { padding: 8px 10px; font-size: 0.78rem; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: #0D9488;
  box-shadow: 0 2px 10px rgba(20, 184, 166, 0.28);
}

.btn-primary:hover {
  background: #0D9488;
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--primary-soft);
  border-color: rgba(20, 184, 166, 0.15);
  color: var(--primary);
}

.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.8rem; }
.btn-lg { min-height: 48px; padding: 0 24px; font-size: 0.94rem; }
.btn-full { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid rgba(20, 184, 166, 0.2);
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 640px;
}

/* ── Home hero ── */
.home-hero {
  padding: 56px 0 48px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.home-hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.hero-centered {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.08;
}

.hero-subtitle {
  margin: 0 auto;
  max-width: 600px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-centered .btn-row {
  justify-content: center;
  margin-top: 28px;
}

.hero-centered .lead {
  margin-inline: auto;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 120px;
}

.hero-stat strong {
  display: block;
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

.hero-stat span {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.35;
}

.hero-sift-board {
  width: 100%;
  margin-top: 8px;
}

.sift-board {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg);
}

.sift-board-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 18px;
  background: var(--primary-soft);
  border-bottom: 1px solid rgba(20, 184, 166, 0.22);
}

.sift-board-label {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.sift-board-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.sift-board-status {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--primary);
}

.sift-board-pipeline {
  display: grid;
  grid-template-columns: minmax(200px, 1.1fr) auto minmax(220px, 1.2fr) auto minmax(220px, 1fr);
  align-items: stretch;
  gap: 0;
}

.sift-stage {
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.sift-stage-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.sift-stage-divider {
  display: grid;
  place-items: center;
  align-self: stretch;
  padding: 0 6px;
  background: var(--bg-soft);
  border-inline: 1px dashed rgba(245, 158, 11, 0.35);
}

.sift-stage-divider span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
}

.source-stack {
  display: grid;
  gap: 6px;
}

.source-chip {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.78rem;
  line-height: 1.35;
}

.chip-src {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip-text { color: var(--ink); }

.source-chip.chip-negative { border-left: 3px solid var(--risk); }
.source-chip.chip-positive { border-left: 3px solid var(--primary); }
.source-chip.chip-request { border-left: 3px solid var(--trend); }
.source-chip.chip-churn { border-left: 3px solid var(--secondary); }

.theme-bars {
  display: grid;
  gap: 10px;
}

.theme-bar {
  display: grid;
  grid-template-columns: 72px 1fr 36px;
  gap: 10px;
  align-items: center;
  font-size: 0.78rem;
}

.theme-name {
  font-weight: 600;
  color: var(--ink);
}

.theme-track {
  height: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.theme-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.theme-bar.theme-negative .theme-track i { background: var(--risk); }
.theme-bar.theme-request .theme-track i { background: var(--trend); }
.theme-bar.theme-neutral .theme-track i { background: var(--muted); }

.theme-bar em {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-style: normal;
  color: var(--muted);
  text-align: right;
}

.insight-rank {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.insight-rank li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
}

.insight-rank li div {
  display: grid;
  gap: 2px;
}

.insight-rank strong {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.insight-rank span:not(.signal-tag) {
  font-size: 0.72rem;
  color: var(--muted);
}

.sift-board-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 10px 18px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
}

.sift-board-foot span::before {
  content: "● ";
  color: var(--primary);
}

/* ── Sift hub (subpages) ── */
.sift-hub {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: var(--card-gap);
  align-items: start;
}

.sift-hub-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sift-hub-col .ui-panel { width: 100%; }

.sift-hub-engine .ui-panel {
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.08), var(--shadow-lg);
}

.sift-hub-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px dashed rgba(245, 158, 11, 0.5);
  color: var(--secondary);
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
}

.sift-hub-arrow::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(20, 184, 166, 0.08);
  pointer-events: none;
}

/* ── Stream feed ── */
.stream-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stream-feed .ui-label { margin-bottom: 10px; }

.stream-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-left-width: 3px;
  font-size: 0.84rem;
}

.stream-row p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.stream-src {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

.stream-negative { border-left-color: var(--risk); }
.stream-positive { border-left-color: var(--primary); }
.stream-churn { border-left-color: var(--secondary); }
.stream-request { border-left-color: var(--trend); }

/* ── Engine sift ── */
.engine-sift {
  display: grid;
  gap: 0;
}

.engine-sift-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}

.engine-sift-row:last-of-type { border-bottom: 0; }

.engine-sift-row span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.engine-sift-row strong {
  color: var(--ink);
  font-size: 0.82rem;
  text-align: right;
}

.engine-pulse {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--primary-soft);
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  animation: pulse-sift 1.8s ease-in-out infinite;
}

@keyframes pulse-sift {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(20, 184, 166, 0); }
}

/* ── Insight stack ── */
.insight-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-stack .ui-panel {
  box-shadow: var(--shadow);
}

.mini-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}

.mini-list li { margin-bottom: 5px; }

.trend-up {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--trend);
  line-height: 1.5;
}

.trend-up strong { color: var(--ink); }

/* ── UI panel library ── */
.ui-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ui-panel-highlight {
  border-color: rgba(20, 184, 166, 0.3);
  background: linear-gradient(180deg, var(--bg) 0%, rgba(20, 184, 166, 0.03) 100%);
}

.ui-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.ui-panel-body { padding: var(--card-pad); }

.ui-badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--secondary-soft);
  color: var(--primary);
  border: 1px solid rgba(245, 158, 11, 0.25);
  white-space: nowrap;
}

.ui-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.ui-alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 0.88rem;
  margin-top: 16px;
}

.ui-alert strong { color: var(--ink); }

.ui-alert-ok {
  border-color: rgba(20, 184, 166, 0.28);
  background: var(--primary-soft);
  color: #0D9488;
}

.ui-alert-warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: var(--secondary-soft);
  color: #B45309;
}

.ui-alert-info {
  border-color: rgba(37, 99, 235, 0.28);
  background: var(--trend-soft);
  color: var(--trend);
}

/* ── Signal tags ── */
.signal-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.signal-positive {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(20, 184, 166, 0.25);
}

.signal-negative {
  background: var(--risk-soft);
  color: var(--risk);
  border-color: rgba(220, 38, 38, 0.25);
}

.signal-churn {
  background: var(--secondary-soft);
  color: #B45309;
  border-color: rgba(245, 158, 11, 0.28);
}

.signal-opportunity {
  background: var(--trend-soft);
  color: var(--trend);
  border-color: rgba(37, 99, 235, 0.25);
}

.signal-trend {
  background: var(--trend-soft);
  color: var(--trend);
  border-color: rgba(37, 99, 235, 0.25);
}

.signal-neutral {
  background: var(--bg-soft);
  color: var(--muted);
  border-color: var(--line);
}

.signal-high {
  background: var(--risk-soft);
  color: var(--risk);
  border-color: rgba(220, 38, 38, 0.25);
}

.signal-medium {
  background: var(--secondary-soft);
  color: #B45309;
  border-color: rgba(245, 158, 11, 0.28);
}

.signal-watch {
  background: var(--bg-soft);
  color: var(--muted);
  border-color: var(--line);
}

.signal-request {
  background: var(--trend-soft);
  color: var(--trend);
  border-color: rgba(37, 99, 235, 0.25);
}

/* ── Triptych lab ── */
.triptych-lab {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
}

.record-stream,
.analysis-sift,
.output-insights {
  display: grid;
  gap: 0;
}

.record-row,
.analysis-row,
.output-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}

.record-row:last-child,
.analysis-row:last-child,
.output-row:last-child { border-bottom: 0; }

.record-row span:first-child,
.analysis-row span:first-child {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--secondary);
}

.record-row strong,
.analysis-row strong,
.output-row strong {
  color: var(--ink);
  font-size: 0.82rem;
  text-align: right;
}

.output-row span:not(.signal-tag) {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ── Theme lab ── */
.theme-lab {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--card-gap);
  align-items: start;
}

.theme-cloud-wrap {
  padding: var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.theme-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 12px 0;
}

.theme-bubble {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  transition: transform 0.15s;
}

.theme-bubble em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
}

.theme-bubble.theme-high {
  padding: 18px 22px;
  font-size: 0.95rem;
  background: var(--risk-soft);
  border-color: rgba(220, 38, 38, 0.2);
}

.theme-bubble.theme-rising {
  padding: 16px 20px;
  font-size: 0.9rem;
  background: var(--trend-soft);
  border-color: rgba(37, 99, 235, 0.2);
}

.theme-bubble.theme-medium {
  padding: 14px 18px;
  font-size: 0.86rem;
}

.theme-bubble.theme-positive {
  background: var(--primary-soft);
  border-color: rgba(20, 184, 166, 0.2);
}

.theme-ranking {
  padding: var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.theme-rank-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}

.theme-rank-row:last-child { border-bottom: 0; }

.rank-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.theme-rank-row strong { color: var(--ink); }
.theme-rank-row > span:not(.signal-tag) { color: var(--muted); font-size: 0.8rem; }

/* ── Trend chart ── */
.trend-chart {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.trend-line {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 0.84rem;
}

.trend-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trend-track {
  height: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.trend-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--trend));
}

.trend-line strong {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--trend);
  min-width: 48px;
  text-align: right;
}

.trend-permissions .trend-track span { background: linear-gradient(90deg, var(--trend), #60A5FA); }
.trend-billing .trend-track span { background: linear-gradient(90deg, var(--secondary), #FBBF24); }
.trend-mobile .trend-track span { background: linear-gradient(90deg, var(--risk), #F87171); }
.trend-reporting .trend-track span { background: linear-gradient(90deg, var(--primary), #5EEAD4); }
.trend-onboarding .trend-track span,
.trend-flat .trend-track span { background: var(--line); }

.trend-callout {
  padding: 16px 18px;
  background: var(--trend-soft);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
}

.trend-callout strong {
  font-size: 0.92rem;
  color: var(--ink);
}

.trend-callout span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Feature requests ── */
.request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.request-row:last-child { border-bottom: 0; }

.request-row strong {
  display: block;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.request-row span {
  font-size: 0.78rem;
  color: var(--muted);
}

.request-high { border-left: 3px solid var(--risk); padding-left: 12px; }
.request-medium { border-left: 3px solid var(--secondary); padding-left: 12px; }
.request-watch { border-left: 3px solid var(--muted); padding-left: 12px; }

/* ── Signal quadrants ── */
.signal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--card-gap);
}

.signal-quadrant {
  padding: var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border-top-width: 3px;
}

.signal-quadrant h3 {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.signal-quadrant ul {
  padding-left: 18px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
}

.signal-quadrant li { margin-bottom: 6px; }

.signal-quadrant.signal-positive { border-top-color: var(--primary); }
.signal-quadrant.signal-negative { border-top-color: var(--risk); }
.signal-quadrant.signal-churn { border-top-color: var(--secondary); }
.signal-quadrant.signal-opportunity { border-top-color: var(--trend); }

/* ── Churn signals ── */
.churn-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

.churn-row:last-child { border-bottom: 0; }

.churn-row strong {
  color: var(--ink);
  font-family: var(--display);
}

.churn-row > span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* ── Sentiment bars ── */
.sentiment-bars {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.sentiment-bar {
  display: grid;
  grid-template-columns: 80px 1fr 44px;
  gap: 12px;
  align-items: center;
  font-size: 0.84rem;
}

.sentiment-bar > span {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.bar-track {
  height: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.sentiment-positive .bar-track span { background: var(--primary); }
.sentiment-neutral .bar-track span { background: var(--muted); }
.sentiment-negative .bar-track span { background: var(--risk); }

.sentiment-bar strong {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink);
  text-align: right;
}

.sentiment-note {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* ── Competitor mentions ── */
.comp-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.comp-row:last-child { border-bottom: 0; }

.comp-row strong {
  display: inline-block;
  font-size: 0.92rem;
  color: var(--ink);
  margin-right: 12px;
}

.comp-row > span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.comp-row p {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Executive brief ── */
.exec-sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--card-gap);
}

.exec-block {
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.exec-block .ui-label { margin-bottom: 8px; }

.exec-block p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Report doc ── */
.report-doc {
  display: grid;
  gap: 16px;
}

.report-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.report-head strong {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--ink);
}

.report-head span {
  font-size: 0.8rem;
  color: var(--muted);
}

.report-body {
  display: grid;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.report-body em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  margin-right: 6px;
}

/* ── Use case ── */
.use-case {
  display: grid;
  gap: 0;
}

.use-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 16px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

.use-row:last-child { border-bottom: 0; }

.use-row > span:first-child {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.use-row strong {
  color: var(--ink);
  font-size: 0.88rem;
}

/* ── Integration flow ── */
.integration-flow {
  display: grid;
  gap: 12px;
}

.int-flow-row {
  display: grid;
  grid-template-columns: 100px 1fr auto 120px auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.84rem;
}

.int-flow-src { font-weight: 700; color: var(--ink); }
.int-flow-desc { color: var(--muted); font-size: 0.8rem; }
.int-flow-arrow { color: var(--primary); font-weight: 700; text-align: center; }
.int-flow-hub {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
}
.int-flow-out { font-size: 0.8rem; color: var(--muted); }

/* ── Integration grid ── */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--card-gap);
}

.int-card {
  padding: var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.int-card h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.int-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.int-card .btn { align-self: flex-start; }

/* ── Security grid ── */
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--card-gap);
}

.security-card {
  padding: var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.security-card h3 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.security-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
  align-items: stretch;
}

.plan-card {
  position: relative;
  padding: 28px var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.plan-card.plan-featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

.plan-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(20, 184, 166, 0.25);
  align-self: flex-start;
}

.plan-card h3 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.plan-card > p {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.plan-price {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: 2.1rem;
  color: var(--ink);
  line-height: 1;
}

.plan-price span {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  font-style: normal;
}

.plan-features {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;
}

.plan-features li {
  padding-left: 18px;
  position: relative;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
}

.plan-card .btn { margin-top: auto; }

/* ── Lab principles ── */
.lab-principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
}

.principle-slide {
  position: relative;
  padding: 28px 24px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.slide-num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.principle-slide h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--ink);
}

.principle-slide p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Sift flow (home) ── */
.sift-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  position: relative;
}

.flow-step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -12px;
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--secondary), transparent);
  opacity: 0.5;
  pointer-events: none;
}

.flow-step:nth-child(3n)::after,
.flow-step:last-child::after { display: none; }

.flow-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.flow-step strong {
  display: block;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.flow-step p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Capability grid ── */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
}

.cap-card {
  padding: var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.cap-card:hover {
  border-color: rgba(20, 184, 166, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cap-card h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--ink);
}

.cap-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.cap-card .kicker { display: block; margin-bottom: 8px; }

/* ── Scenario grid ── */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--card-gap);
}

.scenario-card {
  padding: var(--card-pad);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s;
}

.scenario-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.scenario-card h3 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.scenario-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Source strip ── */
.source-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  padding: 20px 0;
}

.source-strip span {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow);
}

/* ── Case study & report preview ── */
.case-study {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--card-gap);
  align-items: start;
}

.case-study-copy {
  display: grid;
  gap: 14px;
}

.case-study-copy h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  line-height: 1.2;
}

.case-study-copy p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
}

.case-study-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 8px;
}

.case-study-metrics div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.case-study-metrics strong {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--primary);
}

.case-study-metrics span {
  font-size: 0.76rem;
  color: var(--muted);
}

.report-preview {
  padding: var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.report-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.report-preview-head strong {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--ink);
}

.report-preview-body {
  display: grid;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
}

.report-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.report-preview-row:last-child { border-bottom: 0; }

/* ── Page hero & showcase ── */
.page-hero {
  padding: 56px 0 48px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.page-title {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  line-height: 1.12;
  max-width: 720px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.breadcrumb a { color: var(--primary); font-weight: 500; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span:last-child { color: var(--ink); }

.page-showcase {
  padding: 48px 0;
  background: var(--bg);
}

.page-showcase .container {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

.feature-frame {
  padding: clamp(24px, 3vw, 32px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.page-showcase .container > .feature-frame,
.page-showcase .container > [data-theme-demo] > .feature-frame,
.page-showcase .container > [data-trend-demo] > .feature-frame,
.page-showcase .container > [data-request-demo] > .feature-frame,
.page-showcase .container > [data-signal-demo] > .feature-frame,
.page-showcase .container > [data-churn-demo] > .feature-frame,
.page-showcase .container > [data-sentiment-demo] > .feature-frame,
.page-showcase .container > [data-competitor-demo] > .feature-frame,
.page-showcase .container > [data-exec-demo] > .feature-frame,
.page-showcase .container > [data-saas-demo] > .feature-frame,
.page-showcase .container > [data-ecommerce-demo] > .feature-frame,
.page-showcase .container > [data-mobile-demo] > .feature-frame,
.page-showcase .container > [data-agency-demo] > .feature-frame {
  margin-top: 0;
}

.is-running {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* ── Sections ── */
.section, .page-body, .is-alt { padding: 56px 0; }

.section.alt, .is-alt {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.page-showcase + .is-alt { border-top: 0; }

.is-alt .section-inline-title { margin-bottom: 28px; }

.is-alt + .section.alt.tight { padding-top: 48px; }

.section.tight, .section.alt.tight { padding: 48px 0; }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.65;
}

.section-inline-title {
  margin: 0 0 24px;
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--ink);
}

.section-sub {
  margin: -12px 0 28px;
  color: var(--muted);
  font-size: 0.95rem;
}

.spec-callout {
  padding: 20px 24px;
  background: var(--primary-soft);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: var(--radius-lg);
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.6;
}

.spec-callout strong { color: var(--primary); }

/* ── Pain list ── */
.pain-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.pain-item {
  padding: 28px 32px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.pain-item:nth-child(2n) { border-right: 0; }
.pain-item:nth-last-child(-n+2) { border-bottom: 0; }

.pain-item h3 {
  margin: 6px 0 8px;
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--ink);
}

.pain-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Sub CTA & home CTA ── */
.sub-cta,
.home-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  width: 100%;
  padding: 36px 40px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.sub-cta h3,
.home-cta h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.45rem;
  color: var(--ink);
}

.sub-cta p,
.home-cta p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 520px;
}

.sub-cta .btn-row,
.home-cta .btn-row {
  margin-top: 0;
  justify-content: center;
}

.home-cta {
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg) 60%);
  border-color: rgba(20, 184, 166, 0.2);
}

/* ── About · lab layout (unique — not mooring rail) ── */
.about-lab-hero {
  padding: 48px 0 40px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.about-lab-intro {
  max-width: 640px;
}

.about-lab-intro .page-title { margin-bottom: 12px; }

.about-funnel-section {
  padding: 56px 0;
  background: var(--bg);
}

.sift-funnel {
  position: relative;
  padding-top: 28px;
}

.funnel-ramp {
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 24px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--primary-soft) 15%,
    var(--primary-soft) 85%,
    transparent 100%
  );
  clip-path: polygon(0 100%, 8% 0, 92% 0, 100% 100%);
  border-top: 2px solid rgba(20, 184, 166, 0.25);
  pointer-events: none;
}

.funnel-stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--card-gap);
  position: relative;
  z-index: 1;
}

.funnel-stage {
  padding: var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--primary);
}

.funnel-stage-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.funnel-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.funnel-stage h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
}

.funnel-stage p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}

.specimen-tray {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
}

.specimen-slot {
  padding: var(--card-pad);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border-left: 3px solid var(--primary);
}

.specimen-slot .ui-label { margin-bottom: 10px; }

.specimen-slot p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.specimen-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
  padding: var(--card-pad);
  background: var(--primary-soft);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: var(--radius-lg);
  text-align: center;
}

.specimen-metrics div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.specimen-metrics strong {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--primary);
}

.specimen-metrics span {
  font-size: 0.78rem;
  color: var(--muted);
}

.about-lab-footer {
  padding: 56px 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.lab-cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 32px;
  padding: 36px 40px;
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg) 60%);
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.lab-cta-panel h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--ink);
}

.lab-cta-panel p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 480px;
}

.lab-cta-panel .btn-row {
  margin-top: 0;
  flex-shrink: 0;
}

/* ── Auth · split panel (teal visual + form) ── */
.auth-sift {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-sift-visual {
  padding: clamp(32px, 5vw, 48px);
  background: linear-gradient(155deg, #0F766E 0%, var(--primary) 42%, #134E4A 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  overflow: hidden;
}

.auth-sift-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 85%, rgba(245, 158, 11, 0.18), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.08), transparent 40%);
  pointer-events: none;
}

.auth-sift-visual > * { position: relative; z-index: 1; }

.auth-sift-brand {
  color: #fff;
  text-decoration: none;
}

.auth-sift-brand:hover { color: #fff; opacity: 0.92; text-decoration: none; }

.auth-sift-brand .brand-text strong { color: #fff; }

.auth-sift-brand .brand-text span { color: rgba(255, 255, 255, 0.55); }

.auth-sift-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.12;
  color: #fff;
}

.auth-sift-copy p {
  margin: 0;
  max-width: 380px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.auth-sift-preview {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
}

.auth-preview-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 0.78rem;
}

.auth-preview-row span:first-child {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.auth-preview-row strong {
  font-family: var(--sans);
  font-weight: 600;
  color: #fff;
}

.auth-preview-row em {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-style: normal;
  color: #FCD34D;
}

.auth-sift-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-sift-stat {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.auth-sift-stat strong {
  display: block;
  font-family: var(--mono);
  font-size: 1.2rem;
  color: #99F6E4;
}

.auth-sift-stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.62);
}

.auth-sift-foot {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.42);
}

.auth-sift-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 48px) var(--gutter);
  background: var(--bg-soft);
}

.auth-sift-wrap {
  width: min(100%, 400px);
}

.auth-sift-wrap h2 {
  margin: 0 0 6px;
  font-size: 1.65rem;
  color: var(--ink);
}

.auth-sift-wrap .lead {
  margin: 0 0 24px;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.auth-sift-card {
  padding: clamp(24px, 3vw, 32px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.auth-footer-note {
  text-align: center;
  margin-top: 20px;
  font-size: 0.86rem;
  color: var(--muted);
}

/* Legacy lab auth selectors kept for about page specimen styles */
.auth-lab-specimen {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 20px;
  margin-bottom: 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.specimen-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
}

.specimen-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  text-align: left;
}

.specimen-bar {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 32px;
}

.specimen-bar span {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 3px 3px 0 0;
}

.specimen-bar span:nth-child(1) { height: 40%; }
.specimen-bar span:nth-child(2) { height: 65%; }
.specimen-bar span:nth-child(3) { height: 85%; background: var(--secondary-soft); border-color: rgba(245, 158, 11, 0.3); }
.specimen-bar span:nth-child(4) { height: 55%; }
.specimen-bar span:nth-child(5) { height: 70%; }

.specimen-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.specimen-filter span {
  padding: 4px 10px;
  background: var(--primary-soft);
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.specimen-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  background: var(--trend-soft);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius);
  text-align: left;
}

.specimen-result strong {
  font-family: var(--display);
  font-size: 1rem;
  color: var(--trend);
}

.specimen-result span {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ── Forms ── */
.form, .site-modal-form { display: grid; gap: 16px; }

.form-group, .form-field {
  display: grid;
  gap: 6px;
}

.form-group label, .form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.form-group input,
.form-group select,
.form-group textarea,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-divider::before,
.form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.form-success {
  margin: 0;
  padding: 12px 14px;
  background: var(--primary-soft);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: var(--radius);
  font-size: 0.86rem;
  color: #0D9488;
  text-align: center;
}

/* ── Modals ── */
.site-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px var(--gutter);
}

.site-modal:not([hidden]) { display: flex; }

.site-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 41, 59, 0.55);
  backdrop-filter: blur(4px);
}

.site-modal-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.site-modal-wide { width: min(720px, 100%); }

.site-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.site-modal-close:hover {
  background: var(--line);
  color: var(--ink);
}

.site-modal h2 {
  margin: 0 32px 8px 0;
  font-size: 1.45rem;
  color: var(--ink);
}

.site-modal-lead {
  margin: 0 0 24px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Demo workspace ── */
.demo-workspace {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: start;
}

.demo-col {
  padding: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.demo-label {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.demo-cell {
  font-size: 0.82rem;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 6px;
  color: var(--ink);
}

.demo-tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 4px 8px;
  background: var(--primary-soft);
  border-radius: 4px;
  margin: 3px;
  color: var(--primary);
}

.demo-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-arrow {
  color: var(--secondary);
  font-size: 1.2rem;
  font-weight: 700;
  align-self: center;
}

.demo-timeline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.demo-timeline span {
  font-size: 0.68rem;
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
}

/* ── Footer ── */
.site-footer {
  background: var(--ink);
  color: rgba(253, 252, 248, 0.72);
  padding: 56px 0 28px;
  margin-top: auto;
}

.footer-wrap { display: flex; flex-direction: column; }

.footer-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(253, 252, 248, 0.1);
  margin-bottom: 40px;
}

.footer-top .brand-text strong { color: #FDFCF8; }
.footer-top .brand-text span { color: rgba(253, 252, 248, 0.5); }

.footer-tagline {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(253, 252, 248, 0.62);
  max-width: 520px;
}

.footer-cta { flex-shrink: 0; white-space: nowrap; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px 24px;
  margin-bottom: 40px;
}

.footer-col h5 {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
}

.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(253, 252, 248, 0.55);
  transition: color 0.15s;
}

.footer-col a:hover { color: var(--secondary); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(253, 252, 248, 0.1);
}

.footer-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: rgba(253, 252, 248, 0.45);
  line-height: 1.5;
}

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible,
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive: 960px ── */
@media (max-width: 960px) {
  .announce-bar { font-size: 0.8rem; padding: 10px 14px; }

  .header-row {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
    min-height: auto;
  }

  .nav-main {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
  }

  .home-hero .container { gap: 36px; }

  .sift-board-pipeline {
    grid-template-columns: 1fr;
  }

  .sift-stage-divider {
    padding: 8px 0;
    border-inline: 0;
    border-block: 1px dashed rgba(245, 158, 11, 0.35);
  }

  .sift-stage-divider span {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .theme-bar {
    grid-template-columns: 64px 1fr 32px;
  }

  .auth-sift {
    grid-template-columns: 1fr;
  }

  .auth-sift-visual {
    min-height: auto;
  }

  .auth-sift-stats {
    grid-template-columns: 1fr 1fr;
  }

  .sift-hub {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sift-hub-arrow { display: none; }

  .triptych-lab { grid-template-columns: 1fr; }

  .theme-lab { grid-template-columns: 1fr; }

  .signal-grid { grid-template-columns: 1fr; }

  .exec-sections { grid-template-columns: 1fr; }

  .lab-principles { grid-template-columns: 1fr; }

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

  .specimen-tray { grid-template-columns: 1fr; }

  .specimen-metrics { grid-template-columns: 1fr; }

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

  .flow-step::after { display: none; }

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

  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }

  .pain-list { grid-template-columns: 1fr; }
  .pain-item { border-right: 0 !important; }
  .pain-item:last-child { border-bottom: 0; }

  .security-grid { grid-template-columns: 1fr; }

  .case-study { grid-template-columns: 1fr; }

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

  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .footer-tagline { max-width: none; }

  .int-flow-row {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .int-flow-arrow { display: none; }

  .use-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .lab-cta-panel {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .lab-cta-panel .btn-row { justify-content: center; }
}

/* ── Responsive: 900px ── */
@media (max-width: 900px) {
  .header-actions .nav-link { display: none; }

  .hero-stats { gap: 10px 16px; }

  .hero-stat { min-width: 100px; }

  .funnel-stages { grid-template-columns: 1fr; }

  .funnel-ramp { display: none; }

  .sift-flow { grid-template-columns: 1fr; }

  .cap-grid { grid-template-columns: 1fr; }

  .sub-cta, .home-cta { padding: 28px 24px; }

  .demo-workspace { grid-template-columns: 1fr; }

  .demo-arrow { display: none; }

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

  .section, .page-body, .page-showcase, .is-alt { padding: 40px 0; }

  .feature-frame { padding: 20px; }

  .site-modal-panel { padding: 24px 20px; }

  .auth-sift-stats { grid-template-columns: 1fr; }

  .page-hero { padding: 40px 0 36px; }

  .about-lab-hero { padding: 40px 0 32px; }

  .about-funnel-section { padding: 40px 0; }

  .about-lab-footer { padding: 40px 0; }

  .source-strip { gap: 10px 14px; }

  .source-strip span {
    font-size: 0.76rem;
    padding: 6px 12px;
  }

  .theme-rank-row {
    grid-template-columns: 28px 1fr;
    gap: 6px;
  }

  .theme-rank-row > span:not(.signal-tag),
  .theme-rank-row .signal-tag {
    grid-column: 2;
  }

  .churn-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .request-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
