:root {
  --bg: #0f1115;
  --surface: #151a21;
  --surface-2: #1a2028;
  --border: #232a35;
  --text: #e6e9ef;
  --muted: #9aa4b2;
  --ok: #4aa38f;
  --warn: #caa252;
  --crit: #c45c5c;
  --info: #6b8bbf;
  --accent: #7b7fd1;
  --radius: 14px;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  padding: 22px;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.45 system-ui,
    sans-serif;
    cursor: none;
}
/* Header */
.header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pill {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 20%, black);
  border: 1px solid color-mix(in oklab, var(--accent) 40%, black);
  font-weight: 600;
  font-size: 13px;
}
.title h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 650;
  letter-spacing: 0.2px;
}
.right {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  color: var(--muted);
}
.clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  color: var(--text);
}
.updated {
  font-size: 13px;
}

/* Grid – default (landscape) 3 kolonner */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: minmax(180px, auto);
}

/* Kort */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 640;
  letter-spacing: 0.2px;
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: color-mix(in oklab, var(--surface) 70%, black);
  border: 1px solid var(--border);
}
.bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex: 0 0 auto;
  background: var(--muted);
}
.item[data-severity='crit'] .bullet {
  background: var(--crit);
}
.item[data-severity='warn'] .bullet {
  background: var(--warn);
}
.item[data-severity='ok'] .bullet {
  background: var(--ok);
}
.item[data-severity='info'] .bullet {
  background: var(--info);
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Tittel-linje: Utstyr + samlet meta */
.title-row {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  font-weight: 600;
  gap: 10px;
}
.title-text {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.meta-all {
  font-size: 12px;
  color: var(--muted);
}

.desc {
  font-size: 14px;
  color: color-mix(in oklab, var(--text) 85%, black);
}
.comments {
  font-size: 13px;
  color: color-mix(in oklab, var(--text) 80%, black);
  font-style: italic;
}

/* --- STÅENDE OPPSETT --- */
@media (orientation: portrait) {
  body {
    padding: 26px 24px;
  }
  .title h1 {
    font-size: 40px;
  }
  .clock {
    font-size: 22px;
  }
  .updated {
    font-size: 14px;
  }

  /* 2 kolonner i stående (1080×1920) */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  /* Valgfritt: gi ett kort ekstra høyde for rytme */
  .card[data-emphasis='tall'] {
    grid-row: span 2;
  }

  /* Litt større tekst for lesbarhet på avstand */
  .card h2 {
    font-size: 20px;
  }
  .desc {
    font-size: 15px;
  }
  .comments {
    font-size: 14px;
  }
}

/* Fallback for veldig smale vinduer */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .card[data-emphasis='tall'] {
    grid-row: auto;
  }
}
