:root {
  --bg: #f3f0e8;
  --surface: #fffdf8;
  --ink: #1b1d1a;
  --muted: #5c635c;
  --line: #ddd6c8;
  --brand: #1f3d48;
  --brand-soft: #e7eef0;
  --accent: #2a5d6b;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(31, 61, 72, 0.07);
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ui: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ui);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(100% - 2rem, 1080px); margin-inline: auto; }
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  font-family: var(--ui);
}
.brand-text strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--brand);
}
.brand-text span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  font-size: 0.92rem;
}
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--brand); }
.nav a.is-current { color: var(--brand); font-weight: 650; }
.hero { padding: 2.3rem 0 1.3rem; }
.hero-card {
  background: linear-gradient(160deg, #fffdf8 0%, #eef4f5 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  box-sizing: border-box;
  box-shadow: var(--shadow);
}
.kicker {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
h1 {
  font-family: var(--font);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.22;
  color: var(--brand);
  margin-bottom: 1rem;
  font-weight: 700;
  max-width: 18ch;
}
.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 62ch;
  margin-bottom: 1.2rem;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--brand);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 650;
  font-size: 0.95rem;
  padding: 0.82rem 1.2rem;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: #152c34; color: #fff !important; }
.btn-secondary {
  background: transparent;
  color: var(--brand) !important;
  border: 1px solid var(--brand);
}
.btn-secondary:hover {
  background: var(--brand-soft);
  color: var(--brand) !important;
}
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 3rem;
}
@media (min-width: 920px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
}
.article, .page {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  box-shadow: var(--shadow);
}
.article h2, .page h2 {
  font-family: var(--font);
  font-size: 1.35rem;
  color: var(--brand);
  margin: 1.8rem 0 0.75rem;
  line-height: 1.3;
  scroll-margin-top: 5rem;
}
.article h2:first-of-type, .page h2:first-of-type { margin-top: 0.35rem; }
.page h1 {
  max-width: none;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  margin-bottom: 0.6rem;
}
.article p, .page p { margin-bottom: 1rem; color: #2a312c; }
.article ul, .page ul {
  margin: 0 0 1.1rem 1.2rem;
  color: #2a312c;
}
.article li, .page li { margin-bottom: 0.45rem; }
.note {
  background: #f7f1df;
  border: 1px solid #e5d7a8;
  border-left: 4px solid #b8932f;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  color: #6b5a2e;
  font-size: 0.95rem;
  margin: 1.2rem 0;
}
.cta-box {
  background: var(--brand-soft);
  border: 1px solid #c5d5d9;
  border-radius: 14px;
  padding: 1.25rem 1.3rem;
  margin: 1.6rem 0 0.4rem;
}
.cta-box h3 {
  color: var(--brand);
  font-size: 1.1rem;
  margin-bottom: 0.45rem;
}
.cta-box p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.98rem;
}
.aside { display: grid; gap: 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}
.card h3 {
  font-size: 0.95rem;
  color: var(--brand);
  margin-bottom: 0.55rem;
}
.card p, .card li { font-size: 0.9rem; color: var(--muted); }
.card ul { margin-left: 1rem; }
.card li { margin-bottom: 0.35rem; }
.toc a {
  display: block;
  padding: 0.35rem 0;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid #eef1ef;
  font-size: 0.9rem;
}
.toc a:last-child { border-bottom: 0; }
.toc a:hover { color: var(--brand); }
.site-footer {
  background: #152c34;
  color: #c5d3d6;
  padding: 2rem 0 1.5rem;
  font-size: 0.9rem;
}
.footer-grid { display: grid; gap: 1.25rem; }
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.site-footer a { color: #eaf3f4; }
.site-footer h4 {
  color: #fff;
  font-size: 0.92rem;
  margin-bottom: 0.55rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.35rem; }
.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: #9eb0b4;
  font-size: 0.82rem;
}
.footer-bottom p { margin-bottom: 0.4rem; }
