:root {
  color: #181d19;
  background: #f5f4ed;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #181d19;
  --muted: #596159;
  --line: #d7d9cf;
  --paper: #fffef8;
  --lime: #c9f45b;
  --green: #405211;
  --night: #111512;
  --violet: #6542c5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 9px 12px;
  border-radius: 5px;
  background: var(--lime);
  color: var(--night);
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  border-bottom: 1px solid #303630;
  background: var(--night);
  color: #fff;
}

.site-header .wrap {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  flex: 0 0 auto;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.brand span {
  color: var(--lime);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #c6cdc7;
  font-size: 13px;
  font-weight: 700;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #fff;
}

.nav-cta {
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--lime);
  color: var(--night) !important;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 25px;
  color: #70776f;
  font-size: 12px;
}

.breadcrumbs a {
  text-underline-offset: 3px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 64px;
  border-bottom: 1px solid var(--line);
}

.hero::after {
  position: absolute;
  z-index: -1;
  top: -180px;
  right: max(-130px, calc((100vw - 1080px) / 2 - 150px));
  width: 470px;
  height: 470px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(201 244 91 / 26%), transparent 69%);
  content: "";
}

.kicker {
  color: var(--green);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.04em;
}

h1 {
  max-width: 850px;
  margin: 16px 0 20px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.98;
}

.dek {
  max-width: 740px;
  margin: 0;
  color: #454d46;
  font-size: clamp(17px, 2.4vw, 21px);
  line-height: 1.6;
}

.byline {
  margin: 24px 0 0;
  color: #717870;
  font-size: 12px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 74px;
  padding-block: 62px 86px;
}

.article {
  min-width: 0;
}

.article h2 {
  margin: 52px 0 13px;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.08;
}

.article h2:first-child {
  margin-top: 0;
}

.article h3 {
  margin: 29px 0 8px;
  font-size: 21px;
}

.article p,
.article li,
.card p {
  color: #4d554e;
  font-size: 16px;
  line-height: 1.78;
}

.article strong {
  color: #252b26;
}

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

.article li + li {
  margin-top: 9px;
}

.formula,
.example-box,
.note {
  margin: 29px 0;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.formula small,
.example-box small,
.note small {
  display: block;
  margin-bottom: 9px;
  color: var(--green);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.formula code {
  display: block;
  overflow-wrap: anywhere;
  color: #242a25;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(16px, 2.3vw, 20px);
  font-weight: 800;
  line-height: 1.55;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 28px 0;
  border: 1px solid #303630;
  border-radius: 10px;
  overflow: hidden;
  background: #303630;
}

.result-grid div {
  min-width: 0;
  padding: 21px;
  background: var(--night);
  color: #fff;
}

.result-grid span {
  display: block;
  margin-bottom: 7px;
  color: #aeb5af;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.result-grid strong {
  color: var(--lime);
  font-size: clamp(22px, 4vw, 31px);
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 14px;
}

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid #e1e2da;
  text-align: left;
}

th:last-child,
td:last-child {
  text-align: right;
}

th {
  color: #656d65;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.side {
  align-self: start;
  position: sticky;
  top: 24px;
}

.side-card {
  padding: 22px;
  border-radius: 10px;
  background: var(--night);
  color: #fff;
}

.side-card h2 {
  margin: 8px 0 10px;
  color: #fff;
  font-size: 24px;
}

.side-card .kicker {
  color: var(--lime);
}

.side-card p {
  margin: 0 0 19px;
  color: #c0c6c1;
  font-size: 13px;
  line-height: 1.65;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 6px;
  background: var(--lime);
  color: var(--night);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.related {
  margin-top: 55px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.related h2 {
  margin-top: 0;
}

.related-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.card {
  display: block;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}

.card:hover,
.card:focus-visible {
  border-color: #9eaa83;
  transform: translateY(-2px);
}

.card h2,
.card h3 {
  margin: 9px 0 8px;
  font-size: 22px;
  line-height: 1.12;
}

.card p {
  margin: 0;
  font-size: 14px;
}

.card .arrow {
  display: inline-block;
  margin-top: 16px;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.wide-main {
  padding-block: 62px 88px;
}

.wide-main > p {
  max-width: 760px;
}

.wide-main .card-grid {
  margin-top: 32px;
}

.cta-band {
  padding: 50px 0;
  background: var(--violet);
  color: #fff;
}

.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cta-band h2 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 31px;
}

.cta-band p {
  margin: 0;
  color: #fff;
  line-height: 1.6;
}

.site-footer {
  padding: 31px 0;
  border-top: 1px solid #303630;
  background: var(--night);
  color: #aeb5af;
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  font-size: 12px;
}

.footer-links a {
  text-decoration: none;
}

@media (max-width: 800px) {
  .site-nav a:not(.nav-cta) {
    display: none;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .side {
    position: static;
  }
}

@media (max-width: 600px) {
  .wrap {
    width: min(100% - 30px, 1080px);
  }

  .hero {
    padding-block: 50px 44px;
  }

  h1 {
    font-size: 43px;
  }

  .layout,
  .wide-main {
    padding-block: 43px 62px;
  }

  .result-grid,
  .related-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .cta-band .wrap,
  .site-footer .wrap {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card {
    transition: none;
  }
}
