/* public/app-dropbox-sync.css -- Dropbox sync: the Documents > Dropbox screen, "Need a home", the Settings card
 * and the stop dialog (see app-dropbox-sync.js).
 *
 * Own tokens (--dbx-*), light and dark, so it looks the same on the Documents screen and inside the Settings
 * modal. Type scale: 11 chips, 12 helper, 13 body, 15 section heads, 20/24 the status line, 28 tile numbers.
 * Body copy is --dbx-strong or --dbx-ink at full contrast; colour and weight carry state only, never prose.
 *
 * Contrast (measured by test/browser/dropbox-sync-screens.test.mjs on every text node, light and dark, >= 4.5:1):
 *   light: strong on card 16.4, ink on card 11.6, mut on card 7.5, white on primary 7.6, bad on bad-bg 6.4,
 *          warn on warn-bg 6.6, ok on card 6.5
 *   dark:  strong on card 13.8, ink on card 10.3, mut on card 6.9, dark on primary 8.9, bad on bad-bg 6.1,
 *          warn on warn-bg 8.3, ok on card 8.1
 */
.dbx, .dbx-dialog {
  --dbx-card: #ffffff; --dbx-paper: #f6f7fb; --dbx-line: #dadde8; --dbx-line-soft: #eceef4;
  --dbx-strong: #161e2e; --dbx-ink: #2b3347; --dbx-mut: #4d5569;
  --dbx-btn: #3b556f; --dbx-btn-ink: #ffffff;
  --dbx-ok: #17694a; --dbx-ok-bg: #e6f2ec;
  --dbx-busy: #2a5585; --dbx-busy-bg: #e8f0f9;
  --dbx-warn: #7a4a00; --dbx-warn-bg: #fdf3dc; --dbx-warn-line: #e3c071;
  --dbx-bad: #a33425; --dbx-bad-bg: #fbefec; --dbx-bad-line: #e3b4ad;
  --dbx-track: #e3e6ef;
  font-family: 'Montserrat', sans-serif; color: var(--dbx-ink); text-transform: none; letter-spacing: normal;
}
body.hl-dark .dbx, body.hl-dark .dbx-dialog {
  --dbx-card: #171f30; --dbx-paper: #121a2a; --dbx-line: #26304a; --dbx-line-soft: #202a40;
  --dbx-strong: #e8edf6; --dbx-ink: #c9d3e4; --dbx-mut: #9cabc6;
  --dbx-btn: #a9bdd3; --dbx-btn-ink: #0f1727;
  --dbx-ok: #5ccf9b; --dbx-ok-bg: #1b3129;
  --dbx-busy: #8db4ff; --dbx-busy-bg: #1c2a45;
  --dbx-warn: #f0c15a; --dbx-warn-bg: #2e2714; --dbx-warn-line: #6b5420;
  --dbx-bad: #f0836b; --dbx-bad-bg: #3a2521; --dbx-bad-line: #6a3a33;
  --dbx-track: #26304a;
}
.dbx, .dbx *, .dbx-dialog, .dbx-dialog * { box-sizing: border-box; text-transform: none; letter-spacing: normal; }
.dbx { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dbx-region { min-width: 0; }
.dbx-region[hidden], .dbx [hidden] { display: none !important; }
.hldoc-dbx-pane { min-width: 0; }

/* ---- buttons ---- */
.dbx-btn {
  min-height: 40px; padding: 0 16px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--dbx-line); background: var(--dbx-card); color: var(--dbx-strong);
  font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 700; line-height: 1.2; box-shadow: none; text-shadow: none;
}
.dbx-btn:hover:not(:disabled) { border-color: var(--dbx-btn); }
.dbx-btn:focus-visible, .dbx-tile:focus-visible, .dbx-cust:focus-visible, .dbx-result:focus-visible, .dbx-folder:focus-visible,
.dbx-field:focus-visible, .dbx-search input:focus-visible, .dbx-guide summary:focus-visible { outline: 2px solid var(--dbx-btn); outline-offset: 2px; }
.dbx-btn:disabled { opacity: .55; cursor: default; }
.dbx-btn.dbx-primary { background: var(--dbx-btn); border-color: var(--dbx-btn); color: var(--dbx-btn-ink); }
.dbx-btn.dbx-primary:disabled { opacity: .5; }
.dbx-btn.dbx-big { min-height: 48px; padding: 0 24px; font-size: 14px; border-radius: 12px; }
.dbx-btn.dbx-small { min-height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.dbx-btn.dbx-quiet { border-color: transparent; background: transparent; color: var(--dbx-ink); }
.dbx-btn.dbx-quiet:hover:not(:disabled) { border-color: var(--dbx-line); }
.dbx-btn.dbx-danger { color: var(--dbx-bad); border-color: var(--dbx-bad); background: var(--dbx-card); }
.dbx-btn.dbx-danger.dbx-solid { background: var(--dbx-bad); border-color: var(--dbx-bad); color: #ffffff; }
body.hl-dark .dbx-btn.dbx-danger.dbx-solid { color: #2a1411; }
.dbx-btn.dbx-segb { min-height: 34px; padding: 0 16px; border-radius: 99px; font-size: 12px; }
.dbx-btn.dbx-segb.on { background: var(--dbx-btn); border-color: var(--dbx-btn); color: var(--dbx-btn-ink); }
.dbx-btn.dbx-folder { white-space: normal; text-align: left; overflow-wrap: anywhere; }

/* ---- the status header ---- */
.dbx-hero { padding: 26px 28px; border: 1px solid var(--dbx-line); border-radius: 16px; background: var(--dbx-card); }
.dbx-hero.dbx-warn { background: var(--dbx-warn-bg); border-color: var(--dbx-warn-line); }
.dbx-hero.dbx-bad { background: var(--dbx-bad-bg); border-color: var(--dbx-bad-line); }
.dbx-hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.dbx-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 12px 0 10px; border-radius: 99px;
  font-size: 12px; font-weight: 800; line-height: 1; border: 1px solid currentColor; background: var(--dbx-card);
}
.dbx-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dbx-pill.dbx-ok { color: var(--dbx-ok); }
.dbx-pill.dbx-busy { color: var(--dbx-busy); }
.dbx-pill.dbx-busy::before { animation: dbx-pulse 1.6s ease-in-out infinite; }
.dbx-pill.dbx-warn { color: var(--dbx-warn); }
.dbx-pill.dbx-bad { color: var(--dbx-bad); }
.dbx-pill.dbx-quiet { color: var(--dbx-mut); }
.dbx-acct { font-size: 12px; font-weight: 600; color: var(--dbx-mut); overflow-wrap: anywhere; }
.dbx-title { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.25; color: var(--dbx-strong); overflow-wrap: anywhere; }
.dbx-detail { margin: 8px 0 0; max-width: 62ch; font-size: 13px; font-weight: 500; line-height: 1.6; color: var(--dbx-ink); }
.dbx-hero.dbx-quiet .dbx-title { font-size: 20px; }
.dbx-bar { position: relative; height: 10px; margin-top: 20px; border-radius: 99px; background: var(--dbx-track); overflow: hidden; }
.dbx-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--dbx-btn); transition: width .6s ease; }
.dbx-bar.is-moving i { width: 38%; animation: dbx-slide 1.4s ease-in-out infinite; }
.dbx-meta { margin-top: 10px; font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--dbx-mut); font-variant-numeric: tabular-nums; }
.dbx-hero.dbx-warn .dbx-meta, .dbx-hero.dbx-bad .dbx-meta { color: var(--dbx-ink); }
.dbx-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 22px; }
.dbx-hint { font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--dbx-mut); margin: 0; }
.dbx-hero .dbx-owner-note { margin-top: 18px; }
.dbx-hero.dbx-warn .dbx-hint, .dbx-hero.dbx-bad .dbx-hint { color: var(--dbx-ink); }
.dbx-pad { padding-top: 10px; }
@keyframes dbx-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(270%); } }
@keyframes dbx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .dbx-bar.is-moving i { animation: none; width: 100%; opacity: .45; }
  .dbx-pill.dbx-busy::before { animation: none; }
  .dbx-bar i { transition: none; }
}

