/* Drive Dedupe: bright, Apple-like visual system.
   Behaviour hooks (IDs, data-* attributes, JS-queried classes) are unchanged; only presentation lives here. */

:root {
  color-scheme: light;

  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #ebebf0;
  --text: #1d1d1f;
  /* Both meet WCAG AA (4.5:1) for small text on every light background used. */
  --text-2: #5d5d62;
  --text-3: #6e6e73;
  --border: rgba(0, 0, 0, 0.08);
  --border-2: rgba(0, 0, 0, 0.14);

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-press: #006edb;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --on-accent: #ffffff;
  --focus: rgba(0, 113, 227, 0.45);

  --safe: #30a14e;
  --safe-bg: #e9f7ee;
  --safe-text: #1b6b34;
  --review: #d97706;
  --review-bg: #fdf3e3;
  --review-text: #8a4a05;
  --verify: #e5484d;
  --verify-bg: #fdecec;
  --verify-text: #a1262b;
  --other: #a1a1a6;
  --other-bg: #f2f2f5;

  --danger: #e0352b;
  --danger-hover: #d02f25;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.02);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --glass: rgba(251, 251, 253, 0.78);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  /* Treemap tiles and folder-tree bars */
  --tile-0: #cfe3ff; --tile-1: #d4f2e1; --tile-2: #ffe3c2; --tile-3: #e6dcff;
  --tile-4: #ffd8df; --tile-5: #cdeff2; --tile-6: #f3ecc3; --tile-7: #e1e6ee;
  --tile-files: #eef0f4; --tile-rest: #f3f3f6; --tile-text: #1d1d1f;
  --tile-inner: rgba(255, 255, 255, 0.45); --tile-inner-hover: rgba(255, 255, 255, 0.75); --tile-inner-border: rgba(0, 0, 0, 0.08);
  --space-bar: rgba(0, 113, 227, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --surface-3: #3a3a3c;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --border: rgba(255, 255, 255, 0.1);
    --border-2: rgba(255, 255, 255, 0.18);
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-press: #0071e3;
    --accent-soft: rgba(10, 132, 255, 0.18);
    --focus: rgba(10, 132, 255, 0.55);
    --safe: #32d74b;
    --safe-bg: rgba(50, 215, 75, 0.14);
    --safe-text: #6fe083;
    --review: #ff9f0a;
    --review-bg: rgba(255, 159, 10, 0.14);
    --review-text: #ffb340;
    --verify: #ff453a;
    --verify-bg: rgba(255, 69, 58, 0.15);
    --verify-text: #ff7a72;
    --other: #8e8e93;
    --other-bg: #2c2c2e;
    --danger: #ff453a;
    --danger-hover: #ff5a50;
    --shadow-sm: none;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --glass: rgba(0, 0, 0, 0.72);
    --tile-0: #1f3d66; --tile-1: #1d4a35; --tile-2: #5a3c16; --tile-3: #3b2f63;
    --tile-4: #5c2633; --tile-5: #18474d; --tile-6: #4d4519; --tile-7: #353a44;
    --tile-files: #2c2c2e; --tile-rest: #242426; --tile-text: #f5f5f7;
    --tile-inner: rgba(0, 0, 0, 0.22); --tile-inner-hover: rgba(0, 0, 0, 0.4); --tile-inner-border: rgba(255, 255, 255, 0.12);
    --space-bar: rgba(10, 132, 255, 0.22);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--sans);
  letter-spacing: -0.009em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.022em; margin: 0; color: var(--text); }
h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: 28px; line-height: 1.15; letter-spacing: -0.026em; }
h3 { font-size: 17px; line-height: 1.3; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent-soft); }

.view { display: none; }
body[data-view="loading"] .view-loading,
body[data-view="signed-out"] .view-signed-out,
body[data-view="empty"] .view-empty,
body[data-view="scanning"] .view-scanning,
body[data-view="results"] .view-results { display: block; }

.app-shell { display: none; }
body[data-view="empty"] .app-shell,
body[data-view="scanning"] .app-shell,
body[data-view="results"] .app-shell { display: block; }

