/* ====================================================================
   Tradewind DataTools design system
   Brand: Tradewind Australia Brand Guidelines 2026
   Palette: #003D47 petrol · #2A6D76 teal · #81A8AF slate-teal
            #E3F3F3 ice · #EDEDED neutral · logo slate #373F52
   Type: Montserrat (variable, self-hosted)
   ==================================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/montserrat-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f2f6f7;
  --surface: #ffffff;
  --surface-2: #e9f1f2;
  --tint: #e3f3f3;
  --ink: #1c3640;
  --ink-strong: #003d47;
  --ink-soft: #5e7a82;
  --line: #dce6e8;
  --line-strong: #c3d4d7;

  --primary: #2a6d76;
  --primary-hover: #1f5a63;
  --primary-deep: #003d47;
  --primary-ink: #ffffff;
  --soft: #81a8af;

  --ok: #2e7d4f;       --ok-tint: #ddf0e4;
  --warn: #a05c0b;     --warn-tint: #faeed7;
  --danger: #b3344c;   --danger-tint: #f9e3e8;

  --sidebar-bg: #ffffff;
  --sidebar-ink: #3c5a63;
  --sidebar-active-bg: #e3f3f3;
  --sidebar-active-ink: #003d47;
  --sidebar-line: #e3ecee;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(0, 61, 71, 0.05), 0 6px 24px rgba(0, 61, 71, 0.07);
  --shadow-pop: 0 24px 64px rgba(0, 30, 36, 0.28);
  --focus: 0 0 0 3px rgba(42, 109, 118, 0.28);
}

[data-theme="dark"] {
  --bg: #07191e;
  --surface: #0d2930;
  --surface-2: #123640;
  --tint: #11343c;
  --ink: #dcecee;
  --ink-strong: #f1f9f9;
  --ink-soft: #8fb0b7;
  --line: #1d444e;
  --line-strong: #2a5560;

  --primary: #6fb5bf;
  --primary-hover: #8ac6cf;
  --primary-deep: #c5e2e6;
  --primary-ink: #04282e;
  --soft: #5d868e;

  --ok: #6cc497;       --ok-tint: #11352a;
  --warn: #e3a85c;     --warn-tint: #38290f;
  --danger: #e8718d;   --danger-tint: #3c1622;

  --sidebar-bg: #0a2227;
  --sidebar-ink: #9dbdc4;
  --sidebar-active-bg: #134049;
  --sidebar-active-ink: #e3f3f3;
  --sidebar-line: #16363e;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 24px rgba(0, 0, 0, 0.25);
  --focus: 0 0 0 3px rgba(111, 181, 191, 0.35);
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--primary); color: var(--primary-ink); }

.layout { display: flex; height: 100%; }

/* ---------------- sidebar ---------------- */
.sidebar {
  width: 240px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-line);
  padding: 18px 12px 14px;
}
.sidebar .logo { padding: 4px 10px 18px; }
.sidebar .logo img { width: 150px; display: block; }
.sidebar .wordmark {
  display: flex; flex-direction: column; gap: 1px; margin-top: 11px;
  padding-top: 11px; border-top: 1px solid var(--sidebar-line);
}
.sidebar .wordmark .product {
  font-size: 19px; font-weight: 700; letter-spacing: 0.3px; color: var(--ink-strong);
  line-height: 1;
}
.sidebar .wordmark .byline {
  font-size: 10px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--soft);
}
.sidebar .nav-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--soft); padding: 14px 12px 5px;
}
.sidebar button.nav {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: none; border: 0; color: var(--sidebar-ink); text-align: left;
  padding: 9.5px 12px; border-radius: var(--radius-sm); font-size: 13.5px;
  font-weight: 500; cursor: pointer; font-family: inherit;
}
.sidebar button.nav svg { flex-shrink: 0; opacity: 0.85; }
.sidebar button.nav:hover { background: var(--surface-2); color: var(--ink-strong); }
.sidebar button.nav.active {
  background: var(--sidebar-active-bg); color: var(--sidebar-active-ink); font-weight: 600;
}
.sidebar button.nav .count {
  margin-left: auto; background: var(--danger-tint); color: var(--danger);
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px;
}
.sidebar .foot {
  margin-top: auto; border-top: 1px solid var(--sidebar-line); padding-top: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.sidebar .job-pill {
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 9px 11px;
}
.sidebar .job-pill .t { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 6px; }
.sidebar .job-pill.queued { background: none; border: 1px dashed var(--sidebar-line); opacity: 0.85; }
.sidebar .job-pill.queued .t { margin-bottom: 0; }
.resume-bar {
  display: flex; align-items: center; gap: 9px; width: 100%; margin-bottom: 14px;
  background: var(--tint); color: var(--primary); border: 1px solid var(--primary);
  border-radius: var(--radius-sm); padding: 9px 13px; font: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; text-align: left;
}
.resume-bar:hover { filter: brightness(0.98); }
.resume-bar .muted { font-weight: 500; }
.theme-toggle {
  display: flex; align-items: center; gap: 8px; background: none; border: 0;
  color: var(--sidebar-ink); cursor: pointer; padding: 7px 12px; font: inherit;
  font-size: 12.5px; border-radius: var(--radius-sm);
}
.theme-toggle:hover { background: var(--surface-2); color: var(--ink-strong); }

/* ---------------- main ---------------- */
.main { flex: 1; overflow-y: auto; padding: 26px 32px 48px; }
.page-head { margin-bottom: 20px; }
.page-title {
  font-size: 21px; font-weight: 700; margin: 0 0 4px; color: var(--ink-strong);
  letter-spacing: -0.2px;
}
.page-sub { color: var(--ink-soft); margin: 0; max-width: 760px; }

.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 20px; margin-bottom: 18px;
}
.card h3 {
  margin: 0 0 6px; font-size: 14.5px; font-weight: 700; color: var(--ink-strong);
}
.card .card-sub { color: var(--ink-soft); font-size: 12.5px; margin: 0 0 14px; }
/* Card header: title/description left, Save button pinned top-right. The text
   block flexes and the row never wraps, so a long description can't push the
   button onto its own line. (.row.card-head beats the later .row rule.) */
