/* Sherlock demo shared styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --amber:   #f59e0b;
  --amber-2: #fbbf24;
  --violet:  #a855f7;
  --violet-2:#c084fc;
  --red:     #ef4444;
  --orange:  #f97316;
  --yellow:  #eab308;
  --green:   #10b981;
  --blue:    #3b82f6;
  --bg:      #000000;
  --bg-2:    #0a0812;
  --panel:   #0f0d18;
  --card:    rgba(255,255,255,0.04);
  --border:  rgba(255,255,255,0.08);
  --border-2:rgba(255,255,255,0.14);
  --border-3:rgba(255,255,255,0.22);
  --text:    #ffffff;
  --muted:   rgba(255,255,255,0.62);
  --soft:    rgba(255,255,255,0.4);
  --dim:     rgba(255,255,255,0.18);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1000px 500px at 20% 0%, rgba(245,158,11,0.08) 0%, transparent 60%),
    radial-gradient(800px 500px at 80% 20%, rgba(168,85,247,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.demo-shell { position: relative; z-index: 1; }

/* ---------- Demo Top Bar ---------- */
.demo-bar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(0,0,0,0.7);
  border-bottom: 1px solid var(--border);
}
.demo-bar-inner {
  max-width: 1360px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.demo-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.demo-brand-logo { width: 26px; height: 26px; }
.demo-brand-name { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.demo-brand-sub { font-size: 11px; color: var(--soft); }
.demo-crumb { font-size: 13px; color: var(--muted); }
.demo-crumb strong { color: var(--text); font-weight: 600; }
.demo-back {
  font-size: 13px; color: var(--muted); text-decoration: none;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border-2);
  transition: color 0.2s, border-color 0.2s;
}
.demo-back:hover { color: var(--text); border-color: var(--border-3); }

.demo-banner {
  background: linear-gradient(90deg, rgba(245,158,11,0.14), rgba(168,85,247,0.14));
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.03em;
}
.demo-banner strong { color: var(--amber-2); font-weight: 600; }

/* ---------- App-like layout ---------- */
.demo-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.page-head { margin-bottom: 32px; }
.page-eyebrow {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber); font-weight: 600; margin-bottom: 10px;
}
.page-title {
  font-family: 'Instrument Serif', 'Inter', serif;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.page-sub { font-size: 15px; color: var(--muted); max-width: 800px; line-height: 1.6; }

/* Meta strip (client + date + score) */
.meta-strip {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 28px;
}
.meta-item { display: flex; flex-direction: column; gap: 3px; }
.meta-label { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft); }
.meta-value { font-size: 14px; font-weight: 600; color: var(--text); }
.meta-sep { width: 1px; height: 28px; background: var(--border-2); }

/* Cards / panels */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.card-title { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--soft); margin-bottom: 14px; }
.card-value { font-family: 'Instrument Serif', serif; font-size: 44px; line-height: 1; letter-spacing: -0.02em; margin-bottom: 6px; }
.card-hint { font-size: 12px; color: var(--muted); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.data-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--soft); font-weight: 600;
  border-bottom: 1px solid var(--border-2);
  background: rgba(255,255,255,0.02);
}
.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip.tier-critical { background: rgba(239,68,68,0.14); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.chip.tier-high     { background: rgba(249,115,22,0.14); color: #fdba74; border-color: rgba(249,115,22,0.3); }
.chip.tier-medium   { background: rgba(234,179,8,0.14); color: #fde68a; border-color: rgba(234,179,8,0.3); }
.chip.tier-low      { background: rgba(16,185,129,0.14); color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
.chip.status-active { background: rgba(59,130,246,0.14); color: #93c5fd; border-color: rgba(59,130,246,0.3); }
.chip.status-review { background: rgba(245,158,11,0.14); color: #fcd34d; border-color: rgba(245,158,11,0.3); }
.chip.status-blocked{ background: rgba(239,68,68,0.14); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.chip.status-shadow { background: rgba(168,85,247,0.14); color: #d8b4fe; border-color: rgba(168,85,247,0.3); }

/* Score bar */
.score-bar {
  height: 6px; width: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px; overflow: hidden;
  display: inline-block; vertical-align: middle;
  margin-right: 8px;
}
.score-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #f59e0b, #a855f7);
  border-radius: 999px;
}
.score-num { font-family: 'Instrument Serif', serif; font-size: 17px; color: var(--text); vertical-align: middle; }

/* Section headers within demos */
.demo-section { margin-top: 40px; }
.demo-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.demo-section-title {
  font-family: 'Instrument Serif', serif;
  font-size: 24px; letter-spacing: -0.02em;
}
.demo-section-hint { font-size: 12px; color: var(--soft); }

/* Buttons in-app */
.mini-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent;
}
.mini-btn-primary {
  background: linear-gradient(120deg, #f59e0b, #a855f7);
  color: #fff;
}
.mini-btn-primary:hover { transform: translateY(-1px); }
.mini-btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.mini-btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--border-3); }
