:root {
  --ink: #1b1916;
  --ink-soft: #3f3a33;
  --muted: #6b645b;
  --paper: #f7f3ea;
  --paper-2: #efe8d8;
  --card: #fffdf8;
  --line: #ddd4c2;
  --accent: #0f6e63;
  --accent-2: #0b574e;
  --accent-soft: #dceeea;
  --warn: #8a4b12;
  --warn-bg: #f6ead8;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(27, 25, 22, 0.07);
  --max: 70rem;
  --prose: 44rem;
  --sans: "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Source Serif 4", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, #e8efe8 0%, transparent 55%),
    var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 234, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: -0.04em;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-tag {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: flex-end;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent-2);
  text-decoration: underline;
}

.hero,
.page-hero {
  padding: 2.6rem 0 1.6rem;
}

.kicker {
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.15rem);
  margin: 0 0 0.8rem;
  max-width: 16ch;
}

.lede {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 42rem;
  margin: 0 0 1.4rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  text-decoration: none;
  font-weight: 650;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-2);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.section-title {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin: 0 0 0.9rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  padding-bottom: 2.2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.28rem;
  margin: 0 0 0.45rem;
}

.card p {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
}

.card .more {
  font-weight: 650;
  text-decoration: none;
}

.note {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0 0 2rem;
}

.prose {
  max-width: var(--prose);
  padding-bottom: 3rem;
}

.prose h1 {
  max-width: none;
  margin-bottom: 0.5rem;
}

.meta {
  color: var(--muted);
  margin: 0 0 1.4rem;
  font-size: 0.95rem;
}

.prose h2 {
  font-size: 1.55rem;
  margin: 2rem 0 0.7rem;
}

.prose h3 {
  font-size: 1.18rem;
  margin: 1.4rem 0 0.45rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

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

.prose li + li {
  margin-top: 0.35rem;
}

.callout {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn);
  padding: 0.85rem 1rem;
  border-radius: 0 10px 10px 0;
  margin: 1.2rem 0;
}

.callout strong {
  color: var(--warn);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
}

.checklist li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem 0.75rem 2.4rem;
  position: relative;
  margin-top: 0.5rem;
}

.checklist li::before {
  content: "";
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--accent);
  border-radius: 4px;
  position: absolute;
  left: 0.8rem;
  top: 0.95rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0.2rem 0 1rem 2.6rem;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.related {
  margin: 2.2rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.related ul {
  padding-left: 1.1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0 0 1.5rem;
}

.toc p {
  margin: 0 0 0.4rem;
  font-weight: 700;
  color: var(--ink);
}

.toc ol {
  margin: 0;
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    justify-content: flex-start;
  }

  h1 {
    max-width: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .actions,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
  }

  a {
    color: inherit;
  }
}
