:root {
  --grass: #3f7d52;
  --grass-dark: #2c5a3a;
  --earth: #7a5434;
  --earth-dark: #5a3c24;
  --stone: #6e757c;
  --sky: #4f9fd4;
  --sky-deep: #2e6fa3;
  --night: #1c2736;
  --ink: #1e2430;
  --muted: #5c6570;
  --paper: #fffdf8;
  --sand: #f3ead6;
  --bg: #efe6d4;
  --lava: #c85c22;
  --gold: #c8961e;
  --line: #d7cbb3;
  --shadow: 0 12px 32px rgba(28, 39, 54, 0.12);
  --radius: 18px;
  --max: 1120px;
  --header: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "PT Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #cfe8f6 0, #cfe8f6 180px, var(--bg) 420px);
  line-height: 1.7;
  min-height: 100vh;
}

img {
  max-width: 100%;
}

a {
  color: var(--grass-dark);
}

a:hover {
  color: var(--lava);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}

.skip:focus {
  left: 12px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 4px solid var(--earth);
  min-height: var(--header);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background:
    linear-gradient(#6db36a 0 50%, #8b5a33 50% 78%, #6e757c 78%);
  border: 3px solid var(--night);
  box-shadow: 4px 4px 0 var(--gold);
  flex-shrink: 0;
}

.logo span {
  display: block;
  font-size: 1.05rem;
}

.logo small {
  display: block;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 3px solid var(--night);
  background: var(--sand);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 3px;
  background: var(--night);
  margin: 0 auto;
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a,
.drop-btn {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
}

.site-nav a:hover,
.drop-btn:hover,
.site-nav a.is-active {
  background: var(--sand);
  color: var(--ink);
}

.dropdown {
  position: relative;
}

.drop-btn {
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.drop-list {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 280px;
  max-height: 70vh;
  overflow: auto;
  background: var(--paper);
  border: 3px solid var(--night);
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 30;
}

.dropdown:hover .drop-list,
.dropdown:focus-within .drop-list,
.dropdown.open .drop-list {
  display: block;
}

.drop-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.hero {
  padding: 48px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 28px;
  align-items: center;
}

.kicker {
  display: inline-block;
  background: var(--gold);
  color: var(--night);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 3px solid var(--night);
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.12;
  margin: 14px 0 16px;
  letter-spacing: -0.04em;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 58ch;
}

.note {
  margin-top: 18px;
  padding: 12px 14px;
  background: #fff8e8;
  border-left: 6px solid var(--gold);
  font-size: 0.95rem;
}

.ph {
  background: repeating-linear-gradient(
    45deg,
    #d9ece0,
    #d9ece0 12px,
    #cfe0d6 12px,
    #cfe0d6 24px
  );
  border: 4px solid var(--night);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 8px 8px 0 rgba(28, 39, 54, 0.18);
  position: relative;
}

.ph::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 2px dashed rgba(28, 39, 54, 0.25);
}

.hero-image {
  margin: 0;
  overflow: hidden;
  min-height: 0;
  align-self: stretch;
  aspect-ratio: auto;
}

.hero-image::before {
  display: none;
}

.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image figcaption {
  z-index: 1;
}

.ph figcaption,
.ph-cap {
  position: relative;
  background: rgba(28, 39, 54, 0.88);
  color: #fff;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
}

.section {
  padding: 18px 0 40px;
}

.section h2 {
  font-size: 35px;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.section-intro {
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 70ch;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.cards + .cards {
  margin-top: 24px;
}

.cards-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-list {
  grid-template-columns: 1fr;
}

.cards-group-title {
  margin: 24px 0 8px;
}

.card {
  background: var(--paper);
  border: 3px solid var(--night);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  box-shadow: 6px 6px 0 rgba(63, 125, 82, 0.18);
  transition: transform 0.15s ease;
}

.card:hover {
  transform: translate(-2px, -2px);
  color: inherit;
}

.card .ph {
  min-height: 140px;
  box-shadow: none;
  border: 0;
  border-bottom: 3px solid var(--night);
}

.card .ph::before {
  display: none;
}

.card-body {
  padding: 14px 16px 18px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.progression-box {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 22px 24px 20px;
  background: var(--paper);
  border: 3px solid var(--night);
  box-shadow: 6px 6px 0 rgba(63, 125, 82, 0.18);
}

.progression-box h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.progression-intro {
  margin: 0 0 14px;
  color: var(--muted);
}

.progression-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.progression-list li {
  padding: 4px 0 4px 4px;
}

.progression-sources {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.meta {
  display: flex;
  gap: 10px;
  color: var(--earth);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.about-box,
.legal-box,
.article {
  background: var(--paper);
  border: 3px solid var(--night);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

.article h1 {
  font-size: 35px;
  margin-top: 0;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.article p,
.legal-box p,
.legal-box li {
  font-size: 1.05rem;
}

.article p + p,
.legal-box p + p {
  margin-top: 1.05em;
}

/* Визуальные акценты помогают читать длинные статьи по смысловым блокам. */
.article > p:nth-of-type(3n + 1) {
  margin-left: -12px;
  margin-right: -12px;
  padding: 14px 18px;
  border-left: 5px solid var(--grass-dark);
  background: rgba(126, 186, 110, 0.14);
}

.article h2 {
  margin-top: 1.6em;
}

.crumbs {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 18px 0;
}

.crumbs a {
  color: var(--grass-dark);
}

.ph-wide {
  min-height: 280px;
  margin: 8px 0 28px;
  overflow: hidden;
}

.ph-wide::before {
  display: none;
}

.ph-wide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-footer {
  margin-top: 40px;
  background: var(--night);
  color: #e8eef4;
  padding: 36px 0 22px;
  border-top: 8px solid var(--grass);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}

.site-footer a {
  color: #f0d36a;
}

.site-footer h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin: 6px 0;
}

.disclaimer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.86rem;
  color: #c9d3dd;
}

.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  background: var(--paper);
  border: 3px solid var(--night);
  padding: 14px 16px;
  display: none;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.cookie-bar.show {
  display: flex;
}

.cookie-bar p {
  margin: 0;
  font-size: 0.92rem;
}

.btn {
  border: 3px solid var(--night);
  background: var(--grass);
  color: #fff;
  font-weight: 800;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.btn:hover {
  background: var(--grass-dark);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.tag {
  background: var(--sand);
  border: 2px solid var(--night);
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero-grid,
  .cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-image {
    min-height: 220px;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header);
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-bottom: 4px solid var(--earth);
  }

  .site-nav.open {
    display: flex;
  }

  .drop-list {
    position: static;
    display: none;
    min-width: 0;
    box-shadow: none;
    border-width: 2px;
    margin-top: 6px;
  }

  .dropdown.open .drop-list {
    display: block;
  }

  .about-box,
  .legal-box,
  .article {
    padding: 20px 16px;
  }

  .cookie-bar {
    flex-direction: column;
    align-items: stretch;
  }
}
