@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
    --surface: #ffffff;
    --bg: #f9f9f8;
    --bg-alt: #f2f2f0;
    --border: #e4e4e0;
    --border-strong: #c8c8c2;
    --ink: #111110;
    --ink-2: #3a3a38;
    --ink-3: #6b6b68;
    --ink-4: #9a9a96;
    --accent: #1a6b5a;
    --accent-mid: #15574a;
    --accent-light: #e8f4f0;
    --amber: #b45309;
    --amber-light: #fef3c7;
    --mono: 'Geist Mono', ui-monospace, monospace;
}

@page {
    size: Letter;
    margin: 0.6in 0.65in 0.7in;
}

* { box-sizing: border-box; }

html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

body {
    margin: 0;
    font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
    font-size: 10pt;
    line-height: 1.55;
    color: var(--ink-2);
    -webkit-font-smoothing: antialiased;
}

/* ── Brand bar ── */
.brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 26px;
}
.brand-name { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--ink); font-size: 10.5pt; }
.logo {
    width: 24px; height: 24px; border-radius: 4px; background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: 7.5pt; font-weight: 600; color: #fff;
}
.brand-meta { font-family: var(--mono); font-size: 7.5pt; color: var(--ink-4); text-transform: uppercase; letter-spacing: .06em; }

/* ── Badge ── */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--mono); font-size: 7.5pt; font-weight: 500;
    letter-spacing: .05em; text-transform: uppercase;
    padding: 3px 9px; border-radius: 4px;
    background: var(--accent-light); color: var(--accent);
    border: 1px solid rgba(26, 107, 90, .15);
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ── Hero ── */
h1 {
    font-size: 27pt; line-height: 1.08; letter-spacing: -0.025em;
    font-weight: 600; color: var(--ink); margin: 12px 0 14px;
}
h1 .accent { color: var(--accent); }

.meta {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
    margin: 18px 0 22px;
}
.meta div { padding: 10px 14px; border-right: 1px solid var(--border); }
.meta div:last-child { border-right: 0; }
.meta .k { display: block; font-family: var(--mono); font-size: 6.8pt; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); margin-bottom: 2px; }
.meta .v { color: var(--ink); font-weight: 500; font-size: 9.5pt; }

.sample-note {
    font-size: 8pt; color: var(--amber); background: var(--amber-light);
    border-radius: 6px; padding: 6px 10px; margin-bottom: 18px;
}

.short {
    background: var(--accent-light); border: 1px solid rgba(26, 107, 90, .18);
    border-left: 4px solid var(--accent); border-radius: 10px;
    padding: 16px 20px; margin-bottom: 8px;
}
.short .label { font-family: var(--mono); font-size: 7.5pt; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 4px; }
.short p { margin: 0; font-size: 11.5pt; line-height: 1.5; color: var(--ink); font-weight: 500; }

