/* PRISMA Beheer. Tokens follow prisma-web/src/styles/globals.css (v5): navy surfaces, 1px lines,
   depth from a lighter top edge, the prism gradient used sparingly, Space Grotesk 600 + Inter. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #0f1226;
  --card: #161a30;
  --card-2: #1c2038;
  --ink: rgb(255 255 255 / 0.92);
  --ink-muted: rgb(255 255 255 / 0.66);
  --ink-subtle: rgb(255 255 255 / 0.5);
  --line: rgb(255 255 255 / 0.07);
  --line-strong: rgb(255 255 255 / 0.14);
  --primary: #8b7dff;
  --primary-ink: #0e1024;
  --primary-soft: rgb(139 125 255 / 0.14);
  --ok: #4cc38a;
  --ok-soft: rgb(76 195 138 / 0.13);
  --warn: #f0b23a;
  --warn-soft: rgb(240 178 58 / 0.13);
  --bad: #ff7076;
  --bad-soft: rgb(255 112 118 / 0.13);
  --info: #5fb2ff;
  --info-soft: rgb(95 178 255 / 0.13);
  --idle: rgb(255 255 255 / 0.5);
  --idle-soft: rgb(255 255 255 / 0.06);
  --highlight: inset 0 1px 0 rgb(255 255 255 / 0.07);
  --shadow: 0 24px 60px -24px rgb(0 0 0 / 0.6);
  --prism: linear-gradient(90deg, #ff3cac 0%, #9a6bd6 36%, #2b86c5 68%, #35e0ff 100%);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --mode: #8b7dff;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f5f6fa;
  --card: #ffffff;
  --card-2: #f0f1f6;
  --ink: #15162a;
  --ink-muted: #4f5370;
  --ink-subtle: #686d8c;
  --line: rgb(21 22 42 / 0.08);
  --line-strong: rgb(21 22 42 / 0.16);
  --primary: #5b4bff;
  --primary-ink: #ffffff;
  --primary-soft: rgb(91 75 255 / 0.09);
  --ok: #1f7a3a;
  --ok-soft: rgb(31 122 58 / 0.1);
  --warn: #9a6400;
  --warn-soft: rgb(224 167 34 / 0.16);
  --bad: #c92a31;
  --bad-soft: rgb(216 57 63 / 0.09);
  --info: #1b6fc0;
  --info-soft: rgb(27 111 192 / 0.09);
  --idle: #686d8c;
  --idle-soft: rgb(21 22 42 / 0.05);
  --highlight: inset 0 1px 0 rgb(255 255 255 / 0.9);
  --shadow: 0 24px 48px -20px rgb(21 22 42 / 0.25);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 "Inter", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
p {
  margin: 0;
}
button {
  font: inherit;
  color: inherit;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* light from above, the way the site does it */
.aurora {
  position: fixed;
  inset: 0 0 auto 0;
  height: 460px;
  pointer-events: none;
  background:
    radial-gradient(900px 340px at 12% -12%, rgb(255 60 172 / 0.16), transparent 70%),
    radial-gradient(900px 360px at 58% -18%, rgb(120 75 200 / 0.2), transparent 70%),
    radial-gradient(800px 320px at 96% -10%, rgb(53 224 255 / 0.13), transparent 70%);
}
html[data-theme="light"] .aurora {
  opacity: 0.55;
}
.aurora::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--prism);
}

/* ------------------------------------------------------------ icons */
.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i.solid {
  fill: currentColor;
  stroke: none;
}

/* ------------------------------------------------------------ top bar */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}
.brand-name {
  font: 600 17px/1 "Space Grotesk", sans-serif;
  letter-spacing: 0.16em;
}
.brand-tag {
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 13px;
  white-space: nowrap;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--idle);
}
.live.is-ok .live-dot {
  background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent);
  animation: pulse 2.4s var(--ease) infinite;
}
.live.is-bad .live-dot {
  background: var(--bad);
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 7px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}
.me {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.me-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card-2);
  border: 1px solid var(--line-strong);
}
.me-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 16ch;
}

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card-2);
  box-shadow: var(--highlight);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease),
    opacity 0.2s var(--ease);
}
.btn:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--ink) 30%, transparent);
  background: color-mix(in srgb, var(--card-2) 82%, var(--ink));
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  border-color: transparent;
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: none;
}
.btn-primary:hover:not(:disabled) {
  border-color: transparent;
  background: color-mix(in srgb, var(--primary) 86%, white);
}
.btn-danger {
  border-color: transparent;
  background: var(--bad);
  color: #1a0b0c;
  box-shadow: none;
}
html[data-theme="light"] .btn-danger {
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  border-color: transparent;
  background: color-mix(in srgb, var(--bad) 86%, white);
}
.btn-quiet {
  min-height: 34px;
  padding: 0 12px;
  background: transparent;
  box-shadow: none;
  color: var(--ink-muted);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.icon-btn:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 30%, transparent);
}

