:root {
  color-scheme: dark;
  --paper: #0a1014;
  --surface: #121b21;
  --surface-soft: #17232a;
  --ink: #edf5f4;
  --muted: #a0b3b8;
  --line: #2a3941;
  --line-strong: #647983;
  --accent: #ff907e;
  --accent-dark: #ffab9e;
  --dark: #0b1216;
  --dark-soft: #221e20;
  --dark-line: #68433f;
  --signal: #69f4d0;
  --studio: #82c8ff;
  --credit: #bdabff;
  --success: #80e7bf;
  --success-bg: #142e28;
  --warning: #ffd088;
  --warning-bg: #30271b;
  --danger: #ffa599;
  --danger-bg: #342023;
  font-family: Manrope, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  background: var(--paper);
}

button,
input,
select {
  font: inherit;
}

button,
a,
select {
  touch-action: manipulation;
}

button,
select,
input {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 9px 13px;
  background: var(--surface);
  color: var(--ink);
}

button,
a {
  cursor: pointer;
}

button:hover {
  border-color: var(--ink);
}

button:disabled {
  cursor: wait;
  opacity: .58;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 10;
  padding: 12px 15px;
  border-radius: 7px;
  background: var(--surface);
}

.skip:focus {
  top: 12px;
}

#boot {
  min-height: 100vh;
  padding: 15vh 8vw;
  color: var(--muted);
}

#app {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  padding: 30px 18px 20px;
  color: var(--ink);
  background: var(--dark);
}

.brand {
  display: block;
  padding: 0 8px 22px;
  text-decoration: none;
}

.brand img {
  display: block;
  width: min(137px, 100%);
  height: 42px;
  object-fit: contain;
  object-position: left center;
}

.brand-meta {
  display: block;
  margin-top: 10px;
  color: #abb6af;
  font-size: 10px;
  letter-spacing: .16em;
}

.sidebar nav {
  display: grid;
  gap: 5px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  gap: 11px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #b9c4bc;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.sidebar nav a:hover {
  color: #fff;
  background: var(--surface-soft);
}

.sidebar nav a[aria-current="page"] {
  color: #fff;
  background: var(--dark-soft);
  border-color: var(--dark-line);
  box-shadow: inset 3px 0 var(--accent);
}

.nav-icon {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  color: currentColor;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
}

.workspace-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 7px;
  color: #efb8ad;
  font-size: 12px;
  text-decoration: none;
}

.workspace-switch:hover {
  background: var(--surface-soft);
  color: #fff;
}

.workspace-switch svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 17px 10px;
  border-top: 1px solid var(--line);
}

.avatar {
  display: grid;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  background: var(--line);
}

.identity strong,
.identity small {
  display: block;
  overflow-wrap: anywhere;
}

.identity strong {
  font-size: 13px;
}

.identity small {
  margin-top: 2px;
  color: #aeb9b1;
  font-size: 11px;
}

.logout {
  width: 100%;
  border-color: var(--line);
  color: #bec9c1;
  background: transparent;
  font-size: 13px;
}

.logout:hover {
  color: #fff;
  background: var(--surface-soft);
  border-color: #536258;
}

#content {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 16px;
  padding: 15px 38px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

.access-label {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.page {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 38px;
}

.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .13em;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 9px;
  font-size: 32px;
  font-weight: 650;
  line-height: 1.2;
}

h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.4;
}

.heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  font-size: 14px;
}

.toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.toolbar select {
  appearance: none;
  width: 100%;
  min-width: 158px;
  padding-inline: 13px 37px;
  border-color: #50656b;
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}

.period-caption {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.period-caption .inline-icon { width: 14px; height: 14px; color: var(--signal); }
.period-field { position: relative; display: grid; }
.period-field .period-chevron {
  position: absolute;
  inset-inline-end: 13px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--signal);
}

