:root {
  --color-bg: #f8f6f2;
  --color-surface: #ffffff;
  --color-text: #1e1e1e;
  --color-text-muted: #5a5a5a;
  --color-accent: #2d6a4f;
  --color-accent-hover: #245840;
  --color-accent-light: #e8f4ee;
  --color-border: #ddd8d0;
  --color-nav-bg: #1a1a1a;
  --color-nav-text: #f0ede8;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 720px;
  --section-gap: 3rem;
}

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

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { line-height: 1.3; font-weight: 700; }
h1 { font-size: 2rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.45rem; margin-bottom: 0.65rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--color-accent-hover); }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.3rem; }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
main { flex: 1; padding: var(--section-gap) 0; }
.section { margin-bottom: var(--section-gap); }

/* Navigation */
nav { background: var(--color-nav-bg); position: sticky; top: 0; z-index: 100; }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0;
}

.nav-brand {
  color: var(--color-nav-text);
  text-decoration: none;
  font-weight: 700;
  padding: 0.85rem 0;
  white-space: nowrap;
}
.nav-brand:hover { color: #fff; }

.nav-toggle {
  display: none;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-nav-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.15s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
.nav-links a {
  color: var(--color-nav-text);
  text-decoration: none;
  padding: 0.85rem 0.6rem;
  display: block;
  font-size: 0.84rem;
  opacity: 0.8;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { opacity: 1; color: #fff; }
.nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1060px) {
  .js .nav-toggle { display: flex; }
  .js .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-nav-bg);
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 99;
  }
  .js .nav-links.open { display: flex; }
  .js .nav-links a {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
    white-space: normal;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .js .nav-links a:hover,
  .js .nav-links a[aria-current="page"] { background: rgba(255,255,255,0.06); opacity: 1; }
}

/* Hero */
.hero {
  background: var(--color-accent-light);
  border-bottom: 2px solid var(--color-accent);
  padding: 2.5rem 0;
}
.hero h1 { color: var(--color-accent); }
.hero .lead { font-size: 1.05rem; color: var(--color-text-muted); margin-top: 0.25rem; }

/* Page header */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-border);
}
.page-header h1 { color: var(--color-accent); }

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.card-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.4rem; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--color-accent-hover); color: #fff; }

/* CTA box */
.cta-box {
  background: var(--color-accent-light);
  border-left: 4px solid var(--color-accent);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 4px 4px 0;
}
.cta-box p { margin-bottom: 1rem; }
.cta-social {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.cta-social svg { width: 24px; height: 24px; flex-shrink: 0; }

/* Section label */
.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

/* Article */
.article-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.article-perex {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.article-content h2 { margin-top: 2rem; }
.article-content h3 { margin-top: 1.5rem; }

/* Program */
.program-item { margin-bottom: 2rem; }
.program-item h3 { color: var(--color-accent); font-size: 1.15rem; }

.program-steps { list-style: none; padding: 0; }
.program-steps li { padding: 0.35rem 0 0.35rem 1.5rem; position: relative; }
.program-steps li::before { content: "→"; position: absolute; left: 0; color: var(--color-accent); }

/* Footer */
footer {
  background: var(--color-nav-bg);
  color: var(--color-nav-text);
  padding: 1.25rem 0;
  font-size: 0.85rem;
}
footer a { color: var(--color-nav-text); opacity: 0.7; }
footer a:hover { opacity: 1; color: #fff; }
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Cookie banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2a2a2a;
  color: #f0ede8;
  padding: 1rem 1.25rem;
  z-index: 200;
  display: none;
  border-top: 1px solid #444;
}
#cookie-banner.visible { display: block; }

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.cookie-text { flex: 1; min-width: 200px; font-size: 0.88rem; margin: 0; }
.cookie-buttons { display: flex; gap: 0.6rem; flex-shrink: 0; }
.cookie-btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}
.cookie-btn-accept { background: var(--color-accent); color: #fff; }
.cookie-btn-decline { background: transparent; color: #f0ede8; border: 1px solid #777; }

/* Tables */
.article-content .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0; }
.article-content table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.article-content th,
.article-content td { padding: 0.55rem 0.75rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.article-content th {
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  border-bottom: 2px solid var(--color-border);
  background: var(--color-bg);
}
.article-content td.num, .article-content th.num { text-align: right; }
.article-content tr:last-child td { border-bottom: none; }
.article-sources { font-size: 0.82rem; color: var(--color-text-muted); margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }

/* Responsive */
@media (max-width: 600px) {
  html { font-size: 17px; }
  :root { --section-gap: 2rem; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }
}
