/* The dashboard's brand (frontend/src/globals.css), without its build step. */
@font-face {
  font-family: 'Space Grotesk Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  color-scheme: dark;
  --background: oklch(0.16 0.008 70);
  --foreground: oklch(0.96 0.01 85);
  --card: oklch(0.2 0.01 70);
  --primary: oklch(0.83 0.15 78);
  --primary-foreground: oklch(0.18 0.02 70);
  --muted-foreground: oklch(0.68 0.015 80);
  --border: oklch(0.96 0.01 85 / 10%);
  --operational: oklch(0.78 0.14 150);
  --degraded: oklch(0.8 0.15 65);
  --down: oklch(0.68 0.19 25);
  --unknown: var(--muted-foreground);
  --radius: 0.625rem;
  --sans: 'Space Grotesk Variable', system-ui, sans-serif;
  --mono: 'JetBrains Mono Variable', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--primary);
  color: var(--primary-foreground);
}

.mark i {
  width: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mark i:nth-child(1),
.mark i:nth-child(3) {
  height: 6px;
}
.mark i:nth-child(2) {
  height: 10px;
}
.mark i:nth-child(4) {
  height: 14px;
}

.word {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.word span {
  color: var(--primary);
}

.tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.125rem 0.625rem;
}

.summary {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.4);
  background: var(--card);
  --state: var(--unknown);
}

.summary h1 {
  margin: 0;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.summary p {
  margin: 0.25rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}

.dot {
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
  margin-top: 0.4rem;
  border-radius: 999px;
  background: var(--state);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--state) 22%, transparent);
}

[data-state='operational'] {
  --state: var(--operational);
}
[data-state='degraded'] {
  --state: var(--degraded);
}
[data-state='down'] {
  --state: var(--down);
}
[data-state='checking'],
[data-state='unknown'] {
  --state: var(--unknown);
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0 2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

button {
  font: inherit;
  color: var(--foreground);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.8);
  padding: 0.375rem 0.75rem;
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: color-mix(in oklch, var(--primary) 60%, transparent);
}

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

:focus-visible {
  outline: 2px solid oklch(0.83 0.15 78 / 60%);
  outline-offset: 2px;
}

.group {
  margin-bottom: 2rem;
}

.group h2,
.note h2 {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
}

.row + .row {
  border-top: 1px solid var(--border);
}

.label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.name {
  font-weight: 500;
}

.detail {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  overflow-wrap: anywhere;
}

.right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: none;
}

.ms {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--state);
}

.pill::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: currentColor;
}

.note {
  padding-top: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.note p {
  margin: 0 0 0.75rem;
}

.bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.bottom nav {
  display: flex;
  gap: 1.25rem;
}

.bottom a {
  text-decoration: none;
}

.bottom a:hover {
  color: var(--foreground);
}

.bottom p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
}

@media (max-width: 30rem) {
  .ms {
    display: none;
  }
  .summary h1 {
    font-size: 1.125rem;
  }
}
