/* The probe's look: the UI's day and night grounds (tropfwerk-ui, the
   showroom icon's #eef1f4 and the night #0b0c0e), system font, nothing
   loaded from elsewhere (the CSP allows only our own files). */

:root {
  color-scheme: light dark;
  --ground: #eef1f4;
  --card: #ffffff;
  --text: #1b1f24;
  --muted: #5c6670;
  --line: #dde2e7;
  --accent: #1c6cb4;
  --accent-text: #ffffff;
  --good: #23824b;
  --bad: #b3261e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0b0c0e;
    --card: #16181c;
    --text: #e8eaed;
    --muted: #9aa3ad;
    --line: #2a2e34;
    --accent: #5ca8e8;
    --accent-text: #0b0c0e;
    --good: #5cc28a;
    --bad: #f2867e;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 560px;
  margin: 0 auto;
  /* The home screen app runs under the notch and the home bar. */
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
}

.top h1 {
  font-size: 22px;
  margin: 0;
}

.badge {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

.lead {
  margin: 12px 0 16px;
  font-size: 17px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 16px;
}

.card h2 {
  font-size: 15px;
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 600;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.facts {
  margin: 0;
}

.facts div {
  display: grid;
  grid-template-columns: minmax(0, 11em) minmax(0, 1fr);
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.facts div:first-child {
  border-top: 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.good {
  color: var(--good);
}

.bad {
  color: var(--bad);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

button {
  font: inherit;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}

button.quiet {
  background: transparent;
  color: var(--accent);
}

button.link {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent);
}

button[disabled] {
  opacity: 0.5;
  cursor: default;
}

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.log li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.log li:first-child {
  border-top: 0;
}

.log time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.log span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* On a phone the two columns left the values a third of the width (six
   lines for the cloud check at 375 px, measured 2026-10-19): label above value. */
@media (max-width: 480px) {
  .facts div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .facts dt {
    font-size: 13px;
  }
}
