:root {
  --ground: #EDF1EC; --surface: #fff; --ink: #17211B; --muted: #56655C; --rule: #D2DBD3; --rule-strong: #B5C1B8;
  --leaf: #2E6B45; --leaf-soft: #DCEBDF; --kraft: #D6B681; --tomato: #C4462B; --stamp: #2A4C9E;
  --r: 20px;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Literata, Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
em { font-style: italic; font-weight: 500; color: var(--leaf); }
p { margin: 0 0 1em; }
a { color: inherit; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
section.wrap { padding-block: clamp(48px, 7vw, 88px); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--leaf); margin-bottom: .8em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.note { font-size: .9rem; color: var(--muted); margin: 1.6em 0 0; }

.top { position: sticky; top: 0; z-index: 10; background: rgb(237 241 236 / .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font: 600 1.35rem var(--serif); text-decoration: none; color: var(--leaf); }
nav { display: flex; gap: 24px; font-size: .95rem; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--ink); }

.btn { display: inline-block; padding: .8em 1.5em; border-radius: 999px; background: var(--leaf); color: #fff; text-decoration: none; font-weight: 600; transition: transform .15s; }
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8em; }

.photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.photo.tall { aspect-ratio: 4 / 5; }
.photo.wide { aspect-ratio: 16 / 7; margin-top: 40px; }
.ph { background: repeating-linear-gradient(135deg, var(--kraft) 0 14px, #DCC08F 14px 28px); }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: s; }
.steps li { background: var(--surface); border-radius: var(--r); padding: 28px; counter-increment: s; }
.steps li::before { content: counter(s); display: block; font: 600 2.6rem/1 var(--serif); color: var(--leaf); margin-bottom: 20px; }
.steps p, .card p { color: var(--muted); margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.rev > div { order: 2; }
.split.noimg { grid-template-columns: 1fr; }
.checks { list-style: none; padding: 0; margin: 1.5em 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 34px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%;
  background: var(--leaf-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%232E6B45' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 40px; }
.photo.wide + .cards { margin-top: 16px; }
.card { background: var(--surface); border-radius: var(--r); padding: 28px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: .3em .8em; border-radius: 999px; background: var(--leaf-soft); color: var(--leaf); margin-bottom: 16px; }
.card:nth-child(4n+2) .tag { background: #F6DED6; color: var(--tomato); }
.card:nth-child(4n+3) .tag { background: #E3E9F7; color: var(--stamp); }
.card:nth-child(4n+4) .tag { background: #F1E6D2; color: #7A5A2A; }

.wrap.narrow { width: min(760px, 100% - 40px); }
.narrow h2 { margin-bottom: 1em; }
details { border-top: 1px solid var(--rule); padding: 18px 0; }
details:last-child { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 1.5rem/1 var(--sans); color: var(--leaf); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: 12px 0 0; }

.cta { background: var(--leaf); color: #fff; border-radius: calc(var(--r) * 1.5); padding: clamp(40px, 7vw, 80px); text-align: center; }
.cta em { color: var(--kraft); }
.cta p { color: rgb(255 255 255 / .8); max-width: 36em; margin-inline: auto; }
.cta .actions { justify-content: center; }
.cta .btn { background: #fff; color: var(--leaf); }
.cta .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .5); }

.foot { padding-block: 32px 48px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--rule); }

@media (max-width: 860px) {
  nav { display: none; }
  .hero, .split { grid-template-columns: 1fr; }
  .split.rev > div { order: 0; }
  .photo.tall { aspect-ratio: 4 / 3; }
}

/* Витрина «прямо сейчас»: живые данные фермы на главной */
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 20px; }
.live-grid .card { display: block; text-decoration: none; }
.live-grid .card:hover { border-color: var(--leaf); }
.live-grid h3 { margin: 8px 0 6px; }
.live-go { color: var(--leaf); font-weight: 500; }
.live-strip + .live-strip { margin-top: 20px; }
.live-strip-head { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.live-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.live-shot {
  display: flex; flex-direction: column; gap: 2px; padding: 8px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px;
  text-decoration: none; font-size: 14px;
}
.live-shot:hover { border-color: var(--leaf); }
.live-shot img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 10px; background: var(--ground); }
.live-shot span:nth-of-type(1) { margin-top: 6px; font-weight: 500; }
.live-when { color: var(--muted); }

/* Карта почв на главной: счётчики, пустое состояние и битва регионов */
.sl-counts { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 16px; }
.live-grid .sl-count { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
.sl-count b { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--leaf); }
.sl-count span { color: var(--muted); font-size: 15px; }
.sl-note { margin-top: 10px; color: var(--muted); font-size: 15px; }
.sl-empty { padding: 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.sl-empty p { margin: 0; }
.sl-battle { margin-top: 20px; }
.sl-battle-head { margin-bottom: 8px; font-weight: 500; }
.ex-scroll { overflow-x: auto; }
.ex-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.ex-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--ink); font-size: 14px; color: var(--muted); }
.ex-table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.sl-prize { margin-top: 16px; padding: 14px 18px; background: var(--leaf-soft); border-radius: var(--r); }

/* Карта мира растений на главной: та же карта, чуть компактнее и без подписи сорта. */
.ln-wrap { position: relative; margin: 18px 0; }
.ln-graph { width: 100%; height: auto; display: block; touch-action: none; cursor: grab; }
.ln-graph:active { cursor: grabbing; }
.ln-edge { stroke: #cfd6cd; stroke-width: 1; transition: opacity .18s; }
.ln-edge-family { stroke: #7fa98f; stroke-width: 1.4; }
.ln-edge-near { stroke: #c8b184; }
.ln-edge-community { stroke: #b6bdb7; }
.ln-edge-own { stroke: #e0e5df; }
.ln-node { cursor: pointer; transition: opacity .18s; }
.ln-node:hover circle, .ln-node:focus circle { stroke: #17211b; stroke-width: 1.5; }
.ln-node.is-dim, .ln-edge.is-dim { opacity: .12; }
.ln-owner { fill: #8a968e; font-size: 10px; text-anchor: middle; pointer-events: none;
  paint-order: stroke; stroke: #f4f6f1; stroke-width: 3px; stroke-linejoin: round; }
.ln-card { position: absolute; left: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border-radius: 16px; background: #fff; border: 1px solid #dde3da;
  max-width: 92%; font-size: 14px; pointer-events: none; }
