:root {
  color-scheme: dark;
  --bg: #080e18;
  --bg-soft: #0c1523;
  --panel: #101d2d;
  --panel-2: #132236;
  --line: #23384f;
  --line-soft: #1b2c3e;
  --text: #eef5fb;
  --muted: #9db2c6;
  --accent: #38bdf8;
  --accent-2: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -5%, rgba(56, 189, 248, 0.14), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(167, 139, 250, 0.12), transparent 30%),
    var(--bg);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.2rem, 5.2vw, 4rem);
}

h2 {
  margin: 8px 0 0;
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

p {
  margin: 0 0 12px;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #0a1420;
  color: #bae6fd;
  font-size: 0.85em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(24px, 5vw);
  border-bottom: 1px solid rgba(35, 56, 79, 0.7);
  background: rgba(8, 14, 24, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #06121e;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
  letter-spacing: -0.05em;
}

.brand-name {
  display: grid;
  font-weight: 800;
  line-height: 1.05;
}

.brand-name small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.header-cta {
  padding: 9px 18px;
  border: 1px solid #32627f;
  border-radius: 999px;
  color: #bae6fd;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.header-cta:hover {
  background: rgba(56, 189, 248, 0.1);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(54px, 8vw, 100px) max(24px, 5vw) 48px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lead {
  max-width: 660px;
  color: #b9cad9;
  font-size: 1.06rem;
}

.hero h1 span {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-actions,
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #04121d;
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  box-shadow: 0 12px 26px rgba(56, 189, 248, 0.18);
}

.button.ghost {
  color: #d8e8f5;
  border-color: #2a435c;
  background: rgba(19, 34, 54, 0.6);
}

.button.secondary {
  color: #c4b5fd;
  border-color: #463a72;
  background: rgba(167, 139, 250, 0.1);
}

.button.danger {
  color: #fecdd3;
  border-color: #7f3344;
  background: rgba(251, 113, 133, 0.1);
}

.button.small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.78rem;
}

.button.wide {
  width: 100%;
  margin-top: 14px;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.86rem;
  list-style: none;
}

.hero-points li::before {
  content: "✓";
  margin-right: 7px;
  color: var(--green);
}

.hero-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(19, 34, 54, 0.96), rgba(10, 20, 32, 0.96));
  box-shadow: var(--shadow);
}

.mini-top,
.mini-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.mini-top {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.mini-tag {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(167, 139, 250, 0.12);
  font-weight: 700;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot.green {
  background: var(--green);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
}

.mini-lead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 18px 0;
}

.mini-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #dbeafe;
  background: #1e3a5f;
  font-weight: 800;
  font-size: 0.85rem;
}

.mini-lead small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.score-pill {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--green);
  border-radius: 14px;
  color: var(--green);
  font-weight: 900;
}

.mini-bars {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.mini-bars div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.mini-bars i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.mini-action {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 16px 0;
  padding: 12px;
  border-radius: 12px;
  color: #d6e7f5;
  background: rgba(56, 189, 248, 0.08);
  font-size: 0.84rem;
}

.bot-chip {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  color: #04121d;
  background: var(--green);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-foot {
  justify-content: space-between;
}

.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 max(24px, 5vw) 30px;
}

.strip div {
  display: grid;
  gap: 3px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(16, 29, 45, 0.55);
}

.strip strong {
  font-size: 0.9rem;
}

.strip span {
  color: var(--muted);
  font-size: 0.78rem;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(52px, 7vw, 88px) max(24px, 5vw);
}

.section.soft {
  max-width: none;
  background: rgba(12, 21, 35, 0.75);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.section.soft > * {
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 30px;
  align-items: end;
  margin-bottom: 30px;
}

.section-head > p {
  color: var(--muted);
  font-size: 0.92rem;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), #0d1928);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

.capture-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(290px, 0.9fr);
  gap: 22px;
  align-items: start;
}

form label,
.calc-inputs label,
.detail-grid label,
.outcome-row label,
.model-grid label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #cddfee;
  font-size: 0.8rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #2b435c;
  border-radius: 11px;
  color: var(--text);
  background: #0a1420;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 92px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.fine-print {
  margin: 10px 0 0;
  color: #7f98ad;
  font-size: 0.75rem;
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 3px solid var(--green);
  border-radius: 50%;
  color: var(--green);
  font-size: 1.3rem;
  font-weight: 900;
}

.result-panel h3 {
  margin: 12px 0 2px;
  font-size: 1.4rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.result-grid div {
  padding: 10px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.06);
}

.result-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.next-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px;
  border-left: 3px solid var(--green);
  border-radius: 0 12px 12px 0;
  background: rgba(52, 211, 153, 0.08);
}

