:root {
  --navy: #0a2540;
  --ink: #101828;
  --muted: #516070;
  --line: #d8e0ea;
  --soft: #f5f8fb;
  --white: #ffffff;
  --teal: #00a99d;
  --teal-dark: #087f78;
  --amber: #b66b12;
  --green: #13795b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a { color: inherit; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 800;
}

.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--teal);
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.navlinks a {
  text-decoration: none;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
}

.hero {
  padding: 72px 0 42px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbfd 0%, #ffffff 100%);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 10px;
  border: 1px solid #a7e8e0;
  border-radius: 999px;
  background: #e8fbf8;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--navy);
  letter-spacing: 0;
}

h1 {
  max-width: 850px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.02;
}

.lead {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.meta {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

main section {
  padding: 56px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card,
.panel,
.toc,
.callout,
.formula {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.card {
  min-height: 220px;
  padding: 22px;
}

.card a {
  text-decoration: none;
}

.card p,
.panel p,
.callout p,
li {
  color: var(--muted);
}

.tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #e8fbf8;
  font-size: 12px;
  font-weight: 800;
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(260px, 0.28fr);
  gap: 32px;
  align-items: start;
}

.article {
  max-width: 780px;
}

.article h2 {
  margin-top: 34px;
  font-size: 30px;
}

.article h3 {
  margin-top: 24px;
  font-size: 20px;
}

.article p {
  color: var(--muted);
  font-size: 17px;
}

.article ul,
.article ol {
  padding-left: 22px;
}

.toc {
  position: sticky;
  top: 20px;
  padding: 18px;
}

.toc strong {
  display: block;
  margin-bottom: 10px;
  color: var(--navy);
}

.toc a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.callout {
  margin: 28px 0;
  padding: 22px;
  border-left: 5px solid var(--teal);
  background: #fbfdfd;
}

.formula {
  margin: 18px 0;
  padding: 18px;
  background: var(--soft);
}

.formula code {
  color: var(--navy);
  font-weight: 800;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

th,
td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--navy);
  background: var(--soft);
}

.band {
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.footer {
  padding: 28px 0;
  color: var(--muted);
  background: #f8fafc;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .navlinks a:not(.button) { display: none; }
  .grid,
  .content {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static;
  }
  .hero {
    padding: 48px 0 34px;
  }
  .lead {
    font-size: 17px;
  }
}
