:root {
    --ink: #101914;
    --muted: #46534b;
    --paper: #f3f1eb;
    --card: #fffefa;
    --line: #c5cbc4;
    --green: #17432f;
    --green-light: #d4e6da;
    --gold: #c69043;
    --danger: #8a2f2a;
    --shadow: 0 24px 60px rgba(29, 45, 36, .10);
}

* { box-sizing: border-box; }
html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y pinch-zoom;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
.site-header {
    max-width: 1180px;
    margin: 0 auto;
    padding: 25px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; line-height: 1.1; }
.brand span:last-child { display: flex; flex-direction: column; }
.brand small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin-top: 4px; }
.brand-mark {
    width: 42px; height: 42px; display: grid; place-items: center;
    background: var(--green); color: white; border-radius: 13px;
    font: 700 23px Georgia, serif; box-shadow: 0 8px 20px rgba(33,77,58,.2);
}
main { width: min(1120px, calc(100% - 40px)); margin: 45px auto 80px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 80px; align-items: center; min-height: 570px; }
.eyebrow { margin: 0 0 10px; color: var(--green); text-transform: uppercase; letter-spacing: .16em; font-weight: 750; font-size: 12px; }
h1, h2, h3 { line-height: 1.12; }
h1 { font: 500 clamp(42px, 6vw, 76px)/1.02 Georgia, serif; letter-spacing: -.04em; margin: 0 0 28px; }
h1 em { color: var(--green); font-weight: 500; }
.lede { color: var(--muted); font-size: 19px; max-width: 570px; }
.research-card, .login-card, .status-card {
    background: var(--card); border: 1px solid rgba(22,32,27,.07); border-radius: 24px;
    padding: 34px; box-shadow: var(--shadow);
}
.research-card { display: grid; gap: 16px; }
.research-card > label:not(.upload-zone), .stack-form label { font-size: 13px; font-weight: 750; margin-bottom: -10px; }
.research-card > label span { color: var(--muted); font-weight: 500; }
input[type="number"], input[type="password"] {
    width: 100%; border: 1px solid var(--line); background: white; border-radius: 12px;
    padding: 14px 15px; color: var(--ink); font: inherit; outline: none;
}
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(33,77,58,.11); }
.upload-zone {
    min-height: 225px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; border: 1.5px dashed #aeb8b0; border-radius: 18px; background: #f8faf6; cursor: pointer;
    transition: border-color .2s, background .2s, transform .2s;
}
.upload-zone:hover { border-color: var(--green); background: #f1f7f2; transform: translateY(-2px); }
.upload-zone small { color: var(--muted); margin-top: 5px; }
.camera-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--green-light); color: var(--green); font-size: 32px; margin-bottom: 15px; }
.file-name { color: var(--green) !important; margin-top: 12px; font-size: 13px; word-break: break-all; }
.primary-button, .secondary-button {
    border: 0; border-radius: 12px; padding: 15px 19px; font: 750 15px/1 inherit; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; text-decoration: none;
}
.primary-button { background: var(--green); color: white; box-shadow: 0 10px 24px rgba(33,77,58,.18); }
.primary-button:hover { background: #173c2c; }
.primary-button:disabled { opacity: .65; cursor: wait; }
.secondary-button { background: white; color: var(--green); border: 1px solid var(--line); }
.inline-button { display: inline-flex; margin-top: 15px; }
.text-button { border: 0; background: none; color: var(--muted); cursor: pointer; }
.privacy-note, .cost-note { color: var(--muted); font-size: 13px; text-align: center; margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.recent-section { margin-top: 75px; }
.recent-section h2 { font: 500 34px Georgia, serif; margin: 0; }
.recent-list { border-top: 1px solid var(--line); margin-top: 20px; }
.recent-list a { padding: 18px 4px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; text-decoration: none; }
.recent-list a:hover strong { color: var(--green); }
.recent-list a > span:first-child { display: flex; flex-direction: column; }
.recent-list small { color: var(--muted); }
.status { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 5px 9px; border-radius: 99px; background: #e7e8e3; }
.status-completed { color: var(--green); background: var(--green-light); }
.status-failed, .status-needs_input { color: var(--danger); background: #f3ddda; }
.alert { max-width: 800px; margin: 0 auto 24px; padding: 13px 16px; border-radius: 10px; }
.alert-error { background: #f4dfdc; color: var(--danger); border: 1px solid #e4c1bd; }
.login-card, .status-card { max-width: 590px; margin: 100px auto; }
.login-card h1, .status-card h1 { font-size: 50px; }
.stack-form { display: grid; gap: 14px; margin-top: 25px; }
code { background: #ecece5; border-radius: 5px; padding: 2px 5px; }
.report-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.back-link { color: var(--green); font-weight: 700; text-decoration: none; }
.report-hero { display: flex; justify-content: space-between; align-items: end; gap: 30px; border-bottom: 3px solid var(--green); padding: 35px 0; }
.report-hero h1 { font-size: clamp(38px, 6vw, 67px); margin-bottom: 10px; }
.vin-line { font: 650 14px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; color: var(--muted); }
.confidence { flex: none; padding: 8px 13px; border-radius: 999px; font-weight: 750; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.confidence-high { color: var(--green); background: var(--green-light); }
.confidence-medium { color: #72511e; background: #f3e4c8; }
.confidence-low { color: var(--danger); background: #f3ddda; }
.report-section { padding: 36px 0; border-bottom: 1px solid var(--line); }
.report-section h2 { font: 500 30px Georgia, serif; margin: 0 0 22px; }
.report-section h3 { font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.facts div { background: var(--card); padding: 18px; }
.facts dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.facts dd { margin: 4px 0 0; font-weight: 700; }
.facts small { display: block; color: var(--muted); font-weight: 500; margin-top: 6px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.feature-group { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.feature-group h3 { color: var(--green); margin-top: 0; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
ul { padding-left: 22px; }
li { margin: 7px 0; }
.highlight-list { columns: 2; column-gap: 40px; }
.highlight-list li { break-inside: avoid; }
.check-list { list-style: none; padding-left: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.check-list li::before { content: '□'; color: var(--green); font-weight: 700; margin-right: 9px; }
.pitch blockquote { margin: 0; background: var(--green); color: white; padding: 30px; border-radius: 16px; font: 500 22px/1.55 Georgia, serif; }
.questions details { border-top: 1px solid var(--line); padding: 15px 0; }
.questions summary { cursor: pointer; font-weight: 700; }
.questions p { color: var(--muted); }
.report-section li::marker { color: var(--green); font-weight: 800; }
.source-tag { display: inline-block; margin-left: 7px; color: var(--muted); background: #e8e9e3; border-radius: 99px; padding: 1px 7px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.cost-note { margin-top: 22px; }
footer { max-width: 800px; margin: 0 auto; padding: 30px 20px 50px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 12px; }

@media (max-width: 800px) {
    body { font-size: 18px; line-height: 1.62; }
    main { width: min(100% - 24px, 1120px); margin-top: 15px; margin-bottom: 45px; }
    .hero-grid { grid-template-columns: 1fr; gap: 30px; min-height: 0; }
    .intro h1 { font-size: 50px; }
    .report-toolbar { margin: 0 0 16px; gap: 10px; }
    .report-toolbar > * { min-width: 0; }
    .report-toolbar .secondary-button { padding: 11px 13px; font-size: 15px; }
    .report-hero {
        display: grid;
        gap: 12px;
        padding: 18px 2px 22px;
        border-bottom-width: 2px;
    }
    .report-hero h1 {
        font-size: clamp(31px, 9vw, 43px);
        line-height: 1.04;
        margin: 0 0 8px;
        overflow-wrap: anywhere;
    }
    .report-hero .eyebrow { margin-bottom: 7px; }
    .vin-line { margin: 0; font-size: 15px; letter-spacing: .035em; color: var(--ink); overflow-wrap: anywhere; }
    .confidence { width: max-content; padding: 7px 11px; font-size: 13px; }
    .report-section { padding: 28px 0; }
    .report-section, .report-section > *, .feature-group, .questions, .sources { min-width: 0; max-width: 100%; }
    .report-section h2 { font-size: 28px; margin-bottom: 17px; }
    .report-section h3 { margin-top: 20px; }
    .facts {
        display: block;
        border-radius: 13px;
        background: var(--card);
        overflow: hidden;
    }
    .facts div {
        display: grid;
        grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
        gap: 13px;
        align-items: start;
        padding: 16px 15px;
        border-bottom: 1px solid var(--line);
    }
    .facts div:last-child { border-bottom: 0; }
    .facts dt { padding-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.4; letter-spacing: .035em; }
    .facts dd { margin: 0; min-width: 0; font-size: 17px; line-height: 1.48; overflow-wrap: anywhere; }
    .facts small { color: var(--muted); font-size: 14px; line-height: 1.5; }
    .feature-grid { grid-template-columns: 1fr; gap: 10px; }
    .feature-group { padding: 15px 16px; }
    .feature-group h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: .06em; }
    .feature-group ul { margin: 0; }
    .highlight-list { columns: 1; }
    .check-list { grid-template-columns: 1fr; gap: 9px; }
    .pitch blockquote { padding: 23px; font-size: 22px; line-height: 1.55; border-radius: 13px; }
    .questions details { padding: 14px 0; }
    .questions summary { padding: 2px 8px 2px 0; font-size: 18px; line-height: 1.5; }
    .questions p { margin: 12px 0 2px; color: #344138; font-size: 17px; line-height: 1.6; }
    .sources ul { padding-left: 18px; }
    .sources li { margin-bottom: 13px; overflow-wrap: anywhere; }
    .sources a { color: var(--green); font-weight: 700; text-decoration-thickness: 1.5px; text-underline-offset: 3px; word-break: break-word; }
    .source-tag { display: table; margin: 6px 0 0; color: #344138; font-size: 13px; }
    .cost-note { padding: 0 10px; color: #344138; font-size: 15px; line-height: 1.55; }
    .recent-list a { min-width: 0; }
    .recent-list a > span:first-child { min-width: 0; }
    .recent-list small, .recent-list strong { overflow-wrap: anywhere; }
    input, button, select, textarea { max-width: 100%; font-size: 18px; }
}
@media (max-width: 520px) {
    .site-header { padding: 18px 20px; }
    .research-card { padding: 20px; border-radius: 18px; }
    .upload-zone { min-height: 190px; }
    .facts div { grid-template-columns: minmax(92px, 35%) minmax(0, 1fr); padding: 15px 12px; gap: 12px; }
    .report-toolbar { align-items: center; }
    .back-link { font-size: 16px; }
}
@media print {
    body { background: white; font-size: 12px; }
    .site-header, .report-toolbar, footer, .cost-note { display: none !important; }
    main { width: 100%; margin: 0; }
    .report-section { break-inside: avoid; padding: 18px 0; }
    .report-section h2 { font-size: 22px; }
    .facts div, .feature-group { background: white; }
    .pitch blockquote { color: black; background: white; border: 2px solid #333; }
    a { text-decoration: none; }
}
