:root {
  --paper: #fffcf6;
  --cream: #f5efe4;
  --sand: #f1e9da;
  --line: #e2d6c2;
  --line-strong: #cfc2ab;
  --ink: #22302a;
  --ink-soft: #3b4641;
  --muted: #5b6660;
  --accent: #1e3a2f;
  --accent-soft: #cfd9d2;
  --gold: #c9a65b;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171c19;
    --cream: #1d2320;
    --sand: #232b27;
    --line: #2f3a34;
    --line-strong: #46534c;
    --ink: #f1ebe0;
    --ink-soft: #d6cfc2;
    --muted: #9ea89f;
    --accent: #cfd9d2;
    --accent-soft: #2a3b33;
    --gold: #e9d3a0;
  }
}
:root[data-theme="dark"] {
  --paper: #171c19;
  --cream: #1d2320;
  --sand: #232b27;
  --line: #2f3a34;
  --line-strong: #46534c;
  --ink: #f1ebe0;
  --ink-soft: #d6cfc2;
  --muted: #9ea89f;
  --accent: #cfd9d2;
  --accent-soft: #2a3b33;
  --gold: #e9d3a0;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  padding: 0 16px;
}
a { color: inherit; }

.top, main, footer { max-width: 920px; margin: 0 auto; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0 10px;
}
.brand {
  font-family: var(--serif); font-size: 26px; text-decoration: none; letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 8px;
}
.brand.small { font-size: 20px; }
.mark { color: var(--gold); }
.top nav a, footer nav a {
  text-decoration: none; color: var(--muted); margin-left: 18px; font-size: 15px;
}
.top nav a:hover, footer nav a:hover { color: var(--ink); }

.hero { padding: 56px 0 40px; }
h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 7vw, 68px);
  line-height: 1.02; margin: 0 0 18px; letter-spacing: -0.01em;
}
h1 em { font-style: italic; color: var(--accent); }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 36em; margin: 0; }

.eyebrow {
  font-size: 13px; text-transform: lowercase; letter-spacing: 0.12em; color: var(--muted);
  font-weight: 600; margin: 0 0 14px;
}
.tools { padding: 10px 0 44px; }
.grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  background: var(--cream); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 22px 20px; text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
a.card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; margin: 2px 0 0; }
.card .by { color: var(--muted); font-size: 20px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15.5px; flex: 1; }
.card-tag {
  align-self: flex-start; font-size: 12px; letter-spacing: 0.1em; text-transform: lowercase;
  background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-weight: 600;
}
.go { color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none; }
.card.ghost { background: transparent; border-style: dashed; }

.about { padding: 8px 0 56px; border-top: 1px solid var(--line); }
.about p { max-width: 40em; color: var(--ink-soft); }

footer {
  display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line); padding: 20px 0 36px; font-size: 14px; color: var(--muted);
}
footer nav a { margin-left: 0; margin-right: 18px; }

.legal h1 { font-size: clamp(34px, 6vw, 52px); }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); max-width: 42em; }
.legal .meta { color: var(--muted); font-size: 14px; }
