/* LeadLoop design system: paper + ink. Warm off-white ground, deep green ink, one bright accent. */
:root {
  --paper: #f6f1e7;
  --paper-2: #efe8da;
  --paper-3: #e6ddcb;
  --ink: #12261f;
  --ink-2: #2f463d;
  --ink-3: #6b7d75;
  --line: rgba(18, 38, 31, 0.14);
  --line-strong: rgba(18, 38, 31, 0.32);
  --green: #1fae5a;
  --green-deep: #147a3e;
  --amber: #e9b44c;
  --coral: #e2573d;
  --white: #fffdf8;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 1px 0 rgba(18,38,31,.06), 0 12px 32px -18px rgba(18,38,31,.35);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: 15.5px; line-height: 1.5; color: var(--ink);
  background: var(--paper);
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(233,180,76,.16), transparent 60%),
                    radial-gradient(900px 500px at -10% 110%, rgba(31,174,90,.12), transparent 60%);
  background-attachment: fixed;
}
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--font-mono); font-size: .88em; }
.muted { color: var(--ink-3); }
.small { font-size: .86rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; text-decoration: none; letter-spacing: -.01em; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); position: relative; flex: none; }
.brand-mark::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 2.5px solid var(--green); border-right-color: transparent; transform: rotate(-30deg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .62rem 1.05rem; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--white); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .12s ease, background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); border-color: var(--ink); }
.btn:active { transform: translateY(0); }
.btn-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-ink:hover { background: #0c1a15; box-shadow: 0 8px 20px -10px rgba(18,38,31,.7); }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-green:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-sm { padding: .38rem .75rem; font-size: .86rem; }
.btn-danger { color: var(--coral); border-color: rgba(226,87,61,.45); }
.btn-danger:hover { background: rgba(226,87,61,.08); border-color: var(--coral); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-3); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--ink); }

