@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/roboto-latin-var-v51.woff2") format("woff2");
}

:root {
  --post-ink: #0d1526;
  --post-ink-2: #20304b;
  --post-copy: #41506b;
  --post-muted: #66758c;
  --post-green: #078a47;
  --post-green-deep: #076437;
  --post-green-black: #082d20;
  --post-mint: #e9f7f0;
  --post-mint-soft: #f3faf6;
  --post-line: #deebe4;
  --post-surface: #fff;
  --post-ground: #fbfdfc;
  --post-shadow: 0 24px 64px -42px rgba(5, 53, 32, .48);
}

html[data-theme="dark"] {
  --post-ink: #f5f8f6;
  --post-ink-2: #e2ebe6;
  --post-copy: #b3c2ba;
  --post-muted: #91a299;
  --post-green: #49df99;
  --post-green-deep: #6ce8ac;
  --post-green-black: #061d15;
  --post-mint: #123728;
  --post-mint-soft: #0b241a;
  --post-line: #204735;
  --post-surface: #0d2119;
  --post-ground: #071710;
  --post-shadow: 0 24px 64px -42px rgba(0, 0, 0, .85);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--post-ground); color: var(--post-copy); font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; }
body > main { min-height: 60vh; }
.post-shell { width: min(100% - 40px, 1180px); margin-inline: auto; }

.post-hero { padding: clamp(52px, 7vw, 92px) 0 42px; background: radial-gradient(circle at 88% 15%, var(--post-mint) 0, transparent 34%), linear-gradient(180deg, var(--post-mint-soft), var(--post-ground)); border-bottom: 1px solid var(--post-line); }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 34px; color: var(--post-muted); font-size: 14px; }
.breadcrumbs a { color: var(--post-green-deep); font-weight: 700; text-decoration: none; }
.post-heading { max-width: 900px; }
.post-kicker { margin: 0 0 18px; color: var(--post-green-deep); font-size: 13px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.post-heading h1 { margin: 0; color: var(--post-ink); font-size: clamp(42px, 6.2vw, 72px); line-height: 1.03; letter-spacing: -.048em; text-wrap: balance; }
.post-dek { max-width: 790px; margin: 26px 0 0; color: var(--post-ink-2); font-size: clamp(19px, 2.2vw, 23px); line-height: 1.56; }
.post-byline { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 26px; color: var(--post-muted); font-size: 14px; }
.post-byline b { color: var(--post-ink-2); }
.post-figure { margin: 44px 0 0; overflow: hidden; border: 1px solid var(--post-line); border-radius: 28px; background: var(--post-mint); box-shadow: var(--post-shadow); }
.post-figure img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.post-figure figcaption { padding: 13px 20px; color: var(--post-muted); font-size: 13px; text-align: center; }

.post-layout { display: grid; grid-template-columns: minmax(0, 760px) 270px; justify-content: space-between; gap: 72px; padding: 64px 0 82px; }
.post-content { min-width: 0; color: var(--post-copy); font-size: 18px; line-height: 1.82; }
.post-content > p:first-child { color: var(--post-ink-2); font-size: 21px; line-height: 1.72; }
.post-content h2 { scroll-margin-top: 110px; margin: 58px 0 20px; padding-top: 10px; color: var(--post-ink); font-size: clamp(30px, 4vw, 40px); line-height: 1.16; letter-spacing: -.035em; }
.post-content h3 { scroll-margin-top: 110px; margin: 35px 0 13px; color: var(--post-ink-2); font-size: 23px; line-height: 1.28; }
.post-content p { margin: 0 0 22px; }
.post-content a { color: var(--post-green-deep); font-weight: 700; text-underline-offset: 3px; }
.post-content ul,
.post-content ol { display: grid; gap: 12px; margin: 22px 0 28px; padding-left: 26px; }
.post-content li { padding-left: 5px; }
.post-content li::marker { color: var(--post-green); font-weight: 900; }
.post-content strong { color: var(--post-ink-2); }
.post-callout { margin: 34px 0; padding: 26px 28px; border: 1px solid var(--post-line); border-left: 5px solid var(--post-green); border-radius: 17px; background: var(--post-mint-soft); color: var(--post-ink-2); }
.post-callout b { display: block; margin-bottom: 7px; color: var(--post-green-deep); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.post-steps { counter-reset: post-step; padding: 0 !important; list-style: none; }
.post-steps li { position: relative; min-height: 50px; padding: 4px 0 4px 64px; }
.post-steps li::before { counter-increment: post-step; content: counter(post-step); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--post-green-black); color: #fff; font-weight: 900; }

.post-aside { align-self: start; position: sticky; top: 105px; }
.toc,
.product-card { padding: 24px; border: 1px solid var(--post-line); border-radius: 18px; background: var(--post-surface); box-shadow: var(--post-shadow); }
.toc h2,
.product-card h2 { margin: 0 0 15px; color: var(--post-ink); font-size: 17px; }
.toc ol { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.toc a { color: var(--post-copy); font-size: 14px; line-height: 1.4; text-decoration: none; }
.toc a:hover { color: var(--post-green-deep); }
.product-card { margin-top: 18px; background: linear-gradient(145deg, var(--post-green-black), #0b5032); color: #dcebe3; }
.product-card h2 { color: #fff; }
.product-card p { margin: 0 0 18px; font-size: 14px; line-height: 1.55; }
.product-card a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; width: 100%; border-radius: 12px; background: #10a461; color: #fff; font-size: 14px; font-weight: 800; text-decoration: none; }

.related-section { padding: 72px 0 86px; border-top: 1px solid var(--post-line); background: var(--post-mint-soft); }
.related-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.related-heading h2 { margin: 0; color: var(--post-ink); font-size: clamp(31px, 4vw, 44px); letter-spacing: -.035em; }
.related-heading a { color: var(--post-green-deep); font-weight: 800; text-decoration: none; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.related-card { display: grid; grid-template-columns: 180px 1fr; overflow: hidden; min-height: 190px; border: 1px solid var(--post-line); border-radius: 19px; background: var(--post-surface); color: inherit; text-decoration: none; box-shadow: var(--post-shadow); transition: transform .2s ease; }
.related-card:hover { transform: translateY(-4px); }
.related-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.related-copy { align-self: center; padding: 24px; }
.related-copy span { color: var(--post-green-deep); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.related-copy h3 { margin: 10px 0 0; color: var(--post-ink); font-size: 21px; line-height: 1.28; }

@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; gap: 40px; }
  .post-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; order: -1; }
  .product-card { margin: 0; }
  .related-card { grid-template-columns: 145px 1fr; }
}

@media (max-width: 640px) {
  .post-shell { width: min(100% - 32px, 1180px); }
  .post-hero { padding-top: 42px; }
  .breadcrumbs { margin-bottom: 25px; }
  .post-heading h1 { font-size: clamp(38px, 12vw, 52px); }
  .post-dek { font-size: 18px; }
  .post-figure { margin-top: 32px; border-radius: 20px; }
  .post-layout { padding: 46px 0 62px; }
  .post-content { font-size: 17px; line-height: 1.75; }
  .post-content > p:first-child { font-size: 19px; }
  .post-content h2 { margin-top: 46px; font-size: 31px; }
  .post-aside { grid-template-columns: 1fr; }
  .related-heading { align-items: flex-start; flex-direction: column; }
  .related-grid { grid-template-columns: 1fr; }
  .related-card { grid-template-columns: 115px 1fr; min-height: 160px; }
  .related-copy { padding: 18px; }
  .related-copy h3 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .related-card { transition: none; }
}
