:root {
  color-scheme: light;
  --ink: #1e2125;
  --muted: #66727f;
  --line: #e7e9ed;
  --background: #f6f7f9;
  --accent: #6b1aff;
  --accent-hover: #5100e5;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select {
  font: inherit;
}
button,
a,
select,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ceb2ff;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.25;
  margin-bottom: 10px;
}
h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.25px;
  margin-bottom: 4px;
}
h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
[hidden] {
  display: none !important;
}
.site-header {
  background: white;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1480px;
  min-height: 80px;
  margin: auto;
  padding: 0 42px;
  display: flex;
  align-items: center;
  gap: 52px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--ink);
  flex-shrink: 0;
}
.brand:hover {
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: 248px;
  height: auto;
}
.brand-context {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.3px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-nav a {
  display: flex;
  align-items: center;
  white-space: nowrap;
  color: #66727f;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 500;
  padding: 8px 14px;
}
.main-nav a.active {
  background: #efe5ff;
  color: var(--accent);
}
.main-nav a:hover {
  text-decoration: none;
  color: var(--accent);
}
.account-menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.whats-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 13px;
  color: #66727f;
  text-decoration: none;
}
.whats-new:hover,
.whats-new.active {
  color: var(--accent);
}
.changelog-list {
  margin: 8px 0 0;
  padding-left: 20px;
}
.changelog-list li {
  margin: 6px 0;
  line-height: 1.5;
}
.account-name {
  font-size: 14px;
  color: #66727f;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.button-text {
  padding: 7px 0;
  border: none;
  background: none;
  color: #66727f;
  font-size: 14px;
  white-space: nowrap;
}
.button-text:hover {
  color: var(--accent);
}
.main-container {
  max-width: 1480px;
  padding: 39px 42px 48px;
  margin: auto;
  min-height: calc(100vh - 160px);
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 28px;
}
.page-heading > div {
  flex: 1;
  min-width: 0;
}
.page-heading .button {
  flex: none;
  white-space: nowrap;
}
.page-heading h1,
.page-description,
.metric-note,
.guide-grid p,
.breakdown-label {
  overflow-wrap: anywhere;
}
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 11px;
}
.page-description {
  color: #66727f;
  margin: 0;
  font-size: 14px;
}
.snapshot-time {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 190px;
}
.small-dot {
  background: #8fa0ad;
  width: 5px;
  height: 5px;
  border-radius: 100%;
}
.snapshot-time .button {
  margin-top: 4px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.button:hover {
  text-decoration: none;
}
.button-secondary {
  background: white;
  color: #516175;
  border-color: #dce3eb;
}
.button-secondary:hover {
  background: #f9fbfd;
  border-color: #bccbd6;
}
.button-primary {
  background: var(--accent);
  color: white;
}
.button-primary:hover {
  background: var(--accent-hover);
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 25px;
}
.summary-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 23px;
  box-shadow: 0 2px 3px #1e212505;
  min-height: 151px;
  min-width: 0;
}
.metric-label {
  display: block;
  color: #66727f;
  font-size: 14px;
  font-weight: 500;
}
.metric-value {
  display: block;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -1.3px;
  font-variant-numeric: tabular-nums;
  margin: 18px 0 12px;
  font-weight: 600;
}
.metric-note {
  display: block;
  font-size: 12px;
  color: #66727f;
}
.summary-status {
  background: #f7f3ff;
  border-color: #e9ddff;
}
.summary-status .metric-label {
  color: #6b1aff;
}
.status-headline {
  display: block;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin: 23px 0 12px;
  color: #5100e5;
  line-height: 1.3;
}
.summary-status .metric-note {
  color: #66727f;
}
.text-warning {
  color: #b7781f !important;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(340px, 1fr);
  gap: 24px;
  margin-bottom: 25px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 3px #1e212505;
  overflow: hidden;
}
.panel-heading {
  padding: 22px 24px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.panel-heading p {
  color: #66727f;
  font-size: 12px;
  margin: 0;
}
.period-pill {
  color: #718196;
  font-size: 12px;
  border: 1px solid #e0e6ed;
  border-radius: 5px;
  padding: 5px 10px;
  white-space: nowrap;
}
.chart-legend {
  display: flex;
  gap: 16px;
  padding: 0 24px;
  flex-wrap: wrap;
  color: #6d7b8f;
  font-size: 12px;
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.dot-ok {
  background: #17b26a;
}
.dot-firing {
  background: #f79009;
}
.dot-error {
  background: #f04438;
}
.dot-skipped {
  background: #96a0ab;
}
.chart-container {
  height: 209px;
  margin: 0 16px;
}
.chart-message {
  height: 209px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #66727f;
  font-size: 14px;
  padding: 26px;
  text-align: center;
}
.empty-chart-icon {
  font-size: 43px;
  color: #bccad3;
  line-height: 1;
  margin-bottom: 17px;
}
.chart-message p {
  margin: 0;
}
.panel-bottom-note {
  border-top: 1px solid #f0f3f7;
  padding: 11px 24px;
  color: #66727f;
  font-size: 12px;
}
.panel-note {
  padding: 0 24px;
  font-size: 14px;
  color: var(--muted);
}
.connection-list {
  padding: 0 24px;
  margin: 0;
  list-style: none;
}
.connection-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid #edf0f4;
}
.connection-list li:first-child {
  padding-top: 8px;
}
.connection-list li:last-child {
  border-bottom: 0;
}
.connection-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f8;
  color: #8092a5;
  font-size: 20px;
  flex-shrink: 0;
}
.connection-list strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.connection-list div > span {
  display: block;
  font-size: 12px;
  color: #66727f;
  margin-top: 2px;
}
.connection-list .badge {
  margin-left: auto;
  font-size: 9px;
  padding: 3px 6px;
  white-space: nowrap;
}
.connection-note {
  color: #8793a3;
  font-size: 12px;
  line-height: 1.7;
  padding: 3px 24px 14px;
  margin: 0;
}
.secure-note {
  border-top: 1px solid #edf0f4;
  background: #fafafa;
  color: #66727f;
  padding: 11px 24px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.secure-note > span {
  font-size: 14px;
}
.table-wrap {
  overflow: auto;
  position: relative;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-size: 12px;
  letter-spacing: 0.4px;
  color: #8290a2;
  font-weight: 600;
  background: #fafbfd;
  border-top: 1px solid #edf0f4;
  border-bottom: 1px solid #edf0f4;
  padding: 11px 24px;
  white-space: nowrap;
}
td {
  font-size: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid #f0f3f7;
  color: #758195;
  white-space: nowrap;
}
td.check-name {
  white-space: normal;
  min-width: 12rem;
}
tr:last-child td {
  border-bottom: none;
}
.table-primary {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #343a41;
}
a.table-primary {
  color: var(--accent);
  overflow-wrap: anywhere;
}
a.table-primary:hover {
  text-decoration: underline;
}
.table-secondary {
  display: block;
  color: #7a8794;
  font-size: 12px;
  margin-top: 5px;
  white-space: normal;
  max-width: 430px;
}
.table-link {
  color: #6b1aff;
  font-size: 12px;
  font-weight: 500;
}
.table-link span {
  font-size: 14px;
  margin-left: 8px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: #697b8c;
  background: #f0f3f7;
}
.badge i {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.badge-ok {
  background: #ecfdf3;
  color: #067647;
}
.badge-firing,
.badge-stale {
  background: #fffaeb;
  color: #b54708;
}
.badge-error {
  background: #fef3f2;
  color: #b32318;
}
.badge-running,
.badge-configured {
  background: #efe5ff;
  color: #5100e5;
}
.badge-never,
.badge-disabled,
.badge-skipped,
.badge-neutral {
  background: #f0f3f7;
  color: #66727f;
}
.count-pill {
  font-size: 12px;
  font-weight: 500;
  vertical-align: middle;
  padding: 3px 7px;
  background: #f0f3f7;
  color: #8290a2;
  border-radius: 5px;
  margin-left: 7px;
}
.text-link {
  font-size: 12px;
  color: #6b1aff;
  font-weight: 600;
  white-space: nowrap;
}
.text-link span {
  padding-left: 9px;
}
.section-spacer {
  height: 25px;
}
.empty-state {
  padding: 36px 24px 43px;
  text-align: center;
  color: #8a96a6;
}
.empty-state h3 {
  font-size: 14px;
  font-weight: 500;
  color: #66798d;
  margin-top: 12px;
}
.empty-state p {
  font-size: 12px;
  max-width: 490px;
  margin: 0 auto;
  line-height: 1.8;
}
.empty-state-mark {
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 37px;
  border: 1px solid #e7edf3;
  border-radius: 9px;
  color: #9cafbf;
  font-size: 23px;
  background: #f9fbfc;
}
.muted {
  color: #66727f;
}
.trigger-label {
  background: #f6f7f9;
  color: #8795a6;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.filter-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
  padding: 23px 24px;
}
.filter-form > div {
  min-width: 190px;
}
.filter-form label {
  display: block;
  color: #738399;
  font-size: 12px;
  margin-bottom: 6px;
}
.filter-form select {
  min-width: 190px;
  max-width: 280px;
  border: 1px solid #dce4ec;
  padding: 8px 34px 8px 10px;
  border-radius: 6px;
  background: #fff;
  color: #52667c;
  font-size: 14px;
  height: 38px;
}
.filter-form .text-link {
  padding: 10px 2px;
}
.result-count {
  color: #8f9bac;
  font-size: 12px;
  margin-left: auto;
  padding-bottom: 9px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 18px 24px;
  font-size: 12px;
  color: var(--muted);
}
.pagination > div {
  display: flex;
  gap: 10px;
}
.history-note {
  font-size: 12px;
  color: #8391a2;
  margin-top: 18px;
}
.site-footer {
  max-width: 1480px;
  margin: auto;
  padding: 0 42px 27px;
  display: flex;
  justify-content: space-between;
  color: #9aa6b5;
  font-size: 12px;
}
.messages {
  background: #f7f3ff;
  border: 1px solid #e9ddff;
  border-radius: 8px;
  margin-bottom: 24px;
  padding: 14px 18px;
}
.messages p:last-child {
  margin-bottom: 0;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  background: white;
  padding: 10px;
  border: 1px solid #dce4ec;
  z-index: 10;
}
.skip-link:focus {
  top: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1400px) {
  .main-container {
    padding-top: 44px;
  }
}
@media (max-width: 1320px) {
  .account-name {
    display: none;
  }
}
@media (max-width: 1100px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .header-inner {
    gap: 30px;
    padding: 0 26px;
  }
  .main-container {
    padding: 30px 26px;
  }
  .account-name {
    display: none;
  }
  .summary-card {
    padding: 19px 18px;
  }
  .metric-note {
    font-size: 12px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, 1fr);
    gap: 17px;
  }
  .panel-heading {
    padding-left: 20px;
    padding-right: 20px;
  }
  .connection-list {
    padding: 0 20px;
  }
  td,
  th {
    padding-left: 20px;
    padding-right: 20px;
  }
  .site-footer {
    padding-left: 26px;
    padding-right: 26px;
  }
}
@media (max-width: 800px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0;
    min-height: 80px;
    padding: 17px 22px 0;
  }
  .brand {
    margin-bottom: 13px;
  }
  .main-nav {
    order: 3;
    width: 100%;
    gap: 24px;
    overflow-x: auto;
  }
  .main-nav a {
    padding: 13px 0;
    font-size: 14px;
    white-space: nowrap;
  }
  .account-menu {
    margin-left: auto;
    margin-bottom: 13px;
  }
  .main-container {
    padding: 28px 22px;
  }
  .page-heading {
    align-items: start;
  }
  .snapshot-time {
    font-size: 12px;
    max-width: 160px;
  }
  .snapshot-time .button {
    font-size: 12px;
    padding: 8px 11px;
  }
  .page-description {
    max-width: 400px;
    font-size: 14px;
  }
  h1 {
    font-size: 27px;
  }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }
  .guide-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .summary-card {
    min-height: 142px;
  }
  .metric-note {
    font-size: 12px;
  }
  .activity-panel {
    order: 1;
  }
  .connections-panel {
    order: 2;
  }
  .connection-list li {
    padding: 14px 0;
  }
  .connection-list .badge {
    font-size: 12px;
  }
  .connection-note {
    padding-bottom: 18px;
  }
  .connection-list div > span {
    font-size: 12px;
  }
  .panel-bottom-note {
    font-size: 12px;
  }
  .site-footer {
    padding: 0 22px 25px;
  }
  .filter-form {
    gap: 12px;
  }
  .filter-form > div {
    flex: 1;
  }
  .filter-form select {
    width: 100%;
    max-width: none;
  }
  .result-count {
    margin-left: 0;
  }
}
@media (max-width: 480px) {
  .header-inner {
    padding-left: 17px;
    padding-right: 17px;
  }
  .brand {
    gap: 10px;
  }
  .account-menu {
    margin-bottom: 16px;
  }
  .button-text {
    font-size: 12px;
  }
  .main-container {
    padding: 24px 17px;
  }
  .page-heading {
    display: block;
    margin-bottom: 23px;
  }
  .snapshot-time {
    margin-top: 18px;
    max-width: none;
    justify-content: flex-start;
  }
  .snapshot-time .button {
    margin: 0 0 0 auto;
  }
  .summary-grid,
  .guide-grid {
    gap: 10px;
  }
  .breakdown-row {
    grid-template-columns: 1fr auto;
  }
  .breakdown-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .summary-card {
    padding: 17px 15px;
    min-height: 139px;
  }
  .metric-value {
    font-size: 29px;
  }
  .metric-label {
    font-size: 12px;
  }
  .metric-note {
    font-size: 12px;
    line-height: 1.6;
  }
  .status-headline {
    font-size: 17px;
    margin-top: 20px;
  }
  .panel-heading {
    padding: 20px 17px 16px;
  }
  h2 {
    font-size: 15px;
  }
  .chart-legend {
    padding: 0 17px;
    gap: 12px;
  }
  .chart-container {
    margin: 0 4px;
  }
  .connection-list {
    padding: 0 17px;
  }
  .connection-note,
  .secure-note {
    padding-left: 17px;
    padding-right: 17px;
  }
  .panel-bottom-note {
    padding-left: 17px;
    padding-right: 17px;
  }
  .text-link {
    font-size: 12px;
  }
  .table-secondary {
    min-width: 200px;
  }
  .site-footer {
    display: block;
    padding-left: 17px;
    padding-right: 17px;
  }
  .site-footer span {
    display: block;
    margin-top: 5px;
  }
  .filter-form {
    padding: 18px 17px;
  }
  .filter-form > div {
    min-width: 100%;
    width: 100%;
  }
  .filter-form select {
    min-width: 0;
  }
  .pagination {
    padding: 16px 17px;
  }
  .empty-state {
    padding: 30px 22px;
  }
  .empty-state p {
    font-size: 12px;
  }
}

