:root {
  --green-950: #1c2414;
  --green-900: #2a3320;
  --green-800: #3d4a28;
  --green-700: #4f5d32;
  --green-600: #6a7548;
  --khaki-500: #b7b48a;
  --khaki-400: #cfcba6;
  --khaki-200: #e7e4d2;
  --khaki-100: #f3f1e6;
  --khaki-50: #f8f7f1;
  --ink: #1b2116;
  --muted: #5d6554;
  --line: #d9d5c2;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(28, 36, 20, 0.1);
  --radius: 22px;
  --header-h: 84px;
  --container: 1180px;
  --font: "Manrope", "Segoe UI", sans-serif;
}

html[lang="kk"] {
  --font: "Inter", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--green-700);
  outline-offset: 3px;
}

.cta-box :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--khaki-400);
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 80;
  background: var(--green-800);
  color: #fff;
  padding: 8px 12px;
}

.skip-link:focus {
  top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green-800);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-950);
}

.btn-ghost {
  background: transparent;
  border-color: var(--green-800);
  color: var(--green-800);
}

.btn-ghost:hover {
  background: var(--khaki-100);
}

.btn-on-dark {
  background: var(--khaki-400);
  color: var(--green-950);
}

.btn-on-dark:hover {
  background: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-600);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  overflow: visible;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(28, 36, 20, 0.06);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  flex: 0 0 auto;
}

.lang-switch-btn {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 8px 2px;
  color: var(--muted);
  white-space: nowrap;
}

.lang-switch-btn:hover,
.lang-switch.is-open .lang-switch-btn {
  color: var(--ink);
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 12px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 0;
  outline: none;
  background: none;
  box-shadow: none;
  border-radius: 0;
  pointer-events: none;
}

.lang-flag svg {
  display: block;
  width: 18px;
  height: 12px;
  border: 0;
  outline: none;
  background: none;
  box-shadow: none;
}

.lang-dropdown {
  right: 0;
  left: auto;
  min-width: 0;
  width: max-content;
  flex-direction: column;
  gap: 8px;
}

.lang-dropdown li {
  margin: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  line-height: 0;
}

.logo img {
  display: block;
  height: 48px;
  width: auto;
  max-width: min(248px, 58vw);
  object-fit: contain;
  object-position: left center;
}

.nav-item {
  position: relative;
}

.nav-link {
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  padding: 10px 4px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav-link::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  transform: none;
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 24px);
  min-width: 0;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.dropdown.lang-dropdown {
  padding: 12px 14px;
}

.has-dropdown.is-open .dropdown {
  display: block;
}

.has-dropdown.is-open .lang-dropdown {
  display: flex;
}

@media (min-width: 981px) {
  .dropdown::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
  }
}

@media (min-width: 981px) and (hover: hover) and (pointer: fine) {
  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown {
    display: block;
  }

  .has-dropdown:hover .lang-dropdown,
  .has-dropdown:focus-within .lang-dropdown {
    display: flex;
  }
}

.dropdown a {
  display: block;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
}

.dropdown a:hover,
.dropdown a.is-current {
  background: var(--khaki-100);
  color: var(--green-800);
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: none;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--green-800);
  margin: 6px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open::before {
  content: "";
  position: fixed;
  inset: var(--header-h) 0 0;
  background: rgba(28, 36, 20, 0.35);
  z-index: 45;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-cta-mobile {
  display: none;
}

.hero {
  padding: 36px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 17px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.media-frame {
  position: relative;
}

.media-frame img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 0 28px 28px 28px;
}

.media-frame::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34%;
  height: 34%;
  background: var(--white);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.section {
  padding: 88px 0;
}

.section-head {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2,
.product-copy h2,
.article-cta h2,
.related h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 3.4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.services {
  background: var(--khaki-50);
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  padding: 30px 28px 24px;
  box-shadow: 0 10px 30px rgba(28, 36, 20, 0.04);
  border: 1px solid rgba(61, 74, 40, 0.06);
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  box-shadow: var(--shadow);
}

.service-card.is-active {
  border-color: var(--green-700);
  box-shadow: var(--shadow);
  background: var(--khaki-50);
}

.service-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.service-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--green-700);
  letter-spacing: 0.08em;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--khaki-100);
  color: var(--green-800);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.icon-wrap svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
}

