/*
  vibeties.ai admin. VibeRails are the rails; this console is the ties that hold them in place.
  The palette comes from track materials: creosote timber, rail steel, ballast stone and a
  signal amber that only ever marks focus or the current page. Bootstrap 5.3 does the layout;
  this file remaps its tokens and adds the few pieces it lacks.
  No inline styles anywhere: the Content-Security-Policy blocks them.
*/

@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root,
[data-bs-theme="light"] {
  --vt-font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --vt-font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;

  --vt-ballast: #edeeea;
  --vt-surface: #ffffff;
  --vt-field: #ffffff;
  --vt-line: #d3d6d0;
  --vt-ink: #1f2328;
  --vt-muted: #5b626b;
  --vt-steel: #2f5f80;
  --vt-steel-strong: #264e6a;
  --vt-signal: #b7791f;
  --vt-creosote: #2b211b;
  --vt-creosote-ink: #ece5dc;
  --vt-tie: #7a5a40;
  --vt-rail: #a9bccb;
  --vt-signal-lamp: #e9a23b;
  --vt-ok: #2f7a4b;
  --vt-ok-wash: #e3f1e7;
  --vt-bad: #b3261e;
  --vt-bad-wash: #f9e3e1;
  --vt-warn: #8a5a12;
  --vt-warn-wash: #f8ecd6;
  --vt-mono: "Cascadia Mono", Consolas, Menlo, "Liberation Mono", monospace;

  --bs-body-font-family: var(--vt-font);
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.5;
  --bs-body-bg: var(--vt-ballast);
  --bs-body-color: var(--vt-ink);
  --bs-secondary-color: var(--vt-muted);
  --bs-border-color: var(--vt-line);
  --bs-link-color: var(--vt-steel);
  --bs-link-color-rgb: 47, 95, 128;
  --bs-link-hover-color: var(--vt-steel-strong);
  --bs-link-hover-color-rgb: 38, 78, 106;
  --bs-heading-color: var(--vt-ink);
}

[data-bs-theme="dark"] {
  --vt-ballast: #1c1916;
  --vt-surface: #25211d;
  --vt-field: #1c1916;
  --vt-line: #3d3630;
  --vt-ink: #ece7e1;
  --vt-muted: #a99f95;
  --vt-steel: #8cc0e3;
  --vt-steel-strong: #b3d6ee;
  --vt-signal: #f0b04e;
  --vt-creosote: #14110e;
  --vt-creosote-ink: #ece5dc;
  --vt-tie: #6a4e38;
  --vt-rail: #8fa3b3;
  --vt-signal-lamp: #f0b04e;
  --vt-ok: #7fcf98;
  --vt-ok-wash: #1f3326;
  --vt-bad: #f2867d;
  --vt-bad-wash: #3d2220;
  --vt-warn: #f0b04e;
  --vt-warn-wash: #3a2c17;

  --bs-body-bg: var(--vt-ballast);
  --bs-body-color: var(--vt-ink);
  --bs-secondary-color: var(--vt-muted);
  --bs-border-color: var(--vt-line);
  --bs-link-color: var(--vt-steel);
  --bs-link-color-rgb: 140, 192, 227;
  --bs-link-hover-color: var(--vt-steel-strong);
  --bs-link-hover-color-rgb: 179, 214, 238;
  --bs-heading-color: var(--vt-ink);
}

body {
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--vt-font-display);
  font-weight: 600;
  line-height: 1.15;
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.5rem;
}

.vt-lead {
  color: var(--vt-muted);
  font-size: 1.125rem;
  max-width: 40rem;
}

.vt-numeric {
  font-variant-numeric: tabular-nums;
}

/* Buttons: rail steel for the main action. */
.btn-primary {
  --bs-btn-bg: #2f5f80;
  --bs-btn-border-color: #2f5f80;
  --bs-btn-hover-bg: #264e6a;
  --bs-btn-hover-border-color: #264e6a;
  --bs-btn-active-bg: #1f4058;
  --bs-btn-active-border-color: #1f4058;
  --bs-btn-disabled-bg: #2f5f80;
  --bs-btn-disabled-border-color: #2f5f80;
  font-weight: 600;
}

