/* ── Themes (copied from app.css so the theme switcher works standalone) ── */
:root[data-theme="dark"] {
  --bg:            #0d0d10;
  --surface:       #16161c;
  --surface-hover: #1e1e28;
  --text:          #e2e2ea;
  --text-muted:    #9090a8;   /* 6:1 on surface — WCAG AA */
  --accent:        #7b68ee;
  --accent-dim:    #5548c8;
  --accent-glow:   rgba(123,104,238,0.15);
  --border:        #252530;
  --error:         #e05c5c;
  --success:       #5cb870;
  --range-track:   #35354a;
}
:root[data-theme="light"] {
  --bg:            #f5f5f7;
  --surface:       #ffffff;
  --surface-hover: #ededf5;
  --text:          #1a1a2e;
  --text-muted:    #656580;   /* 5.6:1 on white — WCAG AA */
  --accent:        #6c5ce7;
  --accent-dim:    #5048c0;
  --accent-glow:   rgba(108,92,231,0.12);
  --border:        #dedee8;
  --error:         #d63031;
  --success:       #00b894;
  --range-track:   #c0c0d0;
}
:root[data-theme="ocean"] {
  --bg:            #0a1628;
  --surface:       #0f2040;
  --surface-hover: #162a50;
  --text:          #c8e6f5;
  --text-muted:    #5d9ab8;   /* 5.3:1 on surface — WCAG AA */
  --accent:        #00cec9;
  --accent-dim:    #00a8a4;
  --accent-glow:   rgba(0,206,201,0.12);
  --border:        #1a3050;
  --error:         #ff7675;
  --success:       #55efc4;
  --range-track:   #2a4060;
}
:root[data-theme="sunset"] {
  --bg:            #1a0a10;
  --surface:       #26101a;
  --surface-hover: #321525;
  --text:          #f5e0d0;
  --text-muted:    #c09080;   /* 6.5:1 on surface — WCAG AA */
  --accent:        #fd7c6e;
  --accent-dim:    #e05a4e;
  --accent-glow:   rgba(253,124,110,0.12);
  --border:        #3a1820;
  --error:         #ff4757;
  --success:       #7bed9f;
  --range-track:   #4a2530;
}

