/* Get Ready Intelligence · Black Belt Rehab skin.
   Builds on the Pairwise tokens (tokens.css) and re-points them at the clinic's own identity:
   near-black ink, a warm paper canvas and a single crimson accent taken from the black-belt rank bar.
   Colour is reserved for meaning: crimson for brand and "needs action", status hues only inside labelled pills. */

/* ─── Tokens ─────────────────────────────────────────────────────────────────────────────────────────── */
:root {
  --brand: #c8102e;
  --brand-ink: #a50d26;
  --brand-soft: color-mix(in srgb, var(--brand) 9%, transparent);
  --ink: #141414;
  --on-ink: #ffffff;

  --accent: var(--ink);
  --accent-ink: var(--ink);
  --accent-soft: color-mix(in srgb, var(--ink) 6%, transparent);
  --accent-border: color-mix(in srgb, var(--ink) 16%, transparent);
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);

  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --surface-3: #f0eee9;
  --border: #e7e4de;
  --border-strong: #d6d2c9;
  --text: #161514;
  --text-2: #3b3936;
  --muted: #67635c;
  --faint: #78736b;

  --ok: #1c7a4c;
  --warn: #9a5a06;
  --danger: #b4232f;
  --info: #3e5c82;
  --ok-soft: color-mix(in srgb, var(--ok) 10%, transparent);
  --warn-soft: color-mix(in srgb, var(--warn) 11%, transparent);
  --danger-soft: color-mix(in srgb, var(--danger) 9%, transparent);
  --info-soft: color-mix(in srgb, var(--info) 10%, transparent);

  --series-1: #1d1c1a;
  --series-2: var(--brand);
  --series-3: #a39c7a;
  --track: #ece9e3;
  /* Categorical slots for report charts, in this fixed order. Validated with the dataviz palette checker
     (lightness band, chroma floor, adjacent CVD ΔE ≥ 8, normal-vision floor, ≥ 3:1 contrast) on #fff. */
  --cat-1: #c8102e;
  --cat-2: #3f6ea8;
  --cat-3: #c08a1e;
  --cat-4: #00927f;
  --cat-5: #8a4f9e;
  --cat-other: #b3ada2;

  --side-bg: #121212;
  --side-line: #262524;
  --side-text: #b8b4ac;
  --side-muted: #8a867e;
  --side-hover: #1c1c1b;
  --side-active: #262523;

  --r-card: 12px;
  --r-control: 8px;
  --shadow-card: 0 1px 2px rgb(20 20 20 / 0.04);
  --shadow-pop: 0 18px 50px rgb(20 20 20 / 0.18);
  --sidebar: 240px;
  --gap: 16px;
}
:root[data-theme='dark'] {
  --brand: #ef4458;
  --brand-ink: #ff6b7c;
  --ink: #f1efea;
  --on-ink: #141414;
  --accent: var(--ink);
  --accent-ink: var(--ink);
  --bg: #0e0e0e;
  --surface: #171716;
  --surface-2: #1b1b1a;
  --surface-3: #232321;
  --border: #2a2927;
  --border-strong: #3a3936;
  --text: #f1efea;
  --text-2: #d4d0c8;
  --muted: #a5a097;
  --faint: #918c83;
  --ok: #5cc794;
  --warn: #e4a852;
  --danger: #ff7d84;
  --info: #94b2db;
  --series-1: #ecebe6;
  --series-3: #b8b190;
  --track: #2a2927;
  /* Dark steps of the same hues, validated against the dark surface #171716. */
  --cat-1: #e5404f;
  --cat-2: #5a86c8;
  --cat-3: #bd8a22;
  --cat-4: #129383;
  --cat-5: #a46ac0;
  --cat-other: #5f5b54;
  --side-bg: #0a0a0a;
  --side-line: #1f1f1e;
  --side-hover: #161615;
  --side-active: #1f1f1d;
  --shadow-card: none;
  --shadow-pop: 0 18px 50px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

/* ─── Base ───────────────────────────────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.45;
  font-weight: var(--fw-regular);
  font-variant-numeric: tabular-nums;
}
h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  touch-action: manipulation;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
small {
  font-size: 12px;
  color: var(--muted);
}
strong,
b {
  font-weight: var(--fw-semibold);
}
code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}
.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.block {
  display: block;
}
.subtle {
  color: var(--faint);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 4000;
  background: var(--ink);
  color: var(--on-ink);
  padding: 10px 14px;
  border-radius: var(--r-control);
}
.skip-link:focus {
  top: 12px;
}

/* ─── Controls ───────────────────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: var(--r-control);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: var(--fw-medium);
  white-space: nowrap;
  text-decoration: none;
  transition:
    background var(--dur-fast),
    border-color var(--dur-fast),
    color var(--dur-fast);
}
.btn:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--text) 30%, var(--border-strong));
}
.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}
.btn.primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ink) 86%, var(--brand));
  border-color: transparent;
}
.btn.sm {
  height: 32px;
  padding: 0 11px;
  font-size: 12px;
}
.btn .icon {
  width: 15px;
  height: 15px;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-control);
  color: var(--muted);
  position: relative;
}
.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}
.icon-btn .icon {
  width: 18px;
  height: 18px;
}
.select {
  appearance: none;
  height: 34px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367635c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 10px center / 14px;
  font-size: 13px;
  font-weight: var(--fw-medium);
  cursor: pointer;
  min-width: 0;
}
.select.sm {
  height: 32px;
  font-size: 12px;
}
:root[data-theme='dark'] .select,
:root[data-theme='dark'] .settings-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a5a097' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.select:hover {
  border-color: color-mix(in srgb, var(--text) 30%, var(--border-strong));
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
  background: var(--surface);
}
.search:focus-within,
.select:focus-visible,
.settings-form :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--text);
  box-shadow: var(--ring);
}
.search input {
  border: 0;
  outline: none;
  background: transparent;
  min-width: 0;
  width: 100%;
  font-size: 13px;
}
.search input::placeholder {
  color: var(--faint);
}
.search > .icon {
  width: 16px;
  height: 16px;
  color: var(--faint);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}
.text-link > .icon {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-fast) var(--ease);
}
.text-link:hover {
  color: var(--brand-ink);
}
.text-link:hover > .icon {
  transform: translateX(2px);
}
.subtle-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.subtle-link:hover {
  color: var(--text);
}
.subtle-link .icon {
  width: 13px;
  height: 13px;
}
.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Connector logos: always on a white tile so third-party marks keep their own colours in both themes. */
.logo {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.logo.lg {
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--border);
}
.logo.xl {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

/* Pills: tinted label with a dot, never colour alone. */
.gr-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: var(--fw-medium);
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--text-2);
}
.gr-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}
.gr-pill.neutral::before,
.gr-pill:not(.good, .warm, .bad, .blue)::before {
  background: var(--faint);
}
.gr-pill.good {
  background: var(--ok-soft);
  color: var(--ok);
}
.gr-pill.warm {
  background: var(--warn-soft);
  color: var(--warn);
}
.gr-pill.bad {
  background: var(--danger-soft);
  color: var(--danger);
}
.gr-pill.blue {
  background: var(--info-soft);
  color: var(--info);
}
.source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px 0 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.source .logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}
.source > i {
  width: 6px;
  height: 6px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--faint);
}

