/* CSV to Sheet: page-specific styles. Shared look comes from brand.css and app-shell.css. */
.app-title { font-size: var(--step-3); margin-bottom: 0.3em; }
.intro { color: var(--muted); max-width: 70ch; margin-bottom: 20px; }
#drop { min-height: 220px; }
.results-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.results-head h2 { font-size: var(--step-2); margin: 0 0 4px; overflow-wrap: anywhere; }
.results-head h2:focus { outline: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.small { font-size: var(--step--1); margin: 6px 0; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; min-width: 0; }
.panel h3 { font-size: var(--step-1); margin: 0 0 10px; }
.mode { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.mode legend { font-weight: 700; font-size: var(--step--1); padding: 0; margin-bottom: 4px; }
@media (max-width: 860px) { .split-grid { grid-template-columns: minmax(0, 1fr); } }

/* Files */
.files { margin: 0 0 14px; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); padding: 2px 4px 2px 2px; max-width: 100%; }
.file-list li.bad { border-style: dashed; }
.file-btn { font: inherit; font-size: var(--step--1); border: 0; background: none; color: var(--fg); cursor: pointer; padding: 6px 8px; border-radius: 8px; text-align: left; overflow-wrap: anywhere; }
.file-btn[aria-current="true"] { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); font-weight: 700; }
.file-btn small { display: block; font-weight: 400; }
.file-list .bad p { margin: 0; padding: 6px 8px; font-size: var(--step--1); }
.file-list .bad p span { color: var(--danger); display: block; }
.link-btn { font: inherit; font-size: var(--step--1); border: 0; background: none; color: var(--primary); cursor: pointer; text-decoration: underline; padding: 6px; }

/* What Excel would have done */
.verdict { border: 1px solid var(--line); border-left: 6px solid var(--highlight); border-radius: var(--radius-m); background: var(--surface); padding: 14px 18px; margin: 0 0 20px; }
.verdict h3 { font-size: var(--step-1); margin: 0 0 8px; }
.verdict ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.verdict.clean { border-left-color: var(--accent); }
.verdict p { margin: 8px 0 0; }

/* Columns */
.notes { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: var(--step--1); }
.notes li { padding: 8px 10px; border-radius: var(--radius-s); background: var(--bg); border: 1px solid var(--line); }
.notes li.excel { border-left: 4px solid var(--highlight); }
.small-check { font-size: var(--step--1); margin: 2px 0 12px; }
.cols { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 760px; overflow: auto; }
.col { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; display: grid; gap: 6px; background: var(--surface); }
.col.risky { border-left: 4px solid var(--highlight); }
.col-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.col-head b { overflow-wrap: anywhere; }
.col-head span { font-size: var(--step--1); color: var(--muted); }
.col-set { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: var(--step--1); }
.col-set label { font-weight: 600; }
.col select, .opt-grid select { font: inherit; font-size: var(--step--1); padding: 0.35em 0.5em; border: 2px solid var(--line); border-radius: var(--radius-s); background: var(--bg); color: var(--fg); max-width: 100%; min-width: 0; }
.col select:focus, .opt-grid select:focus { border-color: var(--primary); }
.col p { margin: 0; font-size: var(--step--1); overflow-wrap: anywhere; }
.col .eg { color: var(--muted); }
.col .risk { padding-left: 8px; border-left: 3px solid var(--highlight); }
.col .note { color: var(--muted); }

/* Download */
.download .wide { width: 100%; justify-content: center; }
.csv-opts { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px 14px; margin: 16px 0 0; display: grid; gap: 10px; }
.csv-opts legend { font-weight: 700; padding: 0 4px; }
.opt-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 12px; align-items: center; font-size: var(--step--1); }
.opt-grid label { font-weight: 600; }
.csv-opts .check { font-size: var(--step--1); }
.csv-opts .hint { margin: -6px 0 0 26px; }
.csv-opts .btn { justify-self: start; }

/* Preview */
.preview-panel { margin-top: 20px; }
.key { display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; border-radius: 3px; background: var(--highlight); margin-right: 4px; }
.table-wrap { position: relative; overflow: auto; max-height: 460px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
#preview { border-collapse: collapse; font-size: var(--step--1); min-width: 100%; }
#preview th, #preview td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; }
#preview thead th { position: sticky; top: 0; background: var(--hero); color: var(--on-hero); }
#preview thead th small { display: block; font-weight: 400; color: var(--on-hero-muted); }
#preview td.number { text-align: right; font-variant-numeric: tabular-nums; }
#preview td.kept { font-style: italic; }
#preview mark { background: var(--highlight); color: var(--highlight-ink); padding: 1px 4px; border-radius: 4px; cursor: help; }

/* On narrow screens the page scrolls; a second scroll box inside it is fiddly with a thumb. */
@media (max-width: 860px) { .cols { max-height: none; overflow: visible; } }
