/* loopdax dashboard — mobile-first.
   Designed for one-handed use on a phone while standing on a sales floor. */

:root {
    /* Palette per docs/BRANDING.md "Visual direction".
       Brand: deep confident blue, Bonneville salt flats at dusk
       (#1a3a52 – #2c5a7e range). Not Twitter blue.
       Neutrals: warm grays, not cool. Avoid pure white and pure black. */
    --brand: #1F4660;          /* mid of the salt-flats range */
    --brand-light: #2C5A7E;    /* lighter end of the range */
    --bg: #F5F3F0;             /* warm gray background per brand */
    --surface: #FAFAF7;        /* off-white surface; never pure #FFFFFF */
    --text: #1A1A1A;
    --text-muted: #5F5B55;     /* warm muted, not cool gray */
    --text-faint: #908A82;
    --border: #E0DDD8;         /* warm gray border per brand */
    /* Status palette per BRANDING.md:
         green       — sent / completed
         burnt-orange — hot / high-priority lead AND primary "do this now" CTA
         amber       — waiting / warm
         red         — failed (reserved; not used for attention)
       --accent and --hot are the same value by design: a hot lead and a
       primary CTA are the same kind of signal ("act on this now"). */
    --accent: #C8632A;
    --accent-hover: #B0531F;
    --hot: #C8632A;
    --warm: #D97706;
    --cold: #6B7280;
    --success: #15803D;
    --error: #B91C1C;
    --hot-bg: #FDF1E8;         /* soft burnt-orange tint */
    --warm-bg: #FFFBEB;
    --cold-bg: #F3F4F6;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    /* Inter — characterful sans-serif per BRANDING.md. Falls back to
       system fonts during the brief flash before the webfont loads. */
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-feature-settings: "ss01", "cv02";  /* Inter's stylistic alternates: stricter `1` and curved-leg `l` for tighter numeric columns */
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    padding-bottom: 80px;
}

/* Top bar */
.topbar {
    background: var(--brand);
    color: white;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 17px;
}
.brand-icon { color: #4ADE80; font-size: 14px; }
.topbar-user { font-size: 14px; opacity: 0.85; }

.topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-nav {
    display: flex;
    gap: 14px;
}
.nav-link {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.15s ease;
}
.nav-link:hover { color: white; }

/* Hamburger toggle — visually hidden checkbox drives a CSS-only menu */
.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
}
.nav-toggle-btn { display: none; }

@media (max-width: 600px) {
    .topbar { flex-wrap: wrap; }
    .nav-toggle-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        font-size: 22px;
        line-height: 1;
        color: white;
        cursor: pointer;
        border-radius: 6px;
        user-select: none;
    }
    .nav-toggle-btn:hover { background: rgba(255,255,255,0.1); }
    .nav-toggle:focus-visible + .topbar-left .nav-toggle-btn {
        outline: 2px solid rgba(255,255,255,0.5);
        outline-offset: 2px;
    }
    .topbar-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        gap: 0;
        margin-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.15);
        padding-top: 6px;
    }
    .nav-toggle:checked ~ .topbar-nav { display: flex; }
    .topbar-nav .nav-link {
        padding: 10px 4px;
        font-size: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .topbar-nav .nav-link:last-child { border-bottom: none; }
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}
.stats-grid-6 {
    grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 600px) {
    .stats-grid-6 { grid-template-columns: repeat(3, 1fr); }
}
.stat-attention { color: #2E74B5; }
.stat-warn { color: #D97706; }

.page-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin: -8px 0 16px;
}

.reason-tag {
    font-size: 12px;
    color: var(--warm);
    background: var(--warm-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-style: italic;
}

.draft-flagged-high { border-left-color: var(--hot); }
.draft-flagged-medium { border-left-color: var(--warm); }
.draft-flagged-low { border-left-color: var(--cold); }

.flagged-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-danger {
    background: var(--hot-bg);
    color: var(--hot);
    border: 1px solid var(--hot);
    padding: 10px 14px;
    font-size: 14px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}
.checkbox-row input[type=checkbox] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* === Vehicle match picker === */
.match-list { display: flex; flex-direction: column; gap: 8px; }
.match-form { margin: 0; padding: 0; }
.match-card {
    width: 100%;
    display: flex;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease;
    font-family: inherit;
}
.match-card:hover { background: var(--bg); border-color: var(--brand-light); }
.match-card:active { transform: scale(0.99); }
.match-selected {
    border-color: var(--success);
    border-width: 2px;
    background: #F0FDF4;
}
.match-thumb {
    width: 72px;
    height: 56px;
    flex-shrink: 0;
    background: var(--bg);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.match-thumb img { width: 100%; height: 100%; object-fit: cover; }
.match-thumb-empty {
    background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
    color: #3730A3;
    font-weight: 600;
    font-size: 22px;
}
.match-info { flex: 1; min-width: 0; }
.match-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.match-selected-tag {
    font-size: 10px;
    background: var(--success);
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.match-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.match-reason {
    font-size: 11px;
    color: var(--text-faint);
    font-style: italic;
}

/* === Attachments === */
.attachment-count { color: var(--brand-light); font-weight: 500; }

.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.attachment-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
}
.attachment-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.attachment-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.attachment-remove:hover { background: rgba(0,0,0,0.8); }

.attachment-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.attachment-btn {
    flex: 1;
    min-width: 100px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    padding: 10px 12px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}
.attachment-btn:hover { background: #E5E7EB; }

.inv-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 6px;
}
.inv-photo-btn {
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.15s ease;
}
.inv-photo-btn:hover { border-color: var(--brand-light); border-width: 2px; }
.inv-photo-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Already-attached photo indicator */
.inv-photo-attached {
    position: relative;
    cursor: default;
    opacity: 0.6;
    border-color: var(--success);
    border-width: 2px;
}
.inv-photo-attached:hover {
    border-color: var(--success);
    border-width: 2px;
}
.inv-photo-check {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 600;
}

/* Optional tag for attachments label */
.optional-tag {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-faint);
    text-transform: lowercase;
    letter-spacing: 0;
    margin-left: 4px;
    font-style: italic;
}

/* Collapsible inventory photo picker */
.inv-photo-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.inv-photo-details summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--brand-light);
    padding: 4px 0;
    user-select: none;
}
.inv-photo-details summary:hover { color: var(--brand); }
.inv-photo-details[open] summary { margin-bottom: 8px; }

