/* ── CapVein Platform — Main Styles ── */

:root {
  --bg: #0A0F0D;
  --bg2: #111A14;
  --bg3: #1C2E1F;
  --border: #2A3D2D;
  --fg: #F0EDE6;
  --fg2: #8A9E8D;
  --gold: #E8A830;
  --gold-dim: #C48B20;
  --green: #2D5A34;
  --green-bright: #4A8A53;
  --red: #C84B2F;
  --blue: #4A7FA5;
  --purple: #9B7FE8;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 15, 13, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Instrument Serif', serif; font-size: 20px;
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 7px;
  background: linear-gradient(135deg, var(--green) 0%, var(--gold) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: white; font-weight: 500;
}
.logo-name { letter-spacing: 0.02em; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { font-size: 14px; color: var(--fg2); transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
.btn-nav {
  padding: 7px 18px; border-radius: 6px;
  background: var(--gold); color: #0A0F0D !important;
  font-weight: 600; font-size: 13px !important;
  transition: background .2s !important;
}
.btn-nav:hover { background: var(--gold-dim) !important; }

/* ── HERO ── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.6;
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; padding: 120px 24px 80px;
  max-width: 760px; margin: 0 auto;
}
.hero-eyebrow {
  font-size: 12px; letter-spacing: .14em; color: var(--gold);
  text-transform: uppercase; margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(48px, 8vw, 88px);
  line-height: 1.05; margin-bottom: 24px;
  color: var(--fg);
}
.hero-title em {
  font-style: italic; color: var(--gold);
}
.hero-sub {
  font-size: 18px; color: var(--fg2); line-height: 1.7;
  max-width: 560px; margin: 0 auto 48px;
}

/* ── DOMAIN BUTTONS ── */
.domain-buttons {
  display: flex; gap: 14px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 40px;
}
.domain-btn {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 24px;
  cursor: pointer; color: var(--fg);
  transition: all .25s; text-align: center;
  min-width: 160px; font-family: inherit;
}
.domain-btn:hover {
  border-color: var(--gold);
  background: rgba(232,168,48,.07);
  transform: translateY(-2px);
}
.domain-btn.selected {
  border-color: var(--gold);
  background: rgba(232,168,48,.12);
}
.domain-btn.featured {
  border-color: rgba(74,138,83,.5);
  background: rgba(45,90,52,.15);
}
.domain-btn.featured:hover {
  border-color: var(--green-bright);
  background: rgba(45,90,52,.25);
}
.domain-icon { font-size: 28px; margin-bottom: 8px; }
.domain-label { font-family: 'Instrument Serif', serif; font-size: 18px; margin-bottom: 4px; }
.domain-desc { font-size: 12px; color: var(--fg2); line-height: 1.4; }

/* ── EMAIL CAPTURE ── */
.hero-capture {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.capture-input {
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 18px; color: var(--fg);
  font-size: 15px; font-family: inherit; outline: none;
  min-width: 260px; transition: border-color .2s;
}
.capture-input:focus { border-color: var(--gold); }
.capture-input::placeholder { color: var(--fg2); }
.capture-btn {
  background: var(--gold); color: #0A0F0D; border: none;
  border-radius: 8px; padding: 12px 24px; font-size: 15px;
  font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background .2s; white-space: nowrap;
}
.capture-btn:hover { background: var(--gold-dim); }
.capture-success {
  color: var(--green-bright); font-size: 15px; padding: 12px;
}
.hidden { display: none !important; }

/* ── STATS ── */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
@media (max-width: 700px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: 32px 24px; text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: 'Instrument Serif', serif; font-size: 36px;
  color: var(--gold); line-height: 1; margin-bottom: 6px;
}
.stat-num span { font-size: 20px; }
.stat-label { font-size: 13px; color: var(--fg2); line-height: 1.4; }

/* ── SECTIONS ── */
.section { padding: 100px 24px; }
.section.dark { background: var(--bg2); }
.section-inner { max-width: 1000px; margin: 0 auto; }
.section-label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.section-label.light { color: var(--gold); }
.section-title {
  font-size: clamp(32px, 5vw, 52px); line-height: 1.15;
  margin-bottom: 20px;
}
.section-title.light { color: var(--fg); }
.section-sub {
  font-size: 17px; color: var(--fg2); max-width: 560px;
  line-height: 1.7; margin-bottom: 60px;
}
.section-sub.light { color: var(--fg2); }

/* ── RAG PIPELINE VISUAL ── */
.pipeline-visual {
  display: flex; align-items: flex-start; gap: 0;
  overflow-x: auto; padding-bottom: 8px;
}
.pipeline-step {
  flex: 1; min-width: 140px; text-align: center; padding: 0 12px;
}
.pipeline-icon { font-size: 32px; margin-bottom: 12px; }
.pipeline-step-name {
  font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--fg);
}
.pipeline-step-desc { font-size: 12px; color: var(--fg2); line-height: 1.5; }
.pipeline-arrow {
  font-size: 20px; color: var(--gold); padding-top: 16px; flex-shrink: 0;
  align-self: flex-start;
}

/* ── JOURNEY STEPS ── */
.journey-steps { display: flex; flex-direction: column; gap: 0; }
.journey-step {
  display: flex; gap: 24px; padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.journey-step:last-child { border-bottom: none; }
.journey-num {
  font-family: 'Instrument Serif', serif; font-size: 42px;
  color: var(--border); line-height: 1; flex-shrink: 0;
  width: 60px; text-align: right; padding-top: 2px;
}
.journey-body { flex: 1; }
.journey-title {
  font-family: 'Instrument Serif', serif; font-size: 22px;
  margin-bottom: 8px; color: var(--fg);
}
.journey-desc { font-size: 15px; color: var(--fg2); line-height: 1.7; margin-bottom: 12px; }
.journey-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.journey-tags span {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--fg2);
}

/* ── FRAMEWORK CARDS ── */
.frameworks-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
@media (max-width: 600px) { .frameworks-grid { grid-template-columns: 1fr; } }
.framework-card {
  padding: 24px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg2);
}
.fw-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; padding: 3px 10px; border-radius: 4px;
  margin-bottom: 12px;
}
.fw-badge.crma { background: rgba(74,138,83,.2); color: var(--green-bright); border: 1px solid rgba(74,138,83,.3); }
.fw-badge.cbam { background: rgba(232,168,48,.12); color: var(--gold); border: 1px solid rgba(232,168,48,.3); }
.fw-badge.dpp  { background: rgba(74,127,165,.15); color: var(--blue); border: 1px solid rgba(74,127,165,.3); }
.fw-badge.ifc  { background: rgba(155,127,232,.15); color: var(--purple); border: 1px solid rgba(155,127,232,.3); }
.fw-title { font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.fw-desc { font-size: 14px; color: var(--fg2); line-height: 1.6; }

/* ── CTA ── */
.cta-section { background: var(--bg3); border-top: 1px solid var(--border); }
.cta-inner { text-align: center; max-width: 560px; }
.cta-title { font-size: 42px; margin-bottom: 16px; }
.cta-sub { font-size: 17px; color: var(--fg2); margin-bottom: 24px; line-height: 1.7; }
.cta-price { font-size: 14px; color: var(--fg2); margin-bottom: 28px; }
.cta-price strong { color: var(--gold); }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: #0A0F0D; border: none;
  border-radius: 8px; padding: 14px 28px; font-size: 16px;
  font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background .2s; text-decoration: none;
}
.btn-primary:hover { background: var(--gold-dim); }
.cta-contact { margin-top: 20px; font-size: 14px; color: var(--fg2); }
.cta-contact a { color: var(--gold); text-decoration: underline; }

/* ── FOOTER ── */
.footer {
  padding: 40px 24px; border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 14px; color: var(--fg2); transition: color .2s; }
.footer-links a:hover { color: var(--fg); }
.footer-copy { font-size: 13px; color: var(--fg2); }

/* ── DASHBOARD STYLES ── */
.app-layout {
  display: grid;
  grid-template-rows: 57px 1fr;
  min-height: 100vh;
}
.app-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 50;
  height: 57px;
}
.app-body {
  display: grid; grid-template-columns: 260px 1fr 300px;
  min-height: calc(100vh - 57px);
}
@media (max-width: 900px) {
  .app-body { grid-template-columns: 1fr; }
  .sidebar-right { display: none; }
}
.sidebar-left, .sidebar-right {
  border-right: 1px solid var(--border);
  background: var(--bg2); padding: 20px 16px;
  overflow-y: auto;
}
.sidebar-right { border-right: none; border-left: 1px solid var(--border); }
.main-content { padding: 28px; overflow-y: auto; }

