:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --panel: #ffffff;
  --panel-soft: #eef5f2;
  --ink: #18211f;
  --muted: #5d6965;
  --line: #d9e2de;
  --accent: #0f766e;
  --accent-dark: #0a4f49;
  --warm: #f3efe6;
  --code: #15201d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent-dark);
  font-weight: 650;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: rgba(247, 248, 245, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.header-inner,
main,
.footer-inner {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  font-size: 17px;
  font-weight: 900;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-size: 15px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

main {
  padding: 38px 0 58px;
}

.hero {
  min-height: min(680px, calc(100vh - 68px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 34px;
  align-items: center;
  padding: 30px 0;
}

.hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(18, 36, 32, 0.12);
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(38px, 6vw, 70px);
  margin: 0 0 18px;
}

h2 {
  font-size: clamp(25px, 3vw, 34px);
  margin: 34px 0 14px;
}

h3 {
  font-size: 20px;
  margin: 24px 0 8px;
}

p {
  margin: 12px 0;
}

.lead {
  color: var(--muted);
  font-size: 20px;
  max-width: 67ch;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.button {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 750;
}

.button:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.button.secondary {
  background: var(--panel);
  color: var(--accent-dark);
}

.section {
  margin-top: 42px;
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.card h2:first-child,
.card h3:first-child {
  margin-top: 0;
}

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

.compare .card:first-child {
  background: var(--panel-soft);
}

.compare .card:last-child {
  background: var(--warm);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

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

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

tr:last-child td {
  border-bottom: 0;
}

.formula,
.note {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.formula {
  color: var(--code);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
}

pre {
  background: #111c19;
  border-radius: 8px;
  color: #edf7f3;
  overflow-x: auto;
  padding: 16px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

.muted {
  color: var(--muted);
}

.source-list {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.source-list li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-inner .copy {
  margin-left: auto;
}

@media (max-width: 780px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 0;
  }

  .site-nav {
    margin-left: 0;
  }

  .hero,
  .compare {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 38px;
  }

  .footer-inner .copy {
    margin-left: 0;
    width: 100%;
  }
}
