@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(fonts/geist-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url(fonts/geist-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: light;
    --paper: #f3f5f4;
    --paper-deep: #e8ecea;
    --surface: #ffffff;
    --ink: #17211e;
    --ink-2: #3c4945;
    --muted: #677470;
    --rule: #dde3e0;
    --rule-strong: #c5ceca;
    --accent: #14514c;
    --accent-hover: #0e3d39;
    --accent-soft: #e1eeeb;
    --accent-line: #9cc4bc;
    --warn: #7c5200;
    --warn-soft: #fff4d4;
    --warn-line: #e2b74f;
    --danger: #a3291f;
    --danger-soft: #fcebe8;
    --radius-s: 6px;
    --radius-m: 10px;
    --radius-l: 16px;
    --shadow-float: 0 1px 2px rgb(23 33 30 / 6%), 0 12px 32px -16px rgb(23 33 30 / 22%);
    --topbar: 60px;
    --actionbar: 68px;
    --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
    font-feature-settings: 'ss01' on;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
code { font-size: 0.92em; background: var(--paper-deep); padding: 1px 5px; border-radius: 4px; }
[hidden] { display: none !important; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Boutons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; padding: 0 16px;
    font: inherit; font-weight: 500; font-size: 14px;
    border: 1px solid transparent; border-radius: 8px;
    background: none; color: var(--ink-2);
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--rule-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--paper-deep); color: var(--ink); }
.btn-quiet { height: 30px; padding: 0 10px; font-size: 13px; color: var(--accent); }
.btn-quiet:hover { background: var(--accent-soft); }
.btn-block { width: 100%; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after {
    content: ''; position: absolute; width: 16px; height: 16px;
    border: 2px solid rgb(255 255 255 / 40%); border-top-color: #fff; border-radius: 50%;
    animation: spin .7s linear infinite;
}

.icon-btn {
    display: inline-grid; place-items: center;
    width: 28px; height: 28px; padding: 0;
    border: 0; border-radius: var(--radius-s);
    background: none; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--paper-deep); color: var(--ink); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Champs */

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); }

input, select, textarea {
    font: inherit; color: var(--ink);
    width: 100%; min-width: 0;
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-s);
    padding: 7px 10px;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
input, select { height: 36px; }
textarea { resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
input.num { text-align: right; font-variant-numeric: tabular-nums; }
input[type='date'] { font-variant-numeric: tabular-nums; }

.is-flagged, .is-flagged:hover {
    background: var(--warn-soft);
    border-color: var(--warn-line);
}
.is-flagged:focus { box-shadow: 0 0 0 3px rgb(226 183 79 / 30%); }
.is-invalid, .is-invalid:hover, .grid td .is-invalid { border-color: var(--danger); background: var(--danger-soft); }

.form-error { color: var(--danger); font-size: 13px; }

/* Porte d'entrée */

.gate { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.gate-panel {
    width: min(420px, 100%);
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l);
    padding: 36px 32px 32px;
    box-shadow: var(--shadow-float);
}
.gate-panel h1 { font-size: 24px; margin-top: 28px; }
.gate-text { color: var(--muted); margin-top: 6px; }
.gate-form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }

/* Barre supérieure */

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; fill: var(--accent); stroke: none; }
.brand-mark path { stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; }
.brand-large { font-size: 17px; }
.brand-large .brand-mark { width: 30px; height: 30px; }

.topbar {
    position: sticky; top: 0; z-index: 20;
    height: var(--topbar);
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    padding: 0 20px;
    background: var(--surface); border-bottom: 1px solid var(--rule);
}
.topbar-actions { display: flex; justify-content: flex-end; gap: 4px; }
.topbar-actions form { margin: 0; }