.row.card-head { align-items: flex-start; flex-wrap: nowrap; }
.card-head > :first-child { flex: 1; min-width: 0; }
.card-head > .btn { flex-shrink: 0; }
.cards-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 16px;
}
.panel { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }

/* ---------------- buttons ---------------- */
button.btn {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 8px 15px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--ink); font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px; transition: background 0.12s;
}
button.btn:hover { background: var(--surface-2); }
button.btn:focus-visible { outline: none; box-shadow: var(--focus); }
button.btn:disabled { opacity: 0.45; cursor: not-allowed; }
button.btn.primary {
  background: var(--primary); border-color: var(--primary); color: var(--primary-ink);
}
button.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
button.btn.danger {
  background: var(--danger); border-color: var(--danger); color: #fff;
}
button.btn.danger:hover { filter: brightness(1.08); }
button.btn.quiet { border-color: transparent; background: transparent; color: var(--primary); }
button.btn.quiet:hover { background: var(--tint); }
button.btn.small { padding: 5px 11px; font-size: 12px; }
button.link {
  background: none; border: 0; color: var(--primary); cursor: pointer;
  font: inherit; font-size: 13px; padding: 0; font-weight: 600;
}
button.link:hover { text-decoration: underline; }
a.btn {
  text-decoration: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 8px 15px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; gap: 7px;
}
a.btn:hover { background: var(--surface-2); }
a.btn.small { padding: 5px 11px; font-size: 12px; }

/* ---------------- inputs ---------------- */
input, select, textarea {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 7.5px 11px;
}
input::placeholder { color: var(--soft); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--focus); border-color: var(--primary); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 15px; height: 15px; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
label.inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink); }

/* ---------------- table ---------------- */
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th {
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.7px; color: var(--ink-soft); padding: 9px 12px;
  border-bottom: 2px solid var(--line);
}
table.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tr:hover td { background: var(--surface-2); }
table.tbl td.num, table.tbl th.num { text-align: right; }

/* ---------------- chips ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2.5px 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--ink-soft); margin: 1px 4px 1px 0;
}
.chip.teal { background: var(--tint); color: var(--primary); }
.chip.ok { background: var(--ok-tint); color: var(--ok); }
.chip.warn { background: var(--warn-tint); color: var(--warn); }
.chip.danger { background: var(--danger-tint); color: var(--danger); }

/* confidence meter */
.confidence { display: flex; flex-direction: column; gap: 4px; min-width: 76px; }
.confidence .v { font-weight: 700; font-size: 14px; color: var(--ink-strong); }
.confidence .bar { height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.confidence .bar > div { height: 100%; border-radius: 999px; }
.confidence.high .bar > div { background: var(--ok); }
.confidence.med .bar > div { background: var(--warn); }
.confidence .l { font-size: 10.5px; color: var(--ink-soft); font-weight: 600; }

/* avatar */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tint); color: var(--primary); font-weight: 700; font-size: 12.5px;
}
.avatar.deep { background: var(--primary); color: var(--primary-ink); }

/* ---------------- stats ---------------- */
.stat-strip {
  display: flex; gap: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px;
  overflow: hidden;
}
.stat-strip .stat {
  flex: 1; padding: 16px 22px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px;
}
.stat-strip .stat:last-child { border-right: 0; }
.stat .n { font-size: 24px; font-weight: 700; color: var(--ink-strong); letter-spacing: -0.4px; }
.stat .n.teal { color: var(--primary); }
.stat .n.danger { color: var(--danger); }
.stat .l { color: var(--ink-soft); font-size: 12px; font-weight: 500; }