@media (hover: hover) and (pointer: fine) {
  .toolbar select:hover { border-color: var(--signal); }
  @supports (appearance: base-select) and selector(::picker(select)) {
    #period, #period::picker(select) { appearance: base-select; }
    #period::picker-icon { display: none; }
    #period::picker(select) {
      margin-block: 5px;
      padding: 4px;
      color: var(--ink);
      background: var(--surface);
      border: 1px solid #50656b;
      border-radius: 10px;
      box-shadow: 0 8px 24px #0006;
    }
    #period option { min-height: 36px; padding: 6px 10px; border-radius: 6px; }
    #period option:checked { color: var(--signal); background: #1b3232; }
    #period option:is(:hover, :focus-visible) { background: #284044; }
  }
}

.filters button {
  color: #211519;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 650;
}

.filters button:hover,
.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

#feedback {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 14px;
}

#feedback:not(:empty) {
  display: flex;
}

#feedback.is-processing {
  color: var(--studio);
  background: #182830;
  border-color: #365567;
}

#feedback.is-success {
  color: var(--success);
  background: var(--success-bg);
  border-color: #325c4e;
}

#feedback.is-error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: #684048;
}

.feedback-icon {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
}

.feedback-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.feedback-message {
  flex: 1;
  min-width: 0;
}

.feedback-action {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 10px;
  color: inherit;
  background: transparent;
  border-color: currentColor;
  font-size: 12px;
}

#view {
  min-width: 0;
}

#view.is-refreshing {
  opacity: .72;
  transition: opacity .18s ease;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.metric {
  min-width: 0;
  padding: 24px;
}

.metric + .metric {
  border-left: 1px solid var(--line);
}

