/* Compare Folders: 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: 76ch; margin-bottom: 20px; }
.small { font-size: var(--step--1); margin: 6px 0; }

.browser-note { border-left: 4px solid var(--primary); background: var(--surface); border-radius: var(--radius-s); padding: 10px 14px; max-width: 76ch; }

/* The two folders */
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.drop.pick { min-height: 190px; align-content: center; }
.drop.pick h2 { font-size: var(--step-1); display: flex; align-items: center; gap: 10px; justify-content: center; }
.drop.pick .picked { overflow-wrap: anywhere; }
.drop.pick[data-chosen="yes"] { border-style: solid; border-color: var(--ok); }
.drop.pick[data-chosen="yes"] .picked { color: var(--fg); }
.side { display: inline-grid; place-items: center; flex: none; width: 1.7em; height: 1.7em; border-radius: 8px; background: var(--fg); color: var(--bg); font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; line-height: 1; }
.go-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 18px 0 4px; }

.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; }
.options { margin: 18px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.options fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; align-content: start; min-width: 0; }
.options legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.options .check { font-size: var(--step--1); }
.check { align-items: flex-start; }
.check input { flex: none; margin-top: 3px; }
.check input:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.settings { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.settings summary { cursor: pointer; font-weight: 700; font-size: var(--step--1); }
#options-slot .options { border: 0; border-radius: 0; padding: 10px 0 0; margin: 0; background: none; grid-template-columns: minmax(0, 1fr); }

#scanning { max-width: 640px; margin: 40px auto; }
#scanning h2:focus { outline: none; }
#scan-progress { margin: 18px 0 8px; }

.results-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.results-head > div:first-child { min-width: 0; flex: 1 1 420px; }
.results-head h2 { font-size: var(--step-2); margin: 0 0 6px; }
.results-head h2:focus { outline: none; }
.names { margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; overflow-wrap: anywhere; }
.names .nm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.names .side { font-size: 0.8rem; }
.names .muted { font-size: var(--step--1); }
.results-head .muted { font-size: var(--step--1); max-width: 80ch; margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.results-head .actions { margin-top: 0; }

.problems { border-left: 4px solid var(--danger); background: var(--surface); border-radius: var(--radius-s); padding: 10px 14px; margin: 0 0 16px; }
.problems h3 { font-size: var(--step-0); margin: 0 0 4px; }
.problems ul { margin: 0; padding-left: 1.2em; font-size: var(--step--1); display: grid; gap: 4px; overflow-wrap: anywhere; }

/* Summary cards: counts that also choose what the list shows */
.cards { border: 0; padding: 0; margin: 12px 0 18px; display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); min-width: 0; }
.card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; align-content: start; padding: 10px 12px 10px 14px; border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; min-width: 0; }
.card input { grid-row: 1; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--primary); }
.card input:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.card:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent); }
.card-title { font-weight: 700; font-size: var(--step--1); }
.card-count { grid-column: 1 / -1; font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); line-height: 1.15; margin-top: 4px; }
.card-sub, .card-size { grid-column: 1 / -1; font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }
.card.c-only-a { border-left-color: #E8798A; }
.card.c-changed { border-left-color: #E8B931; }
.card.c-moved { border-left-color: #9A86E3; }
.card.c-only-b { border-left-color: #3FB98F; }
.card.c-same { border-left-color: var(--muted); }

/* Copying and the report: text on the left, buttons on the right */
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; align-items: center; }
.bar h3 { margin-bottom: 4px; }
.bar-text > :last-child { margin-bottom: 0; }
.bar-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.bar .wide { grid-column: 1 / -1; }
.bar .status:empty { min-height: 0; margin: 0; }
.copy-sub { margin: 0 0 6px; }
.copy .check { font-size: var(--step--1); }
.copy-note { color: var(--muted); }
#copy-progress { margin-top: 8px; }
.copy .limit-note { margin: 8px 0 0; }
.done { border: 2px solid var(--ok); border-radius: var(--radius-m); background: var(--surface); padding: 14px 18px; margin: 8px 0 0; overflow-wrap: anywhere; }
.done:focus { outline: none; }
.done:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.done h3 { margin: 0 0 6px; }
.done p { margin: 0; }
.report .small { color: var(--muted); }

/* The list, grouped by folder */
.list-head { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin: 24px 0 4px; }
.list-head h3 { font-size: var(--step-1); margin: 0; }
.list-tools { display: flex; gap: 10px 16px; flex-wrap: wrap; }
.field.inline { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; }
.field.inline select, .field.inline input { max-width: 100%; min-width: 0; }
#list { display: grid; gap: 12px; }
#list:focus { outline: none; }
.folder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 16px 4px; min-width: 0; }
.folder h4 { font-family: var(--font); font-weight: 700; font-size: var(--step--1); margin: 0 0 4px; overflow-wrap: anywhere; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 7px 0; border-top: 1px solid var(--line); font-size: var(--step--1); }
.row .what { min-width: 0; overflow-wrap: anywhere; }
.row .name { font-weight: 600; display: block; }
.row .detail { display: block; color: var(--muted); }
.row .detail b { font-weight: 600; color: var(--fg); }
.row .meta { color: var(--muted); white-space: nowrap; }
.badge { justify-self: start; font-size: 0.78rem; font-weight: 700; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.s-only-a { background: #FBD3D8; border-color: #F2A9B4; color: #7A1424; }
.badge.s-only-b { background: #CFF3E8; border-color: #9ADFC9; color: #0B4F3E; }
.badge.s-newer-a, .badge.s-newer-b, .badge.s-different { background: #FFE58F; border-color: #E8C65A; color: #4A3800; }
.badge.s-moved { background: #E7E1FB; border-color: #C9BDF3; color: #3A2A7A; }
.badge.s-same { background: var(--bg); }
.badge.copied { grid-column: 3; background: var(--bg); border-color: var(--ok); color: var(--ok); }
.empty { padding: 16px 0; }
.more { margin: 16px 0 0; }
.how { margin-top: 24px; font-size: var(--step--1); max-width: 86ch; }

@media (max-width: 1000px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .bar { grid-template-columns: minmax(0, 1fr); } .bar-actions { justify-content: flex-start; margin-top: 6px; } }
@media (max-width: 640px) {
  .pick-grid { grid-template-columns: minmax(0, 1fr); }
  .drop.pick { min-height: 150px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row .meta { white-space: normal; }
  .badge.copied { grid-column: auto; }
}