.loading-stub, .empty-stub {
    font-size: 13px;
    color: var(--text-muted);
    padding: 12px;
    text-align: center;
    background: var(--bg);
    border-radius: 6px;
}

/* === Inventory grid === */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.inventory-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.1s ease, border-color 0.1s ease;
    display: block;
}
.inventory-card:active { transform: scale(0.99); }
.inventory-card:hover { border-color: var(--brand-light); }

.inv-status-pending { opacity: 0.7; }
.inv-status-sold { opacity: 0.5; }
.inv-status-removed { opacity: 0.4; }

.inv-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--bg);
    overflow: hidden;
}
.inv-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.inv-card-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3730A3;
    font-weight: 600;
    font-size: 36px;
    background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
}

.inv-card-body { padding: 10px 12px; }
.inv-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}
.inv-card-trim {
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 4px;
}
.inv-card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    /* Tabular figures so mileage / mpg columns line up across cards
       without forcing the whole line into monospace (labels like 'mi'
       and rooftop names read better in the body sans). */
    font-variant-numeric: tabular-nums;
}
.inv-card-stock {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-faint);
}
.inv-card-price {
    margin-left: auto;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-variant-numeric: tabular-nums;
}

/* === Inventory filters === */
.inventory-filters .filter-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.inventory-filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.inventory-filters select {
    font-size: 14px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    min-width: 120px;
    text-transform: none;
    letter-spacing: 0;
}

/* === Inventory detail photo strip === */
.inventory-photo-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.photo-strip-item {
    flex: 0 0 auto;
    width: 200px;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
    position: relative;
}
.photo-strip-item img,
.photo-strip-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-primary {
    border: 2px solid var(--success);
}
.photo-primary-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 10px;
    background: var(--success);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.photo-strip-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
}
.photo-strip-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.photo-strip-btn:hover { background: rgba(0, 0, 0, 0.85); }
.photo-strip-btn-danger:hover { background: var(--danger, #DC2626); }
.empty-media-stub {
    padding: 16px;
    text-align: center;
    color: var(--text-faint);
    font-size: 13px;
    background: var(--bg);
    border-radius: 6px;
    border: 1px dashed var(--border);
}

.status-warn { background: var(--warm-bg); color: var(--warm); }
.status-removed { background: var(--cold-bg); color: var(--cold); }

/* === Posts === */
.post-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.post-history-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    color: var(--text);
}
.post-history-item:hover { background: #E5E7EB; }
.post-history-angle {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    color: var(--brand-light);
    min-width: 70px;
}

/* === Angle picker on the new-post form === */
.angle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.angle-option {
    cursor: pointer;
    display: block;
}
.angle-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.angle-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--surface);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.angle-option:hover .angle-card {
    border-color: var(--brand-light);
}
.angle-option input[type="radio"]:checked + .angle-card {
    border-color: var(--success);
    border-width: 2px;
    background: #F0FDF4;
    padding: 9px 11px;  /* compensate for 2px border */
}
.angle-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.angle-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.stat {
    background: var(--surface);
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    border: 1px solid var(--border);
}
.stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    /* Monospace for any score or count per BRANDING.md. */
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-variant-numeric: tabular-nums;
}
.stat-hot { color: var(--hot); }

/* Page title */
.page-title {
    font-size: 20px;
    font-weight: 600;
    margin: 16px 0 12px;
}

