:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #595959;
  --line: #e2e2e2;
  --code-bg: #f4f4f4;
  --term-bg: #16181d;
  --term-fg: #e6e6e6;
  --accent: #0b57d0;
  --read: #1e7d32;
  --mutate: #0b6e99;
  --egress: #9a6700;
  --secrets: #8a2be2;
  --destructive: #c62828;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316;
    --fg: #ececec;
    --muted: #a3a3a3;
    --line: #2b2d33;
    --code-bg: #1e2026;
    --term-bg: #0b0c0f;
    --term-fg: #e6e6e6;
    --accent: #8ab4f8;
    --read: #7ddc8a;
    --mutate: #7cc7ea;
    --egress: #f0c674;
    --secrets: #d0a0ff;
    --destructive: #ff7b72;
  }
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

code, pre, .steps {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

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

.top, main, footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.brand { color: var(--fg); text-decoration: none; font-weight: 700; font-size: 1.15rem; }

nav a { margin-left: 1.1rem; color: var(--muted); text-decoration: none; }
nav a:hover, nav a:focus { color: var(--fg); text-decoration: underline; }

section { margin: 3rem 0; }

h1 { font-size: 2.1rem; line-height: 1.15; margin: 0.5rem 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; margin: 0 0 0.75rem; }

.hero > p { font-size: 1.1rem; color: var(--muted); margin: 0 0 1.5rem; }

code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
pre code { background: none; padding: 0; }

pre {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  overflow-x: auto;
  background: var(--code-bg);
}

/* Install tabs, CSS only: the radios are visually hidden, the labels are the tabs. */
.tabs { margin-top: 1rem; }

.tabs label {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  margin: 0 0.25rem 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  color: var(--muted);
  cursor: pointer;
}

.tabs input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.tabs .panel { display: none; border-radius: 0 8px 8px 8px; }

#tab-unix:checked ~ label[for="tab-unix"],
#tab-win:checked ~ label[for="tab-win"],
#tab-brew:checked ~ label[for="tab-brew"] { color: var(--fg); background: var(--code-bg); font-weight: 600; }

#tab-unix:checked ~ #panel-unix,
#tab-win:checked ~ #panel-win,
#tab-brew:checked ~ #panel-brew { display: block; }

.then { color: var(--muted); margin-top: 0.75rem; }

.term { background: var(--term-bg); color: var(--term-fg); }
.term .prompt { color: #8a8f98; }

.read { color: var(--read); font-weight: 600; }
.mutate { color: var(--mutate); font-weight: 600; }
.egress { color: var(--egress); font-weight: 600; }
.secrets { color: var(--secrets); font-weight: 600; }
.destructive { color: var(--destructive); font-weight: 600; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.6rem 0.5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.9rem; }

.rules dt { margin-top: 0.9rem; }
.rules dd { margin: 0.2rem 0 0; color: var(--muted); }

.steps { font-size: 1.05rem; margin: 0 0 0.75rem; }

ul { padding-left: 1.2rem; }

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

footer { color: var(--muted); border-top: 1px solid var(--line); padding-top: 1.25rem; padding-bottom: 2rem; margin-top: 2rem; font-size: 0.95rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