/* Check page: columns stay inside the panel, so a single day is not stretched across the chart. */
.day-chart {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  height: 200px;
  margin: 12px 24px 8px;
}
.day-chart-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.day-chart-plot {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  height: 100%;
  border-bottom: 1px solid var(--line);
}
.day-column {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  min-width: 0;
}
.day-fill {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: min(100%, 28px);
  transform: translateX(-50%);
  background: var(--accent);
  border-radius: 4px 4px 0 0;
}
.check-zero-mark {
  height: 3px;
  background: var(--muted);
}
.day-error {
  position: absolute;
  right: 2px;
  bottom: 0;
  width: 4px;
  height: 8px;
  background: #f04438;
  border-radius: 2px;
}
.check-days {
  margin: 12px 24px 20px;
}
.check-days summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 25px;
}
.guide-grid p {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #343a41;
}
.guide-grid .text-link {
  display: inline-block;
  margin-top: 14px;
}
.breakdown-list {
  display: grid;
  gap: 14px;
  margin: 4px 24px 20px;
}
.breakdown-row {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.breakdown-label,
.breakdown-count {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.breakdown-track {
  display: block;
  height: 10px;
  background: #edf1f5;
  border-radius: 999px;
  overflow: hidden;
}
.breakdown-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}
.breakdown-caption {
  caption-side: top;
  padding: 0 0 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #66727f;
}

/* These follow the base rules above. Equal-specificity media queries only win when they come later. */
@media (max-width: 1100px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 800px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .page-heading {
    flex-direction: column;
    align-items: stretch;
  }
  .page-heading .button {
    align-self: flex-start;
  }
  .page-heading h1 {
    max-width: 100%;
  }
  .site-header,
  .header-inner,
  .main-container,
  .main-nav {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .breakdown-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .breakdown-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* SLA pages. Cards wrap to one column on a phone. The chart is inline SVG drawn by the
   server; its colours come from these rules, and text never uses the column colour. */
.sla-notice {
  background: white;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 28px;
}
.sla-notice h2 {
  font-size: 14px;
  margin-bottom: 6px;
}
.sla-notice ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.sla-notice strong {
  color: var(--ink);
  font-weight: 600;
}
.sla-section {
  margin-bottom: 32px;
}
.sla-section-title {
  font-size: 18px;
  margin-bottom: 14px;
}
.sla-cards,
.sla-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 17px;
}
.sla-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  margin-bottom: 25px;
}
.sla-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 17px;
}
.sla-card,
.sla-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 2px 3px #1e212505;
}
.sla-card > *,
.sla-tile > * {
  max-width: 100%;
}
.sla-card h2,
.sla-card h3,
.sla-tile h3 {
  font-size: 16px;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}
