:root {
  --bg: #f7f5f0;
  --paper: #ffffff;
  --ink: #1f2a33;
  --muted: #5b6770;
  --line: #e2ddd3;
  --accent: #2f6f8f;
  --accent-dark: #1f4f68;
  --pine: #2e5a46;
  --radius: 14px;
  --max: 1080px;
  --read: 700px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.2px;
}
.logo svg { width: 30px; height: 30px; }
.logo span small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); letter-spacing: 0; line-height: 1.2; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 16px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Hero */
.hero { position: relative; overflow: hidden; background: #dfe9ee; }
.hero img { width: 100%; height: 360px; object-fit: cover; }
.hero-text {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0 0 36px;
}
.hero-text .wrap > div {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  padding: 22px 26px;
  max-width: 560px;
}
.hero h1 { margin: 0 0 6px; font-size: 34px; line-height: 1.2; }
.hero p { margin: 0; color: var(--muted); font-size: 17px; }

/* Sections */
main { padding: 44px 0 64px; }
.section-title { font-size: 24px; margin: 0 0 20px; }
.lead { font-size: 19px; color: var(--muted); max-width: var(--read); margin: 0 0 36px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(31, 42, 51, 0.08); }
.card a.cover img { width: 100%; height: 180px; object-fit: cover; }
.card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 20px; line-height: 1.3; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.meta { font-size: 14px; color: var(--muted); }
.tag {
  display: inline-block;
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e7eef1;
  color: var(--accent-dark);
  margin-right: 6px;
}

.note {
  margin-top: 48px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  max-width: var(--read);
}
.note h2 { margin: 0 0 8px; font-size: 20px; }
.note p { margin: 0; color: var(--muted); }

/* Article */
.article { max-width: var(--read); margin: 0 auto; }
.article .cover { border-radius: var(--radius); overflow: hidden; margin: 0 0 28px; border: 1px solid var(--line); }
.article .cover img { width: 100%; height: 300px; object-fit: cover; }
.article h1 { font-size: 34px; line-height: 1.2; margin: 0 0 10px; }
.article h2 { font-size: 24px; margin: 36px 0 10px; }
.article p, .article li { color: #2b3741; }
.article ul { padding-left: 22px; }
.article li { margin: 6px 0; }
.tip {
  background: #eef4f1;
  border-left: 4px solid var(--pine);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 24px 0;
}
.tip strong { color: var(--pine); }
.next {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 16px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 15px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  padding-bottom: 22px;
}
.site-footer a { color: var(--muted); }

/* 404 */
.notfound { text-align: center; padding: 60px 0; }
.notfound h1 { font-size: 64px; margin: 0; color: var(--accent); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero img { height: 300px; }
  .hero h1, .article h1 { font-size: 28px; }
  .hero-text .wrap > div { padding: 18px 20px; }
  .article .cover img { height: 220px; }
}
