/* Smart Citizen Flows interface. Values come from tokens.css */

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--line-height);
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
/* Titles as smartcitizen.me: Kanit, uppercase */
h1, h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; }
h1 { font-weight: 900; }
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }

p { margin: 0 0 var(--space-3); }

code, kbd, pre, .mono { font-family: var(--font-mono); }

/* Inline code: small, never a block */
code {
  display: inline;
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  background: var(--color-code-bg);
  color: var(--color-code-text);
  font-size: 0.85em;
  white-space: nowrap;
}

pre {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  overflow: auto;
  border-radius: var(--radius);
  background: var(--color-code-bg);
  color: var(--color-code-text);
  font-size: var(--text-sm);
  line-height: 1.45;
}

pre code { padding: 0; background: none; font-size: inherit; white-space: pre; }

:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Header and navigation */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-header-bg);
  color: var(--color-header-text);
}

.topbar-inner {
  display: flex;
  align-items: stretch;
  gap: var(--space-5);
  max-width: var(--page-width);
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-header-text);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand:hover { color: #fff; text-decoration: none; }
.brand img { width: 30px; height: 30px; }

.topbar nav { display: flex; }
.tabs { display: flex; align-items: stretch; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.tabs li { display: flex; }

/* The whole tab is clickable, with a visible active state */
.tabs a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 var(--space-4);
  border-bottom: 3px solid transparent;
  color: var(--color-header-muted);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.tabs a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.tabs a[aria-current="page"] { color: #fff; border-bottom-color: var(--color-highlight); }

.topbar-end {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
  color: var(--color-header-muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.topbar-end .user { color: var(--color-header-text); font-weight: 500; }
.topbar-end a { color: var(--color-header-muted); }
.topbar-end a:hover { color: #fff; }
.clock { font-variant-numeric: tabular-nums; }
.theme-switch {
  min-width: 4rem;
  padding: var(--space-1) var(--space-2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  background: none;
  color: var(--color-header-muted);
  font: inherit;
  font-size: var(--text-xs);
  cursor: pointer;
}
.theme-switch:hover { color: #fff; border-color: rgba(255, 255, 255, 0.5); }

/* Error pages */
.error-page { padding: var(--space-7) 0; text-align: center; }
.error-page .code { color: var(--color-text-muted); font-family: var(--font-display); font-size: var(--text-xxl); font-weight: 900; }
.error-page h1 { margin: var(--space-2) 0 var(--space-3); }
.error-page p { color: var(--color-text-muted); }
.error-page .row { justify-content: center; margin-top: var(--space-5); }

/* Page layout */

.page {
  flex: 1;
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-6) var(--gutter) var(--space-7);
}
.page.narrow { max-width: calc(var(--form-width) + 2 * var(--gutter)); }

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.page-header .subtitle { margin: var(--space-1) 0 0; color: var(--color-text-muted); }
.page-header .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.breadcrumbs { margin-bottom: var(--space-2); color: var(--color-text-muted); font-size: var(--text-sm); }
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs span::before { content: "/"; margin: 0 var(--space-2); opacity: 0.6; }

.section { margin-top: var(--space-6); }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.footer {
  padding: var(--space-4) var(--gutter);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-align: center;
}

/* Cards */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: var(--space-4); }
.grid > .card + .card { margin-top: 0; }
.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.card-body { padding: var(--space-4); }
.card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

a.card { display: block; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
a.card:hover { border-color: var(--color-accent); box-shadow: var(--shadow-lg); text-decoration: none; }

.grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); }

/* Stats */

.stat { padding: var(--space-4); }
.stat .label { color: var(--color-text-muted); font-size: var(--text-sm); }
.stat .value { margin-top: var(--space-1); font-family: var(--font-figures); font-size: var(--text-xxl); font-weight: 700; }
.stat .value.success { color: var(--color-success); }
.stat .value.warning { color: var(--color-warning); }
.stat .value.danger { color: var(--color-danger); }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--color-surface-muted); text-decoration: none; color: var(--color-text); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn.sm { min-height: 28px; padding: 0 var(--space-3); font-size: var(--text-xs); }
.btn.block { width: 100%; min-height: 42px; font-size: var(--text-md); }

.btn.primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }
.btn.primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
.btn.danger { border-color: var(--color-danger); color: var(--color-danger); }
.btn.danger:hover { background: var(--color-danger); color: #fff; }
.btn.warning { color: var(--color-warning); }
.btn.success { color: var(--color-success); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--color-surface-muted); }

/* Forms */

.field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-4); }
.field label, .label-text { font-size: var(--text-sm); font-weight: 600; }
.field .optional { color: var(--color-text-muted); font-weight: 400; }
.hint { color: var(--color-text-muted); font-size: var(--text-sm); }

.input, select.input, textarea.input {
  width: 100%;
  min-height: 36px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: var(--text-sm);
}
.input:focus { outline: none; border-color: var(--color-accent); box-shadow: var(--focus-ring); }
textarea.input { min-height: 96px; resize: vertical; font-family: var(--font-mono); line-height: 1.5; }
.input.mono { font-family: var(--font-mono); }
.input.lg { min-height: 42px; font-size: var(--text-md); }

.form-grid { display: grid; gap: 0 var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
/* Three per row, as the Alphasense sheets (electronic, sensor and total zero) */
.form-grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.group-title { margin: var(--space-2) 0 var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.group-title:first-child { margin-top: 0; }
/* Types of the sensor ids typed in a form */
.slot-types { margin: var(--space-1) 0 0; padding: 0; list-style: none; font-size: var(--text-xs); color: var(--color-text-muted); font-family: var(--font-mono, monospace); }
.slot-types:empty, [data-sensor-type]:empty { display: none; }
.warning-text { color: var(--color-warning); }
/* nA/ppb × gain = mV/ppb, one row per sensitivity */
.relation-rows { display: grid; gap: var(--space-2); }
/* Worked out from other values on the form, to be checked */
.input.auto-filled { background: var(--color-info-soft); border-color: var(--color-info); }
.relation { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 0 var(--space-3); }
.relation-title { padding-top: 2rem; font-size: var(--text-sm); font-weight: 600; }
.relation-op { padding-top: 2.1rem; color: var(--color-text-muted); white-space: nowrap; }
.relation-expected { grid-column: 2 / -1; margin: calc(-1 * var(--space-3)) 0 var(--space-2); }
.relation-expected:empty { display: none; }
@media (max-width: 760px) {
  .relation { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .relation-title { grid-column: 1 / -1; padding-top: 0; }
  .relation-expected { grid-column: 1 / -1; }
}

.check { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); cursor: pointer; white-space: nowrap; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--color-accent); }

/* Toolbar of small inline forms */
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.inline-form .input { width: auto; }
.inline-form .input.short { width: 9rem; }
.inline-form .title { margin-right: var(--space-2); font-size: var(--text-sm); font-weight: 600; }

.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
  margin-top: var(--space-5);
  padding: var(--space-3) 0;
  background: linear-gradient(to bottom, transparent, var(--color-bg) 30%);
}

/* Alerts */

.alerts { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.alert {
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
}
.alert.success { background: var(--color-success-soft); border-color: var(--color-success); }
.alert.info { background: var(--color-info-soft); border-color: var(--color-info); }
.alert.warning { background: var(--color-warning-soft); border-color: var(--color-warning); }
.alert.error { background: var(--color-danger-soft); border-color: var(--color-danger); }

/* Badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.15em 0.6em;
  border-radius: var(--radius-pill);
  background: var(--color-neutral-soft);
  color: var(--color-neutral);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.success, .badge.active { background: var(--color-success-soft); color: var(--color-success); }
.badge.failed, .badge.delete { background: var(--color-danger-soft); color: var(--color-danger); }
.badge.aborted, .badge.paused, .badge.update { background: var(--color-warning-soft); color: var(--color-warning); }
.badge.queued, .badge.running, .badge.create, .badge.import { background: var(--color-info-soft); color: var(--color-info); }
.badge.running::before { animation: pulse 1.2s ease-in-out infinite; }
/* Device health */
.badge.ok { background: var(--color-success-soft); color: var(--color-success); }
.badge.warning { background: var(--color-warning-soft); color: var(--color-warning); }
.badge.problem, .badge.error { background: var(--color-danger-soft); color: var(--color-danger); }
.badge.error::before { border-radius: 1px; }

@keyframes pulse { 50% { opacity: 0.25; } }

/* Segmented filter */

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface-muted);
}
.segmented a, .segmented button {
  padding: var(--space-1) var(--space-3);
  border: 0;
  border-radius: calc(var(--radius) - 3px);
  background: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
}
.segmented a:hover, .segmented button:hover { color: var(--color-text); text-decoration: none; }
.segmented [aria-current="page"], .segmented [aria-selected="true"], .segmented [aria-pressed="true"] {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow);
}
.segmented .count { margin-left: var(--space-1); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

/* Tables */

.table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.table-tools .input { max-width: 320px; }
.table-tools .count { color: var(--color-text-muted); font-size: var(--text-sm); }
.table-tools.selection { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.table th.select, .table td.select { width: 1%; padding-right: 0; }
.table .select input { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--color-accent); }

.table-wrap { overflow: auto; }
.table-wrap.scroll { max-height: 65vh; }

.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th, .table td { padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: middle; }
.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.table tbody tr:hover { background: var(--color-surface-muted); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline-flex; align-items: center; gap: var(--space-2); margin-left: var(--space-2); }
/* Same columns in every row: dry run (or nothing), run now, pause or resume */
.table .row-actions { display: inline-grid; grid-template-columns: auto auto 5.5rem; align-items: center; gap: var(--space-2); }
.table .row-actions form { display: contents; }
.table .clip { max-width: 28rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .clip.narrow { max-width: 16rem; }
.table.compact th, .table.compact td { padding-left: var(--space-3); padding-right: var(--space-3); }
.table.compact .clip.narrow { max-width: 13rem; }
.table .empty { padding: var(--space-6); color: var(--color-text-muted); text-align: center; }

.table th[data-sort] { cursor: pointer; user-select: none; }
.table th[data-sort]:hover { color: var(--color-text); }
.table th[data-sort]::after { content: "↕"; margin-left: var(--space-1); opacity: 0.35; }
.table th[aria-sort="ascending"]::after { content: "↑"; opacity: 1; }
.table th[aria-sort="descending"]::after { content: "↓"; opacity: 1; }

/* Definition list */

.details { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-5); margin: 0; font-size: var(--text-sm); }
.details dt { color: var(--color-text-muted); }
.details dd { margin: 0; }
.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-1); }