/* Room for a two-line title, so the counts in a row of tiles line up. */
.sla-tile h3 {
  min-height: 3em;
}
.sla-code {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #5100e5;
  background: #efe5ff;
  border-radius: 5px;
  padding: 2px 8px;
}
.sla-standard {
  color: var(--muted);
  margin: 0;
}
.sla-figures {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.sla-headline {
  display: block;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -1.3px;
  line-height: 1;
  margin: 16px 0 8px;
}
.sla-unknown {
  display: block;
  font-size: 19px;
  font-weight: 600;
  color: var(--muted);
  margin: 16px 0 4px;
}
.sla-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.sla-empty {
  color: var(--muted);
  margin: 16px 0 0;
}
.sla-empty strong {
  color: var(--ink);
}
.sla-warning {
  font-size: 12px;
  color: #b54708;
  background: #fffaeb;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 10px 0 0;
}
.sla-more {
  margin-top: auto;
  padding-top: 14px;
}
.sla-stale .sla-figures {
  filter: grayscale(1);
  opacity: 0.55;
}
.sla-explain p {
  margin: 8px 0 18px;
}
.sla-explain ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.sla-explain li + li {
  margin-top: 6px;
}
.sla-chart {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 14px;
}
.sla-chart text {
  font-family: var(--font);
  font-size: 10px;
}
.sla-tick,
.sla-month {
  fill: var(--muted);
}
.sla-value,
.sla-target-label {
  fill: var(--ink);
}
.sla-gridline,
.sla-target {
  stroke-width: 1;
  shape-rendering: crispEdges;
}
.sla-gridline {
  stroke: var(--line);
}
.sla-target {
  stroke: var(--ink);
}
.sla-column path {
  fill: var(--accent);
}
.sla-column--current path {
  fill: #c4a3ff;
}
.sla-hit {
  fill: transparent;
}
.sla-column:hover path {
  opacity: 0.8;
}
.sla-table th,
.sla-table td {
  text-align: right;
}
.sla-table th:first-child {
  text-align: left;
}
.sla-table td,
.sla-table tbody th {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.sla-table tbody th {
  background: none;
  border-top: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  padding-top: 14px;
  padding-bottom: 14px;
}
.sla-table td {
  padding-top: 14px;
  padding-bottom: 14px;
}

/* People pages. The person page's tables reuse the SLA table. */
.people-table td {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Each breakdown group's share of all findings, beside its count. */
.breakdown-share {
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.25em;
}

.people-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
}

/* People pages: the hero number, the hour-by-person heatmap (people.js sets its
   height from the row count), the reused breakdown bars and the small notes. */
.people-sections > section + section {
  margin-top: 32px;
}
.people-hero {
  display: block;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -1.5px;
  font-variant-numeric: proportional-nums;
  margin: 6px 0;
}
.people-heatmap {
  width: 100%;
  min-height: 120px;
}
.people-status {
  font-size: 13px;
  color: var(--muted);
}
.people-bars {
  margin-top: 10px;
}
.people-axis-note {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}
.people-table td.people-late {
  color: #b7781f;
}
details.people-twin summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
/* A row of two charts, one third and two thirds; stacked on a narrow screen.
   people.js sets the heatmap and bar heights from their row counts; the line
   keeps a fixed height. */
.people-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 760px) {
  .people-row {
    grid-template-columns: 1fr;
  }
}
.people-chart {
  width: 100%;
  min-height: 220px;
}
.people-chart--line {
  height: 220px;
}
/* A "late by" cell on the My performance tables, whichever table class it sits in. */
td.people-late {
  color: #b7781f;
}
/* The Team page strip: one tile per team, each a link to its section. */
.summary-grid.people-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
a.summary-card {
  display: block;
  color: inherit;
  text-decoration: none;
}
/* Commercial portal: the app's skeleton under a purple header. The block stays at the
   end of the file so its colour rules win over the header rules of equal specificity. */
:root {
  --commercial-bg: #20094a;
  --commercial-nav: #d4c2ff;
  --commercial-accent: #6b1aff;
  --commercial-tint: #efe5ff;
}
.commercial-entry {
  background: var(--commercial-bg);
  color: white;
  border-radius: 999px;
  padding: 6px 12px 6px 9px;
  font-weight: 600;
}
.commercial-entry:hover {
  color: white;
  background: var(--commercial-accent);
}
.commercial-header {
  background: var(--commercial-bg);
}
.commercial-header .brand-logo {
  filter: brightness(0) invert(1);
}
.commercial-header .brand-context {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}
.commercial-header .header-inner { gap: 28px; }
.commercial-header .account-menu { gap: 14px; }
.commercial-header .account-name { max-width: 150px; white-space: nowrap; }
.commercial-brand-rule {
  color: #b9a3ef;
  font-weight: 400;
}
.commercial-nav a,
.commercial-header .whats-new,
.commercial-header .account-name,
.commercial-header .button-text {
  color: var(--commercial-nav);
}
.commercial-nav a.active {
  background: var(--commercial-accent);
  color: white;
}
.commercial-nav a:hover,
.commercial-header .whats-new:hover,
.commercial-header .button-text:hover {
  color: white;
}
.commercial-main {
  max-width: 1280px;
  margin: auto;
  padding: 39px 42px 48px;
  min-height: calc(100vh - 160px);
}
.commercial-main th {
  color: var(--muted);
}
.commercial-main .sla-warning {
  font-size: 14px;
  padding: 14px 16px;
  margin: 0 0 24px;
}
.commercial-main .sla-warning p {
  margin: 0 0 4px;
}
.commercial-footer {
  max-width: 1280px;
  color: var(--muted);
}
.commercial-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 17px;
  margin-bottom: 20px;
}
.commercial-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 23px;
  color: var(--ink);
}
.commercial-tile:hover {
  border-color: var(--commercial-accent);
  text-decoration: none;
}
.commercial-tile-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 12px;
  background: var(--commercial-tint);
  color: var(--commercial-bg);
  margin-bottom: 6px;
}
.commercial-tile strong {
  font-size: 18px;
}
.commercial-tile p {
  color: var(--muted);
  margin: 0;
}
.commercial-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 18px 24px;
  margin: 0 0 16px;
}
.commercial-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.commercial-filters select {
  width: 168px;
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}
.segmented a {
  padding: 7px 12px;
  font-size: 13px;
  color: var(--ink);
  border-right: 1px solid var(--line);
}
.segmented a:last-child {
  border-right: 0;
}
.segmented a:hover {
  text-decoration: none;
  background: var(--commercial-tint);
}
.segmented a[aria-current="page"] {
  background: var(--commercial-accent);
  color: white;
}
.segmented a:focus-visible {
  outline: 2px solid var(--commercial-accent);
  outline-offset: -2px;
}
.commercial-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.commercial-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--commercial-tint);
  color: var(--commercial-bg);
  font-size: 13px;
}
.commercial-chip a {
  color: inherit;
  font-weight: 700;
  padding: 2px 6px;
  margin: -2px -6px -2px 0;
  line-height: 20px;
  min-width: 24px;
  text-align: center;
}
.commercial-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.commercial-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0 0 12px;
}
.commercial-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}
.commercial-bars {
  margin: 22px 24px;
}
/* The swatch carries the direction; the figure beside it stays in ink. */
.commercial-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
}
.commercial-swatch.variance-overrun,
.breakdown-fill.variance-overrun,
.commercial-legend .variance-overrun,
.commercial-swatch.margin-loss,
.breakdown-fill.margin-loss,
.commercial-legend .margin-loss {
  background: #b7781f;
}
.commercial-swatch.variance-saving,
.breakdown-fill.variance-saving,
.commercial-legend .variance-saving,
.breakdown-fill.margin-gain,
.commercial-legend .margin-gain {
  background: #1f7a4d;
}
.commercial-table {
  font-size: 13px;
}
.commercial-table th,
.commercial-table td {
  padding-left: 8px;
  padding-right: 8px;
  white-space: nowrap;
}
.commercial-table tbody th {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  min-width: 0;
  font-size: 13px;
}
.commercial-table thead th a {
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.commercial-table thead th[aria-sort="descending"] a::after {
  content: " \25BE";
}
.commercial-table thead th[aria-sort="ascending"] a::after {
  content: " \25B4";
}
.commercial-table thead th[aria-sort] {
  color: var(--ink);
  font-weight: 700;
}
.commercial-group th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-top: 22px;
  white-space: normal;
  max-width: none;
}
/* .page-heading > div grows; the step buttons keep their width at the right. */
.page-heading > .commercial-steps {
  flex: none;
}
.commercial-steps {
  display: flex;
  gap: 8px;
  flex: none;
}
@media (max-width: 760px) {
  .commercial-strip {
    grid-template-columns: 1fr 1fr;
  }
  .commercial-filters select {
    width: 100%;
  }
}
@media (max-width: 480px) {
  .commercial-entry {
    padding: 6px 9px;
  }
  .commercial-entry span {
    display: none;
  }
}
/* A card whose value is a word ("needs a check", "hidden") reads as a note, not a figure. */
.metric-value.metric-word {
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 26px 0 16px;
}
/* Period and direction on the first line of the filter card, the pickers on the second. */
.commercial-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  flex-basis: 100%;
}
/* Money per order: the section title with its Per order / Total switch, the total rows,
   and the lane grid, shaded by the number of orders in the averages. */
