/* Visa Copilot — Dutch Tulip theme
   Travel-brochure colors nodding to the Netherlands: tulip red, Delft blue,
   Dutch orange, bulb-field green. More colorful than the prior warm editorial,
   but still calm (uses color as accent, not wallpaper). */

:root {
    /* Cooler, lighter paper for a more vivid accent contrast */
    --bg:            #FBF9F4;   /* soft cream — a touch cooler than before */
    --bg-soft:       #F0EBE0;   /* shaded */
    --surface:       #FFFFFF;   /* card surface */
    --ink:           #111827;   /* deep ink */
    --ink-soft:      #4B5563;   /* slate */
    --ink-quiet:     #9CA3AF;   /* fade for meta */

    --line:          #E5E0D3;   /* soft tan border */
    --line-quiet:    #EFEADD;

    /* Accents — Dutch Tulip palette
       --forest (name kept for backward-compat): now Delft blue — structure,
         trust, paywall. Replaces the dark green everywhere.
       --rust (name kept): now Dutch orange — primary CTA, drag-active,
         step-active arrow.
       --tulip: new — vivid tulip red. Used sparingly (danger accents,
         marketing flourishes).
       --leaf: new — bulb-field green. Success/done states stay green but
         pop harder than the old muted forest. */
    --forest:        #1E3A8A;   /* Delft blue — trust, structure */
    --forest-tint:   rgba(30, 58, 138, 0.08);
    --forest-soft:   rgba(30, 58, 138, 0.14);
    --rust:          #EA580C;   /* Dutch orange — primary action */
    --rust-tint:     rgba(234, 88, 12, 0.10);
    --tulip:         #DC2626;   /* tulip red */
    --tulip-tint:    rgba(220, 38, 38, 0.08);
    --leaf:          #059669;   /* bulb-field green */
    --leaf-tint:     rgba(5, 150, 105, 0.10);
    --sun:           #F59E0B;   /* marigold — gentle highlights */

    /* States — pulled from the palette so everything stays on-theme */
    --success:       #059669;   /* green */
    --warning:       #F59E0B;   /* amber */
    --danger:        #DC2626;   /* tulip */
    --danger-tint:   rgba(220, 38, 38, 0.08);

    /* Radii */
    --r-xs: 6px;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 22px;

    /* Shadows - subtle, warm */
    --shadow-sm: 0 1px 0 rgba(26, 22, 18, 0.04), 0 1px 2px rgba(26, 22, 18, 0.03);
    --shadow-md: 0 2px 6px rgba(26, 22, 18, 0.05), 0 8px 24px rgba(26, 22, 18, 0.05);

    /* Type */
    --serif:  'Fraunces', 'Georgia', serif;
    --sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono:   'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.55;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "ss01", "kern";
    /* Subtle travel-inspired background: dot grid like a passport + warm gradient */
    background-image:
        radial-gradient(ellipse at top right, rgba(198, 107, 61, 0.08), transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(44, 95, 45, 0.06), transparent 55%),
        radial-gradient(circle at 2px 2px, rgba(26, 22, 18, 0.035) 1px, transparent 1px);
    background-size: auto, auto, 28px 28px;
    background-attachment: fixed;
}

::selection {
    background: var(--forest);
    color: var(--bg);
}

/* ===== Nav ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 32px;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--line-quiet);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}

.brand__mark {
    width: 30px;
    height: 30px;
    background: var(--ink);
    color: var(--bg);
    font-family: var(--serif);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.03em;
    border-radius: 6px;
    display: grid;
    place-items: center;
}

.brand__name {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 500;
    font-style: italic;
    letter-spacing: -0.01em;
}

.nav__links {
    display: flex;
    gap: 4px;
}

.nav__link {
    padding: 8px 14px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}
.nav__link:hover {
    background: var(--bg-soft);
    color: var(--ink);
}
.nav__link--quiet {
    color: var(--forest);
    border: 1px solid var(--forest-tint);
}
.nav__link--quiet:hover {
    background: var(--forest-tint);
}

@media (max-width: 640px) {
    .nav { padding: 14px 20px; }
    .nav__links { gap: 0; }
    .nav__link { padding: 6px 10px; font-size: 13px; }
}

/* ===== Hero ===== */
.hero {
    padding: clamp(48px, 9vw, 120px) 32px clamp(40px, 6vw, 80px);
}