/* ─── Shell ──────────────────────────────────────────────────────────────────────────────────────────── */
.demo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 6px 20px;
  background: #0a0a0a;
  color: #b8b4ac;
  font-size: 12px;
  border-bottom: 1px solid #1f1f1e;
}
.demo-strip > span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.demo-strip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent);
}
.demo-strip strong {
  color: #fff;
  font-weight: var(--fw-semibold);
}
.demo-detail {
  padding-left: 10px;
  border-left: 1px solid #333;
}
.demo-strip button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #d8d4cc;
}
.demo-strip button:hover {
  color: #fff;
}
.demo-strip .icon {
  width: 14px;
  height: 14px;
}
.gr-layout {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: calc(100dvh - 32px);
  /* Paint the sidebar column for the full page height, however long the content runs. */
  background: linear-gradient(to right, var(--side-bg) var(--sidebar), transparent var(--sidebar));
}
.gr-main {
  min-width: 0;
}
.gr-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  background: var(--side-bg);
  color: var(--side-text);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.platform-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  color: #fff;
}
.platform-brand img {
  border-radius: 8px;
  box-shadow: 0 0 0 1px #2a2a2a;
}
.platform-brand > span {
  font-size: 15px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.platform-brand small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--side-muted);
}
.clinic-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 9px 10px;
  border: 1px solid var(--side-line);
  border-radius: 10px;
  background: #181817;
}
.clinic-switch > div {
  flex: 1;
  min-width: 0;
}
.clinic-switch strong {
  display: block;
  color: #fff;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clinic-switch small {
  display: block;
  color: var(--side-muted);
  font-size: 11px;
  white-space: nowrap;
}
.clinic-switch > .icon {
  width: 14px;
  color: var(--side-muted);
}
.logo.belt-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 0 0 1px #2c2c2c;
}
.nav-heading {
  margin: 0 0 6px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--side-muted);
}
.secondary-heading {
  margin-top: 18px;
}
.gr-sidebar nav {
  display: grid;
  gap: 1px;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--r-control);
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--side-text);
  transition:
    background var(--dur-fast),
    color var(--dur-fast);
}
.nav-item .icon {
  width: 17px;
  height: 17px;
  color: var(--side-muted);
}
.nav-item > span:first-of-type {
  flex: 1;
}
.nav-item:hover {
  background: var(--side-hover);
  color: #fff;
}
.nav-item.active {
  background: var(--side-active);
  color: #fff;
}
.nav-item.active .icon {
  color: #fff;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}
.nav-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: var(--fw-bold);
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
}
.sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 10px;
  background: #181817;
  border: 1px solid var(--side-line);
}
.sidebar-note > .icon {
  width: 16px;
  color: var(--side-muted);
  margin-top: 1px;
}
.sidebar-note strong,
.sidebar-note small {
  display: block;
  font-size: 12px;
}
.sidebar-note strong {
  color: #fff;
}
.sidebar-note small {
  color: var(--side-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.gr-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 6px 0;
  border-top: 1px solid var(--side-line);
}
.gr-account > div {
  flex: 1;
  min-width: 0;
}
.gr-account strong,
.gr-account small {
  display: block;
  font-size: 12px;
}
.gr-account strong {
  color: #fff;
}
.gr-account small {
  color: var(--side-muted);
}
.gr-account .gr-avatar {
  background: #262523;
  color: #fff;
}
.gr-account .icon-btn {
  color: var(--side-muted);
}
.gr-account .icon-btn:hover {
  background: var(--side-hover);
  color: #fff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
}
.breadcrumb {
  color: var(--muted);
}
.crumb-sep {
  width: 14px;
  height: 14px;
  color: var(--faint);
}
.topbar-left strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  width: 260px;
  padding: 0 8px 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--faint);
  font-size: 13px;
  margin-right: 6px;
}
.global-search:hover {
  border-color: color-mix(in srgb, var(--text) 30%, var(--border-strong));
}
.global-search > span {
  flex: 1;
}
.global-search kbd {
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
  font-family: inherit;
  font-size: 11px;
  color: var(--muted);
}
.bell-count {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid var(--bg);
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: var(--fw-bold);
  line-height: 1;
}
.profile {
  width: 32px;
  height: 32px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 11px;
  font-weight: var(--fw-bold);
  display: grid;
  place-items: center;
}
.mobile-toggle,
.mobile-overlay {
  display: none;
}