/* Log viewer */

.log-card { overflow: hidden; }
.log-card .card-header { background: var(--color-surface); }
.log {
  max-height: 70vh;
  margin: 0;
  padding: var(--space-3) 0;
  overflow: auto;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--color-log-bg);
  color: var(--color-log-text);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  counter-reset: line;
}
.log-line { display: grid; grid-template-columns: 3.5rem 5rem 5.5rem 1fr; align-items: baseline; padding: 0 var(--space-4) 0 0; }
.log-line:hover { background: rgba(255, 255, 255, 0.04); }
.log-line::before {
  counter-increment: line;
  content: counter(line);
  padding-right: var(--space-3);
  color: var(--color-log-muted);
  text-align: right;
  user-select: none;
}
.log-time { color: var(--color-log-muted); }
.log-level { color: var(--color-log-muted); text-transform: uppercase; font-size: var(--text-xs); }
.log-line.info .log-level { color: var(--color-log-info); }
.log-line.warning .log-level { color: var(--color-log-warning); }
.log-line.error .log-level, .log-line.error .log-message { color: var(--color-log-error); }
.log-message { white-space: pre-wrap; word-break: break-word; }
.log .empty { padding: var(--space-4); color: var(--color-log-muted); }
.log[data-filter="warning"] .log-line.info, .log[data-filter="error"] .log-line:not(.error) { display: none; }