.metric-label {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.metric-value {
  margin: 15px 0 10px;
  overflow-wrap: anywhere;
  font-size: clamp(26px, 3vw, 40px);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.3;
}

.metric-comparison {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.metric-comparison strong {
  color: var(--success);
  font-weight: 700;
}

.metric-comparison strong.down {
  color: var(--danger);
}

.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 0;
}

.panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.panel-body {
  min-width: 0;
  padding: 22px 24px;
}

.chart {
  display: block;
  width: 100%;
  height: 205px;
  margin-top: 18px;
}

.chart polyline,
.chart polygon {
  transition: opacity .2s ease;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.chart-caption {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.attention {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.attention:first-child {
  padding-top: 0;
}

.attention:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.attention a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 6px;
  font-size: 14px;
  text-decoration: none;
}

.attention a:hover {
  text-decoration: underline;
}

.attention small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.attention strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.attention .warn {
  color: var(--warning);
}

.inline-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.supporting {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.supporting span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.supporting strong {
  font-size: 23px;
  font-weight: 600;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, .35fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 20px;
}

.filters label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.filters input,
.filters select {
  width: 100%;
  min-width: 0;
  font-size: 14px;
}

.filters button {
  min-width: 92px;
}

.table-scroll {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.table-hint {
  display: none;
  margin: 0;
  padding: 8px 14px;
  color: var(--muted);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.table-wrap {
  min-width: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}

.table-scroll table {
  border: 0;
}

th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

th,
td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

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

td strong,
td small {
  display: block;
}

td strong {
  font-weight: 650;
}

td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

td button {
  min-width: 92px;
  font-size: 12px;
  font-weight: 650;
}

.numeric {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid #33584d;
  border-radius: 5px;
  color: var(--success);
  background: var(--success-bg);
  font-size: 12px;
  white-space: nowrap;
}

.badge.warn {
  color: var(--warning);
  background: var(--warning-bg);
  border-color: #655034;
}

.badge.bad {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: #6c4348;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding: 16px 20px;
  color: var(--muted);
  font-size: 12px;
}

.pagination nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pagination button {
  min-width: 40px;
  min-height: 40px;
  padding: 6px 8px;
  font-size: 12px;
}

.pagination button[aria-current="page"] {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.empty {
  padding: 55px 24px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
}

.settings-grid {
  display: grid;
  gap: 24px;
}

.integration {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.integration:last-child {
  border-bottom: 0;
}

.note {
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 13px;
}

.definitions {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.definitions summary {
  cursor: pointer;
  font-size: 13px;
}

.definitions p {
  max-width: 90ch;
}

.package-bar {
  margin: 16px 0;
}

.package-bar > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
}

.package-bar progress {
  width: 100%;
  height: 7px;
  accent-color: var(--accent);
}

#freshness {
  margin-top: 22px;
  color: var(--muted);
  font-size: 11px;
}

.view-skeleton {
  display: grid;
  gap: 18px;
}

.skeleton-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.skeleton-card,
.skeleton-panel {
  min-height: 80px;
  padding: 22px;
  background: var(--surface);
}

.skeleton-panel {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.skeleton-columns {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 18px;
}

.skeleton-line {
  display: block;
  width: 100%;
  height: 12px;
  margin-bottom: 14px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--surface-soft), var(--line), var(--surface-soft));
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-line.short {
  width: 42%;
}

.skeleton-line.medium {
  width: 68%;
}

.skeleton-line.tall {
  height: 90px;
  margin-bottom: 0;
}

.skeleton-listing {
  min-height: 300px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.skeleton-row {
  display: grid;
  grid-template-columns: 1.8fr repeat(4, 1fr);
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

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

.inline-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.inline-progress::before {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: spin .75s linear infinite;
}

dialog {
  width: min(460px, calc(100% - 32px));
  max-width: 460px;
  padding: 28px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

dialog::backdrop {
  background: #03080bbc;
}

dialog p {
  font-size: 14px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.primary {
  color: #211519;
  background: var(--accent);
  border-color: var(--accent);
}

main:focus {
  outline: none;
}

@keyframes skeleton-shimmer {
  to {
    background-position: -200% 0;
  }
}

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

@media (min-width: 1500px) {
  .page {
    padding-top: 48px;
  }

  .metric {
    padding: 28px;
  }
}

@media (max-width: 1100px) {
  #app {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .page {
    padding: 26px;
  }

  .topbar {
    padding-right: 26px;
    padding-left: 26px;
  }

  .two-columns,
  .skeleton-columns {
    grid-template-columns: 1fr;
  }

  .heading {
    align-items: start;
  }

  .metric {
    padding: 20px;
  }

  .metric-value {
    font-size: 28px;
  }
}

@media (max-width: 760px) {
  #app {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px 14px 13px;
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 0 2px 10px;
  }

  .brand img {
    width: 108px;
    height: 32px;
  }

  .brand-meta {
    margin-top: 0;
    font-size: 9px;
    letter-spacing: .12em;
  }

  .sidebar nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .sidebar nav a {
    flex-direction: column;
    justify-content: center;
    min-height: 51px;
    gap: 2px;
    padding: 5px 3px;
    text-align: center;
    font-size: 10px;
    line-height: 1.15;
  }

  .sidebar nav a[aria-current="page"] {
    box-shadow: inset 0 -3px var(--accent);
  }

  .nav-icon {
    flex-basis: 19px;
    width: 19px;
    height: 19px;
  }

  .nav-icon svg {
    width: 17px;
    height: 17px;
  }

  .sidebar-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding-top: 9px;
  }

  .workspace-switch {
    min-width: 0;
    padding: 3px 2px;
    font-size: 11px;
  }

  .workspace-switch span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .identity {
    display: none;
  }

  .logout {
    width: auto;
    min-width: 76px;
    padding: 8px 10px;
    font-size: 11px;
  }

  .topbar {
    min-height: 52px;
    padding: 11px 16px;
    font-size: 12px;
  }

  .access-label {
    padding: 3px 6px;
    font-size: 9px;
  }

  .page {
    padding: 22px 16px 40px;
  }

  .heading {
    display: block;
    margin-bottom: 22px;
  }

  h1 {
    font-size: 28px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    margin-top: 17px;
  }

  .toolbar select {
    width: 100%;
    min-width: 0;
  }

  .toolbar button {
    min-width: 94px;
  }

  #feedback {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .feedback-action {
    margin-left: 30px;
  }

  .metrics,
  .skeleton-metrics {
    grid-template-columns: 1fr;
  }

  .metric {
    padding: 19px 20px;
  }

  .metric + .metric {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric-value {
    margin: 8px 0;
    font-size: 34px;
  }

  .two-columns {
    gap: 18px;
  }

  .panel-head,
  .panel-body {
    padding-right: 20px;
    padding-left: 20px;
  }

  .panel-head {
    padding-bottom: 0;
  }

  .supporting {
    gap: 12px;
  }

  .supporting strong {
    font-size: 20px;
  }

  .chart {
    height: 165px;
  }

  .filters {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .filters label:first-child {
    min-width: 0;
  }

  .filters button {
    width: 100%;
  }

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

  .table-hint {
    display: block;
  }

  .table-wrap {
    overflow: visible;
  }

  .table-scroll table {
    min-width: 750px;
  }

  .table-scroll.orders-table table {
    min-width: 680px;
  }

  .table-scroll.settings-table table,
  .table-scroll.daily-table table {
    min-width: 560px;
  }

  th,
  td {
    padding-right: 16px;
    padding-left: 16px;
  }

  .pagination {
    align-items: flex-start;
    padding-right: 16px;
    padding-left: 16px;
  }

  .pagination nav {
    width: 100%;
  }

  .skeleton-card,
  .skeleton-panel,
  .skeleton-listing {
    padding: 19px;
  }

  .skeleton-row {
    grid-template-columns: 1.5fr repeat(4, minmax(80px, 1fr));
  }

  dialog {
    margin: 16px;
    padding: 22px;
  }
}

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

.two-columns { align-items: start; }
.heading { align-items: end; }
.metric { padding: clamp(16px,2vw,24px); }
.empty { padding: clamp(24px,3vw,44px) 16px; }
dialog[open] {
  box-sizing: border-box;
  width: min(28rem,calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  overscroll-behavior: contain;
  overflow: auto;
}
body:has(dialog:modal) { overflow: hidden; }
@media (max-width:760px) {
  .heading { align-items: stretch; }
  .metric { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 4px 12px; }
  .metric-value { margin: 0; font-size: clamp(22px,5.8vw,30px); }
  .metric-comparison { grid-column: 1/-1; }
}
@media (prefers-reduced-motion:no-preference) {
  button:enabled:active { transform: translateY(1px); }
  dialog[open] { animation: saas-dialog-in 160ms ease-out; }
  @keyframes saas-dialog-in { from { opacity: 0; transform: translateY(5px); } }
}

/* The three signals share a scale across the summary, plot and tables. */
::selection { background: #35594f; color: #fff; }
html { scrollbar-color: #46606b var(--paper); }
.sidebar { border-inline-end: 1px solid var(--line); }
.brand-meta { color: var(--muted); }
.sidebar nav a[aria-current="page"] .nav-icon { color: var(--accent); }
#content {
  background: radial-gradient(ellipse at 94% 0%, #12312d77, transparent 42rem), var(--paper);
}
h1 { font-size: clamp(32px,3.3vw,50px); line-height: 1.1; }
.metrics { background: var(--surface); border-radius: 14px; }
.metric { --channel: var(--signal); position: relative; isolation: isolate; background: linear-gradient(155deg, color-mix(in srgb,var(--channel) 8%,var(--surface)),var(--surface) 76%); }
.metric-studio { --channel: var(--studio); }
.metric-credits { --channel: var(--credit); }
.metric::before {
  content: ""; position: absolute; inset: 0 auto auto 0; height: 2px; width: 64px;
  background: var(--channel); box-shadow: 0 2px 12px color-mix(in srgb,var(--channel) 38%,transparent);
}
.metric-label { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; }
.metric-label .inline-icon { width: 19px; height: 19px; flex-shrink: 0; color: var(--channel); }
.metric-value { color: var(--channel); font-weight: 650; line-height: 1.1; margin-block: 15px 10px; font-size: clamp(32px,3.4vw,52px); }
.panel { border-radius: 14px; }
.panel-head h2 { font-weight: 650; }
.panel-body:has(.chart,.plot-empty) { padding-top: 16px; }
.chart, .plot-empty {
  border: 1px solid var(--line);
  border-radius: 7px;
  background-color: #0c161b;
  background-image: linear-gradient(#31484e55 1px, transparent 1px),linear-gradient(90deg,#31484e55 1px,transparent 1px);
  background-size: 100% 40px, 48px 100%;
}
.plot-empty {
  position: relative; display: grid; align-items: center; min-height: 210px;
  overflow: hidden;
}
.plot-empty::after {
  content: ""; position: absolute; inset: auto 0 16px; height: 1px;
  background: var(--signal); opacity: .65; box-shadow: 0 1px 8px #69f4d04d;
}
.plot-empty .empty { justify-self: center; padding: 14px 18px; background: #0c161bf2; border-radius: 6px; }
.plot-empty .empty strong { font-size: 16px; }
.chart-labels { padding: 8px 1px 0; font-variant-numeric: tabular-nums; color: var(--muted); }
.chart polyline { stroke-linejoin: round; filter: drop-shadow(0 2px 4px #69f4d033); }
.attention { padding-block: 11px; }
.attention a { font-weight: 600; min-height: 36px; }
.attention small { margin-top: 0; }
.attention strong { color: var(--muted); }
.attention strong.warn { color: var(--warning); }
.supporting + .overview-packages { margin-top: 24px; }
.supporting strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.badge { font-variant-numeric: tabular-nums; }
.filters button, .primary { font-weight: 750; }
#refresh {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-inline: 13px;
  border-color: #44565b;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
#refresh .inline-icon { color: var(--accent); }
@media (hover: hover) {
  #refresh:hover:enabled { border-color: var(--accent); background: #292428; }
}
#refresh:active:enabled { background: #36282a; }
#period:focus-visible, #refresh:focus-visible { outline: 2px solid var(--signal); }
@media (prefers-reduced-motion:no-preference) {
  #refresh:disabled .inline-icon { animation: spin .85s linear infinite; }
  .sidebar nav a, button { transition: background-color .15s, border-color .15s, color .15s; }
}
@media (max-width:760px) {
  .sidebar { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .metric { padding: 14px 18px; gap: 5px 8px; }
  .metric::before { width: 2px; height: 26px; top: 14px; }
  .metric-value { margin: 0; font-size: clamp(23px,5vw,34px); }
  .metric-comparison { padding-inline-start: 28px; }
  .plot-empty { min-height: 166px; }
  .attention a { min-height: 44px; }
}

/* A continuous data surface. Channel colors belong to the indicators and the plot. */
#content { background: var(--paper); }
.sidebar nav a[aria-current="page"] { border-color: transparent; box-shadow: none; background: #202b30; }
.metric { background: transparent; }
.metric::before { content: none; }
.metric-value { color: var(--ink); font-variant-numeric: tabular-nums; }
.metric-comparison, .definitions, .note { line-height: 1.55; }
.panel-head { align-items: baseline; }
.listing-panel td strong, .integration strong { overflow-wrap: anywhere; }
.listing-panel .cell-label { display: none; }
dialog[open] { border-radius: 16px; box-shadow: 0 20px 64px rgb(0 0 0 / .32); }

@media (max-width:760px) {
  .listing-panel :is(.accounts-table,.orders-table) { overflow: visible; }
  .listing-panel .table-hint { display: none; }
  .listing-panel .table-scroll table {
    display: block; width: 100%; min-width: 0; white-space: normal;
  }
  .listing-panel thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  }
  .listing-panel tbody { display: block; }
  .listing-panel tbody tr {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: start; gap: 14px 12px; padding: 16px;
  }
  .listing-panel tbody tr + tr { border-top: 1px solid var(--line); }
  .listing-panel tbody td { padding: 0; border: 0; text-align: start; min-width: 0; overflow-wrap: anywhere; }
  .listing-panel .studio-cell { grid-column: 1/-1; font-size: 16px; }
  .listing-panel .cell-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; }
  .listing-panel td small { display: inline; margin-inline-start: .35em; }
  .listing-panel .studio-cell small { display: block; margin-inline-start: 0; }
  .listing-panel td button { min-height: 44px; }
  .filters { grid-template-columns: minmax(0,1fr) auto; align-items: end; }
  .filters label:first-child { grid-column: 1/-1; }
}