/* score tiles */
.score-tiles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-bottom: 28px;
}
@media (max-width: 700px) { .score-tiles { grid-template-columns: 1fr; } }
.score-tile {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.tile-icon { font-size: 20px; margin-bottom: 10px; }
.tile-name { font-size: 13px; color: var(--fg2); margin-bottom: 8px; }
.tile-score {
  font-family: 'Instrument Serif', serif; font-size: 40px; line-height: 1;
  margin-bottom: 8px;
}
.tile-score.good { color: var(--green-bright); }
.tile-score.mid { color: var(--gold); }
.tile-score.low { color: var(--red); }
.tile-bar { height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; }
.tile-bar-fill { height: 100%; border-radius: 3px; }
.tile-bar-fill.good { background: var(--green-bright); }
.tile-bar-fill.mid { background: var(--gold); }
.tile-bar-fill.low { background: var(--red); }

/* gap list */
.gap-list { display: flex; flex-direction: column; gap: 8px; }
.gap-item {
  display: flex; gap: 12px; padding: 14px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--bg2);
}
.gap-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px;
}
.gap-dot.critical { background: var(--red); }
.gap-dot.high { background: var(--gold); }
.gap-dot.medium { background: var(--blue); }
.gap-title-text { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.gap-desc-text { font-size: 13px; color: var(--fg2); line-height: 1.5; }

/* chat */
.chat-messages {
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto; flex: 1; padding-bottom: 8px;
}
.chat-bubble {
  padding: 12px 14px; border-radius: 10px;
  font-size: 13px; line-height: 1.6; max-width: 90%;
}
.chat-bubble.user {
  align-self: flex-end;
  background: rgba(232,168,48,.1); border: 1px solid rgba(232,168,48,.2);
}
.chat-bubble.ai {
  align-self: flex-start;
  background: var(--bg3); border: 1px solid var(--border);
}
.chat-label {
  font-size: 10px; letter-spacing: .1em; color: var(--gold);
  font-weight: 600; margin-bottom: 5px;
}
.chat-row { display: flex; gap: 8px; margin-top: 8px; }
.chat-field {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; padding: 9px 12px; color: var(--fg);
  font-size: 13px; font-family: inherit; outline: none;
}
.chat-field:focus { border-color: var(--gold); }
.chat-send {
  background: var(--gold); color: #0A0F0D; border: none;
  border-radius: 6px; padding: 9px 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; font-size: 13px;
}

/* auth modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.7); display: flex;
  align-items: center; justify-content: center; padding: 24px;
}
.modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 40px; width: 100%; max-width: 400px;
}
.modal-title {
  font-family: 'Instrument Serif', serif; font-size: 28px;
  margin-bottom: 8px;
}
.modal-sub { font-size: 14px; color: var(--fg2); margin-bottom: 28px; }
.field-group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.field-label { font-size: 12px; color: var(--fg2); margin-bottom: 4px; display: block; }
.field-input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 11px 14px; color: var(--fg);
  font-size: 15px; font-family: inherit; outline: none;
  transition: border-color .2s;
}
.field-input:focus { border-color: var(--gold); }
.btn-full {
  width: 100%; background: var(--gold); color: #0A0F0D; border: none;
  border-radius: 8px; padding: 13px; font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background .2s;
}
.btn-full:hover { background: var(--gold-dim); }
.modal-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--fg2); }
.modal-switch a { color: var(--gold); cursor: pointer; text-decoration: underline; }
.modal-error { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 18px; }

/* upload zone */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 40px 24px; text-align: center; cursor: pointer;
  transition: all .2s;
}
.upload-zone:hover, .upload-zone.dragging {
  border-color: var(--gold); background: rgba(232,168,48,.04);
}
.upload-icon { font-size: 32px; margin-bottom: 12px; }
.upload-text { font-size: 15px; color: var(--fg2); }
.upload-text strong { color: var(--fg); }

