:root {
  --ink: #102625;
  --ink-2: #29413f;
  --muted: #647875;
  --line: #d9e2df;
  --paper: #f5f7f3;
  --panel: #ffffff;
  --pine: #123f3a;
  --pine-2: #0c2f2b;
  --mint: #b7f3cf;
  --mint-2: #e4f9eb;
  --lime: #dfff76;
  --amber: #f4b85f;
  --danger: #b53b35;
  --shadow: 0 24px 70px rgba(19, 48, 44, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 760;
  letter-spacing: -.025em;
  text-decoration: none;
}
.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--pine-2);
  background: var(--mint);
  box-shadow: inset 0 0 0 1px rgba(12, 47, 43, .12);
}
.brand-mark::before { content: "↗"; font-size: 17px; font-weight: 800; }

.btn {
  min-height: 44px;
  border: 1px solid var(--pine);
  border-radius: 11px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pine);
  color: #fff;
  font-weight: 710;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, opacity .16s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--pine-2); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn.light { color: var(--pine-2); background: var(--mint); border-color: var(--mint); }
.btn.ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.btn.small { min-height: 36px; padding: 7px 12px; border-radius: 9px; font-size: 13px; }
.text-button { border: 0; background: transparent; color: var(--pine); padding: 0; font-weight: 700; cursor: pointer; }