[data-bs-theme="dark"] .btn-primary {
  --bs-btn-bg: #3b79a3;
  --bs-btn-border-color: #3b79a3;
  --bs-btn-hover-bg: #4688b5;
  --bs-btn-hover-border-color: #4688b5;
  --bs-btn-active-bg: #2f6688;
  --bs-btn-active-border-color: #2f6688;
}

/* Keyboard focus is signal amber everywhere. */
.btn:focus-visible,
.form-control:focus,
.form-check-input:focus,
.nav-link:focus-visible,
.dropdown-item:focus-visible,
a:focus-visible {
  outline: 3px solid var(--vt-signal);
  outline-offset: 2px;
  box-shadow: none;
}

.form-control:focus {
  border-color: var(--vt-signal);
}

.form-control,
.form-control:focus {
  background-color: var(--vt-field);
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.375rem;
}

/* Server-side validation output from the Razor tag helpers. */
.validation-summary-valid {
  display: none;
}

.validation-summary-errors ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.input-validation-error {
  border-color: var(--bs-form-invalid-border-color);
}

.vt-narrow {
  max-width: 32rem;
}

/* Signed-in shell */
.vt-nav {
  background: #2b211b;
  --bs-navbar-padding-y: 0;
}

:root[data-bs-theme="dark"] .vt-nav {
  background: #14110e;
}

.vt-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--vt-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--vt-creosote-ink);
}

.vt-brand:hover,
.vt-brand:focus {
  color: #ffffff;
}

.vt-nav .nav-link {
  color: rgba(236, 229, 220, 0.78);
  font-weight: 500;
  padding-block: 1.125rem 0.9375rem;
  border-bottom: 3px solid transparent;
}

.vt-nav .nav-link:hover {
  color: #ffffff;
}

.vt-nav .nav-link.active {
  color: #ffffff;
  border-bottom-color: var(--vt-signal-lamp);
}

.vt-env {
  align-self: center;
  border: 1px solid var(--vt-signal-lamp);
  border-radius: 999px;
  color: var(--vt-signal-lamp);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.0625rem 0.625rem;
}

.vt-page {
  padding-block: 2.5rem 4rem;
}

.vt-footer {
  border-top: 1px solid var(--vt-line);
  color: var(--vt-muted);
  font-size: 0.8125rem;
  padding-block: 1rem 2rem;
}

.vt-footer code {
  color: inherit;
  font-family: var(--vt-mono);
}

.vt-account-name {
  display: inline-block;
  max-width: min(20vw, 10rem);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

/* App launcher: the catalog can grow without adding more navigation links. */
.vt-apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}