.hero__inner {
    max-width: 1080px;
    margin: 0 auto;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    padding: 6px 14px;
    background: var(--forest-tint);
    color: var(--forest);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.hero__eyebrow::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--forest);
    animation: pulse 2.4s ease-in-out infinite;
    flex-shrink: 0;
}
.hero__eyebrow-icon {
    display: inline-grid;
    place-items: center;
    color: var(--forest);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(40px, 7.5vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.025em;
    margin: 0 0 28px;
    max-width: 18ch;
}

.hero__title em {
    font-style: italic;
    color: var(--rust);
    font-weight: 400;
}

.hero__sub {
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 56ch;
    margin: 0 0 40px;
}

/* ===== Drop zone, editorial version ===== */
.drop {
    position: relative;
    max-width: 720px;
    margin: 0 0 20px;
}

.drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.drop__label {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 28px 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.drop__label::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: var(--r-md);
    border: 2px dashed var(--forest);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.drop__label:hover,
.drop--dragging .drop__label {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--forest);
}
.drop--dragging .drop__label::after {
    opacity: 1;
}

.drop__icon {
    width: 52px; height: 52px;
    background: var(--forest-tint);
    color: var(--forest);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 400;
    flex-shrink: 0;
}

.drop__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.drop__text strong {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 18px;
    letter-spacing: -0.005em;
}
.drop__text span {
    color: var(--ink-quiet);
    font-size: 13px;
}

@media (max-width: 640px) {
    .drop__label { flex-direction: column; padding: 28px 20px; text-align: center; gap: 14px; }
}

.hero__meta {
    font-size: 14px;
    color: var(--ink-quiet);
    margin: 0;
}
.hero__meta strong {
    color: var(--ink);
    font-weight: 600;
}

/* ===== Chat stream ===== */
.stream-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 32px 80px;
}

.thinking {
    display: none;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    margin: 20px 0;
    background: var(--bg-soft);
    border-radius: var(--r-md);
    color: var(--ink-soft);
    font-size: 15px;
    font-family: var(--serif);
    font-style: italic;
}
.thinking.htmx-request { display: flex; }

.thinking__dots {
    display: inline-flex;
    gap: 5px;
}
.thinking__dots i {
    width: 6px; height: 6px;
    background: var(--forest);
    border-radius: 50%;
    animation: dots 1.2s ease-in-out infinite;
}
.thinking__dots i:nth-child(2) { animation-delay: 0.15s; }
.thinking__dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dots {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

.stream {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== Extraction card, editorial ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line-quiet);
    background: var(--bg-soft);
}

/* Extraction-card status stripe on top border */
.extraction-card { border-top: 3px solid var(--forest); transition: opacity 0.3s; }
.extraction-card--warning { border-top-color: var(--warning); }
.extraction-card--error { border-top-color: var(--danger); }
.extraction-card--confirmed { opacity: 0.7; pointer-events: none; }
.extraction-card--confirmed .card__confirm-btn::after { content: " ✓"; }

.card__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 500;
    font-style: italic;
    letter-spacing: -0.005em;
}

.chip {
    font-family: var(--sans);
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--forest-tint);
    color: var(--forest);
    padding: 4px 10px;
    border-radius: 999px;
}

.card__file {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-quiet);
    word-break: break-all;
}

.card__body { padding: 22px; }

.card__intro {
    font-family: var(--serif);
    font-size: 16px;
    font-style: italic;
    color: var(--ink-soft);
    margin: 0 0 22px;
    line-height: 1.55;
}

.fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 24px;
}
@media (min-width: 640px) {
    .fields { grid-template-columns: 1fr 1fr; }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-quiet);
}

.field__input {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    font-family: var(--sans);
    font-size: 15px;
    color: var(--ink);
    background: var(--bg);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.field__input:hover { border-color: var(--ink-quiet); }
.field__input:focus {
    outline: none;
    border-color: var(--forest);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--forest-tint);
}
.field__input--edited {
    background: var(--rust-tint);
    border-color: var(--rust);
}

.field--wide {
    grid-column: 1 / -1;
}

.field__input--textarea {
    min-height: 72px;
    max-height: 320px;
    resize: vertical;
    line-height: 1.5;
    padding: 12px 14px;
    font-family: var(--sans);
    font-size: 15px;
    overflow-y: auto;
}

/* Validation */
.check-list {
    background: var(--bg);
    border: 1px solid var(--line-quiet);
    border-radius: var(--r-sm);
    padding: 16px 18px;
    margin-bottom: 24px;
}

.check-list__title {
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 500;
    font-style: italic;
    color: var(--ink-soft);
    margin: 0 0 10px;
}

.check-list__items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.check-list__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--ink);
}

.check-list__icon {
    width: 18px; height: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}