/* ------------------------------------------------------------ layout */
main {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 40px) 56px;
  display: grid;
  gap: 32px;
}
.section-head,
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 14px;
}
h2 {
  font-size: 20px;
}
.section-note,
.panel-note {
  color: var(--ink-muted);
  font-size: 13.5px;
}
.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--highlight);
}
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent);
  border-radius: 12px;
  background: var(--bad-soft);
  color: var(--bad);
  font-weight: 500;
}

/* ------------------------------------------------------------ summary tiles */
.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.tile {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--highlight);
}
.tile-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
}
.tile-value {
  margin-top: 10px;
  font: 600 34px/1 "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
}
.tile-value small {
  margin-left: 4px;
  color: var(--ink-subtle);
  font: 500 15px/1 "Inter", sans-serif;
  letter-spacing: 0;
}
.tile-sub {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 13px;
}
.meter {
  height: 6px;
  margin-top: 12px;
  border-radius: 3px;
  background: var(--idle-soft);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
  transition: width 0.6s var(--ease), background 0.3s var(--ease);
}
.meter.is-warn > span {
  background: var(--warn);
}
.meter.is-bad > span {
  background: var(--bad);
}
.spark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44%;
  height: 40px;
  color: var(--primary);
  opacity: 0.9;
}
.spark polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* ------------------------------------------------------------ memory bar */
.membar {
  display: flex;
  gap: 2px;
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--idle-soft);
}
.membar span {
  min-width: 3px;
  height: 100%;
  background: var(--seg, var(--idle));
  transition: flex-grow 0.6s var(--ease);
}
.membar .is-free {
  background: transparent;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-muted);
  font-size: 13px;
}
.legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--seg, var(--idle));
}
.legend .is-free i {
  background: transparent;
  border: 1px solid var(--line-strong);
}
.legend b {
  color: var(--ink);
  font-weight: 500;
}

