/* The look of the Vortex dashboard (app.vx.tools, vortex-tools/vortex-dashboard):
   its Phoenix/Bootstrap tokens, read off the live site and reproduced
   here without Bootstrap, since this page has no build and a strict CSP.
   The accent is blue instead of the dashboard's purple (Justin, 2026-10-31).
   Nunito Sans is self-hosted (fonts/, SIL OFL 1.1, see fonts/OFL.txt). */

@font-face { font-family: "Nunito Sans"; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/nunito-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-display: swap; font-weight: 600; src: url(fonts/nunito-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/nunito-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-display: swap; font-weight: 800; src: url(fonts/nunito-sans-latin-800-normal.woff2) format("woff2"); }

:root {
  --primary: #2563eb; --primary-emphasis: #1e40af; --primary-subtle: #dbeafe;
  --body-bg: #fff; --emphasis-bg: #fff; --highlight-bg: #eef0f4;
  --fg: #0f1e3d; --emphasis: #151821; --secondary: #3b4152; --tertiary: #4e5568; --quaternary: #858d9e;
  --border: #c9ced8; --border-t: rgba(201, 206, 216, .55); --btn-border: #e2e5eb; --btn-fg: #2c3140;
  --stripe: rgba(219, 234, 254, .35);
  --success: #2a9d3f; --success-subtle: #e1f1e4; --success-border: #9fd3a9; --success-emphasis: #175622;
  --warning: #e67a12; --warning-subtle: #fbebdb; --warning-border: #f4c394; --warning-emphasis: #7e430a;
  --danger: #e0341e; --danger-subtle: #fbe7e4; --danger-border: #f1a49a; --danger-emphasis: #922214;
  --info: #0a94d6; --info-subtle: #dcf0f9; --info-border: #9dd4ef; --info-emphasis: #054a6b;
  --neutral-subtle: #eef0f4; --neutral-border: #c9ced8; --neutral-emphasis: #4e5568;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --radius: .375rem; --radius-sm: .25rem;
  --topbar: 48px; --sidebar: 200px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #7fb0ff; --primary-emphasis: #9cc2ff; --primary-subtle: #0f1d38;
    --body-bg: #070b14; --emphasis-bg: #070b14; --highlight-bg: #0d1526;
    --fg: #f8fbff; --emphasis: #f8fbff; --secondary: #c9ced8; --tertiary: #a9c4f0; --quaternary: #858d9e;
    --border: #3b4152; --border-t: rgba(78, 85, 104, .6); --btn-border: #2c3140; --btn-fg: #a2a9b8;
    --stripe: rgba(59, 65, 82, .22);
    --success: #75bf82; --success-subtle: #182d26; --success-border: #1d4d2d; --success-emphasis: #8ac995;
    --warning: #efa965; --warning-subtle: #36281f; --warning-border: #693f1b; --warning-emphasis: #f1b67d;
    --danger: #eb7b6d; --danger-subtle: #351c21; --danger-border: #662320; --danger-emphasis: #ee8f83;
    --info: #60b9e4; --info-subtle: #132c3e; --info-border: #1c4f6a; --info-emphasis: #78c4e8;
    --neutral-subtle: #0d1526; --neutral-border: #3b4152; --neutral-emphasis: #c9ced8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary: #7fb0ff; --primary-emphasis: #9cc2ff; --primary-subtle: #0f1d38;
  --body-bg: #070b14; --emphasis-bg: #070b14; --highlight-bg: #0d1526;
  --fg: #f8fbff; --emphasis: #f8fbff; --secondary: #c9ced8; --tertiary: #a9c4f0; --quaternary: #858d9e;
  --border: #3b4152; --border-t: rgba(78, 85, 104, .6); --btn-border: #2c3140; --btn-fg: #a2a9b8;
  --stripe: rgba(59, 65, 82, .22);
  --success: #75bf82; --success-subtle: #182d26; --success-border: #1d4d2d; --success-emphasis: #8ac995;
  --warning: #efa965; --warning-subtle: #36281f; --warning-border: #693f1b; --warning-emphasis: #f1b67d;
  --danger: #eb7b6d; --danger-subtle: #351c21; --danger-border: #662320; --danger-emphasis: #ee8f83;
  --info: #60b9e4; --info-subtle: #132c3e; --info-border: #1c4f6a; --info-emphasis: #78c4e8;
  --neutral-subtle: #0d1526; --neutral-border: #3b4152; --neutral-emphasis: #c9ced8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--body-bg); color: var(--fg);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.icon {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon.sm { width: 12px; height: 12px; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 3; height: var(--topbar);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--emphasis-bg); border-bottom: 1px solid var(--border-t);
}
.brand { font-size: 20px; font-weight: 800; color: var(--emphasis); letter-spacing: -.01em; white-space: nowrap; }
.brand span { color: var(--primary); font-weight: 600; }
.topbar .spacer { flex: 1; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.8px; font-weight: 700; line-height: 1.2;
  padding: 3px 10px; border-radius: 999px; border: 0;
  background: var(--primary-subtle); color: var(--primary-emphasis);
}
.pill-btn:hover { filter: brightness(.97); }

/* ---- shell: sidebar + content ---- */
.shell { display: flex; min-height: calc(100vh - var(--topbar)); }
.sidebar {
  position: sticky; top: var(--topbar); align-self: flex-start;
  width: var(--sidebar); flex: none; height: calc(100vh - var(--topbar)); overflow-y: auto;
  padding: 12px 8px; background: var(--emphasis-bg); border-right: 1px solid var(--border-t);
}
.nav-label {
  margin: 14px 12px 6px; font-size: 10.24px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--tertiary);
}
.nav-label:first-child { margin-top: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 6px 12px; border: 0; border-radius: var(--radius-sm); background: transparent;
  font-size: 14px; font-weight: 600; color: var(--secondary); text-align: left; white-space: nowrap;
}
.nav-link:hover { background: var(--highlight-bg); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--primary); }
.nav-link .icon { color: inherit; }
.content { flex: 1; min-width: 0; padding: 20px 24px 48px; }

