*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --paper: #f3eee4;
  --ink: #1c1915;
  --muted: #5e584f;
  --rule: #cfc6b8;
  --card: #eae3d6;
  --accent: #345544;
}

html {
  font-size: 19px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Cambria,
    "Times New Roman", Times, serif;
  line-height: 1.55;
}

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

a:hover {
  color: var(--ink);
}

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

.wrap {
  width: min(40rem, calc(100% - 2.4rem));
  margin: 0 auto;
}

header {
  padding: 1.2rem 0 0;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-block;
  color: var(--ink);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

.tag {
  margin: 0.15rem 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

main {
  flex: 1;
  padding: 2rem 0 3.2rem;
}

.back {
  display: inline-block;
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: uppercase;
}

.back:hover {
  color: var(--ink);
}

h1 {
  margin: 0 0 0.8rem;
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.lede,
.note {
  margin: 0 0 1rem;
}

.note,
.hint {
  color: var(--muted);
  font-size: 0.95rem;
}

.toc {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.toc li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.toc a {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 600;
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.toc p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.message {
  margin: 1.5rem 0 0;
  padding: 1.1rem 1.15rem 1.15rem;
  background: var(--card);
}

.message h2 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.hint {
  margin: 0 0 0.85rem;
}

pre {
  margin: 0 0 0.85rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.copy {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 0.32rem 0.7rem;
  cursor: pointer;
}

.copy:hover,
.copy[data-copied] {
  color: var(--paper);
  background: var(--ink);
}

.ad-slot {
  display: block;
  position: static;
  clear: both;
  margin: 1.15rem 0 0.25rem;
  padding: 0;
  min-height: 5.5rem;
  border: 0;
  background: transparent;
  pointer-events: none;
}

footer {
  padding: 1.2rem 0 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  margin: 0.2rem 0;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

@media (max-width: 40rem) {
  html {
    font-size: 17px;
  }
}