/* section util */
.s-label {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg2); margin-bottom: 10px;
}
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* typing indicator */
.typing { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg2); animation: blink 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity:.2 } 40% { opacity:1 } }

/* project pill */
.project-pill {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); cursor: pointer; transition: all .2s;
  margin-bottom: 8px;
}
.project-pill:hover { border-color: var(--gold); background: rgba(232,168,48,.04); }
.project-pill.active { border-color: var(--gold); background: rgba(232,168,48,.08); }
.project-pill-name { font-size: 14px; font-weight: 500; }
.project-pill-meta { font-size: 11px; color: var(--fg2); }

.btn-sm {
  padding: 7px 14px; border-radius: 6px; font-size: 13px;
  font-weight: 500; cursor: pointer; font-family: inherit;
  transition: all .2s; border: 1px solid var(--border);
  background: transparent; color: var(--fg2);
}
.btn-sm:hover { border-color: var(--fg2); color: var(--fg); }
.btn-sm.gold { background: var(--gold); color: #0A0F0D; border-color: var(--gold); }
.btn-sm.gold:hover { background: var(--gold-dim); }

.fade-in { animation: fadeIn .35s ease; }

/* ── APP NAV ── */
.app-body-wrap { min-height: 100vh; }
.app-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(10,15,13,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); height: 56px;
}
.app-nav-inner {
  display: flex; align-items: center; gap: 16px;
  height: 100%; padding: 0 20px;
}
.app-nav-center {
  flex: 1; display: flex; align-items: center; gap: 10px;
}
.nav-project-label { font-size: 12px; color: var(--fg2); white-space: nowrap; }
.project-picker {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--fg); padding: 5px 10px; border-radius: 6px;
  font-size: 13px; font-family: inherit; cursor: pointer;
  max-width: 220px;
}
.project-picker:focus { outline: none; border-color: var(--gold); }
.btn-new-project {
  background: transparent; border: 1px solid var(--border);
  color: var(--fg2); padding: 5px 12px; border-radius: 6px;
  font-size: 12px; font-family: inherit; cursor: pointer;
  white-space: nowrap; transition: all .2s;
}
.btn-new-project:hover { border-color: var(--gold); color: var(--gold); }
.app-nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-user-email { font-size: 12px; color: var(--fg2); }
.btn-signout {
  background: transparent; border: 1px solid var(--border);
  color: var(--fg2); padding: 5px 12px; border-radius: 6px;
  font-size: 12px; font-family: inherit; cursor: pointer; transition: all .2s;
}
.btn-signout:hover { border-color: var(--red); color: var(--red); }

