*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f8fafc; color: #0f172a; line-height: 1.65;
}
a { color: inherit; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid #e2e8f0;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.2rem; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 0.9rem;
}
.main-nav { display: flex; gap: 20px; font-weight: 500; font-size: 0.95rem; color: #475569; }
.main-nav a { text-decoration: none; }
.main-nav a:hover { color: var(--accent); }

.page-main { padding-top: 32px; padding-bottom: 64px; }
.hero {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 34px 30px;
  margin-bottom: 36px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 10px; }
.hero h1 { margin: 0 0 12px; font-size: clamp(1.65rem, 3.2vw, 2.35rem); line-height: 1.2; }
.hero-summary { margin: 0 0 20px; color: #475569; font-size: 1.05rem; max-width: 740px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn { display: inline-flex; align-items: center; padding: 11px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.meta-note { color: #64748b; font-size: 0.9rem; font-weight: 500; }

.section-head { margin-bottom: 20px; }
.section-head h2 { margin: 0 0 4px; font-size: 1.5rem; }
.section-head p { margin: 0; color: #64748b; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column;
}
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.84rem; color: #64748b; margin-bottom: 12px; }
.badge, .badge-sm {
  display: inline-block; background: #fef2f2; color: var(--accent); font-weight: 700;
  font-size: 0.78rem; padding: 4px 10px; border-radius: 999px;
}
.card h2 { margin: 0 0 10px; font-size: 1.18rem; line-height: 1.35; }
.card h2 a { text-decoration: none; }
.card h2 a:hover { color: var(--accent); }
.card p { margin: 0 0 18px; color: #475569; font-size: 0.95rem; flex: 1; }
.card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: #64748b; border-top: 1px solid #f1f5f9; padding-top: 14px; }
.read-link { color: var(--accent); font-weight: 700; text-decoration: none; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 28px; padding-bottom: 64px; }
@media (min-width: 1040px) {
  .article-layout { grid-template-columns: minmax(0, 740px) 280px; justify-content: space-between; }
}
.article-body { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 32px 24px; }
@media (min-width: 640px) { .article-body { padding: 40px 44px; } }
.breadcrumbs { display: flex; gap: 8px; font-size: 0.85rem; color: #64748b; margin-bottom: 14px; }
.breadcrumbs a { text-decoration: none; }
.article-head h1 { margin: 12px 0; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.22; }
.lead { font-size: 1.08rem; color: #475569; margin: 0 0 16px; }
.byline { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.88rem; color: #64748b; padding-bottom: 20px; border-bottom: 1px solid #e2e8f0; margin-bottom: 26px; }
.prose h2 { margin: 28px 0 12px; font-size: 1.35rem; line-height: 1.3; }
.prose p { margin: 0 0 1.25em; font-size: 1.06rem; line-height: 1.8; color: #1e293b; }

.article-sidebar { display: none; }
@media (min-width: 1040px) { .article-sidebar { display: block; } }
.sidebar-box { position: sticky; top: 84px; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px; }
.sidebar-box h3 { margin: 0 0 12px; font-size: 1rem; }
.toc-nav { display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; color: #475569; }
.toc-nav a { text-decoration: none; line-height: 1.35; }
.toc-nav a:hover { color: var(--accent); }

.related-block { margin-top: 40px; padding-top: 26px; border-top: 1px solid #e2e8f0; }
.related-block h2 { margin: 0 0 16px; font-size: 1.25rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.related-item { display: block; text-decoration: none; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; }
.related-item:hover { border-color: var(--accent); background: #fff; }
.related-item h3 { margin: 8px 0 0; font-size: 0.98rem; line-height: 1.35; }

.static-main { padding-top: 32px; padding-bottom: 64px; max-width: 820px; }
.static-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 34px; }
.static-card h1 { margin-top: 0; }
.static-card h2 { margin-top: 24px; font-size: 1.2rem; }

.site-footer { border-top: 1px solid #e2e8f0; background: #fff; padding: 28px 0; color: #64748b; font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
