/* ============================================================================
   NOTICE: Full documentation, design decisions, and fix history for this file
   live in docs/midman-web.md, section "shared/theme.css"
   ============================================================================ */
:root {
  --bg: #0e1116;
  --panel: #151a21;
  --panel-2: #1b222b;
  --line: #262e39;
  --fg: #d7dde5;
  --muted: #8a94a1;
  --accent: #5ec2ff;
  --accent-2: #ffb454;
  --good: #8ddb8c;
  --bad: #ff7a90;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 var(--sans);
}

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

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.site-header .brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
  margin-right: auto;
}

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

.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

.site-header nav a { color: var(--muted); text-decoration: none; padding: 0.2rem 0; }
.site-header nav a[aria-current="page"], .site-header nav a:hover { color: var(--fg); }

main { max-width: 1100px; margin: 0 auto; padding: 1rem; }

h1, h2, h3 { line-height: 1.2; margin: 1.4rem 0 0.6rem; }
h1 { font-size: 1.7rem; margin-top: 0.5rem; }
h2 { font-size: 1.2rem; }

.lede { color: var(--muted); max-width: 62ch; }

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

.grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

code, .mono { font-family: var(--mono); font-size: 0.92em; }

button, select, input {
  font: inherit;
  color: var(--fg);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
}

button { cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary { background: var(--accent); color: #07131c; border-color: var(--accent); font-weight: 600; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

.banner {
  border: 1px solid var(--bad);
  background: rgba(255, 122, 144, 0.08);
  color: var(--fg);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  margin: 0.8rem 0;
}

.banner[hidden] { display: none; }

table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: 0.85rem; }
th, td { text-align: left; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }

footer { max-width: 1100px; margin: 2rem auto; padding: 0 1rem; color: var(--muted); font-size: 0.9rem; }