/* ---------------- progress ---------------- */
.progress { background: var(--surface-2); border-radius: 999px; height: 7px; overflow: hidden; }
.progress > div { background: var(--primary); height: 100%; transition: width 0.4s; border-radius: 999px; }
.progress.indeterminate > div { width: 30% !important; animation: slide 1.2s infinite linear; }
@keyframes slide { from { margin-left: -30%; } to { margin-left: 100%; } }
.spinner {
  width: 15px; height: 15px; border: 2px solid var(--surface-2);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- modal ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 22, 27, 0.55);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 24px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop);
  max-width: min(1280px, 96vw); max-height: 92vh; display: flex; flex-direction: column;
  width: 100%; border: 1px solid var(--line);
}
.modal.narrow { max-width: 540px; }
.modal.full { max-width: 96vw; width: 96vw; height: 92vh; }
.modal.full .modal-body { flex: 1; }

/* template cards */
.tpl {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px;
}
.tpl .glyph {
  width: 34px; height: 34px; border-radius: 9px; background: var(--tint);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tpl .body { flex: 1; }
.tpl .body b { color: var(--ink-strong); display: block; }
.tpl .body span { color: var(--ink-soft); font-size: 12.5px; }
.modal-head {
  padding: 16px 22px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); gap: 12px;
}
.modal-head h2 { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--ink-strong); }
.modal-body { padding: 18px 22px; overflow: auto; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px;
  justify-content: flex-end; align-items: center; background: var(--surface-2);
  border-radius: 0 0 16px 16px;
}

/* ---------------- toast ---------------- */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--ink-strong); color: var(--bg); border-radius: 11px; padding: 12px 17px;
  box-shadow: var(--shadow-pop); font-size: 13px; font-weight: 500; max-width: 400px;
}
[data-theme="dark"] .toast { background: var(--tint); color: var(--ink-strong); border: 1px solid var(--line-strong); }
.toast.error { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* ---------------- merge grid ---------------- */
.merge-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.merge-grid { border-collapse: separate; border-spacing: 0; width: 100%; }
.merge-grid th, .merge-grid td { padding: 9px 13px; border-bottom: 1px solid var(--line); }
.merge-grid thead th {
  position: sticky; top: 0; background: var(--surface); z-index: 2;
  border-bottom: 2px solid var(--line);
}
.merge-grid td:first-child, .merge-grid th:first-child {
  position: sticky; left: 0; background: var(--surface); z-index: 1;
  font-size: 12px; font-weight: 600; color: var(--ink-soft); min-width: 130px;
}
.merge-grid td.same { color: var(--ink-soft); }
.merge-grid td.diff { background: var(--warn-tint); }
.merge-grid td.choosable { cursor: pointer; }
.merge-grid td.choosable:hover { box-shadow: inset 0 0 0 2px var(--soft); border-radius: 6px; }
.merge-grid td.chosen {
  box-shadow: inset 0 0 0 2px var(--primary); border-radius: 6px;
  background: var(--tint); font-weight: 600;
}
.merge-grid .col-master { background: var(--tint); }
.merge-grid thead th.col-master { background: var(--tint); }
/* Value cells: cap width and break long tokens (e.g. a base64 CV blob) so a
   single huge field can't blow the grid out into an endless horizontal scroll.
   Tall values are clamped into their own scroll box. */
.merge-grid td { vertical-align: top; }
.merge-grid td:not(:first-child) { max-width: 360px; }
.merge-grid .cell-val {
  max-height: 132px; overflow: auto;
  overflow-wrap: anywhere; word-break: break-word; white-space: normal;
}
.record-head { display: flex; flex-direction: column; gap: 3px; }
.record-head .rid { color: var(--ink-soft); font-weight: 500; font-size: 11.5px; }
.master-tag {
  display: inline-flex; align-items: center; gap: 5px; background: var(--primary);
  color: var(--primary-ink); border-radius: 999px; padding: 2px 10px;
  font-size: 11px; font-weight: 700;
}

/* ---------------- wizard steps ---------------- */
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.step-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--primary);
  color: var(--primary-ink); font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step-head h3 { margin: 0; }

