/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/*
 * Rootmark design system — light mode is the default theme.
 *
 * Source of truth: Claude Design project "Rootmark Light" (screens 10 Tokens,
 * 11 Component states, 12 Empty/loading/error). Screen 10 specifies `:root` as
 * light and dark as the override; the dark palette below mirrors the same token
 * roles (the design does not enumerate dark hexes).
 *
 * Conventions from the spec:
 *   - tint pattern: 8% fill / 26% border for signal colours
 *   - focus is always a 3px accent ring, never a browser outline
 *   - 120ms ease for background/border, 160ms for drawers and row expansion
 *   - ids and numbers are IBM Plex Mono with tabular figures
 */

/* ---------------------------------------------------------------- tokens */

:root {
  --bg: #ffffff;
  --bg-sunken: #f8fafb;
  --nav: #f5f7f9;
  --surface: #ffffff;
  --surface-raised: #e8edf3;
  --surface-subtle: #f7f9fb;
  --surface-inset: #f1f4f7;

  --border: #e1e6ec;
  --border-strong: #dbe1e8;
  --border-firm: #c6cdd6;
  --border-hairline: #f0f3f6;
  --border-divider: #ebeff3;

  --text: #101419;
  --text-body: #293441;
  --text-strong-muted: #414d5c;
  --text-muted: #5b6675;
  --text-dim: #8a94a2;
  --text-faint: #a6afba;
  --text-disabled: #b0b9c3;
  --text-placeholder: #94a0ad;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-active: #1a44bc;
  --accent-text: #1d4ed8;
  --accent-disabled: #bfd0f5;

  --ok: #0e9a73;
  --ok-text: #0b8763;
  --ok-bright: #1bbe90;
  --warn: #b4740a;
  --warn-text: #96620a;
  --warn-bright: #e0a32b;
  --danger: #d23a42;
  --danger-text: #c1272f;
  --danger-deep: #a81f27;
  --danger-ink: #8e191f;
  --llm: #7c4de0;
  --llm-text: #6d33d6;
  --llm-deep: #5b27b8;

  --track: #edf1f4;
  --track-accent: #dce6f8;
  --row-hover: #f5f7f9;
  --row-selected: #eff5fe;
  --neutral-fill: #dfe5ec;
  --avatar-fill: #e1e7ee;

  --r-chip: 4px;
  --r-ctrl: 8px;
  --r-card: 11px;
  --r-inner: 6px;
  --r-nav: 7px;
  --r-pill: 20px;

  --row-h: 40px;
  --topbar-h: 56px;
  --sidebar-w: 236px;

  --ring: 0 0 0 3px rgba(37, 99, 235, 0.14);
  --ring-strong: 0 0 0 3px rgba(37, 99, 235, 0.3);
  --shadow-raised: 0 1px 2px rgba(16, 20, 25, 0.1);
  --shadow-overlay: 0 12px 34px rgba(16, 20, 25, 0.1);
  --shadow-tooltip: 0 8px 20px rgba(16, 20, 25, 0.25);

  --tint-accent: rgba(37, 99, 235, 0.09);
  --tint-accent-border: rgba(37, 99, 235, 0.26);
  --tint-ok: rgba(14, 154, 115, 0.08);
  --tint-ok-border: rgba(14, 154, 115, 0.24);
  --tint-warn: rgba(180, 116, 10, 0.09);
  --tint-warn-border: rgba(180, 116, 10, 0.24);
  --tint-danger: rgba(210, 58, 66, 0.08);
  --tint-danger-border: rgba(210, 58, 66, 0.24);
  --tint-llm: rgba(124, 77, 224, 0.09);
  --tint-llm-border: rgba(124, 77, 224, 0.26);

  --wash-warn: linear-gradient(160deg, rgba(240, 180, 41, 0.14), var(--surface) 60%);
  --wash-danger: linear-gradient(160deg, rgba(210, 58, 66, 0.05), var(--surface) 60%);
  --wash-ok: linear-gradient(160deg, rgba(14, 154, 115, 0.09), var(--surface) 60%);

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", monospace;

  /* legacy aliases so nothing loses its colour mid-migration */
  --success: var(--ok);
  --warning: var(--warn);
  --muted: var(--text-muted);
  --radius: var(--r-ctrl);
  --font: var(--font-sans);
}

