:root {
  --surface: #f7f5f0;
  --ink: #2a2622;
  --ink-strong: #17140f;
  --muted: #8a827a;
  --rule: #e2ddd4;
  --accent: #234e3f;
  --tint: #efece4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, Cambria, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #100f0d;
    --ink: #d6d0c6;
    --ink-strong: #f1ede6;
    --muted: #7b756c;
    --rule: #26231f;
    --accent: #8fc4ad;
    --tint: #171512;
  }
}

* { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

a {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size .3s ease;
  padding-bottom: 1px;
}
a:hover, a:focus-visible { background-size: 100% 1px; }

main {
  max-width: 660px;
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
}

header { margin-bottom: 6rem; }
.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
}
.wordmark a { color: inherit; background: none; }
.kicker, .label, footer {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker { margin-top: .35rem; }
.label { margin: 0 0 1rem; }

.opening {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 1.1rem + 1.8vw, 2.15rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
  margin: 0 0 1.25rem;
}
.opening em { font-style: italic; color: var(--accent); }

section { margin-top: 6rem; }
h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 1.3rem + 2.4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  margin: 0 0 1.25rem;
}
h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
  margin: 0 0 1.25rem;
}
h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-strong);
  margin: 3rem 0 1rem;
}
p { margin: 0 0 1.25rem; }
p:last-child { margin-bottom: 0; }
strong { color: var(--ink-strong); font-weight: 600; }
em { font-style: italic; }

ul, ol { list-style: none; padding: 0; margin: 0 0 1.25rem; }
li { position: relative; padding-left: 1.6rem; margin-bottom: 1.25rem; }
li:last-child { margin-bottom: 0; }
ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.55rem;
  height: 1px;
  background: var(--accent);
}
ol { counter-reset: item; }
ol li { padding-left: 2.2rem; }
ol li::before {
  counter-increment: item;
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.35em;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}
li p { margin-bottom: .5rem; }

.closing {
  margin-top: 7rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
}
.closing p {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1rem + 1.2vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
  margin-bottom: 1.5rem;
}
.closing .contacts { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.closing a { font-family: var(--sans); font-size: 1rem; }
.closing .next { margin-top: 2.5rem; }

footer {
  margin-top: 6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
footer a { color: inherit; }

/* Brief page */
section.first { margin-top: 3rem; }
ul.compact li { margin-bottom: .6rem; }
.parts { margin: 0; border-top: 1px solid var(--rule); }
.parts > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  column-gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}
.parts dt {
  grid-row: 1 / span 2;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-strong);
}
.parts dd { margin: 0; font-size: 1rem; line-height: 1.55; }
.parts dd.ex {
  position: relative;
  margin-top: .45rem;
  padding-left: 1.1rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
}
.parts dd.ex::before {
  content: "";
  position: absolute;
  left: 0;
  top: .75em;
  width: .5rem;
  height: 1px;
  background: var(--accent);
}
@media (max-width: 600px) {
  .parts > div { grid-template-columns: 1fr; row-gap: .25rem; }
  .parts dt { grid-row: auto; }
}
details summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink-strong);
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; display: inline-block; width: 1.4rem; color: var(--accent); font-family: var(--mono); }
details[open] summary::before { content: "\2013"; }
details .note { color: var(--muted); font-size: .95rem; margin: .75rem 0 0; }
.closing .note { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.closing .note a { font-size: inherit; }
.lede {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink-strong);
}
.rule { margin: 0 0 1.25rem; }
.example {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--rule);
}
.example p { margin-bottom: .75rem; }
.example .tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-right: .6rem;
}
.example .good .tag { color: var(--accent); }
.example .weak .tag { color: var(--muted); }
.example .note { color: var(--muted); font-size: 0.95rem; }

.ai { margin-top: 2.5rem; padding: 1.5rem; border: 1px solid var(--rule); }
.ai .label { margin-bottom: .6rem; }
.ai p { margin-bottom: .75rem; }
.ai .note { color: var(--muted); font-size: .95rem; margin-bottom: 0; }

.card {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  background: var(--tint);
}
.card h2 { font-size: 1.4rem; margin-bottom: .25rem; }
.card .meta { color: var(--muted); font-size: .95rem; margin-bottom: 2rem; }
.card h3 { margin-top: 2.25rem; }
.card h3:first-of-type { margin-top: 0; }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: .6rem .75rem .6rem 0; border-bottom: 1px solid var(--rule); }
th {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
td.n { font-family: var(--mono); font-size: .75rem; color: var(--muted); white-space: nowrap; }
td.when { white-space: nowrap; }

@media (max-width: 600px) {
  main { padding-top: 4rem; }
  section { margin-top: 4.5rem; }
  header { margin-bottom: 4.5rem; }
  .closing { margin-top: 5rem; }
  .card { margin-left: -1.5rem; margin-right: -1.5rem; padding: 2rem 1.5rem; }
  table { min-width: 560px; }
}

@media (prefers-reduced-motion: no-preference) {
  main > * { animation: rise .6s ease-out both; }
  main > *:nth-child(2) { animation-delay: .08s; }
  main > *:nth-child(3) { animation-delay: .16s; }
  main > *:nth-child(n+4) { animation-delay: .22s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}
