@font-face {
  font-family: "Barlow";
  src: url("fonts/Barlow-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fonts/Barlow-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/BarlowCondensed-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  --font-prose: "Barlow", system-ui, sans-serif;
  --font-display: "Barlow Condensed", system-ui, sans-serif;
  --font-technical: ui-monospace, monospace;
  --type-meta: 0.75rem;
  --type-data: 0.8125rem;
  --type-helper: 0.875rem;
  --type-body: 1rem;
  --control-compact: 36px;
  --control: 40px;
  --control-touch: 44px;
  --panel-gap: 16px;
  font-family: var(--font-prose);
  font-size: var(--type-body);
  line-height: 1.5;
  color: #f7f0df;
  background: #1b0b2e;
  font-synthesis: none;
  --canvas: #1b0b2e;
  --surface: #2a173fbd;
  --glass: #2a173fa3;
  --glass-blur: blur(8px);
  --nested: #2a173f47;
  --text: #f7f0df;
  --muted: #b9afba;
  --warning: #f0c9a4;
  --gold: #d4af37;
  --line: #715c45;
  --input: #342047;
  --plot: #301c4447;
  --art-opacity: 0.7544;
  color-scheme: dark;
}
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #e7d29a;
  --surface: #f3e4b7bd;
  --glass: #f3e4b7a3;
  --nested: #f3e4b747;
  --text: #1b0b2e;
  --muted: #5f4c5f;
  --warning: #642e12;
  --gold: #755400;
  --line: #a98220;
  --input: #faedc7;
  --plot: #ead39b47;
  --art-opacity: 0.3432;
  color: var(--text);
  background: var(--canvas);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 0;
}
button,
input,
select {
  font: inherit;
}
button,
select,
input {
  color: var(--text);
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--nested);
  min-height: var(--control);
  font-size: var(--type-helper);
  line-height: 1.4286;
  padding: 8px 12px;
  border-radius: 2px;
}
button:hover:not(:disabled) {
  border-color: var(--gold);
  background: var(--input);
}
button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
button.primary {
  background: #d4af37;
  color: #1b0b2e;
  font-family: var(--font-prose);
  font-size: var(--type-meta);
  line-height: 1.5;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--canvas);
  pointer-events: none;
}
.backdrop:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--art);
  background-size: cover;
  background-position: center;
  opacity: var(--art-opacity);
}
.backdrop:after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--gold) 0.6px, transparent 0.8px);
  background-size: 24px 24px;
  opacity: 0.17;
}
.shell {
  max-width: 1020px;
  margin: auto;
  padding: 0 24px;
}
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 6px;
  gap: 12px;
}
.brand {
  display: contents;
}
.settings-title {
  grid-column: 2;
  grid-row: 1;
  text-align: center;
  max-width: calc(100vw - 176px);
}
.brand img {
  grid-column: 1;
  grid-row: 1;
  object-fit: contain;
}
:root[data-theme="light"] .brand img {
  filter: brightness(0);
}
.brand h1 {
  font-size: 21px;
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: 5px;
  font-weight: 400;
  margin: 0 0 5px;
}
.settings-chevron {
  display: block;
  text-align: center;
  color: var(--gold);
  font-family: var(--font-technical);
  font-size: var(--type-helper);
  line-height: 1;
  flex-shrink: 0;
}
.settings-chevron svg {
  display: block;
  width: 10px;
  height: 10px;
}
:root[data-theme="light"] .brand h1,
:root[data-theme="light"] .settings-chevron {
  color: #000;
}
.connection {
  display: flex;
  min-width: 0;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-technical);
  font-size: var(--type-meta);
  line-height: 1.5;
}
.connection-address {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
nav {
  display: flex;
  gap: 7px;
  align-items: center;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
.settings-title,
.refresh {
  border: 0;
  background: transparent;
  min-height: var(--control-touch);
  padding: 0;
}
.settings-title:hover:not(:disabled),
.refresh:hover:not(:disabled) {
  background: transparent;
  color: var(--gold);
}
:root[data-theme="light"] .refresh,
:root[data-theme="light"] .refresh:hover:not(:disabled) {
  color: #000;
}
.refresh {
  color: var(--gold);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 52px;
  min-height: 52px;
}
.refresh:disabled {
  opacity: 1;
}
.refresh svg {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.spinning {
  animation: spin 1.2s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
main {
  display: grid;
  gap: var(--panel-gap);
  padding: var(--panel-gap) 0 30px;
}
.panel {
  padding: 16px;
  background: var(--surface);
  border: 0.75px solid var(--line);
  border-radius: 2px;
}
.technical {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.technical h2,
.technical h3 {
  font-family: var(--font-prose);
  font-size: var(--type-meta);
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
  overflow-wrap: anywhere;
}
.technical > span {
  height: 1px;
  background: var(--line);
  flex: 1;
  min-width: 12px;
}
.technical button {
  flex-shrink: 0;
}
.workflow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--panel-gap);
}
.workflow > div {
  min-width: 0;
}
.selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 8px 0;
  font-family: var(--font-prose);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.5;
}
.selector > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  min-height: 225px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}
.empty h2 {
  font-size: 1.5rem;
  font-family: var(--font-display);
  line-height: 1.25;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0;
}
.empty p {
  font-family: var(--font-prose);
  font-size: var(--type-meta);
  line-height: 1.5;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 580px;
  margin: 0;
}
.empty small {
  color: var(--muted);
  font-size: 12px;
}
.empty-glyph {
  color: var(--gold);
  font-size: 36px;
  line-height: 1;
}
.charts {
  display: grid;
  gap: var(--panel-gap);
}
.chart-panel {
  padding: 14px 14px 10px;
  min-width: 0;
}
.plot {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
}
.u-over {
  touch-action: pan-y !important;
  background: var(--plot);
  outline: 1px solid var(--line);
}
.u-under {
  background: var(--plot);
}
.u-over {
  background: transparent;
}
.u-select {
  background: #d4af3729 !important;
}
.inspection-rule {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px dashed var(--gold);
  pointer-events: none;
  color: var(--text);
  font-family: var(--font-technical);
  font-size: var(--type-meta);
  line-height: 1.5;
  font-weight: 700;
  white-space: nowrap;
  text-indent: 5px;
  padding-top: 2px;
}
.inspection-rule[data-edge="right"] {
  text-indent: -70px;
}
.inspection-rule[data-edge="center"] {
  text-indent: 5px;
}

.accent {
  color: var(--gold);
}
.small {
  min-height: var(--control-compact);
  padding: 4px 8px;
  font-family: var(--font-prose);
  font-size: var(--type-meta);
  line-height: 1.5;
  background: transparent;
}

.values-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-family: var(--font-technical);
  font-size: var(--type-meta);
  line-height: 1.5;
  color: var(--muted);
}
.values-heading > span:last-child {
  font-family: var(--font-prose);
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: var(--type-helper);
}
th,
td {
  padding: 6px 0;
  font-weight: 400;
}
th {
  text-align: left;
  overflow-wrap: anywhere;
}
td {
  text-align: right;
  font-family: var(--font-technical);
  font-size: var(--type-data);
  line-height: 1.5385;
  white-space: nowrap;
  padding-left: 14px;
}
.swatch {
  display: inline-block;
  width: 5px;
  height: 24px;
  border-radius: 1px;
  vertical-align: middle;
  margin-right: 10px;
}
.best th,
.best td {
  font-weight: bold;
}
.best-mark {
  color: var(--gold);
  font-size: 8px;
  margin-right: 7px;
}
.muted {
  color: var(--muted);
}
.error {
  border-color: #ce9062;
  color: var(--text);
}
.error strong {
  color: #ce9062;
}
.error p {
  font-size: var(--type-helper);
}
.error small {
  font-family: var(--font-prose);
  font-size: var(--type-meta);
  line-height: 1.5;
  color: var(--muted);
}
.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--nested);
  padding: 10px 14px;
  border: 1px solid var(--gold);
  font-family: var(--font-prose);
  font-size: var(--type-meta);
  line-height: 1.5;
}
.notice > span {
  flex: 1;
}
.notice button {
  border: 0;
  font-size: 20px;
  background: none;
}