/* ---- four tiles ---- */
.dbx-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dbx-tiles.dbx-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dbx-tile {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 16px 18px; text-align: left; font-family: inherit;
  border: 1px solid var(--dbx-line); border-radius: 14px; background: var(--dbx-card); color: var(--dbx-ink);
}
button.dbx-tile { cursor: pointer; }
button.dbx-tile:hover { border-color: var(--dbx-btn); }
.dbx-tn { font-size: 28px; font-weight: 800; line-height: 1.15; color: var(--dbx-strong); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dbx-tl { font-size: 13px; font-weight: 700; color: var(--dbx-strong); }
.dbx-ts { font-size: 12px; font-weight: 600; color: var(--dbx-mut); }
.dbx-t-warn { background: var(--dbx-warn-bg); border-color: var(--dbx-warn-line); }
.dbx-t-warn .dbx-tn { color: var(--dbx-warn); }
.dbx-t-warn .dbx-ts { color: var(--dbx-ink); }
.dbx-t-bad { background: var(--dbx-bad-bg); border-color: var(--dbx-bad-line); }
.dbx-t-bad .dbx-tn { color: var(--dbx-bad); }
.dbx-t-bad .dbx-ts { color: var(--dbx-ink); }

/* ---- section cards ---- */
.dbx-card { padding: 22px 24px; border: 1px solid var(--dbx-line); border-radius: 16px; background: var(--dbx-card); }
.dbx-card.dbx-warn-card { background: var(--dbx-warn-bg); border-color: var(--dbx-warn-line); }
.dbx-sec-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 16px; }
.dbx-sec-tx { flex: 1 1 260px; min-width: 0; }
.dbx-h { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.3; color: var(--dbx-strong); }
.dbx-sub { margin: 4px 0 0; max-width: 62ch; font-size: 13px; font-weight: 500; line-height: 1.55; color: var(--dbx-ink); }
.dbx-count {
  display: inline-block; min-width: 24px; margin-left: 6px; padding: 2px 9px; border-radius: 99px; text-align: center;
  font-size: 12px; font-weight: 800; line-height: 1.4; font-variant-numeric: tabular-nums; vertical-align: 1px;
  background: var(--dbx-paper); color: var(--dbx-strong); border: 1px solid var(--dbx-line);
}
.dbx-warn-card .dbx-count { background: var(--dbx-card); border-color: var(--dbx-warn-line); color: var(--dbx-warn); }
.dbx-count-bad { background: var(--dbx-bad-bg); color: var(--dbx-bad); border-color: var(--dbx-bad-line); }
.dbx-search { margin-top: 16px; }
.dbx-search input, .dbx-field {
  display: block; width: 100%; min-height: 42px; padding: 0 14px; border: 1px solid var(--dbx-line); border-radius: 10px;
  background: var(--dbx-card); color: var(--dbx-strong); font-family: inherit; font-size: 13px; font-weight: 600; margin: 0;
}
.dbx-search input::placeholder, .dbx-field::placeholder { color: var(--dbx-mut); opacity: 1; font-weight: 500; }
.dbx-undo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; padding: 10px 14px; border: 1px solid var(--dbx-warn-line); border-radius: 10px; background: var(--dbx-card); }
.dbx-undo[hidden] { display: none; }
.dbx-undo-t { flex: 1 1 200px; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--dbx-strong); overflow-wrap: anywhere; }
.dbx-more { margin-top: 14px; }
.dbx-more:empty { display: none; }
.dbx-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 16px; }
.dbx-card > .dbx-btn { margin-top: 14px; }

