:root {
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: #20323b;
  background: #f5f7f8;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main {
  max-width: 1200px;
  margin: auto;
  padding: 20px 28px;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding-bottom: 6px;
}
h1 {
  font-size: 1.65rem;
  margin: 5px 0;
}
h2 {
  font-size: 1.25rem;
  margin: 20px 0 8px;
}
.eyebrow {
  color: #326572;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.75rem;
  margin: 0;
}
p {
  line-height: 1.5;
  margin: 8px 0;
}
nav {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid #cbd5d9;
  padding-bottom: 10px;
}
button,
select,
input {
  font: inherit;
  border: 1px solid #a8b8bf;
  border-radius: 5px;
  padding: 8px 10px;
  background: white;
  color: inherit;
}
button {
  cursor: pointer;
}
button:hover {
  background: #e9f1f4;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary,
nav button[aria-selected="true"] {
  background: #195f70;
  color: white;
  border-color: #195f70;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #cf963c;
  outline-offset: 2px;
}
.scope,
.hint {
  font-size: 0.85rem;
  color: #52656d;
}
.toolbar,
.fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.toolbar {
  margin-top: 18px;
}
.toolbar label:first-child {
  flex: 1;
  min-width: 230px;
}
label {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  margin: 4px 8px 6px 0;
}
input[type="number"] {
  width: 112px;
}
select {
  max-width: 100%;
}
.fields label {
  min-width: 160px;
}
.result-status {
  border-left: 4px solid #57818c;
  padding: 9px 12px;
  background: #e8f0f2;
  margin-top: 14px;
}
.result-status.stale {
  border-color: #a56619;
  background: #fff2df;
}
.primary-result {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 12px 0;
}
.plots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
figure {
  margin: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid #d7e0e3;
  border-radius: 7px;
}
figcaption {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}
svg {
  width: 100%;
  height: auto;
  display: block;
}
svg text {
  font-family: inherit;
  font-size: 12px;
  fill: #20323b;
}
.table-scroll {
  overflow-x: auto;
  margin: 10px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  background: white;
}
th,
td {
  padding: 9px;
  border: 1px solid #d7e0e3;
  text-align: right;
  white-space: nowrap;
}
th {
  background: #edf2f4;
}
th:first-child,
td:first-child {
  text-align: left;
}
td button {
  min-width: 44px;
  width: 100%;
  border: 0;
  padding: 6px;
}
details {
  margin: 18px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #d7e0e3;
  border-radius: 6px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
pre {
  overflow: auto;
  font-size: 0.78rem;
  max-height: 450px;
}
#error {
  background: #fff0eb;
  border-left: 4px solid #a44427;
  padding: 12px;
}
#trace-plots {
  display: grid;
  gap: 12px;
  margin: 15px 0;
}
progress {
  width: 100%;
  height: 12px;
}
.unavailable {
  background: #eee;
  color: #666;
}
#conditions label {
  display: block;
}
#conditions input {
  margin-right: 8px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  header,
  main {
    padding: 14px;
  }
  header {
    display: block;
  }
  h1 {
    font-size: 1.35rem;
  }
  .plots {
    grid-template-columns: 1fr;
  }
  nav {
    flex-wrap: wrap;
  }
  nav button {
    font-size: 0.85rem;
  }
  th,
  td {
    padding: 6px;
  }
  .toolbar > button {
    flex: 1;
  }
  .fields label {
    min-width: 130px;
  }
  figure {
    padding: 8px;
  }
}
figure {
  min-width: 0;
  overflow: auto;
}
@media (max-width: 700px) {
  svg text {
    font-size: 18px;
  }
  #trace-plots svg {
    min-width: 720px;
  }
}