.gr-content {
  max-width: 1480px;
  margin: 0 auto;
  padding: 26px 28px 0;
  outline: none;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-heading h1 {
  font-size: 24px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.page-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.gr-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 12px;
}
.footer-dot {
  margin: 0 6px;
  color: var(--border-strong);
}

/* ─── Cards and grids ────────────────────────────────────────────────────────────────────────────────── */
.panel {
  min-width: 0;
  margin-bottom: var(--gap);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.gr-grid {
  display: grid;
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.gr-grid > .panel {
  margin-bottom: 0;
}
.main-split {
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
}
.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 12px;
}
.panel-title {
  flex: 1;
  min-width: 0;
}
.panel-head h2 {
  font-size: 14px;
  font-weight: var(--fw-semibold);
}
.panel-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.panel-head > :not(.panel-title) {
  flex-shrink: 0;
}
.panel-footnote {
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.bottom-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
}
.bottom-note > .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

/* KPI tiles: label and source logo on one line, the figure, then one line of context. */
.stats {
  display: grid;
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.stats.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metric {
  position: relative;
  min-width: 0;
  padding: 14px 16px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.metric-label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-medium);
}
.metric-label .icon {
  width: 15px;
  height: 15px;
  color: var(--faint);
}
.metric-top .logo {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  opacity: 0.95;
}
.metric > strong {
  display: block;
  margin: 8px 0 2px;
  font-size: 26px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.metric-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric.alert::after {
  content: '';
  position: absolute;
  left: -1px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}
.metric.alert > strong {
  color: var(--brand-ink);
}

/* ─── Overview ───────────────────────────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: var(--gap);
  padding: 22px 64px 22px 24px;
  border-radius: var(--r-card);
  background:
    radial-gradient(120% 140% at 100% 0%, #2a2a28 0%, transparent 55%),
    #141414;
  color: #fff;
  overflow: hidden;
}
:root[data-theme='dark'] .hero {
  border: 1px solid var(--border);
}
.hero-copy {
  max-width: 640px;
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: var(--fw-medium);
  color: #a8a49c;
}
.hero h2 {
  margin-top: 4px;
  font-size: 22px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.025em;
}
.hero p {
  margin-top: 6px;
  color: #c9c5bd;
  font-size: 13px;
  line-height: 1.55;
}
.hero-sources {
  flex-shrink: 0;
  text-align: right;
}
.hero-sources > span {
  display: block;
  margin-bottom: 8px;
  color: #a8a49c;
  font-size: 12px;
}
.hero-sources > div {
  display: flex;
  justify-content: flex-end;
}
.hero-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: -6px;
  padding: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px #141414;
}
.hero-logo .logo {
  width: 100%;
  height: 100%;
}
/* The black belt's rank bar: a crimson tip with two white stripes. */
.belt-tip {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  background: var(--brand);
  display: flex;
  justify-content: center;
  gap: 5px;
}
.belt-tip i {
  width: 3px;
  background: rgb(255 255 255 / 0.9);
}
.action-list {
  padding: 0 16px 4px;
}
.action-list > a,
.action-list > button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.action-list > :last-child {
  border-bottom: 0;
}
.action-list > * > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.action-list strong,
.action-list small {
  display: block;
}
.action-list strong {
  font-size: 13px;
}
.action-list small {
  margin-top: 1px;
}
.action-list > * > .icon {
  width: 15px;
  color: var(--faint);
}
.action-list > :hover strong {
  color: var(--brand-ink);
}
.action-list .logo {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}
.count-tile {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 16px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}
.count-tile.warm {
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.action-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text);
}
.action-icon .icon {
  width: 18px;
  height: 18px;
}
.finance-link-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.finance-link-strip > div {
  flex: 1;
  min-width: 0;
}
.finance-link-strip strong,
.finance-link-strip small {
  display: block;
}
.finance-link-strip:hover {
  border-color: var(--border-strong);
}
.finance-link-strip:hover .text-link {
  color: var(--brand-ink);
}

/* ─── Charts ─────────────────────────────────────────────────────────────────────────────────────────── */
.gr-chart {
  padding: 4px 16px 12px;
}
.gr-chart > svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.gr-chart .grid-line {
  stroke: var(--border);
  stroke-dasharray: 3 5;
}
.gr-chart .axis {
  fill: var(--faint);
  font-size: 12px;
}
.gr-chart .dot {
  fill: var(--surface);
  stroke: var(--series-1);
  stroke-width: 1.75;
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.gr-chart .pt:hover .dot {
  opacity: 1;
}
.chart-data {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.chart-data summary {
  cursor: pointer;
  width: max-content;
}
.chart-data summary:hover {
  color: var(--text);
}
.chart-data > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 4px;
  padding-top: 8px;
}
.chart-data span {
  display: flex;
  justify-content: space-between;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--surface-2);
}
.rank-bars {
  display: grid;
  gap: 12px;
  padding: 6px 16px 16px;
}
.rank-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  font-size: 13px;
}
.rank-label span {
  color: var(--text-2);
}
.track {
  height: 6px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--series-1);
}
.finance-chart {
  padding: 4px 16px 0;
}
.finance-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}
.finance-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.finance-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--series-1);
}
.finance-legend > span:nth-child(2) i {
  background: var(--series-2);
}
.finance-weeks {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}
.finance-week {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.finance-columns {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 168px;
  border-bottom: 1px solid var(--border-strong);
}
.finance-columns > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 46px;
  min-width: 0;
}
.finance-columns span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.finance-columns i {
  width: 26px;
  max-width: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--series-1);
}
.finance-columns > div:nth-child(2) i {
  background: var(--series-2);
}
.finance-week > strong {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-medium);
}
.finance-chart > .panel-footnote {
  margin: 14px -16px 0;
}