/* Forms */
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
label .hint { font-weight: 400; color: var(--ink-3); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=date], input[type=color], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white); border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: .6rem .75rem; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31,174,90,.18); }
input[type=color] { padding: .2rem; height: 42px; width: 70px; }
textarea { min-height: 96px; resize: vertical; }
.field { margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.form-actions { display: flex; gap: .6rem; align-items: center; margin-top: 1.2rem; }

/* Cards, tables */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.35rem 1.5rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1.25rem; }
.card h2, .card h3 { margin-top: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(18,38,31,.025); }
.pill { display: inline-block; padding: .14rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border: 1px solid transparent; }
.pill-new { background: rgba(233,180,76,.22); color: #7a5a12; }
.pill-contacted { background: rgba(18,38,31,.08); color: var(--ink-2); }
.pill-qualified { background: rgba(31,174,90,.16); color: var(--green-deep); }
.pill-won { background: var(--green); color: #fff; }
.pill-lost { background: rgba(226,87,61,.14); color: #9c2f1c; }
.ref { font-family: var(--font-mono); font-weight: 600; letter-spacing: .06em; background: var(--paper-2); padding: .1rem .4rem; border-radius: 6px; }
.flash { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1.2rem; font-weight: 500; border: 1px solid; }
.flash-ok { background: rgba(31,174,90,.1); border-color: rgba(31,174,90,.4); color: var(--green-deep); }
.flash-err { background: rgba(226,87,61,.1); border-color: rgba(226,87,61,.4); color: #9c2f1c; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; margin-bottom: .3rem; }
pre.snippet { background: var(--ink); color: #dfe9e3; padding: 1rem 1.1rem; border-radius: var(--radius); overflow-x: auto; font-family: var(--font-mono); font-size: .82rem; line-height: 1.55; margin: 0; }
.copy-row { display: flex; gap: .6rem; align-items: flex-start; }
.copy-row pre { flex: 1; }

/* App shell */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: var(--paper); padding: 1.4rem 1.1rem; display: flex; flex-direction: column; gap: 1.4rem; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { color: var(--paper); }
.sidebar .brand-mark { background: var(--paper); }
.sidebar .brand-mark::after { border-color: var(--green); border-right-color: transparent; }
.ws-switch { border: 1px solid rgba(246,241,231,.18); border-radius: var(--radius); padding: .6rem .75rem; }
.ws-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-plan { font-size: .72rem; letter-spacing: .1em; color: var(--amber); font-weight: 700; }
.side-nav { display: flex; flex-direction: column; gap: .15rem; }
.side-nav a { text-decoration: none; padding: .5rem .7rem; border-radius: 8px; color: rgba(246,241,231,.78); font-weight: 500; }
.side-nav a:hover { background: rgba(246,241,231,.08); color: var(--paper); }
.side-nav a.active { background: rgba(246,241,231,.14); color: var(--paper); }
.side-foot { margin-top: auto; font-size: .85rem; }
.side-foot .me { font-weight: 600; margin-bottom: .3rem; }
.side-foot .me span { display: block; font-weight: 400; color: rgba(246,241,231,.6); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }
.side-foot .link-btn { color: rgba(246,241,231,.7); }
.content { padding: 2rem 2.4rem 4rem; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head h1 { font-size: 2rem; margin: 0; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem 1.15rem; box-shadow: var(--shadow); }
.stat .k { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.stat .v { font-family: var(--font-display); font-size: 2rem; font-weight: 500; line-height: 1.1; margin-top: .2rem; }
.stat .d { font-size: .8rem; color: var(--ink-3); margin-top: .2rem; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; }
.chart { width: 100%; height: auto; display: block; }
.bar-list { list-style: none; margin: 0; padding: 0; }
.bar-list li { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; padding: .35rem 0; font-size: .92rem; }
.bar-list .bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--paper-3); overflow: hidden; }
.bar-list .bar i { display: block; height: 100%; background: var(--green); }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; padding: .45rem .65rem; font-size: .9rem; }
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: .9rem; overflow-x: auto; padding-bottom: .5rem; }
.col { background: rgba(255,253,248,.7); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .8rem; min-height: 240px; }
.col h3 { display: flex; justify-content: space-between; font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 .2rem .7rem; }
.lead-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem; margin-bottom: .6rem; box-shadow: var(--shadow); font-size: .9rem; }
.lead-card a.name { font-weight: 600; text-decoration: none; display: block; }
.lead-card .meta { color: var(--ink-3); font-size: .78rem; margin-top: .25rem; display: flex; justify-content: space-between; gap: .5rem; }
.lead-card .quick { margin-top: .5rem; display: flex; gap: .3rem; flex-wrap: wrap; }
.lead-card .quick button { font-size: .72rem; padding: .22rem .5rem; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { padding: .4rem 0 .6rem 1rem; position: relative; font-size: .92rem; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: .8rem; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink-3); }
.timeline li.note::before { background: var(--amber); border-color: var(--amber); }
.timeline .when { color: var(--ink-3); font-size: .78rem; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: .35rem 1rem; font-size: .93rem; }
.kv dt { color: var(--ink-3); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; padding-top: .15rem; }
.kv dd { margin: 0; word-break: break-word; }
.inline-form { display: inline; }
.warn-box { border: 1.5px dashed var(--amber); background: rgba(233,180,76,.12); border-radius: var(--radius); padding: .8rem 1rem; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.plan { border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem; background: var(--white); }
.plan.current { border-color: var(--green); }
.plan .price { font-family: var(--font-display); font-size: 2rem; margin: .3rem 0; }
.plan ul { padding-left: 1.1rem; margin: .6rem 0 1rem; font-size: .9rem; }
.progress { height: 8px; background: var(--paper-3); border-radius: 4px; overflow: hidden; margin: .4rem 0; }
.progress i { display: block; height: 100%; background: var(--green); }
.progress.hot i { background: var(--coral); }
.menu-btn { display: none; }

/* Auth */
.auth-wrap { max-width: 440px; margin: 6vh auto; padding: 0 1.2rem; }
.auth-wrap .brand { margin-bottom: 1.6rem; }
.auth-wrap .card { padding: 1.8rem; }
.auth-wrap h1 { font-size: 1.9rem; }

/* Marketing */
.marketing { overflow-x: hidden; }
.mk-header { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem clamp(1.2rem, 5vw, 4rem); }
.mk-header nav { display: flex; gap: 1.4rem; align-items: center; font-weight: 500; }
.mk-header nav a { text-decoration: none; }
.mk-header nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding: clamp(2rem, 6vw, 5rem) clamp(1.2rem, 5vw, 4rem) 3rem; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); font-weight: 400; letter-spacing: -.025em; line-height: 1.02; }
.hero h1 em { font-style: italic; font-weight: 300; color: var(--green-deep); }
.hero .lede { font-size: 1.2rem; max-width: 34rem; color: var(--ink-2); }
.hero .cta-row { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero .cta-row .btn { padding: .8rem 1.4rem; font-size: 1.02rem; }
.eyebrow { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green-deep); margin-bottom: 1rem; display: inline-block; }
.receipt { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 1.3rem 1.4rem 3.4rem; font-family: var(--font-mono); font-size: .8rem; line-height: 1.7; box-shadow: 0 30px 60px -30px rgba(18,38,31,.5); transform: rotate(-1.5deg); position: relative; }
.receipt::before, .receipt::after { content: ''; position: absolute; left: 0; right: 0; height: 8px; background-image: radial-gradient(circle at 4px 4px, var(--paper) 4px, transparent 4.5px); background-size: 12px 8px; }
.receipt::before { top: -4px; }
.receipt::after { bottom: -4px; transform: rotate(180deg); }
.receipt .r-head { font-family: var(--font-display); font-size: 1.1rem; text-align: center; letter-spacing: .1em; border-bottom: 1px dashed var(--line-strong); padding-bottom: .5rem; margin-bottom: .6rem; }
.receipt .r-line { display: flex; justify-content: space-between; gap: 1rem; }
.receipt .r-line span:last-child { text-align: right; }
.receipt .r-total { border-top: 1px dashed var(--line-strong); margin-top: .6rem; padding-top: .5rem; font-weight: 600; }
.receipt .r-stamp { position: absolute; right: 22px; bottom: 12px; border: 2px solid var(--green); color: var(--green); font-family: var(--font-display); font-size: 1rem; letter-spacing: .12em; padding: .15rem .5rem; transform: rotate(-12deg); border-radius: 4px; opacity: .85; }
.reveal { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.reveal-1 { animation-delay: .05s; } .reveal-2 { animation-delay: .18s; } .reveal-3 { animation-delay: .32s; } .reveal-4 { animation-delay: .46s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.section { padding: 3.5rem clamp(1.2rem, 5vw, 4rem); }
.section-head { max-width: 42rem; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 400; letter-spacing: -.02em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; counter-reset: step; }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; position: relative; box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-size: 2.4rem; color: var(--paper-3); position: absolute; top: .6rem; right: 1rem; line-height: 1; }
.step h3 { margin-top: .3rem; }
.step p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.feature-band { background: var(--ink); color: var(--paper); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 3rem); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.6rem; }
.feature-band h3 { color: var(--amber); font-weight: 500; font-size: 1.15rem; margin-bottom: .3rem; }
.feature-band p { color: rgba(246,241,231,.78); margin: 0; font-size: .95rem; }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: start; }
.price-card { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow); }
.price-card.featured { border-color: var(--ink); transform: translateY(-8px); }
.price-card .tier { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.price-card .amount { font-family: var(--font-display); font-size: 3rem; font-weight: 400; letter-spacing: -.03em; margin: .4rem 0 .2rem; }
.price-card .amount small { font-family: var(--font-body); font-size: 1rem; color: var(--ink-3); letter-spacing: 0; }
.price-card ul { list-style: none; padding: 0; margin: 1rem 0 1.4rem; }
.price-card li { padding: .35rem 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.price-card li:last-child { border: 0; }
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2.5rem; max-width: 60rem; }
.faq h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.faq p { color: var(--ink-2); font-size: .95rem; }
.mk-footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2.5rem clamp(1.2rem, 5vw, 4rem) 3rem; border-top: 1px solid var(--line); margin-top: 2rem; font-size: .9rem; color: var(--ink-3); }
.mk-footer-links { display: flex; gap: 1.4rem; }
.mk-footer-links a { text-decoration: none; }
.prose { max-width: 46rem; margin: 2rem auto 4rem; padding: 0 1.2rem; }
.prose h2 { margin-top: 2rem; }
.prose li { margin-bottom: .35rem; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .steps, .pricing, .plan-grid { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .two-col, .faq, .field-row { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; padding: .9rem 1rem; }
  .side-nav { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .side-nav a { padding: .4rem .6rem; font-size: .9rem; }
  .side-foot { margin-left: auto; }
  .ws-switch { border: 0; padding: 0; }
  .content { padding: 1.2rem 1rem 3rem; }
  .mk-header nav a:not(.btn) { display: none; }
  .pipeline { grid-template-columns: repeat(5, 240px); }
}