/* ------------------------------------------------------------ server cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(260px 130px at 0% 0%, color-mix(in srgb, var(--mode) 15%, transparent), transparent 72%),
    var(--card);
  box-shadow: var(--highlight);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
}
.card.is-idle {
  background: var(--card);
}
.card.is-idle .glyph {
  background: var(--idle-soft);
  color: var(--idle);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.glyph {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  background: color-mix(in srgb, var(--mode) 18%, transparent);
  color: color-mix(in srgb, var(--mode) 78%, var(--ink));
}
.glyph .i {
  width: 22px;
  height: 22px;
}
.card-title {
  min-width: 0;
  flex: 1;
}
.card-title h3 {
  font-size: 18px;
}
.card-title p {
  color: var(--ink-subtle);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--idle-soft);
  color: var(--idle);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pill.is-on {
  background: var(--ok-soft);
  color: var(--ok);
}
.pill.is-gate {
  background: var(--warn-soft);
  color: var(--warn);
}
.pill.is-bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.pill.is-busy {
  background: var(--info-soft);
  color: var(--info);
}
.pill.is-busy::before {
  width: 9px;
  height: 9px;
  background: none;
  border: 1.6px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}
.stats div {
  min-width: 0;
}
.stats dt {
  color: var(--ink-subtle);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stats dd {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.stats dd small {
  color: var(--ink-subtle);
  font-size: 12.5px;
  font-weight: 400;
}
.stats dd.is-warn {
  color: var(--warn);
}
.stats dd.is-bad {
  color: var(--bad);
}
.card.is-idle .stats dd {
  color: var(--ink-subtle);
}

.busy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 13.5px;
  font-weight: 500;
  overflow: hidden;
  position: relative;
}
.busy::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  animation: slide 1.4s linear infinite;
}
@keyframes slide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}
.note {
  color: var(--ink-muted);
  font-size: 13px;
}
.note.is-warn {
  color: var(--warn);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto; /* cards in one row share a height: buttons and switches line up at the bottom */
}
.actions .btn {
  flex: 1 1 auto;
}
.toggles {
  display: grid;
  gap: 10px;
}
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}
.toggle-text b {
  display: block;
  font-weight: 500;
}
.toggle-text span {
  color: var(--ink-subtle);
  font-size: 12.5px;
}
.switch {
  position: relative;
  flex: none;
  width: 42px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--idle-soft);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-muted);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.switch[aria-checked="true"] {
  border-color: transparent;
  background: var(--primary);
}
.switch[aria-checked="true"]::after {
  transform: translateX(18px);
  background: #fff;
}
.switch.is-warn[aria-checked="true"] {
  background: var(--warn);
}
.switch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ------------------------------------------------------------ core + activity */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 32px;
  align-items: start;
}
.split > section {
  min-width: 0;
}
.core {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.core .card {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.core .card-head {
  flex: 1 1 0;
}
.core .btn {
  flex: none;
}

.activity {
  margin: 0;
  padding: 6px 18px;
  list-style: none;
  max-height: 420px;
  overflow: auto;
}
.activity li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.activity li:last-child {
  border-bottom: 0;
}
.activity .dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--idle-soft);
  color: var(--ink-muted);
}
.activity .dot .i {
  width: 15px;
  height: 15px;
}
.activity .is-ok .dot {
  background: var(--ok-soft);
  color: var(--ok);
}
.activity .is-failed .dot,
.activity .is-rejected .dot {
  background: var(--bad-soft);
  color: var(--bad);
}
.activity .is-running .dot {
  background: var(--info-soft);
  color: var(--info);
}
.activity b {
  font-weight: 500;
}
.activity time {
  color: var(--ink-subtle);
  font-size: 12.5px;
  white-space: nowrap;
}
.activity .detail {
  grid-column: 2 / -1;
  color: var(--ink-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.activity .empty {
  display: block;
  padding: 22px 0;
  color: var(--ink-subtle);
  text-align: center;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  color: var(--ink-subtle);
  font-size: 12.5px;
}

/* ------------------------------------------------------------ dialog */
.dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow), var(--highlight);
}
.dialog::backdrop {
  background: rgb(6 8 20 / 0.6);
  backdrop-filter: blur(4px);
}
.dialog[open] {
  animation: rise 0.22s var(--ease);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
.dialog form {
  display: grid;
  gap: 12px;
  padding: 24px;
}
.dialog-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}
.dialog-icon.is-danger {
  background: var(--bad-soft);
  color: var(--bad);
}
.dialog-icon.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.dialog-icon .i {
  width: 22px;
  height: 22px;
}
.dialog h3 {
  font-size: 21px;
}
.dialog p {
  color: var(--ink-muted);
}
.dialog-warning {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--warn-soft);
  color: var(--warn) !important;
  font-weight: 500;
  font-size: 14px;
}
.choice {
  margin: 0;
  padding: 0;
  border: 0;
}
.choice legend {
  padding: 0;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.choice-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
.choice-row button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.choice-row button[aria-pressed="true"] {
  background: var(--primary-soft);
  color: var(--primary);
}
.typed {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.typed input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: 500 15px/1 "Inter", sans-serif;
  letter-spacing: 0.08em;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

/* ------------------------------------------------------------ console */
.console {
  width: min(1040px, calc(100vw - 24px));
  height: min(820px, calc(100dvh - 24px));
  max-height: none;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow), var(--highlight);
  overflow: hidden;
}
.console[open] {
  display: flex;
  flex-direction: column;
  animation: rise 0.22s var(--ease);
}
.console::backdrop {
  background: rgb(6 8 20 / 0.6);
  backdrop-filter: blur(4px);
}
.console-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(320px 120px at 0% 0%, color-mix(in srgb, var(--mode) 14%, transparent), transparent 72%);
}
/* the log is a terminal: dark in both themes */
.console-log {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 16px;
  overflow: auto;
  background: #090b17;
  color: #c9cfe6;
  font: 400 12.5px/1.55 ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.console-log .line.is-warn {
  color: #f0b23a;
}
.console-log .line.is-error {
  color: #ff7f85;
}
.console-empty {
  color: #7d85a6;
}
.console-answers {
  flex: none;
  max-height: 30%;
  overflow: auto;
  padding: 10px 16px;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  background: #0d1020;
  color: #c9cfe6;
  display: grid;
  gap: 10px;
}
.answer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font: 500 12.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.answer-head b {
  color: #8be9b5;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.answer-head span {
  flex: none;
  color: #7d85a6;
}
.answer pre {
  margin: 2px 0 0;
  font: 400 12.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.answer.is-bad .answer-head b,
.answer.is-bad pre {
  color: #ff7f85;
}
.console-form {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 0;
}
.console-prompt {
  color: var(--ink-subtle);
  font: 500 15px/1 ui-monospace, Consolas, monospace;
}
.console-form input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1 ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.console-form input:disabled {
  opacity: 0.5;
}
.console-hint {
  flex: none;
  padding: 8px 16px 14px;
  color: var(--ink-subtle);
  font-size: 12.5px;
}

/* ------------------------------------------------------------ toasts */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
}
.toast {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card-2);
  box-shadow: var(--shadow), var(--highlight);
  animation: rise 0.25s var(--ease);
}
.toast .i {
  grid-row: span 2;
  margin-top: 2px;
  color: var(--ok);
}
.toast.is-bad .i {
  color: var(--bad);
}
.toast b {
  font-weight: 500;
}
.toast span {
  grid-column: 2;
  color: var(--ink-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

/* ------------------------------------------------------------ login page */
.login {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px 16px;
}
.login-card {
  position: relative;
  width: min(430px, 100%);
  padding: 36px 32px 30px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow), var(--highlight);
  text-align: center;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 3px;
  border-radius: 24px 24px 0 0;
  background: var(--prism);
}
.login-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
}
.login-card h1 {
  font-size: 28px;
}
.login-card .lead {
  margin-top: 8px;
  color: var(--ink-muted);
}
.btn-discord {
  width: 100%;
  min-height: 48px;
  margin-top: 26px;
  border-color: transparent;
  background: #5865f2;
  color: #fff;
  font-size: 15.5px;
  box-shadow: none;
  text-decoration: none;
}
.btn-discord:hover:not(:disabled) {
  border-color: transparent;
  background: #6b77f5;
}
.btn-discord .i {
  width: 22px;
  height: 22px;
}
.btn-discord[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}
.login-msg {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bad-soft);
  color: var(--bad);
  font-size: 14px;
  text-align: left;
}
.login-msg.is-info {
  background: var(--warn-soft);
  color: var(--warn);
}
.login-msg code {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgb(0 0 0 / 0.25);
  color: var(--ink);
  font: 500 14px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace;
  user-select: all;
}
.login-foot {
  margin-top: 22px;
  color: var(--ink-subtle);
  font-size: 12.5px;
}
.login-foot b {
  color: var(--ink-muted);
  font-weight: 500;
}
.linklike {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* second step: authenticator code */
.mfa-setup {
  margin-top: 20px;
  text-align: left;
}
.mfa-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-muted);
  font-size: 14px;
}
.mfa-steps li + li {
  margin-top: 6px;
}
.mfa-qr {
  display: block;
  width: 232px;
  height: 232px;
  margin: 16px auto 12px;
  border-radius: 14px;
  background: #fff;
  image-rendering: pixelated;
}
.mfa-manual {
  margin-bottom: 14px;
  color: var(--ink-subtle);
  font-size: 13px;
  text-align: center;
}
.mfa-manual code {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--card-2);
  color: var(--ink);
  font: 500 13.5px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.04em;
  user-select: all;
}
.mfa-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  text-align: left;
}
.mfa-form label {
  font-size: 14px;
  font-weight: 500;
}
.mfa-form input {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: 600 26px/1 "Space Grotesk", ui-monospace, monospace;
  letter-spacing: 0.32em;
  text-align: center;
}
.mfa-form .btn {
  min-height: 46px;
  font-size: 15px;
}

/* ------------------------------------------------------------ small screens */
@media (max-width: 1080px) {
  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  main {
    gap: 26px;
    padding-top: 20px;
  }
  .brand-tag,
  .me-name,
  #live-text {
    display: none;
  }
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tile-value {
    font-size: 28px;
  }
  .tile {
    padding: 14px;
  }
  .spark {
    display: none;
  }
  .toasts {
    right: 16px;
    bottom: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
