:root {
  color-scheme: dark;
  --page: #000;
  --surface: #090909;
  --surface-raised: #101010;
  --line: rgba(255,255,255,.12);
  --line-strong: rgba(255,255,255,.22);
  --text: #f5f4f0;
  --muted: #aaa9a4;
  --quiet: #73736f;
  --orange: #f06432;
  --blue: #6bdcff;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  background: var(--page);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #000; color: var(--text); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
.founder-header { min-height: 72px; padding: 0 clamp(20px, 4vw, 60px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.founder-wordmark { color: var(--text); text-decoration: none; font-size: 23px; font-weight: 650; letter-spacing: -.06em; }
.founder-wordmark span { color: var(--orange); }
.founder-header-label, .eyebrow, .list-heading { color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.founder-main { width: min(1480px, 100%); margin: 0 auto; padding: 48px clamp(20px, 4vw, 60px) 80px; }
.login-view { width: min(480px, 100%); margin: 5vh auto; }
.eyebrow { margin: 0 0 18px; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.02; letter-spacing: -.055em; font-weight: 500; }
h1 em { color: #c5c5c1; font-family: Georgia, serif; font-weight: 400; }
.login-form { margin-top: 34px; display: grid; gap: 11px; }
.login-form label, .pipeline-toolbar label, .pipeline-fields label { color: var(--muted); font-size: 12px; }
.login-form input, .pipeline-fields input, .pipeline-fields select, .pipeline-fields textarea, .pipeline-toolbar select {
  display: block; width: 100%; min-height: 44px; margin-top: 7px; padding: 11px 12px;
  color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 2px;
}
.login-form input:focus-visible, .pipeline-fields :focus-visible, .pipeline-toolbar select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.primary-button, .quiet-button { min-height: 40px; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--text); background: transparent; padding: 9px 15px; }
.primary-button { justify-self: start; min-width: 120px; margin-top: 8px; border-color: var(--orange); background: var(--orange); color: #080808; font-weight: 650; }
.primary-button:hover, .quiet-button:hover { border-color: var(--orange); }
.notice { min-height: 20px; margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.notice.is-error { color: #ffb49b; }
.notice.is-success { color: #b6edcb; }
[hidden] { display: none !important; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.page-heading .eyebrow { margin-bottom: 12px; }
.page-heading h1 { font-size: clamp(30px, 4vw, 46px); }
.page-subtitle { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.page-actions { display: flex; gap: 8px; }
.pipeline-toolbar { display: flex; align-items: end; gap: 12px; padding: 22px 0 18px; border-bottom: 1px solid var(--line); }
.pipeline-toolbar label { width: min(220px, 38%); }
.pipeline-toolbar select { min-height: 39px; margin-top: 6px; padding: 8px 10px; }
.toolbar-notice { flex: 1; text-align: right; }
.pipeline-layout { display: grid; grid-template-columns: minmax(260px, 345px) minmax(0, 1fr); min-height: 62vh; border-bottom: 1px solid var(--line); }
.lead-list-panel { min-width: 0; border-right: 1px solid var(--line); }
.list-heading { height: 50px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.lead-list { max-height: 72vh; overflow-y: auto; }
.lead-card { width: 100%; padding: 15px; display: block; text-align: left; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); }
.lead-card:hover, .lead-card.is-selected { background: var(--surface-raised); }
.lead-card.is-selected { box-shadow: inset 2px 0 var(--orange); }
.lead-card-top, .lead-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lead-company { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 550; }
.lead-name, .lead-card-date { margin-top: 6px; color: var(--muted); font-size: 12px; }
.lead-card-meta { margin-top: 12px; }
.stage-label, .priority-label, .followup-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border: 1px solid var(--line-strong); border-radius: 20px; color: var(--muted); font-size: 10px; }
.priority-label[data-priority="high"] { color: #ffc1a9; border-color: rgba(240,100,50,.62); }
.priority-label[data-priority="medium"] { color: #f4d59a; }
.priority-label[data-priority="low"] { color: #c3d6e0; }
.followup-badge { border-radius: 2px; }
.followup-badge.is-overdue { color: #ffad93; border-color: rgba(255,105,77,.6); }
.followup-badge.is-today { color: #f4d59a; border-color: rgba(244,213,154,.45); }
.followup-badge.is-upcoming { color: #bce9f2; }
.lead-card .score { color: var(--quiet); font-size: 11px; }
.list-empty { padding: 20px 15px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.application-detail { min-width: 0; padding: clamp(20px, 3vw, 38px); }
.detail-empty { max-width: 440px; margin: 5vh auto; color: var(--muted); line-height: 1.6; }
.detail-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.detail-heading h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; font-weight: 500; }
.detail-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.detail-heading .eyebrow { margin: 0 0 10px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 7px; justify-content: end; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; padding-top: 24px; }
.detail-section { min-width: 0; }
.detail-section h3 { margin: 0 0 13px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .15em; }
.data-list { margin: 0; display: grid; gap: 11px; }
.data-list div { min-width: 0; }
.data-list dt { color: var(--quiet); font-size: 11px; }
.data-list dd { margin: 4px 0 0; color: var(--text); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.data-list a { color: #b7e8f3; text-underline-offset: 3px; }
.pipeline-editor { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.pipeline-editor h3 { margin: 0 0 17px; font-size: 16px; font-weight: 500; }
.pipeline-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.pipeline-fields .wide { grid-column: 1 / -1; }
.pipeline-fields textarea { min-height: 84px; resize: vertical; }
.pipeline-fields select { text-transform: none; }
.pipeline-field-hint { display: block; margin-top: 5px; color: var(--quiet); font-size: 10px; }
.save-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.save-row .notice { flex: 1; }
.timeline { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.timeline h3 { margin: 0 0 17px; font-size: 16px; font-weight: 500; }
.timeline-list { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line-strong); }
.timeline-list li { position: relative; padding: 0 0 18px 14px; }
.timeline-list li::before { position: absolute; left: -18px; top: 4px; width: 7px; height: 7px; content: ""; border-radius: 50%; background: var(--orange); }
.timeline-title { font-size: 13px; }
.timeline-date { margin-top: 4px; color: var(--quiet); font-size: 11px; }
.timeline-detail { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .pipeline-layout { grid-template-columns: minmax(230px, 290px) minmax(0,1fr); }
  .application-detail { padding: 22px 18px; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .founder-header { min-height: 62px; }
  .founder-main { padding-top: 30px; }
  .page-heading { align-items: start; }
  .page-actions { flex-direction: column; }
  .pipeline-toolbar { flex-wrap: wrap; }
  .pipeline-toolbar label { width: calc(50% - 6px); flex: 1 1 calc(50% - 6px); }
  .toolbar-notice { flex-basis: 100%; min-height: 0; margin: 0; text-align: left; }
  .pipeline-layout { display: flex; flex-direction: column; }
  .lead-list-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .lead-list { display: flex; max-height: 245px; overflow: auto; }
  .lead-card { min-width: min(270px, 82vw); border-right: 1px solid var(--line); border-bottom: 0; }
  .application-detail { padding: 26px 0; }
  .detail-heading { flex-direction: column; }
  .detail-meta { justify-content: start; }
  .detail-grid, .pipeline-fields { grid-template-columns: 1fr; }
  .pipeline-fields .wide { grid-column: auto; }
  .save-row { align-items: start; flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
