:root {
  --paper: #f4efe6;
  --paper-2: #ece4d4;
  --ink: #1c1915;
  --muted: #5a554c;
  --rule: #c9bda8;
  --green: #1c4336;
  --green-ink: #f4efe6;
  --link: #164435;
  --focus: #0b5cab;
  --card: #fffcf6;
  --max: 42rem;
  --wide: 58rem;
}

* { box-sizing: border-box; }

html { font-size: 106.25%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
  z-index: 20;
  background: #fff;
  padding: 0.4rem 0.7rem;
}

.site-header {
  background: var(--green);
  color: var(--green-ink);
}

.site-header a { color: var(--green-ink); }

.header-inner, .footer-inner, .wrap {
  width: min(var(--wide), calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem 0 1rem;
}

.wordmark {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1.2;
}

.wordmark span {
  display: block;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 0.1rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
  font-size: 0.95rem;
}

.nav a { text-decoration: none; border-bottom: 1px solid transparent; }

.nav a:hover, .nav a[aria-current="page"] {
  border-bottom-color: currentColor;
}

.wrap { padding: 1.6rem 0 3rem; }

.prose { width: min(var(--max), 100%); }

h1, h2, h3 {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.7rem;
}

h1 { font-size: 2rem; text-wrap: balance; }

h2 { font-size: 1.4rem; margin-top: 2.2rem; }

h3 { font-size: 1.12rem; margin-top: 1.6rem; }

p, ul, ol, table { margin: 0 0 1rem; }

ul, ol { padding-left: 1.2rem; }

li { margin-bottom: 0.35rem; }

.lede {
  font-size: 1.12rem;
  max-width: 40rem;
}

.muted, .fine { color: var(--muted); }

.fine { font-size: 0.9rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.2rem 0 1.6rem;
}

.btn {
  display: inline-block;
  background: var(--green);
  color: var(--green-ink);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 3px;
  border: 1px solid var(--green);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover { filter: brightness(1.08); }

.btn-secondary {
  background: transparent;
  color: var(--green);
}

.sheet-frame {
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(28, 25, 21, 0.06);
  margin: 0 0 1.2rem;
  width: 100%;
}

.sheet-frame iframe {
  width: 100%;
  height: 72rem;
  border: 0;
  background: #fff;
}

@media (min-width: 700px) {
  .sheet-frame iframe { height: 88rem; }
}

.table-wrap { overflow-x: auto; margin-bottom: 1rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.65rem 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

th { font-weight: 600; width: 34%; }

.example {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 1rem 1.1rem 0.2rem;
  margin: 0 0 1.2rem;
}

.example h3 { margin-top: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 1rem 1.15rem 0.3rem;
  margin: 1.4rem 0;
}

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-inner { padding: 1.4rem 0 2rem; }

.footer-inner p { margin: 0 0 0.45rem; }

.home-hero h1 { margin-bottom: 0.8rem; }

.page-list { list-style: none; padding: 0; }

.page-list li {
  margin: 0 0 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
}

.page-list a { font-weight: 600; text-decoration: none; }

.page-list a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  html { font-size: 100%; }
  h1 { font-size: 1.7rem; }
  .sheet-frame iframe { height: 64rem; }
}
