:root {
  --lab-bg: #08090b;
  --lab-panel: #101217;
  --lab-panel-2: #15181f;
  --lab-line: rgba(255,255,255,.085);
  --lab-ink: #f7f7f8;
  --lab-muted: #9ea5b1;
  --lab-accent: #ff5528;
  --lab-green: #5fd39a;
  --lab-blue: #65bfff;
  --lab-yellow: #f3c969;
  --lab-red: #ff7b7b;
  --lab-purple: #c7a6ff;
}

body.labs-page { margin: 0; background: var(--lab-bg); color: var(--lab-ink); overflow-x: hidden; }
.labs-page .site-header { background: rgba(8,9,11,.88); border-bottom: 1px solid var(--lab-line); backdrop-filter: blur(18px); }
.labs-page .brand-copy strong, .labs-page .brand-copy small, .labs-page .site-nav a { color: var(--lab-ink); }
.labs-page .brand-copy small { opacity: .58; }
.labs-page .menu-toggle span { background: white; }
.labs-page .nav-cta { background: white; color: #08090b !important; }
.lab-shell { width: min(calc(100% - 36px), 1440px); margin-inline: auto; }

.lab-hero { padding: 78px 0 42px; }
.lab-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 54px; align-items: end; }
.lab-kicker { display: inline-flex; align-items: center; gap: 8px; color: #ff9d84; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lab-kicker::before { content:""; width: 7px; height: 7px; border-radius: 50%; background: var(--lab-accent); box-shadow: 0 0 0 6px rgba(255,85,40,.1); }
.lab-hero h1 { margin: 18px 0 18px; color: white; font-size: clamp(3rem, 6vw, 6rem); line-height: .96; letter-spacing: -.07em; }
.lab-hero h1 span { display: inline; color: var(--lab-accent); }
.lab-hero p { max-width: 780px; margin: 0; color: #bac0c9; line-height: 1.7; font-size: 1.05rem; }
.lab-notice { border: 1px solid var(--lab-line); border-radius: 20px; padding: 20px; background: rgba(255,255,255,.03); }
.lab-notice strong { display: block; margin-bottom: 7px; color: white; }
.lab-notice p { color: var(--lab-muted); font-size: 13px; line-height: 1.55; }

.lab-workspace { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 720px; margin-bottom: 76px; border: 1px solid var(--lab-line); border-radius: 28px; overflow: clip; background: #0b0d10; box-shadow: 0 36px 110px rgba(0,0,0,.3); }
.lab-nav { padding: 16px; border-right: 1px solid var(--lab-line); background: #0d0f13; }
.lab-nav-head { padding: 8px 8px 14px; }
.lab-nav-head strong { display:block; font-size: 13px; }
.lab-nav-head small { color: #777e89; font-size: 11px; }
.lab-nav-list { display: grid; gap: 5px; }
.lab-nav-button { width: 100%; min-height: 54px; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: #b8bec8; text-align: left; cursor: pointer; }
.lab-nav-button:hover { background: rgba(255,255,255,.035); }
.lab-nav-button.active { background: rgba(255,85,40,.09); border-color: rgba(255,85,40,.22); color: white; }
.lab-nav-icon { width: 34px; height: 34px; display:grid; place-items:center; border:1px solid var(--lab-line); border-radius:10px; background:#12151a; font-size:11px; font-weight:800; }
.lab-nav-copy { min-width:0; display:grid; gap:2px; }
.lab-nav-copy strong { font-size:12.5px; }
.lab-nav-copy small { color:#747b87; font-size:10.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lab-stage { min-width:0; display:flex; flex-direction:column; background: radial-gradient(circle at 70% 0%, rgba(101,191,255,.05), transparent 26rem), #0b0d10; }
.lab-stage-head { min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 20px; border-bottom:1px solid var(--lab-line); }
.lab-stage-title { min-width:0; }
.lab-stage-title strong { display:block; font-size:15px; }
.lab-stage-title small { display:block; margin-top:2px; color:#79808b; font-size:11px; }
.lab-stage-actions { display:flex; align-items:center; gap:8px; }
.lab-badge { display:inline-flex; align-items:center; gap:7px; padding:6px 9px; border:1px solid var(--lab-line); border-radius:999px; color:#9ca3ae; font-size:10px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.lab-badge::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--lab-green); }
.lab-reset { min-height:34px; padding:0 11px; border:1px solid var(--lab-line); border-radius:9px; background:#12151a; color:#aeb4be; cursor:pointer; font-size:11px; }
.lab-content { min-height:0; flex:1; padding:20px; overflow:auto; }

.demo-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr); gap:16px; align-items:start; }
.demo-panel { border:1px solid var(--lab-line); border-radius:18px; background:rgba(255,255,255,.026); overflow:hidden; }
.demo-panel-head { min-height:52px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; border-bottom:1px solid var(--lab-line); }
.demo-panel-head strong { font-size:12px; }
.demo-panel-head small { color:#747b87; font-size:10px; }
.demo-panel-body { padding:14px; }
.demo-toolbar { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.demo-button { min-height:36px; padding:0 12px; border:1px solid var(--lab-line); border-radius:10px; background:#13161b; color:#d8dbe1; cursor:pointer; font-size:11.5px; font-weight:700; }
.demo-button:hover { border-color:rgba(255,255,255,.2); background:#171a20; }
.demo-button.primary { background:var(--lab-accent); border-color:transparent; color:white; }
.demo-button.approve { background:rgba(95,211,154,.12); border-color:rgba(95,211,154,.28); color:#8be7bb; }
.demo-button.warn { background:rgba(243,201,105,.1); border-color:rgba(243,201,105,.28); color:#f6d886; }
.demo-button.danger { background:rgba(255,123,123,.1); border-color:rgba(255,123,123,.24); color:#ff9d9d; }
.demo-button:disabled { opacity:.38; cursor:not-allowed; }
.demo-select, .demo-input, .demo-textarea { width:100%; min-height:38px; padding:8px 10px; border:1px solid var(--lab-line); border-radius:10px; background:#0e1115; color:white; outline:0; }
.demo-textarea { min-height:84px; resize:vertical; }
.demo-select:focus, .demo-input:focus, .demo-textarea:focus { border-color:rgba(255,85,40,.55); box-shadow:0 0 0 3px rgba(255,85,40,.08); }
.demo-label { display:grid; gap:6px; color:#949ba6; font-size:11px; }
.demo-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }

.status-dot { display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:7px; background:#777; }
.status-good { color:#82e2b4; }.status-good .status-dot { background:var(--lab-green); }
.status-warn { color:#f4d57f; }.status-warn .status-dot { background:var(--lab-yellow); }
.status-bad { color:#ff9c9c; }.status-bad .status-dot { background:var(--lab-red); }
.status-info { color:#9fd4ff; }.status-info .status-dot { background:var(--lab-blue); }

.metric-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.metric-mini { padding:12px; border:1px solid var(--lab-line); border-radius:13px; background:#111419; }
.metric-mini small { display:block; color:#737b87; font-size:9.5px; text-transform:uppercase; letter-spacing:.08em; }
.metric-mini strong { display:block; margin-top:5px; font-size:20px; letter-spacing:-.04em; }

.kanban { display:grid; grid-template-columns:repeat(4,minmax(170px,1fr)); gap:10px; overflow-x:auto; padding-bottom:5px; }
.kanban-column { min-width:170px; padding:10px; border:1px solid var(--lab-line); border-radius:14px; background:#0e1115; }
.kanban-column-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; color:#8d949f; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.case-card { width:100%; padding:11px; border:1px solid var(--lab-line); border-radius:11px; background:#15181d; color:white; text-align:left; cursor:pointer; }
.case-card + .case-card { margin-top:8px; }
.case-card:hover, .case-card.active { border-color:rgba(255,85,40,.36); }
.case-card strong { display:block; font-size:12px; }
.case-card small { display:block; margin-top:5px; color:#858c97; font-size:10px; }
.case-card-meta { display:flex; justify-content:space-between; gap:7px; margin-top:9px; color:#7f8792; font-size:9.5px; }

.detail-list { display:grid; gap:9px; }
.detail-row { display:grid; grid-template-columns:98px 1fr; gap:10px; padding-bottom:9px; border-bottom:1px solid rgba(255,255,255,.055); }
.detail-row dt { color:#707783; font-size:10px; }
.detail-row dd { margin:0; color:#d6dae0; font-size:11.5px; }
.audit-list { display:grid; gap:8px; max-height:270px; overflow:auto; }
.audit-event { position:relative; padding:9px 10px 9px 24px; border-left:1px solid #2a2e36; color:#aeb4be; font-size:10.5px; line-height:1.5; }
.audit-event::before { content:""; position:absolute; width:7px; height:7px; left:-4px; top:13px; border-radius:50%; background:#59616c; }
.audit-event strong { color:white; }
.audit-event time { display:block; color:#626a76; font-size:9px; }

.phone-frame { width:min(100%,360px); margin:0 auto; border:1px solid #292d35; border-radius:28px; padding:9px; background:#050607; box-shadow:0 20px 60px rgba(0,0,0,.25); }
.phone-screen { min-height:570px; display:flex; flex-direction:column; overflow:hidden; border-radius:21px; background:#efeae2; color:#202124; }
.phone-head { padding:13px 14px; background:#075e54; color:white; font-size:12px; font-weight:700; }
.chat-stream { flex:1; padding:14px 10px; overflow:auto; background:linear-gradient(rgba(239,234,226,.92),rgba(239,234,226,.92)), repeating-linear-gradient(45deg,#ddd 0 1px,transparent 1px 8px); }
.chat-message { width:fit-content; max-width:88%; margin-bottom:8px; padding:8px 10px; border-radius:9px; background:white; box-shadow:0 1px 1px rgba(0,0,0,.06); white-space:pre-line; font-size:11px; line-height:1.45; }
.chat-message.user { margin-left:auto; background:#d9fdd3; }
.chat-actions { display:grid; gap:6px; margin-top:7px; }
.chat-action { width:100%; min-height:34px; padding:6px 8px; border:1px solid #d8d8d8; border-radius:7px; background:#fff; color:#087d6b; cursor:pointer; font-size:10.5px; font-weight:750; }
.chat-action:hover { background:#f7f7f7; }
.lead-sheet { display:grid; gap:8px; }
.lead-field { display:grid; grid-template-columns:105px 1fr; gap:9px; padding:8px 0; border-bottom:1px solid var(--lab-line); }
.lead-field span { color:#727a85; font-size:10px; }
.lead-field strong { color:#dce0e5; font-size:11px; }

.pipeline { display:grid; gap:8px; }
.pipeline-step { display:grid; grid-template-columns:30px 1fr auto; gap:10px; align-items:center; padding:10px; border:1px solid var(--lab-line); border-radius:12px; background:#101318; }
.pipeline-index { width:30px; height:30px; display:grid; place-items:center; border:1px solid var(--lab-line); border-radius:9px; color:#7f8792; font-size:10px; font-weight:800; }
.pipeline-copy strong { display:block; font-size:11.5px; }.pipeline-copy small { display:block; margin-top:2px; color:#747b87; font-size:9.5px; }
.pipeline-state { font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.pipeline-step.done { border-color:rgba(95,211,154,.2); }.pipeline-step.done .pipeline-index { color:#8be7bb; border-color:rgba(95,211,154,.28); }.pipeline-step.done .pipeline-state { color:#8be7bb; }
.pipeline-step.wait .pipeline-state { color:#f1d278; }.pipeline-step.block .pipeline-state { color:#ff9d9d; }
.envelope { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; white-space:pre-wrap; padding:12px; border:1px solid var(--lab-line); border-radius:12px; background:#090b0e; color:#a9d5ff; font-size:10px; line-height:1.55; overflow:auto; }

.truth-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.truth-card { padding:12px; border:1px solid var(--lab-line); border-radius:13px; background:#111419; }
.truth-card-head { display:flex; justify-content:space-between; gap:10px; margin-bottom:8px; }
.truth-card strong { font-size:11.5px; }.truth-card p { margin:0; color:#9299a4; font-size:10.5px; line-height:1.55; }
.confidence { min-width:46px; color:#9fd4ff; font-size:10px; font-weight:800; text-align:right; }
.contradiction { margin-top:8px; padding:7px 8px; border-radius:8px; background:rgba(255,123,123,.07); color:#e9a1a1; font-size:9.5px; }
.truth-actions { display:flex; gap:6px; margin-top:10px; }
.truth-actions button { flex:1; }

.check-list-demo { display:grid; gap:8px; }
.check-row { display:grid; grid-template-columns:24px 1fr auto; gap:10px; align-items:center; padding:10px; border:1px solid var(--lab-line); border-radius:11px; background:#101318; }
.check-icon { width:24px; height:24px; display:grid; place-items:center; border:1px solid var(--lab-line); border-radius:8px; color:#707783; font-size:10px; }
.check-row.pass .check-icon { color:#80dfb0; border-color:rgba(95,211,154,.3); background:rgba(95,211,154,.06); }
.check-row.fail .check-icon { color:#ff9696; border-color:rgba(255,123,123,.28); background:rgba(255,123,123,.06); }
.check-copy strong { display:block; font-size:11px; }.check-copy small { display:block; margin-top:2px; color:#707783; font-size:9px; }
.check-result { color:#7b838e; font-size:9px; font-weight:800; text-transform:uppercase; }

.estate-table { width:100%; border-collapse:collapse; font-size:10.5px; }
.estate-table th { padding:9px; color:#737b86; text-align:left; font-size:9px; letter-spacing:.06em; text-transform:uppercase; border-bottom:1px solid var(--lab-line); }
.estate-table td { padding:10px 9px; border-bottom:1px solid rgba(255,255,255,.05); color:#bbc0c8; }
.estate-table tr[data-estate-id] { cursor:pointer; }.estate-table tr[data-estate-id]:hover { background:rgba(255,255,255,.025); }
.estate-name { color:white; font-weight:700; }

.opportunity-list { display:grid; gap:8px; }
.opportunity-card { padding:11px; border:1px solid var(--lab-line); border-radius:12px; background:#111419; cursor:pointer; }
.opportunity-card:hover, .opportunity-card.active { border-color:rgba(101,191,255,.3); }
.opportunity-card-head { display:flex; justify-content:space-between; gap:10px; }
.opportunity-card strong { font-size:11.5px; }.opportunity-card small { display:block; margin-top:4px; color:#777f8a; font-size:9.5px; }
.score-ring { width:40px; height:40px; display:grid; place-items:center; flex:0 0 40px; border:3px solid rgba(101,191,255,.32); border-radius:50%; color:#a8dcff; font-size:9.5px; font-weight:800; }
.gap-list { display:grid; gap:6px; }
.gap-item { padding:8px 9px; border:1px solid var(--lab-line); border-radius:9px; color:#aab0ba; font-size:10px; }
.gap-item.good { border-color:rgba(95,211,154,.18); color:#9addba; }.gap-item.missing { border-color:rgba(243,201,105,.18); color:#e7cf91; }

@media (max-width:1100px) {
  .lab-workspace { grid-template-columns:210px minmax(0,1fr); }
  .demo-grid { grid-template-columns:1fr; }
  .metric-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:820px) {
  .lab-hero-grid { grid-template-columns:1fr; }
  .lab-workspace { display:block; border-radius:20px; }
  .lab-nav { border-right:0; border-bottom:1px solid var(--lab-line); overflow-x:auto; }
  .lab-nav-head { display:none; }
  .lab-nav-list { display:flex; min-width:max-content; }
  .lab-nav-button { width:190px; }
  .lab-stage-head { align-items:flex-start; flex-direction:column; }
  .truth-grid { grid-template-columns:1fr; }
}
@media (max-width:620px) {
  .lab-shell { width:min(calc(100% - 24px),1440px); }
  .lab-hero { padding:58px 0 32px; }
  .lab-hero h1 { font-size:clamp(2.8rem,15vw,4.8rem); }
  .lab-content { padding:12px; }
  .demo-form-grid, .metric-strip { grid-template-columns:1fr; }
  .phone-frame { width:100%; }
}