.commercial-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.commercial-total th,
.commercial-total td {
  font-weight: 700;
  color: var(--ink);
}
.commercial-how ul {
  margin: 0;
  padding: 18px 24px 18px 40px;
}
.lane-grid td {
  text-align: center;
  min-width: 56px;
}
.lane-grid td a,
.lane-grid td span {
  color: var(--ink);
}
.lane-shade-1 {
  background: #efe5ff;
}
.lane-shade-2 {
  background: #d4c2ff;
}
.lane-shade-3 {
  background: #a77bff;
}
.lane-shade-4 {
  background: #6b1aff;
}
.lane-grid .lane-shade-4 a,
.lane-grid .lane-shade-4 span {
  color: #fff;
}
.lane-few {
  color: var(--muted);
}

/* Rate cards. Status colours follow the Borderless360 App: Draft grey, Pending amber,
   Selling green, Legacy red. */
:root {
  --rate-draft: #5b8def;
  --rate-pending: #f59e0b;
  --rate-selling: #10b981;
  --rate-legacy: #ef4444;
  --rate-archived: #c3c9d2;
  --rate-all: var(--accent);
  --rate-soft: #f8f9fb;
}
.rate-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.rate-heading-text { min-width: 0; }
.rate-heading-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rate-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 28px; align-items: start; }
.rate-main { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.rate-main > .sla-warning, .rate-main > .rate-chips { margin: 0; }
.rate-panel-title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* Data updated: the Office TV's snapshot status */
.page-heading > .rate-snapshot { flex: none; }
.rate-snapshot { flex: none; align-self: center; display: flex; align-items: center; gap: 12px; padding: 11px 16px; border: 1px solid #e4e7ec; border-radius: 11px; background: #fff; }
.rate-snapshot-indicator { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #343a41; box-shadow: 0 0 0 4px #343a4110; }
.rate-snapshot strong { display: block; color: #343a41; font-size: 15px; font-weight: 600; }
.rate-snapshot span:not(.rate-snapshot-indicator) { display: block; margin-top: 2px; color: #343a41; font-size: 13px; font-variant-numeric: tabular-nums; }
.rate-snapshot.is-current .rate-snapshot-indicator { background: #17b26a; box-shadow: 0 0 0 4px #17b26a1a; }
.rate-snapshot.is-current strong { color: #067647; }
.rate-snapshot.is-stale, .rate-snapshot.is-error { background: #fffcf5; border-color: #fedf89; }
.rate-snapshot.is-stale .rate-snapshot-indicator, .rate-snapshot.is-error .rate-snapshot-indicator { background: #f79009; box-shadow: 0 0 0 4px #f790091a; }
.rate-snapshot.is-stale strong, .rate-snapshot.is-error strong { color: #b54708; }

/* Filters */
.rate-aside { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.rate-aside-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rate-aside-links .button { text-align: center; justify-content: center; }
.rate-filters { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 3px #1e212505; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.rate-filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rate-clear { font-size: 12.5px; font-weight: 600; }
.rate-multi { border-bottom: 1px solid var(--line); }
.rate-multi summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 2px; cursor: pointer; font-weight: 600; }
.rate-multi summary::-webkit-details-marker { display: none; }
.rate-multi summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg) translateY(-2px); flex: none; transition: transform 0.15s; }
.rate-multi[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.rate-multi-label { flex: none; }
.rate-multi-value { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.rate-multi-chosen { color: var(--accent); background: var(--commercial-tint); padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.rate-multi-options { display: flex; flex-direction: column; gap: 2px; padding: 0 0 10px; }
.rate-multi-long { max-height: 232px; overflow-y: auto; padding-right: 4px; }
.rate-check { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.rate-check:hover { background: var(--rate-soft); }
.rate-check input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; flex: none; }
.rate-check:has(input:checked) { background: var(--commercial-tint); font-weight: 600; }
.rate-verified { border: 0; margin: 10px 0 0; padding: 0; }
.rate-verified legend { font-weight: 600; padding: 0 2px; margin-bottom: 6px; }
.rate-segment { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--rate-soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.rate-segment label { cursor: pointer; }
.rate-segment input { position: absolute; opacity: 0; pointer-events: none; }
.rate-segment span { display: block; text-align: center; padding: 5px 2px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.rate-segment input:checked + span { background: white; color: var(--ink); box-shadow: 0 1px 2px #1e21251f; }
.rate-segment input:focus-visible + span { outline: 2px solid var(--accent); }
.rate-filter-buttons { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 14px; }
.rate-filter-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

/* Status pills and dots */
.rate-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rate-all); flex: none; }
.rate-dot-draft { background: var(--rate-draft); }
.rate-dot-pending { background: var(--rate-pending); }
.rate-dot-selling { background: var(--rate-selling); }
.rate-dot-legacy { background: var(--rate-legacy); }
.rate-dot-archived { background: var(--rate-archived); }
.rate-state { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #f1f3f6; color: #4b5563; }
.rate-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rate-state-draft { background: #e8efff; color: #2f5fbf; }
.rate-state-pending { background: #fef3c7; color: #92400e; }
.rate-state-selling { background: #d1fae5; color: #065f46; }
.rate-state-legacy { background: #fee2e2; color: #991b1b; }
.rate-state-archived { background: #f3f4f6; color: #8a94a3; }

/* Headline */
.rate-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.rate-tile { position: relative; display: flex; flex-direction: column; gap: 6px; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; box-shadow: 0 2px 3px #1e212505; color: var(--ink); overflow: hidden; transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s; }
.rate-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--rate-all); }
.rate-tile-draft::before { background: var(--rate-draft); }
.rate-tile-pending::before { background: var(--rate-pending); }
.rate-tile-selling::before { background: var(--rate-selling); }
.rate-tile-legacy::before { background: var(--rate-legacy); }
.rate-tile-archived::before { background: var(--rate-archived); }
.rate-tile:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 16px #1e212514; border-color: #d9dde3; }
.rate-tile-all { background: linear-gradient(180deg, var(--commercial-tint), white 70%); }
.rate-tile-dimmed { opacity: 0.45; }
.rate-tile-label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.rate-tile-figure { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.rate-tile-share { padding: 1px 8px; border-radius: 999px; background: #f1f3f6; font-size: 12px; font-weight: 600; color: #4b5563; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rate-tile-all .rate-tile-share { background: white; color: var(--accent); }
.rate-tile-value { font-size: 34px; line-height: 1; font-weight: 650; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.rate-tile-note { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* Sections and tables */
.rate-section { display: flex; flex-direction: column; gap: 12px; }
.rate-section-head h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.2px; }
.rate-section-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.rate-section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.rate-card-panel { background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 3px #1e212505; }
.rate-footnote { margin: 0; color: var(--muted); font-size: 12px; }
.rate-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.rate-table th, .rate-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.rate-table thead th { background: var(--rate-soft); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.rate-table tbody tr:last-child th, .rate-table tbody tr:last-child td { border-bottom: 0; }
.rate-table tbody tr:hover { background: #fbfaff; }
.rate-table tbody th, .rate-table tfoot th { background: none; border-top: 0; color: var(--ink); font-size: 13.5px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.rate-table thead th { border-top: 0; letter-spacing: 0; }
.rate-matrix td, .rate-matrix thead th { text-align: center; }
.rate-matrix thead th:first-child, .rate-matrix tbody th, .rate-matrix tfoot th { text-align: left; }
.rate-matrix tfoot th, .rate-matrix tfoot td { background: var(--rate-soft) !important; border-top: 1px solid var(--line); border-bottom: 0; font-weight: 650; }
.rate-num { display: inline-block; min-width: 34px; padding: 3px 8px; border-radius: 8px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
a.rate-num:hover { background: var(--commercial-tint); color: var(--accent); text-decoration: none; }
.rate-num-total { background: #f1f3f6; }
.rate-num-grand { background: var(--accent); color: white; }
.rate-zero { color: #c3c9d2; }

/* By country */
.rate-fill-selling { background: #10b981; }
.rate-fill-pending { background: #f59e0b; }
.rate-fill-draft { background: #5b8def; }
.rate-fill-legacy { background: #ef4444; }
.rate-chart { padding: 16px 18px 10px; }
.rate-legend { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0 0 10px; padding: 0; font-size: 12.5px; color: var(--muted); }
.rate-legend li { display: inline-flex; align-items: center; gap: 6px; }
.rate-swatch { width: 10px; height: 10px; border-radius: 3px; }
.rate-bars-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 96px 76px 64px; align-items: center; gap: 14px; padding: 8px 6px; }
.rate-bars-head { padding-top: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.rate-bars-head span:nth-child(n+3) { text-align: right; }
.rate-bars-country { color: var(--ink); font-weight: 600; }
.rate-bars-track { display: flex; align-items: center; gap: 2px; min-width: 0; }
.rate-segment-bar { display: flex; align-items: center; justify-content: center; height: 22px; min-width: 3px; color: white; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 1px 1px #0003; }
.rate-segment-bar:first-child { border-radius: 4px 0 0 4px; }
.rate-segment-bar:last-of-type { border-radius: 0 4px 4px 0; }
.rate-segment-bar:only-of-type { border-radius: 4px; }
.rate-segment-bar:hover { filter: brightness(0.92); text-decoration: none; }
.rate-bars-total { margin-left: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rate-bars-share { text-align: right; line-height: 1.15; }
.rate-bars-share strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.rate-bars-share small { color: var(--muted); font-size: 11.5px; }
.rate-bars-clients { justify-self: end; display: inline-flex; align-items: center; }
.rate-bars-archived { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.rate-bars-archived a { color: var(--muted); }
.rate-bars-item { border-top: 1px solid var(--line); }
.rate-bars-item > summary { list-style: none; cursor: pointer; border-top: 0; }
.rate-bars-item > summary::-webkit-details-marker { display: none; }
.rate-bars-item > summary:hover { background: #fbfaff; }
.rate-bars-item[open] > summary { background: #fbfaff; }
.rate-clients-pill { display: inline-block; min-width: 30px; padding: 2px 9px; border-radius: 999px; background: var(--commercial-tint); color: var(--accent); font-weight: 700; text-align: center; }
.rate-chevron { width: 6px; height: 6px; margin-left: 8px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform 0.15s; }
.rate-bars-item[open] .rate-chevron { transform: rotate(-135deg) translateY(-1px); }
.rate-client-list { padding: 4px 0 14px 164px; }
.rate-client-title { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.rate-client-list ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rate-client-list li a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink); font-size: 12.5px; font-weight: 600; }
.rate-client-list li a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.rate-client-count { min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--commercial-tint); color: var(--accent); font-size: 11px; font-weight: 700; text-align: center; }

/* Changes */
.rate-when time { display: flex; flex-direction: column; font-weight: 600; white-space: nowrap; }
.rate-when time span { color: var(--muted); font-weight: 500; font-size: 12px; font-variant-numeric: tabular-nums; }
.rate-card-link { color: var(--ink); font-weight: 600; }
.rate-card-id { color: var(--accent); font-variant-numeric: tabular-nums; }
.rate-change-text { display: block; margin-top: 3px; color: var(--ink); }
.rate-kind { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #eef2ff; color: #3730a3; white-space: nowrap; text-decoration: none; }
.rate-kind-state, .rate-kind-verification { background: #ecfdf5; color: #065f46; }
.rate-kind-prices { background: #fff7ed; color: #9a3412; }
.rate-kind-created, .rate-kind-sell_card_created, .rate-kind-version { background: #f0f9ff; color: #075985; }
.rate-kind-deleted, .rate-kind-sell_card_deleted { background: #fef2f2; color: #991b1b; }
.rate-kind-current { outline: 2px solid currentColor; }
.rate-kinds { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 8px 0 0; padding: 0; }
.rate-person { display: inline-flex; align-items: center; gap: 8px; }
.rate-avatar { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--commercial-tint); color: var(--accent); font-size: 11px; font-weight: 700; }
.rate-avatar-system { background: #f1f3f6; color: var(--muted); }
.rate-person-text { display: flex; flex-direction: column; line-height: 1.25; }
.rate-who { font-weight: 600; }
.rate-changes { table-layout: fixed; }
.rate-changes th:nth-child(1) { width: 92px; }
.rate-changes th:nth-child(2) { width: 30%; }
.rate-changes th:nth-child(4) { width: 200px; }
.rate-changes td { overflow-wrap: anywhere; }
.rate-who-note { font-size: 11.5px; color: var(--muted); }

/* Card page, card list and changes page */
.rate-facts th[scope="row"] { width: 200px; text-align: left; }
/* The card list uses the whole window, and its text columns wrap so every column shows. */
.commercial-main.commercial-main-wide { max-width: none; padding-left: 32px; padding-right: 32px; }
.rate-register th, .rate-register td { padding: 10px 8px; white-space: normal; overflow-wrap: break-word; }
.rate-register td .rate-state, .rate-register td .badge { display: inline-flex; margin: 1px 0; }
.rate-register thead th { white-space: normal; vertical-align: bottom; }
.rate-register tbody th[scope="row"] { min-width: 200px; white-space: normal; }
.rate-register tbody th[scope="row"] .badge { display: inline-block; margin-top: 2px; }
.rate-register .rate-date { white-space: nowrap; }
.rate-register .rate-date small { display: block; color: var(--muted); font-size: 12px; }
.rate-register .rate-count { text-align: center; font-variant-numeric: tabular-nums; }
.rate-register .rate-sub { display: block; color: var(--muted); font-size: 12px; }
.rate-app-link { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--commercial-tint); font-weight: 700; }
.rate-app-link:hover { background: var(--accent); color: white; text-decoration: none; }
.rate-register thead th:nth-child(n+7):nth-child(-n+9) { text-align: center; }
.rate-gone { opacity: 0.6; }
.rate-timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.rate-timeline li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 0 8px 16px; position: relative; }
.rate-timeline li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: #c4b5fd; border: 2px solid var(--background); }
.rate-timeline time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 130px; }
.rate-written-by { margin-left: auto; }

@media (max-width: 1280px) { .rate-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .rate-client-list { padding-left: 6px; }
  .rate-bars-row { grid-template-columns: 110px minmax(0, 1fr) 70px 48px 48px; gap: 8px; }
  .rate-layout { grid-template-columns: 1fr; }
  .rate-aside { position: static; }
  .rate-heading { flex-direction: column; }
  .rate-snapshot { text-align: left; }
}
@media (max-width: 560px) { .rate-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rate-timeline time { min-width: 0; } }
