:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --border: #d9dee5;
  --text: #17202b;
  --muted: #5b6776;
  --accent: #0f6e8c;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1f6;
  --danger: #b4232a;
  --ok: #1d7a46;
  --warn: #9a6400;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --surface: #161c23;
    --surface-2: #1d252e;
    --border: #2b3540;
    --text: #e3e8ee;
    --muted: #93a0ae;
    --accent: #4fb3d4;
    --accent-ink: #06222c;
    --accent-soft: #15313b;
    --danger: #f0767b;
    --ok: #5cc98b;
    --warn: #e2b04a;
    --shadow: none;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
}

a {
  color: var(--accent);
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: 1.6rem;
}
h2 {
  font-size: 1.2rem;
}
h3 {
  font-size: 1rem;
}

p {
  margin: 0 0 0.75rem;
}

code,
pre,
textarea.code {
  font-family: var(--mono);
  font-size: 13px;
}

/* Layout */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 16px;
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex: 1;
  overflow-x: auto;
}

.site-nav a {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--surface-2);
}

.site-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.page.wide {
  max-width: none;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.page-head p {
  color: var(--muted);
  margin: 0;
}

/* Surfaces */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card + .card {
  margin-top: 16px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.model-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.model-card:hover {
  border-color: var(--accent);
}

.model-card p {
  color: var(--muted);
  margin: 0;
  flex: 1;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge.accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}

.badge.warn {
  color: var(--warn);
}

.section-title {
  margin: 2rem 0 0.75rem;
}

/* Forms and buttons */

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font: inherit;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

button:hover,
.button:hover {
  border-color: var(--accent);
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

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

button.danger {
  color: var(--danger);
}

button.small,
.button.small {
  padding: 2px 8px;
  font-size: 13px;
}

button.link {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  color: var(--muted);
}

label.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
select,
textarea {
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 9px;
  width: 100%;
}

textarea.code {
  min-height: 360px;
  line-height: 1.45;
  tab-size: 4;
  white-space: pre;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.error {
  color: var(--danger);
  font-size: 14px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

/* Tables */

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data th,
table.data td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.data th {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

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

/* Model page */

.model-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.model-layout > aside {
  position: sticky;
  top: 68px;
  max-height: calc(100vh - 84px);
  overflow: auto;
}

@media (max-width: 1000px) {
  .model-layout {
    grid-template-columns: 1fr;
  }
  .model-layout > aside {
    position: static;
    max-height: none;
    order: -1;
  }
}

.bundle-frame {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  display: block;
  min-height: 70vh;
}

.tuning-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tuning-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.tuning-list li:last-child {
  border-bottom: none;
}

.tuning-name {
  font-weight: 600;
  font-size: 14px;
}

/* Generic runner */

.runner {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 800px) {
  .runner {
    grid-template-columns: 1fr;
  }
}

.slider {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  font-size: 13.5px;
  margin-bottom: 10px;
}

.slider input[type='range'] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--accent);
}

.slider output {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.status-line {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--mono);
}

.status-line .ok {
  color: var(--ok);
}

.status-line .bad {
  color: var(--danger);
}

.results td.value {
  font-family: var(--mono);
  white-space: nowrap;
}

pre.log {
  max-height: 320px;
  overflow: auto;
  background: var(--surface-2);
  padding: 10px;
  border-radius: 6px;
  font-size: 12px;
  margin: 0;
}

details > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0;
}

/* Auth */

.auth-box {
  max-width: 400px;
  margin: 48px auto;
}

.hero {
  padding: 28px 0 8px;
}

.hero h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.hero p {
  color: var(--muted);
  max-width: 680px;
  font-size: 16px;
}
/*
  normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
*/

.rw-scaffold *,
.rw-scaffold ::after,
.rw-scaffold ::before {
  box-sizing: inherit;
}
.rw-scaffold main {
  color: #4a5568;
  display: block;
}
.rw-scaffold h1,
.rw-scaffold h2 {
  margin: 0;
}
.rw-scaffold a {
  background-color: transparent;
}
.rw-scaffold ul {
  margin: 0;
  padding: 0;
}
.rw-scaffold input {
  font-family: inherit;
  font-size: 100%;
  overflow: visible;
}
.rw-scaffold input:-ms-input-placeholder {
  color: #a0aec0;
}
.rw-scaffold input::-ms-input-placeholder {
  color: #a0aec0;
}
.rw-scaffold input::placeholder {
  color: #a0aec0;
}
.rw-scaffold table {
  border-collapse: collapse;
}

/*
  Style
*/

.rw-scaffold,
.rw-toast {
  background-color: #fff;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
    'Segoe UI Symbol', 'Noto Color Emoji';
}
.rw-header {
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem 1rem 2rem;
}
.rw-main {
  margin-left: 1rem;
  margin-right: 1rem;
  padding-bottom: 1rem;
}
.rw-segment {
  border-radius: 0.5rem;
  border-width: 1px;
  border-color: #e5e7eb;
  overflow: hidden;
  width: 100%;
  scrollbar-color: #a1a1aa transparent;
}
.rw-segment::-webkit-scrollbar {
  height: initial;
}
.rw-segment::-webkit-scrollbar-track {
  background-color: transparent;
  border-color: #e2e8f0;
  border-style: solid;
  border-radius: 0 0 10px 10px;
  border-width: 1px 0 0 0;
  padding: 2px;
}
.rw-segment::-webkit-scrollbar-thumb {
  background-color: #a1a1aa;
  background-clip: content-box;
  border: 3px solid transparent;
  border-radius: 10px;
}
.rw-segment-header {
  background-color: #e2e8f0;
  color: #4a5568;
  padding: 0.75rem 1rem;
}
.rw-segment-main {
  background-color: #f7fafc;
  padding: 1rem;
}
.rw-link {
  color: #4299e1;
  text-decoration: underline;
}
.rw-link:hover {
  color: #2b6cb0;
}
.rw-forgot-link {
  font-size: 0.75rem;
  color: #a0aec0;
  text-align: right;
  margin-top: 0.1rem;
}
.rw-forgot-link:hover {
  font-size: 0.75rem;
  color: #4299e1;
}
.rw-heading {
  font-weight: 600;
}
.rw-heading.rw-heading-primary {
  font-size: 1.25rem;
}
.rw-heading.rw-heading-secondary {
  font-size: 0.875rem;
}
.rw-heading .rw-link {
  color: #4a5568;
  text-decoration: none;
}
.rw-heading .rw-link:hover {
  color: #1a202c;
  text-decoration: underline;
}
.rw-cell-error {
  font-size: 90%;
  font-weight: 600;
}
.rw-form-wrapper {
  box-sizing: border-box;
  font-size: 0.875rem;
  margin-top: -1rem;
}
.rw-cell-error,
.rw-form-error-wrapper {
  padding: 1rem;
  background-color: #fff5f5;
  color: #c53030;
  border-width: 1px;
  border-color: #feb2b2;
  border-radius: 0.25rem;
  margin: 1rem 0;
}
.rw-form-error-title {
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 600;
}
.rw-form-error-list {
  margin-top: 0.5rem;
  list-style-type: disc;
  list-style-position: inside;
}
.rw-button {
  border: none;
  color: #718096;
  cursor: pointer;
  display: flex;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 1rem;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.025em;
  border-radius: 0.25rem;
  line-height: 2;
  border: 0;
}
.rw-button:hover {
  background-color: #718096;
  color: #fff;
}
.rw-button.rw-button-small {
  font-size: 0.75rem;
  border-radius: 0.125rem;
  padding: 0.25rem 0.5rem;
  line-height: inherit;
}
.rw-button.rw-button-green {
  background-color: #48bb78;
  color: #fff;
}
.rw-button.rw-button-green:hover {
  background-color: #38a169;
  color: #fff;
}
.rw-button.rw-button-blue {
  background-color: #3182ce;
  color: #fff;
}
.rw-button.rw-button-blue:hover {
  background-color: #2b6cb0;
}
.rw-button.rw-button-red {
  background-color: #e53e3e;
  color: #fff;
}
.rw-button.rw-button-red:hover {
  background-color: #c53030;
}
.rw-button-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-right: 0.25rem;
}
.rw-button-group {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0.5rem;
}
.rw-button-group .rw-button {
  margin: 0 0.25rem;
}
.rw-form-wrapper .rw-button-group {
  margin-top: 2rem;
  margin-bottom: 0;
}
.rw-label {
  display: block;
  margin-top: 1.5rem;
  color: #4a5568;
  font-weight: 600;
  text-align: left;
}
.rw-label.rw-label-error {
  color: #c53030;
}
.rw-input {
  display: block;
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.5rem;
  border-width: 1px;
  border-style: solid;
  border-color: #e2e8f0;
  color: #4a5568;
  border-radius: 0.25rem;
  outline: none;
}
.rw-check-radio-item-none {
  color: #4a5568;
}
.rw-check-radio-items {
  display: flex;
  justify-items: center;
}
.rw-input[type='checkbox'] {
  display: inline;
  width: 1rem;
  margin-left: 0;
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}
.rw-input[type='radio'] {
  display: inline;
  width: 1rem;
  margin-left: 0;
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}
.rw-input:focus {
  border-color: #a0aec0;
}
.rw-input-error {
  border-color: #c53030;
  color: #c53030;
}

.rw-input-error:focus {
  outline: none;
  border-color: #c53030;
  box-shadow: 0 0 5px #c53030;
}

.rw-field-error {
  display: block;
  margin-top: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #c53030;
}
.rw-table-wrapper-responsive {
  overflow-x: auto;
}
.rw-table-wrapper-responsive .rw-table {
  min-width: 48rem;
}
.rw-table {
  table-layout: auto;
  width: 100%;
  font-size: 0.875rem;
}
.rw-table th,
.rw-table td {
  padding: 0.75rem;
}
.rw-table td {
  background-color: #ffffff;
  color: #1a202c;
}
.rw-table tr:nth-child(odd) td,
.rw-table tr:nth-child(odd) th {
  background-color: #f7fafc;
}
.rw-table thead tr {
  color: #4a5568;
}
.rw-table th {
  font-weight: 600;
  text-align: left;
}
.rw-table thead th {
  background-color: #e2e8f0;
  text-align: left;
}
.rw-table tbody th {
  text-align: right;
}
@media (min-width: 768px) {
  .rw-table tbody th {
    width: 20%;
  }
}
.rw-table tbody tr {
  border-top-width: 1px;
}
.rw-table input {
  margin-left: 0;
}
.rw-table-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 17px;
  padding-right: 0.25rem;
}
.rw-table-actions .rw-button {
  background-color: transparent;
}
.rw-table-actions .rw-button:hover {
  background-color: #718096;
  color: #fff;
}
.rw-table-actions .rw-button-blue {
  color: #3182ce;
}
.rw-table-actions .rw-button-blue:hover {
  background-color: #3182ce;
  color: #fff;
}
.rw-table-actions .rw-button-red {
  color: #e53e3e;
}
.rw-table-actions .rw-button-red:hover {
  background-color: #e53e3e;
  color: #fff;
}
.rw-text-center {
  text-align: center;
}
.rw-login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24rem;
  margin: 4rem auto;
  flex-wrap: wrap;
}
.rw-login-container .rw-form-wrapper {
  width: 100%;
  text-align: center;
}
.rw-login-link {
  margin-top: 1rem;
  color: #4a5568;
  font-size: 90%;
  text-align: center;
  flex-basis: 100%;
}
.rw-webauthn-wrapper {
  margin: 1.5rem 1rem 1rem;
  line-height: 1.4;
}
.rw-webauthn-wrapper h2 {
  font-size: 150%;
  font-weight: bold;
  margin-bottom: 1rem;
}