.next-box p {
  margin: 0;
  font-size: 0.86rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.calc-card > p {
  color: var(--muted);
  font-size: 0.84rem;
}

.calc-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.calc-inputs label {
  margin: 0;
}

.calc-inputs input {
  padding: 9px 10px;
}

.calc-output {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.1);
}

.calc-output strong {
  color: #bae6fd;
  font-size: 1.08rem;
}

.calc-output.subtle {
  margin-top: 8px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
}

.calc-output.subtle strong {
  color: #dbeafe;
  font-size: 0.95rem;
}

.login-panel {
  max-width: 480px;
  text-align: center;
}

.login-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  color: #04121d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
}

.login-panel form {
  margin-top: 18px;
  text-align: left;
}

.workspace {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(10, 19, 31, 0.8);
  overflow: hidden;
}

.workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(19, 34, 54, 0.7);
}

.workspace-bar div {
  display: grid;
}

.workspace-bar span {
  color: var(--muted);
  font-size: 0.76rem;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 10px 14px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tab {
  padding: 10px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.tab.active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.tab-panel {
  padding: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.76rem;
}

.stat-card strong {
  font-size: 1.7rem;
}

.stat-card small {
  color: #728ba1;
  font-size: 0.7rem;
}

.overview-grid,
.model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head .muted {
  margin: 0;
}

.bar-list {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: 96px 1fr 34px;
  gap: 10px;
  align-items: center;
  font-size: 0.8rem;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #0a1420;
  overflow: hidden;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.w10 { width: 10%; }
.w20 { width: 20%; }
.w30 { width: 30%; }
.w40 { width: 40%; }
.w50 { width: 50%; }
.w60 { width: 60%; }
.w70 { width: 70%; }
.w80 { width: 80%; }
.w90 { width: 90%; }
.w100 { width: 100%; }
.w64 { width: 64%; }
.w76 { width: 76%; }
.w88 { width: 88%; }

.weight-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.weight-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.08);
  font-size: 0.78rem;
  text-transform: capitalize;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.toolbar input {
  width: min(280px, 40vw);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: rgba(56, 189, 248, 0.05);
}

.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.pill.new {
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.14);
}

.pill.contacted {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
}

.pill.qualified,
.pill.won {
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.12);
}

.pill.lost {
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.12);
}

.detail-panel {
  margin-top: 18px;
  border-color: #32627f;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.outcome-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.outcome-row label {
  max-width: 210px;
  margin: 0;
}

.outcome-row .fine-print {
  margin: 0;
}

.timeline {
  display: grid;
  gap: 0;
  max-height: 520px;
  overflow-y: auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.84rem;
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-item time {
  color: #728ba1;
  font-size: 0.72rem;
  white-space: nowrap;
}

.actor {
  color: var(--accent-2);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.json-output {
  min-height: 220px;
  max-height: 420px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: #bae6fd;
  background: #07111c;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  overflow: auto;
}

.model-note {
  padding: 14px;
  border-radius: 12px;
  background: rgba(167, 139, 250, 0.08);
  font-size: 0.8rem;
}

.model-note p {
  margin: 6px 0 0;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(290px, 0.9fr);
  gap: 36px;
  align-items: center;
}

.about-card ul {
  margin: 0 0 14px;
  padding-left: 20px;
  color: #c9dae8;
  font-size: 0.87rem;
}

.about-card li {
  margin-bottom: 7px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px max(24px, 5vw);
  border-top: 1px solid var(--line-soft);
  color: #728ba1;
  font-size: 0.78rem;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: min(380px, calc(100vw - 44px));
  padding: 13px 18px;
  border: 1px solid #32627f;
  border-radius: 12px;
  color: #e0f2fe;
  background: #10263a;
  box-shadow: var(--shadow);
  font-size: 0.84rem;
}

.toast.error {
  border-color: #7f3344;
  color: #ffe4e6;
  background: #351826;
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .hero,
  .section-head,
  .capture-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .strip,
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc-grid,
  .overview-grid,
  .model-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 12px 18px;
  }

  .header-cta {
    display: none;
  }

  .strip,
  .stat-grid,
  .calc-inputs,
  .result-grid,
  .weight-list,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar input {
    width: 100%;
  }
}

/* GitHub Sponsors */
.button.sponsor {
  border-color: transparent;
  background: linear-gradient(135deg, #ec4899, #f472b6);
  color: #1b0713;
}

.button.sponsor:hover {
  filter: brightness(1.08);
}

.sponsor-note {
  margin: -8px 0 0;
  color: #728ba1;
  font-size: 0.8rem;
}

.sponsor-note strong {
  color: #fbcfe8;
}

.sponsor-note a {
  color: #f9a8d4;
  font-weight: 800;
  text-decoration: none;
}

.sponsor-note a:hover {
  text-decoration: underline;
}