/* ── Sections ── */
section { margin-top: 30px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.step-num {
    width: 24px; height: 24px; border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: 8pt; font-weight: 500; color: var(--ink-3); flex-shrink: 0;
}
h2 { font-size: 15pt; letter-spacing: -0.02em; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.2; }
h3 { font-size: 10.5pt; font-weight: 600; color: var(--ink); margin: 18px 0 8px; }
p { margin: 0 0 9px; }
.lead { font-size: 10.5pt; color: var(--ink-2); }
strong { color: var(--ink); font-weight: 600; }

.break { break-before: page; }
.keep { break-inside: avoid; }

/* ── Snapshot grid ── */
.snapshot { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.snapshot div { padding: 9px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.snapshot div:nth-child(odd) { border-right: 1px solid var(--border); }
.snapshot div.wide { grid-column: span 2; border-right: 0; }
.snapshot div:nth-last-child(-n+1) { border-bottom: 0; }
.snapshot .k { display: block; font-family: var(--mono); font-size: 6.8pt; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); }
.snapshot .v { color: var(--ink); }

/* ── Intake ── */
.qa { margin-bottom: 14px; break-inside: avoid; }
.qa .q { font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: 9.5pt; }
.qa .q .n { font-family: var(--mono); font-size: 7.5pt; color: var(--accent); margin-right: 6px; font-weight: 500; }
.speech {
    background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
    padding: 11px 15px; color: var(--ink-2); font-size: 9.3pt; line-height: 1.55;
}

/* ── Findings ── */
.findings { list-style: none; padding: 0; margin: 0; }
.findings li {
    padding: 10px 0 10px 18px; border-bottom: 1px solid var(--border); position: relative; break-inside: avoid;
}
.findings li:last-child { border-bottom: 0; }
.findings li::before {
    content: ''; position: absolute; left: 0; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

.decision {
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;

    padding: 18px 20px; margin-top: 16px; break-inside: avoid;
}
.decision .verdict { font-size: 13pt; font-weight: 600; color: var(--accent); letter-spacing: -0.01em; margin-bottom: 6px; }
.olist { list-style: none; padding: 0; margin: 10px 0 0; counter-reset: n; }
.olist li { display: flex; gap: 10px; margin-bottom: 8px; counter-increment: n; }
.olist li::before {
    content: counter(n); width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
    background: var(--accent-light); color: var(--accent);
    font-family: var(--mono); font-size: 7.5pt; font-weight: 500;
    display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.decision .after { margin: 10px 0 0; color: var(--ink-3); font-size: 9.3pt; }

/* ── Plan ── */
.phases { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.phase { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--surface); break-inside: avoid; }
.phase .when { font-family: var(--mono); font-size: 7pt; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.phase .title { font-weight: 600; color: var(--ink); font-size: 10.5pt; margin: 2px 0 8px; }
.tasks { list-style: none; padding: 0; margin: 0; }
.tasks li { display: flex; gap: 9px; margin-bottom: 7px; font-size: 9pt; line-height: 1.45; }
.tasks li::before {
    content: ''; width: 11px; height: 11px; border: 1.5px solid var(--border-strong); border-radius: 3px; flex-shrink: 0; margin-top: 2px;
}
.due { display: inline-block; font-family: var(--mono); font-size: 7pt; color: var(--ink-3); background: var(--bg-alt); border-radius: 3px; padding: 0 5px; margin-left: 3px; white-space: nowrap; }

/* ── Checkpoint table ── */
.checkpoint { margin-top: 16px; break-inside: avoid; }
table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; font-size: 9pt; }
th { text-align: left; font-family: var(--mono); font-size: 7pt; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); background: var(--bg-alt); padding: 8px 12px; font-weight: 500; }
td { padding: 8px 12px; border-top: 1px solid var(--border); color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 500; }
td.target { color: var(--accent); font-weight: 600; }

/* ── CTA ── */
.cta {
    margin-top: 26px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
    background: var(--ink); color: #e9e9e6; border-radius: 12px; padding: 20px 22px; break-inside: avoid;
}
.cta .badge { background: rgba(255,255,255,.08); color: #9fd6c6; border-color: rgba(255,255,255,.12); }
.cta .badge .dot { background: #9fd6c6; }
.cta h3 { color: #fff; font-size: 13pt; margin: 8px 0 6px; letter-spacing: -0.01em; }
.cta p { color: #c9c9c4; font-size: 9.2pt; margin: 0; }
.price { text-align: right; }
.price .amt { font-size: 22pt; font-weight: 600; color: #fff; letter-spacing: -0.02em; line-height: 1; }
.price .cur { font-family: var(--mono); font-size: 7.5pt; color: #9a9a96; }
.price .credit { font-size: 8pt; color: #9fd6c6; margin-top: 4px; }

.question {
    margin-top: 18px; border: 1px dashed var(--border-strong); border-radius: 10px; padding: 12px 16px; background: var(--bg); break-inside: avoid;
}
.question .label { font-family: var(--mono); font-size: 7pt; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); margin-bottom: 3px; }

.signoff { margin-top: 18px; color: var(--ink-2); }

footer {
    margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; font-family: var(--mono); font-size: 7pt; color: var(--ink-4); text-transform: uppercase; letter-spacing: .05em;
}

.section-head, h3 { break-after: avoid; }
.phases { break-before: avoid; }

/* ── Web view (ignored when printing to PDF) ── */
.toolbar { display: none; }

@media screen {
    body { background: var(--bg); padding: 0 16px 48px; font-size: 15px; }
    .toolbar {
        display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
        max-width: 8.5in; margin: 0 auto; padding: 16px 0;
    }
    .toolbar a { text-decoration: none; }
    .toolbar .home { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink-3); font-size: 14px; }
    .toolbar .home:hover { color: var(--ink); }
    .toolbar .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .btn {
        display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500;
        padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
    }
    .btn:hover { border-color: var(--border-strong); color: var(--ink); }
    .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
    .btn-primary:hover { background: var(--accent-mid); border-color: var(--accent-mid); color: #fff; }
    .page {
        display: block; max-width: 8.5in; margin: 0 auto; background: var(--surface);
        border: 1px solid var(--border); border-radius: 12px; padding: 0.6in 0.65in 0.5in;
        box-shadow: 0 4px 20px rgba(17,17,16,.07), 0 1px 4px rgba(17,17,16,.04);
    }
}

@media screen and (max-width: 640px) {
    .toolbar { flex-wrap: nowrap; }
    .toolbar .home span.name { display: none; }
    .toolbar .home .arrow { font-size: 18px; }
    .btn { font-size: 12.5px; padding: 7px 10px; white-space: nowrap; }
    .brand-meta { display: none; }
    .page { padding: 24px 18px; border-radius: 10px; }
    h1 { font-size: 24pt; }
    .meta { grid-template-columns: 1fr 1fr; }
    .meta div:nth-child(2) { border-right: 0; }
    .meta div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
    .snapshot, .phases { grid-template-columns: 1fr; }
    .snapshot div:nth-child(odd) { border-right: 0; }
    .snapshot div.wide { grid-column: auto; }
    .cta { grid-template-columns: 1fr; }
    .price { text-align: left; }
}

/* ── Sample banner (web view only) ── */
.sample-banner { display: none; }

@media screen {
    .sample-banner {
        display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
        max-width: 8.5in; margin: 0 auto 14px; padding: 10px 14px;
        background: var(--amber-light); color: var(--amber); border: 1px solid rgba(180, 83, 9, .2);
        border-radius: 8px; font-size: 13.5px; line-height: 1.45;
    }
    .sample-banner .badge { background: rgba(255,255,255,.7); color: var(--amber); border-color: rgba(180, 83, 9, .25); }
    .sample-banner .badge .dot { background: var(--amber); }
    .page .sample-note { display: none; }
}
