*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --muted: #666;
  --border: #e0e0e0;
  --accent: #18843d;
  --accent-hover: #146b31;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #ececec;
    --muted: #999;
    --border: #2a2a2a;
    --accent: #2ecc71;
    --accent-hover: #27ae60;
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

header {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.logo:hover { text-decoration: none; color: var(--accent); }

nav a {
  font-size: 0.9rem;
  color: var(--muted);
  margin-left: 1rem;
}

nav a:hover,
nav a.active { color: var(--accent); text-decoration: none; }

main { flex: 1; padding: 2.5rem 0 3rem; }

h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.35rem;
  border-radius: 6px;
  text-decoration: none;
  margin-bottom: 2rem;
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #fff;
}

.features {
  list-style: none;
  margin-bottom: 2rem;
}

.features li {
  padding: 0.35rem 0;
  padding-left: 1.1rem;
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
}

.features li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.meta {
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.meta dt {
  display: inline;
  font-weight: 600;
  color: var(--text);
}

.meta dt::after { content: ": "; }

.meta dd {
  display: inline;
  margin-right: 1.25rem;
}

.meta dd::after { content: " · "; }

.meta dd:last-child::after { content: ""; }

footer {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Manual */
.manual-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
}

.manual-nav a { color: var(--muted); }
.manual-nav a:hover { color: var(--accent); text-decoration: none; }

section { margin-bottom: 2.25rem; scroll-margin-top: 1rem; }

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  color: var(--text);
}

section p,
section li {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

section ul { padding-left: 1.2rem; margin-bottom: 0.5rem; }

section code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85em;
  background: var(--border);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: var(--text);
}

.kbd-table {
  width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.kbd-table td {
  padding: 0.3rem 0;
  vertical-align: top;
  color: var(--muted);
}

.kbd-table td:first-child {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--text);
  white-space: nowrap;
  padding-right: 1rem;
  width: 42%;
}