.service-card h3 {
  margin: 0;
  flex: 1 1 100%;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  min-height: 2.5em;
}

.service-lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  min-height: calc(1.6em * 3);
  flex: 1;
}

.service-more {
  margin-top: auto;
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-800);
}

.service-more:hover {
  color: var(--green-950);
}

.service-card.is-active .service-more {
  color: var(--green-950);
}

.service-extra {
  display: none;
}

.service-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-bottom: -20px;
  transition: grid-template-rows 0.32s ease, opacity 0.24s ease, margin-bottom 0.32s ease;
}

.service-detail[hidden] {
  display: none;
}

.service-detail.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-bottom: 0;
}

.service-detail-inner {
  overflow: hidden;
  min-height: 0;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid rgba(61, 74, 40, 0.08);
  padding: 28px 32px;
  box-shadow: 0 10px 30px rgba(28, 36, 20, 0.04);
  transition: opacity 0.16s ease;
}

.service-detail-title {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.service-detail-body {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.service-detail-body p {
  margin: 0 0 14px;
}

.service-detail-body p:last-child {
  margin-bottom: 0;
}

.service-detail-body .service-extra-label {
  margin: 18px 0 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-800);
}

.service-detail-body .service-extra-label:first-child {
  margin-top: 0;
}

.service-detail-body ul {
  margin: 0 0 16px;
  padding-left: 18px;
}

.service-detail-body li {
  margin: 7px 0;
  line-height: 1.55;
  padding-left: 2px;
}

.service-detail-body .service-result {
  margin: 18px 0 0;
  padding: 16px 18px;
  background: var(--khaki-50);
  border: 1px solid rgba(61, 74, 40, 0.08);
  border-radius: 14px;
  color: var(--ink);
}

.services-cta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.contact-note {
  margin: 0;
  color: var(--muted);
}

.contact-note a {
  color: var(--green-800);
  font-weight: 700;
  text-decoration: none;
}

.product {
  background: var(--green-900);
  color: #f3f1e6;
}

.product-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.product .eyebrow {
  color: var(--khaki-400);
}

.product-copy h2 {
  color: #fff;
}

.product-copy > p {
  color: rgba(243, 241, 230, 0.82);
  font-size: 17px;
}

.mechanics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  align-items: start;
}

.mechanics li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  color: var(--khaki-200);
  font-weight: 600;
  line-height: 1.4;
}

.mechanics-icon {
  width: 14px;
  height: 14px;
  margin-top: calc((1.4em - 14px) / 2);
  border-radius: 50%;
  background:
    linear-gradient(var(--khaki-400), var(--khaki-400)) center/8px 2px no-repeat,
    linear-gradient(var(--khaki-400), var(--khaki-400)) center/2px 8px no-repeat,
    var(--green-700);
}

.product-note {
  margin-top: 24px;
  font-size: 16px;
}

.product .media-frame::after {
  background: var(--green-900);
}

.product .media-frame img {
  height: 460px;
}

.article-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  background: #fff;
  transition: 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--khaki-200);
}

.article-card:hover .more {
  color: var(--green-950);
}

.article-card .icon-wrap {
  margin-bottom: 18px;
}

.article-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.article-card p {
  margin: 0 0 24px;
  color: var(--muted);
  flex: 1;
}

.more {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-800);
}

.site-footer {
  background: var(--green-950);
  color: var(--khaki-200);
  padding: 28px 0;
}

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

.footer-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.footer-logo img {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(236px, 72vw);
  object-fit: contain;
  object-position: left center;
}

.footer-contacts {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-contacts a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.footer-contacts a:hover,
.contact-note a:hover,
.breadcrumb a:hover,
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-copy {
  margin: 0;
  font-size: 14px;
}

.reading-progress {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  height: 3px;
  background: var(--khaki-200);
}

.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green-700);
}