/* History */

.timeline { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.revision-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); font-size: var(--text-sm); }
.revision-meta time { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.changed { margin-top: var(--space-2); color: var(--color-text-muted); font-size: var(--text-sm); }
.diff { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: var(--space-3); }
.diff .label-text { display: block; margin-bottom: var(--space-1); color: var(--color-text-muted); }
.diff pre { max-height: 420px; }

details > summary { cursor: pointer; color: var(--color-accent); font-size: var(--text-sm); }
details > summary:hover { text-decoration: underline; }

/* Hardware versions */

.version + .version { margin-top: var(--space-4); }
.version .card-header h3 { display: flex; align-items: center; gap: var(--space-2); }

.danger-zone { margin-top: var(--space-6); border-color: var(--color-danger-soft); }
.danger-zone .card-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.danger-zone .card-body > div { flex: 1 1 20rem; }
.danger-zone .hint { margin: 0; }

/* Sign in and landing */

.center-page { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--space-6) var(--space-4); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .card-body { padding: var(--space-6); }
.auth-logo { display: flex; justify-content: center; margin-bottom: var(--space-4); }
.auth-logo img { width: 64px; height: 64px; padding: var(--space-2); border-radius: 50%; background: var(--color-header-bg); }
.auth-card h1 { text-align: center; }
.auth-card .subtitle { margin: var(--space-2) 0 var(--space-5); color: var(--color-text-muted); font-size: var(--text-sm); text-align: center; }
.auth-card .note { margin: var(--space-4) 0 0; color: var(--color-text-muted); font-size: var(--text-xs); text-align: center; }

.hero { padding: var(--space-6) 0 var(--space-5); }
.hero h1 { font-size: var(--text-xxl); }
.hero p { max-width: 40rem; color: var(--color-text-muted); font-size: var(--text-lg); }
.section-card { padding: var(--space-5); }
.section-card h2 { margin-bottom: var(--space-2); }
.section-card p { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.section-card .figures { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }

/* Utilities */

.muted { color: var(--color-text-muted); }
.small { font-size: var(--text-sm); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Small screens */

@media (max-width: 760px) {
  :root { --gutter: var(--space-4); }
  /* Two rows: brand and account, then the tabs (the first one lined up with the brand) */
  .topbar-inner { height: auto; flex-wrap: wrap; gap: 0 var(--space-3); }
  .brand, .topbar-end { min-height: 48px; }
  .topbar-end { gap: var(--space-3); min-width: 0; }
  .topbar-end .user { display: inline-block; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
  .topbar nav { order: 3; width: calc(100% + var(--space-3)); margin-left: calc(-1 * var(--space-3)); overflow-x: auto; }
  .tabs a { padding: var(--space-3); }
  .topbar-end .clock { display: none; }
  .page { padding-top: var(--space-5); }
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dd { margin-bottom: var(--space-2); }
  .log-line { grid-template-columns: 2rem 4.5rem 4.25rem 1fr; }
}

@media (max-width: 480px) {
  .topbar-end .role { display: none; }
}
@media (max-width: 360px) {
  .brand span { display: none; }
}

/* Groups form sections without a visible box (disabled for read only forms) */
fieldset.plain { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.plain:disabled .input { background: var(--color-surface-muted); color: var(--color-text); opacity: 1; cursor: default; }

/* Device health: ratio meters and a timeline of statuses */

.meter { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 9rem; font-variant-numeric: tabular-nums; }
.meter-bar { position: relative; flex: 1; height: 6px; min-width: 5rem; overflow: hidden; border-radius: var(--radius-pill); background: var(--color-surface-muted); }
.meter-bar span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--color-success); }
.meter.warning .meter-bar span { background: var(--color-warning); }
.meter.problem .meter-bar span { background: var(--color-danger); }
.meter .value { width: 3.5rem; text-align: right; font-size: var(--text-xs); color: var(--color-text-muted); }

.dots { display: inline-flex; align-items: center; gap: 3px; }
.dots .dot { width: 9px; height: 9px; border-radius: 2px; background: var(--color-neutral-soft); }
.dots a.dot:hover { outline: 2px solid var(--color-accent); }
.dots .dot.ok { background: var(--color-success); }
.dots .dot.warning { background: var(--color-warning); }
.dots .dot.problem, .dots .dot.error { background: var(--color-danger); }
.dots .dot.selected { outline: 2px solid var(--color-text); outline-offset: 1px; }
.dots.large { display: flex; flex-wrap: wrap; gap: 4px; }
.dots.large .dot { width: 14px; height: 14px; }

.issues { margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.issues li { white-space: nowrap; }
.intervals { margin: 0; padding: 0; list-style: none; font-size: var(--text-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.check-card + .check-card { margin-top: var(--space-4); }
.check-card .card-header h2 { display: flex; align-items: center; gap: var(--space-2); }

/* Long processing charts */
.chart { display: block; width: 100%; height: 140px; margin-top: var(--space-2); background: var(--color-surface-muted); border-radius: var(--radius-sm); }
.chart polyline { fill: none; stroke: var(--color-accent); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.chart-axis { justify-content: space-between; margin-top: var(--space-1); font-variant-numeric: tabular-nums; }