.check-list__item--pass {
    color: var(--ink);
}
.check-list__item--pass .check-list__icon {
    background: var(--forest);
    color: white;
    box-shadow: 0 0 0 3px var(--forest-tint);
}
.check-list__item--warn {
    color: var(--ink);
}
.check-list__item--warn .check-list__icon {
    background: var(--warning);
    color: white;
    box-shadow: 0 0 0 3px rgba(198, 107, 61, 0.14);
}
.check-list__item--fail {
    color: var(--ink);
}
.check-list__item--fail .check-list__icon {
    background: var(--danger);
    color: white;
    box-shadow: 0 0 0 3px var(--danger-tint);
}
/* Recap line status pip */
.recap-line__check {
    color: var(--forest);
    font-weight: 700;
    font-size: 13px;
    padding: 2px 6px;
    background: var(--forest-tint);
    border-radius: 4px;
}

.issues {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line-quiet);
    font-size: 14px;
    color: var(--danger);
}
.issues ul { margin: 6px 0 0; padding-left: 22px; }
.issues li { margin-bottom: 2px; }

/* Review footer */
.card__foot {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--line-quiet);
}
@media (min-width: 640px) {
    .card__foot { flex-direction: row; align-items: center; justify-content: space-between; }
}

.acknowledge {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
    line-height: 1.45;
}
.acknowledge input[type="checkbox"] {
    margin-top: 2px;
    width: 16px; height: 16px;
    accent-color: var(--forest);
    cursor: pointer;
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--sans);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn--primary {
    background: var(--ink);
    color: var(--bg);
}
.btn--primary:hover:not(:disabled) {
    background: var(--forest);
    box-shadow: 0 2px 12px var(--forest-soft);
}
.btn--primary:disabled {
    background: var(--line);
    color: var(--ink-quiet);
    cursor: not-allowed;
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn--ghost:hover { background: var(--bg-soft); border-color: var(--ink-quiet); }

/* Error card */
.error-card {
    background: var(--danger-tint);
    border: 1px solid color-mix(in srgb, var(--danger) 20%, transparent);
    border-radius: var(--r-md);
    padding: 18px 22px;
    animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.error-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.error-card__icon {
    width: 22px; height: 22px;
    background: var(--danger);
    color: var(--bg);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
}
.error-card__title {
    font-family: var(--serif);
    font-weight: 500;
    font-style: italic;
    color: var(--danger);
    font-size: 15px;
}
.error-card__body {
    margin: 0;
    padding-left: 32px;
    color: var(--ink);
    font-size: 14px;
}

/* ===== Sections below fold ===== */
.section {
    padding: clamp(56px, 8vw, 96px) 32px;
}
.section--alt { background: var(--bg-soft); }
.section__inner {
    max-width: 1080px;
    margin: 0 auto;
}
.section__eyebrow {
    font-family: var(--serif);
    font-style: italic;
    color: var(--rust);
    font-size: 14px;
    margin: 0 0 14px;
    letter-spacing: 0.01em;
}
.section__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    max-width: 22ch;
}
.section__sub {
    font-size: 17px;
    color: var(--ink-soft);
    max-width: 60ch;
    margin: 0 0 40px;
}

/* Checks grid */
.checks {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
@media (min-width: 640px) { .checks { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .checks { grid-template-columns: repeat(3, 1fr); } }

.check-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.check-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.check-item__num {
    font-family: var(--serif);
    font-style: italic;
    font-size: 14px;
    color: var(--rust);
    margin-bottom: 8px;
}
.check-item__text {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.4;
    color: var(--ink);
    margin: 0;
}

/* How it works - editorial steps */
.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 44px;
}
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

.step {
    position: relative;
}
.step__n {
    font-family: var(--serif);
    font-weight: 400;
    font-style: italic;
    font-size: 48px;
    line-height: 1;
    color: var(--rust);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}
.step__h {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
}
.step__p {
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* Pricing */
.prices {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 780px;
    margin: 0 auto;
}
@media (min-width: 720px) { .prices { grid-template-columns: 1fr 1fr; } }

.price {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.price__tag {
    font-family: var(--serif);
    font-style: italic;
    font-size: 13px;
    color: var(--rust);
    letter-spacing: 0.02em;
}
.price__name {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin: 0;
}
.price__amount {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.price__amount-big {
    font-family: var(--serif);
    font-size: 44px;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.price__amount-small {
    font-size: 14px;
    color: var(--ink-quiet);
    text-decoration: line-through;
}
.price__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
    font-size: 14px;
    color: var(--ink-soft);
    border-top: 1px solid var(--line-quiet);
    padding-top: 18px;
}
.price__list li::before { content: "·  "; color: var(--forest); font-weight: 700; }

/* Footer */
.footer {
    padding: 48px 32px 40px;
    border-top: 1px solid var(--line-quiet);
    background: var(--bg);
}
.footer__inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.footer__tagline {
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-soft);
    font-size: 14px;
    max-width: 68ch;
    margin: 0;
    line-height: 1.55;
}
.footer__links {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--ink-quiet);
}
.footer__links a { color: inherit; text-decoration: none; }
.footer__links a:hover { color: var(--ink); }

/* ===== Focused conversation-document layout ===== */
.doc {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 24px 80px;
    min-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
}

/* Two-column layout with stepper sidebar */
.doc--layout {
    max-width: 1080px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 56px;
    align-items: start;
}

@media (max-width: 820px) {
    .doc--layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.doc__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ===== Left stepper ===== */
.stepper {
    position: sticky;
    top: 24px;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stepper__title {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 500;
    font-style: italic;
    color: var(--ink-soft);
    margin: 0 0 12px;
    letter-spacing: 0.01em;
}

/* ===== Applicants switcher ===== */
.applicants {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-quiet);
}
.applicant-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 5px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    color: var(--ink-soft);
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.applicant-pill:hover {
    border-color: var(--forest);
    color: var(--ink);
    transform: translateY(-1px);
}
.applicant-pill--active {
    border-color: var(--forest);
    background: var(--forest-tint);
    color: var(--ink);
    font-weight: 600;
}
.applicant-pill--add {
    border-style: dashed;
    color: var(--ink-quiet);
}
.applicant-pill--add:hover {
    border-style: solid;
    color: var(--rust);
    border-color: var(--rust);
}
.applicant-pill__avatar {
    width: 22px;
    height: 22px;
    background: var(--forest-tint);
    color: var(--forest);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--serif);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.applicant-pill--active .applicant-pill__avatar {
    background: var(--forest);
    color: white;
}
.applicant-pill--add .applicant-pill__avatar {
    background: transparent;
    color: var(--ink-quiet);
    border: 1px dashed var(--line);
}
.applicant-pill__name {
    font-size: 13px;
    white-space: nowrap;
    max-width: 12ch;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stepper__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 1.5px solid var(--line-quiet);
}

.step {
    position: relative;
    padding: 8px 12px 8px 18px;
    margin-left: -1.5px;
    border-left: 1.5px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 1px;
    cursor: default;
    transition: background 0.18s, border-color 0.25s, color 0.25s, transform 0.18s;
    border-radius: 0 6px 6px 0;
}
.step--done { cursor: pointer; color: var(--ink); }
.step--done:hover {
    background: var(--forest-tint);
    transform: translateX(2px);
}
.step--active {
    border-left-color: var(--rust);
    background: linear-gradient(90deg, rgba(198, 107, 61, 0.08), transparent 60%);
}
.step--done { border-left-color: var(--leaf); }

.step__label {
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1.25;
}
.step--active .step__label { color: var(--ink); font-weight: 600; }
.step--done .step__label { color: var(--ink-soft); }
.step__label::before {
    content: "•";
    color: var(--line);
    font-size: 11px;
    line-height: 1;
}
.step--active .step__label::before {
    content: "→";
    color: var(--rust);
    font-weight: 700;
    font-size: 13px;
    animation: step-arrow 1.4s ease-in-out infinite;
}
.step--done .step__label::before {
    content: "✓";
    color: var(--leaf);
    font-weight: 700;
    font-size: 12px;
    animation: check-land 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.step__value {
    font-family: var(--sans, -apple-system, system-ui);
    font-size: 12px;
    color: var(--ink-quiet);
    margin-left: 16px;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.step--done .step__value { color: var(--ink); font-weight: 500; }

@keyframes step-arrow {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(2px); }
}

/* ===== Batch queue panel (dump mode) ===== */
.queue-panel {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid var(--line-quiet);
}
.queue-row {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid var(--line-quiet);
    font-size: 14px;
    color: var(--ink);
    transition: background 0.2s, color 0.2s;
}
.queue-row__dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--line);
    justify-self: center;
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}
.queue-row__filename {
    font-family: var(--sans, -apple-system, system-ui);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.queue-row__status {
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-quiet);
    font-size: 13px;
}
.queue-row[data-status="queued"] { color: var(--ink-quiet); }
.queue-row[data-status="analyzing"] .queue-row__dot {
    background: var(--rust);
    animation: dot-pulse-rust 1.2s ease-in-out infinite;
}
.queue-row[data-status="analyzing"] .queue-row__status {
    color: var(--rust);
    font-style: italic;
}
.queue-row[data-status="done"] .queue-row__dot {
    background: var(--leaf);
    animation: dot-bump 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.queue-row[data-status="done"] .queue-row__status {
    color: var(--leaf);
    font-weight: 500;
    font-style: normal;
}
.queue-row[data-status="failed"] .queue-row__dot {
    background: var(--danger, #c0392b);
}
.queue-row[data-status="failed"] .queue-row__status {
    color: var(--danger, #c0392b);
}

@keyframes dot-pulse-rust {
    0%, 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.55); transform: scale(1); }
    50%      { box-shadow: 0 0 0 6px rgba(234, 88, 12, 0); transform: scale(1.15); }
}

/* ===== Host form (F4) ===== */
.host-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 22px 20px;
}
.host-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.host-field__label {
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-soft);
    font-size: 13px;
}
.host-field__input {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg);
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.host-field__input:focus {
    outline: none;
    border-color: var(--forest);
    box-shadow: 0 0 0 3px var(--forest-tint);
}
.host-form__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
    align-items: center;
}
.host-form__submit {
    padding: 10px 18px;
}

/* ===== Paywall ===== */
.paywall {
    background: linear-gradient(135deg, var(--bg-soft), rgba(44, 95, 45, 0.04));
    border: 1.5px solid var(--forest);
    border-radius: var(--r-md);
    padding: 28px 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}
.paywall__badge {
    font-family: var(--serif);
    font-style: italic;
    color: var(--rust);
    font-size: 14px;
    letter-spacing: 0.02em;
}
.paywall__price {
    font-family: var(--serif);
    font-size: clamp(44px, 6vw, 56px);
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1;
}
.paywall__blurb {
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 52ch;
    margin: 0;
}
.paywall__pay {
    margin-top: 6px;
    padding: 14px 24px;
    font-size: 15px;
}
.paywall__terms {
    font-size: 12px;
    color: var(--ink-quiet);
    font-style: italic;
    margin: 0;
}

/* ===== Block-choice panel (cross-validation FAIL escape) ===== */
.block-choice {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.block-choice__msg {
    background: rgba(198, 107, 61, 0.08);
    border-left: 3px solid var(--rust);
    padding: 12px 16px;
    border-radius: 4px;
    color: var(--ink);
    font-style: normal;
    font-family: var(--sans, -apple-system, system-ui);
    font-size: 14px;
    line-height: 1.5;
}
.block-choice .btn--secondary {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink-soft);
}
.block-choice .btn--secondary:hover {
    border-color: var(--ink-quiet);
    color: var(--ink);
    background: var(--bg-soft);
}

/* ===== Locked navigation (during batch processing) ===== */
.doc--locked .stepper .step--done {
    cursor: wait !important;
    opacity: 0.5;
    pointer-events: none;
}
.doc--locked .recap-line {
    pointer-events: none;
    opacity: 0.6;
}
.doc--locked::before {
    content: "";
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}

.doc__progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 48px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line-quiet);
}

.dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.doc__progress .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--line);
    transition: background 0.3s, transform 0.3s, opacity 0.3s, box-shadow 0.2s;
    cursor: default;
    border: none;
    padding: 0;
    position: relative;
}
.doc__progress .dot[role="button"] { cursor: pointer; }
.doc__progress .dot:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--forest-tint);
}
.doc__progress .dot--active {
    background: var(--rust);
    transform: scale(1.35);
    animation: dot-pulse 2s ease-in-out infinite;
    cursor: default;
}
.doc__progress .dot--done {
    background: var(--leaf);
    opacity: 0.7;
    animation: dot-bump 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.doc__progress .dot--done:hover {
    opacity: 0.9;
    transform: scale(1.2);
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(234, 88, 12, 0); }
}

@keyframes dot-bump {
    0%   { transform: scale(1.45); }
    60%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.doc__phase {
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-soft);
    font-size: 14px;
    letter-spacing: 0.01em;
}

.doc__recap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 32px;
}

.recap-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--ink-quiet);
    animation: fadeIn 0.4s ease-out;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}
.recap-line:hover {
    background: var(--forest-tint);
    color: var(--ink);
}
.recap-line:hover .recap-line__label::after {
    content: " ← click to edit";
    color: var(--rust);
    font-style: italic;
    font-size: 11px;
}
.recap-line__label {
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-soft);
    min-width: 80px;
}
.recap-line__value {
    color: var(--ink);
    font-weight: 500;
}
.recap-line__check {
    color: var(--leaf);
    font-weight: 700;
    animation: check-land 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.18s backwards;
    display: inline-block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes check-land {
    0%   { opacity: 0; transform: scale(0.3) rotate(-15deg); }
    70%  { opacity: 1; transform: scale(1.25) rotate(0deg); }
    100% { opacity: 1; transform: scale(1); }
}

.doc__stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 260px;
}