.article-hero {
  padding: 28px 0 8px;
  background: #fff;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--green-800);
  text-decoration: none;
  font-weight: 700;
}

.article-hero h1 {
  max-width: 960px;
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.hero-lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.article-meta {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.article-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 740px);
  justify-content: start;
  gap: 48px 56px;
  align-items: start;
  padding: 28px 0 72px;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  max-height: calc(100vh - var(--header-h) - 58px);
  overflow: auto;
  padding-right: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(141, 145, 118, 0.42) transparent;
}

.toc::-webkit-scrollbar {
  width: 4px;
}

.toc::-webkit-scrollbar-track {
  background: transparent;
}

.toc::-webkit-scrollbar-thumb {
  background: rgba(141, 145, 118, 0.38);
  border-radius: 999px;
}

.toc::-webkit-scrollbar-thumb:hover {
  background: rgba(109, 117, 84, 0.58);
}

.toc::-webkit-scrollbar-button,
.toc::-webkit-scrollbar-button:single-button,
.toc::-webkit-scrollbar-button:vertical:start:decrement,
.toc::-webkit-scrollbar-button:vertical:end:increment {
  display: none;
  width: 0;
  height: 0;
}

.toc::-webkit-scrollbar-corner {
  background: transparent;
}

.toc-box > summary {
  cursor: default;
  list-style: none;
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-600);
}

.toc-box > summary::-webkit-details-marker {
  display: none;
}

.toc p {
  display: none;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  text-decoration: none;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--muted);
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--green-600);
  padding-top: 2px;
}

.toc a.is-active,
.toc a:hover {
  color: var(--green-800);
}

.toc a.is-active {
  font-weight: 700;
}

.toc a.is-active::before,
.toc a:hover::before {
  color: var(--green-700);
}

.prose {
  max-width: 740px;
  min-width: 0;
  font-family: var(--font);
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  overflow-wrap: break-word;
}

.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  scroll-margin-top: calc(var(--header-h) + 18px);
}

#uslugi,
#produkt,
#stati {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.prose h2 {
  margin: 56px 0 18px;
  font-size: clamp(28px, 3vw, 36px);
}

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

.prose h3 {
  margin: 36px 0 12px;
  font-size: clamp(22px, 2.4vw, 26px);
}

.prose h4 {
  margin: 28px 0 10px;
  font-size: 18px;
  color: var(--green-800);
}

.prose p {
  margin: 0 0 20px;
}

.prose ul,
.prose ol {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.prose li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 22px;
  list-style: none;
}

.prose li:last-child {
  margin-bottom: 0;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-700);
}

.prose ol {
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: prose-ol;
  margin-bottom: 28px;
}

.prose ol li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  margin: 0;
  padding: 0;
  counter-increment: prose-ol;
}

.prose ol li::before {
  content: counter(prose-ol, decimal-leading-zero);
  box-sizing: border-box;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--khaki-100);
  color: var(--green-800);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
}

.prose ol li .step-body {
  min-width: 0;
}

.prose ol li .step-title {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.7;
}

.prose ol li .step-title + p,
.prose ol li p + p {
  margin: 4px 0 0;
}

.prose ol li p {
  margin: 0;
}

.prose ol li .step-body > p:first-child:not(.step-title) {
  margin: 0;
}

.prose blockquote {
  margin: 28px 0;
  padding: 20px 22px;
  border: 1px solid rgba(61, 74, 40, 0.08);
  border-radius: 16px;
  background: var(--khaki-50);
  color: var(--green-900);
  font-style: normal;
  font-weight: 600;
}

.prose blockquote p {
  margin: 0;
}

.prose code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.86em;
  background: var(--khaki-100);
  padding: 1px 6px;
  border-radius: 5px;
}

.prose a {
  color: var(--green-800);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 8px 0 28px;
  border: 1px solid rgba(61, 74, 40, 0.08);
  border-radius: 16px;
  background: var(--khaki-50);
}

.prose table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

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

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

.prose th {
  background: transparent;
  font-weight: 700;
  color: var(--green-800);
}