[data-theme="dark"] {
  --bg: #0f1419;
  --bg-sunken: #12181f;
  --nav: #10161d;
  --surface: #161d26;
  --surface-raised: #1f2836;
  --surface-subtle: #131a22;
  --surface-inset: #1b2330;

  --border: #263140;
  --border-strong: #2f3c4d;
  --border-firm: #3b4a5e;
  --border-hairline: #1e2733;
  --border-divider: #212b38;

  --text: #eaeff5;
  --text-body: #d3dce6;
  --text-strong-muted: #b6c1cf;
  --text-muted: #8f9cad;
  --text-dim: #74818f;
  --text-faint: #5f6b79;
  --text-disabled: #4d5866;
  --text-placeholder: #626e7c;

  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-active: #2563eb;
  --accent-text: #7cb0fb;
  --accent-disabled: #24405f;

  --ok: #16b98a;
  --ok-text: #3ed3a9;
  --ok-bright: #16b98a;
  --warn: #d69327;
  --warn-text: #e8ae4a;
  --warn-bright: #d69327;
  --danger: #e35a62;
  --danger-text: #f2848a;
  --danger-deep: #f2848a;
  --danger-ink: #f7a9ad;
  --llm: #9a72ea;
  --llm-text: #b394f2;
  --llm-deep: #b394f2;

  --track: #212b38;
  --track-accent: #23364f;
  --row-hover: #1a222c;
  --row-selected: #172538;
  --neutral-fill: #2f3c4d;
  --avatar-fill: #26313f;

  --ring: 0 0 0 3px rgba(59, 130, 246, 0.28);
  --ring-strong: 0 0 0 3px rgba(59, 130, 246, 0.42);
  --shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-overlay: 0 12px 34px rgba(0, 0, 0, 0.55);
  --shadow-tooltip: 0 8px 20px rgba(0, 0, 0, 0.6);

  --tint-accent: rgba(59, 130, 246, 0.14);
  --tint-accent-border: rgba(59, 130, 246, 0.34);
  --tint-ok: rgba(22, 185, 138, 0.13);
  --tint-ok-border: rgba(22, 185, 138, 0.3);
  --tint-warn: rgba(214, 147, 39, 0.14);
  --tint-warn-border: rgba(214, 147, 39, 0.32);
  --tint-danger: rgba(227, 90, 98, 0.13);
  --tint-danger-border: rgba(227, 90, 98, 0.32);
  --tint-llm: rgba(154, 114, 234, 0.14);
  --tint-llm-border: rgba(154, 114, 234, 0.32);

  --wash-warn: linear-gradient(160deg, rgba(214, 147, 39, 0.16), var(--surface) 60%);
  --wash-danger: linear-gradient(160deg, rgba(227, 90, 98, 0.14), var(--surface) 60%);
  --wash-ok: linear-gradient(160deg, rgba(22, 185, 138, 0.14), var(--surface) 60%);
}

/* ------------------------------------------------------------------ base */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 12.8px;
  background: var(--bg-sunken);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: -0.015em;
}

h1 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 12.5px;
  color: inherit;
}

button {
  cursor: pointer;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
  font-size: 12px;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

::placeholder {
  color: var(--text-placeholder);
}

/* --------------------------------------------------------------- layout */

.rm-app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg-sunken);
}

.rm-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rm-page {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg-sunken);
  flex: 1 1;
}

.rm-page-narrow {
  max-width: 900px;
}

.rm-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.rm-page-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

.rm-grid {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.rm-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rm-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rm-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rm-grid-split {
  grid-template-columns: 1.42fr 1fr;
}

.rm-grid-split-wide {
  grid-template-columns: 1.3fr 1fr;
}

.rm-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.rm-row-wrap {
  flex-wrap: wrap;
}

.rm-spacer {
  margin-left: auto;
}

.rm-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rm-stack-lg {
  gap: 14px;
}

@media (max-width: 1279px) {
  .rm-grid-split-wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .rm-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rm-grid-split,
  .rm-grid-3,
  .rm-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------------------- sidebar */

.rm-sidebar {
  background: var(--nav);
  border-right: 1px solid var(--border);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.rm-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 6px 0;
  color: var(--text);
}

.rm-brand-mark {
  width: 26px;
  height: 26px;
  border-radius: var(--r-nav);
  background: linear-gradient(150deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 13px var(--font-mono);
  color: #fff;
  flex: none;
}

.rm-brand-name {
  font: 600 14.5px var(--font-sans);
  letter-spacing: -0.01em;
}

.rm-project {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--r-ctrl);
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease;
}

.rm-project:hover {
  background: var(--surface-inset);
}

.rm-project-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(14, 154, 115, 0.16);
  flex: none;
}

.rm-project-name {
  font-weight: 500;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-project-env {
  font: 11px var(--font-mono);
  color: var(--text-dim);
}

.rm-project-menu {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--r-ctrl);
  box-shadow: var(--shadow-overlay);
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rm-project-menu button {
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: var(--r-inner);
  padding: 6px 9px;
  font-size: 12.5px;
  color: var(--text-strong-muted);
  transition: background 120ms ease;
}

.rm-project-menu button:hover {
  background: var(--surface-inset);
}

.rm-project-menu button[aria-current="true"] {
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 500;
}

.rm-navgroup {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rm-navlabel {
  font: 600 10px var(--font-mono);
  letter-spacing: 0.13em;
  color: var(--text-placeholder);
  padding: 0 9px 5px;
}

.rm-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: var(--r-nav);
  color: var(--text-strong-muted);
  font-size: 12.5px;
  transition: background 120ms ease, color 120ms ease;
}

.rm-nav-item:hover {
  background: var(--border-divider);
  color: var(--text);
}

.rm-nav-item.is-active {
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 500;
  box-shadow: inset 2px 0 0 var(--accent);
}

.rm-nav-hint {
  margin-left: auto;
  font: 11px var(--font-mono);
  color: var(--text-dim);
}

.rm-nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
}

.rm-nav-count {
  margin-left: auto;
  font: 600 10.5px var(--font-mono);
  border-radius: var(--r-pill);
  padding: 1px 6px;
}

.rm-nav-count-danger {
  color: var(--danger-text);
  background: var(--tint-danger);
  border: 1px solid var(--tint-danger-border);
}

.rm-nav-count-warn {
  color: var(--warn-text);
  background: var(--tint-warn);
  border: 1px solid var(--tint-warn-border);
}

.rm-nav-count-neutral {
  color: var(--text-muted);
  background: var(--surface-inset);
  border: 1px solid var(--border-strong);
}

.rm-subnav {
  margin: 2px 0 0 15px;
  padding-left: 11px;
  border-left: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rm-subnav-item {
  padding: 5px 9px;
  border-radius: var(--r-inner);
  font-size: 12.5px;
  color: var(--text-muted);
  transition: background 120ms ease, color 120ms ease;
}

.rm-subnav-item:hover {
  background: var(--surface-inset);
  color: var(--text);
}

.rm-subnav-item.is-active {
  color: var(--accent-text);
  background: rgba(37, 99, 235, 0.07);
}

.rm-sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.rm-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px 2px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
}

.rm-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--avatar-fill);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 10.5px var(--font-mono);
  color: var(--text-strong-muted);
  flex: none;
}

