/* Split by Name: 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; }
#drop .progress { width: min(360px, 100%); }
.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; }
.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.1fr) 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 4px; }
mark { background: var(--highlight); color: var(--highlight-ink); padding: 0 3px; border-radius: 3px; }

.pager { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.pager .btn { padding: 0.2em 0.8em; font-size: 1.2rem; line-height: 1; }
.page-text { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); padding: 10px; max-height: 560px; overflow: auto; display: grid; gap: 4px; }
.page-line { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.cell { font: inherit; font-size: var(--step--1); text-align: left; padding: 3px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; max-width: 100%; overflow-wrap: anywhere; }
.cell:hover { border-color: var(--line); color: var(--fg); }
.cell.varies { background: var(--highlight); color: var(--highlight-ink); font-weight: 600; }
.cell[aria-pressed="true"] { outline: 3px solid var(--primary); outline-offset: 1px; }
.cell:not(.varies)[aria-pressed="true"] { color: var(--fg); }
.cell:focus-visible { outline: 3px solid var(--primary); }

.fields { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.fields .empty { color: var(--muted); font-size: var(--step--1); margin: 0; }
.field-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--hero); color: var(--on-hero); font-size: var(--step--1); }
.field-chip input { font: inherit; width: 12ch; border: 0; border-radius: 4px; padding: 1px 4px; background: color-mix(in srgb, var(--on-hero) 14%, transparent); color: var(--on-hero); }
.field-chip button { font: inherit; border: 0; background: transparent; color: var(--on-hero); cursor: pointer; padding: 0 4px; font-size: 1rem; line-height: 1; }
.field-chip .key { font-size: 0.7rem; padding: 1px 6px; border-radius: 999px; background: var(--pop); color: #1B2A4A; font-weight: 700; }
.mode { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.mode legend { font-weight: 700; font-size: var(--step--1); margin-bottom: 4px; padding: 0; }
#every-n { width: 4.5em; font: inherit; padding: 1px 4px; border: 2px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--fg); }
.field input#pattern { width: 100%; }
.chip { font: inherit; font-size: 0.8rem; padding: 2px 8px; margin: 2px 2px 2px 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); cursor: pointer; }
.files-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); margin-top: 12px; }
#files { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
#files th, #files td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#files thead th { position: sticky; top: 0; background: var(--hero); color: var(--on-hero); }
#files td.pages { white-space: nowrap; color: var(--muted); }
#files tr.no-name td:first-child { color: var(--danger); }
.done { border: 2px solid var(--ok); border-radius: var(--radius-m); background: var(--surface); padding: 14px 18px; margin: 14px 0 0; }
.done:focus { outline: none; }
.done h3 { margin: 0 0 6px; }
.done p { margin: 0 0 10px; }
.how { margin-top: 24px; font-size: var(--step--1); max-width: 80ch; }

@media (max-width: 860px) {
  .split-grid { grid-template-columns: minmax(0, 1fr); }
}
