:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f2ea;
  color: #20211f;
  --muted: #62665f;
  --line: #ded7c8;
  --accent: #2f5d50;
  --paper: #fffdf8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(47, 93, 80, 0.08), transparent 280px), #f5f2ea;
  color: #20211f;
}

a {
  color: inherit;
  text-decoration-color: rgba(47, 93, 80, 0.35);
  text-underline-offset: 3px;
}

.wrap {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

header {
  padding: 28px 0 18px;
  border-bottom: 1px solid var(--line);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #f7f3e8;
  font-weight: 800;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

main { padding-bottom: 48px; }

.intro {
  padding: 54px 0 34px;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 650;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
  max-width: 820px;
}

.lede {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 740px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 42px;
  align-items: start;
  padding: 18px 0 46px;
}

.section-title {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-list article,
.archive-list article {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.post-list article:last-child,
.archive-list article:last-child { border-bottom: 1px solid var(--line); }

h2 {
  margin: 0 0 8px;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.72;
}

.date {
  display: block;
  margin-bottom: 8px;
  color: #8a6c28;
  font-size: 13px;
  font-weight: 650;
}

.post-meta {
  margin: 0 0 12px;
  color: #8a6c28;
  font-size: 13px;
  font-weight: 650;
}

aside,
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 16px 40px rgba(54, 43, 23, 0.07);
}

aside h2,
.panel h2 {
  margin-top: 0;
  font-size: 18px;
}

aside p,
aside li,
.panel p,
.panel li {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

ul { padding-left: 18px; }

.note {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.article-body {
  width: min(760px, 100%);
  padding: 44px 0 10px;
}

.article-body h1 { font-size: clamp(34px, 5vw, 52px); }

.article-body p,
.article-body li {
  font-size: 17px;
  line-height: 1.82;
}

.article-body h2 {
  margin-top: 34px;
  font-size: 25px;
}

.backlink {
  display: inline-block;
  margin-top: 34px;
  color: var(--accent);
  font-weight: 650;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 760px) {
  .wrap { width: min(100% - 28px, 1080px); }
  .topbar { align-items: flex-start; }
  nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 14px;
  }
  .intro { padding-top: 38px; }
  .grid,
  .cards { grid-template-columns: 1fr; }
}

@media (prefers-color-scheme: dark) {
  :root {
    background: #171916;
    color: #ece8dc;
    --muted: #b0aa9b;
    --line: #3a392f;
    --accent: #7bb49b;
    --paper: #20221e;
  }
  body { background: linear-gradient(180deg, rgba(123, 180, 155, 0.10), transparent 300px), #171916; color: #ece8dc; }
  .date { color: #d7b766; }
  .post-meta { color: #d7b766; }
  .mark { background: #2f5d50; }
}