.rm-avatar-brand {
  background: linear-gradient(150deg, #3b82f6, #1d4ed8);
  color: #fff;
}

.rm-avatar-sm {
  width: 26px;
  height: 26px;
  font-size: 10px;
}

.rm-user-name {
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-user-role {
  font: 10.5px var(--font-mono);
  color: var(--text-dim);
}

.rm-role-card {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--r-ctrl);
  padding: 9px 10px;
}

/* --------------------------------------------------------------- topbar */

.rm-topbar {
  min-height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
}

.rm-topbar-title {
  font: 600 15px var(--font-sans);
  white-space: nowrap;
}

.rm-crumb-sep {
  color: var(--border-firm);
}

.rm-crumb {
  font-size: 13px;
  color: var(--text-strong-muted);
}

.rm-search {
  flex: 1 1;
  max-width: 460px;
  margin-left: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  border-radius: var(--r-ctrl);
  padding: 7px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.rm-search:focus-within {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--ring);
}

.rm-search input {
  flex: 1 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.rm-search input:focus-visible {
  box-shadow: none;
}

.rm-search-note {
  font: 10.5px var(--font-mono);
  color: var(--text-dim);
  white-space: nowrap;
}

.rm-kbd {
  font: 600 10.5px var(--font-mono);
  border: 1px solid #d3d9e0;
  border-radius: var(--r-chip);
  padding: 1px 5px;
  background: var(--surface);
  color: var(--text-muted);
}

[data-theme="dark"] .rm-kbd {
  border-color: var(--border-firm);
}

.rm-divider-v {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex: none;
}

/* -------------------------------------------------------------- buttons */

.rm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-strong-muted);
  border-radius: var(--r-ctrl);
  padding: 7px 13px;
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

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

.rm-btn:active:not(:disabled) {
  background: var(--surface-raised);
  border-color: var(--border-firm);
}

.rm-btn:disabled {
  border-color: var(--border-divider);
  background: var(--surface);
  color: var(--text-disabled);
  cursor: not-allowed;
}

.rm-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}

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

.rm-btn-primary:active:not(:disabled) {
  background: var(--accent-active);
  border-color: var(--accent-active);
}

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

.rm-btn-primary:focus-visible {
  box-shadow: var(--ring-strong);
}

.rm-btn-danger {
  border-color: rgba(210, 58, 66, 0.3);
  color: var(--danger-text);
  background: var(--surface);
}

.rm-btn-danger:hover:not(:disabled) {
  background: var(--tint-danger);
  border-color: var(--tint-danger-border);
  color: var(--danger-text);
}

.rm-btn-danger-solid {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  font-weight: 500;
}

.rm-btn-danger-solid:hover:not(:disabled) {
  background: var(--danger-deep);
  border-color: var(--danger-deep);
  color: #fff;
}

.rm-btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

.rm-btn-ghost:hover:not(:disabled) {
  background: var(--tint-accent);
  border-color: transparent;
  color: var(--accent-hover);
}

.rm-btn-sm {
  padding: 5px 11px;
  border-radius: var(--r-nav);
}

.rm-btn-xs {
  padding: 3px 9px;
  font: 11.5px var(--font-mono);
  border-radius: var(--r-inner);
}

.rm-spin {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: rm-spin 700ms linear infinite;
  flex: none;
}

.rm-spin-ink {
  border-color: var(--border-firm);
  border-top-color: var(--accent);
}

@keyframes rm-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------- inputs */

.rm-input,
.rm-select,
.rm-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--r-ctrl);
  padding: 8px 11px;
  font-size: 12.5px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.rm-textarea {
  min-height: 66px;
  resize: vertical;
  line-height: 1.55;
}

.rm-select {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) calc(50% + 1px), calc(100% - 11px) calc(50% + 1px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

.rm-input:disabled,
.rm-select:disabled,
.rm-textarea:disabled {
  border-color: var(--border-divider);
  background: var(--surface-subtle);
  color: var(--text-disabled);
  cursor: not-allowed;
}

.rm-input-invalid,
.rm-invalid .rm-input,
.rm-invalid .rm-select {
  border-color: var(--danger);
  background: rgba(210, 58, 66, 0.04);
}

.rm-input-sm {
  padding: 5px 9px;
  font-size: 12px;
}

.rm-input-mono {
  font-family: var(--font-mono);
}

.rm-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.rm-field > label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-strong-muted);
}

.rm-field-hint {
  font: 11px var(--font-mono);
  color: var(--text-dim);
}

.rm-field-error {
  font: 11px var(--font-mono);
  color: var(--danger-text);
}

.rm-checkbox {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  accent-color: var(--accent);
  margin: 0;
  flex: none;
}

.rm-slider {
  flex: 1 1;
  accent-color: var(--accent);
}

.rm-setting-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-gap: 14px 18px;
  gap: 14px 18px;
  align-items: center;
  font-size: 12.8px;
}

