:root {
  color-scheme: light;
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg: #f3f2e9;
  --surface: #fffef8;
  --ink: #182116;
  --ink-soft: #5f6959;
  --line: #dedfd4;
  --lime: #b9ef61;
  --lime-dark: #466d17;
  --coral-soft: #ffe3da;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

header,
main,
footer {
  width: min(860px, calc(100% - 32px));
  margin-inline: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--lime);
  transform: rotate(-3deg);
}

.brand em { color: var(--lime-dark); font-style: normal; }

.language-links { display: flex; gap: 10px; font-size: 14px; }
.language-links a { color: var(--lime-dark); font-weight: 700; }
.language-links [aria-current='page'] { color: var(--ink); text-decoration: none; }

main { padding: 54px 0 80px; }

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

h1,
h2,
h3 { font-family: 'Manrope', sans-serif; line-height: 1.12; }
h1 { max-width: 760px; margin: 0; font-size: clamp(42px, 8vw, 68px); letter-spacing: -0.055em; }
h2 { margin-top: 0; font-size: 27px; letter-spacing: -0.035em; }
h3 { margin-bottom: 5px; font-size: 18px; }

.lead { max-width: 720px; margin: 22px 0 36px; color: var(--ink-soft); font-size: 18px; }

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 800;
  text-decoration: none;
}

section {
  margin-top: 24px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

p:last-child,
ul:last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-weight: 800; }

code,
.formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.formula {
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--coral-soft);
  color: var(--ink);
  font-size: 14px;
}

.caution { border-left: 5px solid #ff7d55; }
.sources a { color: var(--lime-dark); }
.updated { color: var(--ink-soft); font-size: 14px; }

footer {
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

@media (max-width: 620px) {
  header { align-items: flex-start; }
  .brand { font-size: 18px; }
  .lead { font-size: 16px; }
  section { border-radius: 20px; }
  .table-wrap { overflow-x: auto; }
}
