:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #1f2328;
  --ink-soft: #4a5159;
  --muted: #767d85;
  --line: #e7e3dd;
  --accent: #3a6ea5;
  --accent-soft: #eaf1f8;
  --radius: 14px;
  --maxw: 720px;
}

* { box-sizing: border-box; }

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand span { color: var(--accent); }
.nav a { color: var(--ink-soft); font-size: 0.95rem; margin-left: 18px; }

/* Hero / intro */
.hero {
  padding: 56px 0 28px;
}
.hero h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Article */
article { padding: 8px 0 40px; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); padding: 22px 0 0; }
.breadcrumb a { color: var(--muted); }
.post-meta { font-size: 0.9rem; color: var(--muted); margin: 6px 0 22px; }
.hero-img {
  width: 100%;
  border-radius: var(--radius);
  margin: 8px 0 28px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 22%;
}
article h1 {
  font-size: 2rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
article h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 38px 0 12px;
  letter-spacing: -0.01em;
}
article h3 { font-size: 1.12rem; margin: 26px 0 8px; }
article p { margin: 0 0 18px; }
article ul, article ol { margin: 0 0 18px; padding-left: 22px; }
article li { margin: 0 0 8px; }
.summary {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 0 0 26px;
  font-size: 1.02rem;
}
.summary strong { color: var(--accent); }

/* Tables */
.table-scroll { overflow-x: auto; margin: 0 0 22px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { background: #f3f0ea; font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin: 0 0 10px;
  padding: 0 18px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] { padding-bottom: 8px; }
.faq p { margin: 0 0 14px; color: var(--ink-soft); }

/* CTA */
.cta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px;
  margin: 36px 0 10px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.cta img { width: 92px; height: 92px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; }
.cta h3 { margin: 0 0 6px; font-size: 1.1rem; }
.cta p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.ai-note { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

/* Article cards (index) */
.cards { display: grid; gap: 22px; padding: 12px 0 40px; }
.card {
  display: flex;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(31,35,40,.07); text-decoration: none; }
.card img { width: 140px; flex: 0 0 140px; object-fit: cover; object-position: center 20%; }
.card-body { padding: 16px 18px 16px 0; }
.card-body h2 { font-size: 1.15rem; margin: 0 0 6px; color: var(--ink); line-height: 1.3; }
.card-body p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  padding: 28px 0 40px;
}
.site-footer p { margin: 0 0 8px; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .hero h1, article h1 { font-size: 1.6rem; }
  .nav { display: none; }
  .card img { width: 96px; flex-basis: 96px; }
  .cta { flex-direction: column; align-items: flex-start; }
}
