:root {
  color-scheme: light;
  --paper: #f3f2ee;
  --ink: #1c1c1a;
  --muted: #56564f;
  --olive: #4a5a10;
  --rust: #a53d20;
  --line: #dcd9ce;
  --serif: "Literata", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--sans); }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); line-height: 1.12; text-wrap: balance; }
h1 { max-width: 17ch; font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 850; letter-spacing: -.07em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); letter-spacing: -.035em; }
img { display: block; max-width: 100%; }
.wrap { width: min(100% - 2 * clamp(16px, 4vw, 40px), 1120px); margin-inline: auto; }
.skip { position: absolute; z-index: 1; background: white; padding: 8px 14px; transform: translateY(-110%); }
.skip:focus { transform: none; }
.site-nav, .site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-nav { min-height: 76px; padding-block: 10px; }
.brand { display: inline-flex; gap: 6px; align-items: center; font: 680 1.55rem/1 var(--serif); letter-spacing: -.055em; text-decoration: none; }
.nav-links, .footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.nav-links a, .footer-links a { text-decoration: none; }
.nav-links a[aria-current], .nav-links a:hover, .footer-links a:hover { color: var(--olive); text-decoration: underline; text-underline-offset: .22em; }
.button { display: inline-block; width: fit-content; padding: .7rem 1.15rem; border-radius: 999px; background: var(--olive); color: #fff; font-weight: 600; line-height: 1.2; text-decoration: none; }
.button:hover { background: #39460b; }
.hero { padding-block: clamp(30px, 6vw, 75px) clamp(24px, 4vw, 44px); }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 24px; color: var(--muted); font-size: .9rem; }
.breadcrumbs a { text-underline-offset: .18em; }
.lead { max-width: 58ch; margin: 20px 0 0; color: var(--muted); font-size: clamp(1.06rem, 2.1vw, 1.32rem); line-height: 1.55; }

.catalog-hero { padding-block: clamp(32px, 6vw, 64px) clamp(32px, 5vw, 56px); }
.catalog-hero h1 { font-size: clamp(3rem, 8vw, 6.5rem); }
.catalog { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.article-card { grid-column: span 2; display: flex; flex-direction: column; align-items: flex-start; min-height: 220px; padding: clamp(18px, 3vw, 30px); border: 1px solid var(--line); border-radius: 19px; background: #fff; text-decoration: none; }
.article-card:first-child, .article-card:nth-child(2) { grid-column: span 3; min-height: 250px; }
.article-card:first-child { background: #e8ebdc; }
.article-card:nth-child(2) { background: #f4e3d9; }
.article-card:hover { border-color: var(--olive); box-shadow: 0 8px 22px rgb(65 68 33 / 8%); }
.article-card:hover h2 { text-decoration: underline; text-decoration-thickness: .05em; text-underline-offset: .15em; }
.article-card h2 { font-size: clamp(1.35rem, 2.25vw, 1.9rem); }
.article-card:first-child h2, .article-card:nth-child(2) h2 { font-size: clamp(1.55rem, 3vw, 2.4rem); }
.topic { margin: 0 0 14px; color: var(--rust); font-size: .9rem; font-weight: 600; }
.article-card p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }

.service-promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(120px, 21vw, 224px);
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
  margin-bottom: clamp(28px, 5vw, 56px);
  padding: clamp(20px, 3.5vw, 40px);
  border-radius: 20px;
  background: radial-gradient(ellipse at 85% 50%, #513125, transparent 56%), #252321;
  color: #fffaf1;
}
.service-promo h2 { font-size: clamp(1.45rem, 3.3vw, 2.55rem); text-wrap: initial; }
.service-promo p { max-width: 48ch; margin: 10px 0 16px; color: #e4dbce; line-height: 1.55; }
.service-promo img { width: 100%; height: auto; }
.service-promo .button { display: inline-flex; align-items: center; min-height: 44px; background: #d3e471; color: #292f0d; }
.service-promo .button:hover { background: #e3ef9e; }
.service-promo .button:focus-visible { outline-color: #fffaf1; }

.article-layout { display: grid; grid-template-columns: minmax(0, 740px) minmax(180px, 1fr); align-items: start; gap: clamp(24px, 6vw, 84px); }
.toc { grid-column: 2; grid-row: 1; position: sticky; top: 24px; padding: 20px; border-radius: 16px; background: #e8ebdc; }
.toc strong { display: block; margin-bottom: 8px; }
.toc ul { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.toc a { text-underline-offset: .18em; }
.prose { grid-column: 1; grid-row: 1; max-width: 740px; min-width: 0; font-size: clamp(1rem, 1.5vw, 1.1rem); }
.prose section + section { margin-top: clamp(32px, 6vw, 58px); }
.prose h2 { scroll-margin-top: 20px; }
.prose p { margin: .8em 0; }
.prose ol, .prose ul { padding-inline-start: 1.5rem; }
.prose li + li { margin-top: .55em; }
.prose a { color: var(--olive); text-underline-offset: .18em; overflow-wrap: anywhere; }
.prose code { font-size: .9em; }
.prose :not(pre) > code { padding: .08em .23em; border-radius: 4px; background: #e9e7dd; overflow-wrap: anywhere; }
.prose pre { padding: 16px 18px; border-radius: 12px; background: #252624; color: #f5f2e9; white-space: pre-wrap; overflow-wrap: anywhere; }
.article-figure { margin: 0 0 28px; padding: clamp(6px, 2vw, 20px); border-radius: 18px; background: #ebe8de; }
.article-figure img { width: 100%; height: auto; }
.table-wrap { margin-block: 18px; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; background: #fff; font-size: .95rem; }
caption { text-align: left; padding-bottom: 6px; color: var(--muted); }
th, td { padding: .75rem; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
thead th { background: #e8ebdc; }
.related { margin-top: clamp(44px, 8vw, 88px); }
.related ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 18px 0 0; padding: 0; }
.related a { display: block; height: 100%; padding: 16px; border-radius: 12px; background: #fff; text-underline-offset: .18em; }
.cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: clamp(38px, 7vw, 76px); padding: clamp(20px, 4vw, 40px); border-radius: 19px; background: #e8ebdc; }
.cta h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); }
.site-footer { margin-top: clamp(35px, 6vw, 65px); padding-block: 18px 30px; color: var(--muted); }
.site-footer .wrap { font-size: .88rem; }

@media (max-width: 800px) {
  .article-layout { grid-template-columns: 1fr; gap: 28px; }
  .toc { grid-column: 1; grid-row: auto; position: static; }
  .prose { grid-row: auto; }
  .article-card { grid-column: span 3; min-height: 0; }
  .article-card:first-child, .article-card:nth-child(2) { min-height: 0; }
}

@media (max-width: 540px) {
  .site-nav { min-height: 64px; }
  .brand { font-size: 1.35rem; }
  .brand img { width: 25px; height: 25px; }
  .nav-links { gap: 10px; font-size: .9rem; }
  .nav-links .button { padding-inline: .8rem; }
  .catalog, .related ul { grid-template-columns: 1fr; }
  .article-card, .article-card:first-child, .article-card:nth-child(2) { grid-column: 1; }
  .service-promo { grid-template-columns: minmax(0, 1fr) clamp(68px, 23vw, 108px); gap: 10px 12px; padding: 18px; }
  .service-promo > div { display: contents; }
  .service-promo h2 { grid-column: 1; grid-row: 1; font-size: clamp(1.3rem, 5.5vw, 1.55rem); }
  .service-promo img { grid-column: 2; grid-row: 1; }
  .service-promo p { grid-column: 1 / -1; margin: 0 0 2px; }
  .service-promo .button { grid-column: 1 / -1; padding-inline: .85rem; }
  table { font-size: .88rem; }
  th, td { padding: .45rem; }
}