.stage-intro {
    font-family: var(--serif);
    font-size: 16px;
    font-style: italic;
    color: var(--ink-soft);
    line-height: 1.55;
    margin: 0;
    animation: stage-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.stage-question {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(26px, 3.6vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0;
    animation: stage-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

@keyframes stage-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.stage-widget {
    animation: stage-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.typing-line {
    color: var(--ink-quiet);
    font-size: 15px;
}

.typing-line .typing {
    display: inline-flex;
    gap: 4px;
    vertical-align: middle;
}
.typing-line .typing i {
    width: 6px; height: 6px;
    background: var(--forest);
    border-radius: 50%;
    animation: dots 1.2s ease-in-out infinite;
}
.typing-line .typing i:nth-child(2) { animation-delay: 0.15s; }
.typing-line .typing i:nth-child(3) { animation-delay: 0.3s; }

.doc__escape {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px dashed var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.doc__escape-or {
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-quiet);
    font-size: 13px;
}
.doc__escape-btn {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 20px;
    color: var(--ink-soft);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.doc__escape-btn:hover {
    border-color: var(--forest);
    color: var(--forest);
    background: var(--forest-tint);
}

/* Card-ish active widget for the stage */
.doc .widget {
    margin-top: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}
.doc .widget__row {
    background: transparent;
    border: none;
    padding: 0;
}
.doc .widget__row:focus-within {
    box-shadow: none;
}
.doc .widget__input {
    font-size: 17px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
}
.doc .widget__submit {
    padding: 12px 22px;
    font-size: 14px;
}
.doc .widget__choices {
    gap: 10px;
}
.doc .widget__choice {
    padding: 14px 22px;
    font-size: 15px;
}
.doc .widget__drop {
    padding: 32px 28px;
}

@media (max-width: 640px) {
    .doc { padding: 24px 20px 60px; }
    .doc__progress { margin-bottom: 32px; padding-bottom: 16px; }
    .stage-question { font-size: 24px; }
    .doc .widget__row { flex-direction: column; }
    .doc .widget__submit { width: 100%; }
}

/* ===== App shell (new) ===== */
.nav--minimal {
    padding: 14px 24px;
    border-bottom: 1px solid var(--line-quiet);
}
.brand__mark {
    background: var(--forest);
    color: var(--bg);
    font-family: var(--serif);
    font-style: italic;
    width: 28px; height: 28px;
    font-size: 14px;
}
.brand__sub {
    color: var(--ink-quiet);
    font-size: 13px;
    margin-left: 4px;
    font-style: normal;
    font-family: var(--sans);
    font-weight: 400;
}
.help-btn {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    background: transparent;
    color: #25d366;
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.help-btn:hover {
    background: rgba(37, 211, 102, 0.1);
    border-color: #25d366;
}

.app {
    max-width: 780px;
    margin: 0 auto;
    min-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    padding: 16px 24px 120px;
    position: relative;
}

.app__top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.app__progress {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--forest-tint);
    color: var(--forest);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
}
.app__progress-dot {
    width: 6px; height: 6px;
    background: var(--forest);
    border-radius: 50%;
    animation: pulse 2.4s ease-in-out infinite;
}

.app__stream {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 280px;
    padding-bottom: 24px;
}

.app__bar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 720px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 8px 8px 8px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 4px 24px rgba(26, 22, 18, 0.08), 0 1px 3px rgba(26, 22, 18, 0.04);
    z-index: 15;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.app__bar:focus-within {
    border-color: var(--forest);
    box-shadow: 0 4px 24px rgba(44, 95, 45, 0.12), 0 0 0 3px var(--forest-tint);
}

/* ===== Chat page layout (legacy, kept for partials) ===== */
.chat-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 56px 24px 140px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Decorative dashed arc under the welcome - travel vibe (subtle) */
.chat-welcome {
    margin-bottom: 36px;
    animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.chat-welcome::after {
    content: "";
    position: absolute;
    left: -20px; right: -20px;
    bottom: -18px;
    height: 1px;
    background-image: linear-gradient(to right,
        transparent 0%,
        var(--rust) 20%,
        var(--rust) 30%,
        transparent 35%,
        var(--forest) 55%,
        var(--forest) 65%,
        transparent 80%);
    opacity: 0.35;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.chat-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 14px 0 12px;
}
.chat-title em {
    font-style: italic;
    color: var(--rust);
}

.chat-sub {
    font-size: 16px;
    color: var(--ink-soft);
    max-width: 58ch;
    line-height: 1.55;
    margin: 0;
}

.chat-thread {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 120px;
    min-height: 200px;
}

/* Messages */
.msg {
    display: flex;
    animation: rise 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.msg--user { justify-content: flex-end; }
.msg--assistant { justify-content: flex-start; }

.msg__body {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 18px;
    line-height: 1.55;
}
.msg--user .msg__body {
    background: var(--ink);
    color: var(--bg);
    border-bottom-right-radius: 6px;
}
.msg--assistant .msg__body {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-bottom-left-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.msg__text {
    margin: 0;
    font-size: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.msg__attach {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 12px;
    background: color-mix(in srgb, var(--bg) 20%, transparent);
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
}
.msg--user .msg__attach {
    background: rgba(255, 255, 255, 0.12);
    color: var(--bg);
}

.msg__card {
    margin-top: 14px;
    max-width: 100%;
}

.typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
}
.typing i {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ink-quiet);
    animation: dots 1.2s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

/* Chat input bar - fixed at bottom, centered */
.chat-bar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 720px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 8px 8px 8px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 4px 24px rgba(26, 22, 18, 0.08), 0 1px 3px rgba(26, 22, 18, 0.04);
    z-index: 15;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.chat-bar:focus-within {
    border-color: var(--forest);
    box-shadow: 0 4px 24px rgba(44, 95, 45, 0.14), 0 0 0 3px var(--forest-tint);
}

.file-btn {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    background: transparent;
    color: var(--ink-soft);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.file-btn:hover { background: var(--bg-soft); color: var(--ink); }
.file-btn--attached {
    background: var(--forest-tint);
    color: var(--forest);
}

.chat-input {
    flex: 1;
    min-height: 38px;
    max-height: 180px;
    padding: 9px 6px;
    border: none;
    background: transparent;
    resize: none;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.4;
    color: var(--ink);
    outline: none;
}
.chat-input::placeholder { color: var(--ink-quiet); }

.send-btn {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    background: var(--ink);
    color: var(--bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s, opacity 0.15s;
}
.send-btn:hover:not(:disabled) { background: var(--forest); }
.send-btn:active:not(:disabled) { transform: scale(0.94); }
.send-btn:disabled { opacity: 0.35; cursor: not-allowed; }

@media (max-width: 640px) {
    .chat-bar { width: calc(100% - 24px); bottom: 12px; }
    .chat-page { padding: 24px 16px 140px; }
    .chat-thread { max-height: calc(100vh - 340px); }
    .msg__body { max-width: 90%; }
}

/* ===== Entry choice (TurboTax-style two cards) ===== */
.entry-choices {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 640px) { .entry-choices { grid-template-columns: 1fr 1fr; } }

.entry-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.entry-card:hover,
.entry-card:focus {
    border-color: var(--forest);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: color-mix(in srgb, var(--forest) 3%, var(--surface));
    outline: none;
}
.entry-card__icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 4px;
}
.entry-card__title {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.2;
}
.entry-card__desc {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.45;
}

/* ===== Multi-upload (dump mode) ===== */
.widget__drop--multi .widget__drop-icon {
    font-size: 24px;
}
.multi-upload__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
}
.mu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: var(--bg-soft);
    border-radius: var(--r-xs);
    font-size: 14px;
    font-family: var(--mono);
}
.mu-rm {
    background: transparent;
    border: none;
    color: var(--ink-quiet);
    cursor: pointer;
    font-size: 18px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    transition: background 0.15s;
}
.mu-rm:hover { background: var(--danger-tint); color: var(--danger); }
.multi-upload__actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}
.multi-upload__go {
    padding: 10px 22px;
}

/* ===== Readiness screen (M5) ===== */
.readiness {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.readiness__score {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    border-radius: var(--r-md);
    background: var(--bg);
    border: 1px solid var(--line);
    gap: 4px;
}
.readiness__score-n {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 56px;
    letter-spacing: -0.025em;
    line-height: 1;
}
.readiness__score-l {
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-quiet);
    font-size: 15px;
}
.rd-score--pass { border-color: var(--leaf); background: var(--leaf-tint); }
.rd-score--pass .readiness__score-n { color: var(--leaf); }
.rd-score--warn { border-color: var(--warning); background: rgba(198, 107, 61, 0.08); }
.rd-score--warn .readiness__score-n { color: var(--warning); }
.rd-score--fail { border-color: var(--danger); background: var(--danger-tint); }
.rd-score--fail .readiness__score-n { color: var(--danger); }

.readiness__counts {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.rd-count {
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
}
.rd-count--pass { color: var(--leaf); border-color: var(--leaf); }
.rd-count--warn { color: var(--warning); border-color: var(--warning); }
.rd-count--fail { color: var(--danger); border-color: var(--danger); }

.readiness__section h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 18px;
    font-style: italic;
    margin: 0 0 14px;
    color: var(--ink);
}

/* Document summary cards */
.rd-docs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 600px) {
    .rd-docs { grid-template-columns: 1fr 1fr; }
}
.rd-doc {
    background: var(--bg);
    border: 1px solid var(--line-quiet);
    border-radius: var(--r-sm);
    padding: 12px 14px;
}
.rd-doc__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.rd-doc__file {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-quiet);
    text-align: right;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rd-doc__fields {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}
.rd-field__k {
    color: var(--ink-quiet);
    font-variant-caps: small-caps;
    letter-spacing: 0.03em;
    font-size: 11px;
    text-transform: uppercase;
    margin-right: 4px;
}
.rd-field__v {
    color: var(--ink);
    font-weight: 500;
}

/* Check items */
.rd-checks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rd-check {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line-quiet);
    background: white;
}
.rd-check__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
}
.rd-check--pass { border-color: color-mix(in srgb, var(--leaf) 30%, transparent); background: color-mix(in srgb, var(--leaf) 5%, white); }
.rd-check--pass .rd-check__icon { background: var(--leaf); }
.rd-check--warn { border-color: color-mix(in srgb, var(--warning) 25%, transparent); background: color-mix(in srgb, var(--warning) 5%, white); }
.rd-check--warn .rd-check__icon { background: var(--warning); }
.rd-check--fail { border-color: color-mix(in srgb, var(--danger) 30%, transparent); background: color-mix(in srgb, var(--danger) 6%, white); }
.rd-check--fail .rd-check__icon { background: var(--danger); }

.rd-check__title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 2px;
    color: var(--ink);
}
.rd-check__msg {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-soft);
}

.readiness__cta {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}
.rd-generate {
    font-size: 15px;
    padding: 14px 28px;
}

/* ===== Inline widgets (guided chat) ===== */
.widget {
    margin-top: 14px;
    animation: rise 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.widget__row {
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 6px 6px 6px 14px;
}
.widget__row:focus-within {
    border-color: var(--forest);
    box-shadow: 0 0 0 3px var(--forest-tint);
}
.widget__row--dates {
    flex-wrap: wrap;
    padding: 12px 14px;
}
.widget__row--dates label {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 11px; color: var(--ink-quiet);
    letter-spacing: 0.04em; text-transform: uppercase;
}

.widget__input {
    flex: 1;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    outline: none;
    padding: 8px 0;
    min-width: 0;
}
.widget__input::placeholder { color: var(--ink-quiet); }

.widget__date {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-xs);
    background: var(--surface);
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    outline: none;
}
.widget__date:focus { border-color: var(--forest); box-shadow: 0 0 0 3px var(--forest-tint); }

.widget__submit {
    padding: 9px 16px;
    background: var(--ink);
    color: var(--bg);
    border: none;
    border-radius: var(--r-xs);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.widget__submit:hover { background: var(--forest); }

.widget__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.widget__choice {
    padding: 12px 18px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.widget__choice:hover {
    border-color: var(--forest);
    background: var(--forest-tint);
    color: var(--forest);
}
.widget__choice:active { transform: scale(0.97); }

.widget__drop {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 20px;
    background: var(--surface);
    border: 1.5px dashed var(--forest);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
}
.widget__drop:hover,
.widget__drop:focus,
.widget__drop--dragging {
    background: var(--forest-tint);
    transform: translateY(-2px);
    outline: none;
    box-shadow: 0 6px 20px -12px rgba(44, 95, 45, 0.35);
}
.widget__drop--dragging {
    border-style: solid;
    border-color: var(--rust);
    transform: translateY(-2px) scale(1.015);
}
.widget__drop:focus {
    box-shadow: 0 0 0 3px var(--forest-tint);
}
.widget__drop:hover .widget__drop-icon {
    transform: rotate(6deg) scale(1.08);
}
.widget__drop .widget__drop-icon {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Skip-or-upload variant */
.widget__skip-row {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}
.widget__skip {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 18px;
    color: var(--ink-soft);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.widget__skip:hover {
    border-color: var(--ink-quiet);
    color: var(--ink);
    background: var(--bg-soft);
}
.widget__drop-icon {
    width: 44px; height: 44px;
    background: var(--forest-tint);
    color: var(--forest);
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-family: var(--serif);
    font-size: 24px;
    flex-shrink: 0;
}
.widget__drop-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.widget__drop-text strong {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 16px;
}
.widget__drop-text span {
    color: var(--ink-quiet);
    font-size: 13px;
}

/* Reveals (JS adds .is-visible) */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}