.steps { display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.steps li + li::before { content: ''; width: 40px; height: 1px; background: var(--rule-strong); margin: 0 12px; }
.step-num {
    display: inline-grid; place-items: center;
    width: 22px; height: 22px; border-radius: 50%;
    border: 1px solid var(--rule-strong);
    font-size: 12px; font-variant-numeric: tabular-nums;
}
body[data-step='1'] .steps li[data-step='1'],
body[data-step='2'] .steps li[data-step='2'],
body[data-step='3'] .steps li[data-step='3'] { color: var(--ink); }
body[data-step='1'] .steps li[data-step='1'] .step-num,
body[data-step='2'] .steps li[data-step='2'] .step-num,
body[data-step='3'] .steps li[data-step='3'] .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
body[data-step='2'] .steps li[data-step='1'] .step-num,
body[data-step='3'] .steps li[data-step='1'] .step-num,
body[data-step='3'] .steps li[data-step='2'] .step-num { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

/* Étape 1 : dépôt */

.view-upload { min-height: calc(100vh - var(--topbar)); display: grid; place-items: start center; padding: 9vh 20px 40px; }
.upload-column { width: min(600px, 100%); }
.upload-column h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.025em; }
.lede { margin-top: 12px; font-size: 16px; color: var(--ink-2); max-width: 52ch; }

.dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    margin-top: 32px; padding: 36px 24px;
    background: var(--surface);
    border: 1.5px dashed var(--rule-strong); border-radius: var(--radius-l);
    cursor: pointer; text-align: center;
    transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: #fbfdfc; }
.dropzone.is-over { background: var(--accent-soft); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone-art { width: 108px; height: 86px; margin-bottom: 10px; }
.art-sheet { fill: var(--paper); stroke: var(--rule-strong); stroke-width: 1.5; }
.art-strong { fill: var(--ink-2); }
.art-line { fill: var(--rule-strong); }
.art-accent { fill: var(--accent); }
.dropzone-title { font-size: 16px; font-weight: 600; }
.dropzone-hint { color: var(--muted); font-size: 13.5px; }
.dropzone-hint u { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dropzone-small { margin-top: 12px; padding: 18px; border-radius: var(--radius-m); }

.reading {
    margin-top: 32px; padding: 28px;
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l);
}
.reading-file { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; }
.reading-file svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; }
.reading-count { display: flex; align-items: baseline; gap: 10px; margin-top: 28px; }
.reading-count #reading-count { font-size: 64px; font-weight: 600; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.reading-count #reading-count-label { font-size: 16px; color: var(--ink-2); }
.reading-status { margin-top: 10px; color: var(--muted); }
.progress { position: relative; height: 3px; margin-top: 22px; border-radius: 3px; background: var(--paper-deep); overflow: hidden; }
.progress span { position: absolute; inset: 0 auto 0 0; width: 30%; border-radius: 3px; background: var(--accent); animation: sweep 1.6s ease-in-out infinite; }
.reading.has-error .progress, .reading.has-error .reading-count { display: none; }
.reading-error { margin-top: 20px; padding: 16px; background: var(--danger-soft); border-radius: var(--radius-m); color: var(--danger); }
.reading-error-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Étape 2 : contrôle */

.view-review {
    display: grid; grid-template-columns: minmax(360px, 42%) 1fr; grid-template-rows: minmax(0, 1fr);
    height: calc(100vh - var(--topbar));
    padding-bottom: var(--actionbar);
}
.doc-pane { display: flex; flex-direction: column; min-height: 0; background: var(--paper-deep); border-right: 1px solid var(--rule); }
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: 13px; border-bottom: 1px solid var(--rule); background: var(--surface); }
.doc-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-open { color: var(--accent); text-decoration: none; white-space: nowrap; }
.doc-open:hover { text-decoration: underline; }
.doc-pane iframe { flex: 1; width: 100%; border: 0; background: var(--paper-deep); }

.data-pane { overflow-y: auto; padding: 0 28px 48px; min-width: 0; min-height: 0; }