.vt-app {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  background: var(--vt-surface);
  border: 1px solid var(--vt-line);
  border-radius: 0.75rem;
  color: var(--vt-ink);
  padding: 1.25rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.vt-app-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Author display rules must not override the hidden attribute used by search and edit mode. */
.vt-app-item[hidden],
.vt-app-controls[hidden] {
  display: none;
}

.vt-app-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.vt-app-controls .btn {
  min-height: 2.75rem;
  padding-inline: 0.25rem;
}

.vt-app-drag { cursor: grab; }
.vt-app-drag:active { cursor: grabbing; }
.is-reordering .vt-app { cursor: default; }
.vt-app-item.is-dragging { opacity: 0.5; }
.vt-app-item.is-drop-target .vt-app {
  outline: 3px solid var(--vt-steel);
  outline-offset: 2px;
}

a.vt-app:hover {
  border-color: var(--vt-steel);
  color: var(--vt-ink);
}

.vt-app img {
  margin-bottom: 1rem;
  border-radius: 0.75rem;
}

.vt-app h2 {
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
}

.vt-app p {
  color: var(--vt-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.vt-app-action {
  color: var(--vt-steel);
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: auto;
}

.vt-app.is-coming-soon .vt-app-action {
  color: var(--vt-muted);
}

@media (min-width: 768px) {
  .vt-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .vt-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.vt-panel {
  background: var(--vt-surface);
  border: 1px solid var(--vt-line);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.vt-panel > :last-child {
  margin-bottom: 0;
}

.vt-table {
  --bs-table-bg: var(--vt-surface);
  margin-bottom: 0;
}

.vt-table th {
  color: var(--vt-muted);
  font-weight: 500;
  white-space: nowrap;
}

.vt-table td.vt-numeric {
  white-space: nowrap;
}

.vt-table td,
.vt-table th {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.vt-table-wrap {
  border: 1px solid var(--vt-line);
  border-radius: 0.5rem;
  overflow-x: auto;
  /* Contain visually hidden column labels, so a wide table scrolls here, never the page. */
  position: relative;
}

.vt-table-wrap .vt-table tr:last-child td {
  border-bottom: 0;
}

.vt-you {
  color: var(--vt-muted);
  font-size: 0.875rem;
  margin-left: 0.375rem;
}

/* Collected data */
.vt-muted {
  color: var(--vt-muted);
}

.vt-error {
  color: var(--vt-bad);
  margin: 0;
}

.vt-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  color: var(--vt-muted);
}

.vt-sources > .vt-pill {
  margin-right: 1rem;
}

.vt-pill {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 0.0625rem 0.625rem;
  white-space: nowrap;
}

.vt-pill.is-ok {
  background: var(--vt-ok-wash);
  color: var(--vt-ok);
}

.vt-pill.is-warn {
  background: var(--vt-warn-wash);
  color: var(--vt-warn);
}

.vt-pill.is-bad {
  background: var(--vt-bad-wash);
  color: var(--vt-bad);
}

.vt-pill.is-off {
  background: var(--vt-ballast);
  border: 1px solid var(--vt-line);
  color: var(--vt-muted);
}

.vt-storage-switch { display: flex; flex-wrap: wrap; width: fit-content; gap: .25rem; padding: .3rem; border: 1px solid var(--vt-line); border-radius: .6rem; background: var(--vt-ballast); margin-bottom: 1.5rem; }
.vt-storage-switch a { padding: .5rem 1rem; border-radius: .35rem; color: var(--vt-muted); text-decoration: none; font-weight: 600; }
.vt-storage-switch a[aria-current="page"] { background: var(--vt-surface); color: var(--vt-ink); box-shadow: 0 1px 3px #0001; }
.vt-storage-switch a:hover { color: var(--vt-steel); }
.vt-storage-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.vt-storage-heading .vt-lead { margin-bottom: 0; max-width: 42rem; }
.vt-storage-heading button { flex-shrink: 0; }
.vt-eyebrow { color: var(--vt-muted); font-size: .75rem; font-weight: 600; letter-spacing: .12em; margin-bottom: .5rem; }
.vt-storage-summary { display: grid; grid-template-columns: 1.3fr 1fr 1fr; background: var(--vt-creosote); color: var(--vt-creosote-ink); border-radius: .7rem; padding: 1.8rem; gap: 1.5rem; }
.vt-storage-summary > div { display: flex; flex-direction: column; gap: .3rem; }
.vt-storage-summary .vt-stat-label, .vt-storage-summary > div > span:last-child { color: var(--vt-creosote-ink); opacity: .8; }
.vt-storage-summary strong { font: 600 2.8rem/1.1 var(--vt-font-display); }
.vt-storage-summary .vt-storage-updated { font-size: 1.6rem; padding-top: .4rem; }
.vt-storage-summary > div > span:last-child { font-size: .85rem; }
.vt-storage-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1.5rem; border-top: 1px solid var(--vt-line); padding: 1.1rem 0; }
.vt-storage-name { font-size: 1.1rem; font-weight: 600; }
button.vt-storage-name { background: none; border: 0; padding: 0; color: var(--vt-steel); text-align: left; }
button.vt-storage-name:hover { text-decoration: underline; }
.vt-storage-caption { display: block; color: var(--vt-muted); font-size: .85rem; }
.vt-storage-size { text-align: right; font-variant-numeric: tabular-nums; }
.vt-storage-size strong { font-size: 1.2rem; }
.vt-storage-meter { grid-column: 1 / -1; width: 100%; height: .65rem; border: 0; background: var(--vt-ballast); border-radius: 1rem; }
.vt-storage-meter::-webkit-meter-bar { background: var(--vt-ballast); border: 0; }
.vt-storage-meter::-webkit-meter-optimum-value { background: var(--vt-steel); }
.vt-storage-meter::-moz-meter-bar { background: var(--vt-steel); }
.vt-storage-source { color: var(--vt-muted); font-size: .75rem; }
.vt-storage-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.vt-storage-links a { display: flex; flex-direction: column; padding: 1rem; border: 1px solid var(--vt-line); border-radius: .5rem; background: var(--vt-surface); text-decoration: none; }
.vt-storage-links span { font-size: .85rem; color: var(--vt-muted); margin-top: .25rem; }
.vt-storage-details-title { font-size: 1.1rem; font-weight: 600; }
.vt-storage-details-title .vt-pill { margin-left: .75rem; }
details[open] > .vt-storage-details-title { margin-bottom: 1.5rem; }
.vt-explorer-filter { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin: 1rem 0; }
.vt-explorer-filter label { display: block; font-size: .85rem; margin-bottom: .25rem; }
.vt-explorer-filter > div:nth-child(2) { flex: 1; min-width: 12rem; }
.vt-explorer-breadcrumbs { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .75rem 0; }
.vt-explorer-name { min-width: 15rem; max-width: 32rem; overflow-wrap: anywhere; }
.vt-file-details { border-top: 1px solid var(--vt-line); margin-top: 1.5rem; padding-top: 1.5rem; }
.vt-file-preview { background: var(--vt-ballast); border: 1px solid var(--vt-line); padding: 1rem; max-height: 24rem; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .vt-storage-heading { align-items: flex-start; flex-direction: column; }
  .vt-storage-summary { grid-template-columns: 1fr; padding: 1.25rem; }
  .vt-storage-summary > div + div { border-top: 1px solid var(--vt-tie); padding-top: 1rem; }
  .vt-storage-links { grid-template-columns: 1fr; }
  .vt-storage-row { gap: .5rem; }
  .vt-storage-details-title .vt-pill { display: block; width: fit-content; margin: .5rem 0 0; }
}

.vt-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.vt-usage-heading, .vt-usage-results-head, .vt-usage-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.vt-usage-heading h1 { margin-bottom: 0; }
.vt-usage-account { margin: .75rem 0 0; overflow-wrap: anywhere; font-size: 1.15rem; }
.vt-usage .vt-usage-filters { margin-top: 1rem; gap: .65rem .75rem; }
.vt-usage-filters > div { min-width: 0; }
.vt-usage-filters .form-select { min-width: 0; }
.vt-usage-filters input[list] { width: 12rem; }
.vt-usage-dates { display: flex; gap: .35rem; }
.vt-usage-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem 1.25rem;
  margin: 1rem 0;
  padding: .65rem .85rem;
  border: 1px solid var(--vt-line);
  border-radius: .5rem;
  color: var(--vt-muted);
  font-size: .85rem;
}
.vt-usage-summary > span:first-child { color: var(--vt-ink); font-weight: 600; }
.vt-usage-token-details { flex: 1 1 12rem; }
.vt-usage-token-details summary { cursor: pointer; }
.vt-usage-token-details p { margin: .5rem 0 0; }
.vt-usage-results-head { margin: .75rem 0; }
.vt-usage-results-head h2 { margin: 0; font-size: 1.1rem; }
.vt-usage-results-head > span { font-size: .85rem; }
.vt-usage-table td, .vt-usage-table th { padding: .6rem .85rem; font-size: .9rem; }
.vt-usage-table td:first-child { min-width: 15rem; }
.vt-usage-user { font-weight: 500; overflow-wrap: anywhere; }
.vt-usage-call { border: 0; padding: 0; color: var(--bs-link-color); background: transparent; text-align: left; font-weight: 500; overflow-wrap: anywhere; }
.vt-usage-call:hover { text-decoration: underline; }
.vt-usage-dialog {
  width: min(54rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 1.25rem;
  border: 1px solid var(--vt-line);
  border-radius: .65rem;
  color: var(--vt-ink);
  background: var(--vt-surface);
  overflow: auto;
}
.vt-usage-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.vt-usage-detail-head { margin-bottom: 1rem; }
.vt-usage-detail-head h2 { margin: 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.vt-usage-dialog h3 { margin-top: 1.25rem; font-size: 1rem; }
.vt-usage-payload { white-space: pre-wrap; overflow-wrap: anywhere; padding: .85rem; border: 1px solid var(--vt-line); border-radius: .35rem; max-height: 32rem; overflow: auto; font-family: var(--vt-mono); tab-size: 2; }
.vt-json-key { color: var(--vt-steel); }
.vt-json-string { color: var(--vt-ok); }
.vt-json-number { color: var(--vt-warn); }
.vt-json-literal { color: var(--vt-muted); }
@media (max-width: 575.98px) {
  .vt-usage-filters > div { flex: 1 1 calc(50% - .75rem); }
  .vt-usage-filters #usage-search-field { flex-basis: 100%; }
  .vt-usage-filters input, .vt-usage-filters input[list] { width: 100%; }
  .vt-usage-filters .vt-filter-actions { flex: 0 1 auto; }
  .vt-usage-results-head { align-items: baseline; flex-wrap: wrap; gap: .25rem; }
}

.vt-stat {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  background: var(--vt-surface);
  border: 1px solid var(--vt-line);
  border-top: 3px solid var(--vt-tie);
  border-radius: 0.5rem;
  color: inherit;
  padding: 1rem 1.25rem;
  text-decoration: none;
}

a.vt-stat:hover {
  border-top-color: var(--vt-signal);
  color: inherit;
}

.vt-stat-label {
  color: var(--vt-muted);
  font-weight: 500;
}

.vt-stat-value {
  font-family: var(--vt-font-display);
  font-size: 2.25rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.1;
}

.vt-stat-detail {
  color: var(--vt-muted);
  font-size: 0.875rem;
}

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

.vt-health li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--vt-line);
  padding: 0.5rem 0;
}

.vt-health li:first-child {
  border-top: 0;
}

.vt-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.vt-panel-head h2 {
  margin: 0;
}

.vt-panel-actions {
  display: flex;
  gap: 0.5rem;
}

.vt-subhead {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

.vt-table td.vt-empty {
  color: var(--vt-muted);
  text-align: center;
}

.vt-table td.vt-snippet {
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vt-table td.vt-path {
  font-family: var(--vt-mono);
  font-size: 0.8125rem;
  word-break: break-all;
}

.vt-narrow-table {
  max-width: 40rem;
}

.vt-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
}

.vt-filters .form-label {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.vt-filters .form-select {
  min-width: 11rem;
}

.vt-filter-grow {
  flex: 1 1 14rem;
}

.vt-filter-actions {
  display: flex;
  gap: 0.25rem;
}

.vt-pager {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.vt-pager:empty {
  display: none;
}

.vt-pager-label {
  color: var(--vt-muted);
  font-size: 0.875rem;
}

.vt-visit-filters {
  align-items: end;
}

.vt-visit-filters > div {
  flex: 1 1 10rem;
  min-width: 0;
}

.vt-visit-filters .form-select {
  min-width: 0;
}

.vt-visit-filters .vt-filter-actions {
  flex: 0 0 auto;
  gap: 0.5rem;
}

#visits-pager, .vt-visit-page-links, .vt-visit-page-jump {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#visits-pager {
  justify-content: space-between;
}

#visits-pager:empty {
  display: none;
}

.vt-visit-page-jump input {
  width: 5rem;
}

.vt-back {
  margin-bottom: 0.5rem;
}

.vt-back a::before {
  content: "\2190\00a0";
}

.vt-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.375rem 1.5rem;
  margin: 1rem 0 0;
}

.vt-facts dt {
  color: var(--vt-muted);
  font-weight: 500;
}

.vt-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.vt-user-details[open] {
  min-width: 24rem;
}

.vt-user-details summary {
  white-space: nowrap;
}

.vt-user-details .vt-facts {
  grid-template-columns: max-content minmax(0, 1fr);
}

.vt-user-details .vt-facts dd {
  margin-bottom: 0;
}

.vt-checks,
.vt-problems {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.vt-checks li {
  display: grid;
  grid-template-columns: 1.5rem 10rem minmax(0, 1fr);
  gap: 0.5rem;
  border-top: 1px solid var(--vt-line);
  padding: 0.5rem 0;
}

.vt-checks li:first-child {
  border-top: 0;
}

.vt-checks li.vt-muted {
  display: block;
}

.vt-checks li.is-ok::before,
.vt-checks li.is-bad::before {
  font-weight: 700;
  text-align: center;
}

.vt-checks li.is-ok::before {
  content: "\2713";
  color: var(--vt-ok);
}

.vt-checks li.is-bad::before {
  content: "\2715";
  color: var(--vt-bad);
}

.vt-checks li > span {
  overflow-wrap: anywhere;
}

.vt-problems li {
  color: var(--vt-bad);
  font-size: 0.875rem;
  padding: 0.125rem 0;
}

.vt-progress {
  width: 100%;
  height: 0.5rem;
  margin-top: 1rem;
  accent-color: var(--vt-steel);
}

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

.vt-prompt {
  background: var(--vt-surface);
  border: 1px solid var(--vt-line);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.875rem 1.125rem;
}

.vt-prompt-meta {
  color: var(--vt-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.vt-prompt-text,
.vt-prose {
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.vt-changes {
  margin-top: 0.75rem;
}

.vt-changes summary,
.vt-transcript summary {
  color: var(--vt-steel);
  cursor: pointer;
  font-weight: 500;
}

.vt-change {
  margin-top: 0.75rem;
  overflow-wrap: anywhere;
}

.vt-change code {
  font-size: 0.875rem;
}

.vt-diff,
.vt-transcript pre {
  background: var(--vt-ballast);
  border: 1px solid var(--vt-line);
  border-radius: 0.375rem;
  font-family: var(--vt-mono);
  font-size: 0.8125rem;
  margin: 0.375rem 0 0;
  max-height: 28rem;
  overflow: auto;
  padding: 0.625rem 0.75rem;
  white-space: pre;
}

.vt-transcript pre {
  white-space: pre-wrap;
}

.vt-diff-add {
  color: var(--vt-ok);
}

.vt-diff-del {
  color: var(--vt-bad);
}

.vt-diff-hunk {
  color: var(--vt-steel);
}

.vt-diff-meta {
  color: var(--vt-muted);
}

/* API keys: a new key stands out until the admin hides it. */
.vt-key-reveal {
  border-color: var(--vt-signal);
  border-left-width: 4px;
}

.vt-secret {
  font-family: var(--vt-mono);
  font-size: 0.875rem;
  resize: none;
  word-break: break-all;
}

.vt-key-meta {
  color: var(--vt-muted);
  font-size: 0.875rem;
}

/* Feature flags: keys read like the code that asks for them; the flag being edited stands out. */
.vt-flag-key {
  font-family: var(--vt-mono);
  font-size: 0.875rem;
}

.vt-flag-edit {
  border-color: var(--vt-steel);
  border-left-width: 4px;
}

.vt-table td.vt-wrap {
  min-width: 14rem;
  overflow-wrap: anywhere;
}

.vt-table td.vt-actions {
  white-space: nowrap;
}

.vt-actions .btn + .btn {
  margin-left: 0.375rem;
}

/* Terminal replay: a full-window dialog with the recording's own dark palette. */
body.vt-modal-open {
  overflow: hidden;
}

.vt-replay-modal,
.vt-replay-page {
  --replay-bg: #14110e;
  --replay-bar: #25211d;
  --replay-button: #332c26;
  --replay-line: #4a3f36;
  --replay-ink: #ece5dc;
  --replay-muted: #a99f95;
  background: var(--replay-bg);
  color: var(--replay-ink);
}

.vt-replay-page {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 13rem);
  min-height: 24rem;
}

.vt-replay-page h1 {
  font-size: 1.125rem;
  margin: 0;
  color: inherit;
}

.vt-replay-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: none;
  flex-direction: column;
  background: var(--replay-bg);
  color: var(--replay-ink);
}

.vt-replay-modal.is-open {
  display: flex;
}

.vt-replay-head {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--replay-bar);
  border-bottom: 1px solid var(--replay-line);
  padding: 0.5rem 0.875rem;
}

.vt-replay-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 0.875rem;
}

.vt-replay-id span {
  color: var(--replay-muted);
}

.vt-replay-tools {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
}

.vt-replay-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.vibe-replay {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  height: 0;
}

.vibe-replay-toolbar {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  background: var(--replay-bar);
  border-bottom: 1px solid var(--replay-line);
  padding: 0.375rem 0.625rem;
}

.vibe-replay-btn,
.vibe-replay-speed {
  height: 1.75rem;
  min-width: 2.125rem;
  background: var(--replay-button);
  border: 1px solid var(--replay-line);
  border-radius: 0.25rem;
  color: var(--replay-ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
}

.vibe-replay-btn:hover:not(:disabled) {
  border-color: var(--vt-signal-lamp);
  color: var(--vt-signal-lamp);
}

.vibe-replay-btn:focus-visible,
.vibe-replay-speed:focus-visible,
.vibe-replay-seek:focus-visible {
  outline: 3px solid var(--vt-signal-lamp);
  outline-offset: 1px;
}

.vibe-replay-btn:disabled {
  cursor: default;
  opacity: 0.4;
}

.vibe-replay-play {
  color: var(--vt-signal-lamp);
}

.vibe-replay-speed {
  font-family: var(--vt-mono);
  font-size: 0.78rem;
  padding: 0 0.375rem;
}

.vibe-replay-seek {
  flex: 1 1 10rem;
  min-width: 7.5rem;
  accent-color: var(--vt-signal-lamp);
}

.vibe-replay-clock,
.vibe-replay-progress {
  color: var(--replay-muted);
  font-family: var(--vt-mono);
  font-size: 0.75rem;
  white-space: nowrap;
}

.vibe-replay-progress {
  margin-left: auto;
}

.vibe-replay-alt {
  background: #5a3e8e;
  border-radius: 0.25rem;
  color: #e0d0ff;
  font-family: var(--vt-mono);
  font-size: 0.65rem;
  padding: 0.125rem 0.375rem;
}

.vibe-replay-screen {
  flex: 1 1 auto;
  min-height: 0;
  height: 0;
  overflow: hidden;
  background: var(--replay-bg);
  padding: 0.5rem;
}

.vibe-replay-screen.is-manual {
  overflow: auto;
}

.vibe-replay-term {
  width: 100%;
  height: 100%;
}

/* xterm measures cells itself. Stretching .xterm-screen or using border-box on its descendants
   stacks rows on top of each other, so Bootstrap's global border-box is undone here. */
.vibe-replay .xterm,
.vibe-replay .xterm * {
  box-sizing: content-box;
}

.vibe-replay .xterm {
  line-height: normal;
  font-variant-ligatures: none;
}

.vibe-replay .xterm .xterm-viewport {
  background-color: transparent !important;
}

.vibe-replay-message {
  color: var(--replay-muted);
  font-family: var(--vt-mono);
  padding: 0.75rem;
}

@media (max-width: 575.98px) {
  .vt-checks li {
    grid-template-columns: 1.5rem minmax(0, 1fr);
  }

  .vt-checks li > span {
    grid-column: 2;
  }

  .vt-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .vt-facts dd {
    margin-bottom: 0.5rem;
  }

  .vt-replay-head {
    flex-wrap: wrap;
  }

  /* A flag's three actions stack, so the row fits the screen instead of scrolling. */
  .vt-table td.vt-actions {
    white-space: normal;
  }

  .vt-actions .btn {
    display: block;
    width: 100%;
  }

  .vt-actions .btn + .btn {
    margin: 0.25rem 0 0;
  }
}

/* Sign-in: a stretch of track seen from above, with the name set alongside it. */
.vt-login {
  display: grid;
  grid-template-columns: minmax(16rem, 30%) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

.vt-login-panel {
  display: flex;
  gap: 2rem;
  overflow: hidden;
  padding-inline: clamp(1.5rem, 3vw, 3rem);
  background: var(--vt-creosote);
  color: var(--vt-creosote-ink);
}

.vt-track {
  flex: none;
  align-self: stretch;
  width: 6rem;
  background-image:
    linear-gradient(to right,
      transparent 1.375rem, var(--vt-rail) 1.375rem 1.5625rem,
      transparent 1.5625rem 4.4375rem, var(--vt-rail) 4.4375rem 4.625rem,
      transparent 4.625rem),
    repeating-linear-gradient(to bottom, var(--vt-tie) 0 0.875rem, transparent 0.875rem 2.25rem);
  animation: vt-arrive 1.4s cubic-bezier(0.16, 0.8, 0.24, 1) both;
}

@keyframes vt-arrive {
  from {
    background-position: 0 0, 0 -9rem;
  }

  to {
    background-position: 0 0, 0 0;
  }
}

.vt-wordmark {
  align-self: flex-end;
  margin: 0;
  padding-inline: 2.5rem;
  font-family: var(--vt-font-display);
  font-size: clamp(3.5rem, min(8vw, 12vh), 7.5rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 0.9;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.vt-login-main {
  display: flex;
  align-items: center;
  padding: 3rem clamp(1.5rem, 7vw, 7rem);
}

.vt-login-form {
  width: 100%;
  max-width: 24rem;
}

.vt-login-form h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.vt-login-note {
  color: var(--vt-muted);
  margin-top: 2rem;
}

@media (max-width: 767.98px) {
  .vt-login {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .vt-login-panel {
    flex-direction: column;
    gap: 0;
    padding: 1.25rem 0 0;
  }

  .vt-wordmark {
    order: -1;
    align-self: flex-start;
    padding: 0 1.5rem 1rem;
    font-size: 2.5rem;
    writing-mode: horizontal-tb;
    transform: none;
  }

  .vt-track {
    width: auto;
    height: 3rem;
    background-image:
      linear-gradient(to bottom,
        transparent 0.75rem, var(--vt-rail) 0.75rem 0.9375rem,
        transparent 0.9375rem 2.0625rem, var(--vt-rail) 2.0625rem 2.25rem,
        transparent 2.25rem),
      repeating-linear-gradient(to right, var(--vt-tie) 0 0.75rem, transparent 0.75rem 2rem);
    animation-name: vt-arrive-across;
  }

  .vt-login-main {
    align-items: flex-start;
    padding-block: 2rem 3rem;
  }
}

@keyframes vt-arrive-across {
  from {
    background-position: 0 0, -8rem 0;
  }

  to {
    background-position: 0 0, 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vt-track {
    animation: none;
  }
}
/* The recording can paint only inside this non-interactive, script-disabled surface. */
/* Homepage recording player: the recorded page is drawn inside its own frame, which fills the
   replay screen and scales the recording to fit. */
.rr-screen {
  padding: 0;
}

.rr-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.vt-visits {
  margin-top: 2rem;
}

.vt-visits .vt-table td {
  padding-block: 1rem;
  vertical-align: middle;
}

.vt-ip-filter summary {
  color: var(--bs-link-color);
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}

.vt-ip-filter .btn {
  white-space: nowrap;
}

.vt-errors-list { display: grid; gap: 1rem; }
.vt-error-card { padding: 1.25rem; border: 1px solid var(--bs-border-color); border-radius: .5rem; min-width: 0; }
.vt-error-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-bottom: .75rem; }
.vt-error-message { font-size: 1.05rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.vt-error-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem .75rem; margin: .75rem 0 0; font-size: .85rem; }
.vt-error-facts dd { margin: 0 .75rem 0 0; overflow-wrap: anywhere; }
.vt-error-details { margin-top: 1rem; }
.vt-error-details pre { margin: .75rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 28rem; overflow-y: auto; font-size: .8rem; }

.vt-log-title, .vt-log-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.vt-log-title { margin-bottom: 1rem; }
.vt-log-title h1 { margin-bottom: .25rem; }
.vt-log-title p { margin-bottom: 0; }
.vt-log-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem 1rem; padding: 1.25rem; border: 1px solid var(--vt-line); border-radius: .5rem; background: var(--vt-surface); }
.vt-log-search { grid-column: span 2; }
.vt-log-filters .form-label { font-size: .85rem; margin-bottom: .25rem; }
.vt-log-filters .vt-filter-actions { align-self: end; }
.vt-log-toolbar { margin: 1rem 0 .5rem; }
.vt-log-live-controls, .vt-log-counts { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.vt-log-live-controls .form-select { width: auto; }
.vt-log-live-controls .is-live { border-color: var(--vt-ok); color: var(--vt-ok); }
.vt-log-copy { margin-left: auto; }
.vt-log-app { overflow-wrap: anywhere; }
.vt-error-card.is-new { animation: vt-log-arrival 2s ease-out; }
@keyframes vt-log-arrival { from { border-color: var(--vt-ok); background-color: var(--vt-ok-wash); } to { border-color: var(--bs-border-color); background-color: transparent; } }
@media (max-width: 767px) {
  .vt-log-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1rem; }
  .vt-log-logger, .vt-log-filters .vt-filter-actions { grid-column: span 2; }
  .vt-log-live-controls { width: 100%; }
  .vt-error-card { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .vt-error-card.is-new { animation: none; } }