/* ─── Tables ─────────────────────────────────────────────────────────────────────────────────────────── */
.gr-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}
.gr-toolbar .search {
  flex: 1;
  min-width: 200px;
  max-width: 380px;
}
.toolbar-note {
  margin-left: auto;
  color: var(--faint);
  font-size: 12px;
}
.gr-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.gr-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.gr-table thead th {
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.gr-table td {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-2);
}
.gr-table td strong {
  color: var(--text);
}
.gr-table tbody tr:last-child td {
  border-bottom: 0;
}
.gr-table tbody tr:not(.group-row, .empty-row):hover td {
  background: var(--surface-2);
}
.gr-table small {
  margin-top: 1px;
}
.gr-table .cell-action {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}
.gr-table .btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-color: var(--border);
}
.gr-table tr:hover .btn {
  border-color: var(--border-strong);
  background: var(--surface);
}
.gr-table.compact td {
  padding-top: 8px;
  padding-bottom: 8px;
}
.group-row th {
  padding: 14px 16px 6px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  text-align: left;
}
.group-row th span {
  margin-left: 8px;
  color: var(--faint);
  font-weight: var(--fw-regular);
}
.person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}
.person > span:last-child > strong,
.person > span:last-child > small {
  display: block;
}
.person strong {
  font-size: 13px;
}
.gr-avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
}
.person-button {
  display: block;
}
.person-button:hover strong {
  color: var(--brand-ink);
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.pager > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pager .btn {
  height: 28px;
  padding: 0 10px;
}
.gr-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 36px 16px;
  color: var(--muted);
  text-align: center;
}
.gr-empty > .icon {
  width: 22px;
  height: 22px;
  color: var(--faint);
}
.gr-empty strong {
  color: var(--text);
}

.tabs {
  display: flex;
  gap: 22px;
  margin-bottom: var(--gap);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs button {
  flex-shrink: 0;
  padding: 9px 0 10px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.tabs button:hover {
  color: var(--text);
}
.tabs .active {
  color: var(--text);
  font-weight: var(--fw-semibold);
  border-bottom-color: var(--brand);
}

/* Context strip at the top of a source-specific page. */
.info-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--gap);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  font-size: 13px;
}
.info-strip > span:not(.logo) {
  color: var(--muted);
  font-size: 12px;
}
.info-strip > a,
.info-strip > .btn {
  margin-left: auto;
}
.info-strip > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
}
.info-strip > a:hover {
  color: var(--brand-ink);
}
.info-strip .icon {
  width: 14px;
  height: 14px;
}
.info-strip > .logo {
  width: 24px;
  height: 24px;
}

/* ─── Intake readiness (Finger-Ink concept) ──────────────────────────────────────────────────────────── */
.readiness-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.readiness-head > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.readiness-head h2 {
  font-size: 15px;
}
.readiness-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.flow {
  display: flex;
  align-items: center;
  gap: 4px;
}
.flow-arrow {
  width: 14px;
  height: 14px;
  color: var(--faint);
}
.readiness-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 16px;
}
.readiness-score strong {
  display: block;
  font-size: 32px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.035em;
  line-height: 1;
}
.readiness-score strong span {
  font-size: 18px;
  color: var(--faint);
  letter-spacing: -0.01em;
}
.readiness-score small {
  display: block;
  margin-top: 4px;
}
.meter {
  display: flex;
  gap: 2px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--track);
}
.meter span {
  height: 100%;
}
.meter .good {
  background: var(--ok);
}
.meter .blue {
  background: var(--info);
}
.meter .warm {
  background: var(--warn);
}
.meter-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: var(--fw-medium);
}
.legend-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
}
.legend-chip.good i {
  background: var(--ok);
}
.legend-chip.blue i {
  background: var(--info);
}
.legend-chip.warm i {
  background: var(--warn);
}
.legend-chip b {
  color: var(--text);
}
.legend-chip:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.legend-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}
.legend-chip.active b {
  color: inherit;
}
.readiness-action {
  display: grid;
  justify-items: end;
  gap: 5px;
}
.readiness-action small {
  color: var(--faint);
}
.all-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
  font-weight: var(--fw-semibold);
  font-size: 13px;
}
.reminder-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}
.reminder-state .icon {
  width: 14px;
  height: 14px;
}
.reminder-state.sent {
  color: var(--info);
  font-weight: var(--fw-medium);
}
.reminder-state.due {
  color: var(--warn);
  font-weight: var(--fw-medium);
}

/* ─── Website ────────────────────────────────────────────────────────────────────────────────────────── */
.journey {
  padding: 2px 16px 8px;
}
.journey > div {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--border);
}
.journey > div:last-child {
  border-bottom: 0;
}
.journey > div > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: var(--fw-bold);
}
.journey p {
  flex: 1;
  font-weight: var(--fw-semibold);
}
.journey small {
  display: block;
  font-weight: var(--fw-regular);
}
.journey strong {
  font-size: 18px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}
.journey > div > i {
  position: absolute;
  left: 38px;
  bottom: 6px;
  max-width: calc(100% - 38px);
  height: 3px;
  border-radius: 999px;
  background: var(--series-1);
  opacity: 0.85;
}
.journey > div:last-child > i {
  background: var(--brand);
}

/* ─── Calls ──────────────────────────────────────────────────────────────────────────────────────────── */
.assistant-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--gap);
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.assistant-banner > div {
  flex: 1;
  min-width: 0;
}
.assistant-banner strong {
  font-size: 14px;
}
.assistant-banner p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.sarah-avatar {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
}
.sarah-avatar > span:last-child {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ok);
  border: 2.5px solid var(--surface);
}

