:root {
  --bg: #08080a;
  --panel: #0d0d10;
  --panel-2: #121216;
  --line: #29292f;
  --line-soft: #1d1d22;
  --text: #d7d7dd;
  --dim: #7b7b86;
  --white: #f6f6f8;
  --purple: #b400ff;
  --purple-soft: rgba(180, 0, 255, 0.12);
  --green: #7cff9b;
  --font: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
}
button, input { font: inherit; }
button, .dropzone, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.hidden { display: none !important; }

.noise {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.topbar {
  height: 64px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 2px;
}
.brand-mark { color: var(--purple); font-size: 17px; }
.privacy-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 1.4px;
}
.privacy-status span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(124, 255, 155, .7);
}

main { position: relative; z-index: 1; }
.hero {
  min-height: 530px;
  padding: 100px clamp(20px, 8vw, 140px) 72px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '◇';
  position: absolute;
  right: 8vw;
  top: 22px;
  color: var(--purple);
  opacity: .055;
  font-size: clamp(300px, 40vw, 600px);
  line-height: 1;
  pointer-events: none;
}
.eyebrow {
  color: var(--purple);
  font-size: 10px;
  letter-spacing: 2.6px;
  font-weight: 500;
  margin-bottom: 20px;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1 {
  max-width: 900px;
  margin-bottom: 28px;
  color: var(--white);
  font-size: clamp(42px, 7vw, 92px);
  line-height: .98;
  letter-spacing: -5px;
  font-weight: 300;
}
h1 em { color: var(--dim); font-style: normal; }
.hero-copy {
  max-width: 720px;
  color: #a6a6ae;
  font-size: clamp(13px, 1.5vw, 16px);
  line-height: 1.8;
}
.pipeline {
  max-width: 760px;
  margin-top: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.pipeline div { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 10px; }
.pipeline b { color: var(--purple); font-size: 9px; }
.pipeline span { color: var(--dim); font-size: 10px; letter-spacing: 1.5px; }
.pipeline i { color: #38383e; font-style: normal; }

.workspace {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 880px) minmax(40px, 1fr);
  border-bottom: 1px solid var(--line-soft);
}
.section-index {
  padding: 54px 30px;
  border-right: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 1.8px;
  text-align: right;
}
.section-main { grid-column: 2; padding: 54px 56px 80px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 36px; }
.section-heading h2, .result-header h2 {
  color: var(--white);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -2px;
  font-weight: 300;
  margin-bottom: 10px;
}
.section-heading p, .panel-intro p { color: var(--dim); margin: 0; font-size: 12px; }
.text-link { color: var(--dim); text-decoration: none; font-size: 9px; letter-spacing: 1px; white-space: nowrap; }
.text-link:hover { color: var(--purple); }

.dropzone {
  min-height: 230px;
  border: 1px dashed #414149;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255,255,255,.008);
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.dragging, .dropzone.selected {
  border-color: var(--purple);
  background: var(--purple-soft);
}
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.drop-symbol { color: var(--purple); font-size: 40px; font-weight: 300; margin-bottom: 16px; }
.dropzone strong { color: var(--white); font-size: 13px; font-weight: 400; }
.dropzone > span:last-child { color: var(--dim); font-size: 10px; margin-top: 7px; }
.dropzone.selected > span:last-child { color: #b8b8c0; }

.identity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.identity-grid label > span { display: block; color: var(--dim); font-size: 8px; letter-spacing: 1.5px; margin-bottom: 8px; }
.identity-grid input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  color: var(--white);
  background: var(--panel);
}
.identity-grid input:focus { border-color: var(--purple); }
.identity-grid input::placeholder { color: #4d4d55; }

.privacy-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
}
.privacy-icon { color: var(--green); font-size: 20px; }
.privacy-card strong { color: #cacad0; font-size: 10px; letter-spacing: 1px; }
.privacy-card p { color: var(--dim); font-size: 10px; line-height: 1.7; margin: 5px 0 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; color: var(--dim); font-size: 10px; margin: 19px 0 24px; cursor: pointer; }
.consent input { accent-color: var(--purple); margin-top: 3px; }

.primary-button, .secondary-button {
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--purple);
  border-radius: 0;
  background: var(--purple);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  font-size: 10px;
  letter-spacing: 1.6px;
  transition: background .2s, color .2s, opacity .2s;
}
.primary-button:hover { background: transparent; color: var(--purple); }
.primary-button:disabled { opacity: .45; cursor: wait; }
.secondary-button { background: transparent; border-color: var(--line); color: var(--dim); }
.secondary-button:hover { border-color: var(--text); color: var(--white); }
.primary-button.compact { min-height: 44px; }

.progress-panel { margin-top: 28px; padding: 24px; border: 1px solid var(--line); background: var(--panel); }
.progress-head { display: flex; justify-content: space-between; color: var(--dim); font-size: 10px; }
.progress-head b { color: var(--purple); }
.progress-track { height: 2px; margin: 17px 0 20px; background: var(--line); }
.progress-track span { display: block; width: 8%; height: 100%; background: var(--purple); box-shadow: 0 0 14px var(--purple); transition: width .45s; }
.process-log { color: #5c5c66; font-size: 9px; min-height: 20px; }
.process-log span { display: block; }
.process-log span::before { content: '> '; color: var(--green); }
.error-panel { margin-top: 22px; border: 1px solid #8b3045; color: #ff7898; padding: 16px; font-size: 11px; }

.results { padding: 72px clamp(20px, 6vw, 100px) 100px; }
.result-header { display: flex; align-items: end; justify-content: space-between; gap: 30px; max-width: 1320px; margin: 0 auto 38px; }
.result-header .eyebrow { margin-bottom: 9px; }
.result-header h2 { margin: 0; }
.result-actions { display: flex; gap: 10px; }
.result-tabs {
  max-width: 1320px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 34px;
}
.result-tabs button {
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0 0 14px;
  margin-bottom: -1px;
  color: var(--dim);
  background: none;
  font-size: 9px;
  letter-spacing: 1.4px;
}
.result-tabs button:hover, .result-tabs button.active { color: var(--white); border-color: var(--purple); }
.tab-panel { display: none; max-width: 1320px; margin: 36px auto 0; }
.tab-panel.active { display: block; animation: reveal .35s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(7px); } }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.metric { padding: 23px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span { display: block; color: var(--dim); font-size: 8px; letter-spacing: 1.3px; }
.metric b { display: block; color: var(--white); font-weight: 300; font-size: clamp(24px, 4vw, 38px); margin-top: 8px; }
.metric small { color: #505058; font-size: 8px; }
.result-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; margin-top: 18px; }
.data-card { min-height: 290px; border: 1px solid var(--line); background: var(--panel); padding: 22px; margin: 0; }
.data-card header { display: flex; justify-content: space-between; color: var(--dim); font-size: 8px; letter-spacing: 1.3px; }
.data-card header b { color: var(--purple); }

.activity-chart { height: 205px; display: flex; align-items: end; gap: 4px; padding-top: 30px; overflow: hidden; }
.activity-column { min-width: 5px; flex: 1; height: 100%; display: flex; align-items: end; position: relative; }
.activity-column i { display: block; width: 100%; min-height: 2px; background: #585860; transition: background .2s; }
.activity-column:hover i { background: var(--purple); }
.activity-column span { display: none; position: absolute; bottom: calc(var(--height) + 6px); left: 50%; transform: translateX(-50%); color: var(--white); background: #202027; padding: 2px 5px; font-size: 8px; white-space: nowrap; z-index: 2; }
.activity-column:hover span { display: block; }
.bar-list { padding-top: 28px; }
.bar-item { margin-bottom: 20px; }
.bar-item > div { display: flex; justify-content: space-between; color: var(--dim); font-size: 9px; margin-bottom: 7px; }
.bar-item > div b { color: var(--text); font-weight: 400; }
.bar-item > span { display: block; height: 3px; background: var(--line); }
.bar-item > span i { display: block; height: 100%; background: var(--purple); }
.method-note { display: grid; grid-template-columns: 130px 1fr; gap: 18px; border-left: 1px solid var(--purple); padding: 16px 20px; margin-top: 18px; background: var(--purple-soft); }
.method-note b { color: var(--purple); font-size: 9px; letter-spacing: 1.3px; }
.method-note p { color: var(--dim); font-size: 10px; margin: 0; }

.panel-intro { margin-bottom: 28px; max-width: 780px; }
.panel-intro h3, .kit-summary h3 { color: var(--white); font-size: 24px; font-weight: 300; letter-spacing: -1px; margin-bottom: 8px; }
.theme-list { border-top: 1px solid var(--line); }
.theme-row {
  display: grid;
  grid-template-columns: 56px minmax(220px, 1fr) 2fr 80px;
  align-items: center;
  gap: 20px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--line);
}
.theme-icon { color: var(--purple); font-size: 20px; }
.theme-name b { color: var(--white); display: block; font-size: 12px; font-weight: 400; }
.theme-name span { color: var(--dim); font-size: 9px; }
.theme-meter { height: 2px; background: var(--line); }
.theme-meter i { display: block; height: 100%; background: var(--purple); }
.theme-share { color: var(--white); font-size: 16px; text-align: right; }

.profile-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.profile-card { border: 1px solid var(--line); background: var(--panel); padding: 24px; }
.profile-card header { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.profile-card h4 { color: var(--white); font-size: 13px; font-weight: 400; margin: 0; }
.confidence { color: var(--green); font-size: 8px; letter-spacing: 1px; }
.profile-card p { color: var(--dim); font-size: 10px; }
.agent-action { border-top: 1px solid var(--line-soft); padding-top: 14px; color: #bcbcc5; font-size: 10px; }
.agent-action::before { content: 'AGENT → '; color: var(--purple); }

.kit-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 30px;
  margin-bottom: 20px;
}
.kit-summary p { color: var(--dim); font-size: 10px; margin: 0; }
.kit-summary .eyebrow { margin-bottom: 7px; }
.kit-summary h3 { margin: 0 0 7px; }
.kit-count { min-width: 100px; text-align: right; }
.kit-count b { color: var(--purple); display: block; font-size: 34px; font-weight: 300; }
.kit-count span { color: var(--dim); font-size: 8px; letter-spacing: 1.5px; }
.kit-columns { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; }
.kit-columns > article { border: 1px solid var(--line); padding: 24px; }
.kit-columns h4 { color: var(--dim); font-size: 8px; letter-spacing: 1.4px; font-weight: 400; margin-bottom: 20px; }
.skill { border-bottom: 1px solid var(--line-soft); padding: 12px 0; }
.skill:last-child { border: 0; }
.skill b { color: var(--white); font-size: 11px; font-weight: 400; display: block; }
.skill span { color: var(--dim); font-size: 9px; }
.file { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-soft); padding: 10px 0; }
.file:last-child { border: 0; }
.file > span { color: var(--purple); }
.file code { color: #b3b3bb; font: 9px var(--font); flex: 1; word-break: break-all; }
.file button { border: 0; background: none; color: var(--dim); font-size: 9px; }
.file button:hover { color: var(--white); }

footer {
  border-top: 1px solid var(--line-soft);
  padding: 22px clamp(20px, 4vw, 64px);
  display: flex;
  justify-content: space-between;
  color: #44444c;
  font-size: 8px;
  letter-spacing: 1.3px;
}

@media (max-width: 800px) {
  .privacy-status { display: none; }
  .hero { min-height: auto; padding-top: 70px; }
  h1 { letter-spacing: -3px; }
  .pipeline { gap: 8px; margin-top: 40px; }
  .pipeline i { display: none; }
  .pipeline { grid-template-columns: repeat(4, 1fr); }
  .workspace { display: block; }
  .section-index { text-align: left; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 14px 20px; }
  .section-main { padding: 38px 20px 60px; }
  .section-heading { align-items: start; flex-direction: column; }
  .identity-grid, .result-grid, .kit-columns { grid-template-columns: 1fr; }
  .results { padding-top: 54px; }
  .result-header { align-items: start; flex-direction: column; }
  .result-actions { width: 100%; flex-wrap: wrap; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .profile-list { grid-template-columns: 1fr; }
  .theme-row { grid-template-columns: 40px 1fr 60px; gap: 12px; }
  .theme-meter { display: none; }
}

@media (max-width: 480px) {
  .hero { padding-left: 18px; padding-right: 18px; }
  h1 { font-size: 40px; letter-spacing: -2px; }
  .pipeline span { font-size: 8px; letter-spacing: .5px; }
  .dropzone { min-height: 190px; }
  .result-tabs { gap: 18px; overflow-x: auto; }
  .result-tabs button { white-space: nowrap; }
  .metrics { grid-template-columns: 1fr; }
  .metric, .metric:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .method-note { grid-template-columns: 1fr; }
  .kit-summary { align-items: start; }
}