/* ---------------- segmented tabs ---------------- */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 4px; gap: 3px; }
.seg button {
  border: 0; background: transparent; color: var(--ink-soft); padding: 7px 16px;
  border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.seg button:hover { color: var(--ink-strong); }
.seg button.active { background: var(--surface); color: var(--ink-strong); box-shadow: var(--shadow); }
.seg button .count {
  background: var(--tint); color: var(--primary); border-radius: 999px;
  font-size: 11px; font-weight: 700; padding: 1px 8px;
}

/* ---------------- empty state ---------------- */
.empty {
  text-align: center; color: var(--ink-soft); padding: 44px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty .glyph {
  width: 52px; height: 52px; border-radius: 50%; background: var(--tint);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
}
.empty b { color: var(--ink); font-size: 14.5px; }

/* ---------------- suggestion / insight rows ---------------- */
.insight {
  display: flex; align-items: center; gap: 13px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 9px;
  background: var(--surface);
}
.insight:last-child { margin-bottom: 0; }
.insight .glyph {
  width: 34px; height: 34px; border-radius: 9px; background: var(--tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.insight .glyph.warn { background: var(--warn-tint); color: var(--warn); }
.insight .glyph.danger { background: var(--danger-tint); color: var(--danger); }
.insight .body { flex: 1; }
.insight .body b { color: var(--ink-strong); display: block; font-size: 13px; }
.insight .body span { color: var(--ink-soft); font-size: 12px; }

/* ---------------- misc ---------------- */
/* ---------------- dry run banner ---------------- */
.dry-banner {
  background: var(--warn-tint); color: var(--warn); border: 1px solid var(--warn);
  border-radius: var(--radius-sm); padding: 10px 16px; margin-bottom: 18px;
  font-size: 13px; display: flex; align-items: center; gap: 9px;
}
.dry-banner .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--warn);
  animation: pulse 1.6s infinite; flex-shrink: 0;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.sidebar button.nav .count.queued { background: var(--tint); color: var(--primary); }

/* ---------------- merge plan ---------------- */
.plan {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 14px 16px; margin-bottom: 14px;
}
.plan h4 { margin: 0 0 9px; font-size: 13px; color: var(--ink-strong); }
.plan ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.plan li { font-size: 12.5px; }
.plan .keep { color: var(--ok); font-weight: 700; }
.plan .gone { color: var(--danger); font-weight: 700; }
a.bh-link { color: var(--primary); font-weight: 600; text-decoration: none; }
a.bh-link:hover { text-decoration: underline; }
a.bh-link::after { content: " ↗"; font-size: 10px; }

/* ---------------- combobox (value + picklist) ---------------- */
.combo { position: relative; display: inline-flex; flex: 1 1 150px; min-width: 110px; }
.combo > input { width: 100%; padding-right: 26px; }
.combo-toggle {
  position: absolute; right: 3px; top: 3px; bottom: 3px; width: 22px;
  border: 0; background: transparent; color: var(--ink-soft); cursor: pointer;
  border-radius: 6px; font-size: 11px; line-height: 1; padding: 0;
}
.combo-toggle:hover { background: var(--surface-2); color: var(--ink); }
.combo-menu {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 10px; box-shadow: var(--shadow-pop); max-height: 244px;
  overflow-y: auto; padding: 4px;
}
.combo-opt {
  padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.combo-opt:hover { background: var(--tint); color: var(--primary-ink); }
[data-theme="dark"] .combo-opt:hover { color: var(--ink-strong); }
.combo-opt.sel { background: var(--surface-2); font-weight: 600; }
.combo-loading {
  display: flex; align-items: center; gap: 9px; padding: 11px 12px;
  font-size: 13px; color: var(--ink-soft);
}
.spinner-xs { width: 11px; height: 11px; border-width: 2px; vertical-align: -1px; }

/* value-list (chips + add combobox) */
.taglist { display: flex; flex-direction: column; gap: 7px; }
.taglist .tags { display: flex; flex-wrap: wrap; gap: 6px; }
/* taglist is a COLUMN flex, so flex-basis would be read as HEIGHT — pin the
   add-combo to its content height and cap its WIDTH explicitly instead. */
.taglist .combo { flex: 0 0 auto; width: min(280px, 100%); }
.tag {
  display: inline-flex; align-items: center; gap: 3px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 5px 2px 11px;
  font-size: 12.5px; color: var(--ink);
}
.tag .tag-ord { color: var(--soft); font-weight: 700; margin-right: 2px; }
.tag .tag-btn, .tag .tag-x {
  background: none; border: 0; cursor: pointer; color: var(--soft);
  padding: 0 3px; font: inherit; line-height: 1;
}
.tag .tag-btn:disabled { opacity: 0.3; cursor: default; }
.tag .tag-x:hover { color: var(--danger); }
.tag .tag-btn:hover:not(:disabled) { color: var(--ink); }

.muted { color: var(--ink-soft); }
.small { font-size: 12px; }
.mt { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.kbd {
  background: var(--surface-2); border: 1px solid var(--line); padding: 1px 7px;
  border-radius: 5px; font-family: Consolas, monospace; font-size: 11.5px;
}
.diff-old { color: var(--danger); text-decoration: line-through; word-break: break-word; }
.diff-new { color: var(--ok); font-weight: 600; word-break: break-word; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