/* ---- need a home ---- */
.dbx-home-list { margin-top: 8px; }
.dbx-home-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 20px; padding: 18px 0; border-top: 1px solid var(--dbx-warn-line); }
.dbx-home-row:first-child { border-top: 0; }
.dbx-home-row.is-busy { opacity: .6; }
.dbx-home-main { flex: 1 1 280px; min-width: 0; }
.dbx-fname { font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--dbx-strong); overflow-wrap: anywhere; }
.dbx-path { margin-top: 3px; font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--dbx-mut); overflow-wrap: anywhere; }
.dbx-warn-card .dbx-path, .dbx-warn-card .dbx-reason { color: var(--dbx-ink); }
.dbx-sugg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 10px; font-size: 13px; line-height: 1.5; }
.dbx-sugg-l { font-size: 12px; font-weight: 700; color: var(--dbx-mut); }
.dbx-warn-card .dbx-sugg-l { color: var(--dbx-ink); }
.dbx-sugg-t { font-weight: 800; color: var(--dbx-strong); overflow-wrap: anywhere; }
.dbx-sugg-c { font-weight: 600; color: var(--dbx-ink); overflow-wrap: anywhere; }
.dbx-reason { margin-top: 3px; font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--dbx-mut); }
.dbx-home-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.dbx-pick { flex: 1 1 100%; padding: 14px; border: 1px solid var(--dbx-line); border-radius: 12px; background: var(--dbx-card); }
.dbx-seg { display: flex; gap: 6px; margin-bottom: 10px; }
.dbx-results { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.dbx-result {
  display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; text-align: left; cursor: pointer; font-family: inherit;
  border: 1px solid var(--dbx-line); border-radius: 10px; background: var(--dbx-card); color: var(--dbx-strong);
}
.dbx-result:hover { border-color: var(--dbx-btn); background: var(--dbx-paper); }
.dbx-result-t { font-size: 13px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.dbx-result-c { font-size: 12px; font-weight: 600; color: var(--dbx-mut); overflow-wrap: anywhere; }

/* ---- need a home: bulk steps, filters, pages ---- */
.dbx-bulk { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; }
.dbx-bulk:not(:has(.dbx-btn:not([hidden]))) { display: none; }
.dbx-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dbx-filters[hidden] { display: none; }
.dbx-home-list.is-loading { opacity: .55; transition: opacity .15s; }
.dbx-reason.dbx-nomatch { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--dbx-ink); }
.dbx-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding-top: 14px; border-top: 1px solid var(--dbx-line-soft); }
.dbx-pager-n { order: 0; flex: 1 1 auto; min-width: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--dbx-ink); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .dbx-bulk .dbx-btn { flex: 1 1 100%; }
  .dbx-pager .dbx-btn { flex: 1 1 40%; }
  .dbx-pager-n { order: -1; flex: 1 1 100%; }
}

