:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #172b4d;
  background: #f8fafc;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  --primary: #1e40af;
  --border: #dbeafe;
  --muted: #475569;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary);
}
button {
  min-height: 44px;
  padding: 9px 15px;
  background: white;
  border: 1px solid #b8c6df;
  border-radius: 6px;
  color: var(--primary);
  cursor: pointer;
  transition: background 150ms;
}
button:hover {
  background: #e9eef6;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.primary:hover {
  background: #172e80;
}
a {
  color: var(--primary);
}
input,
select,
textarea {
  min-height: 44px;
  border: 1px solid #b8c6df;
  padding: 9px;
  border-radius: 6px;
  max-width: 100%;
  background: #fff;
  color: #172b4d;
}
label {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin: 8px 0 5px;
}
.top {
  min-height: 80px;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand {
  font-weight: 750;
  font-size: 22px;
  letter-spacing: -0.5px;
  display: block;
}
.subtitle,
.muted {
  font-size: 14px;
  color: var(--muted);
}
nav {
  padding: 12px 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
nav a {
  padding: 10px 16px;
  text-decoration: none;
  border-radius: 6px;
  font-size: 15px;
  min-height: 44px;
}
nav a[aria-current="page"] {
  background: #e9eef6;
  color: #16368d;
  font-weight: 650;
}
main {
  padding: 24px 32px;
  max-width: 1920px;
  margin: auto;
  min-width: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 4px 0 0;
}
h2 {
  font-size: 20px;
  margin: 0 0 14px;
}
h3 {
  font-size: 17px;
  margin-top: 20px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 1px;
  color: #475569;
  margin: 0 0 8px;
}
.pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.panel {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  margin-bottom: 20px;
  min-width: 0;
}
.context {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.context div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.context strong {
  display: block;
  font-size: 14px;
  margin-top: 6px;
}
.context span {
  font-size: 12px;
  color: var(--muted);
}
.filters {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filters form {
  display: contents;
}
.filters input {
  width: 240px;
}
.tablewrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  margin-bottom: 16px;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  text-align: left;
}
th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #edf2fa;
  color: #334155;
  font-size: 12px;
  z-index: 2;
  font-weight: 650;
}
td:first-child,
th:first-child {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}
th:first-child {
  background: #edf2fa;
  z-index: 3;
}
tbody tr:hover td {
  background: #f5f8ff;
}
.product {
  display: flex;
  gap: 12px;
  max-width: 380px;
}
.product img {
  width: 48px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}
.product a {
  white-space: normal;
  display: block;
  max-width: 290px;
  font-weight: 600;
  line-height: 1.4;
}
.product small {
  display: block;
  white-space: normal;
  margin-top: 5px;
  color: #475569;
  max-width: 290px;
}
.number {
  text-align: right;
}
.badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 5px;
  display: inline-block;
  background: #e9eef6;
  white-space: normal;
}
.warning {
  padding: 12px 16px;
  background: #fffbeb;
  color: #92400e;
  border-left: 3px solid #b45309;
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0;
}
.empty {
  padding: 48px 24px;
  text-align: center;
  color: #475569;
  line-height: 1.7;
}
.message {
  position: fixed;
  bottom: 12px;
  right: 16px;
  max-width: min(560px, calc(100% - 32px));
  padding: 12px 18px;
  border-radius: 6px;
  background: #172b4d;
  color: #fff;
  box-shadow: 0 3px 14px #172b4d33;
  z-index: 10;
}
.message:empty {
  display: none;
}
.auth {
  max-width: 480px;
  margin: 48px auto;
}
.auth p {
  color: #475569;
  line-height: 1.6;
}
.auth input {
  width: 100%;
  margin-bottom: 16px;
}
.auth button {
  width: 100%;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.grid .panel {
  margin: 0;
}
form.stack {
  max-width: 600px;
}
form.stack input,
form.stack textarea {
  width: 100%;
  margin-bottom: 8px;
}
.presetrow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.presetrow span {
  flex: 1;
}
.presetrow button {
  padding: 6px 12px;
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
}
.chart {
  display: block;
  width: 100%;
  max-height: 270px;
}
.chart text {
  font-family: inherit;
  font-size: 12px;
  fill: #475569;
}
.chart circle {
  fill: var(--primary);
}
footer {
  padding: 24px 32px;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}
.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  background: white;
  padding: 12px;
  z-index: 20;
}
.skip:focus {
  top: 8px;
}
textarea {
  width: 100%;
  min-height: 90px;
}
code {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.comparison td {
  min-width: 220px;
}
.comparison th:first-child,
.comparison td:first-child {
  min-width: 240px;
  white-space: normal;
}
.delta {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #475569;
}
.divider {
  border: 0;
  border-top: 1px solid #dbeafe;
  margin: 20px 0;
}
.metriclist {
  max-height: 500px;
  overflow: auto;
}
.error {
  color: #b91c1c;
}
button.small {
  min-height: 44px;
  font-size: 13px;
  padding: 5px 10px;
}
.inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.details {
  white-space: normal;
  max-width: 440px;
  overflow-wrap: anywhere;
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  .context {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .top,
  nav {
    padding: 16px;
  }
  main {
    padding: 20px 16px;
  }
  .pagehead {
    align-items: flex-start;
    flex-direction: column;
  }
  h1 {
    font-size: 24px;
  }
  .panel {
    padding: 16px;
  }
  .filters input {
    width: 100%;
  }
  .filters > div {
    flex: 1;
    min-width: 140px;
  }
  .auth {
    margin: 24px 16px;
  }
  footer {
    padding: 20px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