.rm-setting-grid > div > .rm-setting-name {
  font-weight: 500;
}

.rm-setting-grid > div > .rm-setting-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

@media (max-width: 720px) {
  .rm-setting-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px 0;
  }
}

/* --------------------------------------------------------------- badges */

.rm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 10px var(--font-mono);
  letter-spacing: 0.05em;
  border-radius: var(--r-chip);
  padding: 2px 6px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.rm-badge-accent {
  color: var(--accent-text);
  background: var(--tint-accent);
  border-color: var(--tint-accent-border);
}

.rm-badge-ok {
  color: var(--ok-text);
  background: var(--tint-ok);
  border-color: var(--tint-ok-border);
}

.rm-badge-warn {
  color: var(--warn-text);
  background: var(--tint-warn);
  border-color: var(--tint-warn-border);
}

.rm-badge-danger {
  color: var(--danger-text);
  background: var(--tint-danger);
  border-color: var(--tint-danger-border);
}

.rm-badge-llm {
  color: var(--llm-text);
  background: var(--tint-llm);
  border-color: var(--tint-llm-border);
}

.rm-badge-neutral {
  color: var(--text-muted);
  background: var(--surface-inset);
  border-color: var(--border-strong);
}

.rm-badge-pill {
  border-radius: var(--r-pill);
  padding: 1px 7px;
}

.rm-badge-lg {
  font-size: 10.5px;
  padding: 3px 7px;
  border-radius: 5px;
  letter-spacing: 0.06em;
}

.rm-badge-span {
  width: 44px;
  justify-content: center;
  font-size: 9.5px;
  flex: none;
}

.rm-badge-sev {
  width: 44px;
  justify-content: center;
  font-size: 10.5px;
  padding: 2px 7px;
}

/* status dot + label */
.rm-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.8px;
}

.rm-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex: none;
}

.rm-status-ok {
  color: var(--ok-text);
}
.rm-status-ok .rm-status-dot {
  background: var(--ok);
}
.rm-status-error {
  color: var(--danger-text);
}
.rm-status-error .rm-status-dot {
  background: var(--danger);
}
.rm-status-warn {
  color: var(--warn-text);
}
.rm-status-warn .rm-status-dot {
  background: var(--warn-bright);
}
.rm-status-neutral {
  color: var(--text-muted);
}
.rm-status-neutral .rm-status-dot {
  background: var(--text-faint);
}

.rm-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 11.5px var(--font-mono);
  color: var(--ok-text);
  border: 1px solid var(--tint-ok-border);
  background: var(--tint-ok);
  border-radius: var(--r-pill);
  padding: 3px 9px;
}

.rm-live .rm-status-dot {
  background: var(--ok);
  animation: rm-pulse 1.8s ease-in-out infinite;
}

@keyframes rm-pulse {
  50% {
    opacity: 0.35;
  }
}

/* ---------------------------------------------------- chips & filtering */

.rm-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d3d9e0;
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 5px 11px;
  font-size: 12.5px;
  color: var(--text);
  transition: background 120ms ease, border-color 120ms ease;
}

[data-theme="dark"] .rm-chip {
  border-color: var(--border-strong);
}

.rm-chip-key {
  color: var(--text-dim);
  font: 11.5px var(--font-mono);
}

.rm-chip-x {
  color: var(--text-dim);
  border: 0;
  background: transparent;
  padding: 0 0 0 2px;
  line-height: 1;
}

.rm-chip-x:hover {
  color: var(--danger-text);
}

.rm-chip-dashed {
  border: 1px dashed var(--border-firm);
  background: transparent;
  color: var(--text-muted);
}

.rm-chip-dashed:hover {
  background: var(--surface-inset);
  color: var(--text);
}

.rm-tab-pill {
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 12.5px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.rm-tab-pill:hover {
  background: var(--surface-inset);
  color: var(--text);
}

.rm-tab-pill.is-active {
  background: var(--surface-raised);
  border-color: #d3d9e0;
  color: var(--text);
  font-weight: 500;
}

[data-theme="dark"] .rm-tab-pill.is-active {
  border-color: var(--border-firm);
}

/* segmented control */
.rm-seg {
  display: inline-flex;
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-radius: var(--r-ctrl);
  padding: 2px;
  gap: 2px;
  flex-wrap: wrap;
}

.rm-seg button {
  border: 0;
  background: transparent;
  padding: 5px 12px;
  border-radius: var(--r-inner);
  color: var(--text-muted);
  font-size: 12.5px;
  transition: background 120ms ease, color 120ms ease;
}

.rm-seg button:hover {
  color: var(--text);
}

.rm-seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  box-shadow: var(--shadow-raised);
}

.rm-seg-sm button {
  padding: 3px 12px;
  font-size: 12px;
  border-radius: 5px;
}

/* underline tabs */
.rm-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  flex-wrap: wrap;
}

.rm-tabs button {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 120ms ease, box-shadow 120ms ease;
}

.rm-tabs button:hover {
  color: var(--text);
}

.rm-tabs button[aria-selected="true"] {
  color: var(--text);
  font-weight: 500;
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* toggle */
.rm-toggle {
  width: 30px;
  height: 17px;
  border-radius: var(--r-pill);
  background: var(--neutral-fill);
  border: 0;
  padding: 0;
  position: relative;
  flex: none;
  transition: background 120ms ease;
}

.rm-toggle::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 20, 25, 0.2);
  transition: left 120ms ease;
}

.rm-toggle[aria-checked="true"] {
  background: var(--accent);
}