.chart-panel .run-config {
  display: inline;
  font: inherit;
  line-height: inherit;
  color: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
}
.chart-panel .run-config:hover {
  color: var(--gold);
  background: transparent;
}
.config-dialog {
  width: min(900px, calc(100vw - 24px));
  height: min(760px, 85dvh);
  max-height: 85dvh;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 30px 100px #0008;
}
.config-dialog::backdrop {
  background: #0009;
}
.sheet {
  color: var(--text);
  width: min(640px, calc(100vw - 24px));
  max-height: min(760px, 85dvh);
  padding: 0;
  border: 0.75px solid var(--line);
  border-radius: 6px;
  background: var(--canvas);
  box-shadow: 0 30px 100px #0008;
  overflow: hidden;
}
.sheet.selection-sheet {
  height: min(760px, 85dvh);
}
.sheet::before,
.config-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--art) center/cover;
  opacity: var(--art-opacity);
  z-index: -1;
}
.sheet::backdrop {
  background: #10071c99;
  backdrop-filter: blur(3px);
}
.sheet[open] {
  display: flex;
  flex-direction: column;
}
.sheet-grip {
  display: none;
}
.sheet-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 8px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.sheet:not(.selection-sheet) .sheet-header {
  border-bottom: 0;
}
.sheet:not(.selection-sheet) .sheet-header h2 {
  grid-column: 2;
}
.settings-close {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
}
.sheet-header h2 {
  font-size: 1.25rem;
  font-family: var(--font-display);
  line-height: 1.3;
  font-weight: 400;
  margin: 0;
}
.sheet-header button {
  background: transparent;
  border: 0;
  padding: 8px;
  justify-self: start;
}
.sheet-header button:last-child {
  justify-self: end;
  color: var(--gold);
}
.sheet-tools {
  flex-shrink: 0;
  padding: 12px 16px;
  background: var(--surface);
}
.sheet-tools > input {
  width: 100%;
}
.sheet-tools > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
  font-family: var(--font-prose);
  font-size: var(--type-meta);
  line-height: 1.5;
  color: var(--muted);
}
input[type="search"],
input[type="url"],
select {
  border: 1px solid var(--line);
  background: var(--input);
  border-radius: 2px;
  padding: 8px;
  font-family: var(--font-prose);
  font-size: var(--type-helper);
  line-height: 1.4286;
  min-height: var(--control);
}
input[type="url"],
.run-id {
  font-family: var(--font-technical);
}
input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.selection-list {
  flex: 1;
  overflow: auto;
  padding: 0 12px 20px;
  min-height: 0;
  overscroll-behavior: contain;
}
.selection-row {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  padding: 8px 12px;
  min-height: 40px;
  line-height: 1.4;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.selection-row:hover {
  background: var(--input);
}
input[type="checkbox"] {
  appearance: none;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  border: 1px solid var(--muted);
  border-radius: 3px;
  margin: 0;
  display: grid;
  place-content: center;
  cursor: pointer;
}
input[type="checkbox"]:checked {
  border-color: var(--gold);
  background: var(--gold);
}
input[type="checkbox"]:checked:before {
  content: "✓";
  color: var(--canvas);
  font: bold 15px sans-serif;
}
.selected .metric-name {
  color: var(--gold);
}
.run-description {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.run-description strong {
  font-size: var(--type-body);
  font-weight: 400;
  overflow-wrap: anywhere;
}
.run-description > span {
  font-size: var(--type-helper);
  color: var(--muted);
}
.run-description small {
  font-family: var(--font-prose);
  font-size: var(--type-meta);
  line-height: 1.5;
  color: var(--muted);
}
.run-details {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
}
.run-details > span {
  flex: 1;
  white-space: nowrap;
}
.run-details time {
  white-space: nowrap;
}
.failed {
  color: var(--warning);
}
.running {
  color: var(--gold);
}
.metric-name {
  font-family: var(--font-prose);
  font-size: var(--type-helper);
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.sheet-empty {
  padding: 16px;
  color: var(--muted);
  line-height: 1.7;
}
.settings-footer {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  padding: 8px 20px;
  background: var(--surface);
}
.settings-footer button {
  min-height: 44px;
}
.settings-content {
  min-height: 0;
  overflow: auto;
  padding: 8px 20px;
  background: var(--surface);
}
.settings-content > :first-child {
  margin-top: 4px;
}
.settings-content .connection-row {
  margin-bottom: 4px;
}
.settings-content > label,
.connection-url {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: var(--type-helper);
}

.connection-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.connection-row .connection-url {
  flex: 1 1 400px;
  min-width: 0;
  margin: 0;
}
.connection-url input {
  width: 100%;
  min-width: 0;
}
.connection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}
.connection-actions .default-url {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  padding: 0;
}
.settings-content p {
  overflow-wrap: anywhere;
}
.settings-content select {
  width: 100%;
  min-width: 0;
}
.settings-content p {
  margin: 16px 0;
  font-size: var(--type-helper);
  line-height: 1.5;
}

.selection-sheet {
  font-family: var(--font-prose);
  border-radius: 8px;
  background: var(--canvas);
}
.sheet-header,
.sheet-tools,
.settings-content,
.settings-footer,
.selection-sheet .selection-row {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.selection-sheet .sheet-header,
.selection-sheet .sheet-tools {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.selection-sheet .sheet-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.selection-sheet .sheet-header button,
.selection-sheet .small {
  border-radius: 6px;
}
.selection-sheet .selection-row {
  border: 1px solid transparent;
  border-radius: 6px;
  margin: 4px 0;
  background: var(--glass);
}
.selection-sheet .selection-row.selected {
  background: color-mix(in srgb, var(--gold) 12%, var(--glass));
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
}
.selection-sheet .selection-row:hover {
  border-color: var(--line);
}
.selection-sheet .selection-row:hover:not(.selected) {
  background: color-mix(in srgb, var(--gold) 6%, var(--glass));
}
.selection-sheet .run-description strong {
  font-size: var(--type-helper);
  font-weight: 500;
}
.search-field {
  display: block;
  position: relative;
}
.search-field svg {
  position: absolute;
  width: 18px;
  height: 18px;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-field input {
  width: 100%;
  border-radius: 6px;
  padding-left: 38px;
  font-family: inherit;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1024px) {
  .backdrop::before,
  .sheet::before,
  .config-dialog::before {
    background-image: var(--art-desktop, var(--art));
  }
}

@media (max-width: 600px) {
  .shell {
    padding: 0 12px;
  }
  .masthead {
    padding: 12px 0 4px;
  }
  .brand h1 {
    font-size: 17px;
    letter-spacing: 3px;
  }
  .brand img {
    width: 40px;
    height: 40px;
  }

  nav {
    gap: 0;
  }
  .workflow {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }
  .chart-panel {
    padding: 12px 8px;
  }
  .sheet {
    margin: auto;
    width: calc(100% - 16px);
    max-width: none;
    max-height: calc(100dvh - 24px);
  }
  .sheet.selection-sheet {
    height: calc(100dvh - 24px);
  }
  .selection-row {
    min-height: 48px;
    padding: 12px;
  }
  button {
    min-height: 44px;
  }
  .small,
  input[type="url"],
  input[type="search"],
  select {
    min-height: 44px;
  }

  input[type="search"],
  input[type="url"],
  select {
    font-size: var(--type-body);
    line-height: 1.5;
  }
  .settings-content {
    padding: 8px 16px;
  }
  .settings-content > label {
    font-size: var(--type-body);
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 6px;
  }
  .connection-url {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .settings-content select {
    max-width: 100%;
    width: 100%;
  }
  .empty {
    min-height: 205px;
  }

  .step-control {
    gap: 8px;
  }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :root,
  :root[data-theme="light"] {
    --glass: var(--input);
    --glass-blur: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.auth-page {color:var(--text);background:transparent}
.auth-page .shell {min-height:100dvh;display:grid;grid-template-rows:auto 1fr}
.auth-page main {align-content:center;justify-items:center;padding:24px 0 64px}
.auth-card {width:min(100%,24rem);padding:24px;background:var(--glass);-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);border-radius:8px}
.auth-card h2 {font-family:var(--font-display);font-size:1.5rem;line-height:1.25;font-weight:400;margin:0}
.auth-card #help {font-size:var(--type-helper);color:var(--muted);margin:8px 0 20px}
.auth-card form {display:grid;gap:16px}
.auth-card label {display:grid;gap:6px;font-size:var(--type-helper)}
.auth-card input {width:100%;min-height:44px;padding:10px 12px;font-size:1rem;line-height:1.5;border:1px solid var(--line);border-radius:2px;background:var(--input);color:var(--text)}
.auth-card button {min-height:44px}
.auth-card [role=alert] {min-height:1.5em;margin:0;color:var(--warning);font-size:var(--type-helper);overflow-wrap:anywhere}
@media(max-width:600px) {.auth-card{padding:20px}.auth-page main{padding:20px 0 40px}}
