:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #0f1b2d;
  --ink-soft: #495668;
  --muted: #8a93a3;
  --line: #e6e8ec;
  --accent: #0a66c2;
  --accent-soft: #e8f1fb;
  --warn: #b85c00;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 8px 24px rgba(15, 27, 45, .06);
  --maxw: 1120px;
  --maxw-article: 720px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(10px);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0a66c2 0%, #1aa37a 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: .9rem;
}
.brand-name small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 18px;
}
nav a {
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 500;
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 32px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -.02em;
}
.hero .lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto;
}
.hero .chips {
  margin-top: 22px;
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
}
.chip {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
}

/* ---------- Article grid (home) ---------- */
.section-title {
  margin: 28px 0 8px;
  font-size: 1.25rem;
  letter-spacing: -.01em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-title .count {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 500;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding: 12px 0 32px;
}
.grid:last-child { padding-bottom: 64px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card a { color: inherit; }
.card a:hover { text-decoration: none; }
.card .thumb {
  aspect-ratio: 16 / 9;
  background: #eef1f5;
  overflow: hidden;
}
.card .thumb svg { width: 100%; height: 100%; }
.card .body {
  padding: 18px 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
}
.card .kicker {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 600;
}
.card h2 {
  font-size: 1.12rem;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -.01em;
}
.card p {
  margin: 0;
  font-size: .93rem;
  color: var(--ink-soft);
}
.card .read-more {
  margin-top: auto;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 600;
  padding-top: 6px;
}

/* ---------- Article page ---------- */
.article {
  padding: 32px 0 64px;
}
.article .hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  aspect-ratio: 16 / 9;
  background: #eef1f5;
}
.article .hero-img svg { width: 100%; height: 100%; }

.article-head {
  max-width: var(--maxw-article);
  margin: 0 auto 22px;
}
.article .kicker {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}
.article h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 10px;
}
.article .meta {
  color: var(--muted);
  font-size: .9rem;
}
.article .content {
  max-width: var(--maxw-article);
  margin: 0 auto;
  font-size: 1.04rem;
}
.article .content h2 {
  font-size: 1.45rem;
  letter-spacing: -.01em;
  margin: 36px 0 10px;
}
.article .content h3 {
  font-size: 1.12rem;
  margin: 22px 0 8px;
}
.article .content p { margin: 0 0 14px; color: var(--ink); }
.article .content ul, .article .content ol { padding-left: 22px; margin: 0 0 16px; }
.article .content li { margin-bottom: 6px; }
.article .content strong { color: var(--ink); }

.callout {
  border: 1px solid var(--line);
  background: var(--surface);
  border-left: 4px solid var(--accent);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
  font-size: .97rem;
}
.callout.warn { border-left-color: var(--warn); }
.callout strong { display: block; margin-bottom: 4px; }

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 0 12px 44px;
  border-bottom: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .9rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--surface);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
  font-size: 1.2rem;
  transition: transform .2s;
}
.faq details[open] summary::after { content: "–"; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 18px 0;
  padding: 10px 18px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
}
.btn-link:hover { background: #084f99; text-decoration: none; }

.crumbs {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: 18px;
  max-width: var(--maxw-article);
  margin-left: auto;
  margin-right: auto;
}
.crumbs a { color: var(--ink-soft); }

.related {
  max-width: var(--maxw-article);
  margin: 44px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.related h3 { margin: 0 0 14px; font-size: 1.1rem; }
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.related-list a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.35;
}
.related-list a:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 0;
  font-size: .88rem;
  color: var(--muted);
  text-align: center;
}
.site-footer a { color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero { padding: 36px 0 20px; }
  nav ul { gap: 12px; }
  nav a { font-size: .85rem; }
  .brand-name small { display: none; }
}
