@font-face {
  font-family: Montserrat;
  src: url('/brand/montserrat-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ink: #192741;
  --navy: #061936;
  --muted: #62728c;
  --line: #e2e8f0;
  --paper: #f4f6fa;
  --white: #fff;
  --brand: #e97035;
  --teal: var(--navy);
  --green: #236c4e;
  --radius: 12px;
  font-family:
    Montserrat,
    'Avenir Next',
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  padding: 10px 15px;
  color: var(--ink);
  min-height: 44px;
  font-weight: 600;
}
button:hover:not(:disabled) {
  background: #eff4f5;
  border-color: #aabcc2;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 3px solid #dd733c;
  outline-offset: 3px;
}
.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--navy);
}
.primary:hover:not(:disabled) {
  background: #dc6329;
  color: var(--navy);
}
.quiet {
  background: transparent;
}
.danger {
  color: #a13227;
}
.small {
  padding: 5px 10px;
  min-height: 36px;
  font-size: 13px;
}
.muted {
  color: var(--muted);
}
.skip {
  position: fixed;
  top: -100px;
  z-index: 99;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  color: white;
  border-right: 1px solid var(--navy);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: block;
  color: var(--navy);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -1.4px;
}
.brand-name {
  white-space: nowrap;
}
.brand-name span {
  color: var(--brand);
}
.brand small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 4px;
  margin-top: 12px;
}
.sidebar .brand {
  color: white;
  margin: 3px 8px 0;
}
.sidebar .brand small {
  color: #a4b0c5;
}
.sidebar .workspace {
  border-color: #314465;
  color: #b9c6da;
}
.sidebar .workspace strong {
  color: white;
}
.workspace {
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
}
.workspace strong {
  display: block;
  font-size: 14px;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 7px;
  color: #f3f6fc;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #314465;
}
.nav a:hover {
  background: #152d4b;
  color: white;
  text-decoration: none;
}
.nav a.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--navy);
}
.nav svg {
  width: 19px;
  height: 19px;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 12px;
  color: #a4b2c9;
}
.topbar {
  height: 80px;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.topbar strong {
  font-size: 14px;
}
.user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e6f0f1;
  color: var(--teal);
  font-weight: 700;
}
.content {
  padding: 34px 36px 70px;
  max-width: 1540px;
  margin: auto;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--muted);
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 6px 0 7px;
  font-weight: 700;
}
h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
h3 {
  font-size: 16px;
  margin: 0;
}
p {
  margin: 6px 0 18px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.page-head p {
  color: var(--muted);
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.stat strong {
  display: block;
  font-size: 28px;
  font-weight: 650;
  margin-top: 4px;
}
.stat span {
  font-size: 13px;
  color: var(--muted);
}
.tools {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
}
.search {
  max-width: 410px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #c8d4d8;
  border-radius: 7px;
  background: white;
}
.report-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 22px;
}
.report-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 150ms;
}
.report-card:hover {
  box-shadow: 0 8px 24px #233c4710;
}
.report-thumb {
  height: 145px;
  background: #eef4f5;
  padding: 24px 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.report-thumb i {
  display: block;
  border: 1px solid #d7e2e5;
  background: white;
  border-radius: 3px;
  height: 35px;
  border-bottom: 5px solid #bdd7de;
}
.report-thumb i:first-child {
  grid-column: span 4;
  background: #78a7b5;
  height: 14px;
  border: 0;
}
.report-info {
  padding: 21px;
}
.report-info h2 {
  font-size: 17px;
  margin: 5px 0 7px;
}
.report-info .row {
  margin-top: 20px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.row.spread {
  justify-content: space-between;
}
.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 4px 8px;
  background: #eff3f4;
  font-size: 11px;
  letter-spacing: 0.2px;
  font-weight: 650;
  color: #52656d;
}
.badge.sample {
  background: #fff1d7;
  color: #7b520e;
}
.badge.connected {
  background: #e3f2eb;
  color: #236347;
}
.notice {
  padding: 13px 17px;
  border: 1px solid #ead8ad;
  background: #fff8e8;
  border-radius: 8px;
  color: #695021;
  font-size: 13px;
  margin-bottom: 22px;
}
.notice.info {
  background: #edf6f8;
  border-color: #c4dfe6;
  color: #285969;
}
.empty {
  padding: 65px 25px;
  text-align: center;
  border: 1px dashed #c2d0d5;
  border-radius: 12px;
  background: white;
}
.empty p {
  color: var(--muted);
  max-width: 430px;
  margin: 10px auto 20px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  background: #f6f8f9;
  font-weight: 650;
}
th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
tr:last-child td {
  border-bottom: 0;
}
td.actions {
  white-space: nowrap;
}
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.provider {
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.provider-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: #e8f1f3;
  color: var(--teal);
  font-weight: 750;
  border-radius: 10px;
  margin-bottom: 16px;
}
.provider p {
  font-size: 12px;
  color: var(--muted);
  min-height: 38px;
  margin: 8px 0 16px;
}
.editor-toolbar {
  background: white;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.report-cover {
  background: #e6f0f3;
  border: 1px solid #d0e0e5;
  border-radius: 10px 10px 0 0;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.report-cover h1 {
  font-size: 25px;
}
.report-cover .monogram {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: white;
  color: var(--teal);
  font-size: 25px;
  font-weight: 800;
  border-radius: 10px;
}
.report-surface {
  background: var(--paper);
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 0;
  min-width: 0;
  border-radius: 0 0 10px 10px;
}
.widgets {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-auto-rows: minmax(88px, auto);
  gap: 10px;
}
.widget {
  background: white;
  border: 1px solid #e2e8eb;
  border-radius: 5px;
  padding: 10px;
  min-width: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: span var(--width, 2);
  grid-row: span var(--height, 2);
}
.widget-header {
  background: var(--report-color, var(--teal));
  color: white;
  border: 0;
  justify-content: center;
}
.widget-header .widget-title {
  color: white;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.widget-title {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}
.widget-title span {
  overflow-wrap: anywhere;
}
.widget-title button {
  padding: 0 5px;
  min-width: 26px;
  min-height: 26px;
  border: 0;
  color: inherit;
  background: transparent;
}
.widget-controls {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.widget-controls button {
  opacity: 0.65;
}
.widget-controls button:hover {
  opacity: 1;
}
.drag-handle {
  cursor: grab;
}
.widget.dragging {
  opacity: 0.45;
  outline: 2px dashed var(--teal);
}
.metric-value {
  font-size: 34px;
  letter-spacing: -1.4px;
  font-weight: 650;
  text-align: center;
  margin: 15px 0 5px;
  font-variant-numeric: tabular-nums;
}
.widget-manual .metric-value {
  margin: auto;
}
.spark {
  width: 100%;
  height: 70px;
  min-height: 50px;
  margin-top: auto;
}
.compare {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.compare strong {
  font-size: 13px;
  display: block;
  color: var(--ink);
}
.positive {
  color: var(--green) !important;
}
.negative {
  color: #a24439 !important;
}
.unavailable {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px 0;
}
.unavailable strong {
  display: block;
  font-size: 20px;
  color: #92a4ac;
  font-weight: 500;
  margin-bottom: 5px;
}
.widget-table {
  overflow: auto;
  margin-top: 15px;
  flex: 1;
}
.widget-table table {
  font-size: 11px;
}
.widget-table th,
.widget-table td {
  padding: 8px 6px;
}
.widget-table th {
  background: white;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}
.widget-table td:not(:first-child),
.widget-table th:not(:first-child) {
  text-align: right;
}
.widget-table tfoot {
  font-weight: 700;
  border-top: 2px solid var(--line);
}
.widget-note {
  font-size: 11px;
  padding-top: 6px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.chart-data {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.chart-data table {
  font-size: 10px;
}
.chart-data th,
.chart-data td {
  padding: 3px;
}
.widget-text {
  white-space: pre-wrap;
  font-size: 13px;
  margin-top: 14px;
  overflow-wrap: anywhere;
}
.report-footer {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 26px;
}
.unsaved {
  color: #8b5c08;
  font-size: 12px;
}
.auth {
  max-width: 440px;
  margin: 8vh auto;
  padding: 35px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.auth .brand {
  margin-bottom: 35px;
}
.auth h1 {
  font-size: 25px;
}
.auth button {
  width: 100%;
  margin-top: 12px;
}
.auth-link { text-align: center; margin: 18px 0 0; }
.account-access .invitation-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.invitations-table td:first-child, #invitation-results li { overflow-wrap: anywhere; }
#invitation-results { margin-top: 18px; }
#invitation-results ul { padding-left: 20px; }
#invitation-results li { margin-bottom: 10px; }
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 15px 0 6px;
}
input:not([type='checkbox']),
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c2d0d6;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  min-height: 44px;
}
input[type='checkbox'] {
  width: 18px;
  height: 18px;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 12px;
}
.error {
  color: #a12e22;
  font-size: 13px;
  padding: 10px 0;
}
.error:empty {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  width: min(560px, calc(100% - 32px));
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 25px 100px #182d3b33;
}
dialog::backdrop {
  background: #132d3d66;
}
dialog.drawer {
  margin: 0 0 0 auto;
  height: 100vh;
  max-height: 100vh;
  border-radius: 14px 0 0 14px;
  width: min(520px, 100%);
}
.dialog-head {
  padding: 22px 25px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  margin: 0;
  font-size: 20px;
}
.dialog-body {
  padding: 5px 25px 22px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 0 0;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 10px 0;
}
.filter-row input {
  grid-column: span 2;
}
.details {
  padding-top: 18px;
  font-size: 12px;
}
.details pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  background: #f5f7f8;
  padding: 12px;
}
.template-desc {
  max-width: 350px;
  font-size: 13px;
}
.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.checkline label {
  margin: 0;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #233e49;
  color: white;
  padding: 13px 20px;
  border-radius: 9px;
  box-shadow: 0 8px 30px #12242b20;
  z-index: 10;
  max-width: 420px;
  font-size: 13px;
}
#toast:empty {
  display: none;
}
.loading {
  padding: 50px;
  color: var(--muted);
}
.mobile-label {
  display: none;
}
.client-view .edit-only {
  display: none !important;
}
.client-view .content {
  max-width: 1300px;
}
.client-view .widgets {
  gap: 16px;
}
.client-view .layout {
  grid-template-columns: 1fr;
}
.client-view .sidebar {
  display: none;
}
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 22px 12px;
  }
  .content {
    padding: 25px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .widget {
    grid-column: span max(4, var(--width));
  }
  .widget-header {
    grid-column: span 8;
  }
  .metric-value {
    font-size: 30px;
  }
  .report-cover {
    padding: 22px;
  }
  .report-cover .monogram {
    display: none;
  }
}
@media (max-width: 700px) {
  .layout {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    border-bottom: 1px solid var(--line);
    padding: 16px;
    gap: 12px;
  }
  .sidebar .workspace,
  .sidebar-bottom {
    display: none;
  }
  .brand {
    font-size: 15px;
  }
  .brand svg {
    width: 30px;
    height: 30px;
  }
  .brand small {
    font-size: 9px;
  }
  .nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  .nav a {
    font-size: 12px;
    padding: 10px;
    white-space: nowrap;
  }
  .nav svg {
    width: 15px;
    height: 15px;
  }
  .topbar {
    height: 62px;
    padding: 0 16px;
  }
  .user .user-name {
    display: none;
  }
  .content {
    padding: 22px 15px;
  }
  .page-head {
    align-items: start;
    flex-wrap: wrap;
  }
  .page-head h1 {
    font-size: 25px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 14px;
  }
  .stat strong {
    font-size: 23px;
  }
  .stat span {
    font-size: 11px;
  }
  .tools {
    flex-wrap: wrap;
  }
  .report-cover {
    display: block;
    padding: 20px;
  }
  .report-cover h1 {
    font-size: 21px;
  }
  .report-cover input {
    margin-top: 12px;
  }
  .report-surface {
    padding: 12px;
  }
  .widget {
    grid-column: span 8;
    grid-row: span 2;
  }
  .widget-header {
    grid-row: span 1;
  }
  .editor-toolbar {
    padding: 10px;
    gap: 8px;
  }
  .editor-toolbar button {
    font-size: 12px;
    padding: 9px 11px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .auth {
    margin: 25px 15px;
    padding: 25px;
  }
  .compare {
    font-size: 12px;
  }
  .spark {
    height: 90px;
  }
  .widget-table table {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  body {
    background: white;
  }
  .sidebar,
  .topbar,
  .editor-toolbar,
  .edit-only,
  .page-head,
  .notice,
  .widget-controls,
  .chart-data,
  #toast {
    display: none !important;
  }
  .layout {
    display: block;
  }
  .content {
    padding: 0;
  }
  .report-cover {
    padding: 20px;
    background: white;
    border: 0;
  }
  .report-cover input {
    border: 0;
    width: auto;
  }
  .report-surface {
    padding: 0;
    background: white;
    border: 0;
  }
  .widgets {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
  }
  .widget {
    break-inside: avoid;
    overflow: visible;
    min-height: 180px;
    grid-row: auto;
  }
  .widget-header {
    min-height: 45px;
  }
  .widget-table {
    overflow: visible;
    max-height: none;
  }
  .widget-header {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .spark {
    height: 70px;
  }
  .report-footer {
    margin: 15px;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  min-height: 44px;
  font-weight: 600;
}
.button:hover {
  background: #eff4f5;
  text-decoration: none;
}
.report-cover h2 {
  font-size: 25px;
  margin: 6px 0 7px;
  letter-spacing: -1px;
}
.widget-title {
  margin: 0;
}
@media (max-width: 1000px) {
  .widget {
    grid-column: span 4;
  }
  .widget-header,
  .widget-wide {
    grid-column: span 8;
  }
}
@media (max-width: 700px) {
  .widget {
    grid-column: span 8;
  }
  .report-cover h2 {
    font-size: 21px;
  }
}

.widget-title button {
  min-width: 44px;
  min-height: 44px;
  font-size: 18px;
}
.widget-title {
  align-items: center;
  min-height: 20px;
  line-height: 1.3;
  padding-right: 88px;
}
.widget-heading-actions {
  position: absolute;
  right: 4px;
  top: 0;
}
.widget:has([data-note]) .widget-title {
  padding-right: 132px;
}

.widget-header .widget-title {
  font-size: 15px;
}

.provider h2 {
  font-size: 16px;
  margin: 0;
}

/* Saved desktop coordinates are independent of display order. */
@media (min-width: 1001px) {
  .widgets {
    grid-auto-rows: 120px;
  }
  .widget {
    grid-column: var(--column, 1) / span var(--width, 2);
    grid-row: var(--row, 1) / span var(--height, 2);
  }
  .widget-header {
    padding-block: 12px;
  }
}
.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #71848d;
  cursor: nwse-resize;
  touch-action: none;
}
.drag-handle {
  touch-action: none;
}
.widget.invalid-placement {
  outline: 3px solid #a24439;
}
.widget-table tfoot {
  position: sticky;
  bottom: 0;
  background: white;
}
.widget:has(.resize-handle) {
  padding-bottom: 25px;
}
.widget-header:has(.resize-handle) {
  padding-bottom: 17px;
}
.column-options {
  border: 1px solid var(--line);
  padding: 12px;
  margin-block: 12px;
  border-radius: 6px;
}
.column-options legend {
  font-weight: 650;
  font-size: 13px;
  padding-inline: 5px;
}
@media (max-width: 1000px) {
  .resize-handle {
    display: none;
  }
  .drag-handle {
    cursor: pointer;
  }
  .widget {
    grid-column: auto / span 4;
    grid-row: auto / span 2;
  }
  .widget-header,
  .widget-wide {
    grid-column: auto / span 8;
  }
  .widget-header {
    grid-row: auto / span 1;
  }
}
@media print {
  .resize-handle {
    display: none;
  }
  .widgets {
    display: block;
  }
  .widget {
    margin-bottom: 10px;
  }
}
/* Historic layout uses measured available content, never rewrites saved sizing. */
.widget[data-historic] .spark {
  height: 90px;
  min-height: 90px;
  flex: 0 0 90px;
}
.widget[data-historic][data-comparisons='false'] .spark {
  height: 130px;
  min-height: 130px;
  flex-basis: 130px;
}
.widget[data-compact='true'] .spark,
.widget[data-compact='true'] .chart-data {
  display: none;
}
.widget[data-compact='true'] .metric-value {
  font-size: 26px;
  margin: 0;
}
.widget[data-compact='true'] .compare {
  padding-top: 3px;
}
.widget[data-compact='true'] .resize-handle {
  display: none;
}
.widget[data-compact='true'] .widget-title {
  font-size: 10px;
}

/* Table capacity is measured from the saved widget size, never from its totals. */
.widget-table {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 8px;
}
.widget-table table {
  width: 100%;
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
}
.widget-table caption,
.table-capacity {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.widget-table th,
.widget-table td {
  padding: 1px 5px;
  vertical-align: top;
}
.widget-table th:first-child,
.widget-table td:first-child {
  overflow-wrap: anywhere;
  white-space: normal;
  max-width: 22rem;
}
.widget-table td:not(:first-child) {
  white-space: nowrap;
}
.widget-table th:not(:first-child) {
  white-space: normal;
  overflow-wrap: anywhere;
}
.widget-table tfoot {
  position: static;
  background: white;
}
.widget-table tr[hidden] {
  display: none;
}
.widget-table.table-too-small table {
  display: none;
}
.widget-table.table-too-small .table-capacity {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  color: var(--muted);
  font-size: 11px;
}
.widget:has(.widget-table) .widget-note {
  flex: 0 0 auto;
}
@media (max-width: 1000px) {
  .widget-table th,
  .widget-table td {
    padding: 1px 4px;
  }
  .widget-table th:first-child,
  .widget-table td:first-child {
    max-width: 15rem;
  }
}
@media print {
  .widget-table,
  .widget-table.table-too-small {
    overflow: visible;
  }
  .widget-table.table-too-small table {
    display: table;
  }
  .widget-table tr[hidden] {
    display: table-row;
  }
  .table-capacity {
    display: none;
  }
}

/* Brand shell follows the approved preview; report colours stay configurable. */
.avatar,
.badge.sample {
  background: #fff0e6;
  color: #8c3b12;
}
.report-cover {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
.report-cover h1,
.report-cover h2 {
  color: var(--ink);
  font-weight: 700;
}
.report-cover .monogram {
  background: #fff0e6;
  color: #9e441a;
}
.widget-heading-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.widget-note-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.6;
}
.widget-note-print {
  display: none;
}
.chart-data[open] {
  min-height: 45px;
  overflow: auto;
  max-height: 180px;
}
@media (max-width: 1000px) {
  .brand {
    font-size: 24px;
  }
  .brand small {
    letter-spacing: 3px;
  }
  .nav a {
    font-size: 12px;
    padding-inline: 8px;
    gap: 8px;
  }
}
@media (max-width: 700px) {
  .brand {
    font-size: 24px;
  }
  .sidebar .brand {
    margin: 0 0 4px;
  }
  .nav {
    max-width: 100%;
  }
  .nav a {
    flex: 0 0 auto;
  }
  .topbar {
    min-width: 0;
    gap: 8px;
  }
  .topbar strong {
    font-size: 12px;
  }
  .user {
    min-width: 0;
    gap: 6px;
  }
  .user .badge {
    font-size: 9px;
    padding: 4px;
  }
  .avatar {
    flex-shrink: 0;
  }
  .widget {
    grid-column: auto / span 8;
    grid-row: auto / span 2;
  }
  .widget-header {
    grid-row: auto / span 1;
  }
  .widget:has(.widget-table) {
    grid-row: auto;
    min-height: 230px;
  }
  .widget-table {
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .widget-table table {
    min-width: 100%;
    width: max-content;
  }
  .widget-table th:first-child,
  .widget-table td:first-child {
    max-width: 11rem;
  }
  .chart-data[open] {
    max-height: 160px;
  }
}
@media print {
  .widget-heading-actions {
    display: none;
  }
  .widget-note-print {
    display: block;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 11px;
  }
}

/* Single-line titles match the reference input and leave room for card controls. */
.widget-title > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-value {
  line-height: 1.2;
  margin: 8px 0 4px;
}
.compare {
  line-height: 1.3;
}
.compare strong {
  line-height: 1.2;
}
.widget[data-compact='true'] .metric-value {
  line-height: 1.1;
}
.widget[data-compact='true'] .compare strong {
  font-size: 12px;
}
.chart-data {
  line-height: 1.3;
  margin-top: 0;
}
@media (min-width: 1001px) and (max-width: 1250px) {
  .metric-value {
    font-size: 24px;
  }
  .widget[data-compact='true'] .metric-value {
    font-size: 24px;
  }
}
@media (max-width: 1000px) {
  .widget:has(.widget-table) {
    grid-column: auto / span 8;
    grid-row: auto;
    min-height: 230px;
  }
  .widget-table {
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .widget-table table {
    min-width: 100%;
    width: max-content;
  }
}
.client-view .widget-title {
  padding-right: 0;
}
.client-view .widget:has([data-note]) .widget-title {
  padding-right: 44px;
}
@media print {
  .widget-title,
  .widget:has([data-note]) .widget-title {
    padding-right: 0;
  }
  .widget-title > span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}
.widget-title button.data-notice {
  color: #9e441a;
}
/* Keep wide metric headings readable; scrolling must not collapse row capacity. */
.widget-table table {
  min-width: 100%;
  width: max-content;
}
.widget-table th:not(:first-child) {
  white-space: nowrap;
}

/* Integration identity and availability controls. */
.provider-card-head {display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.provider-mark {background:#f6f8fc;flex-shrink:0;}
.provider-icon {display:block;flex:0 0 32px;width:32px;height:32px;object-fit:contain;}
.integration-status {white-space:nowrap;}
.integration-status.active {background:#e5f4ec;color:#236246;}
.integration-status.setup {background:#fff0df;color:#805014;}
.integration-status.planned {background:#edf0f5;color:#536079;}
.integration-filter {display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;}
.integration-filter select {min-width:170px;}
.connection-label {display:flex;gap:12px;align-items:center;min-width:180px;}
.connection-label strong {overflow-wrap:anywhere;}
.connection-label small {display:block;color:var(--muted);margin-top:5px;}
.connection-actions {display:flex;flex-wrap:wrap;gap:8px;}
.integration-tools {flex-wrap:wrap;}
@media(max-width:600px) {.integration-tools .search {max-width:none;}.integration-filter {width:100%;}.integration-filter select {flex:1;min-width:0;}}
.source-search { position:sticky; top:0; background:#fff; padding:8px 0; z-index:1; }
.source-results { max-height:52vh; overflow:auto; overflow-wrap:anywhere; }
.source-result { padding:14px 0; border-bottom:1px solid var(--line,#e2e8f0); }
[data-source-index][hidden], [data-source-empty][hidden] { display:none!important; }
.source-results .checkline { min-height:58px; }
.source-results .checkline label { margin:0; padding:10px 0; }
.connections-table small { display:block; overflow-wrap:anywhere; }
.connection-account { margin-top:6px; color:var(--navy,#061936); }
.duplicate-account { background:#fff1e6; color:#80400d; margin-top:6px; }
.connection-actions { flex-wrap:wrap; max-width:360px; }