/* ---------- loading ---------- */
.view-loading { display: none; min-height: 60vh; place-items: center; }
body[data-view="loading"] .view-loading { display: grid; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2.5px solid var(--surface-3); border-top-color: var(--accent);
  animation: spin .8s linear infinite; margin: 0 auto 22px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- demo banner ---------- */
.demo-banner {
  background: var(--surface-2); color: var(--text-2);
  padding: 9px 20px; font-size: 12.5px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.demo-banner strong { color: var(--text); font-weight: 600; }

/* ---------- signed out ---------- */
.view-signed-out {
  min-height: 100vh; display: none; place-items: center; padding: 8vh 20px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 60%), var(--bg);
}
body[data-view="signed-out"] .view-signed-out { display: grid; }
.auth-card { width: 100%; max-width: 520px; text-align: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 36px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(160deg, #2997ff, #0060df); color: #fff;
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.3);
}
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -0.015em; color: var(--text); }
.auth-card h1 { margin-bottom: 16px; }
.lede { color: var(--text-2); font-size: 17px; line-height: 1.47; }
.auth-card .lede { margin: 0 auto 34px; max-width: 460px; }

.gbtn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; max-width: 360px; margin: 0 auto; padding: 14px 22px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 999px;
  font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow);
  transition: background .2s var(--ease), box-shadow .2s var(--ease), transform .1s var(--ease);
}
.gbtn:hover { background: var(--surface-2); text-decoration: none; box-shadow: var(--shadow-sm); }
.gbtn:active { transform: scale(0.99); }
.gbtn-logo { flex: none; }

