:root {
  --bg: #0b0b0b;
  --panel: #151515;
  --panel-2: #1d1d1d;
  --line: #2a2a2a;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --lime: #d2ff00;
  --lime-dim: #a9cc00;
  --warn: #ffb020;
  --err: #ff5a5a;
  --radius: 10px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; }
a { color: var(--lime); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: 26px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; color: #d6d6d6; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* plus-grid motif */
.grid-bg {
  background-image:
    linear-gradient(transparent 23px, rgba(210,255,0,.05) 24px),
    linear-gradient(90deg, transparent 23px, rgba(210,255,0,.05) 24px);
  background-size: 24px 24px;
}

/* top bar */
.topbar { border-bottom: 1px solid var(--line); background: rgba(11,11,11,.92); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--text); }
.brand .word { font-weight: 800; font-size: 24px; letter-spacing: .12em; }
.brand .word i { color: var(--lime); font-style: normal; }
.brand .by { color: var(--muted); font-size: 13px; }
.userbox { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--lime); background: var(--lime); color: #000; font-weight: 700; font-size: 15px; padding: 12px 20px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--lime-dim); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--lime); }
.btn.small { padding: 6px 12px; font-size: 13px; }
label { display: block; font-size: 13px; color: #cfcfcf; margin-bottom: 6px; }
input, select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 12px; font-size: 15px; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime); }
.field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.msg { font-size: 14px; margin-top: 12px; min-height: 20px; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--lime); }

/* login */
.login { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.login .card { width: 100%; max-width: 440px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--lime); font-weight: 700; margin-bottom: 10px; }
.codeinput { font-size: 26px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }

/* sections */
section { padding: 56px 0; border-bottom: 1px solid var(--line); }
.hero { padding: 48px 0 32px; }
.hero p { max-width: 760px; font-size: 18px; }
.status-pill { display: inline-block; border: 1px solid var(--warn); color: var(--warn); border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 600; margin-left: 8px; vertical-align: middle; }

.tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.tab { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 14px; }
.tab.active { color: #000; background: var(--lime); border-color: var(--lime); font-weight: 700; }
.viewer { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.viewer iframe, .viewer video { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.viewer .placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; }
.viewer .placeholder p { color: var(--muted); max-width: 420px; }

.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cols3 .card { padding: 24px; }
.cols3 .num { color: var(--lime); font-weight: 800; font-size: 13px; letter-spacing: .12em; margin-bottom: 10px; }
.cols3 ul { margin: 0; padding-left: 18px; color: #d6d6d6; }
.cols3 li { margin-bottom: 6px; }

/* calculator */
.calc { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 4px; margin: 0 0 16px; background: var(--panel); }
legend { padding: 0 8px; font-weight: 700; font-size: 14px; color: var(--lime); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
details.adv summary { cursor: pointer; color: var(--muted); font-size: 14px; margin: 4px 0 14px; }
.results { position: sticky; top: 84px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.kpi .v { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi .v.lime { color: var(--lime); }
.kpi .l { font-size: 12px; color: var(--muted); }
.kpi .r { font-size: 12px; color: #bdbdbd; margin-top: 2px; }
.kpi.wide { grid-column: span 2; }
table.years { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; margin-bottom: 14px; }
table.years th, table.years td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.years th:first-child, table.years td:first-child { text-align: left; }
table.years th { color: var(--muted); font-weight: 600; font-size: 12px; }
.warnings { list-style: none; padding: 0; margin: 0 0 14px; }
.warnings li { border-left: 3px solid var(--warn); padding: 6px 10px; background: rgba(255,176,32,.07); font-size: 13px; margin-bottom: 6px; color: #e9d9b8; }
.disclaimer { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.savestate { font-size: 12px; color: var(--muted); }

footer { padding: 32px 0 48px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* admin */
.admin table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin th, .admin td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin th { color: var(--muted); font-weight: 600; }
.admin code { font-size: 12px; color: var(--lime); word-break: break-all; }
.admin .scroll { overflow-x: auto; }
.badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.badge.on { border-color: var(--lime); color: var(--lime); }

@media (max-width: 900px) {
  .calc, .cols3 { grid-template-columns: 1fr; }
  .results { position: static; }
}

/* ===== v0.7 – proposal-style layout ===== */
:root { --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace; --paper: #f4f5f2; --ink: #101214; --ink-2: #4a4f55; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
.label { font-family: var(--mono); text-transform: uppercase; letter-spacing: .22em; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.label.lime { color: var(--lime); }
.dia { color: var(--lime); margin-right: 6px; }
h2.big { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.02em; margin-bottom: 28px; }
.lead { font-size: 19px; color: #c9ccd0; max-width: 760px; }

.secnav { position: sticky; top: 64px; z-index: 9; background: rgba(11,11,11,.95); border-bottom: 1px solid var(--line); }
.secnav .wrap { display: flex; gap: 26px; overflow-x: auto; height: 46px; align-items: center; }
.secnav a { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-decoration: none; white-space: nowrap; }
.secnav a:hover { color: var(--lime); }

.hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; padding-bottom: 40px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 64px); letter-spacing: -.03em; margin: 10px 0 20px; }
.agenda { border: 1px solid #3a3f25; padding: 24px 28px; background: rgba(21,21,21,.7); }
.agenda ol { margin: 0; padding-left: 22px; }
.agenda li { margin: 8px 0; color: #e6e6e6; }
.agenda li::marker { color: var(--lime); font-family: var(--mono); }
.agenda a { color: inherit; text-decoration: none; }
.agenda a:hover { color: var(--lime); }
.glance-title { color: var(--lime); border-top: 1px solid var(--line); padding-top: 28px; }
.glance { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.glance > div { border-top: 3px solid #333; padding-top: 14px; }
.glance > div.hl { border-top-color: var(--lime); }
.glance > div.hl h3 { color: var(--lime); }
.glance h3 { font-size: 19px; margin: 4px 0 8px; }
.glance p { font-size: 14px; color: #b9bcc0; }

section.light { background: var(--paper); color: var(--ink); }
section.light p, section.light li { color: var(--ink-2); }
section.light .label { color: #6b6f75; }
section.light .dia, section.light .label.lime-d { color: #6d8500; }
section.light .lead.dark { color: var(--ink-2); }
section.light .muted { color: #6b6f75; }
section.light a { color: #4d6000; }
.cols3.plain > div { border-top: 3px solid var(--ink); padding-top: 16px; }
section:not(.light) .cols3.plain > div { border-top-color: #444; }
.label.lime-d { color: var(--lime); }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); }
.steps > div { padding: 22px; border-right: 1px solid var(--line); }
.steps > div:last-child { border-right: 0; }
.steps .n { font-family: var(--mono); color: var(--lime); font-size: 13px; }
.steps h3 { margin: 10px 0 6px; font-size: 19px; }
.steps p { font-size: 14px; color: #b9bcc0; margin: 0; }

.timeline { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr 1.2fr 1fr; gap: 4px; margin: 30px 0 8px; }
.timeline .ph { background: var(--ink); color: #fff; padding: 16px 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }
.timeline .ph.test { background: #2b3300; color: var(--lime); }
.timeline .ph.hatch { background: repeating-linear-gradient(45deg, #d8dbd2, #d8dbd2 6px, #eceee8 6px, #eceee8 12px); color: var(--ink); }
.timeline .ph.next { background: transparent; color: #4d6000; border: 1px dashed #6d8500; }
.tl-gates { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin-bottom: 28px; }
.gate { display: grid; grid-template-columns: 140px 1fr; gap: 20px; border: 1px solid #d9dbd4; background: #fff; padding: 22px 26px; margin-bottom: 10px; }
.gate .g { font-family: var(--mono); letter-spacing: .14em; color: #6d8500; font-size: 13px; text-transform: uppercase; }
.gate h3 { margin-bottom: 8px; }
.gate ul { margin: 0; padding-left: 18px; }
.gate.strong { border: 2px solid #8aa300; background: #f2f7d6; }
.nocure { background: #fff; border-left: 4px solid #8aa300; padding: 14px 18px; margin-top: 14px; }
.nocure p { margin: 0; color: var(--ink); }
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.contacts a { font-size: 20px; }

@media (max-width: 900px) {
  .hero-grid, .glance, .steps, .timeline, .contacts { grid-template-columns: 1fr; }
  .steps > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .gate { grid-template-columns: 1fr; }
  .tl-gates { flex-direction: column; gap: 4px; }
}
