/* Database monitoring: the product windows are the app itself, written in HTML (no replay).
   .dbx is the window's 16:9 frame; .dbm inside it is the app at a fixed design size of 1600 × 900,
   scaled to the frame by page.js (and by the inline script after the hero, so the first paint fits). */

@font-face { font-family: "DBM Sans"; src: url("/assets/replays/media/nunito-sans-latin-400-normal-HWPEPWB4.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DBM Sans"; src: url("/assets/replays/media/nunito-sans-latin-600-normal-UK7DIX5B.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DBM Sans"; src: url("/assets/replays/media/nunito-sans-latin-700-normal-VTSBZD4A.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DBM Mono"; src: url("/assets/replays/media/inconsolata-latin-600-normal-HOJHQ32P.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

/* ───── window frame ───── */
/* the window chrome, as replay.css draws it for product replays (this page loads no replay) */
.cxw { position: relative; isolation: isolate; border-radius: 16px; border: 1px solid var(--line-2); background: #0b0b0c;
  box-shadow: 0 60px 140px -50px rgba(19,233,137,.35), 0 40px 90px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05); }
.cxw-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #161618, #111113); }
.cxw-bar > i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgb(0 0 0 / .25); }
.cxw-bar > i:nth-child(2) { background: #febc2e; }
.cxw-bar > i:nth-child(3) { background: #28c840; }
.cxw-bar > span:not(.cxw-live) { flex: 1; min-width: 0; margin-left: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cxw-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; font-style: normal; color: var(--accent); }
.cxw-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
@media (max-width: 560px) { .cxw-live { display: none; } }
.cxw.dbw { overflow: visible; }
.dbw .cxw-bar { border-radius: 15px 15px 0 0; }
.dbx { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0 0 15px 15px; background: #1c1c1c; container-type: inline-size; }
@media (max-width: 700px) { .dbx { aspect-ratio: 4 / 3; } } /* the cropped phone view (page.js) shows the panel's full height */
.dbm {
  --k: .6;
  position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform: scale(var(--k)) translateX(var(--x, 0px)); transform-origin: 0 0;
  display: grid; grid-template-columns: 170px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  font-family: "DBM Sans", "Nunito Sans", system-ui, sans-serif; font-size: 13px; line-height: 1.35; color: #e4e4e6;
  background: var(--a-bg); text-align: left; -webkit-font-smoothing: antialiased; letter-spacing: 0;
  /* app palette */
  --a-bg: #1c1c1c; --a-side: #202020; --a-card: #202020; --a-card2: #242425; --a-line: #2d2d2e; --a-line2: #3a3a3c; /* the app's shell, measured from its own stylesheet */
  --a-fg: #ffffff; --a-fg2: #ababb1; --a-fg3: #84848b; --a-green: #2aa968; --a-green-bg: rgb(42 169 104 / .16);
  --a-amber: #e5b94e; --a-amber-bg: rgb(229 185 78 / .16); --a-red: #ef6b6b; --a-red-bg: rgb(239 107 107 / .16); --a-blue: #5b8cff;
}
.dbm *, .dbm *::before, .dbm *::after { box-sizing: border-box; }
.dbm button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.dbm code, .dbm .mono { font-family: "DBM Mono", ui-monospace, Menlo, monospace; font-size: 12.5px; letter-spacing: 0; }
.dbm svg { flex: none; }

/* ───── global sidebar: the app's own (its icons, logo, sizes and colours, taken from a baked still) ───── */
.dbm-side { display: flex; flex-direction: column; padding: 12px 0 8px; background: var(--a-side); border-right: 1px solid var(--a-line); overflow: hidden; font-size: 12px; line-height: 18px; }
.dbm-brand { display: flex; align-items: center; justify-content: space-between; height: 24px; margin: 5px 12px 7px 16px; }
.dbm-logo svg { display: block; width: 104px; height: 23px; --logo-color: #fff; }
.dbm-collapse svg { display: block; width: 18px; height: 18px; color: var(--a-fg2); }
.dbm-nav { display: flex; align-items: center; gap: 8px; height: 24px; margin: 0 8px 3px; padding: 0 8px; border-radius: 4px; color: #fff; white-space: nowrap; }
.dbm-nav b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.dbm-nav svg { width: 18px; height: 18px; color: var(--a-fg2); }
.dbm-nav.on, .dbm-nav.on svg { color: var(--a-green); }
.dbm-search { height: 32px; margin-bottom: 10px; padding: 2px 5px 2px 8px; border-radius: 6px; }
.dbm-nav kbd { margin-left: auto; height: 20px; padding: 0 6px; border-radius: 4px; background: rgb(171 171 177 / .2); color: var(--a-fg2); font: 400 12px/20px "DBM Sans", system-ui; }
.dbm-side h6 { margin: 0 16px 2px; font-size: 12px; font-weight: 400; line-height: 18px; color: var(--a-fg2); }
.dbm-side .dbm-nav + h6 { margin-top: 12px; }
.dbm-side hr { height: 1px; margin: 8px 16px 8px; border: 0; background: var(--a-line); }
.dbm-user { display: flex; align-items: center; gap: 8px; margin: auto 8px 0; padding: 1px 4px; height: 36px; }
.dbm-user i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #eeaeae; color: #202020; font: normal 600 11px/1 "DBM Sans", system-ui; }
.dbm-user b { display: block; font-weight: 600; color: #fff; }
.dbm-user small { display: block; font-size: 11px; font-weight: 600; line-height: 16px; color: var(--a-fg2); }

/* ───── main: drawer header, entity header, body ───── */
.dbm-main { display: grid; grid-template-rows: 38px auto minmax(0, 1fr); min-width: 0; }
.dbm-top { display: flex; align-items: center; gap: 9px; padding: 0 16px; border-bottom: 1px solid var(--a-line); color: #d6d6da; font-size: 12.5px; }
.dbm-top svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dbm-top .sp { margin-left: auto; }
.dbm-top button { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--a-fg2); }
.dbm-top button:hover { background: #26262a; color: #fff; }

.dbm-head { padding: 13px 16px 12px; border-bottom: 1px solid var(--a-line); }
.dbm-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dbm-row + .dbm-row { margin-top: 10px; }
.dbm[data-narrow] .dbm-head, .dbm[data-narrow] .dbm-top { padding-left: 192px; } /* the phone crop starts at x 340: bring the header into it */
.dbm-crumb { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 6px; background: #26262a; font-size: 12.5px; color: #d9d9dd; }
.dbm-crumb svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.dbm-crumb:hover { background: #2e2e33; }
.dbm-title { font-size: 19px; font-weight: 700; color: #f4f4f5; letter-spacing: -.01em; }
.dbm-k { color: #d9d9dd; font-size: 13.5px; }
.dbm-v { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 5px; background: #26262a; color: #d9d9dd; font-size: 12.5px; }
.dbm-v.mono { font-size: 11.5px; }
.dbm-row .dbm-k:not(:first-child) { margin-left: 4px; }

/* pills */
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: #2a2a2f; color: #cfcfd3; }
.pill.ok { background: var(--a-green-bg); color: #7fdca6; }
.pill.warn { background: var(--a-amber-bg); color: var(--a-amber); }
.pill.bad { background: var(--a-red-bg); color: #ff8f8f; }
.pill.dim { background: #26262a; color: var(--a-fg2); font-weight: 400; }
.pill.q { height: 19px; background: transparent; box-shadow: inset 0 0 0 1px rgb(82 196 131 / .55); color: var(--a-green); font-weight: 600; cursor: pointer; }
.pill.q:hover { background: var(--a-green-bg); }

/* collection segmented control + time picker */
.dbm-coll { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.dbm-coll > span { font-size: 10.5px; letter-spacing: .08em; color: var(--a-fg3); }
.seg { display: inline-flex; padding: 2px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--a-line2); }
.seg button { height: 24px; padding: 0 10px; border-radius: 5px; color: #d6d6da; font-size: 12.5px; }
.seg button:hover { color: #fff; }
.seg button[aria-pressed="true"] { background: var(--a-green-bg); color: var(--a-green); }
.dbm-time { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--a-line2); color: var(--a-green); font-size: 12.5px; }
.dbm-time b { font-weight: 400; font-size: 8px; }

/* body: sub-nav + panel */
.dbm-body { display: grid; grid-template-columns: 172px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 0; } /* so a tall screen scrolls the panel instead of growing the app */
.dbm-sub { padding: 10px 0; border-right: 1px solid var(--a-line); }
.dbm-sub button { position: relative; display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 18px; color: #d9d9dd; font-size: 13px; text-align: left; }
.dbm-sub button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dbm-sub button:hover { background: #1f1f22; }
.dbm-sub button[aria-current="true"] { color: var(--a-green); }
.dbm-sub button[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 2px; border-radius: 2px; background: var(--a-green); }
.dbm-sub button[data-off] { cursor: default; }
.dbm-sub button[data-off]:hover { background: none; }

.dbm-panel { position: relative; min-width: 0; padding: 14px 16px 18px; overflow: hidden auto; scrollbar-width: none; overscroll-behavior: auto; }
.dbm-panel::-webkit-scrollbar { display: none; }
.dbm-screen { display: none; }
.dbm-screen.on { display: block; animation: dbm-in .25s ease; }
@keyframes dbm-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .dbm-screen.on { animation: none; } }

/* the collection banner */
.dbm-banner { display: flex; align-items: center; gap: 10px; height: 40px; margin-bottom: 11px; padding: 0 8px 0 11px; border-radius: 7px; background: #241d10; box-shadow: inset 0 0 0 1px #6b5220; color: #e8e2d4; font-size: 12.5px; }
.dbm-banner code { color: #f1ead8; }
.dbm-banner .pill { background: #3c2f14; color: var(--a-amber); font-weight: 400; }
.dbm-banner button { margin-left: auto; height: 26px; padding: 0 10px; border-radius: 6px; background: #161617; box-shadow: inset 0 0 0 1px var(--a-line2); color: #e4e4e6; }
.dbm-banner button:hover { background: #222225; }
.dbm[data-coll="sampled"] .dbm-banner { background: #15201a; box-shadow: inset 0 0 0 1px #2c5a40; }
.dbm[data-coll="sampled"] .dbm-banner .pill { background: var(--a-green-bg); color: var(--a-green); }
.dbm[data-coll="baseline"] .dbm-banner { background: #1b1b1d; box-shadow: inset 0 0 0 1px var(--a-line2); }
.dbm[data-coll="baseline"] .dbm-banner .pill { background: #2a2a2f; color: #cfcfd3; }
.dbm-banner [data-when] { display: none; }
.dbm[data-coll="full"] .dbm-banner [data-when~="full"], .dbm[data-coll="sampled"] .dbm-banner [data-when~="sampled"], .dbm[data-coll="baseline"] .dbm-banner [data-when~="baseline"] { display: inline; }
.dbm[data-coll="full"] .dbm-banner button[data-when~="full"] { display: inline-flex; align-items: center; }

/* ───── shared building blocks for every screen ───── */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 11px; }
.kpi { padding: 12px 14px 12px; border-radius: 8px; background: var(--a-card); box-shadow: inset 0 0 0 1px var(--a-line); min-height: 88px; }
.kpi h5 { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 12px; font-weight: 400; color: #cfcfd3; }
.kpi b { display: block; margin-top: 6px; font-size: 25px; font-weight: 600; letter-spacing: -.01em; color: #f4f4f5; line-height: 1.15; }
.kpi b.warn { color: var(--a-amber); } .kpi b.bad { color: var(--a-red); }
.kpi p { margin: 5px 0 0; font-size: 11.5px; color: var(--a-fg2); }
.meter { height: 5px; margin-top: 8px; border-radius: 3px; background: #2e2e33; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--a-amber); }

.card2 { border-radius: 8px; background: var(--a-card); box-shadow: inset 0 0 0 1px var(--a-line); }
.card2 + .card2, .card2 + .grid2, .grid2 + .card2 { margin-top: 11px; }
.card2-h { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-bottom: 1px solid var(--a-line); }
.card2-h h4 { margin: 0; font-size: 13.5px; font-weight: 600; color: #f0f0f2; }
.card2-h .r { margin-left: auto; font-size: 12px; color: var(--a-fg2); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 11px; }
.grid2 > .card2 + .card2 { margin-top: 0; }

/* data-source badge: L live statement stats, M metrics, D derived */
.src { display: inline-grid; place-items: center; width: 13px; height: 13px; border-radius: 3px; font-size: 8.5px; font-weight: 700; line-height: 1; cursor: help; }
.src.l { background: #24315a; color: #9cb4ff; } .src.m { background: #3a2a57; color: #caa6ff; } .src.d { background: #463817; color: #f0c766; }
/* info icon */
.inf { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px #5d5d66; color: #bdbdc4; font: italic 700 9px/1 Georgia, serif; cursor: help; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tbl th { height: 34px; padding: 0 12px; font-size: 12.5px; font-weight: 400; color: #cfcfd3; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--a-line); }
.tbl th .src { margin-left: 4px; vertical-align: 1px; }
.tbl td { height: 36px; padding: 0 12px; border-bottom: 1px solid #242428; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e4e4e6; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td > code { display: block; overflow: hidden; text-overflow: ellipsis; }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: #222226; }
.tbl tbody tr.go { cursor: pointer; }
.tbl tbody tr.go:hover td:first-child { color: var(--a-green); }
.tbl a.sql, .tbl .sql.link { color: var(--a-green); text-decoration: underline; text-underline-offset: 2px; }
.share { display: flex; align-items: center; gap: 8px; }
.share i { position: relative; flex: none; width: 66px; height: 5px; border-radius: 3px; background: #2e2e33; }
.share i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 3px; background: var(--a-blue); }

/* tooltip (one per app, placed by page.js) */
.dbm-tip { position: absolute; z-index: 30; max-width: 280px; padding: 7px 9px; border-radius: 6px; background: #0e0e10; box-shadow: 0 0 0 1px #3a3a40, 0 10px 24px rgb(0 0 0 / .5); color: #e8e8ea; font-size: 11.5px; line-height: 1.4; pointer-events: none; opacity: 0; transition: opacity .12s; }
.dbm-tip.on { opacity: 1; }

/* ───── playback (page.js): the pointer, the step's highlight, the replay button ───── */
.dbm-cur { position: absolute; z-index: 40; left: 1180px; top: 760px; width: 26px; height: 30px; pointer-events: none; opacity: 0;
  transition: left .7s cubic-bezier(.45, 0, .2, 1), top .7s cubic-bezier(.45, 0, .2, 1), opacity .25s, transform .12s; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .6)); }
.dbm-cur.on { opacity: 1; }
.dbm-cur.down { transform: scale(.82); }
.dbm-cur svg { width: 100%; height: 100%; fill: #fff; stroke: #111; stroke-width: 1.2; stroke-linejoin: round; }
.dbm[data-narrow] .dbm-cur { width: 52px; height: 60px; } /* the phone view is scaled down twice as far */
.dbm-again { position: absolute; right: 12px; bottom: 12px; z-index: 5; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px 0 11px; border-radius: 999px;
  background: rgb(14 14 16 / .86); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16), 0 8px 24px -8px rgb(0 0 0 / .7); color: #e8e8ea; font: 500 12.5px/1 var(--sans, inherit);
  opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .25s, transform .25s, background .2s; backdrop-filter: blur(6px); }
.dbm-again svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dbw.is-done .dbm-again { opacity: 1; transform: none; pointer-events: auto; }
.dbm-again:hover { background: rgb(28 28 32 / .95); }
.dbw.is-playing .dbm { cursor: default; }

/* ───── page bits ───── */
.db-beta { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 12px 6px 10px; border-radius: 999px; font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mint); background: rgb(19 233 137 / .08); box-shadow: inset 0 0 0 1px rgb(19 233 137 / .32); }
.db-beta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.page-hero.is-app .db-beta + h1 { margin-top: 0; }
.dbm-note { margin-top: 14px; font-size: 13px; color: var(--fg-3); text-align: center; }
.db-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.db-modes .card h3 { display: flex; align-items: center; gap: 10px; }
.db-modes .card h3 .tag { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 7px; border-radius: 5px; }
.db-modes .tag.base { color: var(--fg-2); background: rgb(var(--ink) / .08); }
.db-modes .tag.samp { color: var(--mint); background: rgb(19 233 137 / .12); }
.db-modes .tag.full { color: #f2c35a; background: rgb(242 195 90 / .14); }
.db-modes .card p + p { margin-top: 10px; }
.db-modes .card .cost { display: block; margin-top: 18px; font: 500 12px/1.4 var(--mono); color: var(--fg-3); }
@media (max-width: 960px) { .db-modes { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin: 0 auto; } }
.dbm-facts span { font-family: inherit; font-size: clamp(32px, 3.4vw, 44px); line-height: 1; font-weight: 600; letter-spacing: -0.04em; text-transform: none; color: var(--accent); }
.dbm-facts b { margin-top: 12px; font-size: 15px; color: var(--fg-2); }
@media (max-width: 960px) { .dbm-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; } }
@media (max-width: 560px) { .dbm-facts { grid-template-columns: minmax(0, 1fr); max-width: 320px; } }

/* @parts */
/* ── screen: queries ── */
.dbm [data-screen="queries"] .qy-row { margin-top: 11px; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.dbm .qy-chart { position: relative; height: 178px; padding: 14px 14px 0; }
.dbm .qy-chart svg { display: block; width: 100%; height: 150px; }
.dbm .qy-grid path { stroke: #2a2a2f; stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.dbm .qy-x { display: flex; justify-content: space-between; padding-top: 5px; font-size: 10.5px; color: var(--a-fg3); }
.dbm .qy-hot { position: absolute; top: 14px; height: 150px; width: 34px; margin-left: -17px; border-left: 1px dashed rgb(229 185 78 / .7); cursor: help; }
.dbm .qy-hot:hover { background: linear-gradient(90deg, rgb(229 185 78 / .12), transparent); }
.dbm .qy-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px 13px; font-size: 11.5px; color: var(--a-fg2); }
.dbm .qy-leg i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; vertical-align: 0; }
.dbm .qy-apps { display: grid; gap: 12px; padding: 16px 16px 14px; }
.dbm .qy-apps > div { display: grid; grid-template-columns: 120px minmax(0, 1fr) 40px; align-items: center; gap: 12px; font-size: 12.5px; padding: 3px 4px; border-radius: 5px; cursor: default; }
.dbm .qy-apps > div:hover { background: #222226; }
.dbm .qy-apps i { position: relative; height: 8px; border-radius: 4px; background: #26262b; }
.dbm .qy-apps i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 4px; background: linear-gradient(90deg, #3f6fe0, #5b8cff); }
.dbm .qy-apps b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* ── screen: detail ── */
.dbm [data-screen="detail"] .dt-bar { display: flex; align-items: center; gap: 12px; height: 30px; margin-bottom: 10px; }
.dbm [data-screen="detail"] .dt-back { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--a-line2); background: var(--a-card); color: #e4e4e6; font-size: 12.5px; transition: background .15s, color .15s; }
.dbm [data-screen="detail"] .dt-back:hover { background: #26262a; color: var(--a-green); }
.dbm [data-screen="detail"] .dt-back svg, .dbm [data-screen="detail"] .dt-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dbm [data-screen="detail"] .dt-id { color: var(--a-fg2); font-size: 12.5px; }
.dbm [data-screen="detail"] .dt-id .mono { font-family: inherit; font-size: inherit; }
.dbm [data-screen="detail"] .dt-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dbm [data-screen="detail"] .dt-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 6px; color: var(--a-fg2); font-size: 12px; }
.dbm [data-screen="detail"] .dt-btn:hover { background: #26262a; color: #fff; }

.dbm [data-screen="detail"] .dt-sql { display: flex; align-items: center; height: 42px; margin-bottom: 10px; padding: 0 14px; border-radius: 8px; background: #141416; box-shadow: inset 0 0 0 1px var(--a-line); }
.dbm [data-screen="detail"] .dt-sql code { font-size: 13px; color: #e8e8ea; white-space: nowrap; }
.dbm [data-screen="detail"] .dt-sql b { font-weight: inherit; color: #9cb4ff; }
.dbm [data-screen="detail"] .dt-sql i { font-style: normal; color: var(--a-amber); }

.dbm [data-screen="detail"] .kpi { transition: box-shadow .15s; position: relative; }
.dbm [data-screen="detail"] .kpi:hover { box-shadow: inset 0 0 0 1px var(--a-line2); }
.dbm [data-screen="detail"] .dt-m { position: absolute; left: 14px; right: 14px; bottom: 10px; margin: 0; height: 3px; }
.dbm [data-screen="detail"] .dt-m i { background: var(--a-blue); }

.dbm [data-screen="detail"] .dt-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.dbm [data-screen="detail"] .pill.dt-full { background: #3c2f14; color: var(--a-amber); font-weight: 400; }
.dbm [data-screen="detail"] .card2-h .r { display: inline-flex; align-items: center; gap: 7px; }
.dbm [data-screen="detail"] .dt-plan, .dbm [data-screen="detail"] .dt-wait { display: flex; flex-direction: column; }

.dbm [data-screen="detail"] .dt-tree { padding: 12px 14px 0; }
.dbm [data-screen="detail"] .dt-node { padding: 9px 12px 9px; border-radius: 6px; background: #161618; box-shadow: inset 0 0 0 1px var(--a-line2); cursor: default; transition: box-shadow .15s, background .15s; }
.dbm [data-screen="detail"] .dt-node:hover { background: #1e1e21; box-shadow: inset 0 0 0 1px #4a4a52; }
.dbm [data-screen="detail"] .dt-kid { position: relative; margin: 8px 0 0 28px; }
.dbm [data-screen="detail"] .dt-kid::before { content: ""; position: absolute; left: -17px; top: -9px; width: 12px; height: 26px; border-left: 1px solid #45454c; border-bottom: 1px solid #45454c; border-bottom-left-radius: 5px; }
.dbm [data-screen="detail"] .dt-nh { display: flex; align-items: center; gap: 12px; }
.dbm [data-screen="detail"] .dt-nh code { font-size: 12.5px; font-weight: 700; color: #f2f2f3; }
.dbm [data-screen="detail"] .dt-nh u { text-decoration: none; color: var(--a-green); }
.dbm [data-screen="detail"] .dt-t { position: relative; flex: none; width: 90px; height: 4px; margin-left: auto; border-radius: 2px; background: #2e2e33; }
.dbm [data-screen="detail"] .dt-t i { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 2px; background: var(--a-blue); }
.dbm [data-screen="detail"] .dt-node p { margin: 3px 0 0; font-size: 12px; color: var(--a-fg2); }
.dbm [data-screen="detail"] .dt-est { margin-left: 8px; color: var(--a-fg3); }
.dbm [data-screen="detail"] .dt-cond { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 7px; padding-top: 7px; border-top: 1px dashed #303036; font-size: 11.5px; }
.dbm [data-screen="detail"] .dt-cond em { font-style: normal; color: var(--a-fg3); }
.dbm [data-screen="detail"] .dt-cond code { font-size: 11.5px; color: #cfcfd3; }
.dbm [data-screen="detail"] .dt-cond span:hover code { color: #fff; }
.dbm [data-screen="detail"] .dt-pf { display: flex; align-items: center; gap: 18px; margin-top: auto; padding: 10px 14px 11px; font-size: 12px; color: var(--a-fg2); }
.dbm [data-screen="detail"] .dt-pf b { font-weight: 600; color: #e4e4e6; }
.dbm [data-screen="detail"] .dt-pf .pill { margin-left: auto; }

.dbm [data-screen="detail"] .dt-wb { display: flex; flex-direction: column; flex: 1; padding: 14px 14px 11px; }
.dbm [data-screen="detail"] .dt-stack { display: flex; gap: 2px; height: 10px; margin-bottom: 8px; }
.dbm [data-screen="detail"] .dt-stack i { width: var(--w); height: 100%; transition: filter .15s, transform .15s; }
.dbm [data-screen="detail"] .dt-stack i:first-child { border-radius: 3px 0 0 3px; }
.dbm [data-screen="detail"] .dt-stack i:last-child { border-radius: 0 3px 3px 0; }
.dbm [data-screen="detail"] .dt-stack i:hover { filter: brightness(1.25); transform: scaleY(1.35); }
.dbm [data-screen="detail"] .c { background: var(--a-blue); }
.dbm [data-screen="detail"] .io { background: var(--a-green); }
.dbm [data-screen="detail"] .lw { background: #e57d4a; }
.dbm [data-screen="detail"] .dt-w { display: flex; align-items: center; gap: 9px; height: 37px; margin: 0 -6px; padding: 0 6px; border-radius: 5px; transition: background .15s; }
.dbm [data-screen="detail"] .dt-w:hover { background: #232327; }
.dbm [data-screen="detail"] .dt-sw { width: 9px; height: 9px; border-radius: 2px; }
.dbm [data-screen="detail"] .dt-w code { font-size: 12px; color: #e4e4e6; }
.dbm [data-screen="detail"] .dt-ws { margin-left: auto; font-size: 11.5px; color: var(--a-fg3); font-variant-numeric: tabular-nums; }
.dbm [data-screen="detail"] .dt-w b { width: 34px; text-align: right; font-weight: 400; font-variant-numeric: tabular-nums; }
.dbm [data-screen="detail"] .dt-wn { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 9px; border-top: 1px solid #242428; font-size: 12px; color: var(--a-fg2); }
.dbm [data-screen="detail"] .dt-wn svg { width: 14px; height: 14px; fill: none; stroke: var(--a-green); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.dbm [data-screen="detail"] .dt-samp .tbl td { height: 37px; }
.dbm [data-screen="detail"] .dt-samp .tbl td.mono { font-size: 12px; }
.dbm [data-screen="detail"] .dt-p { color: #cfcfd3; }
.dbm [data-screen="detail"] .dt-p s { text-decoration: none; color: #e8e8ea; }
.dbm [data-screen="detail"] tr:hover .dt-p s { color: var(--a-amber); }
.dbm [data-screen="detail"] .dt-d.hi { color: var(--a-amber); }

/* ── screen: locks ── */
.dbm [data-screen="locks"] .kpi b .lk-of { font-size: 25px; font-weight: 600; color: #f4f4f5; }
.dbm [data-screen="locks"] .kpi p .mono { font-size: 11px; color: var(--a-fg2); }
.dbm [data-screen="locks"] .kpi p { line-height: 1.4; }
.dbm [data-screen="locks"] .kpi b[data-tip], .dbm [data-screen="locks"] .kpi p[data-tip], .dbm [data-screen="locks"] .meter { cursor: help; }
.dbm [data-screen="locks"] .kpis { margin-bottom: 10px; }

/* lock counts strip */
.dbm .lk-counts { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: stretch; margin-bottom: 10px; padding: 9px 14px 6px; border-radius: 8px; background: var(--a-card); box-shadow: inset 0 0 0 1px var(--a-line); }
.dbm .lk-cl { display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0 4px; }
.dbm .lk-ct { display: flex; align-items: center; gap: 8px; }
.dbm .lk-ct h4 { margin: 0; font-size: 13.5px; font-weight: 600; color: #f0f0f2; }
.dbm .lk-sub { font-size: 12px; color: var(--a-fg2); }
.dbm .lk-leg { display: flex; gap: 14px; font-size: 11px; color: var(--a-fg3); }
.dbm .lk-leg i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.dbm .lk-leg i.a { background: rgb(229 185 78 / .55); box-shadow: inset 0 2px 0 var(--a-amber); }
.dbm .lk-leg i.c { height: 0; border-top: 1.5px dashed var(--a-red); border-radius: 0; vertical-align: 3px; }
.dbm .lk-leg i.e { width: 2px; background: var(--a-red); }
.dbm .lk-chart { position: relative; padding: 0 44px 0 38px; }
.dbm .lk-chart svg { display: block; width: 100%; height: 50px; overflow: visible; }
.dbm .lk-area { fill: rgb(229 185 78 / .16); }
.dbm .lk-line { fill: none; stroke: var(--a-amber); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.dbm .lk-ceil { fill: none; stroke: var(--a-red); stroke-width: 1.2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; opacity: .85; }
.dbm .lk-mid { stroke: #2a2a2f; stroke-width: 1; vector-effect: non-scaling-stroke; }
.dbm .lk-hov rect { fill: #fff; fill-opacity: 0; cursor: crosshair; }
.dbm .lk-hov rect:hover { fill-opacity: .06; }
.dbm .lk-y { position: absolute; left: 0; width: 32px; text-align: right; font-size: 10px; color: var(--a-fg3); font-variant-numeric: tabular-nums; }
.dbm .lk-y1 { top: -6px; color: #e88a8a; } .dbm .lk-y0 { top: 42px; }
.dbm .lk-ev { position: absolute; top: 0; height: 50px; width: 9px; margin-left: -4.5px; cursor: help; }
.dbm .lk-ev::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 0; border-left: 1px dashed rgb(239 107 107 / .65); }
.dbm .lk-ev::after { content: ""; position: absolute; left: 1.5px; top: 1px; width: 6px; height: 6px; border-radius: 50%; background: var(--a-red); box-shadow: 0 0 0 2px var(--a-card); }
.dbm .lk-ev:hover::before { border-left-style: solid; border-left-color: var(--a-red); }
.dbm .lk-ev.on::after { animation: lk-pulse 1.6s ease-out infinite; }
.dbm .lk-ceil-l { position: absolute; left: 50%; transform: translateX(-50%); top: -6px; padding: 0 6px; background: var(--a-card); line-height: 12px; font-size: 10px; color: #e88a8a; cursor: help; }
.dbm .lk-now { position: absolute; right: 0; top: 13px; width: 40px; padding: 1px 0; border-radius: 3px; background: var(--a-amber-bg); color: var(--a-amber); font-size: 10.5px; font-weight: 600; text-align: center; cursor: help; }
.dbm .lk-x { display: flex; justify-content: space-between; padding-top: 3px; font-size: 10px; color: var(--a-fg3); }

/* blocking tree */
.dbm .lk-pulse { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--a-green); vertical-align: 0; animation: lk-pulse 2s ease-out infinite; }
@keyframes lk-pulse { 0% { box-shadow: 0 0 0 0 rgb(82 196 131 / .5); } 100% { box-shadow: 0 0 0 6px rgb(82 196 131 / 0); } }
.dbm .lk-ev.on::after { animation-name: lk-pulse-r; }
@keyframes lk-pulse-r { 0% { box-shadow: 0 0 0 0 rgb(239 107 107 / .6); } 100% { box-shadow: 0 0 0 6px rgb(239 107 107 / 0); } }
.dbm .lk-tree { position: relative; display: grid; gap: 6px; padding: 12px 14px 11px; }
.dbm .lk-node { position: relative; display: flex; align-items: center; gap: 10px; height: 31px; padding: 0 11px; border-radius: 6px; background: #19191b; box-shadow: inset 0 0 0 1px var(--a-line2); font-size: 12.5px; color: #e4e4e6; cursor: default; transition: background .15s, box-shadow .15s; }
.dbm .lk-node code { font-size: 12px; }
.dbm .lk-holder { background: #2a1517; box-shadow: inset 0 0 0 1px #8c3236; }
.dbm .lk-holder:hover { background: #331a1c; box-shadow: inset 0 0 0 1px #b2464b; }
.dbm .lk-wait { margin-left: 23px; }
.dbm .lk-wait:hover { background: #222226; box-shadow: inset 0 0 0 1px #45454c; }
.dbm .lk-wait::before { content: ""; position: absolute; left: -14px; top: -22px; width: 12px; height: 37px; border-left: 1px solid #45454c; border-bottom: 1px solid #45454c; border-bottom-left-radius: 5px; }
.dbm .lk-tree:has(.lk-holder:hover) .lk-wait::before, .dbm .lk-wait:hover::before { border-color: #b2464b; }
.dbm .lk-tree:has(.lk-holder:hover) .lk-wait { box-shadow: inset 0 0 0 1px #5a2e31; }
.dbm .lk-user { color: #e4e4e6; }
.dbm .lk-what { color: var(--a-fg2); }
.dbm .lk-what code { color: var(--a-fg2); font-family: inherit; font-size: 12.5px; }
.dbm .lk-mode { font-weight: 400; color: #dcdce0; background: #34282a; }
.dbm .lk-tag { margin-left: auto; padding: 1px 7px; border-radius: 10px; background: var(--a-red-bg); color: #ff9a9a; font-size: 11px; }
.dbm .lk-ev-n { color: #f0c766; }
.dbm .lk-bar { position: relative; flex: none; width: 140px; height: 4px; margin-left: auto; border-radius: 2px; background: #2a2a2f; }
.dbm .lk-bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 2px; background: linear-gradient(90deg, #a46a2a, var(--a-amber)); }
.dbm .lk-last { margin: 4px 0 0; font-size: 12.5px; color: var(--a-fg2); cursor: help; }
.dbm .lk-last code { color: #d6d6da; }

/* range table */
.dbm .lk-tbl td { height: 34px; font-size: 12.5px; }
.dbm .lk-tbl td .pill { height: 19px; }
.dbm .lk-tbl tr.lk-on td:first-child { box-shadow: inset 2px 0 0 var(--a-red); }
.dbm .lk-tbl .lk-ongo { color: #ff8f8f; }
.dbm .lk-tbl .lk-hi { color: var(--a-amber); }

/* ── screen: schema ── */
.dbm [data-screen="schema"] .sc-io .card2-h .r { color: var(--a-fg3); font-size: 11.5px; }
.dbm [data-screen="schema"] .sc-io code { font-size: 12.5px; }
.dbm [data-screen="schema"] .sc-io tbody tr { position: relative; cursor: pointer; }
.dbm [data-screen="schema"] .sc-io tbody tr:hover td:first-child code { color: var(--a-green); }
.dbm [data-screen="schema"] .sc-io tbody tr[aria-pressed="true"] { background: #1f2421; }
.dbm [data-screen="schema"] .sc-io tbody tr[aria-pressed="true"] td:first-child { box-shadow: inset 2px 0 0 var(--a-green); }
.dbm [data-screen="schema"] .sc-io tbody tr[aria-pressed="true"] td:first-child code { color: var(--a-green); }
.dbm [data-screen="schema"] .sc-io .share i { width: 78px; }
.dbm [data-screen="schema"] .sc-hot { color: var(--a-amber); cursor: help; }
.dbm [data-screen="schema"] .sc-grid { align-items: start; }
.dbm [data-screen="schema"] .sc-ty { color: #c4c4ca; }
.dbm [data-screen="schema"] .pill { cursor: help; }
.dbm [data-screen="schema"] .pill.sc-nq { background: #26262a; color: var(--a-fg3); font-weight: 400; }
.dbm [data-screen="schema"] .tbl td .pill.dim { font-size: 11px; }
.dbm [data-screen="schema"] .sc-ix tbody tr td:first-child { transition: box-shadow .15s; }

/* the columns card follows the table picked above (payments until one is clicked) */
.dbm [data-screen="schema"] .sc-cols [data-t] { display: none; }
.dbm [data-screen="schema"]:not([data-view]) .sc-cols tbody[data-t="payments"],
.dbm [data-screen="schema"][data-view="payments"] .sc-cols tbody[data-t="payments"],
.dbm [data-screen="schema"][data-view="orders"] .sc-cols tbody[data-t="orders"],
.dbm [data-screen="schema"][data-view="ledger_entries"] .sc-cols tbody[data-t="ledger_entries"],
.dbm [data-screen="schema"][data-view="audit_log"] .sc-cols tbody[data-t="audit_log"],
.dbm [data-screen="schema"][data-view="sessions"] .sc-cols tbody[data-t="sessions"],
.dbm [data-screen="schema"][data-view="refunds"] .sc-cols tbody[data-t="refunds"] { display: table-row-group; animation: dbm-in .2s ease; }
.dbm [data-screen="schema"]:not([data-view]) .sc-cols h4 [data-t="payments"],
.dbm [data-screen="schema"][data-view="payments"] .sc-cols h4 [data-t="payments"],
.dbm [data-screen="schema"][data-view="orders"] .sc-cols h4 [data-t="orders"],
.dbm [data-screen="schema"][data-view="ledger_entries"] .sc-cols h4 [data-t="ledger_entries"],
.dbm [data-screen="schema"][data-view="audit_log"] .sc-cols h4 [data-t="audit_log"],
.dbm [data-screen="schema"][data-view="sessions"] .sc-cols h4 [data-t="sessions"],
.dbm [data-screen="schema"][data-view="refunds"] .sc-cols h4 [data-t="refunds"] { display: inline; }
.dbm [data-screen="schema"] .sc-cols tbody tr:last-child td { border-bottom: 0; }

/* the picked table's indexes are marked in the Indexes card */
.dbm [data-screen="schema"]:not([data-view]) .sc-ix tr[data-t="payments"] td:first-child,
.dbm [data-screen="schema"][data-view="payments"] .sc-ix tr[data-t="payments"] td:first-child,
.dbm [data-screen="schema"][data-view="orders"] .sc-ix tr[data-t="orders"] td:first-child,
.dbm [data-screen="schema"][data-view="ledger_entries"] .sc-ix tr[data-t="ledger_entries"] td:first-child,
.dbm [data-screen="schema"][data-view="audit_log"] .sc-ix tr[data-t="audit_log"] td:first-child,
.dbm [data-screen="schema"][data-view="refunds"] .sc-ix tr[data-t="refunds"] td:first-child { box-shadow: inset 2px 0 0 rgb(82 196 131 / .7); }

/* shell fix while this screen is open: .dbm-body's implicit row grows with its content, so a tall
   screen pushed the whole app down instead of scrolling the panel (belongs in the shell CSS) */

/* ── screen: config ── */
.dbm [data-screen="config"] { --cf-lab: 176px; }
/* ── timeline card ── */
.dbm [data-screen="config"] .cf-tl { padding-bottom: 8px; }
.dbm [data-screen="config"] .cf-tl .card2-h .r { display: flex; gap: 14px; }
.dbm [data-screen="config"] .cf-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; }
.dbm [data-screen="config"] .cf-key i { width: 10px; height: 6px; border-radius: 2px; background: var(--a-green); }
.dbm [data-screen="config"] .cf-key.w i { background: var(--a-amber); }
.dbm [data-screen="config"] .cf-key.c i { width: 10px; height: 10px; border-radius: 3px; background: #2e2e34; box-shadow: inset 0 0 0 1px #4a4a52; }
.dbm [data-screen="config"] .cf-g { display: grid; grid-template-columns: var(--cf-lab) repeat(14, minmax(0, 1fr)); align-items: center; padding: 0 14px; }
.dbm [data-screen="config"] .cf-g > span:first-child { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #e4e4e6; }
.dbm [data-screen="config"] .cf-dates { height: 38px; }
.dbm [data-screen="config"] .cf-dates span:not(:first-child) { height: 100%; display: grid; place-items: center; border-left: 1px solid var(--a-line); font-size: 11.5px; color: var(--a-fg2); }
.dbm [data-screen="config"] .cf-dates span:last-child { color: #f0f0f2; font-weight: 600; }
.dbm [data-screen="config"] .cf-health { height: 34px; column-gap: 3px; }
.dbm [data-screen="config"] .cf-health i { height: 11px; border-radius: 2px; background: var(--a-green); cursor: help; transition: filter .15s, transform .15s; }
.dbm [data-screen="config"] .cf-health i.cf-w { background: var(--a-amber); }
.dbm [data-screen="config"] .cf-health i:hover { filter: brightness(1.25); transform: scaleY(1.35); }
.dbm [data-screen="config"] .cf-chg { height: 38px; }
.dbm [data-screen="config"] .cf-chg span:not(:first-child) { display: grid; place-items: center; }
.dbm [data-screen="config"] .cf-chg b { display: grid; place-items: center; min-width: 30px; height: 20px; padding: 0 8px; border-radius: 4px; background: #2e2e34; box-shadow: inset 0 0 0 1px #45454d; font-size: 11.5px; font-weight: 700; color: #f0f0f2; cursor: help; transition: background .15s, box-shadow .15s; }
.dbm [data-screen="config"] .cf-chg b:hover { background: #3a3a42; }
.dbm [data-screen="config"] .cf-chg b.cf-hot { box-shadow: inset 0 0 0 1px rgb(229 185 78 / .6); color: var(--a-amber); background: var(--a-amber-bg); }

/* ── compare card ── */
.dbm [data-screen="config"] .cf-cmp { margin-top: 10px; overflow: hidden; }
.dbm [data-screen="config"] .cf-h { height: 44px; gap: 10px; }
.dbm [data-screen="config"] .cf-tabs { display: inline-flex; padding: 2px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--a-line2); }
.dbm [data-screen="config"] .cf-tabs button { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 4px; color: #d6d6da; font-size: 12.5px; }
.dbm [data-screen="config"] .cf-tabs button:hover { color: #fff; }
.dbm [data-screen="config"] .cf-tabs svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dbm [data-screen="config"] .cf-tabs button[aria-pressed="true"] { background: var(--a-green-bg); color: var(--a-green); }
.dbm [data-screen="config"] .cf-src { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--a-line2); font-size: 12.5px; color: #e4e4e6; cursor: help; }
.dbm [data-screen="config"] .cf-src .mono { font-size: 12px; }
.dbm [data-screen="config"] .cf-src:hover { background: #222225; }

.dbm [data-screen="config"] .cf-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--a-line); }
.dbm [data-screen="config"] .cf-side { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; }
.dbm [data-screen="config"] .cf-old { border-right: 1px solid var(--a-line); }
.dbm [data-screen="config"] .cf-sel { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; width: 210px; height: 30px; padding: 0 10px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--a-line2); background: #161617; font-size: 12.5px; color: #f0f0f2; }
.dbm [data-screen="config"] .cf-sel:hover { box-shadow: inset 0 0 0 1px #4d4d55; }
.dbm [data-screen="config"] .cf-sel svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dbm [data-screen="config"] .cf-q { display: inline-flex; align-items: center; gap: 7px; width: 140px; height: 30px; padding: 0 10px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--a-line2); background: #161617; font-size: 12.5px; color: var(--a-fg3); cursor: text; }
.dbm [data-screen="config"] .cf-q svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.dbm [data-screen="config"] .cf-lines { display: none; margin-left: auto; font-size: 12px; color: var(--a-fg2); }

.dbm [data-screen="config"] .cf-sum { display: flex; align-items: center; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--a-line); font-size: 12.5px; }
.dbm [data-screen="config"] .cf-warn { display: inline-flex; align-items: center; gap: 6px; color: #e4e4e6; cursor: help; }
.dbm [data-screen="config"] .cf-warn svg { width: 14px; height: 14px; fill: none; stroke: var(--a-red); stroke-width: 1.4; stroke-linecap: round; }
.dbm [data-screen="config"] .cf-warn b { font-weight: 600; }
.dbm [data-screen="config"] .cf-sw { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; color: var(--a-fg2); }
.dbm [data-screen="config"] .cf-sw [role="switch"] { position: relative; width: 28px; height: 16px; border-radius: 8px; background: #3a3a40; cursor: pointer; transition: background .15s; }
.dbm [data-screen="config"] .cf-sw [role="switch"] i { position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #f0f0f2; transition: transform .15s; }
.dbm [data-screen="config"] .cf-sw [role="switch"][aria-checked="true"] { background: var(--a-green); }
.dbm [data-screen="config"] .cf-sw [role="switch"][aria-checked="true"] i { transform: translateX(12px); }

/* the diff: one row per line so both sides stay aligned */
.dbm [data-screen="config"] .cf-diff { padding: 3px 0 4px; }
.dbm [data-screen="config"] .cf-ln { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dbm [data-screen="config"] .cf-ln > div { display: flex; align-items: center; height: 26px; min-width: 0; transition: background .12s; }
.dbm [data-screen="config"] .cf-a { border-right: 1px solid var(--a-line); }
.dbm [data-screen="config"] .cf-ln i { flex: none; width: 44px; padding-right: 14px; text-align: right; font: 11.5px "DBM Mono", ui-monospace, monospace; font-style: normal; color: var(--a-fg3); }
.dbm [data-screen="config"] .cf-ln code { white-space: pre; overflow: hidden; text-overflow: ellipsis; color: #e9e9ec; }
.dbm [data-screen="config"] .cf-ln .cf-k { color: #e9e9ec; }
.dbm [data-screen="config"] .cf-ln .cf-v { color: #f4f4f5; }
.dbm [data-screen="config"] .cf-ln .cf-cm { color: var(--a-fg3); }
.dbm [data-screen="config"] .cf-ln > div:hover { background: #222226; }
.dbm [data-screen="config"] .cf-ln > div[data-tip] { cursor: help; }
.dbm [data-screen="config"] .cf-ch .cf-a { background: #3a1c1d; }
.dbm [data-screen="config"] .cf-ch .cf-b { background: #183324; }
.dbm [data-screen="config"] .cf-ch .cf-a:hover { background: #46201f; }
.dbm [data-screen="config"] .cf-ch .cf-b:hover { background: #1d3d2b; }
.dbm [data-screen="config"] .cf-ch .cf-a .cf-v { color: #ff9a9a; }
.dbm [data-screen="config"] .cf-ch .cf-b .cf-v { color: #8fe8b3; }
.dbm [data-screen="config"] .cf-ch .cf-a i { color: #c98080; box-shadow: inset 2px 0 0 var(--a-red); }
.dbm [data-screen="config"] .cf-ch .cf-b i { color: #7fbf98; box-shadow: inset 2px 0 0 var(--a-green); }

/* show only differences */
.dbm [data-screen="config"].cf-only .cf-ln:not(.cf-ch) { display: none; }

/* Content: only the current file, full width */
.dbm [data-screen="config"][data-view="content"] .cf-pick,
.dbm [data-screen="config"][data-view="content"] .cf-ln { grid-template-columns: minmax(0, 1fr); }
.dbm [data-screen="config"][data-view="content"] .cf-old,
.dbm [data-screen="config"][data-view="content"] .cf-a,
.dbm [data-screen="config"][data-view="content"] .cf-sum { display: none; }
.dbm [data-screen="config"][data-view="content"] .cf-lines { display: inline; }
.dbm [data-screen="config"][data-view="content"] .cf-ln { display: grid; }
.dbm [data-screen="config"][data-view="content"] .cf-ch .cf-b { background: none; }
.dbm [data-screen="config"][data-view="content"] .cf-ch .cf-b:hover { background: #222226; }
.dbm [data-screen="config"][data-view="content"] .cf-ch .cf-b i { box-shadow: none; color: var(--a-fg3); }
.dbm [data-screen="config"][data-view="content"] .cf-ch .cf-b .cf-v { color: #f4f4f5; }
.dbm [data-screen="config"][data-view="content"] .cf-diff { padding-top: 8px; }
.dbm [data-screen="config"][data-view="content"].cf-only .cf-ln { display: grid; }

/* Light skin: small green text uses --mint (≥4.5:1 on the light surfaces); --accent stays for dots, fills,
   borders and large numbers. Light only, so the dark skin is unchanged. */
:root[data-theme="light"] .cxw-live,
:root[data-theme="light"] .dbm-facts span { color: var(--mint); }