/* ── APP LAYOUT ── */
.app-layout {
  display: grid;
  grid-template-columns: 220px 1fr 320px;
  height: calc(100vh - 56px);
  margin-top: 56px;
  overflow: hidden;
}

/* ── LEFT SIDEBAR ── */
.sidebar-left {
  background: var(--bg2); border-right: 1px solid var(--border);
  overflow-y: auto; padding: 20px 14px;
  display: flex; flex-direction: column; gap: 24px;
}
.sidebar-heading {
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--fg2); margin-bottom: 10px;
}
.sidebar-section { display: flex; flex-direction: column; }

.stage-list { display: flex; flex-direction: column; gap: 2px; }
.stage-item {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: none; color: var(--fg2);
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  font-family: inherit; font-size: 12px; text-align: left;
  transition: all .15s;
}
.stage-item:hover { background: var(--bg3); color: var(--fg); }
.stage-item.active { background: rgba(232,168,48,.1); color: var(--gold); }
.stage-num { font-size: 10px; color: var(--fg2); width: 20px; flex-shrink: 0; }
.stage-item.active .stage-num { color: var(--gold); }

.domain-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.domain-pill {
  padding: 4px 10px; border-radius: 20px; font-size: 11px;
  border: 1px solid var(--border);
}
.domain-pill.earth { border-color: var(--green-bright); color: var(--green-bright); }
.domain-pill.deepsea { border-color: var(--blue); color: var(--blue); }
.domain-pill.lunar { border-color: var(--purple); color: var(--purple); }