.rm-toggle[aria-checked="true"]::after {
  left: 15px;
  box-shadow: none;
}

.rm-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* rating scale */
.rm-scale {
  display: inline-flex;
  gap: 4px;
}

.rm-scale button {
  width: 26px;
  height: 26px;
  border-radius: var(--r-inner);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font: 11.5px var(--font-mono);
  color: var(--text-dim);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.rm-scale button:hover {
  border-color: var(--border-firm);
  color: var(--text);
}

.rm-scale button[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-text);
  font-weight: 600;
}

/* ---------------------------------------------------------------- cards */

.rm-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-card);
  overflow: hidden;
}

.rm-card-pad {
  padding: 14px 15px;
}

.rm-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border-divider);
  flex-wrap: wrap;
}

.rm-card-title {
  font: 600 14px var(--font-sans);
}

.rm-card-body {
  padding: 14px 15px;
}

.rm-card-foot {
  border-top: 1px solid var(--border-divider);
  padding: 11px 15px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

.rm-card-ok {
  border-color: var(--tint-ok-border);
  background: var(--wash-ok);
}

.rm-card-warn {
  border-color: rgba(180, 116, 10, 0.28);
  background: var(--wash-warn);
}

.rm-card-danger {
  border-color: rgba(210, 58, 66, 0.28);
  background: var(--wash-danger);
}

[data-theme="dark"] .rm-card-warn {
  border-color: var(--tint-warn-border);
}

[data-theme="dark"] .rm-card-danger {
  border-color: var(--tint-danger-border);
}

.rm-tile-ok {
  border: 1px solid var(--tint-ok-border);
  background: var(--tint-ok);
  border-radius: var(--r-card);
  padding: 11px 12px;
}

.rm-tile-danger {
  border: 1px solid var(--tint-danger-border);
  background: var(--tint-danger);
  border-radius: var(--r-card);
  padding: 11px 12px;
}

.rm-tile-warn {
  border: 1px solid var(--tint-warn-border);
  background: var(--tint-warn);
  border-radius: var(--r-card);
  padding: 11px 12px;
}

.rm-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 12px 13px;
}

.rm-inset {
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  border-radius: var(--r-ctrl);
  padding: 10px 11px;
  font: 11.5px/1.7 var(--font-mono);
  color: var(--text-strong-muted);
  overflow-x: auto;
  margin: 0;
  white-space: pre-wrap;
}

.rm-inset-prompt {
  color: var(--text-faint);
}

.rm-quote {
  border-left: 2px solid var(--accent);
  background: rgba(37, 99, 235, 0.05);
  padding: 9px 11px;
  border-radius: 0 var(--r-nav) var(--r-nav) 0;
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--text-body);
}

.rm-quote-danger {
  border-left-color: var(--danger);
  background: rgba(210, 58, 66, 0.05);
  color: var(--danger-ink);
}

.rm-mark-danger {
  background: rgba(210, 58, 66, 0.14);
  padding: 1px 3px;
  border-radius: 3px;
  color: var(--danger-ink);
}

.rm-redacted {
  font: 11.5px var(--font-mono);
  background: var(--surface-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-chip);
  padding: 1px 5px;
  color: var(--warn-text);
}

/* ------------------------------------------------------- metric tiles */

.rm-stat {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 14px 15px;
  min-width: 0;
}

.rm-label {
  font: 600 10px var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.rm-label-md {
  font-size: 10.5px;
}

.rm-stat-value {
  font: 600 28px/1 var(--font-sans);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.rm-stat-value-sm {
  font-size: 22px;
}

.rm-stat-delta {
  font: 500 11.5px var(--font-mono);
  padding-bottom: 3px;
}

.rm-stat-row {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.rm-metricstrip {
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
}

/* -------------------------------------------------- meters & sparklines */

.rm-meter {
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  position: relative;
}

.rm-meter-lg {
  height: 7px;
  border-radius: 4px;
  overflow: hidden;
}

.rm-meter-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
}

.rm-meter-lg .rm-meter-fill {
  position: relative;
  height: 100%;
}

.rm-meter-fill-ok {
  background: linear-gradient(90deg, var(--ok-text), var(--ok-bright));
}
.rm-meter-fill-warn {
  background: linear-gradient(90deg, var(--warn), var(--warn-bright));
}
.rm-meter-fill-danger {
  background: linear-gradient(90deg, var(--danger-deep), var(--danger));
}
.rm-meter-fill-accent {
  background: var(--accent);
}

.rm-meter-tick {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: var(--text-placeholder);
}

.rm-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 34px;
  margin-top: 10px;
}

.rm-bars-lg {
  height: 52px;
  gap: 4px;
}

.rm-bars span {
  flex: 1 1;
  background: var(--neutral-fill);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
}

.rm-bars .is-warn {
  background: var(--warn-bright);
}
.rm-bars .is-ok {
  background: var(--ok-bright);
}
.rm-bars .is-danger {
  background: var(--danger);
}

.rm-spark {
  width: 100%;
  height: 34px;
  margin-top: 10px;
  display: block;
}

/* duration bar in list rows */
.rm-durbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.rm-durbar-track {
  width: 42px;
  height: 4px;
  border-radius: 2px;
  background: var(--track);
  overflow: hidden;
  flex: none;
}

.rm-durbar-fill {
  display: block;
  height: 100%;
  background: var(--accent);
}

.rm-durbar-fill-danger {
  background: var(--danger);
}

/* ---------------------------------------------------------------- rails */

.rm-rail {
  width: 3px;
  border-radius: 2px;
  flex: none;
  min-height: 30px;
  align-self: stretch;
}

.rm-rail-danger {
  background: var(--danger);
}
.rm-rail-warn {
  background: var(--warn-bright);
}
.rm-rail-ok {
  background: var(--ok);
}
.rm-rail-neutral {
  background: var(--border-firm);
}

/* --------------------------------------------------------------- tables */

.rm-table {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-card);
  overflow: hidden;
}

