:root {
  --ivory: #fbf8f1;
  --paper: #ffffff;
  --ink: #1d1b18;
  --muted: #66615a;
  --line: #e6e0d4;
  --accent: #8a3b12;
  --accent-ink: #ffffff;
  --key: #1d1b18;
  --field: #ffffff;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ivory: #14130f;
    --paper: #1d1c18;
    --ink: #efe9dd;
    --muted: #a59e91;
    --line: #34312a;
    --accent: #e08a52;
    --accent-ink: #1a120c;
    --key: #050504;
    --field: #262420;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

h1, h2, h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.15rem; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* An octave of keys, repeated along the top. */
.keys {
  height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='98' height='28'%3E%3Cg fill='%23fbf8f1' stroke='%23c9c1b2' stroke-width='1'%3E%3Crect x='0.5' y='-1' width='13' height='28.5'/%3E%3Crect x='14.5' y='-1' width='13' height='28.5'/%3E%3Crect x='28.5' y='-1' width='13' height='28.5'/%3E%3Crect x='42.5' y='-1' width='13' height='28.5'/%3E%3Crect x='56.5' y='-1' width='13' height='28.5'/%3E%3Crect x='70.5' y='-1' width='13' height='28.5'/%3E%3Crect x='84.5' y='-1' width='13' height='28.5'/%3E%3C/g%3E%3Cg fill='%231d1b18'%3E%3Crect x='10' y='0' width='8' height='17' rx='1'/%3E%3Crect x='24' y='0' width='8' height='17' rx='1'/%3E%3Crect x='52' y='0' width='8' height='17' rx='1'/%3E%3Crect x='66' y='0' width='8' height='17' rx='1'/%3E%3Crect x='80' y='0' width='8' height='17' rx='1'/%3E%3C/g%3E%3C/svg%3E") repeat-x left top;
  border-bottom: 1px solid var(--line);
}

header.site { padding: 18px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 1.4rem; font-weight: 600; color: var(--ink); text-decoration: none; }
header nav a { margin-left: 18px; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
header nav a:hover { color: var(--ink); }

.hero { padding: 48px 0 56px; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button.quiet { background: transparent; color: var(--accent); }

section { padding: 48px 0; border-top: 1px solid var(--line); }
section > .wrap > p.intro { color: var(--muted); max-width: 42em; margin-top: 0; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 24px; counter-reset: step; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.steps .card::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--key);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.card p { margin: 0; color: var(--muted); }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }

ul.points { padding-left: 1.2em; margin: 0; }
ul.points li { margin: 0.4em 0; }

ol.install { padding-left: 1.3em; }
ol.install li { margin: 0.6em 0; }

.note { font-size: 0.92rem; color: var(--muted); }

form { display: grid; gap: 14px; max-width: 520px; margin-top: 20px; }
label { font-weight: 600; font-size: 0.95rem; }
label span { font-weight: 400; color: var(--muted); }

input, textarea {
  width: 100%;
  margin-top: 4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}

input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.problem {
  display: none;
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--accent);
}

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

@media (max-width: 560px) {
  header nav a { margin-left: 12px; }
  header nav a.optional { display: none; }
  .hero { padding-top: 28px; }
}