.doc-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.doc-empty { font-size: 11px; color: var(--fg2); line-height: 1.5; }
.doc-item {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 7px; border-radius: 6px; background: var(--bg3);
}
.doc-icon { font-size: 14px; flex-shrink: 0; }
.doc-info { min-width: 0; }
.doc-name { font-size: 11px; font-weight: 500; truncate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta { font-size: 10px; color: var(--fg2); }
.doc-status { font-size: 10px; }
.doc-status.uploaded { color: var(--fg2); }
.doc-status.processing { color: var(--gold); }
.doc-status.ready { color: var(--green-bright); }
.doc-status.error { color: var(--red); }

.btn-upload-trigger {
  background: transparent; border: 1px dashed var(--border);
  color: var(--fg2); padding: 7px; border-radius: 6px;
  font-size: 12px; font-family: inherit; cursor: pointer;
  transition: all .2s; text-align: center;
}
.btn-upload-trigger:hover { border-color: var(--gold); color: var(--gold); }

/* ── CENTRE PANEL ── */
.centre-panel {
  overflow-y: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 24px;
}

/* Upload zone */
.upload-zone {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px; position: relative;
}
.upload-drop {
  border: 2px dashed var(--border); border-radius: 8px;
  padding: 40px 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: border-color .2s;
}
.upload-drop:hover { border-color: var(--gold); }
.upload-icon { font-size: 36px; }
.upload-title { font-size: 16px; font-weight: 500; }
.upload-sub { font-size: 12px; color: var(--fg2); }
.btn-browse {
  background: var(--gold); color: #0A0F0D;
  border: none; padding: 9px 20px; border-radius: 6px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; margin-top: 8px; transition: background .2s;
}
.btn-browse:hover { background: var(--gold-dim); }
.upload-progress { padding: 16px 0; }
.progress-label { font-size: 12px; color: var(--fg2); margin-bottom: 8px; }
.progress-bar { height: 4px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width .3s; }
.btn-close-upload {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: none; color: var(--fg2);
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.btn-close-upload:hover { color: var(--fg); }

/* Score section */
.score-section { display: flex; flex-direction: column; gap: 16px; }
.score-header { display: flex; align-items: center; justify-content: space-between; }
.score-title { font-family: 'Instrument Serif', serif; font-size: 22px; }
.score-badge {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 20px; border-radius: 10px; background: var(--bg2);
  border: 2px solid var(--border); min-width: 80px;
}
.score-badge.good { border-color: var(--green-bright); background: rgba(74,138,83,.1); }
.score-badge.mid { border-color: var(--gold); background: rgba(232,168,48,.08); }
.score-badge.low { border-color: var(--red); background: rgba(200,75,47,.08); }
.score-big { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.score-label-big { font-size: 10px; color: var(--fg2); letter-spacing: .05em; }

.score-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.score-tile {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color .2s;
}
.score-tile.good { border-color: rgba(74,138,83,.4); }
.score-tile.mid { border-color: rgba(232,168,48,.4); }
.score-tile.low { border-color: rgba(200,75,47,.4); }
.tile-icon { font-size: 20px; }
.tile-num { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile-label { font-size: 11px; color: var(--fg2); }
.tile-bar { height: 3px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.tile-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width .6s ease; }

.framework-status { display: flex; flex-direction: column; gap: 8px; }
.fw-status-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--bg2); border-radius: 6px;
  border: 1px solid var(--border);
}
.fw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
.fw-dot.green { background: var(--green-bright); }
.fw-dot.grey { background: var(--fg2); }
.fw-name { font-size: 12px; flex: 1; }
.fw-val { font-size: 11px; color: var(--fg2); }

/* Gap section */
.gap-section { display: flex; flex-direction: column; gap: 12px; }
.gap-header { display: flex; align-items: center; justify-content: space-between; }
.gap-title { font-family: 'Instrument Serif', serif; font-size: 18px; }
.gap-filters { display: flex; gap: 4px; }
.gap-filter {
  background: transparent; border: 1px solid var(--border);
  color: var(--fg2); padding: 4px 10px; border-radius: 4px;
  font-size: 11px; font-family: inherit; cursor: pointer; transition: all .15s;
}
.gap-filter.active, .gap-filter:hover { border-color: var(--gold); color: var(--gold); }

.gap-list { display: flex; flex-direction: column; gap: 8px; }
.gap-empty { text-align: center; padding: 40px 20px; }
.gap-empty-icon { font-size: 36px; margin-bottom: 12px; }
.gap-empty-title { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.gap-empty-sub { font-size: 12px; color: var(--fg2); max-width: 400px; margin: 0 auto 16px; line-height: 1.6; }
.btn-run-gap {
  background: var(--gold); color: #0A0F0D; border: none;
  padding: 9px 20px; border-radius: 6px; font-size: 13px;
  font-weight: 600; font-family: inherit; cursor: pointer;
}

.gap-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; background: var(--bg2); border-radius: 8px;
  border: 1px solid var(--border); transition: opacity .4s;
}
.gap-priority {
  font-size: 10px; font-weight: 600; padding: 3px 7px;
  border-radius: 4px; text-transform: uppercase; flex-shrink: 0;
  letter-spacing: .05em; margin-top: 2px;
}
.gap-priority.critical { background: rgba(200,75,47,.2); color: #e87060; }
.gap-priority.high { background: rgba(232,168,48,.2); color: var(--gold); }
.gap-priority.medium { background: rgba(74,138,83,.2); color: var(--green-bright); }
.gap-priority.low { background: var(--bg3); color: var(--fg2); }
.gap-body { flex: 1; min-width: 0; }
.gap-name { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.gap-desc { font-size: 11px; color: var(--fg2); line-height: 1.5; margin-bottom: 6px; }
.gap-frameworks { display: flex; flex-wrap: wrap; gap: 4px; }
.fw-tag {
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: var(--bg3); color: var(--fg2); border: 1px solid var(--border);
}
.gap-resolve {
  background: transparent; border: 1px solid var(--border);
  color: var(--fg2); width: 28px; height: 28px; border-radius: 6px;
  cursor: pointer; font-size: 12px; flex-shrink: 0; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.gap-resolve:hover { border-color: var(--green-bright); color: var(--green-bright); }

/* ── RIGHT SIDEBAR: CHAT ── */
.sidebar-right {
  background: var(--bg2); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-header { padding: 16px 16px 12px; border-bottom: 1px solid var(--border); }
.chat-title { font-size: 14px; font-weight: 600; }
.chat-sub { font-size: 11px; color: var(--fg2); margin-top: 2px; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.msg-bubble {
  max-width: 90%; padding: 9px 12px; border-radius: 10px;
  font-size: 13px; line-height: 1.5;
}
.chat-msg.assistant .msg-bubble {
  background: var(--bg3); border: 1px solid var(--border);
  border-bottom-left-radius: 3px;
}
.chat-msg.user .msg-bubble {
  background: rgba(232,168,48,.12); border: 1px solid rgba(232,168,48,.25);
  border-bottom-right-radius: 3px;
}

.chat-input-row { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--border); }
.chat-input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  color: var(--fg); border-radius: 8px; padding: 8px 10px;
  font-size: 13px; font-family: inherit; resize: none;
  line-height: 1.4;
}
.chat-input:focus { outline: none; border-color: var(--gold); }
.chat-send {
  background: var(--gold); color: #0A0F0D; border: none;
  width: 36px; border-radius: 8px; font-size: 16px;
  cursor: pointer; flex-shrink: 0; transition: background .2s;
}
.chat-send:hover { background: var(--gold-dim); }

.chat-suggestions { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 12px 12px; }
.suggestion-chip {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--fg2); padding: 4px 9px; border-radius: 20px;
  font-size: 11px; font-family: inherit; cursor: pointer; transition: all .15s;
}
.suggestion-chip:hover { border-color: var(--gold); color: var(--gold); }

/* Typing dots */
.typing-dots { display: inline-flex; gap: 3px; align-items: center; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg2); animation: blink 1.2s infinite;
  display: inline-block;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }

/* ── AUTH OVERLAY ── */
.auth-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5, 8, 6, 0.92); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-overlay.hidden { display: none; }
.auth-modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px 32px; width: 100%; max-width: 380px;
  display: flex; flex-direction: column; gap: 0;
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.auth-tagline { font-size: 12px; color: var(--fg2); margin-bottom: 24px; }
.auth-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.auth-tab {
  flex: 1; background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--fg2); padding: 8px; font-size: 13px; font-family: inherit;
  cursor: pointer; margin-bottom: -1px; transition: all .15s;
}
.auth-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.auth-panel { display: flex; flex-direction: column; gap: 10px; }
.auth-panel.hidden { display: none; }
.auth-input {
  background: var(--bg3); border: 1px solid var(--border); color: var(--fg);
  padding: 10px 12px; border-radius: 8px; font-size: 13px; font-family: inherit;
  width: 100%; transition: border-color .2s;
}
.auth-input:focus { outline: none; border-color: var(--gold); }
.auth-btn {
  background: var(--gold); color: #0A0F0D; border: none;
  padding: 11px; border-radius: 8px; font-size: 14px; font-weight: 600;
  font-family: inherit; cursor: pointer; margin-top: 4px; transition: background .2s;
}
.auth-btn:hover { background: var(--gold-dim); }
.auth-err { font-size: 12px; color: var(--red); margin-top: 4px; padding: 8px; background: rgba(200,75,47,.08); border-radius: 6px; }

/* ── NEW PROJECT MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5,8,6,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px; width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: 12px;
}
.modal-title { font-family: 'Instrument Serif', serif; font-size: 20px; margin-bottom: 4px; }
.modal-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn-modal-cancel {
  flex: 1; background: transparent; border: 1px solid var(--border);
  color: var(--fg2); padding: 9px; border-radius: 7px; font-family: inherit;
  font-size: 13px; cursor: pointer;
}
.btn-modal-create {
  flex: 2; background: var(--gold); color: #0A0F0D; border: none;
  padding: 9px; border-radius: 7px; font-family: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ── RESPONSIVE ── */
@media (max-width: 1000px) {
  .app-layout { grid-template-columns: 180px 1fr 280px; }
}
@media (max-width: 800px) {
  .app-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .sidebar-left { display: none; }
  .sidebar-right { height: 45vh; }
  .score-tiles { grid-template-columns: 1fr 1fr; }
}
@keyframes fadeIn { from { opacity:0; transform:translateY(6px) } to { opacity:1; transform:none } }

/* ── LANDING PAGE ADDITIONS ── */

/* Mobile nav */
.nav-hamburger {
  display: none; background: transparent; border: none;
  color: var(--fg); font-size: 20px; cursor: pointer; padding: 4px 8px;
}
.nav-mobile {
  display: flex; flex-direction: column;
  padding: 12px 20px 16px; border-top: 1px solid var(--border);
  background: rgba(10,15,13,0.98);
}
.nav-mobile a { padding: 10px 0; font-size: 14px; color: var(--fg2); border-bottom: 1px solid var(--border); }
.nav-mobile a:last-child { border-bottom: none; }

/* Hero trust line */
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 20px; font-size: 12px; color: var(--fg2); justify-content: center;
}
.trust-dot { color: var(--border); }