/* ─── Insights ───────────────────────────────────────────────────────────────────────────────────────── */
.insight-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--gap);
}
.insight-intro > div {
  flex: 1;
  min-width: 0;
}
.insight-intro h2 {
  font-size: 16px;
}
.insight-intro p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.insight-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.insight-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 16px;
}
.insight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.insight-number {
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
}
.insight-card h2 {
  font-size: 15px;
}
.insight-card p {
  flex: 1;
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ─── Integrations ───────────────────────────────────────────────────────────────────────────────────── */
.integration-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: var(--gap);
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.integration-summary > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.integration-summary h2 {
  font-size: 16px;
}
.integration-summary p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.summary-logos {
  display: flex;
  flex-shrink: 0;
}
.summary-logos .logo {
  border-radius: 50%;
  margin-left: -8px;
  box-shadow: 0 0 0 3px var(--surface);
  border: 0;
}
.summary-logos .logo:first-child {
  margin-left: 0;
}
.connector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: var(--gap);
}
.connector {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 16px;
  transition: border-color var(--dur-fast);
}
.connector:hover {
  border-color: var(--border-strong);
}
.connector-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.connector-head > div {
  flex: 1;
  min-width: 0;
}
.connector-head h2 {
  font-size: 15px;
}
.connector-head span:not(.logo, .gr-pill) {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.connector > p {
  margin-top: 12px;
  color: var(--text-2);
  line-height: 1.55;
}
.connector ul {
  display: grid;
  gap: 6px;
  margin: 12px 0 14px;
  padding: 0;
  list-style: none;
  flex: 1;
}
.connector li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.connector li .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--ok);
}
.connector-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ─── Reports ────────────────────────────────────────────────────────────────────────────────────────── */
.receivables {
  padding: 4px 16px 16px;
}
.receivables > small {
  display: block;
}
.receivables > strong {
  display: block;
  margin: 2px 0;
  font-size: 30px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
}
.receivables > p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}
.receivables > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}
.receivables > div:nth-of-type(1) b {
  color: var(--brand-ink);
}
.receivables > .btn {
  margin-top: 10px;
}
.profit-loss {
  padding: 0 16px 16px;
}
.profit-loss > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.profit-loss > div > span {
  color: var(--text-2);
}
.profit-loss > .pl-label {
  padding: 18px 0 6px;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
}
.profit-loss > .pl-subtotal {
  padding-left: 10px;
  padding-right: 10px;
  background: var(--surface-2);
  font-weight: var(--fw-semibold);
}
.profit-loss > .pl-total {
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: var(--on-ink);
}
.profit-loss > .pl-total > span {
  color: inherit;
  font-weight: var(--fw-semibold);
}
.pl-total > strong {
  font-size: 24px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
}
.pl-total small {
  display: block;
  margin-top: 1px;
  color: inherit;
  opacity: 0.7;
  font-weight: var(--fw-regular);
}
.compact-pl {
  padding-top: 0;
}
.cash-movement > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.cash-movement > div > span:nth-child(2) {
  flex: 1;
  font-weight: var(--fw-semibold);
}
.cash-movement small {
  display: block;
  font-weight: var(--fw-regular);
}
.cash-movement strong {
  font-size: 16px;
  font-weight: var(--fw-bold);
}
.cash-total {
  justify-content: space-between;
  font-weight: var(--fw-semibold);
}
.cash-movement .panel-footnote {
  border-top: 0;
}

/* ─── Settings ───────────────────────────────────────────────────────────────────────────────────────── */
.settings-form {
  display: grid;
  gap: 16px;
  max-width: 720px;
  padding: 4px 16px 18px;
}
.settings-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
}
.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
  background: var(--surface);
  font-size: 13px;
  font-weight: var(--fw-regular);
  resize: vertical;
}
.settings-form select {
  appearance: none;
  padding-right: 32px;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367635c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 10px center / 14px;
}
.settings-form .btn {
  justify-self: start;
}
.settings-form p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.settings-static {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
}
.settings-static span {
  color: var(--muted);
  font-size: 12px;
}
.settings-static strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 13px;
}
.about-body {
  max-width: 760px;
  padding: 4px 16px 16px;
}
.about-body > p {
  margin-bottom: 10px;
  color: var(--text-2);
  line-height: 1.6;
}
.reset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.reset-row small {
  display: block;
}
.reset-row > .btn {
  flex-shrink: 0;
}