.rm-table-scroll {
  overflow-x: auto;
}

.rm-thead,
.rm-tr {
  display: grid;
  grid-gap: 11px;
  gap: 11px;
  align-items: center;
  padding: 11px 14px;
}

.rm-thead {
  padding: 9px 14px;
  font: 600 10px var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--text-dim);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-divider);
  text-transform: uppercase;
}

.rm-thead button {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-transform: inherit;
  text-align: inherit;
}

.rm-thead button:hover,
.rm-thead .is-sorted {
  color: var(--accent);
}

.rm-tr {
  border: 0;
  border-bottom: 1px solid var(--border-hairline);
  font-size: 12.8px;
  color: var(--text);
  text-align: left;
  width: 100%;
  background: transparent;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.rm-tr:last-child {
  border-bottom: 0;
}

a.rm-tr,
button.rm-tr {
  color: inherit;
}

.rm-tr:hover {
  background: var(--row-hover);
}

.rm-tr:hover .rm-id {
  color: var(--accent-hover);
  text-decoration: underline;
}

.rm-tr.is-selected {
  background: var(--row-selected);
  box-shadow: inset 2px 0 0 var(--accent);
}

.rm-tr.is-error {
  box-shadow: inset 2px 0 0 var(--danger);
}

.rm-tr.is-error.is-selected {
  background: var(--row-selected);
  box-shadow: inset 2px 0 0 var(--danger);
}

.rm-tfoot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-subtle);
  border-top: 1px solid var(--border-divider);
  font: 11.5px var(--font-mono);
  color: var(--text-muted);
  flex-wrap: wrap;
}

.rm-tr-expand {
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-hairline);
  padding: 13px 14px 15px 51px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: rm-expand 160ms ease;
}

@keyframes rm-expand {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
}

.rm-list-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-hairline);
  transition: background 120ms ease;
  width: 100%;
  text-align: left;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: inherit;
}

.rm-list-row:last-child {
  border-bottom: 0;
}

a.rm-list-row:hover,
button.rm-list-row:hover {
  background: var(--row-hover);
}

.rm-bulkbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  background: var(--row-selected);
  border-top: 1px solid var(--track-accent);
  flex-wrap: wrap;
}

/* semantic tables keep the legacy hook the Playwright journeys select on */
.rootmark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.8px;
}

.rootmark-table th,
.rootmark-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-hairline);
  vertical-align: middle;
}

.rootmark-table thead th {
  font: 600 10px var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-divider);
  white-space: nowrap;
}

.rootmark-table tbody tr {
  transition: background 120ms ease;
}

.rootmark-table tbody tr:hover {
  background: var(--row-hover);
}

.rootmark-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ------------------------------------------------------------- timeline */

.rm-tl {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.rm-tl-grid {
  position: absolute;
  left: 218px;
  right: 0;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(90deg, var(--track) 0 1px, transparent 1px 25%);
  pointer-events: none;
}

.rm-tl-axis {
  display: flex;
  gap: 10px;
  font: 10.5px var(--font-mono);
  color: var(--text-placeholder);
  padding-left: 218px;
}

.rm-tl-axis span {
  flex: 1 1;
}

.rm-tl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  border-radius: var(--r-nav);
  border: 1px solid transparent;
  width: 100%;
  background: transparent;
  text-align: left;
  color: inherit;
  transition: background 120ms ease;
}

button.rm-tl-row:hover {
  background: var(--row-hover);
}

.rm-tl-row.is-selected {
  background: var(--row-selected);
  border-color: var(--tint-accent-border);
}

.rm-tl-row.is-security {
  padding: 4px 6px;
  background: rgba(210, 58, 66, 0.05);
  border-color: var(--tint-danger-border);
}

.rm-tl-name {
  width: 208px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-width: 0;
}

.rm-tl-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}

.rm-tl-track {
  flex: 1 1;
  height: 20px;
  position: relative;
  min-width: 0;
}

.rm-tl-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: var(--r-chip);
  min-width: 2px;
}

.rm-tl-bar-agent {
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(37, 99, 235, 0.4);
}
.rm-tl-bar-tool {
  background: rgba(14, 154, 115, 0.2);
  border: 1px solid rgba(14, 154, 115, 0.45);
}
.rm-tl-bar-llm {
  background: rgba(124, 77, 224, 0.18);
  border: 1px solid var(--llm);
}
.rm-tl-bar-memory {
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
}
.rm-tl-bar-chain {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.34);
}
.rm-tl-bar-error {
  background: rgba(210, 58, 66, 0.16);
  border: 1px solid rgba(210, 58, 66, 0.45);
}

.rm-tl-ms {
  position: absolute;
  top: 3px;
  font: 10.5px var(--font-mono);
  color: var(--text-dim);
  white-space: nowrap;
}

.rm-tl-marker {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 2px;
  background: var(--danger);
}

.rm-tl-divider {
  margin: 8px 0 2px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.rm-tl-divider hr {
  flex: 1 1;
  height: 1px;
  border: 0;
  background: var(--border-divider);
  margin: 0;
}

.rm-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border-divider);
  font-size: 12px;
  color: var(--text-muted);
}