.site-shell { min-height: 100vh; background: var(--pine-2); color: #fff; overflow: hidden; }
.site-nav {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-nav .brand { color: #fff; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-link { border: 0; background: transparent; color: #cfdfdc; font-weight: 650; cursor: pointer; padding: 10px; }
.hero {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 660px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 72px;
  align-items: center;
  padding: 70px 0 104px;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(52px, 7.2vw, 94px);
  line-height: .96;
  letter-spacing: -.065em;
  font-weight: 760;
}
.hero h1 span { color: var(--mint); }
.hero-copy { margin: 27px 0 31px; max-width: 620px; color: #c9d9d6; font-size: 19px; line-height: 1.62; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; color: #8eaaa5; font-size: 13px; }
.signal-stack { position: relative; min-height: 430px; }
.signal-card {
  position: absolute;
  width: min(410px, 95%);
  padding: 24px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 20px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(14px);
  box-shadow: 0 28px 80px rgba(0,0,0,.2);
}
.signal-card:nth-child(1) { top: 0; right: 0; transform: rotate(2deg); }
.signal-card:nth-child(2) { top: 142px; left: 0; transform: rotate(-2deg); }
.signal-card:nth-child(3) { top: 290px; right: 18px; transform: rotate(1deg); }
.signal-card small { display: block; color: var(--mint); font-weight: 750; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 9px; }
.signal-card strong { font-size: 19px; }
.signal-card p { margin: 7px 0 0; color: #bdd0cc; font-size: 14px; line-height: 1.5; }
.proof {
  color: var(--ink);
  background: var(--paper);
  padding: 100px 0 110px;
}
.section-inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.section-head { display: flex; justify-content: space-between; gap: 50px; align-items: end; margin-bottom: 48px; }
.section-head h2 { margin: 0; max-width: 680px; font-size: clamp(36px, 4.8vw, 60px); line-height: 1.05; letter-spacing: -.05em; }
.section-head p { max-width: 470px; margin: 0; color: var(--muted); line-height: 1.7; }
.workflow { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.workflow article { padding: 30px 30px 30px 0; border-right: 1px solid var(--line); }
.workflow article + article { padding-left: 30px; }
.workflow article:last-child { border-right: 0; }
.step-number { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mint-2); color: var(--pine); font-weight: 800; font-size: 13px; }
.workflow h3 { margin: 43px 0 10px; font-size: 22px; letter-spacing: -.025em; }
.workflow p { margin: 0; color: var(--muted); line-height: 1.65; }
.policy-band { margin-top: 62px; padding: 28px 32px; display: flex; justify-content: space-between; gap: 28px; align-items: center; border-radius: var(--radius); background: var(--pine); color: #fff; }
.policy-band strong { display: block; font-size: 19px; margin-bottom: 4px; }
.policy-band p { margin: 0; color: #bcd0cc; }
.policy-pill { flex: 0 0 auto; padding: 9px 13px; border: 1px solid rgba(183,243,207,.3); border-radius: 999px; color: var(--mint); font-size: 13px; font-weight: 750; }

dialog.auth-dialog {
  width: min(480px, calc(100% - 28px));
  border: 0;
  border-radius: 20px;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(0,0,0,.35);
}
dialog.founder-dialog {
  width: min(780px, calc(100% - 28px));
  max-height: min(880px, calc(100vh - 28px));
  border: 0;
  border-radius: 20px;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(0,0,0,.35);
}
dialog::backdrop { background: rgba(4,20,18,.72); backdrop-filter: blur(5px); }
.founder-modal { padding: 29px; }
.founder-modal-head { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.founder-modal-head h2 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.founder-lede { margin: 13px 0 20px; max-width: 650px; color: var(--muted); line-height: 1.6; }
.founder-upload-row { margin-bottom: 15px; display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.founder-csv { min-height: 230px !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.5; }
.column-help { margin-top: -3px; color: var(--muted); font-size: 12px; }
.column-help summary { color: var(--pine); cursor: pointer; font-weight: 750; }
.column-help p { line-height: 1.55; }
.founder-policy { margin-top: 16px; padding: 11px 13px; border-radius: 9px; color: #48625e; background: var(--mint-2); font-size: 12px; }
.founder-actions { margin-top: 16px; display: flex; justify-content: end; gap: 9px; }
.auth-card { padding: 31px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.auth-card h2 { margin: 0 0 7px; font-size: 30px; letter-spacing: -.04em; }
.auth-lede { margin: 0 0 24px; color: var(--muted); }
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { font-size: 13px; font-weight: 720; }
.field input, .field textarea, .input, textarea.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}
.field input:focus, .field textarea:focus, .input:focus { border-color: #78ac9d; box-shadow: 0 0 0 3px rgba(120,172,157,.16); }
.field textarea, textarea.input { min-height: 100px; resize: vertical; }
.field-hint { font-size: 12px; color: var(--muted); }
.auth-error, .form-message { min-height: 20px; margin: 10px 0; font-size: 13px; color: var(--danger); }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

.workspace { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 22px; display: flex; flex-direction: column; color: #fff; background: var(--pine-2); }
.sidebar .brand { margin-bottom: 38px; }
.side-label { margin: 0 0 10px; color: #7f9d97; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.history { display: grid; gap: 7px; overflow: auto; }
.history button { width: 100%; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #bfd0cd; text-align: left; padding: 10px 11px; cursor: pointer; }
.history button:hover { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #fff; }
.history button strong, .history button span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history button strong { font-size: 13px; }
.history button span { margin-top: 3px; color: #77958f; font-size: 11px; }
.user-block { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); }
.user-block span { display: block; font-size: 12px; color: #94aaa6; overflow: hidden; text-overflow: ellipsis; }
.user-block button { margin-top: 9px; color: var(--mint); }
.main { min-width: 0; padding: 42px clamp(24px, 6vw, 88px) 80px; }
.main-inner { width: min(950px, 100%); margin: 0 auto; }
.workspace-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.workspace-head h1 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.network-pill { border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; color: var(--muted); background: #fff; font-size: 12px; font-weight: 700; }
.panel { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 12px 45px rgba(17,48,43,.06); overflow: hidden; }
.panel-body { padding: clamp(25px, 5vw, 48px); }
.kicker { margin: 0 0 13px; color: #477a71; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.panel h2 { margin: 0; max-width: 720px; font-size: clamp(35px, 5vw, 55px); line-height: 1.05; letter-spacing: -.055em; }
.panel-lede { max-width: 680px; margin: 18px 0 27px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.analyze-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.analyze-form .input { min-height: 50px; }
.notes-toggle { margin-top: 13px; }
.notes-wrap { margin-top: 13px; }
.notice { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: #f4f6f3; color: var(--muted); font-size: 13px; line-height: 1.5; }
.notice.warn { color: #6e4c12; background: #fff6e1; }
.hidden { display: none !important; }
.loading-line { display: inline-flex; gap: 8px; align-items: center; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.review-head { padding: 30px 34px; color: #fff; background: var(--pine); }
.review-head .kicker { color: var(--mint); }
.review-head h2 { font-size: clamp(34px, 5vw, 54px); }
.review-head p { max-width: 670px; color: #bfd1cd; margin-bottom: 0; }
.source-badge { display: inline-flex; margin-top: 16px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: var(--mint); font-size: 11px; font-weight: 750; }
.review-section { padding: 29px 34px; border-top: 1px solid var(--line); }
.review-title { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; margin-bottom: 18px; }
.review-title h3 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.review-title span { color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.field.full { grid-column: 1 / -1; }
.deep-icp { margin-top: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfa; }
.deep-icp > summary { cursor: pointer; padding: 15px 17px; color: var(--pine); font-size: 13px; font-weight: 850; }
.deep-icp-grid { padding: 5px 17px 18px; }
.segment-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; padding: 0 17px 18px; }
.segment-card { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.segment-card div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.segment-card span { color: var(--accent); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.segment-card p { margin: 7px 0; color: var(--ink-2); font-size: 11px; line-height: 1.45; }
.segment-card small { color: var(--muted); line-height: 1.4; }
.persona-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.persona-card { border: 1px solid var(--line); border-radius: 14px; padding: 17px; background: #fbfcfa; }
.persona-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.persona-card h4 { margin: 0; font-size: 16px; }
.priority { padding: 4px 7px; border-radius: 999px; background: var(--mint-2); color: var(--pine); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.persona-card p { min-height: 37px; margin: 8px 0 13px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.review-actions { padding: 24px 34px; display: flex; justify-content: space-between; gap: 12px; align-items: center; background: #f7f9f6; border-top: 1px solid var(--line); }
.review-actions p { margin: 0; color: var(--muted); font-size: 12px; }

.result-hero { padding: 30px 34px; color: #fff; background: var(--pine); }
.result-hero h2 { font-size: clamp(34px, 5vw, 54px); }
.stats { margin-top: 22px; display: flex; gap: 26px; flex-wrap: wrap; }
.stat strong { display: block; font-size: 28px; color: var(--mint); }
.stat span { color: #abc2bd; font-size: 12px; }
.result-toolbar { padding: 17px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 7px; }
.filter { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; background: #fff; color: var(--muted); font-size: 12px; cursor: pointer; }
.filter.active { border-color: var(--pine); background: var(--pine); color: #fff; }
.contact-list { display: grid; }
.contact { padding: 22px 25px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; border-bottom: 1px solid var(--line); }
.contact:last-child { border-bottom: 0; }
.contact-name { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.contact-name strong { font-size: 17px; }
.score { display: inline-grid; place-items: center; min-width: 35px; height: 25px; border-radius: 999px; background: var(--mint-2); color: var(--pine); font-size: 11px; font-weight: 800; }
.source-tag { padding: 4px 7px; border-radius: 999px; color: #fff; background: #5b3fa3; font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.contact-title { margin-top: 5px; color: var(--muted); font-size: 13px; }
.persona-line { margin-top: 10px; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.reason-list { margin: 7px 0 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; list-style: none; }
.reason-list li { padding: 4px 7px; border-radius: 7px; background: #f1f5f2; color: var(--muted); font-size: 10px; }
.intro-draft { margin-top: 12px; max-width: 760px; }
.intro-draft summary { cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 800; }
.intro-draft p { margin: 8px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfb; color: var(--ink-2); font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.target-profile { margin-top: 12px; max-width: 760px; }
.target-profile summary { cursor: pointer; color: var(--pine); font-size: 12px; font-weight: 850; }
.target-profile-grid { margin-top: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.target-profile-grid p { margin: 0 0 10px; }
.target-profile-grid dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; }
.target-profile-grid dl div { padding: 8px; border-radius: 7px; background: #f1f5f2; }
.target-profile-grid dt { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.target-profile-grid dd { margin: 2px 0 0; }
.target-profile-grid h5 { margin: 12px 0 4px; font-size: 11px; }
.target-profile-grid ul { margin: 4px 0 0; padding-left: 18px; }
.contact-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: end; }
.email-link { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 48px 25px; text-align: center; color: var(--muted); }
.result-message { min-height: 0; margin: 0; padding: 0 24px; background: #f2fbf5; }
.result-message:not(:empty) { padding-top: 11px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }

.onboard-shell { min-height: 100vh; padding: 42px 20px; display: grid; place-items: center; background: var(--pine-2); }
.onboard { width: min(720px, 100%); border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 30px 100px rgba(0,0,0,.25); }
.onboard-head { padding: 25px 30px; color: #fff; background: var(--pine); }
.onboard-head p { margin: 9px 0 0; color: #b7cbc7; }
.onboard-body { padding: 30px; }
.onboard-step { padding: 22px 0; border-bottom: 1px solid var(--line); }
.onboard-step:first-child { padding-top: 0; }
.onboard-step:last-child { border: 0; padding-bottom: 0; }
.onboard-step h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.025em; }
.onboard-step p { margin: 0 0 15px; color: var(--muted); line-height: 1.55; }
.done-mark { color: #287458; font-weight: 800; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .signal-stack { min-height: 390px; }
  .section-head { align-items: start; flex-direction: column; }
  .workflow { grid-template-columns: 1fr; }
  .workflow article, .workflow article + article { padding: 26px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace { grid-template-columns: 1fr; }
  .segment-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 18px 20px; flex-direction: row; align-items: center; gap: 18px; }
  .sidebar .brand { margin: 0; }
  .sidebar .side-label, .sidebar .history { display: none; }
  .user-block { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; gap: 9px; }
  .user-block span { max-width: 180px; }
  .user-block button { margin: 0; }
  .main { padding-top: 28px; }
}

@media (max-width: 640px) {
  .site-nav { height: 70px; }
  .nav-link { display: none; }
  .hero { gap: 28px; padding: 45px 0 75px; }
  .hero h1 { font-size: 52px; }
  .signal-stack { transform: scale(.9); transform-origin: top left; width: 111%; margin-bottom: -35px; }
  .proof { padding: 70px 0; }
  .policy-band { align-items: start; flex-direction: column; }
  .main { padding: 22px 14px 55px; }
  .workspace-head { align-items: start; flex-direction: column; }
  .analyze-form { grid-template-columns: 1fr; }
  .panel-body, .review-head, .review-section, .review-actions, .result-hero { padding-left: 21px; padding-right: 21px; }
  .form-grid, .persona-grid { grid-template-columns: 1fr; }
  .review-actions, .result-toolbar { align-items: stretch; flex-direction: column; }
  .contact { grid-template-columns: 1fr; }
  .contact-actions { justify-content: start; }
  .sidebar { flex-wrap: wrap; }
  .user-block span { display: none; }
}