/* ---- page header ---- */
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 20px; line-height: 1.1; font-weight: 800; color: var(--emphasis); }
.page-head .sub { font-size: 12.8px; color: var(--tertiary); }
.page-head .fresh { margin-left: auto; font-size: 12.8px; color: var(--tertiary); white-space: nowrap; }

/* ---- section card (the dashboard's SectionCard) ---- */
.section {
  background: var(--emphasis-bg); border: 1px solid var(--border-t); border-radius: var(--radius);
  margin-bottom: 16px; min-width: 0;
}
.section-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--border-t);
}
.section-head h2 {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 12.8px; font-weight: 800; color: var(--emphasis);
}
.section-head h2 .icon { color: var(--primary); }
.section-head .aside { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.section-head .more { font-size: 12.8px; white-space: nowrap; background: none; border: 0; padding: 0; color: var(--primary); }
.section-head .more:hover { text-decoration: underline; }
.section-body { padding: 12px 16px; }
.section-foot { padding: 8px 16px 10px; font-size: 10.24px; color: var(--tertiary); border-top: 1px solid var(--border-t); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 0 16px; }

/* ---- data table (the dashboard's .data-table.table-striped.table-with-padding) ---- */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 12.8px; line-height: 1.5; color: var(--fg);
  font-variant-numeric: tabular-nums;
}
table.data th, table.data td {
  padding: 8px; border-bottom: 1px solid var(--border-t); text-align: right; white-space: nowrap; vertical-align: middle;
}
table.data th:first-child, table.data td:first-child { padding-left: 16px; }
table.data th:last-child, table.data td:last-child { padding-right: 16px; }
table.data th {
  padding-top: 9.6px; padding-bottom: 9.6px;
  font-size: 10.24px; line-height: 1.1; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  color: var(--emphasis); background: var(--emphasis-bg);
}
table.data tbody tr:nth-of-type(odd) > td { background: var(--stripe); }
table.data tbody tr:hover > td { background: var(--highlight-bg); }
table.data tbody tr:last-child > td { border-bottom: 0; }
table.data .l { text-align: left; }
table.data .wrap { white-space: normal; min-width: 220px; }
table.data th.sort { cursor: pointer; user-select: none; }
table.data th.sort::after { content: "⇕"; margin-left: 4px; font-size: 9px; color: var(--quaternary); }
table.data th[aria-sort="ascending"]::after { content: "▲"; color: var(--primary); }
table.data th[aria-sort="descending"]::after { content: "▼"; color: var(--primary); }
table.data td.empty { padding: 24px 16px; text-align: center; color: var(--tertiary); white-space: normal; }
table.data td.link { cursor: pointer; }
.mono { font-family: var(--mono); font-size: .95em; }
.num { font-family: var(--mono); }
.muted { color: var(--quaternary); }
.dim { color: var(--tertiary); }
.strong { font-weight: 700; color: var(--emphasis); }
.ok { color: var(--success); font-weight: 600; }
.warn { color: var(--warning); font-weight: 700; }
.bad { color: var(--danger); font-weight: 700; }

