/* Metrion static stylesheet */
:root {
  color-scheme: light dark;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #18202a;
  --muted: #5d6875;
  --line: #d7dde4;
  --accent: #315f78;
  --accent-strong: #21475e;
  --code-bg: #eef2f5;
  --ok: #26734d;
  --stale: #9a6514;
  --shadow: 0 10px 28px rgba(22, 32, 42, 0.06);
  --radius: 10px;
  --content: 920px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161b;
    --panel: #171e24;
    --text: #e5ebf0;
    --muted: #9ca8b3;
    --line: #2c3741;
    --accent: #7fb1ca;
    --accent-strong: #a5c9db;
    --code-bg: #10161b;
    --ok: #72c39a;
    --stale: #e0b86d;
    --shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

img,
svg {
  max-width: 100%;
}

code,
pre {
  font-family: inherit;
}

code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.08rem 0.28rem;
}

pre {
  margin: 1.25rem 0;
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--code-bg);
  font-size: 0.9rem;
  line-height: 1.55;
}

pre code {
  padding: 0;
  background: transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.92rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.68rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 650;
}

caption {
  padding: 0 0 0.6rem;
  color: var(--muted);
  text-align: left;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.header-inner,
main,
.footer-inner {
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}

.site-nav ul {
  display: flex;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.4rem 0.55rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--text);
  background: var(--panel);
}

main {
  min-height: calc(100vh - 154px);
  padding-block: 3.5rem 4rem;
}

.hero {
  padding: 1rem 0 2.5rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.28;
  letter-spacing: -0.025em;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 3.6rem);
}

h2 {
  margin: 2.35rem 0 0.9rem;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

h3 {
  margin: 1.8rem 0 0.55rem;
  font-size: 1.05rem;
}

.lead {
  max-width: 70ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.note-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.note-list li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.note-list time,
.meta,
.status-summary,
.small {
  color: var(--muted);
  font-size: 0.88rem;
}

.note-list a {
  font-weight: 650;
}

.article {
  max-width: 78ch;
}

.article-header {
  margin-bottom: 2.4rem;
}

.article h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
}

.article p {
  margin: 0.95rem 0;
}

.article ul,
.article ol {
  padding-left: 1.4rem;
}

.callout {
  margin: 1.4rem 0;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--panel);
}

.status-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.status-table-wrap table {
  margin: 0;
  min-width: 720px;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  font-weight: 650;
}

.state::before {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.state-online {
  color: var(--ok);
}

.state-stale {
  color: var(--stale);
}

.status-note {
  margin: 0 0 1rem;
  color: var(--muted);
}

.kv {
  display: grid;
  grid-template-columns: minmax(8rem, 0.45fr) 1fr;
  border-top: 1px solid var(--line);
}

.kv div {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.kv div:nth-child(odd) {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.15rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner p {
  margin: 0;
}

.error-code {
  margin: 0;
  color: var(--accent);
  font-size: clamp(4rem, 16vw, 8rem);
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 700px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
    padding-block: 1rem;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
  }

  .site-nav ul {
    width: max-content;
  }

  main {
    padding-block: 2.3rem 3rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .note-list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .kv {
    grid-template-columns: 1fr;
  }

  .kv div:nth-child(odd) {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