/* ---- customers ---- */
.dbx-cust-list { margin-top: 6px; }
.dbx-cust {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; width: 100%; padding: 14px 4px; text-align: left; cursor: pointer; font-family: inherit;
  border: 0; border-top: 1px solid var(--dbx-line-soft); background: transparent; color: var(--dbx-ink); border-radius: 0;
}
.dbx-cust:first-child { border-top: 0; }
.dbx-cust:hover { background: var(--dbx-paper); }
.dbx-cust-name { flex: 1 1 240px; min-width: 0; font-size: 13px; font-weight: 700; color: var(--dbx-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbx-cust.is-open .dbx-cust-name { white-space: normal; overflow-wrap: anywhere; }
.dbx-cust-line { flex: 1 1 300px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.dbx-mini { flex: 1 1 80px; min-width: 60px; height: 6px; border-radius: 99px; background: var(--dbx-track); overflow: hidden; }
.dbx-mini i { display: block; height: 100%; border-radius: 99px; background: var(--dbx-btn); }
.dbx-c-done .dbx-mini i { background: var(--dbx-ok); }
.dbx-c-problem .dbx-mini i { background: var(--dbx-bad); }
.dbx-c-needs_home .dbx-mini i { background: var(--dbx-warn); }
.dbx-cust-n { flex: none; min-width: 96px; font-size: 12px; font-weight: 600; color: var(--dbx-mut); font-variant-numeric: tabular-nums; text-align: right; }
.dbx-chip {
  flex: none; min-width: 92px; padding: 3px 10px; border-radius: 99px; text-align: center; font-size: 11px; font-weight: 800; line-height: 1.4;
  border: 1px solid var(--dbx-line); color: var(--dbx-mut); background: var(--dbx-card);
}
.dbx-chip-done { color: var(--dbx-ok); border-color: var(--dbx-ok); }
.dbx-chip-copying { color: var(--dbx-busy); border-color: var(--dbx-busy); }
.dbx-chip-problem { color: var(--dbx-bad); border-color: var(--dbx-bad); }
.dbx-chip-needs_home { color: var(--dbx-warn); border-color: var(--dbx-warn); }

/* ---- everything in Dropbox, and the folders ---- */
.dbx-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 20px; margin-top: 18px; }
.dbx-fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dbx-fn { font-size: 28px; font-weight: 800; line-height: 1.15; color: var(--dbx-strong); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dbx-fl { font-size: 13px; font-weight: 700; color: var(--dbx-mut); }
.dbx-storage { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--dbx-line-soft); }
.dbx-storage-t { font-size: 13px; font-weight: 800; color: var(--dbx-strong); }
.dbx-storage .dbx-bar-card { margin-top: 10px; height: 8px; }
.dbx-storage .dbx-meta { margin-top: 8px; }
.dbx-storage-warn .dbx-bar i { background: var(--dbx-warn); }
.dbx-storage-full .dbx-bar i { background: var(--dbx-bad); }
.dbx-flist { margin-top: 8px; }
.dbx-fcols { display: none; }
.dbx-frow { display: flex; flex-direction: column; gap: 10px; padding: 18px 0; border-top: 1px solid var(--dbx-line-soft); }
.dbx-flist > .dbx-frow:first-of-type { border-top: 0; }
.dbx-fhead { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dbx-frow-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dbx-frow-top .dbx-fname { min-width: 0; font-size: 15px; }
.dbx-frow-line { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dbx-frow-line .dbx-cust-n { min-width: 0; text-align: left; }
.dbx-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 360px; }
.dbx-who-l { font-size: 12px; font-weight: 700; color: var(--dbx-mut); }
.dbx-who-fixed { font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--dbx-strong); }
.dbx-select { min-height: 40px; cursor: pointer; appearance: auto; }
/* "Only these people": who is on the list, under the choice; and the picker. */
.dbx-who-people { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.dbx-who-names { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--dbx-strong); overflow-wrap: anywhere; }
.dbx-who-edit { margin-left: -12px; text-decoration: underline; text-underline-offset: 3px; }
.dbx-dialog-people { width: min(520px, calc(100vw - 32px)); }
.dbx-dialog-people .dbx-dialog-box { display: flex; flex-direction: column; max-height: calc(100vh - 34px); }
.dbx-people-find { margin: 14px 0 10px; flex: none; }
.dbx-people-list { flex: 1 1 auto; min-height: 120px; overflow-y: auto; border: 1px solid var(--dbx-line); border-radius: 12px; }
.dbx-person { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border-top: 1px solid var(--dbx-line-soft); cursor: pointer; }
.dbx-person:first-child { border-top: 0; }
.dbx-person:hover { background: var(--dbx-paper); }
.dbx-person input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--dbx-btn); cursor: pointer; }
.dbx-person input:disabled { cursor: default; }
.dbx-person input:focus-visible { outline: 2px solid var(--dbx-btn); outline-offset: 2px; }
.dbx-person-tx { display: flex; flex-direction: column; min-width: 0; }
.dbx-person-n { font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--dbx-strong); overflow-wrap: anywhere; }
.dbx-person-e { font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--dbx-mut); overflow-wrap: anywhere; }
.dbx-people-none { padding: 22px 14px; font-size: 13px; font-weight: 600; color: var(--dbx-mut); text-align: center; }
.dbx-people-count { flex: none; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--dbx-ink); }
.dbx-dialog-people .dbx-dialog-acts { flex: none; }
.dbx-select:disabled { opacity: .6; cursor: default; }
.dbx-chip-quiet { color: var(--dbx-mut); }
.dbx-f-paused .dbx-mini i { background: var(--dbx-warn); }
.dbx-f-done .dbx-mini i { background: var(--dbx-ok); }
.dbx-f-problem .dbx-mini i { background: var(--dbx-bad); }
.dbx-skel-row { height: 92px; border-radius: 12px; }
/* The rows lay themselves out by the width of the LIST (the Documents screen has side panels, so the screen's width says nothing):
 * narrow = stacked; middle = name and bar across the top, then who can see it beside the pause; wide = a table with column heads. */
