:root {
  --bg: #050805;
  --bg-2: #0a110b;
  --surface: #0e1710;
  --surface-2: #132016;
  --border: #1f3324;
  --border-strong: #2c4a33;
  --green: #22e070;
  --green-2: #16a34a;
  --green-soft: rgba(34, 224, 112, 0.12);
  --text: #e8f3eb;
  --muted: #9fb7a6;
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --prose: 780px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Unbounded", "Inter", system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(34, 224, 112, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(22, 163, 74, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 17px/1.7 var(--font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--green); color: #031006; padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 8, 5, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font: 500 18px/1 var(--font-head); letter-spacing: 0.01em; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--green); font-weight: 700; margin-left: 2px; }
.logo img { width: 36px; height: 36px; }

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 999px;
  color: var(--muted); font-size: 15px; font-weight: 500; white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--green); background: var(--green-soft); }

.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg-2); flex-shrink: 0; }
.lang-switch a {
  min-width: 42px; padding: 6px 10px; text-align: center; border-radius: 999px;
  color: var(--muted); font: 600 13px/1 var(--font); letter-spacing: 0.06em;
}
.lang-switch a:hover { color: var(--text); text-decoration: none; }
.lang-switch a.is-active { background: var(--green); color: #031006; }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--bg-2); cursor: pointer; position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); border-radius: 2px; content: ""; transition: transform .2s, opacity .2s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { left: 0; right: 0; top: -7px; }
.nav-toggle-bar::after { left: 0; right: 0; top: 7px; }
.nav-open .nav-toggle-bar { background: transparent; }
.nav-open .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
  .header-inner { flex-wrap: wrap; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .nav-toggle { display: block; order: 2; }
  .header-inner .lang-switch { order: 1; margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin: 0; display: none; }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; padding: 6px 0 4px; }
  .site-nav a { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 16px; white-space: normal; }
  .nav-toggle { margin-left: 0; }
}
@media (max-width: 400px) {
  .logo span { font-size: 16px; }
  .lang-switch a { min-width: 36px; padding: 6px 8px; }
}

/* ---------- Article ---------- */
.article { padding-top: 28px; }
.article > * { max-width: var(--prose); margin-left: auto; margin-right: auto; }
.article > .figure { max-width: 1000px; }

.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; font-size: 14px; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--green); }

.kicker {
  display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px;
  background: var(--green-soft); border: 1px solid rgba(34, 224, 112, 0.25);
  color: var(--green); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; color: #f3fbf5; overflow-wrap: break-word; }
h1 { font-size: clamp(26px, 4.2vw, 42px); margin: 0 0 18px; }

.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.article-meta span { display: inline-flex; align-items: center; gap: 8px; }
.article-meta span + span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green-2); margin-right: 10px; }

/* ---------- Figures: fixed 16:9 frame, image centred, never stretched ---------- */
.figure { margin: 32px auto; }
.frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: 0 0 0 6px rgba(34, 224, 112, 0.05), 0 18px 40px -20px rgba(0, 0, 0, 0.8);
}
.frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.figure figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; text-align: center; line-height: 1.5; }

/* ---------- Prose ---------- */
.prose { font-size: 18px; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-size: clamp(21px, 2.8vw, 28px); margin: 1.9em 0 0.7em; padding-left: 16px; border-left: 4px solid var(--green); }
.prose h3 { font-size: 20px; margin: 1.6em 0 0.6em; }
.prose ul, .prose ol { margin: 0 0 1.3em; padding: 18px 22px 18px 22px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.prose li { position: relative; padding-left: 26px; margin: 0.45em 0; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 8px; height: 8px; border-radius: 2px; background: var(--green); transform: rotate(45deg); }
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; padding-left: 36px; }
.prose ol li::before { content: counter(n); position: absolute; left: 0; top: 0.2em; width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 700; line-height: 24px; text-align: center; }
.prose blockquote {
  margin: 1.8em 0; padding: 22px 24px 22px 26px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(34, 224, 112, 0.10), rgba(34, 224, 112, 0.02));
  border: 1px solid rgba(34, 224, 112, 0.28); border-left: 4px solid var(--green);
  font-size: 19px; font-style: italic; color: #f0faf3;
}
.prose blockquote p { margin: 0; }
.prose strong { color: #f3fbf5; }

.table-wrap { margin: 0 0 1.4em; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface-2); color: var(--green); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }

/* ---------- Cards: 4 vertical blocks ---------- */
.cards-section { padding-top: 40px; padding-bottom: 64px; }
.cards-section h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 24px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 1080px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

.card { height: 100%; }
.card-link {
  display: flex; flex-direction: column; height: 100%;
  padding: 12px; border-radius: calc(var(--radius) + 4px);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card-link:hover { text-decoration: none; border-color: var(--green-2); transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(34, 224, 112, 0.45); }
.card .frame { border-radius: var(--radius-sm); box-shadow: none; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 6px 6px; }
.card-body .kicker { align-self: flex-start; font-size: 11px; margin-bottom: 10px; }
.card h3 { font-size: 16px; line-height: 1.4; margin: 0 0 10px; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.card-more { margin-top: auto; color: var(--green); font-weight: 600; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: #030503; border-top: 1px solid var(--border); color: var(--muted); font-size: 15px; }
.footer-top { border-bottom: 1px solid var(--border); background: var(--bg-2); }
.footer-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.footer-top .logo img { width: 32px; height: 32px; }

.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 1.4fr; gap: 36px; padding-top: 36px; padding-bottom: 28px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid p { margin: 0 0 10px; line-height: 1.65; }
.footer-title { color: var(--text); font-weight: 600; font-size: 15px; letter-spacing: 0.02em; }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 6px 0; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--green); }

.footer-rg { display: flex; gap: 18px; align-items: flex-start; padding: 18px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
.age-badge {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  border: 3px solid var(--green); color: var(--green); background: #031006;
  font: 700 18px/1 var(--font-head); letter-spacing: -0.02em;
  box-shadow: 0 0 0 4px rgba(34, 224, 112, 0.12);
}
.footer-bottom { border-top: 1px solid var(--border); padding-top: 18px; padding-bottom: 24px; font-size: 13px; }
.footer-bottom p { margin: 0; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .prose { font-size: 17px; }
  .prose blockquote { font-size: 17px; padding: 18px; }
  .figure { margin: 24px auto; }
  .frame { border-radius: 12px; box-shadow: 0 0 0 4px rgba(34, 224, 112, 0.05); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-link, .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { transition: none; }
}
