/* QuoteChase: one stylesheet for the marketing page, the app and the client quote page. */

:root {
  --bg: #f6f7f4;
  --card: #ffffff;
  --ink: #10161c;
  --body: #39424d;
  --muted: #646e79;
  --line: #e3e6e1;
  --line-strong: #cfd4cc;
  --brand: #0d7a5f;
  --brand-ink: #095b47;
  --brand-soft: #e2f2eb;
  --amber: #a85a06;
  --amber-soft: #fdf1df;
  --red: #b42318;
  --red-soft: #fdecea;
  --blue: #1f4fd1;
  --blue-soft: #e6edfd;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 22, 28, 0.04), 0 8px 24px -12px rgba(16, 22, 28, 0.12);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-ink); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: 600 14.5px/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 16px -8px rgba(13,122,95,.7); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #26303a; }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: #aab2a6; }
.btn-ghost { background: transparent; color: var(--body); }
.btn-ghost:hover { background: rgba(16,22,28,.05); }
.btn-danger { background: var(--card); color: var(--red); border-color: #f1c4bf; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand-ink); font: inherit; cursor: pointer; text-decoration: underline; }

/* ─── Cards, badges ───────────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.card-head { padding: 18px 24px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 17px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font: 600 12px/1.6 var(--font); background: #eef0ec; color: var(--body); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-draft { background: #eef0ec; color: var(--muted); }
.badge-sent { background: var(--blue-soft); color: var(--blue); }
.badge-viewed { background: var(--amber-soft); color: var(--amber); }
.badge-won { background: var(--brand-soft); color: var(--brand-ink); }
.badge-lost, .badge-expired { background: var(--red-soft); color: var(--red); }
.badge-paused { background: #eef0ec; color: var(--muted); }

/* ─── Forms ───────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 600; font-size: 14px; color: var(--ink); }
.field .help { font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel],
input[type=url], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--ink); font: 15px/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(13,122,95,.14); }
input[type=file] { font: 14px var(--font); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 18px; height: 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--ink); }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--red); font-size: 13px; font-weight: 500; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.radio-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.radio-list label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; font-weight: 500; cursor: pointer; }
.radio-list label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* Line items editor */
.items { display: grid; gap: 8px; }
.item-row { display: grid; grid-template-columns: 1fr 80px 120px 36px; gap: 8px; align-items: center; }
.item-row.removed { display: none; }
.item-head { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 560px) {
  .item-row { grid-template-columns: 1fr 1fr 36px; }
  .item-row > :first-child { grid-column: 1 / -1; }
  .item-head { display: none; }
}

/* ─── Flash messages ──────────────────────────────────────────────────────── */
.flashes { display: grid; gap: 8px; margin: 16px 0; }
.flash { padding: 12px 16px; border-radius: 10px; font-weight: 500; border: 1px solid; }
.flash-success { background: var(--brand-soft); border-color: #bfe3d3; color: var(--brand-ink); }
.flash-error { background: var(--red-soft); border-color: #f4c7c2; color: var(--red); }
.flash-info, .flash-warning { background: var(--amber-soft); border-color: #f3dbb6; color: var(--amber); }

/* ─── App shell ───────────────────────────────────────────────────────────── */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 18px var(--display); letter-spacing: -0.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; }
.brand-accent { color: var(--brand); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--body); text-decoration: none; font-weight: 500; font-size: 14px; }
.nav a:hover, .nav a.on { background: rgba(16,22,28,.05); color: var(--ink); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }
main.app { padding: 32px 0 80px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 30px; }

/* Dashboard */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 24px; }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 18px 20px; }
.stat .k { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat .v { font: 700 28px/1.2 var(--display); color: var(--ink); margin-top: 6px; letter-spacing: -0.02em; }
.stat .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat.highlight { background: var(--ink); border-color: var(--ink); }
.stat.highlight .k, .stat.highlight .s { color: #a9b3bc; }
.stat.highlight .v { color: #fff; }

.tabs { display: flex; gap: 4px; padding: 4px; background: #eceee9; border-radius: 12px; overflow-x: auto; margin-bottom: 16px; width: fit-content; max-width: 100%; }
.tabs a { padding: 7px 14px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.tabs a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(16,22,28,.1); }
.tabs .count { color: var(--muted); font-weight: 500; margin-left: 4px; }

.quote-list { list-style: none; margin: 0; padding: 0; }
.quote-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 24px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; transition: background-color .15s; }
.quote-list li:first-child .quote-row { border-top: 0; }
.quote-row:hover { background: #fafbf9; }
.quote-row .title { font-weight: 600; color: var(--ink); }
.quote-row .amt { font: 700 16px var(--display); color: var(--ink); text-align: right; }
.quote-row .meta { font-size: 13px; color: var(--muted); }
.quote-row .right { text-align: right; display: grid; justify-items: end; gap: 4px; }

.empty { text-align: center; padding: 56px 24px; }
.empty h2 { font-size: 22px; margin-bottom: 8px; }

/* Quote detail */
.detail { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .detail { grid-template-columns: 1.6fr 1fr; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; word-break: break-word; }
table.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lines th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px 0; border-bottom: 1px solid var(--line); }
table.lines td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.lines .num { text-align: right; white-space: nowrap; }
table.lines td .unit { display: none; font-size: 12.5px; color: var(--muted); }
@media (max-width: 560px) {
  table.lines .col-qp { display: none; }
  table.lines td .unit { display: block; }
}
table.lines tfoot td { border-bottom: 0; font-weight: 700; color: var(--ink); font-size: 16px; padding-top: 14px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .when { color: var(--muted); font-size: 12.5px; }
.timeline .ev-won::before { background: var(--brand); }
.timeline .ev-lost::before, .timeline .ev-failed::before, .timeline .ev-expired::before { background: var(--red); }
.timeline .ev-viewed::before, .timeline .ev-opened::before { background: var(--amber); }
.timeline .ev-question::before { background: var(--blue); }
.quoteblock { margin-top: 4px; padding: 10px 12px; background: #f4f6f3; border-radius: 8px; white-space: pre-wrap; color: var(--ink); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.steps li.next { border-color: var(--brand); background: var(--brand-soft); }
.steps li.done { opacity: .65; }
.email-preview { margin-top: 12px; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 14px; font-size: 13.5px; white-space: pre-wrap; background: #fbfcfa; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
details.more summary { cursor: pointer; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }

/* Settings */
.settings-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.settings-tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.settings-tabs a.on { color: var(--ink); border-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; padding: 3px 8px; border-radius: 6px; background: #eef0ec; color: var(--ink); font-family: ui-monospace, Menlo, monospace; }

/* Auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.auth .card { width: min(420px, 100%); padding: 32px; }
.auth h1 { font-size: 26px; margin: 18px 0 6px; }

/* ─── Client quote page ───────────────────────────────────────────────────── */
.client-top { background: var(--ink); color: #dfe5ea; }
.client-top .wrap-narrow { padding: 28px 0 88px; }
.client-top h1 { color: #fff; font-size: clamp(26px, 5vw, 36px); margin-top: 10px; }
.client-top .biz { font-weight: 600; color: #fff; }
.client-sheet { margin-top: -64px; }
.total-band { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 20px 24px; background: #fafbf9; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.total-band .v { font: 700 30px var(--display); color: var(--ink); letter-spacing: -0.02em; }
.respond { display: grid; gap: 10px; }
@media (min-width: 640px) { .respond { grid-template-columns: 1.4fr 1fr 1fr; } }
.panel { display: none; }
.panel.open { display: block; }
.outcome { text-align: center; padding: 36px 24px; }
.outcome .icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; font-size: 26px; }
.outcome.won .icon { background: var(--brand-soft); color: var(--brand); }
.outcome.lost .icon { background: #eef0ec; color: var(--muted); }
.owner-note { background: var(--amber-soft); color: var(--amber); padding: 10px 14px; border-radius: 10px; font-weight: 500; font-size: 14px; }

/* ─── Marketing page ──────────────────────────────────────────────────────── */
.m-nav { position: sticky; top: 0; z-index: 30; background: rgba(246,247,244,.86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.m-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.m-links { display: flex; align-items: center; gap: 6px; }
.m-links > a:not(.btn) { padding: 8px 12px; color: var(--body); text-decoration: none; font-weight: 500; font-size: 14px; border-radius: 8px; }
.m-links > a:not(.btn):hover { background: rgba(16,22,28,.05); color: var(--ink); }
@media (max-width: 760px) { .m-links .hide-sm { display: none; } }

.m-hero { display: grid; gap: 48px; align-items: center; padding: 64px 0 24px; }
@media (min-width: 1000px) { .m-hero { grid-template-columns: 1fr 1.15fr; padding-top: 88px; } }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--body); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; }
.m-hero h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.035em; margin-top: 22px; max-width: 13ch; }
.m-hero h1 em { font-style: normal; color: var(--brand); }
.m-hero .lede { font-size: clamp(16px, 2vw, 18.5px); margin-top: 20px; max-width: 34rem; }
.ctas { margin-top: 30px; display: flex; gap: 10px; flex-wrap: wrap; }
.fine { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Product frames: real screenshots in a browser window and a phone */
.frame { margin: 0; background: #fff; border: 1px solid var(--line-strong); box-shadow: 0 2px 4px rgba(16,22,28,.04), 0 30px 60px -24px rgba(16,22,28,.28); overflow: hidden; }
.frame img { width: 100%; height: auto; }
.frame-browser { border-radius: 14px; }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: #f1f3ef; border-bottom: 1px solid var(--line); }
.frame-bar span { width: 9px; height: 9px; border-radius: 50%; background: #d4d8d1; }
.frame-bar em { margin-left: 10px; font: 500 11.5px ui-monospace, Menlo, monospace; font-style: normal; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame-phone { border-radius: 30px; border: 7px solid #10161c; width: 210px; box-shadow: 0 30px 60px -20px rgba(16,22,28,.45); }
.frame-phone img { border-radius: 22px; }
.m-hero-shot { position: relative; padding-bottom: 40px; }
.m-hero-shot .frame-browser { width: 100%; }
.m-hero-shot .frame-phone { position: absolute; right: -8px; bottom: 0; width: clamp(130px, 24%, 200px); }
@media (max-width: 640px) { .m-hero-shot .frame-phone { right: 4px; } }
.shot-note { font-size: 12px; color: var(--muted); margin-top: 12px; max-width: 62%; }

.section { padding: 96px 0 0; }
.kicker { font: 600 12.5px var(--font); color: var(--brand); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px; }
.section h2 { font-size: clamp(28px, 4.4vw, 42px); max-width: 22ch; }
.section .sub { margin-top: 12px; max-width: 40rem; font-size: 17px; }

.step { display: grid; gap: 28px; align-items: center; margin-top: 56px; }
@media (min-width: 900px) { .step { grid-template-columns: 1fr 1.5fr; gap: 56px; } .step.flip .step-copy { order: 2; } }
.step-copy h3 { font-size: 24px; margin: 14px 0 10px; }
.step-copy p { font-size: 16.5px; max-width: 30rem; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; font: 700 15px var(--display); }
.frame-phone-solo { justify-self: center; width: 250px; }

.emails-band { margin-top: 96px; padding: 80px 0; background: #eef1ec; border-block: 1px solid var(--line); }
.email-cards { display: grid; gap: 16px; margin-top: 36px; }
@media (min-width: 900px) { .email-cards { grid-template-columns: repeat(3, 1fr); } }
.email-card { padding: 22px; display: flex; flex-direction: column; }
.email-when { font: 600 12px var(--font); color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.email-from { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.email-from strong { color: var(--ink); }
.email-subject { margin-top: 4px; font-weight: 700; color: var(--ink); }
.email-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); white-space: pre-line; font-size: 14px; line-height: 1.6; }

.features { display: grid; gap: 14px; margin-top: 36px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 24px; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.faq { margin-top: 28px; border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: 10px; }
.final { margin: 96px 0 0; padding: 56px 24px; text-align: center; background: var(--ink); color: #c9d1d8; border-radius: 20px; }
.final h2 { color: #fff; font-size: clamp(28px, 4.4vw, 40px); margin: 0 auto; max-width: 18ch; }
.final p { margin: 12px auto 26px; max-width: 32rem; }
.m-foot { margin-top: 64px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.m-foot a { color: var(--body); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
