:root {
  --bg: #1d1712;
  --panel: #2a211a;
  --paper: #efe4cc;
  --ink: #2b1d12;
  --text: #ece2cf;
  --muted: #b9a88c;
  --accent: #b8925a;
  --error: #c0503e;
  --warn: #d6a640;
  --note: #8fa6b8;
  --radius: 6px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Source Sans 3", system-ui, sans-serif;
}
header, main { max-width: 820px; margin: 0 auto; padding: 0 16px; }
header { padding-top: 32px; }
h1, h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; color: var(--paper); }
h1 { font-size: 2.2rem; margin: 0 0 4px; }
h2 { font-size: 1.5rem; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.lead { color: var(--muted); margin-top: 0; }
.num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--ink); font: 600 1rem "Source Sans 3", sans-serif;
}
.step, .reference details {
  background: var(--panel); border: 1px solid #4a3a2c; border-radius: var(--radius);
  padding: 20px; margin: 20px 0;
}
.reference details { padding: 14px 20px; }
summary { cursor: pointer; color: var(--paper); font-weight: 600; }
.banner { background: var(--error); color: #fff; padding: 10px 14px; border-radius: var(--radius); }
.hint { color: var(--muted); font-size: 0.93rem; }
.switch { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
button {
  font: 600 1rem "Source Sans 3", sans-serif; padding: 10px 18px; border-radius: var(--radius);
  border: 1px solid var(--accent); background: transparent; color: var(--paper); cursor: pointer;
}
button.primary { background: var(--accent); color: var(--ink); }
button:disabled { opacity: 0.4; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
textarea, input[type=search] {
  width: 100%; background: var(--paper); color: var(--ink); border: 0; border-radius: var(--radius);
  padding: 12px; font: 14px/1.45 ui-monospace, "SFMono-Regular", Consolas, monospace;
}
input[type=search] { font-family: inherit; font-size: 1rem; margin: 12px 0; }
/* 16px keeps iOS from zooming in when the field gets focus. */
textarea { font-size: 16px; }
pre {
  background: var(--paper); color: var(--ink); padding: 12px; border-radius: var(--radius);
  overflow-x: auto; font-size: 13px; white-space: pre-wrap; word-break: break-word;
}
.summary { font-weight: 600; }
.issues { padding-left: 22px; }
.issues li { margin: 6px 0; overflow-wrap: anywhere; }
.issues li.error::marker { color: var(--error); }
.issues li.warning::marker { color: var(--warn); }
.issues li.note::marker { color: var(--note); }
.issues .where, .notes .where { color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; display: block; }
.tag { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; margin-right: 6px; }
.error .tag { color: var(--error); }
.warning .tag { color: var(--warn); }
.note .tag { color: var(--note); }
.notes { border-left: 3px solid var(--note); padding: 4px 0 4px 14px; margin: 12px 0; }
.notes h3 { font-size: 0.95rem; margin: 0 0 4px; color: var(--note); }
.notes ul { margin: 0; padding-left: 18px; color: var(--muted); }
.notes li { margin: 6px 0; overflow-wrap: anywhere; }
.results { list-style: none; padding: 0; max-height: 360px; overflow-y: auto; }
.results li { padding: 6px 0; border-bottom: 1px solid #3a2e24; overflow-wrap: anywhere; }
.results small { color: var(--muted); display: block; }
.howto li { margin: 4px 0; }
code { color: var(--paper); overflow-wrap: anywhere; }
.share a { color: var(--accent); }
.about { background: var(--panel); border: 1px solid #4a3a2c; border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.about figure { margin: 16px 0; }
.about img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.about figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.about a { color: var(--accent); }
a.button {
  display: inline-block; text-decoration: none; font: 600 1rem "Source Sans 3", sans-serif; padding: 10px 18px;
  border-radius: var(--radius); border: 1px solid var(--accent); color: var(--paper);
}
a.button.primary { background: var(--accent); color: var(--ink); }