/* ─── Dialogs and toasts ─────────────────────────────────────────────────────────────────────────────── */
#notice {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 3000;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-pop);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity var(--dur),
    transform var(--dur) var(--ease-out);
}
#notice.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#detail {
  width: min(580px, calc(100vw - 24px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
}
#detail.wide {
  width: min(780px, calc(100vw - 24px));
}
#detail::backdrop {
  background: rgb(10 10 10 / 0.5);
  backdrop-filter: blur(2px);
}
.gr-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.gr-dialog-head .eyebrow {
  font-size: 11px;
}
.gr-dialog-head h2 {
  margin-top: 2px;
  font-size: 17px;
  line-height: 1.3;
}
.gr-dialog-body {
  padding: 18px 20px 20px;
  font-size: 13px;
  line-height: 1.6;
}
.gr-dialog-body > p {
  margin-bottom: 12px;
  color: var(--text-2);
}
.gr-dialog-body > .btn {
  margin: 8px 8px 0 0;
}
.gr-dialog-body h3 {
  margin: 4px 0 8px;
  font-size: 13px;
}
.gr-dialog-body .gr-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
}
.gr-dialog-body .gr-table thead th {
  border-top: 0;
}
.gr-dialog-body .gr-table th,
.gr-dialog-body .gr-table td {
  padding-left: 12px;
  padding-right: 12px;
}
.detail-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.detail-banner .gr-avatar {
  width: 40px;
  height: 40px;
  font-size: 13px;
}
.detail-banner .person strong {
  font-size: 15px;
}
.connector-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.connector-title strong,
.connector-title small {
  display: block;
}
.connector-title strong {
  font-size: 15px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--border);
  overflow: hidden;
}
.detail-grid > div {
  padding: 10px 12px;
  background: var(--surface);
}
.detail-grid small,
.detail-grid strong {
  display: block;
}
.detail-grid strong {
  margin-top: 1px;
  font-size: 13px;
}
.info-box {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  background: var(--surface-2);
}
.info-box p {
  margin-top: 3px;
  color: var(--muted);
}
.detail-list {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding-left: 18px;
}
.call-summary {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.call-summary h3 {
  margin: 2px 0 0;
  font-size: 15px;
}
.call-summary p {
  margin: 4px 0 10px;
  color: var(--muted);
}
.call-summary > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dialog-tabs {
  display: flex;
  gap: 22px;
  margin-top: 16px;
  border-bottom: 1px solid var(--border);
}
.dialog-tabs button {
  margin-bottom: -1px;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: var(--fw-medium);
}
.dialog-tabs button.active {
  color: var(--text);
  font-weight: var(--fw-semibold);
  border-color: var(--brand);
}
.transcript-note {
  margin: 12px 0;
  color: var(--faint);
  font-size: 12px;
}
.transcript {
  display: grid;
  gap: 14px;
  margin: 14px 0 18px;
}
.utterance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.utterance > div {
  flex: 1;
  min-width: 0;
}
.utterance > div > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.utterance time {
  color: var(--faint);
  font-size: 12px;
}
.utterance p {
  margin-top: 4px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 2px 10px 10px 10px;
  background: var(--surface-2);
  color: var(--text-2);
}
.utterance.assistant > .gr-avatar {
  background: var(--brand);
  color: #fff;
}
.utterance.assistant p {
  background: var(--surface);
}
#review-tab .settings-form {
  padding: 16px 0 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.modal-search {
  height: 40px;
  margin-bottom: 8px;
}
.global-results {
  display: grid;
}
.global-results > button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 8px;
}
.global-results > button:hover,
.global-results > button:focus-visible {
  background: var(--surface-3);
}
.global-results > button > span {
  flex: 1;
  min-width: 0;
}
.global-results strong,
.global-results small {
  display: block;
}
.global-results > button > .icon {
  width: 16px;
  color: var(--faint);
}
.gr-dialog-body code {
  overflow-wrap: anywhere;
}

/* ─── Reports: range controls and deltas ─────────────────────────────────────────────────────────────── */
.range-control {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.date-pair {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--faint);
}
.date-pair[hidden] {
  display: none;
}
.date-input,
.report-form input[type='date'] {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
  background: var(--surface);
  font-size: 12px;
  font-weight: var(--fw-medium);
  color-scheme: inherit;
}
.date-input:focus,
.report-form input:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: var(--ring);
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  color: var(--muted);
}
.delta.up {
  color: var(--ok);
}
.delta.down {
  color: var(--danger);
}
.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: var(--fw-bold);
}
.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tabs button .icon {
  width: 15px;
  height: 15px;
}
.range-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 16px 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--info-soft);
  color: var(--text-2);
  font-size: 12px;
}
.range-note .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: var(--info);
}
.profit-loss.with-compare > div:not(.pl-label, .pl-total) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 130px;
  gap: 12px;
}
.profit-loss.with-compare em,
.pl-head strong {
  text-align: right;
}
.profit-loss em {
  font-style: normal;
  color: var(--muted);
}
.profit-loss.with-compare > div > strong {
  text-align: right;
}
.pl-head {
  padding: 12px 0 6px !important;
  border-bottom: 1px solid var(--border-strong) !important;
  font-size: 12px;
}
.pl-head em,
.pl-head strong {
  color: var(--muted);
  font-weight: var(--fw-semibold);
}
.pl-total .delta {
  color: inherit;
}