:root {
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --radius: 8px;

  /* Danger tokens — derived from --error. --danger is for borders/icons/accents,
     never for body text on the tint (contrast). */
  --danger:        var(--error);
  --danger-bg:     rgba(224,92,92,0.10);
  --danger-border: rgba(224,92,92,0.35);
  /* Solid danger button bg darkened so white text passes AA at normal weight. */
  --danger-solid:  #c0392b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

/* ── Header (reused from app.css) ── */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo span { color: var(--accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
  line-height: 1;
  margin-bottom: -1px;
}
.nav-link:hover { color: var(--text); }
.nav-link--active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-switcher {
  display: flex;
  gap: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px;
}
.theme-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
}
.theme-dot:hover { transform: scale(1.15); }
.theme-dot[data-theme="dark"]   { background: linear-gradient(135deg, #0d0d10 50%, #7b68ee 50%); }
.theme-dot[data-theme="light"]  { background: linear-gradient(135deg, #f5f5f7 50%, #6c5ce7 50%); }
.theme-dot[data-theme="ocean"]  { background: linear-gradient(135deg, #0a1628 50%, #00cec9 50%); }
.theme-dot[data-theme="sunset"] { background: linear-gradient(135deg, #1a0a10 50%, #fd7c6e 50%); }
.theme-dot.active { border-color: var(--accent); }
.theme-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Admin banner ── */
.admin-banner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  font-size: 13px;
  color: var(--text);
  background: var(--danger-bg);
  border-bottom: 1px solid var(--danger-border);
  border-left: 3px solid var(--danger);
}
.admin-banner-icon { font-size: 14px; line-height: 1; }

/* ── Layout ── */
main {
  padding: var(--space-5);
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: var(--space-7);
}

.admin-section { display: block; }

.section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.section-title--danger { color: var(--danger); }
.section-title--files {
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: normal;
  font-size: 16px;
  color: var(--text);
}

/* ── Button system ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  color: var(--text);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:disabled { opacity: 0.6; cursor: default; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dim); border-color: var(--accent-dim); }

.btn-neutral {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-neutral:hover:not(:disabled) { background: var(--surface-hover); }

.btn-destructive-outline {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-destructive-outline:hover:not(:disabled) { background: var(--danger-bg); }

/* Solid danger: white text on darkened red so contrast passes AA. */
.btn-destructive-solid {
  background: var(--danger-solid);
  border-color: var(--danger-solid);
  color: #fff;
  font-weight: 600;
}
.btn-destructive-solid:hover:not(:disabled) { filter: brightness(1.1); }

.btn-sm { padding: var(--space-1) var(--space-3); font-size: 13px; }

/* ── Drop zone (reused) ── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px var(--space-5);
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
  position: relative;
}
.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--text);
}
.drop-zone:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop-zone .drop-icon { font-size: 40px; margin-bottom: var(--space-3); }
.drop-zone p { font-size: 14px; pointer-events: none; color: var(--text); }
.drop-zone small { font-size: 12px; color: var(--text-muted); pointer-events: none; }

/* ── Upload queue ── */
.upload-queue {
  list-style: none;
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-1);
}
.upload-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-size: 14px;
}
.upload-item:hover { background: var(--surface-hover); }
.upload-item-icon { flex-shrink: 0; color: var(--text-muted); }
.upload-item-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-item-status {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-muted);
}
.upload-item-status.is-created { color: var(--success); }
.upload-item-status.is-deduped { color: var(--text-muted); }
.upload-item-status.is-error   { color: var(--danger); }

/* Inline progress bar — reuses .progress geometry */
.progress {
  position: relative;
  width: 90px;
  height: 4px;
  border-radius: 2px;
  background: var(--range-track);
  overflow: hidden;
}
.progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--accent);
  transition: width 100ms linear;
}
.upload-item-pct { font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }

/* ── Danger zone card ── */
.danger-zone {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.danger-copy {
  font-size: 14px;
  color: var(--text);
  margin-bottom: var(--space-4);
  max-width: 60ch;
}
.danger-copy strong { font-weight: 600; }

.prune-results { margin-top: var(--space-4); }
.prune-results:empty { margin-top: 0; }

.result-panel {
  border-radius: var(--radius);
  padding: var(--space-4);
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.result-panel.is-success { border-color: var(--success); }
.result-panel.is-warning { border-color: var(--danger-border); }
.result-panel.is-error   { border-color: var(--danger); }
.result-panel-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.result-panel.is-success .result-panel-icon { color: var(--success); }
.result-panel.is-warning .result-panel-icon,
.result-panel.is-error   .result-panel-icon { color: var(--danger); }

.dangling-list {
  list-style: none;
  margin: var(--space-3) 0;
  display: grid;
  gap: var(--space-1);
  max-height: 240px;
  overflow-y: auto;
}
.dangling-list li {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-size: 13px;
  padding: var(--space-1) 0;
}
.dangling-name { color: var(--text); }
.dangling-hash {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, monospace;
}

/* ── Files table ── */
.files-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.files-search input[type="search"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: var(--space-2) var(--space-3);
  min-width: 220px;
}
.files-search input[type="search"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.files-table-wrap {
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.files-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.files-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.files-table .col-size,
.files-table .col-actions { text-align: right; }

.files-table tbody tr { transition: background 120ms ease; }
.files-table tbody tr:hover { background: var(--surface-hover); }
.files-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.files-table tbody tr:last-child td { border-bottom: none; }

.cell-title { font-weight: 500; }
.cell-title.is-fallback { font-weight: 400; font-style: italic; color: var(--text-muted); }
.cell-hash {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, monospace;
  margin-top: 2px;
}
.cell-muted { color: var(--text-muted); }
.cell-size {
  text-align: right;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cell-actions { text-align: right; white-space: nowrap; }

/* Inline delete confirm */
.delete-confirm {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: flex-end;
}
.delete-confirm-label { font-size: 13px; color: var(--text); }
.row-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Table-level states */
.table-state-row td {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-6) var(--space-4);
}
.empty-state { color: var(--text-muted); }
.empty-state .drop-icon { font-size: 40px; }
.empty-state p { margin-top: var(--space-2); font-size: 14px; }

/* Row removal animation */
@keyframes rowOut {
  to { opacity: 0; }
}
.row-removing td {
  animation: rowOut 150ms ease forwards;
}

/* ── Modal (reused from app.css) ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-5);
  width: min(440px, calc(100vw - 2 * var(--space-5)));
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.modal-header h2 { font-size: 16px; font-weight: 600; }
.modal-body { font-size: 14px; color: var(--text); margin-bottom: var(--space-5); }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-3); }
.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: var(--space-1);
  border-radius: 4px;
}
.btn-close:hover { color: var(--text); background: var(--surface-hover); }
.btn-close:focus-visible { outline: 2px solid var(--accent); }

/* ── Toasts ── */
.toast-stack {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: min(360px, calc(100vw - 2 * var(--space-5)));
  pointer-events: none;
}
#toastAlert { bottom: auto; top: var(--space-5); }
.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-3);
  font-size: 13px;
  color: var(--text);
  pointer-events: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.toast.is-success { border-left-color: var(--success); }
.toast.is-error   { border-left-color: var(--danger); }
.toast-icon { flex-shrink: 0; }
.toast.is-success .toast-icon { color: var(--success); }
.toast.is-error .toast-icon   { color: var(--danger); }
.toast-msg { flex: 1; min-width: 0; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
}
.toast-close:hover { color: var(--text); }
.toast-close:focus-visible { outline: 2px solid var(--accent); }

/* ── Responsive: collapse table to cards below 640px ── */
@media (max-width: 640px) {
  .drop-zone { padding: 24px var(--space-4); }

  .files-table-wrap { border: none; max-height: none; overflow: visible; }
  .files-table thead { display: none; }
  .files-table,
  .files-table tbody,
  .files-table tr,
  .files-table td { display: block; width: 100%; }

  .files-table tbody tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
    padding: var(--space-2);
  }
  .files-table tbody td {
    border-bottom: none;
    padding: var(--space-1) var(--space-2);
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    text-align: left;
  }
  .files-table tbody td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    flex-shrink: 0;
  }
  .files-table td.cell-title-td::before { align-self: flex-start; }
  .cell-size { text-align: right; }
  .cell-actions { display: block; }
  .cell-actions .btn,
  .cell-actions .delete-confirm { width: 100%; }
  .cell-actions .delete-confirm { justify-content: stretch; flex-wrap: wrap; }
  .cell-actions .delete-confirm .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .row-removing td { animation: none; opacity: 0; }
  .row-spinner { animation-duration: 2s; }
  .progress-fill { transition: none; }
}

/* ── Auth: header user area + login overlay ── */
.user-area {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-right: var(--space-4);
}
.user-name {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
}
.login-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.login-form input {
  padding: var(--space-2) var(--space-3);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}
.login-form input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.login-error {
  color: var(--error);
  font-size: 0.9rem;
  margin: var(--space-1) 0 0;
}

/* ── Phase 3c: content-access management ─────────────────────────────────── */

/* Inline control rows (group create, add-member, grant form). */
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-3);
}
.inline-form input[type="text"] {
  flex: 1 1 180px;
  padding: var(--space-2) var(--space-3);
  background: var(--bg, var(--surface));
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}

/* Per-file access controls in the files table. */
.access-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.guest-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 13px;
  white-space: nowrap;
}
.license-select,
.grant-input {
  padding: var(--space-1) var(--space-2);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
}
.grant-input[hidden] { display: none; }

/* Group cards. */
.groups-list,
.users-list {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

/* Users section. */
.user-head-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.role-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px var(--space-2);
  border-radius: var(--radius);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.role-badge.is-disabled {
  background: color-mix(in srgb, var(--danger, #c0392b) 18%, transparent);
  border-color: var(--danger, #c0392b);
  color: var(--danger, #c0392b);
}
.role-badge.is-you {
  background: color-mix(in srgb, var(--accent, #4a90d9) 18%, transparent);
  border-color: var(--accent, #4a90d9);
  color: var(--accent, #4a90d9);
}
.role-checks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-3);
}
.role-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
}

/* Access-denied / sign-in-required notice shown when a user without admin
   rights opens this page. */
.access-denied {
  max-width: 28rem;
  margin: var(--space-7, 4rem) auto;
  padding: var(--space-6, 2rem);
  text-align: center;
  display: grid;
  gap: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.access-denied h1 { margin: 0; font-size: 1.4rem; }
.access-denied p { margin: 0; color: var(--text-muted); }
.access-denied .btn { justify-self: center; text-decoration: none; }
.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
}
.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.group-name { margin: 0; font-size: 1.05rem; }
.group-sub {
  margin: var(--space-4) 0 var(--space-2);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.member-list,
.grant-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.member-list li,
.grant-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-hover);
  border-radius: var(--radius);
  font-size: 14px;
}

/* Auto-publish policy. */
.autoderive-form { margin-top: var(--space-4); display: grid; gap: var(--space-4); }
.check-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.license-allowlist {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  display: grid;
  gap: var(--space-2);
}
.license-allowlist legend {
  padding: 0 var(--space-2);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Deep verify / prune reasons ─────────────────────────────────────────── */
.deep-verify-row {
  margin: var(--space-3) 0 var(--space-4);
  align-items: flex-start;
  max-width: 60ch;
}
.dangling-reason {
  margin-left: auto;
  padding: 2px var(--space-2);
  border-radius: var(--radius);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
}
.dangling-reason.is-missing { color: var(--text-muted); }
.dangling-reason.is-corrupt {
  color: var(--error);
  border-color: var(--danger);
}