.dbx-r-folders { container-type: inline-size; }
.dbx-fhead { grid-area: head; }
.dbx-frow-line { grid-area: line; }
.dbx-who { grid-area: who; }
.dbx-frow-act { grid-area: act; }
.dbx-frow-act:empty { display: none; }
.dbx-frow-act .dbx-btn { width: 100%; }
@container (min-width: 520px) {
  .dbx-frow { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'head head' 'line line' 'who act'; gap: 10px 20px; align-items: end; }
  .dbx-frow-act .dbx-btn { width: auto; }
  .dbx-who { max-width: 340px; }
}
@container (min-width: 840px) {
  .dbx-fcols, .dbx-frow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 230px 128px; grid-template-areas: 'head line who act'; column-gap: 24px; align-items: center; }
  .dbx-fcols { padding: 4px 0 8px; font-size: 12px; font-weight: 700; color: var(--dbx-mut); border-bottom: 1px solid var(--dbx-line-soft); }
  .dbx-frow { padding: 14px 0; }
  .dbx-frow-line { flex-direction: column; align-items: stretch; gap: 6px; }
  .dbx-frow-line .dbx-mini { flex: none; width: 100%; }
  .dbx-who-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dbx-frow-act { display: flex; justify-content: flex-end; }
  .dbx-frow-act .dbx-btn { width: auto; }
}