/* Draft list */
.draft-list { display: flex; flex-direction: column; gap: 10px; }
.draft-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--cold);
    border-radius: 10px;
    padding: 14px;
    text-decoration: none;
    color: var(--text);
    display: block;
    transition: transform 0.1s ease, border-color 0.1s ease;
}
.draft-card:active {
    transform: scale(0.99);
    border-color: var(--brand-light);
}
.draft-score-hot { border-left-color: var(--hot); }
.draft-score-warm { border-left-color: var(--warm); }

.draft-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.draft-name { font-weight: 600; font-size: 16px; }
.draft-anon { font-weight: 400; color: var(--text-muted); font-family: monospace; font-size: 14px; }

.draft-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.channel-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: #E0E7FF;
    color: #3730A3;
    letter-spacing: 0.5px;
}
.channel-facebook { background: #DBEAFE; color: #1E40AF; }
.channel-instagram { background: #FCE7F3; color: #9D174D; }
.channel-sms { background: #D1FAE5; color: #065F46; }
.vehicle-tag {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 4px;
}
.draft-incoming {
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
    line-height: 1.4;
}

/* Score pills */
.score-pill {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}
.score-hot { background: var(--hot-bg); color: var(--hot); }
.score-warm { background: var(--warm-bg); color: var(--warm); }
.score-cold { background: var(--cold-bg); color: var(--cold); }

/* DaxScore + LeadScore — per BRANDING.md: DaxScore is the largest text
   on a card; monospace for the number itself. */
.draft-scores {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    min-width: 44px;
}
.score-block .score-number {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.score-block .score-caption {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}
.dax-score-block .score-number {
    /* Largest text on the card, per the brand visual direction. */
    font-size: 34px;
    color: var(--text);
}
.lead-score-block .score-number {
    font-size: 22px;
}
.lead-score-block .score-number.score-hot { color: var(--hot); background: none; padding: 0; }
.lead-score-block .score-number.score-warm { color: var(--warm); background: none; padding: 0; }
.lead-score-block .score-number.score-cold { color: var(--cold); background: none; padding: 0; }

/* Match-card DaxScore — same idea, sits in the picker on draft detail. */
.match-card { position: relative; }
.match-dax {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding-right: 4px;
    line-height: 1;
}
.match-dax .score-number {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 28px;
    color: var(--text);
}
.match-dax .score-caption {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--surface);
    border-radius: 10px;
    border: 1px solid var(--border);
}
.empty-icon { font-size: 48px; margin: 0; }
.empty-text { font-size: 16px; font-weight: 500; margin: 8px 0 4px; }
.empty-sub { font-size: 13px; color: var(--text-muted); margin: 0; }

/* Detail page */
.back-link {
    color: var(--brand-light);
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 12px;
}

.lead-header { margin-bottom: 16px; }
.lead-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.lead-name {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}
.lead-name .anon { font-weight: 400; color: var(--text-muted); font-family: monospace; font-size: 16px; }

.lead-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 13px;
}
.status-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.status-hot { background: var(--hot-bg); color: var(--hot); }
.status-warm { background: var(--warm-bg); color: var(--warm); }
.status-cold { background: var(--cold-bg); color: var(--cold); }
.status-new { background: #DBEAFE; color: #1E40AF; }
.status-customer { background: #DCFCE7; color: var(--success); }
.contact-meta { color: var(--text-muted); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}
.card-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.card-meta { font-size: 12px; color: var(--text-faint); margin-top: 6px; }

.incoming-body {
    font-size: 15px;
    color: var(--text);
    font-style: italic;
    line-height: 1.5;
}

.vehicle-card { border-left: 4px solid var(--brand-light); }
.vehicle-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.vehicle-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.vehicle-features { font-size: 13px; color: var(--text); background: var(--bg); padding: 8px; border-radius: 6px; margin-top: 6px; }
.vehicle-link { display: inline-block; margin-top: 8px; color: var(--brand-light); text-decoration: none; font-size: 13px; font-weight: 500; }

.reasoning { font-size: 14px; color: var(--text); line-height: 1.5; }

/* Draft textarea */
.draft-card-detail { border-left: 4px solid var(--success); }
.draft-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    min-height: 110px;
    color: var(--text);
}
.draft-textarea:focus {
    outline: none;
    border-color: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(46, 116, 181, 0.15);
}
.char-count {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 4px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Action bar */
.action-bar {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-top: 16px;
    position: sticky;
    bottom: 0;
    background: var(--bg);
    padding: 12px 0;
}
.action-bar form { display: flex; }
.btn {
    flex: 1;
    border: none;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.1s ease;
}
.btn:active { opacity: 0.8; }
/* Primary CTA = burnt-orange accent per BRANDING.md "do this now" guidance.
   We previously used --success (green) but green is now reserved for
   already-sent / completed state, not "take this action." */
.btn-primary { background: var(--accent); color: white; width: 100%; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--brand); color: white; }
.btn-text { background: transparent; color: var(--text-muted); padding: 14px 12px; }

.page-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-faint);
}

/* Small screens — make the score pill more prominent */
@media (max-width: 380px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-value { font-size: 20px; }
}
