:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --text: #1c2321;
  --muted: #5d6965;
  --line: #dfe4e0;
  --accent: #1f6f5c;
  --accent-text: #ffffff;
  --ok: #1f6f5c;
  --wait: #9a6b00;
  --danger: #b3261e;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121615;
    --surface: #1b2120;
    --text: #e6ebe8;
    --muted: #9aa7a2;
    --line: #2c3533;
    --accent: #4fb89b;
    --accent-text: #0d1211;
    --ok: #4fb89b;
    --wait: #e0b04a;
    --danger: #f2827a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

main, header, footer { max-width: 880px; margin: 0 auto; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  flex-wrap: wrap;
}

.logo { font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.logo span { color: var(--accent); }

nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); }

h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; letter-spacing: -0.02em; margin: 48px 0 16px; }
h2 { font-size: 1.5rem; margin: 56px 0 16px; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

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

.button, button {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary, button.secondary { background: transparent; color: var(--accent); }
button.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
button:disabled { opacity: 0.6; cursor: wait; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

ul.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
ul.checks li { padding-left: 28px; position: relative; }
ul.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

input, select {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

label { display: grid; gap: 4px; font-size: 0.9rem; color: var(--muted); }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > label { flex: 1 1 180px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; overflow-wrap: anywhere; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; border: 1px solid currentColor; }
.badge.ok { color: var(--ok); }
.badge.wait { color: var(--wait); }

.notice.ok { border-left-color: var(--ok); }
.notice { border-left: 4px solid var(--wait); padding: 12px 16px; background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.error { color: var(--danger); min-height: 1.6em; }

.key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  padding: 14px;
  background: var(--bg);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
  user-select: all;
}

.stack { display: grid; gap: 16px; }

footer { padding: 48px 0 32px; color: var(--muted); font-size: 0.9rem; }

[hidden] { display: none !important; }
.capitalize { text-transform: capitalize; }