/* ---- couldn't copy ---- */
.dbx-prob-list { margin-top: 8px; }
.dbx-prob-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 0; border-top: 1px solid var(--dbx-line-soft); }
.dbx-prob-row:first-child { border-top: 0; }
.dbx-prob-main { flex: 1 1 260px; min-width: 0; }

/* ---- controls ---- */
.dbx-ctl-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.dbx-ctl-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- first-time guide ---- */
.dbx-guide { border: 1px solid var(--dbx-line); border-radius: 16px; background: var(--dbx-card); padding: 0 24px; }
.dbx-guide summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 20px 0; cursor: pointer; font-size: 15px; color: var(--dbx-strong); }
.dbx-guide summary b { font-weight: 800; }
.dbx-guide summary span { font-size: 12px; font-weight: 600; color: var(--dbx-mut); }
.dbx-steps { list-style: none; margin: 0; padding: 0 0 12px; }
.dbx-step { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--dbx-line-soft); }
.dbx-n {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  font-size: 13px; font-weight: 800; background: var(--dbx-paper); color: var(--dbx-strong); border: 1px solid var(--dbx-line);
}
.dbx-step.is-done .dbx-n { background: var(--dbx-ok-bg); color: var(--dbx-ok); border-color: var(--dbx-ok); }
.dbx-step-main { flex: 1; min-width: 0; }
.dbx-step-t { font-size: 14px; font-weight: 800; line-height: 1.4; color: var(--dbx-strong); }
.dbx-done { margin-left: 10px; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; color: var(--dbx-ok); background: var(--dbx-ok-bg); border: 1px solid var(--dbx-ok); vertical-align: 1px; }
.dbx-step-main p { margin: 4px 0 0; font-size: 13px; font-weight: 500; line-height: 1.6; color: var(--dbx-ink); }
.dbx-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--dbx-line); border-radius: 10px; background: var(--dbx-paper); }
.dbx-code .dbx-btn { flex: none; }
.dbx-code code { flex: 1 1 0; min-width: 0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; font-weight: 600; color: var(--dbx-strong); overflow-wrap: anywhere; }