/* ─── Report charts ──────────────────────────────────────────────────────────────────────────────────── */
.rchart {
  position: relative;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 12px;
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chart-legend i {
  display: inline-block;
  flex-shrink: 0;
}
.chart-legend i.box {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.chart-legend i.line {
  width: 14px;
  height: 2px;
  border-radius: 2px;
}
.chart-legend i.faded {
  background: var(--muted) !important;
  opacity: 0.4;
}
.chart-legend i.dashed {
  background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px) !important;
}
.rchart-plot {
  position: relative;
  border-radius: 6px;
}
.rchart-plot:focus-visible {
  outline-offset: 4px;
}
.rchart-plot svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.rchart .grid-line {
  stroke: var(--border);
  stroke-dasharray: 3 5;
}
.rchart .base-line {
  stroke: var(--border-strong);
}
.rchart .axis {
  fill: var(--faint);
  font-size: 12px;
}
.rchart .crosshair {
  stroke: var(--muted);
  stroke-width: 1;
  opacity: 0;
  pointer-events: none;
}
.rchart .crosshair.on {
  opacity: 0.6;
}
.rchart .hit {
  cursor: crosshair;
}
.chart-tip {
  position: absolute;
  top: 6px;
  z-index: 5;
  min-width: 150px;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  font-size: 12px;
  pointer-events: none;
}
.chart-tip > strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: var(--fw-semibold);
}
.chart-tip > div {
  display: grid;
  grid-template-columns: 12px auto 1fr;
  align-items: center;
  gap: 2px 7px;
  padding: 2px 0;
}
.chart-tip i {
  width: 12px;
  height: 2.5px;
  border-radius: 2px;
}
.chart-tip b {
  color: var(--text);
  font-weight: var(--fw-bold);
}
.chart-tip span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-tip small {
  grid-column: 2 / -1;
  color: var(--faint);
  font-size: 11px;
}
.chart-empty {
  padding: 40px 16px;
  color: var(--muted);
  text-align: center;
}
.rchart .chart-data .gr-table-wrap,
.preview-body > .chart-data .gr-table-wrap {
  margin-top: 8px;
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.chart-data .gr-table thead th {
  position: sticky;
  top: 0;
  border-top: 0;
}
.chart-data .gr-table td:not(:first-child),
.chart-data .gr-table th:not(:first-child) {
  text-align: right;
}
.finance-chart .rchart {
  padding-bottom: 4px;
}

/* ─── Custom reports ─────────────────────────────────────────────────────────────────────────────────── */
.report-library {
  display: grid;
  gap: 8px;
  margin-bottom: var(--gap);
}
.library-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.library-label {
  flex-shrink: 0;
  width: 92px;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-semibold);
}
.library-empty {
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}
.library-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.library-chip .icon {
  width: 14px;
  height: 14px;
  color: var(--faint);
}
.library-chip:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.library-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}
.library-chip.active .icon {
  color: inherit;
}
.report-start-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.report-start-head > div {
  flex: 1;
  min-width: 0;
}
.report-start-head h2 {
  font-size: 16px;
}
.report-start-head p {
  margin-top: 2px;
  max-width: 680px;
  color: var(--muted);
  font-size: 13px;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  padding: 16px;
}
.template-card {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  text-align: left;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.template-card:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}
.template-card:hover strong {
  color: var(--brand-ink);
}
.template-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.template-top > .icon {
  width: 18px;
  height: 18px;
  color: var(--text-2);
}
.template-logos {
  display: flex;
  gap: 4px;
}
.template-logos .logo {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}
.template-card small {
  line-height: 1.45;
}
.report-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--gap);
  align-items: start;
}
.report-workspace > .panel {
  margin: 0;
}
.report-preview {
  position: sticky;
  top: 72px;
}
.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 6px;
}
.preview-head h2 {
  font-size: 16px;
}
.preview-head p {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 13px;
}
.preview-head .preview-meta {
  color: var(--muted);
  font-size: 12px;
}
.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.preview-body:not(:has(.report-kpis)) {
  min-height: 300px;
}
.preview-body {
  padding: 10px 16px 16px;
}
.report-notes {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--warn-soft);
  color: var(--text-2);
  font-size: 12px;
}
.report-notes .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: var(--warn);
}
.report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.report-kpi {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.report-kpi > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: var(--fw-medium);
}
.report-kpi > strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 24px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
}
.report-form {
  display: grid;
  padding: 0;
}
.form-section {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.section-label {
  padding: 0;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: var(--fw-regular);
  color: var(--faint);
}
.report-vars legend {
  float: left;
  width: 100%;
  margin-bottom: 10px;
}
.field {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  color: var(--text-2);
}
.field .select,
.field input:not([type='checkbox'], [type='radio']) {
  width: 100%;
  height: 34px;
  font-weight: var(--fw-regular);
}
.field input[name='name'] {
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
  background: var(--surface);
  font-size: 13px;
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field-pair[hidden] {
  display: none;
}
.select option:disabled {
  color: var(--faint);
}
.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-3);
}
.segmented label {
  position: relative;
}
.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.segmented span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 4px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  text-align: center;
  cursor: pointer;
}
.segmented .icon {
  width: 16px;
  height: 16px;
}
.segmented input:checked + span {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card), 0 0 0 1px var(--border);
}
.segmented input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.var-list {
  display: grid;
  gap: 12px;
  max-height: 330px;
  overflow-y: auto;
  margin-right: -6px;
  padding-right: 6px;
  scrollbar-width: thin;
}
.var-group {
  display: grid;
  gap: 2px;
}
.var-group .eyebrow {
  margin-bottom: 2px;
  font-size: 11px;
}
.var-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.var-item:hover {
  background: var(--surface-2);
}
.var-item input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--ink);
}
.var-item .logo {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}
.var-item:has(input:checked) {
  background: var(--surface-3);
  font-weight: var(--fw-semibold);
}
.form-status {
  padding: 0 16px;
  color: var(--warn);
  font-size: 12px;
}
.form-status:empty {
  display: none;
}
.form-status:not(:empty) {
  padding-top: 10px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 16px;
}
.btn.ghost-danger {
  margin-left: auto;
  border-color: transparent;
  background: none;
  color: var(--danger);
}
.btn.ghost-danger:hover:not(:disabled) {
  background: var(--danger-soft);
  border-color: transparent;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  :root {
    --sidebar: 220px;
  }
  .gr-content {
    padding: 22px 20px 0;
  }
  .topbar {
    padding: 0 20px;
  }
  .global-search {
    width: 200px;
  }
  .stats.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .main-split {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
  .page-heading {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .readiness-body {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .readiness-action {
    grid-column: 1 / -1;
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
    justify-items: start;
    gap: 10px;
  }
  .settings-static {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .report-preview {
    position: static;
  }
  .report-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-form .report-vars {
    grid-row: span 3;
    border-right: 1px solid var(--border);
  }
  .report-form .form-status,
  .report-form .form-actions {
    grid-column: 1 / -1;
  }
}
@media (max-width: 900px) {
  .gr-layout {
    grid-template-columns: minmax(0, 1fr);
    background: none;
  }
  .gr-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 101;
    width: 264px;
    transform: translateX(-100%);
    transition: transform var(--dur) var(--ease-out);
  }
  .menu-open .gr-sidebar {
    transform: none;
    box-shadow: var(--shadow-pop);
  }
  .menu-open .mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgb(10 10 10 / 0.5);
  }
  .menu-open {
    overflow: hidden;
  }
  .mobile-toggle {
    display: inline-grid;
    color: var(--text);
  }
  .main-split,
  .equal {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-right: 54px;
  }
  .hero-sources {
    text-align: left;
  }
  .hero-sources > div {
    justify-content: flex-start;
    padding-left: 6px;
  }
}
@media (max-width: 650px) {
  :root {
    --gap: 12px;
  }
  .demo-strip {
    padding: 6px 14px;
  }
  .demo-detail {
    display: none;
  }
  .topbar {
    height: 54px;
    padding: 0 10px 0 6px;
  }
  .breadcrumb,
  .crumb-sep {
    display: none;
  }
  .global-search {
    width: 34px;
    padding: 0;
    justify-content: center;
    border: 0;
    background: none;
    margin: 0;
    color: var(--muted);
  }
  .global-search > span,
  .global-search kbd {
    display: none;
  }
  .gr-content {
    padding: 18px 14px 0;
  }
  .page-heading {
    gap: 12px;
    margin-bottom: 16px;
  }
  .page-heading h1 {
    font-size: 22px;
  }
  .heading-actions {
    width: 100%;
    justify-content: stretch;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .heading-actions .select {
    flex: 1;
    max-width: none;
  }
  .hero {
    padding: 18px 46px 18px 18px;
  }
  .hero h2 {
    font-size: 19px;
  }
  .belt-tip {
    width: 22px;
    gap: 4px;
  }
  .belt-tip i {
    width: 2px;
  }
  .metric {
    padding: 12px;
  }
  .metric > strong {
    font-size: 22px;
  }
  .metric-note {
    white-space: normal;
  }
  .metric-label {
    font-size: 12px;
  }
  .metric-label .icon {
    display: none;
  }
  .insight-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .panel-head {
    flex-wrap: wrap;
    padding: 12px 14px 10px;
  }
  .gr-toolbar {
    padding: 0 14px 12px;
  }
  .gr-toolbar .search {
    flex-basis: 100%;
    max-width: none;
  }
  .gr-toolbar .select {
    flex: 1;
  }
  .toolbar-note {
    display: none;
  }
  .pager > div > span {
    display: none;
  }
  .info-strip {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .info-strip > span:not(.logo) {
    order: 3;
    flex-basis: 100%;
  }
  .assistant-banner,
  .insight-intro,
  .integration-summary,
  .readiness-head {
    flex-wrap: wrap;
  }
  .assistant-banner > div,
  .insight-intro > div,
  .integration-summary > div:nth-child(2),
  .readiness-head > div:nth-child(2) {
    flex-basis: calc(100% - 70px);
  }
  .readiness-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .reset-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .settings-static,
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .finance-weeks {
    gap: 4px;
  }
  .finance-columns > div {
    width: 36px;
  }
  .finance-columns i {
    width: 18px;
  }
  .finance-columns span {
    font-size: 10px;
  }
  .gr-chart .axis {
    font-size: 22px;
  }
  .heading-actions {
    flex-wrap: wrap;
  }
  .range-control {
    flex: 1 1 100%;
  }
  .range-control .select {
    flex: 1;
  }
  .date-pair {
    flex: 1 1 100%;
  }
  .date-pair .date-input {
    flex: 1;
    min-width: 0;
  }
  #compare-filter {
    flex: 1;
  }
  .report-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .report-form .report-vars {
    grid-row: auto;
    border-right: 0;
  }
  .library-label {
    width: auto;
    margin-right: 4px;
  }
  .library-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -14px;
    padding: 0 14px 2px 0;
    scrollbar-width: none;
  }
  .report-start-head,
  .preview-head {
    flex-wrap: wrap;
  }
  .profit-loss.with-compare > div:not(.pl-label, .pl-total) {
    grid-template-columns: minmax(0, 1fr) 84px 84px;
    gap: 8px;
    font-size: 12px;
  }

  /* Tables become stacked cards: the first cell (usually the person) leads, the row action sits beside it,
     and every other cell becomes a labelled line. */
  .gr-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .gr-table,
  .gr-table tbody {
    display: block;
  }
  .gr-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
  }
  .gr-table tbody tr:last-child {
    border-bottom: 0;
  }
  .gr-table td {
    display: block;
    padding: 0;
    border: 0;
    background: none !important;
  }
  .gr-table td:first-child {
    flex: 1 1 0;
    min-width: 0;
  }
  .gr-table td.cell-action {
    order: 1;
    width: auto;
  }
  .gr-table td[data-label]:not(:first-child) {
    order: 2;
    flex-basis: 100%;
    font-size: 12px;
    text-align: right;
    line-height: 1.5;
  }
  .gr-table td[data-label]:not(:first-child)::before {
    content: attr(data-label);
    float: left;
    margin-right: 12px;
    color: var(--muted);
  }
  .gr-table td[data-label]:not(:first-child) :is(strong, small) {
    font-size: 12px;
  }
  .gr-table td[data-label]:not(:first-child) small.block {
    display: inline;
  }
  .gr-table td[data-label]:not(:first-child) small.block::before {
    content: ' · ';
  }
  .gr-table tr.group-row {
    display: block;
    padding: 0;
  }
  .group-row th {
    display: block;
    padding: 12px 14px 6px;
  }
  .gr-table tr.empty-row {
    display: block;
    padding: 0;
  }
  .gr-table tr.empty-row td {
    display: block;
  }
  .person {
    white-space: normal;
  }
  .gr-dialog-head {
    padding: 14px 16px;
  }
  .gr-dialog-body {
    padding: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