/* Approach grid */
.approach-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 40px;
}
.approach-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.approach-num { font-size: 11px; color: var(--gold); font-weight: 600; letter-spacing: .08em; }
.approach-title { font-size: 15px; font-weight: 600; }
.approach-desc { font-size: 12px; color: var(--fg2); line-height: 1.6; }

/* Tech pillars */
.tech-pillars {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px;
}
.tech-pillar {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.03);
}
.tech-icon { color: var(--gold); }
.tech-pillar-title { font-size: 14px; font-weight: 600; }
.tech-pillar-desc { font-size: 12px; color: var(--fg2); line-height: 1.6; }

/* Help grid */
.help-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px;
}
.help-card {
  padding: 24px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.03);
  display: flex; flex-direction: column; gap: 10px;
}
.help-icon { font-size: 24px; }
.help-title { font-size: 15px; font-weight: 600; }
.help-desc { font-size: 13px; color: rgba(240,237,230,.6); line-height: 1.6; }

/* About */
.about-inner { max-width: 720px; }
.about-body { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.about-body p { font-size: 15px; color: var(--fg2); line-height: 1.8; }
.about-disclaimer {
  font-size: 12px; color: var(--fg2); opacity: .6;
  padding: 14px; border: 1px solid var(--border); border-radius: 6px;
  line-height: 1.6; margin-top: 8px;
}

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 36px; max-width: 600px; }
.team-card {
  padding: 24px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.03);
  display: flex; flex-direction: column; gap: 6px;
}
.team-initial {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; color: var(--gold);
  margin-bottom: 6px;
}
.team-name { font-size: 15px; font-weight: 600; }
.team-role { font-size: 12px; color: var(--gold); }
.team-bio { font-size: 12px; color: var(--fg2); line-height: 1.5; margin-top: 4px; }

/* CTA capture */
.cta-capture { display: flex; gap: 8px; max-width: 440px; margin: 20px auto 12px; }
.capture-success-inline { color: var(--green-bright); font-size: 14px; padding: 10px; }

/* Footer legal */
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 11px; color: var(--fg2); margin-top: 12px; opacity: .6;
}
.footer-legal a { color: var(--fg2); text-decoration: underline; }

/* Responsive additions */
@media (max-width: 900px) {
  .approach-grid { grid-template-columns: repeat(3, 1fr); }
  .tech-pillars { grid-template-columns: repeat(2, 1fr); }
  .nav-hamburger { display: block; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .approach-grid { grid-template-columns: 1fr 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .cta-capture { flex-direction: column; }
  .footer-legal { flex-direction: column; gap: 4px; }
}