.rm-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rm-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: none;
}

/* ---------------------------------------------------------- conversation */

.rm-turn {
  display: flex;
  gap: 11px;
}

.rm-bubble-user {
  flex: 1 1;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 10px 10px 10px 3px;
  padding: 9px 11px;
  font-size: 12.8px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.rm-bubble-agent {
  flex: 1 1;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}

.rm-bubble-agent.is-flagged {
  border-color: rgba(180, 116, 10, 0.28);
  background: var(--wash-warn);
}

.rm-bubble-text {
  padding: 9px 11px;
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--text-body);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.rm-bubble-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 8px 11px;
  border-top: 1px solid var(--border-divider);
  background: var(--surface-subtle);
  font: 11.5px var(--font-mono);
  color: var(--text-muted);
}

/* -------------------------------------------------------- states (12) */

.rm-empty {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  text-align: center;
}

.rm-empty-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px dashed var(--border-firm);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 14px var(--font-mono);
  color: var(--text-placeholder);
}

.rm-empty-text {
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 340px;
  line-height: 1.6;
}

.rm-skel {
  display: block;
  height: 9px;
  border-radius: 3px;
  background: var(--track);
}

.rm-skel-shimmer {
  background: linear-gradient(90deg, var(--track), var(--border), var(--track));
  background-size: 200% 100%;
  animation: rm-shimmer 1.4s ease-in-out infinite;
}

@keyframes rm-shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -100% 0;
  }
}

.rm-skel-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.rm-notice {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 16px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.rm-notice-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--r-nav);
  background: var(--surface-inset);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  flex: none;
}

.rm-notice-title {
  font: 600 13.5px var(--font-sans);
}

.rm-notice-body {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.6;
}

.rm-notice-danger {
  border-color: rgba(210, 58, 66, 0.28);
  background: var(--wash-danger);
}

.rm-notice-danger .rm-notice-icon {
  background: var(--tint-danger);
  border-color: rgba(210, 58, 66, 0.3);
  color: var(--danger-text);
}

.rm-notice-danger .rm-notice-body {
  color: var(--text-strong-muted);
}

.rm-notice-warn {
  border-color: rgba(180, 116, 10, 0.28);
  background: var(--wash-warn);
}

.rm-notice-warn .rm-notice-icon {
  background: var(--tint-warn);
  border-color: var(--tint-warn-border);
  color: var(--warn-text);
}

.rm-notice-meta {
  font: 11px var(--font-mono);
  color: var(--text-dim);
  margin-top: 7px;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------- toast & tooltip */

.rm-toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}

.rm-toast {
  border-radius: var(--r-card);
  padding: 10px 12px;
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12.5px;
  box-shadow: var(--shadow-overlay);
  animation: rm-toast-in 160ms ease;
}

@keyframes rm-toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.rm-toast-ok {
  border: 1px solid rgba(14, 154, 115, 0.28);
  background: rgba(14, 154, 115, 0.07);
  color: var(--text);
}

.rm-toast-ok .rm-toast-mark {
  color: var(--ok-text);
}

.rm-toast-error {
  border: 1px solid rgba(210, 58, 66, 0.28);
  background: rgba(210, 58, 66, 0.06);
  color: var(--text);
}

.rm-toast-error .rm-toast-mark {
  color: var(--danger-text);
}

.rm-toast-info {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

[data-theme="dark"] .rm-toast-ok,
[data-theme="dark"] .rm-toast-error {
  background: var(--surface);
}

.rm-toast-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  padding: 0 2px;
}

.rm-toast-close:hover {
  color: var(--text);
}

.rm-tooltip {
  background: #101419;
  border-radius: var(--r-nav);
  padding: 6px 9px;
  font: 11.5px var(--font-mono);
  color: #f1f3f5;
  box-shadow: var(--shadow-tooltip);
  display: inline-block;
}

/* ---------------------------------------------------------- overlays */

.rm-scrim {
  position: fixed;
  inset: 0;
  background: rgba(16, 20, 25, 0.32);
  z-index: 40;
  animation: rm-fade 160ms ease;
  border: 0;
  padding: 0;
}

@keyframes rm-fade {
  from {
    opacity: 0;
  }
}

.rm-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-overlay);
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: rm-slide 160ms ease;
}

@keyframes rm-slide {
  from {
    transform: translateX(12px);
    opacity: 0;
  }
}

.rm-drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--border);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.rm-drawer-body {
  padding: 15px 17px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ------------------------------------------------------------ utility */

.rm-mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.rm-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.rm-num-strong {
  font: 600 14px var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.rm-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  transition: color 120ms ease;
}

.rm-muted {
  color: var(--text-muted);
  font-size: 12.5px;
}

.rm-dim {
  color: var(--text-dim);
}

.rm-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* A note that is a refusal rather than an aside — e.g. the live tail hitting
   the project's viewer cap. */
.rm-note-warn {
  color: var(--warn-text);
  background: var(--tint-warn);
  border: 1px solid var(--tint-warn-border);
  border-radius: var(--r-ctrl);
  padding: 8px 11px;
}

.rm-right {
  text-align: right;
  justify-content: flex-end;
}

.rm-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.rm-ok-text {
  color: var(--ok-text);
}
.rm-warn-text {
  color: var(--warn-text);
}
.rm-danger-text {
  color: var(--danger-text);
}
.rm-accent-text {
  color: var(--accent);
}

.rm-hr {
  height: 1px;
  border: 0;
  background: var(--border-divider);
  margin: 0;
}

.rm-linkish {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  font-size: 12px;
}

.rm-linkish:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

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

/* auth screen */
.rm-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: var(--bg-sunken);
}