/* ---- the PC: the code to connect it, and how it is doing ---- */
.dbx-pair { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-top: 18px; padding: 18px 20px; border: 1px solid var(--dbx-line); border-radius: 14px; background: var(--dbx-paper); }
.dbx-pair.is-empty { border-style: dashed; }
.dbx-pair-code { flex: 1 1 auto; min-width: 0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: .1em; color: var(--dbx-strong); overflow-wrap: anywhere; user-select: all; }
.dbx-pair-none { flex: 1 1 200px; font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--dbx-strong); }
.dbx-pair-note { margin-top: 10px; }
.dbx-pair-steps { margin-top: 10px; padding-bottom: 0; }
.dbx-pair-steps .dbx-step:last-child { padding-bottom: 0; }
.dbx-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--dbx-btn); text-decoration: underline; text-underline-offset: 3px; }
.dbx-gap { margin-top: 16px; }
.dbx-pc-name { overflow-wrap: anywhere; }
.dbx-stats { display: flex; flex-direction: column; max-width: 520px; margin-top: 16px; border-top: 1px solid var(--dbx-line-soft); }
.dbx-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 20px; padding: 12px 0; border-bottom: 1px solid var(--dbx-line-soft); }
.dbx-stat-l { flex: none; font-size: 13px; font-weight: 600; color: var(--dbx-mut); }
.dbx-stat-v { min-width: 0; font-size: 15px; font-weight: 800; line-height: 1.35; text-align: right; color: var(--dbx-strong); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dbx-st-warn .dbx-stat-v { color: var(--dbx-warn); }
.dbx-pc-note { margin-top: 12px; max-width: 70ch; }
.dbx-pc-note.dbx-pc-body { font-size: 14px; font-weight: 500; line-height: 1.55; color: var(--dbx-ink); }
.dbx-pc-note.dbx-pc-warn { padding-left: 12px; border-left: 3px solid var(--dbx-warn-line); }
.dbx-pc-acts { margin-top: 18px; }
.dbx-pc-card .dbx-pill { margin-left: 6px; vertical-align: 1px; }

/* ---- empty, loading, error ---- */
.dbx-empty { display: flex; flex-direction: column; gap: 3px; padding: 22px 8px; text-align: center; }
.dbx-empty b { font-size: 14px; font-weight: 800; color: var(--dbx-strong); }
.dbx-empty span { font-size: 13px; font-weight: 500; color: var(--dbx-ink); }
.dbx-error { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px 24px; border: 1px solid var(--dbx-bad-line); border-radius: 16px; background: var(--dbx-bad-bg); }
.dbx-error b { font-size: 15px; font-weight: 800; color: var(--dbx-bad); }
.dbx-error span { font-size: 13px; font-weight: 500; color: var(--dbx-ink); }
.dbx-error .dbx-btn { margin-top: 8px; }
.dbx-card .dbx-error { padding: 16px; margin-top: 12px; }
.dbx-skel-wrap { display: flex; flex-direction: column; gap: 16px; }
.dbx-skel { border-radius: 14px; background: var(--dbx-track); animation: dbx-pulse 1.6s ease-in-out infinite; }
.dbx-skel-hero { height: 190px; }
.dbx-skel-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dbx-skel-tiles .dbx-skel { height: 92px; }
.dbx-skel-line { height: 38px; width: 100%; }
@media (prefers-reduced-motion: reduce) { .dbx-skel { animation: none; } }

/* ---- stop dialog ---- */
.dbx-dialog { position: fixed; inset: 0; margin: auto; max-height: calc(100vh - 32px); width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--dbx-line); border-radius: 16px; background: var(--dbx-card); color: var(--dbx-strong); }
.dbx-dialog::backdrop { background: rgba(10, 15, 25, .6); }
.dbx-dialog-box { padding: 26px; }
.dbx-dialog-t { margin: 0 0 10px; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--dbx-strong); }
.dbx-dialog-box p { margin: 0 0 6px; font-size: 14px; font-weight: 500; line-height: 1.55; color: var(--dbx-strong); }
.dbx-dialog-box .dbx-dialog-fine { font-size: 13px; color: var(--dbx-ink); }
.dbx-dialog-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---- Settings > Integrations card ---- */
.dbx-cardmount { display: block; margin-top: 12px; }
.dbx-mini-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border: 1px solid var(--dbx-line); border-radius: 12px; background: var(--dbx-card); }
.dbx-mini-tx { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dbx-mini-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dbx-mini-t { font-size: 13px; font-weight: 800; color: var(--dbx-strong); }
.dbx-mini-s { font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--dbx-ink); overflow-wrap: anywhere; }
.dbx-mini-s.dbx-bad { color: var(--dbx-bad); }
#hlmodal.hlset-modal .dbx-cardmount .dbx-mini-s { color: var(--dbx-ink); text-transform: none; }
#hlmodal.hlset-modal .dbx-cardmount .dbx-mini-s.dbx-bad { color: var(--dbx-bad); }
#hlmodal.hlset-modal .dbx-cardmount .dbx-pill { text-transform: none; }