.trust {
  text-align: left; margin: 40px 0 26px; display: grid; gap: 16px;
  background: var(--surface); border-radius: var(--radius-lg); padding: 22px 24px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.trust-row { display: flex; gap: 12px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.trust-row strong { color: var(--text); font-weight: 600; }
.trust-icon {
  flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--safe-bg); color: var(--safe); font-size: 11px; font-weight: 700; margin-top: 1px;
}

.fineprint { font-size: 12px; color: var(--text-3); line-height: 1.6; max-width: 460px; margin: 0 auto; }
.fineprint a { margin-left: 4px; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(22px, calc((100vw - 1440px) / 2 + 22px)); min-height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  position: sticky; top: 0; z-index: 20;
}
.brand-sm .brand-mark { width: 26px; height: 26px; border-radius: 7px; box-shadow: none; }
.brand-sm { margin: 0; gap: 9px; }
.brand-sm .brand-name { font-size: 15px; }
.scan-meta { font-size: 12px; color: var(--text-3); margin-left: 4px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.user-chip { font-size: 13px; color: var(--text-2); padding: 0 6px; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-size: 13.5px; font-weight: 500; line-height: 1.2; padding: 8px 16px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), opacity .2s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-sm { font-size: 12.5px; padding: 6px 13px; }
.btn-lg { font-size: 17px; padding: 14px 24px; width: 100%; }
.btn:disabled, .btn:disabled:hover { opacity: .4; cursor: not-allowed; transform: none; }
.btn-primary:disabled:hover { background: var(--accent); }
.btn-danger:disabled:hover { background: var(--danger); }

input[type="search"], input[type="text"], select, input:not([type="checkbox"]):not([type="radio"]) {
  font: inherit; font-size: 14px; padding: 8px 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2386868b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input[type="search"]:not(#_) { border-radius: 999px; background: var(--surface-2); border-color: transparent; padding-left: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center; }
input[type="search"]:not(#_):focus { background-color: var(--surface); border-color: var(--accent); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
.btn:focus-visible, .gbtn:focus-visible, .chip:focus-visible, summary:focus-visible, a:focus-visible, button:focus-visible {
  outline: none; box-shadow: 0 0 0 4px var(--focus);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- empty / scanning ---------- */
.view-empty, .view-scanning { padding: 12vh 20px; }
.empty-card {
  max-width: 480px; margin: 0 auto; text-align: center;
  background: var(--surface); border-radius: var(--radius-xl); padding: 44px 40px 40px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.empty-card h2 { margin-bottom: 12px; }
.empty-card .lede { margin-bottom: 30px; font-size: 16px; }
.scan-form { display: grid; gap: 20px; text-align: left; }
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text); }
.field select { width: 100%; }
.hint { font-size: 12.5px; color: var(--text-3); }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; color: var(--text); }
.check input { accent-color: var(--accent); }

.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin: 22px 0 14px; }
.progress-bar { height: 100%; width: 0%; background: var(--accent); border-radius: 999px; transition: width .5s var(--ease); }

/* ---------- results ---------- */
.view-results { padding: 32px 22px 160px; max-width: 1440px; margin: 0 auto; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 28px; }
.metric {
  background: var(--surface); border-radius: var(--radius-lg); padding: 20px 22px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.metric-label { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.metric-value { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric.is-highlight { background: linear-gradient(160deg, #2997ff, #0060df); border-color: transparent; box-shadow: 0 8px 24px rgba(0, 113, 227, 0.25); }
.metric.is-highlight .metric-label, .metric.is-highlight .metric-sub { color: rgba(255, 255, 255, 0.82); }
.metric.is-highlight .metric-value { color: #fff; }
.metric-sub { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; padding: 12px 0; position: sticky; top: 56px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  z-index: 15; margin: 0 -8px; padding-left: 8px; padding-right: 8px;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; background: var(--surface-2); padding: 3px; border-radius: 999px; }
.chip {
  font-size: 13px; font-weight: 500; padding: 6px 13px; border-radius: 999px; cursor: pointer;
  border: 0; background: transparent; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 7px; user-select: none;
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chip[aria-pressed="true"] .dot { opacity: 1; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.safe { background: var(--safe); }
.dot.review { background: var(--review); }
.dot.verify { background: var(--verify); }
.dot.other { background: var(--other); }
.toolbar-right { display: flex; gap: 8px; }
.toolbar-right input[type="search"] { width: 240px; }

.view-results > .check { margin: 16px 2px 0; color: var(--text-2); font-size: 13.5px; }

.active-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 0 0; }
.fchip {
  font-size: 12.5px; padding: 5px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  display: inline-flex; gap: 8px; align-items: center; font-weight: 500;
}
.fchip button { background: none; border: 0; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; padding: 0; opacity: .7; }
.fchip button:hover { opacity: 1; }

.list-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 4px 12px; }
.list-head .check { font-size: 13.5px; color: var(--text-2); }
.list-count { font-size: 13px; color: var(--text-3); }

/* ---------- group cards ---------- */
.group {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow .25s var(--ease), opacity .25s var(--ease);
}
.group:hover { box-shadow: var(--shadow); }
.group[open] { box-shadow: var(--shadow); }
.group.is-decided, .group.is-skipped { opacity: .6; }

.group-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none; }
.group-head::-webkit-details-marker { display: none; }
.group-head:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.group-check { accent-color: var(--accent); flex: none; }
.group-main { flex: 1; min-width: 0; }
.group-name {
  font-size: 15px; font-weight: 600; letter-spacing: -0.012em; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.group-sub { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.group-tags { display: flex; gap: 6px; align-items: center; flex: none; }

.tag { font-size: 11.5px; font-weight: 500; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.tag.safe { background: var(--safe-bg); color: var(--safe-text); }
.tag.review { background: var(--review-bg); color: var(--review-text); }
.tag.verify { background: var(--verify-bg); color: var(--verify-text); }
.tag.other { background: var(--other-bg); color: var(--text-2); }
.tag.pending { background: var(--surface-2); color: var(--text-2); }
.tag.decided { background: var(--safe-bg); color: var(--safe-text); }
.tag.skipped { background: var(--other-bg); color: var(--text-3); }
.tag.warn { background: var(--review-bg); color: var(--review-text); }
.tag.risk { background: var(--verify-bg); color: var(--verify-text); }

.caret {
  color: var(--text-3); flex: none; font-size: 0; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; transition: transform .25s var(--ease), background .2s var(--ease);
}
.caret::before {
  content: ""; width: 7px; height: 7px; border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.group-head:hover .caret { background: var(--surface-2); }
.group[open] .caret { transform: rotate(180deg); }

.group-body { padding: 4px 20px 18px; border-top: 1px solid var(--border); }
.smart-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 0 10px; }

.warnbox {
  margin: 12px 0 0; padding: 11px 14px; border-radius: var(--radius); font-size: 13px; line-height: 1.5;
}
.warnbox strong { font-weight: 600; }
.warnbox.amber { background: var(--review-bg); color: var(--review-text); }
.warnbox.red { background: var(--verify-bg); color: var(--verify-text); }

.file-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--border); }
.file-row:first-of-type { border-top: 0; }
.file-radio { accent-color: var(--accent); flex: none; }
.file-main { flex: 1; min-width: 0; }
.file-path { font-family: var(--mono); font-size: 12px; word-break: break-all; line-height: 1.45; color: var(--text); }
.file-path a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--border-2); }
.file-path a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }
.file-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.file-verdict { font-size: 12px; font-weight: 600; flex: none; width: 62px; text-align: right; }
.file-verdict.keep { color: var(--safe-text); }
.file-verdict.del { color: var(--verify-text); }
.file-verdict.none { color: var(--text-3); font-weight: 400; }
.file-row.is-locked .file-radio { opacity: .35; }

/* ---------- bulk bar + dock ---------- */
.bulkbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 10px 18px; background: var(--accent-soft); color: var(--text);
  border-radius: 999px; margin-top: 16px; font-size: 13.5px; font-weight: 500; flex-wrap: wrap;
}
.bulkbar-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.bulkbar .btn { background: var(--surface); }
.bulkbar .btn:hover { background: var(--surface-2); }
.bulkbar .btn-ghost { background: transparent; }

.trash-dock {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 30;
  display: flex; align-items: center; gap: 20px; padding: 10px 10px 10px 24px;
  background: var(--glass); border: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-radius: 999px; font-size: 14px; box-shadow: var(--shadow-lg);
}
.trash-dock strong { font-weight: 600; }
.trash-dock .btn { padding: 10px 20px; font-size: 14px; }
.muted { color: var(--text-3); margin-left: 8px; }

.empty-filter { text-align: center; padding: 56px 0; color: var(--text-3); display: grid; gap: 14px; justify-items: center; }

/* ---------- dialog ---------- */
dialog {
  border: 0; border-radius: var(--radius-xl); padding: 0;
  background: var(--surface); color: var(--text); max-width: 460px; width: calc(100% - 40px);
  box-shadow: var(--shadow-lg);
}
dialog[open] { animation: dialog-in .22s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
dialog::backdrop {
  background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.dialog-inner { padding: 28px; display: grid; gap: 16px; }
.dialog-inner h3 { font-size: 21px; letter-spacing: -0.02em; }
.dialog-inner > p, .dialog-inner #confirm-body { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.dialog-body-line { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.dialog-body-line strong { color: var(--text); font-weight: 600; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.dialog-actions .btn { padding: 10px 20px; font-size: 14px; }
.confirm-type { display: grid; gap: 8px; font-size: 13px; color: var(--text-2); }
.confirm-type input { font-family: var(--mono); letter-spacing: 0.06em; }
.confirm-type code {
  background: var(--surface-2); color: var(--text); padding: 2px 7px; border-radius: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 40;
  background: rgba(29, 29, 31, 0.92); color: #f5f5f7; padding: 12px 20px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-radius: 999px; font-size: 14px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-lg); max-width: calc(100% - 32px);
}
.toast button { background: none; border: 0; color: #64b5ff; font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
@media (prefers-color-scheme: dark) {
  .toast { background: rgba(58, 58, 60, 0.92); }
}

/* ---------- operation results ---------- */
#operations {
  margin: 20px 0; padding: 22px 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
#operations h2, #operations h3 { font-size: 17px; }
#operations summary { cursor: pointer; color: var(--accent); font-size: 13.5px; font-weight: 500; margin-top: 8px; }
.operation-card { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); overflow-wrap: anywhere; font-size: 14px; }
.operation-files { max-height: 260px; overflow: auto; padding-left: 20px; overflow-wrap: anywhere; font-size: 13px; color: var(--text-2); }
.operation-files li { margin-bottom: 8px; }
.operation-progress {
  display: block; width: 100%; height: 6px; margin: 10px 0; border: 0; border-radius: 999px;
  overflow: hidden; background: var(--surface-3); accent-color: var(--accent);
  -webkit-appearance: none; appearance: none;
}
.operation-progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 999px; }
.operation-progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.operation-progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
#confirm-dialog { max-height: 90vh; overflow: auto; }

/* ---------- connection recovery ---------- */
.recovery-banner {
  margin: 16px auto; padding: 16px 20px; max-width: 1396px;
  background: var(--review-bg); color: var(--review-text);
  border-radius: var(--radius-lg); overflow-wrap: anywhere; font-size: 14px;
}
.recovery-banner p { margin: 0 0 12px; }
.recovery-banner .btn { background: var(--surface); color: var(--text); }
.recovery-banner .btn:hover { background: var(--surface-2); }
.recovery-banner button + button { margin-left: 8px; }
.recovery-dialog { max-height: 90vh; overflow: auto; }
.recovery-dialog .dialog-actions .btn:last-child { background: var(--accent); color: var(--on-accent); }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .topbar { flex-wrap: wrap; padding: 10px 16px; }
  .toolbar { position: static; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; margin: 0; padding: 8px 0; }
  .chips { width: 100%; border-radius: 16px; gap: 2px; }
  .toolbar-right { width: 100%; flex-wrap: wrap; }
  .toolbar-right input[type="search"] { width: 100%; flex: 1 1 100%; }
  .toolbar-right select { flex: 1 1 0; min-width: 0; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric { padding: 16px; }
  .metric-value { font-size: 26px; }
  .group-head { flex-wrap: wrap; padding: 14px 16px; }
  .group-main { flex-basis: calc(100% - 70px); }
  .group-tags { display: flex; flex-wrap: wrap; margin-left: 30px; }
  .group-body { padding: 4px 16px 16px; }
  .bulkbar { border-radius: var(--radius-lg); }
  .trash-dock { width: calc(100% - 24px); border-radius: var(--radius-xl); flex-wrap: wrap; justify-content: center; bottom: 12px; padding: 12px; gap: 10px; text-align: center; }
  .view-results { padding: 20px 16px 170px; }
  .empty-card { padding: 32px 22px; }
  .trust { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Author display rules must never override native hidden states. */
[hidden] { display: none !important; }

/* ---------- sign-in email (optional login hint) ---------- */
.signin-email { display: grid; gap: 8px; max-width: 360px; margin: 0 auto 14px; text-align: left; font-size: 13px; font-weight: 600; color: var(--text); }
.signin-email .optional { font-weight: 400; color: var(--text-3); }
.signin-email input { width: 100%; padding: 12px 16px; font-size: 15px; border-radius: 12px; }
#scan-cancel-btn { margin-top: 18px; }

/* ---------- report printing ("Save report as PDF") ---------- */
body:not([data-view="results"]) #print-btn { display: none; }
@media print {
  :root { color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #f5f5f7; --text: #1d1d1f; --text-2: #515154; --text-3: #6e6e73; --border: #d2d2d7; }
  body { background: #fff; font-size: 11pt; }
  .topbar { position: static; background: #fff; border-bottom: 1px solid var(--border); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topbar-right, .toolbar, .bulkbar, .list-head .check, .view-results > .check, .active-filters, .trash-dock, .toast,
  .recovery-banner, .demo-banner, .smart-row, .group-check, .caret, .file-radio, #operations, [data-export], [data-page], [data-act], dialog { display: none !important; }
  .view-results { padding: 16px 0 0; max-width: none; }
  .metrics { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .metric, .metric.is-highlight { box-shadow: none; border: 1px solid var(--border); background: #fff; }
  .metric.is-highlight .metric-label, .metric.is-highlight .metric-sub { color: var(--text-2); }
  .metric.is-highlight .metric-value { color: var(--text); }
  .metric-value { font-size: 20pt; }
  .group { box-shadow: none; break-inside: avoid; margin-bottom: 8px; }
  .group-name { white-space: normal; }
  .group-body { display: block; }
  a { color: inherit; }
  @page { margin: 14mm; }
}

.scan-notice { margin: 0 0 18px; }

/* ---------- filter toggles (incl. "Present files shared with you") ---------- */
.filter-toggles { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: flex-start; margin: 16px 2px 0; }
.filter-toggles .check { margin: 0; color: var(--text-2); font-size: 13.5px; }
.toggle { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; max-width: 460px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-track { flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s var(--ease); margin-top: 1px; }
.toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.toggle input:checked + .toggle-track { background: var(--safe); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-track { box-shadow: 0 0 0 4px var(--focus); }
.toggle-text { display: grid; gap: 2px; font-size: 13.5px; color: var(--text); }
.toggle-text .hint { font-size: 12px; }
.hidden-shared { margin: 10px 0 4px; font-style: italic; }
@media print { .filter-toggles { display: none !important; } }

/* ---------- footer ---------- */
.site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 40px 2px 0; padding-top: 18px;
  border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }
.site-footer a { color: var(--text-2); }
.site-footer .btn { margin-left: auto; color: var(--text-2); }
@media print { .site-footer { display: none !important; } }

/* ---------- request access (sign-in page) ---------- */
.request-access { margin: 14px auto 0; font-size: 13px; color: var(--text-2); }

/* ---------- acting on the report: per-copy links, removal list, wins ---------- */
.file-actions { display: inline-flex; gap: 2px; flex: none; }
.file-action { padding: 3px 9px; font-size: 12px; }
.report-notes { display: grid; gap: 6px; margin: -12px 2px 22px; font-size: 13px; color: var(--text-2); }
.report-notes strong { color: var(--text); font-weight: 600; }
#removal-panel { margin: 20px 0; padding: 22px 24px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); }
#removal-panel h2 { font-size: 19px; margin-bottom: 6px; }
.removal-summary, .removal-empty { color: var(--text-2); font-size: 14px; margin: 4px 0 12px; }
.removal-folder { border-top: 1px solid var(--border); padding: 12px 0 4px; }
.removal-folder h3 { font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.removal-folder-name { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.removal-folder ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.removal-folder li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.removal-file { overflow-wrap: anywhere; }
@media (max-width: 720px) { .file-actions { width: 100%; margin-left: 30px; } }
@media print { .file-actions, #removal-panel .btn { display: none !important; } }

.report-notes[hidden] { display: none; }

/* ---------- duplicate folders ---------- */
.folder-dupes { margin: 0 0 22px; padding: 14px 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.folder-dupes[hidden] { display: none; }
.folder-dupes > summary { cursor: pointer; font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.folder-dupes > summary .muted { font-size: 13px; }
.folder-dupes-note, .folder-dupes-more { color: var(--text-2); font-size: 13px; margin: 10px 0 4px; }
.folder-dupe { border-top: 1px solid var(--border); padding: 10px 0 4px; }
.folder-dupe h3 { font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.folder-dupe h3 .muted { font-size: 12.5px; font-weight: 400; }
.folder-dupe ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.folder-dupe li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.folder-dupe-path { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
@media print { .folder-dupes .btn { display: none !important; } }
#removal-panel #removal-copy { margin: 4px 0 8px; }
.topbar .btn { white-space: nowrap; }
.topbar-right { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }

/* ---------- where your space goes ---------- */
.space { margin: 0 0 22px; padding: 18px 20px 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.space[hidden] { display: none; }
.space-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.space-head h2 { font-size: 17px; margin: 0; }
.space-head .muted { margin: 0; font-size: 13px; }
.storage { margin: 12px 0 6px; }
.storage-total { margin: 0 0 6px; font-size: 14px; }
.storage-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.storage-bar span { display: block; height: 100%; }
.storage-drive { background: var(--accent); }
.storage-trash { background: var(--review); }
.storage-other { background: var(--text-3); }
.storage-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 6px 0 0; font-size: 12.5px; color: var(--text-2); }
.storage-legend .key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 8px; }
.storage-legend .key:first-child { margin-left: 0; }
.storage-note { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
.space-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.space-tabs button { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-2);
  background: transparent; color: var(--text); cursor: pointer; }
.space-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.space-tabs button[hidden] { display: none; }
.space-tabs-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 12px 0 4px; }
.space-tabs-row .space-tabs { margin: 0; }
.space-csv { font: inherit; font-size: 13px; padding: 5px 10px; border: 0; background: transparent; color: var(--accent); cursor: pointer; border-radius: 999px; }
.space-csv:hover { background: var(--accent-soft); }
@media print { .space-csv { display: none; } }
.space-folders { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; margin-top: 10px; }
@media (max-width: 900px) { .space-folders { grid-template-columns: 1fr; } }
.space-left { display: grid; gap: 8px; align-content: start; min-width: 0; }
.space-search { font: inherit; font-size: 13px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); width: 100%; }
.space-search-empty { font-size: 12.5px; padding: 6px 8px; margin: 0; }
.space-tree-pane { max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; }
.space-tree, .space-tree ul { list-style: none; margin: 0; padding: 0; }
.space-row { display: flex; align-items: center; gap: 4px; min-height: 30px; border-radius: 8px; }
.space-row.is-selected { background: var(--accent-soft); }
.space-toggle { flex: 0 0 22px; width: 22px; height: 22px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; font-size: 12px; padding: 0; }
.space-pick { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 13px; text-align: left; padding: 5px 8px; cursor: pointer; border-radius: 6px; overflow: hidden; }
.space-pick:hover { background: var(--surface-2); }
.space-bar { position: absolute; inset: 2px auto 2px 0; background: var(--space-bar); border-radius: 6px; pointer-events: none; }
.space-pick > span:not(.space-bar) { position: relative; }
.space-size { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 64px; white-space: nowrap; }
.space-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-pct { flex: 0 0 46px; text-align: right; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; padding-right: 6px; }
.space-more { font-size: 12px; color: var(--text-3); padding: 4px 0 6px; }
.space-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.space-crumb { border: 0; background: transparent; color: var(--accent); font: inherit; padding: 2px 4px; cursor: pointer; border-radius: 4px; }
.space-sep { color: var(--text-3); }
.space-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 10px; font-size: 15px; }
.space-facts .muted { margin: 0; font-size: 13px; }
.treemap { position: relative; width: 100%; aspect-ratio: 5 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.tile { position: absolute; box-sizing: border-box; border: 1.5px solid var(--surface); padding: 6px 7px; overflow: hidden; color: var(--tile-text);
  font: inherit; text-align: left; display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; border-radius: 6px; }
button.tile { cursor: pointer; }
button.tile:hover { filter: brightness(0.95); }
.tile-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-size { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }
.tile-c0 { background: var(--tile-0); } .tile-c1 { background: var(--tile-1); } .tile-c2 { background: var(--tile-2); } .tile-c3 { background: var(--tile-3); }
.tile-c4 { background: var(--tile-4); } .tile-c5 { background: var(--tile-5); } .tile-c6 { background: var(--tile-6); } .tile-c7 { background: var(--tile-7); }
.tile-files { background: var(--tile-files); } .tile-rest { background: var(--tile-rest); }
.tile-nested { padding: 0; }
.tile-head { position: absolute; inset: 0 0 auto 0; height: 100%; padding: 6px 7px; border: 0; background: transparent; color: inherit; font: inherit;
  text-align: left; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.tile-head:hover { background: rgba(0, 0, 0, 0.04); }
.tile-inner { position: absolute; box-sizing: border-box; border: 1px solid var(--tile-inner-border); border-radius: 4px; background: var(--tile-inner);
  color: var(--tile-text); padding: 3px 5px; overflow: hidden; text-align: left; font: inherit; cursor: pointer; display: flex; align-items: flex-start; }
.tile-inner .tile-name { font-size: 11px; font-weight: 500; }
button.tile-inner:hover { background: var(--tile-inner-hover); }
.tile-inner-rest { cursor: default; background: transparent; border-style: dashed; }
/* On a phone a tile's label band is short: keep just the folder's name above the inner tiles. */
@media (max-width: 600px) { .tile-nested .tile-head .tile-size { display: none; } .tile-nested .tile-head .tile-name { font-size: 11.5px; } }
.space-bars { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.space-bars li { display: grid; grid-template-columns: minmax(80px, 160px) minmax(60px, 1fr) auto auto; align-items: center; gap: 10px; font-size: 13px; }
.space-bars-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-bars-track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.space-bars-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.space-bars .muted { margin: 0; font-size: 12px; }
@media (max-width: 600px) { .space-bars li { grid-template-columns: minmax(70px, 110px) minmax(40px, 1fr) auto; } .space-bars li .muted { display: none; } }
@media print { .space-tabs, .space .btn { display: none !important; } .space-tree-pane { max-height: none; } }

.removal-progress { margin: 4px 0 10px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.removal-progress .muted { margin: 0; font-size: 12.5px; }
.removal-done { display: inline-flex; align-items: center; }
#removal-panel li.is-done .removal-file { text-decoration: line-through; color: var(--text-3); }
.cleanup { margin: 6px 0 14px; display: grid; gap: 10px; }
.cleanup-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cleanup-run { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); font-size: 14px; }
.cleanup-run p { margin: 0 0 6px; }
.cleanup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.keep-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 12px; font-size: 13.5px; }
.keep-rule[hidden] { display: none; }
.keep-rule select { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); max-width: 100%; }
.keep-rule .hint { flex-basis: 100%; margin: 0; }
.recs-card { margin: 0 0 18px; padding: 16px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.recs-card[hidden] { display: none; }
.recs-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.recs-head h2 { font-size: 17px; margin: 0; }
.recs-head .muted { margin: 0; font-size: 13px; }
.recs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.rec { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.rec:first-child { border-top: 0; }
.rec-size { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--accent); }
.rec-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.rec-what .muted { margin: 0; font-size: 13px; }
@media (max-width: 600px) { .rec { grid-template-columns: 70px minmax(0, 1fr); } .rec .btn { grid-column: 2; justify-self: start; } }
.overlap-facts { margin: 6px 0; font-size: 13.5px; color: var(--text-2); }
.overlap-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.overlap-only > summary { cursor: pointer; font-size: 13px; color: var(--text-2); margin: 6px 0 4px; }
.overlap-only ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.overlap-only li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
@media print { .recs-card .btn, .overlaps .btn { display: none !important; } }
.guide { margin: 0 0 18px; padding: 16px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.guide[hidden] { display: none; }
.guide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guide-head h2 { font-size: 16px; margin: 0; }
.guide-steps { margin: 10px 0 6px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.guide .hint { margin: 4px 0 0; }
@media print { .guide { display: none !important; } }
.resume-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 16px;
  padding: 12px 16px; border-radius: var(--radius); background: var(--accent-soft); font-size: 14px; }
.resume-banner[hidden] { display: none; }
.scan-live { margin: 22px 0 6px; text-align: left; }
.scan-live[hidden] { display: none; }
.scan-live h3 { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 8px; }
.scan-live ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.scan-live li { display: grid; grid-template-columns: minmax(70px, 140px) minmax(40px, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.scan-live-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-live .hint { margin-top: 8px; }

/* ---------- largest files ---------- */
.largest-size { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 72px; }
.largest-what { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.largest-name { font-weight: 500; overflow-wrap: anywhere; }
.largest-what .folder-dupe-path { color: var(--text-3); font-size: 12px; }
.largest-row + .largest-row { border-top: 1px solid var(--border); padding-top: 6px; }
.largest-row .muted { margin-left: 0; }
.largest-copies { font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.largest-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 12px 0 4px; }
.chip-filter { font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-2); background: transparent; color: var(--text); cursor: pointer; }
.chip-filter[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip-filter .muted { margin-left: 2px; font-size: 11.5px; }
.largest-filters .check { font-size: 13px; margin-left: 4px; }
.largest-more > summary { cursor: pointer; font-size: 13px; color: var(--text-2); margin: 8px 0 4px; }
.largest-more ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.largest-more li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }

.likely-role { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); min-width: 58px; }