/* Rapprochement : l'élément central de l'écran */
.recon {
    position: sticky; top: 0; z-index: 5;
    margin: 0 -28px; padding: 18px 28px 16px;
    background: rgb(243 245 244 / 92%);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
}
.recon-eq { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 4px 2px; margin-left: -12px; }
.recon-term { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 6px 12px 7px; border: 1px solid transparent; border-radius: var(--radius-m); }
.recon-term small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.recon-term strong { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recon-term .recon-sub { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.recon-term .recon-sub.is-off { color: var(--warn); }
.recon-op { font-size: 20px; line-height: 30px; color: var(--muted); padding-top: 26px; }
.recon-term .recon-sub:empty::before { content: "\00a0"; }
.recon.is-balanced .recon-result { background: var(--accent-soft); border-color: var(--accent-line); }
.recon.is-balanced .recon-result strong { color: var(--accent); }
.recon.is-off .recon-result { background: var(--danger-soft); border-color: #efb9b2; }
.recon.is-off .recon-result strong { color: var(--danger); }
.recon-verdict { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 500; }
.recon.is-balanced .recon-verdict { color: var(--accent); }
.recon.is-off .recon-verdict { color: var(--danger); }
.recon-verdict svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.review-notes { margin-top: 20px; }
.notes-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.notes-card.has-flags { border-color: var(--warn-line); background: #fffcf2; }
.quality { grid-row: span 2; align-self: start; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--paper-deep); color: var(--ink-2); white-space: nowrap; }
.quality.good { background: var(--accent-soft); color: var(--accent); }
.quality.poor { background: var(--warn-soft); color: var(--warn); }
.notes-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.notes-flags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--warn); font-weight: 500; }

.block { position: relative; margin-top: 32px; }
.block h2 { font-size: 16px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.block-hint { margin-top: 4px; color: var(--muted); font-size: 13px; }
.count { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 4px; }

.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 16px; margin-top: 14px; }
.fields .field.wide { grid-column: span 2; }
.fields-sep { grid-column: 1 / -1; height: 1px; background: var(--rule); margin: 4px 0; }

/* Grilles de saisie */
.grid-scroll { position: relative; overflow-x: auto; margin-top: 12px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); }
.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.grid-cards { margin-top: 12px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.grid th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 9px 8px; border-bottom: 1px solid var(--rule); background: #fafbfa; white-space: nowrap; }
.grid th.num { text-align: right; }
.th-hint { font-weight: 400; color: var(--muted); opacity: .8; margin-left: 4px; }
.grid td { padding: 3px 4px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.grid tbody tr:last-child > td { border-bottom: 0; }
.grid td input, .grid td select { height: 32px; font-size: 13px; padding: 5px 6px; border-color: transparent; background: transparent; }
.grid td input:hover, .grid td select:hover { border-color: var(--rule-strong); }
.grid td input:focus, .grid td select:focus { background: var(--surface); border-color: var(--accent); }
.grid td .is-flagged { background: var(--warn-soft); border-color: var(--warn-line); }
.grid .col-action { width: 1%; white-space: nowrap; text-align: right; }
.grid-tx .col-date { width: 128px; }
.grid-tx .col-amount { width: 112px; }
.grid-tx .col-dir { width: 92px; }
.grid-tx .col-card { width: 140px; }
.grid-tx .col-orig { width: 118px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; white-space: nowrap; padding-right: 10px; }
.grid-tx td.col-desc input { min-width: 180px; }
.grid-tx tr.is-credit td .amount-input { color: var(--accent); }
.grid-tx tr.is-open > td { border-bottom-color: transparent; }
.grid-tx tr.detail > td { padding: 4px 12px 14px 40px; background: #fafbfa; }
.grid-tx tr.detail td input, .grid-tx tr.detail td select { border-color: var(--rule-strong); background: var(--surface); }
.detail-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px 12px; }
.detail-fields .field > span { font-size: 11.5px; }
.detail-fields input, .detail-fields select { height: 32px; font-size: 13px; }
.expand svg { transition: transform .15s; }
tr.is-open .expand svg { transform: rotate(90deg); }
.expand.has-flag { position: relative; }
.expand.has-flag::after { content: ''; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn-line); }
.grid-empty td { padding: 28px; text-align: center; color: var(--muted); }

.annexes { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.annexes li { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.annexes a { color: var(--ink); text-decoration: none; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.annexes a:hover { color: var(--accent); text-decoration: underline; }
.annexes .size { margin-left: auto; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.annexes li.is-uploading { color: var(--muted); }

.actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    height: var(--actionbar);
    display: flex; align-items: center; gap: 8px;
    padding: 0 20px;
    background: var(--surface); border-top: 1px solid var(--rule);
}
.actionbar-spacer { flex: 1; }
.save-state { font-size: 13px; color: var(--muted); }
.save-state.is-error { color: var(--danger); }

/* Étape 3 : envoi */

.view-send { padding: 48px 20px 64px; }
.send-layout { width: min(1040px, 100%); margin: 0 auto; display: grid; grid-template-columns: 360px 1fr; gap: 28px; align-items: start; }
.caro-file { padding: 28px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l); }
.caro-file-icon svg { width: 44px; height: 52px; }
.caro-file-icon path { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.caro-file-icon text { font: 600 9px var(--font); fill: var(--accent); letter-spacing: 0.04em; }
.caro-name { margin-top: 18px; font-size: 17px; overflow-wrap: anywhere; line-height: 1.35; }
.caro-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 20px 0 0; font-size: 13.5px; }
.caro-facts dt { color: var(--muted); }
.caro-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.caro-files-title { margin-top: 22px; font-size: 13px; font-weight: 500; color: var(--muted); }
.caro-files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.caro-files li { display: flex; gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
.caro-files li::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--accent-line); transform: translateY(-2px); }
.caro-files li:first-child { font-weight: 500; }
.caro-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.send-form { display: flex; flex-direction: column; gap: 16px; padding: 28px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l); }
.send-form h2 { font-size: 18px; }
.send-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.send-actions { display: flex; justify-content: flex-end; }
.history { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); }
.history:empty { display: none; }
.history li { display: flex; gap: 10px; align-items: baseline; }
.history li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
.history time { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; white-space: nowrap; }

