:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --fg: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --radius: 12px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 19px;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand .badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand .badge svg { width: 18px; height: 18px; }
.header-cta {
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}
.header-cta:hover { background: var(--primary-dark); text-decoration: none; }

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

.breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin: 28px 0 8px;
}
.breadcrumb a { color: var(--muted); }

article h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 12px 0 8px;
}
.article-meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

article h2 {
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}
article h3 { font-size: 19px; margin: 28px 0 8px; }
article p { margin: 0 0 16px; }
article ul, article ol { margin: 0 0 16px; padding-left: 24px; }
article li { margin-bottom: 8px; }
.lead { font-size: 19px; color: #334155; }

.table-wrap { overflow-x: auto; margin: 20px 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-soft); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }

.callout {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
}
.callout p:last-child { margin-bottom: 0; }

.cta-box {
  background: var(--primary);
  color: #fff;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin: 44px 0;
}
.cta-box h2 { color: #fff; margin: 0 0 10px; font-size: 24px; }
.cta-box p { color: rgba(255,255,255,0.85); margin: 0 0 20px; }
.cta-btn {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 16px;
}
.cta-btn:hover { text-decoration: none; background: #f1f5f9; }

.cards { display: grid; gap: 20px; margin: 28px 0; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--fg);
  transition: box-shadow 0.15s, transform 0.15s;
  background: #fff;
}
.card:hover { text-decoration: none; box-shadow: 0 8px 24px rgba(15,23,42,0.08); transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.related { border-top: 1px solid var(--border); margin-top: 48px; padding-top: 24px; }
.related h2 { font-size: 20px; margin-top: 0; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  article h1 { font-size: 27px; }
  article h2 { font-size: 21px; }
}
