:root {
  --bg: #f4f8fb;
  --surface: #ffffff;
  --text: #163042;
  --muted: #5f6e7b;
  --primary: #0f6cbd;
  --primary-dark: #0b4f8a;
  --border: #d8e4ee;
  --accent: #e9f3fb;
  --shadow: 0 14px 34px rgba(18, 52, 77, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  line-height: 1.75;
  background: linear-gradient(180deg, #f8fbfd 0%, var(--bg) 100%);
}

a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }

.wrap { width: min(calc(100% - 32px), 1120px); margin: 0 auto; }

.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.button {
  background: linear-gradient(135deg, var(--primary) 0%, #2891e3 100%);
  color: #fff;
}

.button:hover { color: #fff; }

.button-secondary {
  background: var(--accent);
  color: var(--primary-dark);
}

.hero-wrap { padding: 28px 0 8px; }

.hero,
article,
aside,
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.hero { padding: 32px 34px; margin-bottom: 22px; }

.eyebrow {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 14px;
}

h1, h2, h3 {
  margin: 0 0 12px;
  line-height: 1.25;
  color: #0f2535;
}

h1 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); max-width: 20em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin-top: 36px; }
h3 { font-size: 1.12rem; margin-top: 24px; }

.meta {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 68ch;
  font-size: 1.05rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
  padding-bottom: 12px;
}

.content-grid > * { min-width: 0; }

article { padding: 34px 36px 40px; }

article > p:first-of-type { margin-top: 0; }

p { margin: 0 0 16px; }

ul, ol { margin: 0 0 18px; padding-left: 22px; }
li + li { margin-top: 8px; }

aside {
  padding: 22px;
  position: sticky;
  top: 86px;
}

.toc {
  margin: 8px 0 18px;
  padding-left: 18px;
}

.toc a { text-decoration: none; font-weight: 600; }
.toc li + li { margin-top: 8px; }

.callout {
  margin: 18px 0 22px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #d2e4f3;
  border-left: 4px solid var(--primary);
  background: linear-gradient(180deg, #f7fbff 0%, #eef6fc 100%);
}

.callout p:last-child { margin-bottom: 0; }

.table-wrap {
  overflow-x: auto;
  margin: 16px 0 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

th, td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

caption {
  caption-side: bottom;
  text-align: left;
  padding: 10px 14px 12px;
}
th { background: #eef6fd; font-size: 0.95rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: #f8fbfd; }

.links-box {
  margin-top: 28px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #d3e3f2;
  background: #f7fbff;
}

.links-box h2 { margin-top: 0; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.related-card {
  display: block;
  padding: 16px;
  border: 1px solid #d3e3f2;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
}

.related-card:hover { border-color: #9ec3e4; }
.related-card h3 { margin: 0 0 6px; font-size: 1.02rem; }
.related-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.cta {
  margin-top: 28px;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0e5d9f 0%, #1277c8 100%);
  color: #fff;
}

.cta p { color: #f3f8fd; margin: 0 0 14px; font-size: 1.05rem; }
.cta a { color: #fff; font-weight: 700; }
.cta .button {
  margin-top: 6px;
  background: #fff;
  color: #0d5fa3;
}
.cta .button:hover { color: #09497e; }

.about-card { margin: 8px 0 28px; padding: 22px 24px; }
.about-card h2 { margin-top: 0; }

footer {
  color: var(--muted);
  padding: 0 0 36px;
}

@media (max-width: 860px) {
  .content-grid { grid-template-columns: 1fr; }
  aside { position: static; }
  .hero, article { padding: 22px; }
  .topbar { flex-direction: column; align-items: flex-start; }
  h1 { max-width: none; }
  .table-wrap { max-width: 100%; }
}
