:root {
  --ink: #1b2430;
  --muted: #667085;
  --line: #dce3e9;
  --canvas: #f4f6f7;
  --surface: #ffffff;
  --teal: #0f766e;
  --teal-soft: #d9f1ed;
  --coral: #db5a42;
  --yellow: #e6a719;
  --navy: #21314d;
  --shadow: 0 12px 28px rgba(31, 45, 61, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Manrope, Arial, sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.topbar { height: 68px; padding: 0 max(24px, calc((100vw - 1320px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; background: var(--teal); color: white; border-radius: 7px; }
.brand-mark svg { width: 19px; }
.status, .count-label { color: var(--muted); font: 500 12px "DM Mono", monospace; display: flex; align-items: center; gap: 7px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #2e9f7e; }

main { max-width: 1320px; margin: 0 auto; padding: 46px 24px 36px; }
.intro { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 40px; margin-bottom: 36px; }
.eyebrow { margin: 0 0 8px; font: 500 11px "DM Mono", monospace; color: var(--teal); letter-spacing: 0; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 660px; margin-bottom: 12px; font-size: 40px; line-height: 1.13; letter-spacing: 0; }
h2 { margin-bottom: 7px; font-size: 20px; letter-spacing: 0; }
.intro-copy, .panel-heading > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.65; }
.intro-copy { max-width: 700px; margin-bottom: 0; }
.flow-visual { min-height: 95px; padding: 17px; background: var(--navy); color: #edf4ff; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 7px; box-shadow: var(--shadow); }
.flow-visual span { width: 77px; font-size: 10px; font-weight: 700; text-align: center; display: grid; justify-items: center; gap: 5px; }
.flow-visual span svg { width: 18px; height: 18px; color: #6edbc4; }
.flow-visual > svg { width: 14px; color: #8aa1c1; flex: 0 0 auto; }
.pilot-note { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; margin: -16px 0 24px; padding: 14px 16px; color: #244f4a; background: var(--teal-soft); border: 1px solid #b9e1da; border-radius: 7px; }
.pilot-note > svg { width: 18px; margin-top: 2px; color: var(--teal); }
.pilot-note strong { display: block; margin-bottom: 3px; font-size: 13px; }
.pilot-note span { display: block; color: #38645f; font-size: 12px; line-height: 1.55; }
.pilot-note a { color: #0b5e58; font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.pilot-note a:hover { color: #073f3b; }

.workspace { display: grid; grid-template-columns: minmax(260px, 0.82fr) minmax(260px, 0.82fr) minmax(330px, 1.3fr); gap: 16px; align-items: start; }
.intake-panel, .decision-panel, .pipeline-panel, .followup-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 2px 4px rgba(31, 45, 61, 0.02); }
.intake-panel, .decision-panel, .followup-panel { padding: 22px; }
.pipeline-panel { grid-column: span 2; padding: 22px; }
.followup-panel { grid-column: 3; }
.panel-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.panel-heading > p:last-child { margin-bottom: 0; }
.pipeline-heading { display: flex; align-items: flex-start; justify-content: space-between; }

form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: #344054; font-size: 12px; font-weight: 700; }
input, textarea { border: 1px solid #c9d3db; background: #fff; color: var(--ink); padding: 10px 11px; border-radius: 5px; outline: none; font-size: 13px; line-height: 1.5; resize: vertical; }
input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12); }
.primary-action, .text-action { border: 0; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-weight: 800; }
.primary-action { min-height: 42px; background: var(--teal); color: #fff; border-radius: 5px; font-size: 13px; }
.primary-action:hover { background: #0b5e58; }
.primary-action svg, .text-action svg { width: 16px; height: 16px; }
.text-action { padding: 15px 0 0; color: var(--teal); background: transparent; font-size: 12px; }

.decision-result { animation: appear 220ms ease-out; }
.score-row { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.score-orb { width: 71px; height: 71px; background: var(--teal-soft); color: var(--teal); display: grid; place-content: center; border-radius: 50%; font: 500 24px "DM Mono", monospace; }
.score-orb small { font-size: 10px; text-align: center; }
.score-label { color: var(--muted); margin-bottom: 3px; font-size: 12px; }
.score-row h3 { margin: 0; font-size: 17px; }
.rule-list { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.rule-list div { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); gap: 12px; }
dt { color: var(--muted); font-size: 12px; } dd { margin: 0; font-size: 12px; font-weight: 800; text-align: right; }
.logic-note { margin: 15px 0 0; display: flex; gap: 7px; align-items: flex-start; color: var(--muted); font-size: 11px; line-height: 1.55; }
.logic-note svg { width: 14px; flex: 0 0 auto; margin-top: 2px; }

.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stage { min-height: 198px; background: #f6f8f9; border-top: 3px solid #a6b3c0; padding: 11px; }
.stage:nth-child(2) { border-color: var(--coral); } .stage:nth-child(3) { border-color: var(--yellow); }
.stage h3 { margin-bottom: 11px; color: #465466; font: 700 11px "DM Mono", monospace; text-transform: uppercase; }
.stage-list { display: grid; gap: 8px; }
.lead-card { background: var(--surface); border: 1px solid var(--line); padding: 10px; box-shadow: 0 1px 2px rgba(31, 45, 61, 0.04); }
.lead-card strong { display: block; font-size: 12px; margin-bottom: 3px; }
.lead-card span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.tag { display: inline-block; margin-top: 8px; padding: 3px 5px; color: #155c56; background: var(--teal-soft); border-radius: 3px; font: 500 9px "DM Mono", monospace; text-transform: uppercase; }
.tag.priority { color: #a33d2b; background: #ffe4df; } .tag.nurture { color: #896110; background: #fff2c9; }

.followup-list { display: grid; gap: 9px; }
.followup-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.followup-item:last-child { border-bottom: 0; }
.followup-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #e7f2fa; color: #276e9e; }
.followup-icon svg { width: 14px; }
.followup-item strong { display: block; margin-bottom: 3px; font-size: 12px; }.followup-item p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
footer { max-width: 1320px; margin: 0 auto; padding: 19px 24px 26px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) { .intro { grid-template-columns: 1fr; } .workspace { grid-template-columns: 1fr 1fr; } .pipeline-panel { grid-column: span 2; } .followup-panel { grid-column: span 2; } }
@media (max-width: 620px) { .topbar { padding: 0 16px; } main { padding: 30px 16px; } h1 { font-size: 31px; } .workspace { grid-template-columns: 1fr; } .pipeline-panel, .followup-panel { grid-column: auto; } .kanban { grid-template-columns: 1fr; } .stage { min-height: auto; } .flow-visual { gap: 6px; overflow-x: auto; justify-content: flex-start; } .flow-visual span { min-width: 67px; } .pilot-note { margin-top: -8px; } footer { padding: 16px; flex-direction: column; gap: 6px; } }
