@font-face { font-family: "Onest"; font-weight: 400 600; font-display: swap; src: url(fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400 600; font-display: swap; src: url(fonts/onest-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 500; font-display: swap; src: url(fonts/jetbrains-mono-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 500; font-display: swap; src: url(fonts/jetbrains-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f7f4ee;
  --card: #fdfbf7;
  --raised: #efe9df;
  --text: #1f1b16;
  --text-2: #5e554a;
  --muted: #736a5e;
  --line: rgba(31, 27, 22, .08);
  --line-strong: rgba(31, 27, 22, .14);
  --moss: #4a6636;
  --moss-ink: #3d552c;
  --band: rgba(74, 102, 54, .11);
  --neg: #b4412f;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/22px var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* навигация */
.nav { height: 64px; display: flex; align-items: center; gap: 32px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; text-decoration: none; }
.logo svg { color: var(--moss); }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a, .nav-login { text-decoration: none; color: var(--text-2); font-size: 14px; transition: color 150ms var(--ease); }
.nav-links a:hover, .nav-login:hover { color: var(--text); }
.nav-login { color: var(--text); font-weight: 500; }

/* первый экран */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; padding: 64px 0 96px; min-height: calc(100vh - 64px); max-height: 960px; }
h1 { font-weight: 500; font-size: 52px; line-height: 1.06; letter-spacing: -.025em; margin: 0 0 24px; text-wrap: balance; }
.lead { font-size: 18px; line-height: 28px; color: var(--text-2); margin: 0 0 32px; max-width: 32rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 10px; font: 500 15px/1 var(--sans); text-decoration: none; border: 0; cursor: pointer; transition: background-color 150ms var(--ease), transform 150ms var(--ease); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--moss); color: #fff; }
.btn-primary:hover { background: var(--moss-ink); }
.btn-secondary { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-secondary:hover { background: var(--raised); }
.btn:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
.aside-note { margin: 32px 0 0; color: var(--muted); font-size: 13px; line-height: 20px; max-width: 30rem; }

/* окно панели */
.window { background: var(--card); border-radius: 16px; box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(31, 27, 22, .06); overflow: hidden; }
.window-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.window-title { font-weight: 500; }
.window-meta { color: var(--muted); font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.stat { padding: 16px 20px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-label { color: var(--text-2); font-size: 13px; line-height: 20px; }
.stat-value { font-size: 28px; line-height: 1; font-weight: 500; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 15px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.stat-sub { color: var(--muted); font-size: 12px; line-height: 16px; margin-top: 8px; }
.chart-box { padding: 16px 20px 12px; }
.legend { display: flex; gap: 20px; color: var(--text-2); font-size: 13px; margin-bottom: 8px; }
.legend i { display: inline-block; width: 16px; height: 2px; border-radius: 1px; vertical-align: middle; margin-right: 8px; }
.chart { display: block; width: 100%; height: auto; }
.chart-mobile { display: none; }
.chart .band { fill: var(--band); }
.chart .band-label { fill: var(--moss-ink); font: 400 11px var(--mono); }
.chart .grid { stroke: var(--line); }
.chart .axis { fill: var(--muted); font: 400 11px var(--mono); }
.chart .line-in { fill: none; stroke: var(--moss); stroke-width: 2.25; stroke-linecap: round; }
.chart .line-out { fill: none; stroke: #b3a999; stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .mark { stroke: var(--line-strong); stroke-dasharray: 2 3; }
.chart .dot { fill: var(--card); stroke: var(--moss); stroke-width: 2; }
.chart .note { fill: var(--text); font: 500 12px var(--sans); }

/* разделы */
section { padding: 96px 0; border-top: 1px solid var(--line); }
h2 { font-weight: 500; font-size: 32px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 12px; }
.section-lead { color: var(--text-2); margin: 0 0 48px; max-width: 36rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.steps .num { color: var(--muted); font-size: 12px; }
.steps h3 { font-weight: 500; font-size: 17px; margin: 8px 0 8px; }
.steps p { margin: 0; color: var(--text-2); }

.metrics { background: var(--card); border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.metric { display: grid; grid-template-columns: 18px minmax(160px, 1.2fr) 112px minmax(200px, 2fr) minmax(160px, 1.2fr); gap: 16px; align-items: center; padding: 20px 24px; }
.metric + .metric { border-top: 1px solid var(--line); }
.metric svg { color: var(--muted); }
.metric-name { font-weight: 500; }
.metric-value { text-align: right; font-size: 15px; }
.metric-note { color: var(--muted); font-size: 13px; line-height: 20px; }
.range { position: relative; height: 8px; border-radius: 4px; background: var(--raised); }
.range b { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: rgba(74, 102, 54, .28); }
.range i { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 2px var(--moss); }
.range i.low { box-shadow: 0 0 0 2px var(--neg); }

.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-weight: 500; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { color: var(--muted); flex: none; transition: transform 180ms var(--ease); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq p { margin: 0 0 20px; color: var(--text-2); max-width: 40rem; }

.login { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: start; }
.form { background: var(--card); border-radius: 16px; box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(31, 27, 22, .05); padding: 24px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.field input { width: 100%; height: 44px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); font: 400 15px var(--sans); color: var(--text); transition: box-shadow 150ms var(--ease); }
.field input:hover { box-shadow: inset 0 0 0 1px rgba(31, 27, 22, .24); }
.form .btn { width: 100%; justify-content: center; margin-top: 8px; }
.form-error { min-height: 20px; margin: 12px 0 0; color: var(--neg); font-size: 13px; line-height: 20px; }
.form-help { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 20px; }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 420ms var(--ease) both; }
  .hero > *:nth-child(2) { animation-delay: 60ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; min-height: 0; max-height: none; padding: 48px 0 64px; }
  .login { grid-template-columns: 1fr; gap: 32px; }
  .metric { grid-template-columns: 18px 1fr auto; row-gap: 8px; }
  .metric .range { grid-column: 2 / 4; }
  .metric .metric-note { grid-column: 2 / 4; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-login { margin-left: auto; }
  h1 { font-size: 38px; }
  .lead { font-size: 17px; line-height: 26px; }
  section { padding: 64px 0; }
  h2 { font-size: 26px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { display: none; }
  .stat-value { font-size: 24px; }
  .window-bar, .stat, .chart-box { padding-left: 16px; padding-right: 16px; }
  .chart-wide { display: none; }
  .chart-mobile { display: block; }
  .metric { padding: 16px; }
  footer { flex-direction: column; }
}

/* полоски диапазонов: CSP запрещает style-атрибуты */
.sw-in { background: var(--moss); }
.sw-out { background: repeating-linear-gradient(90deg, #b3a999 0 4px, transparent 4px 8px); }
.r1 b { left: 40%; width: 40%; } .r1 i { left: 71%; }
.r2 b { left: 60%; width: 15%; } .r2 i { left: 64%; }
.r3 b { left: 35%; width: 30%; } .r3 i { left: 41%; }
.r4 b { left: 20%; width: 40%; } .r4 i { left: 38%; }