/* ---- badge (badge-phoenix) ---- */
.badge {
  display: inline-block; padding: 2px 6px; border-radius: var(--radius-sm);
  font-size: 10.24px; line-height: 1.2; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  border: 1px solid var(--neutral-border); background: var(--neutral-subtle); color: var(--neutral-emphasis);
  white-space: nowrap; vertical-align: 1px;
}
.badge.ok { border-color: var(--success-border); background: var(--success-subtle); color: var(--success-emphasis); }
.badge.warn { border-color: var(--warning-border); background: var(--warning-subtle); color: var(--warning-emphasis); }
.badge.bad { border-color: var(--danger-border); background: var(--danger-subtle); color: var(--danger-emphasis); }
.badge.info { border-color: var(--info-border); background: var(--info-subtle); color: var(--info-emphasis); }
.badge.primary { border-color: var(--primary-subtle); background: var(--primary-subtle); color: var(--primary-emphasis); }

/* ---- controls: btn-group, search ---- */
.seg { display: inline-flex; }
.seg button {
  font-size: 12.8px; font-weight: 700; line-height: 1.5; padding: 3px 9px;
  background: var(--emphasis-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-border); margin-left: -1px; border-radius: 0;
}
.seg button:first-child { margin-left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.seg button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.seg button:hover { background: var(--highlight-bg); }
.seg button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; position: relative; }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: #2563eb; border-color: #2563eb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: #2563eb; border-color: #2563eb; } }
input[type=search], input[type=password] {
  font-size: 12.8px; font-weight: 600; padding: 4px 8px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--emphasis-bg); color: var(--fg); min-width: 0;
}
input:focus { outline: 2px solid var(--primary-subtle); border-color: var(--primary); }
input[type=search] { width: 220px; }
.btn-primary {
  font-size: 12.8px; font-weight: 700; padding: 5px 14px; border-radius: var(--radius-sm);
  border: 1px solid #2563eb; background: #2563eb; color: #fff;
}

/* ---- login ---- */
.login { max-width: 460px; margin: 64px auto; padding: 0 16px; }
.login .section-body p { margin: 0 0 12px; font-size: 12.8px; color: var(--tertiary); }
.login .row { display: flex; gap: 8px; }
.login input { flex: 1; padding: 6px 10px; }
.error { color: var(--danger); font-size: 12.8px; font-weight: 600; }

/* ---- consensus slot strip (the dashboard's vx-dot) ---- */
.slots { display: flex; flex-wrap: wrap; gap: 3px; }
.slot { width: 12px; height: 12px; border-radius: 2px; background: var(--border); }
.slot.finalized { background: var(--success); }
.slot.notarized { background: var(--info); }
.slot.skipped { background: var(--warning); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 10.24px; color: var(--tertiary); }
.legend span::before {
  content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px;
  margin-right: 5px; vertical-align: -1px; background: var(--border);
}
.legend .finalized::before { background: var(--success); }
.legend .notarized::before { background: var(--info); }
.legend .skipped::before { background: var(--warning); }

/* ---- phone: the sidebar becomes a scrolling strip under the top bar ---- */
@media (max-width: 767px) {
  .shell { display: block; }
  .sidebar {
    position: sticky; top: var(--topbar); z-index: 2; width: auto; height: auto;
    display: flex; gap: 2px; overflow-x: auto; padding: 6px 8px;
    border-right: 0; border-bottom: 1px solid var(--border-t);
  }
  .nav-label { display: none; }
  .nav-link { width: auto; padding: 6px 10px; }
  .content { padding: 16px 16px 40px; }
  .grid2 { grid-template-columns: 1fr; }
  input[type=search] { width: 100%; }
  .page-head .fresh { margin-left: 0; }
  .brand { font-size: 18px; }
}
