:root {
  --ink: #11162c;
  --ink-2: #303856;
  --muted: #606985;
  --muted-2: #9299ae;
  --paper: #f3f4ff;
  --card: #ffffff;
  --line: #e1e3f0;
  --line-dark: #ccd0e2;
  --teal: #444bea;
  --teal-deep: #343bd0;
  --mint: #e3e5ff;
  --lime: #aa95ff;
  --amber: #f1b959;
  --coral: #e4715e;
  --violet: #8e79bd;
  --shadow: 0 18px 60px rgba(23, 43, 50, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }

.truth-banner { display:flex; align-items:center; justify-content:center; gap:14px; min-height:46px; padding:9px 22px; background:#fff0a8; color:var(--ink); border-bottom:2px solid #f1c84a; text-align:center; font-size:10.5px; line-height:1.45; }
.truth-banner b { flex:0 0 auto; padding:6px 9px; border-radius:5px; background:var(--teal); color:#fff; font-size:8px; letter-spacing:.11em; }
.truth-banner strong { max-width:1180px; font-weight:800; }

.portfolio-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(28px,7vw,100px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(15px);
}
.portfolio-header > strong { font-size: 21px; letter-spacing: -.035em; }
.portfolio-header nav { display: flex; gap: 34px; color: #444b69; font-size: 11px; font-weight: 800; letter-spacing: .045em; }
.portfolio-header nav span { position: relative; }
.portfolio-header nav .active { color: var(--teal); }
.portfolio-header nav .active:after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 2px; border-radius: 2px; background: var(--teal); }
.portfolio-cta { justify-self: end; padding: 14px 24px; border-radius: 28px; background: var(--teal); color: #fff; box-shadow: 0 10px 28px rgba(70,75,230,.25); font-size: 12px; font-weight: 750; text-decoration: none; }

.portfolio-hero { min-height: 610px; display: grid; grid-template-columns: 120px minmax(0,800px) 210px; align-items: center; justify-content: center; gap: 22px; padding: 76px clamp(28px,7vw,100px); background: linear-gradient(135deg,#f0f1ff 0%,#f8f8ff 72%,#eef0ff 100%); border-bottom: 1px solid var(--line); }
.hero-number { align-self: start; padding-top: 38px; color: #d8dcf7; font-size: 110px; font-weight: 800; line-height: .8; letter-spacing: -.09em; }
.portfolio-eyebrow { color: #7450e8; font-size: 12px; font-weight: 850; letter-spacing: .14em; }
.portfolio-hero h1 { margin-top: 18px; font-family: inherit; font-size: clamp(52px,6vw,82px); font-weight: 780; line-height: .98; letter-spacing: -.062em; }
.portfolio-hero h1 em { color: var(--teal); font-style: normal; font-weight: inherit; }
.portfolio-hero p { max-width: 740px; margin: 24px 0; color: #4d5576; font-size: 18px; line-height: 1.55; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-tags span { padding: 9px 13px; border: 1px solid #d9dcf0; border-radius: 24px; color: var(--teal); background: rgba(255,255,255,.35); font-size: 10px; font-weight: 750; }
.hero-button { display: inline-block; margin-top: 28px; padding: 15px 22px; border-radius: 28px; background: var(--teal); color: #fff; box-shadow: 0 12px 28px rgba(70,75,230,.22); font-size: 12px; font-weight: 750; text-decoration: none; }
.hero-proof { align-self: center; display: grid; grid-template-columns: 65px 1fr; align-items: center; gap: 10px 12px; padding: 22px; border-radius: 20px; background: #fff; box-shadow: 0 20px 50px rgba(55,61,140,.09); }
.hero-proof b { color: var(--teal); font-size: 38px; line-height: 1; }
.hero-proof span { color: var(--muted); font-size: 8px; font-weight: 800; line-height: 1.5; letter-spacing: .09em; }
.hero-proof i { grid-column: 1 / -1; height: 1px; background: var(--line); }

.app-shell { min-height: calc(100vh - 46px); display: grid; grid-template-columns: 264px minmax(0, 1fr); align-items: start; }

.sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  width: auto;
  height: calc(100vh - 46px);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 20px;
  overflow-y: auto;
  color: #eef5f2;
  background:
    radial-gradient(circle at 0 0, rgba(79, 86, 238, 0.32), transparent 36%),
    linear-gradient(160deg, #1a2147 0%, #12182f 64%, #0f1429 100%);
  border-right: 1px solid rgba(255,255,255,.08);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 2px 10px 18px; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 5px; color: #bdc1df; font-size: 9px; line-height:1.3; letter-spacing: .13em; font-weight: 750; }

.brand-mark { width: 34px; height: 34px; display: flex; align-items: end; gap: 3px; padding: 7px; border: 1px solid rgba(217,242,107,.55); border-radius: 50%; }
.brand-mark span { display: block; width: 5px; border-radius: 4px 4px 1px 1px; background: var(--lime); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .65; }
.brand-mark span:nth-child(2) { height: 17px; }
.brand-mark span:nth-child(3) { height: 13px; opacity: .82; }

.nav-list { display: grid; gap: 3px; }
.nav-item {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #aebfc0;
  text-align: left;
  cursor: pointer;
  transition: .2s ease;
}
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active { color: #fff; background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.1); box-shadow: inset 3px 0 0 var(--lime); }
.nav-index { color: #8991bb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; letter-spacing: .05em; }
.nav-item.active .nav-index { color: var(--lime); }
.nav-item b { display: block; font-size: 13px; font-weight: 700; }
.nav-item small { display: block; margin-top: 3px; color: #a2a9ca; font-size: 10.5px; }
.nav-item.active small { color: #c5c9df; }

.sidebar-close, .sidebar-scrim { display: none; }

.main { grid-column: 2; min-width: 0; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(247,247,255,.94); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 12; }
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 11px; }
.breadcrumb span { color: var(--muted); }
.breadcrumb i { color: var(--line-dark); font-style: normal; }
.breadcrumb b { font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.data-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line-dark); border-radius: 30px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .11em; }
.data-pill > span { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.case-button, .primary-button, .secondary-button, .ghost-button {
  border-radius: 9px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.case-button { padding: 9px 14px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 650; }
.case-button:hover, .primary-button:hover { transform: translateY(-1px); background: #23434b; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 20px; }

.workspace { max-width: 1440px; margin: 0 auto; padding: 48px 42px 30px; }
.module-heading { display: flex; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.module-heading > div:first-child { max-width: 770px; }
.eyebrow { margin-bottom: 13px; color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
h1 { margin: 0; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-weight: 770; font-size: clamp(38px, 4.2vw, 62px); line-height: .98; letter-spacing: -.055em; }
h1 em { color: var(--teal); font-style: normal; font-weight: inherit; }
.module-heading p { max-width: 650px; margin: 19px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.context-card { min-width: 185px; align-self: flex-end; padding: 16px 18px; border-left: 2px solid var(--teal); background: rgba(255,255,255,.42); }
.context-card span, .context-card small { display: block; }
.context-card span { color: var(--muted-2); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.context-card strong { display: block; margin: 6px 0 4px; font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.context-card small { color: var(--muted); font-size: 10px; }

.module-content { min-height: 620px; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.select-control, .filter-button { min-height: 34px; padding: 8px 11px; border: 1px solid var(--line-dark); border-radius: 8px; background: rgba(255,255,255,.55); color: var(--ink-2); font-size: 10.5px; }
.filter-button { cursor: pointer; }
.filter-button.active { border-color: var(--teal); color: var(--teal); background: #edf8f4; }
.update-time { color: var(--muted-2); font-size: 9.5px; }

.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); }
.grid-half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 20px rgba(23,43,50,.025); overflow: hidden; }
.card-pad { padding: 20px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 14px; }
.card-header h2, .card-header h3, .section-title { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.card-header p { margin: 5px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.card-label { color: var(--muted-2); font-size: 8.5px; font-weight: 800; letter-spacing: .13em; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9.5px; }

.metric-card { position: relative; padding: 17px 18px 16px; min-height: 122px; }
.metric-top { display: flex; justify-content: space-between; gap: 8px; }
.metric-label { color: var(--muted); font-size: 9.5px; font-weight: 650; }
.metric-info { color: var(--muted-2); font-size: 10px; }
.metric-value { margin-top: 12px; font-family: Georgia, serif; font-size: 29px; line-height: 1; letter-spacing: -.035em; }
.metric-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.delta { font-size: 9.5px; font-weight: 700; }
.delta.positive { color: var(--teal); }
.delta.negative { color: var(--coral); }
.metric-context { color: var(--muted-2); font-size: 8.5px; }
.spark { display: flex; align-items: end; height: 20px; gap: 2px; }
.spark i { display: block; width: 4px; border-radius: 4px; background: var(--mint); }
.spark i:last-child { background: var(--teal); }

.chart-wrap { padding: 2px 20px 18px; }
.chart { position: relative; height: 208px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(to bottom, transparent 24%, rgba(220,222,216,.55) 25%, transparent 26%, transparent 49%, rgba(220,222,216,.55) 50%, transparent 51%, transparent 74%, rgba(220,222,216,.55) 75%, transparent 76%); }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-labels { display: flex; justify-content: space-between; padding: 8px 0 0 3px; color: var(--muted-2); font-size: 8.5px; }
.legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 9px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.legend span:last-child i { background: var(--amber); }

.alert-card { padding: 18px; background: var(--ink); color: #fff; }
.alert-top { display: flex; align-items: center; justify-content: space-between; }
.alert-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--lime); font-size: 8.5px; font-weight: 800; letter-spacing: .13em; }
.alert-badge:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(217,242,107,.1); }
.confidence { color: #95a8aa; font-size: 8.5px; }
.alert-card h3 { margin: 16px 0 8px; font-family: Georgia, serif; font-size: 22px; font-weight: 400; line-height: 1.1; }
.alert-card > p { margin: 0; color: #adbec0; font-size: 10.5px; line-height: 1.55; }
.evidence { margin: 16px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.evidence div { padding: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: rgba(255,255,255,.045); }
.evidence span { display: block; color: #849c9e; font-size: 8px; text-transform: uppercase; letter-spacing: .09em; }
.evidence b { display: block; margin-top: 5px; font-family: Georgia, serif; font-size: 17px; font-weight: 400; }

.primary-button { padding: 10px 14px; border: 1px solid var(--teal); background: var(--teal); color: #fff; font-size: 10.5px; font-weight: 700; }
.primary-button.lime { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.secondary-button { padding: 9px 12px; border: 1px solid var(--line-dark); background: #fff; font-size: 10px; font-weight: 650; }
.secondary-button:hover { border-color: var(--teal); color: var(--teal); }
.ghost-button { padding: 7px 9px; border: 0; background: transparent; color: var(--teal); font-size: 9.5px; font-weight: 700; }
.ghost-button:hover { background: #eef7f4; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.data-table th { padding: 10px 14px; color: var(--muted-2); background: #f6f6f1; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 8px; letter-spacing: .08em; text-align: right; text-transform: uppercase; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid #eaebe6; text-align: right; white-space: nowrap; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: #fafbf7; }
.data-table tr:last-child td { border-bottom: 0; }
.channel-name { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.channel-dot { width: 7px; height: 7px; border-radius: 50%; }
.mini-bar { display: inline-block; width: 44px; height: 4px; margin-left: 7px; border-radius: 4px; background: #e7ebe5; vertical-align: middle; overflow: hidden; }
.mini-bar i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }

.scenario-box { padding: 17px 20px; }
.scenario-row { display: grid; grid-template-columns: 138px 1fr 52px; align-items: center; gap: 12px; margin-top: 15px; }
.scenario-row label { color: var(--muted); font-size: 9.5px; }
.scenario-row output { text-align: right; color: var(--teal); font-size: 10px; font-weight: 750; }
input[type="range"] { width: 100%; accent-color: var(--teal); }
.scenario-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }
.scenario-result span { color: var(--muted-2); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.scenario-result b { display: block; margin-top: 5px; font-family: Georgia, serif; font-size: 19px; font-weight: 400; }

.lead-layout { display: grid; grid-template-columns: minmax(280px,.85fr) minmax(0,1.45fr); gap: 14px; }
.lead-list { padding: 7px; }
.lead-row { width: 100%; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid transparent; border-radius: 11px; background: transparent; text-align: left; cursor: pointer; }
.lead-row:hover { background: #f7f8f3; }
.lead-row.active { border-color: #b9ddd5; background: #edf8f4; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: #fff; font-size: 10px; font-weight: 750; }
.lead-row b { display: block; font-size: 10.5px; }
.lead-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 8.8px; }
.score-ring { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--mint); background: #fff; color: var(--teal); font-size: 9px; font-weight: 800; }
.score-ring.hot { border-color: var(--lime); }

.lead-detail { padding: 22px; }
.detail-head { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.detail-head h2 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.detail-head p { margin: 0; color: var(--muted); font-size: 10px; }
.fit-score { text-align: right; }
.fit-score strong { display: block; font-family: Georgia, serif; color: var(--teal); font-size: 30px; font-weight: 400; line-height: 1; }
.fit-score small { color: var(--muted-2); font-size: 8px; text-transform: uppercase; letter-spacing: .09em; }
.signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.signal-box { padding: 11px; border: 1px solid var(--line); border-radius: 10px; }
.signal-box span { display: block; color: var(--muted-2); font-size: 7.8px; text-transform: uppercase; letter-spacing: .08em; }
.signal-box b { display: block; margin-top: 5px; font-size: 10px; }
.reason-list { display: grid; gap: 8px; margin: 12px 0 17px; }
.reason-item { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-2); font-size: 9.8px; line-height: 1.45; }
.reason-item:before { content: "✓"; flex: 0 0 18px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--teal-deep); font-size: 9px; font-weight: 800; }
.action-panel { padding: 15px; border-radius: 12px; background: #f2f4ee; }
.action-panel .card-label { color: var(--teal); }
.action-panel h3 { margin: 7px 0 5px; font-size: 13px; }
.action-panel p { margin: 0 0 12px; color: var(--muted); font-size: 9.5px; line-height: 1.5; }
.draft-box { margin-top: 14px; padding: 14px; border-left: 2px solid var(--teal); background: #fafbf7; color: var(--ink-2); font-size: 9.8px; line-height: 1.58; }

.signal-feed { display: grid; gap: 8px; padding: 0 12px 14px; }
.intel-signal { width: 100%; display: grid; grid-template-columns: 35px 1fr auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; text-align: left; cursor: pointer; }
.intel-signal:hover, .intel-signal.active { border-color: #acd8cf; background: #f3faf7; }
.source-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: var(--lime); font-family: Georgia, serif; font-size: 13px; }
.intel-signal b { display: block; font-size: 9.8px; }
.intel-signal p { margin: 4px 0 0; color: var(--muted); font-size: 8.8px; line-height: 1.42; }
.intel-signal time { color: var(--muted-2); font-size: 7.8px; }
.brief { padding: 21px; }
.brief-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.brief h2 { margin: 6px 0 7px; font-family: Georgia, serif; font-size: 24px; font-weight: 400; }
.brief > p { color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.brief-section { padding: 14px 0; border-top: 1px solid var(--line); }
.brief-section h4 { margin: 0 0 7px; color: var(--teal); font-size: 8px; letter-spacing: .11em; text-transform: uppercase; }
.brief-section p { margin: 0; font-size: 10px; line-height: 1.55; }
.risk-chip, .tag { display: inline-flex; padding: 5px 7px; border-radius: 5px; background: #f7e5df; color: #a94f42; font-size: 8px; font-weight: 750; }
.tag { background: #e8f4f0; color: var(--teal-deep); }

.matrix { width: 100%; border-collapse: collapse; font-size: 9px; }
.matrix th, .matrix td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.matrix th { color: var(--muted-2); font-size: 7.5px; letter-spacing: .07em; text-transform: uppercase; }
.matrix td:first-child { font-weight: 700; }
.matrix .winner { color: var(--teal); font-weight: 750; }

.topic-row { display: flex; align-items: center; gap: 10px; margin: 11px 0; }
.topic-row span:first-child { width: 116px; font-size: 9.5px; }
.topic-bar { flex: 1; height: 7px; border-radius: 9px; background: #eceee8; overflow: hidden; }
.topic-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--teal),#63b6aa); }
.topic-row b { width: 28px; text-align: right; font-size: 9px; }
.quote-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quote { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.quote p { margin: 0; font-family: Georgia, serif; font-size: 13px; line-height: 1.45; }
.quote small { display: block; margin-top: 9px; color: var(--muted); font-size: 8px; }
.segment-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: #ebeee8; }
.segment-tabs button { flex: 1; padding: 7px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 8.5px; font-weight: 700; cursor: pointer; }
.segment-tabs button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(23,43,50,.08); }
.message-preview { padding: 19px; border-radius: 13px; background: var(--ink); color: #fff; }
.message-preview .overline { color: var(--lime); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.message-preview h3 { margin: 14px 0 8px; max-width: 400px; font-family: Georgia, serif; font-size: 25px; font-weight: 400; line-height: 1.08; }
.message-preview p { max-width: 500px; margin: 0 0 16px; color: #acbfc0; font-size: 10px; line-height: 1.58; }
.message-score { display: flex; gap: 18px; margin-top: 15px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.message-score span { color: #789395; font-size: 8px; }
.message-score b { display: block; margin-top: 4px; color: #fff; font-size: 11px; }

.problem-box { padding: 20px; background: var(--ink); color: #fff; }
.problem-box label { display: block; color: var(--lime); font-size: 8px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.problem-box textarea { width: 100%; min-height: 78px; margin: 11px 0 12px; padding: 12px 13px; resize: vertical; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; outline: 0; background: rgba(255,255,255,.065); color: #fff; font-size: 11px; line-height: 1.5; }
.problem-box textarea:focus { border-color: var(--lime); }
.problem-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.problem-controls select { padding: 8px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: #233f46; color: #fff; font-size: 9px; }
.experiment-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.experiment-card { position: relative; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.experiment-rank { display: flex; align-items: center; justify-content: space-between; }
.experiment-rank > span:first-child { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--lime); font-size: 8px; font-weight: 800; }
.ice-score { color: var(--teal); font-size: 8px; font-weight: 800; }
.experiment-card h3 { min-height: 37px; margin: 14px 0 8px; font-family: Georgia, serif; font-size: 18px; font-weight: 400; line-height: 1.08; }
.experiment-card > p { min-height: 44px; margin: 0; color: var(--muted); font-size: 9.2px; line-height: 1.5; }
.experiment-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin: 14px 0; }
.experiment-meta div { padding: 7px; border-radius: 7px; background: #f1f3ed; }
.experiment-meta span { display: block; color: var(--muted-2); font-size: 6.5px; text-transform: uppercase; letter-spacing: .06em; }
.experiment-meta b { display: block; margin-top: 4px; font-size: 8.5px; }
.hypothesis { padding-top: 11px; border-top: 1px solid var(--line); font-size: 8.7px; line-height: 1.48; }
.experiment-card.recommended { border-color: #9dcfc4; box-shadow: 0 10px 30px rgba(15,127,120,.09); }
.experiment-card.recommended:after { content: "RECOMMENDED"; position: absolute; top: -7px; right: 12px; padding: 4px 6px; border-radius: 4px; background: var(--lime); color: var(--ink); font-size: 6.5px; font-weight: 900; letter-spacing: .09em; }
.eval-strip { display: grid; grid-template-columns: 1.2fr repeat(3,.55fr); align-items: center; gap: 12px; margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.eval-strip h3 { margin: 0 0 4px; font-size: 11px; }
.eval-strip p { margin: 0; color: var(--muted); font-size: 8.5px; }
.eval-metric { padding-left: 12px; border-left: 1px solid var(--line); }
.eval-metric span { display: block; color: var(--muted-2); font-size: 7px; text-transform: uppercase; }
.eval-metric b { display: block; margin-top: 5px; font-family: Georgia,serif; font-size: 18px; font-weight: 400; }

.ai-output { position: relative; margin-top: 12px; padding: 14px 15px; border: 1px solid #b6dbd2; border-radius: 11px; background: #eef8f5; }
.ai-output:before { content: "AI"; position: absolute; top: -8px; left: 12px; padding: 3px 5px; border-radius: 4px; background: var(--teal); color: #fff; font-size: 6.5px; font-weight: 900; letter-spacing: .08em; }
.ai-output p { margin: 0; color: var(--ink-2); font-size: 9.5px; line-height: 1.58; white-space: pre-line; }
.loading-line { height: 8px; margin: 5px 0; border-radius: 8px; background: linear-gradient(90deg,#dcebe6 20%,#f5faf8 50%,#dcebe6 80%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.allocation-list { display: grid; gap: 13px; }
.allocation-row { display: grid; grid-template-columns: 96px 1fr 82px; align-items: center; gap: 12px; }
.allocation-row > b { font-size: 9.5px; }
.allocation-row > div { position: relative; height: 16px; border-radius: 4px; background: #eef0f8; overflow: hidden; }
.allocation-row > div span, .allocation-row > div i { position: absolute; left: 0; display: block; border-radius: 0 4px 4px 0; }
.allocation-row > div span { top: 2px; height: 5px; background: #b6bbd1; }
.allocation-row > div i { bottom: 2px; height: 5px; background: var(--teal); }
.allocation-row small { color: var(--muted); font-size: 8.5px; text-align: right; }
.allocation-row strong { color: var(--teal); }
.allocation-legend { display: flex; gap: 14px; margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.allocation-legend span { display: inline-flex; align-items: center; gap: 5px; }
.allocation-legend i { width: 9px; height: 5px; border-radius: 3px; background: #b6bbd1; }
.allocation-legend span:last-child i { background: var(--teal); }

.personalize-layout { display: grid; grid-template-columns: minmax(240px,.62fr) minmax(290px,.85fr) minmax(380px,1.25fr); gap: 14px; }
.persona-list, .creative-list { display: grid; gap: 6px; padding: 0 10px 12px; }
.persona-row { width: 100%; display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.persona-row:hover, .persona-row.active { border-color: #cdd1ff; background: #f0f1ff; }
.persona-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: var(--teal); color: #fff; font-size: 8px; font-weight: 850; }
.persona-row b { display:block; font-size: 9.5px; }
.persona-row small { display:block; margin-top:3px; color:var(--muted); font-size:7.8px; }
.persona-row strong { color:var(--teal); font-size:9px; }
.experience-preview { overflow:hidden; border:1px solid #cfd3e7; border-radius:var(--radius); background:#fff; box-shadow:0 18px 50px rgba(32,38,90,.1); }
.preview-browser { height:32px; display:flex; align-items:center; gap:5px; padding:0 11px; background:#171b36; }
.preview-browser i { width:7px; height:7px; border-radius:50%; background:#f26d68; }
.preview-browser i:nth-child(2){background:#f3bd56}.preview-browser i:nth-child(3){background:#4dca73}
.preview-browser span { margin-left:8px; color:#8990ad; font-size:7px; }
.preview-page { min-height:310px; padding:18px; background:linear-gradient(135deg,#f5f5ff,#eef0ff); }
.preview-nav { display:flex; align-items:center; justify-content:space-between; color:#262c4d; font-size:7.5px; }
.preview-nav b { font-size:11px; }
.preview-nav button { padding:6px 8px; border:0; border-radius:12px; background:var(--teal); color:#fff; font-size:6.5px; }
.preview-copy { max-width:330px; padding:52px 6px 24px; }
.preview-copy > small { color:var(--teal); font-size:6.5px; font-weight:900; letter-spacing:.12em; }
.preview-copy h2 { margin:10px 0; color:var(--ink); font-size:29px; line-height:1.02; letter-spacing:-.045em; }
.preview-copy p { color:var(--muted); font-size:9px; line-height:1.5; }
.preview-copy button { margin:8px 0 15px; padding:9px 12px; border:0; border-radius:18px; background:var(--teal); color:#fff; font-size:8px; font-weight:750; }
.preview-copy div { color:var(--muted-2); font-size:7.5px; }
.preview-foot { display:flex; align-items:center; gap:9px; padding:11px 14px; border-top:1px solid var(--line); }
.preview-foot span { color:var(--muted-2); font-size:6.5px; font-weight:800; letter-spacing:.09em; }
.preview-foot b { font-size:8px; }
.preview-foot button { margin-left:auto; padding:7px 9px; border:1px solid var(--teal); border-radius:7px; background:#fff; color:var(--teal); font-size:7px; font-weight:750; cursor:pointer; }

.selected-row { background:#f0f1ff; }
.journey-flow { position:relative; display:grid; gap:0; margin-top:16px; }
.journey-step { position:relative; display:grid; grid-template-columns:32px 1fr; gap:10px; padding:0 0 19px; }
.journey-step:not(:last-child):after { content:""; position:absolute; left:14px; top:27px; bottom:1px; width:1px; background:#cfd3e7; }
.journey-step > span { position:relative; z-index:1; width:29px; height:29px; display:grid; place-items:center; border-radius:50%; background:var(--teal); color:#fff; font-size:8px; font-weight:850; }
.journey-step small { display:block; color:var(--teal); font-size:7.5px; font-weight:800; text-transform:uppercase; letter-spacing:.07em; }
.journey-step b { display:block; margin-top:5px; font-size:10px; }

.creative-layout { display:grid; grid-template-columns:minmax(235px,.62fr) minmax(360px,1.08fr) minmax(280px,.8fr); gap:14px; }
.creative-row { width:100%; display:grid; grid-template-columns:5px 1fr 30px; align-items:center; gap:10px; padding:12px; border:1px solid transparent; border-radius:10px; background:transparent; text-align:left; cursor:pointer; }
.creative-row:hover,.creative-row.active { border-color:#cdd1ff; background:#f0f1ff; }
.creative-row > i { width:5px; height:38px; border-radius:5px; }
.creative-row small { display:block; color:var(--muted-2); font-size:6.5px; font-weight:800; letter-spacing:.09em; }
.creative-row b { display:block; margin-top:4px; font-size:9.5px; }
.creative-row strong { width:29px;height:29px;display:grid;place-items:center;border-radius:50%;background:#fff;border:2px solid var(--mint);color:var(--teal);font-size:8px; }
.creative-preview { padding:14px; }
.creative-canvas { min-height:315px; display:flex; flex-direction:column; justify-content:center; padding:32px; border-radius:12px; color:#fff; background:linear-gradient(145deg,var(--creative),#161b43); }
.creative-canvas > span { font-size:7px;font-weight:850;letter-spacing:.14em; }
.creative-canvas h2 { max-width:430px; margin:16px 0 11px; font-size:32px; line-height:1.02; letter-spacing:-.045em; }
.creative-canvas p { max-width:410px; margin:0; color:rgba(255,255,255,.72); font-size:9.5px; line-height:1.55; }
.creative-canvas button { align-self:flex-start; margin-top:17px; padding:9px 12px; border:0; border-radius:18px; background:#fff; color:var(--creative); font-size:8px; font-weight:800; }
.creative-canvas > small { margin-top:auto; padding-top:26px; color:rgba(255,255,255,.48); font-size:6.5px; letter-spacing:.09em; }
.creative-scores { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding:13px 3px 1px; }
.creative-scores div { padding:9px; border-radius:8px; background:#f4f5fb; }
.creative-scores span { display:block; color:var(--muted-2); font-size:6.5px; text-transform:uppercase; }
.creative-scores b { display:block; margin-top:3px; font-size:11px; }

.workspace-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; padding: 18px 2px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.workspace-footer p { max-width: 650px; margin: 0; }
.workspace-footer b { color: var(--ink-2); }
.workspace-footer span { text-align: right; }

.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(10,27,32,.62); backdrop-filter: blur(7px); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(720px,100%); max-height: min(760px,90vh); overflow: auto; padding: 34px; border-radius: 20px; background: var(--card); box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.modal-close { position: absolute; top: 14px; right: 16px; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); cursor: pointer; font-size: 19px; }
.modal .eyebrow { margin-bottom: 10px; }
.modal h2 { max-width: 560px; margin: 0; font-family: Georgia,serif; font-size: 34px; font-weight: 400; line-height: 1.05; }
.modal-intro { margin: 13px 0 24px; color: var(--muted); font-size: 11px; line-height: 1.62; }
.case-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.case-block { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.case-block h3 { margin: 0 0 8px; color: var(--teal); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.case-block p, .case-block li { color: var(--ink-2); font-size: 9.5px; line-height: 1.55; }
.case-block p { margin: 0; }
.case-block ul { margin: 0; padding-left: 15px; }
.case-block.wide { grid-column: 1 / -1; }
.flow { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.flow span { flex: 1; padding: 9px 7px; border-radius: 7px; background: #eef1eb; text-align: center; font-size: 8px; font-weight: 650; }
.flow i { color: var(--teal); font-style: normal; }

.toast { position: fixed; z-index: 80; right: 22px; bottom: 22px; max-width: 330px; padding: 13px 15px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 10px; line-height: 1.45; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s ease; }
.toast.visible { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-2, .lead-layout { grid-template-columns: 1fr; }
  .personalize-layout, .creative-layout { grid-template-columns: 1fr 1fr; }
  .personalize-layout > :last-child, .creative-layout > :last-child { grid-column:1 / -1; }
  .experiment-grid { grid-template-columns: 1fr; }
  .experiment-card > p, .experiment-card h3 { min-height: 0; }
  .context-card { display: none; }
  .portfolio-hero { grid-template-columns:90px minmax(0,1fr); }
  .hero-proof { display:none; }
}

@media (max-width: 760px) {
  .truth-banner { align-items:flex-start; gap:7px; padding:10px 14px; flex-direction:column; text-align:left; font-size:8.5px; }
  .portfolio-header { height:66px; grid-template-columns:1fr auto; padding:0 18px; }
  .portfolio-header > strong { font-size:17px; }
  .portfolio-header nav { display:none; }
  .portfolio-cta { padding:10px 14px; font-size:10px; }
  .portfolio-hero { min-height:auto; grid-template-columns:1fr; padding:54px 20px 58px; }
  .hero-number { display:none; }
  .portfolio-hero h1 { font-size:48px; }
  .portfolio-hero p { font-size:14px; }
  .app-shell { display: block; }
  .sidebar { position:fixed; z-index:61; top:0; left:0; width:min(310px,88vw); height:100vh; padding-top:58px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .sidebar.open { transform: none; }
  .sidebar-close { position:absolute; z-index:2; top:14px; right:14px; width:34px; height:34px; display:grid; place-items:center; padding:0; border:1px solid rgba(255,255,255,.28); border-radius:50%; background:rgba(255,255,255,.09); color:#fff; font-size:24px; line-height:1; cursor:pointer; }
  .sidebar-close:hover, .sidebar-close:focus-visible { background:rgba(255,255,255,.18); outline:2px solid var(--lime); outline-offset:2px; }
  .sidebar-scrim { position:fixed; z-index:60; inset:0; display:block; border:0; background:rgba(10,14,31,.48); opacity:0; pointer-events:none; transition:opacity .25s ease; }
  .sidebar-scrim.visible { opacity:1; pointer-events:auto; }
  .main { width: 100%; }
  .topbar { height: 62px; top:0; padding: 0 18px; }
  .mobile-menu { display: block; }
  .breadcrumb span, .breadcrumb i { display: none; }
  .data-pill { display: none; }
  .case-button { padding: 8px 10px; }
  .workspace { padding: 34px 18px 24px; }
  .module-heading { margin-bottom: 24px; }
  .module-heading p { font-size: 12px; }
  .grid-4, .grid-3, .grid-half { grid-template-columns: 1fr; }
  .personalize-layout, .creative-layout { grid-template-columns:1fr; }
  .personalize-layout > :last-child, .creative-layout > :last-child { grid-column:auto; }
  .toolbar, .workspace-footer { align-items: flex-start; flex-direction: column; }
  .workspace-footer span { text-align: left; }
  .signal-grid, .scenario-result { grid-template-columns: 1fr; }
  .quote-grid { grid-template-columns: 1fr; }
  .scenario-row { grid-template-columns: 1fr 50px; }
  .scenario-row input { grid-column: 1 / -1; grid-row: 2; }
  .eval-strip { grid-template-columns: 1fr 1fr 1fr; }
  .eval-strip > div:first-child { grid-column: 1 / -1; }
  .eval-metric { padding: 9px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .modal { padding: 28px 20px; }
  .case-grid { grid-template-columns: 1fr; }
  .case-block.wide { grid-column: auto; }
  .flow { flex-direction: column; }
  .flow span { width: 100%; }
  .flow i { transform: rotate(90deg); }
}

@media (max-width: 480px) {
  .portfolio-hero h1 { font-size:41px; }
  .hero-tags span { font-size:8.5px; }
  .allocation-row { grid-template-columns:78px 1fr 72px; gap:8px; }
  .preview-copy h2, .creative-canvas h2 { font-size:27px; }
}