.rm-auth-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-overlay);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* token / component reference page */
.rm-swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.rm-swatch-chip {
  height: 52px;
  border-radius: 9px;
  border: 1px solid var(--border);
}

.rm-swatch-chip-sm {
  height: 42px;
}

.rm-swatch-name {
  font: 600 11.5px var(--font-mono);
  margin-top: 7px;
}

.rm-swatch-value {
  font: 11px var(--font-mono);
  color: var(--text-dim);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 860px) {
  .rm-app {
    grid-template-columns: minmax(0, 1fr);
  }
  .rm-page {
    padding: 16px 14px;
  }
  /* The sidebar becomes a wrapping top rail; every row inside it has to wrap
     too, or the nav pushes the document wider than the viewport. */
  .rm-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    max-width: 100%;
  }
  .rm-sidebar-foot {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    max-width: 100%;
  }
  .rm-user {
    max-width: 100%;
    min-width: 0;
  }
  .rm-user-name,
  .rm-user-role {
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .rm-topbar {
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
    padding: 10px 14px;
  }
  .rm-topbar .rm-row {
    margin-left: 0 !important;
  }
  .rm-search {
    margin-left: 0;
    max-width: 100%;
    order: 3;
    flex-basis: 100%;
  }
  .rm-row {
    flex-wrap: wrap;
  }
  .rm-page-head {
    align-items: flex-start;
  }
  .rm-navgroup {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .rm-navlabel {
    padding: 0 4px;
  }
  .rm-subnav {
    margin: 0;
    padding-left: 8px;
    flex-direction: row;
  }
  .rm-user {
    border-top: 0;
    margin-top: 0;
    padding: 0;
  }
  .rm-nav-count,
  .rm-nav-hint {
    margin-left: 0;
  }
  .rm-tl-grid,
  .rm-tl-axis {
    padding-left: 0;
    left: 0;
  }
  .rm-tl-name {
    width: 140px;
  }
  .rm-swatch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ------------------------------------------------ compliance controls */
/* Structure and a11y behaviour of these components is unchanged; only the
   surface is retokenised onto the design system. */

.rootmark-compliance-layout {
  max-width: 1280px;
}

.rootmark-compliance-panes {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-gap: 14px;
  gap: 14px;
  align-items: start;
}

@media (max-width: 900px) {
  .rootmark-compliance-panes {
    grid-template-columns: minmax(0, 1fr);
  }
}

.rootmark-compliance-framework-nav {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--topbar-h) + 14px);
}

.rootmark-compliance-nav-title {
  font: 600 10px var(--font-mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-placeholder);
  margin: 0 0 8px;
}

.rootmark-compliance-framework-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rootmark-compliance-framework-list button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: var(--r-nav);
  padding: 7px 9px;
  font-size: 12.5px;
  color: var(--text-strong-muted);
  transition: background 120ms ease, color 120ms ease;
}

.rootmark-compliance-framework-list button:hover {
  background: var(--surface-inset);
  color: var(--text);
}

.rootmark-compliance-framework-list button.active {
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 500;
  box-shadow: inset 2px 0 0 var(--accent);
}

.rootmark-compliance-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rootmark-compliance-pills {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}

.rootmark-compliance-pill {
  font: 11.5px var(--font-mono);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  background: var(--surface);
}

.rootmark-compliance-control-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent);
  font-size: 12.8px;
  text-align: left;
}

.rootmark-compliance-control-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.rootmark-compliance-mapping-badge {
  display: inline-flex;
  align-items: center;
  font: 600 10.5px var(--font-mono);
  border-radius: var(--r-chip);
  padding: 2px 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface-inset);
  color: var(--text-muted);
}

.rootmark-compliance-mapping-badge-ok {
  color: var(--ok-text);
  background: var(--tint-ok);
  border-color: var(--tint-ok-border);
}

.rootmark-compliance-mapping-badge-warn {
  color: var(--warn-text);
  background: var(--tint-warn);
  border-color: var(--tint-warn-border);
}

.rootmark-compliance-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.rootmark-compliance-mapping-form {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  border-radius: var(--r-card);
  padding: 13px 14px;
}

.rootmark-compliance-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  grid-gap: 10px;
  gap: 10px;
  margin: 10px 0;
}

.rootmark-compliance-form-grid label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-strong-muted);
  margin-bottom: 5px;
}

.rootmark-compliance-form-error {
  color: var(--danger-text);
  font: 11.5px var(--font-mono);
  margin-top: 6px;
}

.rootmark-compliance-notes {
  min-height: 34px;
}

/* control drawer */
.rootmark-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 20, 25, 0.32);
  z-index: 40;
  border: 0;
  padding: 0;
  animation: rm-fade 160ms ease;
}

.rootmark-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(620px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-overlay);
  z-index: 50;
  overflow-y: auto;
  padding: 0 18px 22px;
  animation: rm-slide 160ms ease;
}

.rootmark-drawer-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 15px 0 13px;
  border-bottom: 1px solid var(--border);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.rootmark-drawer section {
  margin-top: 16px;
}

.rootmark-drawer h3 {
  font-size: 14px;
  margin: 0 0 8px;
}

/* legacy container kept for any page not yet migrated */
.rootmark-container {
  max-width: 1200px;
  padding: 22px;
}