/* ---- the Documents entry ---- */
#hldoc-scope-dropbox .dbx-dot { display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; vertical-align: 1px; background: currentColor; }
#hldoc-scope-dropbox .dbx-dot.dbx-bad { color: #b33a2b; }
#hldoc-scope-dropbox .dbx-dot.dbx-warn { color: #8a5300; }
#hldoc-scope-dropbox .dbx-dot.dbx-busy { color: #2a5585; }
body.hl-dark #hldoc-scope-dropbox .dbx-dot.dbx-bad { color: #f0836b; }
body.hl-dark #hldoc-scope-dropbox .dbx-dot.dbx-warn { color: #f0c15a; }
body.hl-dark #hldoc-scope-dropbox .dbx-dot.dbx-busy { color: #8db4ff; }

/* ---- phone ---- */
@media (max-width: 640px) {
  .dbx { gap: 14px; }
  .dbx-hero { padding: 20px 18px; border-radius: 14px; }
  .dbx-title { font-size: 20px; }
  .dbx-hero.dbx-quiet .dbx-title { font-size: 19px; }
  .dbx-acts .dbx-btn.dbx-big { flex: 1 1 100%; }
  .dbx-tiles, .dbx-tiles.dbx-two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dbx-tile { padding: 14px; }
  .dbx-tn { font-size: 24px; }
  .dbx-card { padding: 18px 16px; border-radius: 14px; }
  .dbx-guide { padding: 0 16px; border-radius: 14px; }
  .dbx-home-acts { margin-left: 0; width: 100%; }
  .dbx-home-acts .dbx-btn { flex: 1 1 auto; }
  .dbx-sec-head > .dbx-btn { width: 100%; }
  .dbx-cust-name { flex-basis: 100%; }
  .dbx-cust-line { flex-basis: 100%; }
  .dbx-ctl-row { width: 100%; }
  .dbx-ctl-row .dbx-btn { flex: 1 1 auto; }
  .dbx-skel-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dbx-dialog-acts .dbx-btn { flex: 1 1 auto; }
  .dbx-step { gap: 12px; }
  .dbx-pair { padding: 16px; }
  .dbx-pair-code { font-size: 28px; flex-basis: 100%; }
  .dbx-pair .dbx-btn { width: 100%; }
  .dbx-pc-acts .dbx-btn { flex: 1 1 100%; }
  .dbx-who { max-width: none; }
  .dbx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dbx-fn { font-size: 24px; }
}
