/* Entropy speed test. plinth.css carries the components; this is the page's
 * ground and layout, on the estate's palette (entropysoftworks.com, the
 * consoles): brand ground #e2e9e9 / black, untinted panels, Geist + Geist
 * Mono, monochrome with status as a word. */

:root {
  --background: 226 233 233;
  --foreground: 0 0 0;
  --card: 246 246 246;
  --card-foreground: 0 0 0;
  --popover: 246 246 246;
  --popover-foreground: 0 0 0;
  --surface-raised: 246 246 246;
  --primary: 0 0 0;
  --primary-foreground: 255 255 255;
  --secondary: 237 237 237;
  --secondary-foreground: 0 0 0;
  --muted: 237 237 237;
  --muted-foreground: 82 82 82;
  --accent: 228 228 228;
  --accent-foreground: 0 0 0;
  --border: 194 194 194;
  --input: 122 122 122;
  --ring: 0 0 0;
  --focus-ring: 0 0 0;
  --destructive: 185 28 28;
  --destructive-foreground: 255 255 255;
  --success: 21 128 61;
  --success-foreground: 255 255 255;
  --warning: 146 64 14;
  --info: 29 78 216;
  --radius: 0.625rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: 0 0 0;
    --foreground: 226 233 233;
    --card: 20 20 20;
    --card-foreground: 226 233 233;
    --popover: 23 23 23;
    --popover-foreground: 226 233 233;
    --surface-raised: 20 20 20;
    --primary: 226 233 233;
    --primary-foreground: 0 0 0;
    --secondary: 31 31 31;
    --secondary-foreground: 226 233 233;
    --muted: 31 31 31;
    --muted-foreground: 163 163 163;
    --accent: 38 38 38;
    --accent-foreground: 226 233 233;
    --border: 46 46 46;
    --input: 107 107 107;
    --ring: 226 233 233;
    --focus-ring: 226 233 233;
    --destructive: 248 113 113;
    --destructive-foreground: 0 0 0;
    --success: 74 222 128;
    --success-foreground: 0 0 0;
    --warning: 252 211 77;
    --info: 147 197 253;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --background: 0 0 0;
  --foreground: 226 233 233;
  --card: 20 20 20;
  --card-foreground: 226 233 233;
  --popover: 23 23 23;
  --popover-foreground: 226 233 233;
  --surface-raised: 20 20 20;
  --primary: 226 233 233;
  --primary-foreground: 0 0 0;
  --secondary: 31 31 31;
  --secondary-foreground: 226 233 233;
  --muted: 31 31 31;
  --muted-foreground: 163 163 163;
  --accent: 38 38 38;
  --accent-foreground: 226 233 233;
  --border: 46 46 46;
  --input: 107 107 107;
  --ring: 226 233 233;
  --focus-ring: 226 233 233;
  --destructive: 248 113 113;
  --destructive-foreground: 0 0 0;
  --success: 74 222 128;
  --success-foreground: 0 0 0;
  --warning: 252 211 77;
  --info: 147 197 253;
  color-scheme: dark;
}

body {
  margin: 0;
  background: rgb(var(--background));
  color: rgb(var(--foreground));
  font-family: var(--font-sans);
}

.st-page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.st-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.st-bar__title {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 1rem;
}
.st-bar__spacer { flex: 1; }
.st-mark { width: 2rem; height: auto; color: rgb(var(--foreground)); display: block; }
.st-mark--sm { width: 1.25rem; }

.st-panel {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem;
}

.st-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.st-metric { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.st-metric__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgb(var(--muted-foreground));
}
.st-metric__value {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 9vw, 3.25rem);
  font-weight: 600;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.st-metric__value--live { color: rgb(var(--muted-foreground)); }
.st-metric__unit { font-size: 0.4em; font-weight: 500; margin-left: 0.35em; color: rgb(var(--muted-foreground)); }
.st-metric__sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgb(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}
.st-lat { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.st-lat .st-metric__value { font-size: 1.5rem; }

.st-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }
.st-server { font-family: var(--font-mono); font-size: 0.8rem; color: rgb(var(--muted-foreground)); }

.st-embed pre {
  margin: 0.5rem 0 0;
  padding: 0.75rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgb(var(--muted));
  border-radius: calc(var(--radius) - 0.25rem);
  white-space: pre;
}

.st-foot { font-family: var(--font-mono); font-size: 0.75rem; color: rgb(var(--muted-foreground)); display: flex; gap: 1rem; flex-wrap: wrap; }
.st-foot a { color: inherit; }

/* The widget: fits a 360x220 frame. */
.st-widget {
  box-sizing: border-box;
  height: 100vh;
  overflow: hidden;
  padding: 0.625rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  background: rgb(var(--card));
}
.st-widget .st-bar { gap: 0.5rem; }
.st-widget .st-bar__title { font-size: 0.875rem; }
.st-widget .st-grid { gap: 0.75rem; }
.st-widget .st-metric { gap: 0.125rem; }
.st-widget .st-metric__label { font-size: 0.625rem; }
.st-widget .st-metric__value { font-size: 1.625rem; }
.st-widget .st-metric__sub { font-size: 0.625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-widget .st-actions { margin-top: 0; gap: 0.75rem; flex-wrap: nowrap; }
.st-widget .st-lat { gap: 0 1rem; flex-wrap: nowrap; }
.st-widget .st-lat .st-metric__value { font-size: 0.9rem; }
.st-widget .st-actions--meta { margin-top: auto; }
.st-widget .st-server { font-size: 0.6875rem; }
.st-widget a { color: inherit; }