/* Dialogue, info-bulle, notification */

.dialog { width: min(460px, calc(100% - 32px)); padding: 0; border: 1px solid var(--rule); border-radius: var(--radius-l); box-shadow: var(--shadow-float); color: var(--ink); }
.dialog::backdrop { background: rgb(23 33 30 / 32%); }
.dialog form { padding: 24px; margin: 0; }
.dialog h2 { font-size: 17px; }
.dialog #dialog-body { margin-top: 10px; color: var(--ink-2); }
.dialog #dialog-body ul { margin: 8px 0 0; padding-left: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }

.flag-tip {
    position: fixed; z-index: 50; max-width: 280px;
    padding: 8px 10px; border-radius: var(--radius-s);
    background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.4;
    box-shadow: var(--shadow-float); pointer-events: none;
}
.flag-tip strong { display: block; color: var(--warn-line); font-weight: 500; margin-bottom: 2px; }

.toast {
    position: fixed; left: 50%; bottom: calc(var(--actionbar) + 16px); z-index: 60;
    transform: translate(-50%, 12px); opacity: 0;
    padding: 10px 16px; border-radius: var(--radius-m);
    background: var(--ink); color: #fff; font-size: 13.5px;
    box-shadow: var(--shadow-float);
    transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--danger); }
.toast.has-action { display: flex; align-items: center; gap: 14px; pointer-events: auto; }
.toast button { padding: 0; border: 0; background: none; color: var(--accent-line); font: inherit; font-weight: 600; cursor: pointer; }
.toast button:hover { color: #fff; }
.caro-facts .caro-warning { grid-column: 1 / -1; text-align: left; color: var(--warn); font-size: 12.5px; }

/* Adaptation */

@media (max-width: 1100px) {
    .view-review { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
    .doc-pane { height: 70vh; border-right: 0; border-bottom: 1px solid var(--rule); }
    .data-pane { overflow: visible; }
    .recon { top: var(--topbar); }
}

@media (max-width: 860px) {
    .topbar { grid-template-columns: auto 1fr; }
    .steps { display: none; }
    .send-layout { grid-template-columns: 1fr; }
    .send-grid { grid-template-columns: 1fr; }
    .upload-column h1 { font-size: 28px; }
    .data-pane { padding: 0 16px 48px; }
    .recon { margin: 0 -16px; padding: 14px 16px; }
    .fields .field.wide { grid-column: auto; }
    .actionbar #re-extract { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation-duration: 0s !important; }
    .progress span { width: 100%; animation: none; opacity: .5; }
}
