:root {
  --ink: #14201c;
  --muted: #4a5a54;
  --paper: #f3f6f2;
  --paper-2: #e7eee8;
  --line: #c5d0c8;
  --accent: #0f6b4c;
  --accent-2: #c45c26;
  --ok: #1f7a4d;
  --warn: #a66b12;
  --hole: #b42318;
  --unknown: #6b7280;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1100px;
  --pad: clamp(1rem, 3vw, 2rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.5;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(15, 107, 76, 0.12), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(196, 92, 38, 0.08), transparent 50%),
    linear-gradient(180deg, #eef3ef 0%, var(--paper) 28%, #f7f8f5 100%);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }

.wrap { width: min(var(--max), 100% - 2 * var(--pad)); margin-inline: auto; }

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 0.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.75rem;
  animation: rise 0.55s ease-out both;
}

.brand {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.55rem, 3.5vw, 2.15rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand span { color: var(--accent); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  font-size: 0.92rem;
}

.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.hero {
  padding: 0.5rem 0 1.75rem;
  animation: rise 0.7s ease-out 0.05s both;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 0.65rem;
  max-width: 18ch;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
  font-size: 1.05rem;
}

.badge {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  border-bottom: 1px solid color-mix(in srgb, var(--accent-2) 40%, transparent);
  padding-bottom: 0.15rem;
  animation: fade 0.9s ease 0.2s both;
}

.section {
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--line);
  animation: rise 0.6s ease-out both;
}

.section h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.section .lede {
  margin: 0 0 1.1rem;
  color: var(--muted);
  max-width: 40rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem 1.5rem;
  margin: 1rem 0 0;
}

.metric dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}

.metric dd {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.metric dd small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.15rem;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.data th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}

table.data tr:hover td { background: color-mix(in srgb, var(--paper-2) 70%, transparent); }

.num { font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 0.88em; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: 0.85em; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--unknown);
}

.status.ok::before { background: var(--ok); }
.status.warn::before { background: var(--warn); }
.status.hole::before { background: var(--hole); }
.status.unknown::before { background: var(--unknown); }

.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feed-list li {
  display: grid;
  grid-template-columns: 9rem 1fr auto;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 640px) {
  .feed-list li { grid-template-columns: 1fr; gap: 0.25rem; }
  .site-header { flex-direction: column; align-items: flex-start; }
}

.log-block {
  background: #121a17;
  color: #d7e3dc;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.45;
  padding: 0.9rem 1rem;
  overflow: auto;
  max-height: 220px;
  white-space: pre-wrap;
  margin: 0.5rem 0 1.25rem;
}

.login-form {
  max-width: 22rem;
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.login-form label { font-size: 0.9rem; color: var(--muted); }

.login-form input[type="password"] {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.login-form button,
.btn {
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border: 0;
  background: var(--ink);
  color: #f5f8f5;
  cursor: pointer;
  width: fit-content;
}

.login-form button:hover,
.btn:hover { background: var(--accent); }

.error {
  color: var(--hole);
  font-size: 0.92rem;
}

.lock-note {
  font-size: 0.9rem;
  color: var(--accent-2);
  margin: 0.5rem 0 1rem;
}

.site-footer {
  margin: 2.5rem 0 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

details.private-row {
  margin: 0.35rem 0;
}

details.private-row summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