.formula {
  overflow-x: auto;
  max-width: 100%;
  margin: 8px 0 28px;
  padding: 20px 18px;
  background: var(--khaki-50);
  border: 1px solid rgba(61, 74, 40, 0.08);
  border-radius: 16px;
  text-align: center;
}

.formula .katex-display {
  margin: 0;
}

.article-cta {
  background: var(--khaki-50);
  padding: 28px 0 72px;
}

.cta-box {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: center;
  background: var(--green-900);
  color: #fff;
  border-radius: 28px;
  padding: 36px 40px;
}

.cta-box .eyebrow {
  color: var(--khaki-400);
}

.cta-box p {
  margin: 0;
  color: var(--khaki-200);
}

.cta-box .btn-primary {
  background: var(--khaki-400);
  color: var(--green-950);
}

.cta-box .btn-primary:hover {
  background: #fff;
}

.cta-box .btn-ghost {
  border-color: rgba(243, 241, 230, 0.55);
  color: #fff;
}

.cta-box .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.text-link {
  color: var(--khaki-400);
  font-weight: 700;
  text-decoration: none;
}

.related {
  padding: 8px 0 40px;
}

.related > .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.related .eyebrow {
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  width: 100%;
}

.related-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.related-card {
  display: block;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  text-decoration: none;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--khaki-200);
}

.related-card span,
.related-card em {
  display: block;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-700);
}

.related-card strong {
  display: block;
  margin: 8px 0 16px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

@media (max-width: 1100px) {
  .article-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 36px;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .product-grid,
  .article-cards,
  .article-layout,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 24px 22px 20px;
  }

  .service-detail-inner {
    padding: 22px 20px;
  }

  .service-detail-title {
    font-size: 20px;
  }

  .service-detail-body {
    font-size: 15px;
    line-height: 1.58;
  }

  .nav-toggle {
    display: block;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-actions .lang-switch .dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    display: none;
    width: max-content;
    max-width: calc(100vw - 24px);
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }

  .header-actions .lang-switch.is-open .dropdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .header-actions .lang-switch .dropdown a {
    white-space: nowrap;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    width: 100%;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(28, 36, 20, 0.12);
    padding: 8px 20px 20px;
    justify-content: flex-start;
    z-index: 55;
  }

  body.nav-open .site-nav {
    display: block;
  }

  .nav-cta-mobile {
    display: inline-flex;
    margin-top: 16px;
  }

  .dropdown {
    position: static;
    transform: none;
    display: none;
    box-shadow: none;
    border: 0;
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 0 0 0 8px;
    right: auto;
  }

  .dropdown a {
    white-space: normal;
  }

  .has-dropdown.is-open .dropdown {
    display: block;
  }

  .media-frame img,
  .product .media-frame img {
    height: 320px;
  }

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

  .cta-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
  }

  .toc {
    position: static;
    max-height: none;
    margin-bottom: 8px;
    overflow: visible;
  }

  .toc-box {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 4px 16px 4px;
    background: #fff;
  }

  .toc-box > summary {
    cursor: pointer;
    padding: 12px 0;
    pointer-events: auto;
    margin-bottom: 0;
  }

  .toc-box > summary::after {
    content: "+";
    float: right;
    font-size: 16px;
    line-height: 1;
  }

  .toc-box[open] > summary {
    margin-bottom: 8px;
  }

  .toc-box[open] > summary::after {
    content: "–";
  }

  .toc-box[open] {
    padding-bottom: 12px;
  }

  .article-hero {
    padding: 24px 0 4px;
  }

  .article-layout {
    padding-top: 20px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 28px));
  }

  .header-cta {
    display: none;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero,
  .section {
    padding: 48px 0;
  }

  .hero h1,
  .article-hero h1 {
    font-size: 32px;
  }

  .logo img {
    height: 40px;
    max-width: 196px;
  }

  .prose ol {
    gap: 12px;
  }

  .prose ol li {
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 12px;
  }

  .prose ol li::before {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 8px;
  }
}

@media (min-width: 981px) {
  .toc-box > summary {
    pointer-events: none;
  }
}
