/* Design tokens. Style family of ФГИС ЦС / ЕИС: white, deep blue accent, thin grey borders, plain large headings. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f2f5fa;        /* grey band behind search, like ЕИС */
  --surface: #ffffff;
  --line: #e4e7f2;           /* card border, ЕИС */
  --line-strong: #cfd6e4;
  --text: #334059;           /* ЕИС body text */
  --text-strong: #1b2536;
  --muted: #6b7690;
  --accent: #104e96;         /* ФГИС ЦС button */
  --accent-hover: #0c3f7b;
  --link: #0065dd;           /* ЕИС numbers */
  --good: #1a7f4b; --good-bg: #e7f5ee;
  --warn: #a35f00; --warn-bg: #fff4e0;
  --bad: #b3261e;  --bad-bg: #fdecea;
  --info-bg: #eaf2fd;
  --radius: 6px;
  --shadow: 0 15px 15px -10px #eff0f2;
  --font: 'Golos Text', Roboto, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--text-strong); font-weight: 500; margin: 0; }
h1 { font-size: 36px; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 22px; line-height: 1.3; }
h3 { font-size: 16px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Header */
.topline { border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.topline .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
header.main { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
header.main .wrap { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text-strong); font-weight: 600; font-size: 18px; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 32px; height: 32px; border-radius: 7px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: -.02em; }
nav.sections { display: flex; gap: 24px; height: 100%; }
nav.sections a { color: var(--text); display: flex; align-items: center; border-bottom: 3px solid transparent; font-size: 14px; }
nav.sections a:hover { text-decoration: none; color: var(--accent); }
nav.sections a.on { border-bottom-color: var(--accent); color: var(--text-strong); }
.head-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: var(--radius); border: 1px solid transparent; font: 500 14px var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--bg-soft); color: var(--text-strong); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }
.icon-btn { width: 36px; height: 36px; padding: 0; }
.burger { display: none; }

/* Common blocks */
.band { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-head { padding-top: 32px; padding-bottom: 24px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.search { display: flex; }
.search input { flex: 1; min-width: 0; height: 48px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); padding: 0 16px 0 44px; font: 15px var(--font); color: var(--text-strong); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b7690' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 16px center; }
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search .btn { height: 48px; border-radius: 0 var(--radius) var(--radius) 0; padding: 0 24px; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag.good { background: var(--good-bg); color: var(--good); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.info { background: var(--info-bg); color: var(--accent); }
.tag.plain { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Home */
.hero { padding: 56px 0 40px; }
.hero-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 48px 56px; text-align: center; }
.hero-box h1 { font-size: 34px; max-width: 760px; margin: 0 auto 10px; font-weight: 500; }
.hero-box h1 b { color: var(--accent); font-weight: 500; }
.hero-box p.lead { color: var(--muted); font-size: 16px; margin: 0 auto 28px; max-width: 640px; }
.hero-box .search { max-width: 760px; margin: 0 auto; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; max-width: 980px; margin: 24px auto 0; text-align: left; box-shadow: 0 8px 24px -16px rgba(16,78,150,.35); }
.tile { padding: 18px 20px; border-left: 1px solid var(--line); color: var(--text-strong); display: flex; flex-direction: column; gap: 6px; }
.tile:first-child { border-left: 0; }
.tile:hover { background: var(--bg-soft); text-decoration: none; }
.tile .t { font-weight: 500; font-size: 15px; }
.tile .d { color: var(--muted); font-size: 13px; }
.tile .i { width: 28px; height: 28px; color: var(--accent); }
.stats { display: flex; justify-content: center; gap: 0; margin: 28px auto 0; flex-wrap: wrap; }
.stat { padding: 0 24px; border-left: 1px solid var(--line); text-align: center; }
.stat:first-child { border-left: 0; }
.stat .v { font-size: 22px; font-weight: 600; color: var(--text-strong); }
.stat .l { font-size: 12px; color: var(--muted); }
.section { padding: 32px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how .panel { padding: 22px; }
.how .step { width: 28px; height: 28px; border-radius: 50%; background: var(--info-bg); color: var(--accent); display: grid; place-items: center; font-weight: 600; margin-bottom: 12px; }
.how p { margin: 6px 0 0; color: var(--muted); }

/* Tenders list (ЕИС layout: results left, parameters right) */
.list-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding-top: 24px; padding-bottom: 48px; }
.results-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.results-head h2 { font-size: 30px; font-weight: 400; }
.results-head .count { color: var(--muted); font-size: 18px; font-weight: 500; }
.sortbar { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 16px; font-size: 13px; gap: 12px; flex-wrap: wrap; }
.sortbar select { font: 13px var(--font); color: var(--link); border: 0; background: transparent; cursor: pointer; }
.t-card { display: grid; grid-template-columns: minmax(0, 1fr) 260px; margin-bottom: 16px; }
.t-main { padding: 18px 20px; }
.t-side { padding: 18px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.t-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.t-no { font-size: 19px; font-weight: 500; display: inline-block; margin: 4px 0 8px; }
.t-label { font-size: 12px; color: var(--muted); }
.t-obj { color: var(--text-strong); margin-bottom: 10px; }
.t-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.price { font-size: 19px; font-weight: 500; color: var(--text-strong); }
.profit { font-size: 19px; font-weight: 600; }
.profit.good { color: var(--good); } .profit.warn { color: var(--warn); } .profit.bad { color: var(--bad); }
.params { position: sticky; top: 88px; align-self: start; }
.params h3 { font-size: 18px; font-weight: 500; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pgroup { padding: 16px 0; border-bottom: 1px solid var(--line); }
.pgroup .ttl { font-weight: 500; color: var(--text-strong); margin-bottom: 10px; }
.check { display: flex; align-items: center; gap: 10px; margin: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.range { display: flex; gap: 8px; }
.range input, .field { width: 100%; height: 36px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 10px; font: 14px var(--font); color: var(--text-strong); background: var(--surface); }
.params-toggle { display: none; }

/* Tender page */
.verdict { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; padding-top: 24px; padding-bottom: 8px; }
.verdict-main { padding: 24px; }
.verdict-main .big { font-size: 30px; font-weight: 600; color: var(--good); line-height: 1.2; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 20px; }
.kpi { padding: 16px 16px 0 0; }
.kpi + .kpi { padding-left: 16px; border-left: 1px solid var(--line); }
.kpi .v { font-size: 20px; font-weight: 600; color: var(--text-strong); }
.kpi .l { font-size: 12px; color: var(--muted); }
.facts { padding: 20px 24px; }
.facts dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 12px; margin: 12px 0 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; color: var(--text-strong); }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-top: 24px; overflow-x: auto; }
.tabs a { padding: 12px 0; color: var(--text); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--text-strong); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--accent); }
.block { padding: 24px; margin-top: 20px; }
.block h2 { margin-bottom: 4px; }
.block .sub { color: var(--muted); margin: 0 0 18px; }
.money { display: grid; gap: 10px; }
.mrow { display: grid; grid-template-columns: 220px minmax(0, 1fr) 120px; gap: 16px; align-items: center; }
.bar { height: 10px; background: var(--bg-soft); border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.bar i.g { background: var(--good); }
.mrow .v { text-align: right; color: var(--text-strong); font-weight: 500; }
.scen { width: 100%; border-collapse: collapse; }
.scen th, .scen td { text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.scen th:first-child, .scen td:first-child { text-align: left; }
.scen th { font-weight: 500; color: var(--muted); font-size: 12px; text-transform: none; }
.scen tr.mark td { background: var(--info-bg); }
.scale { position: relative; height: 34px; margin: 18px 0 6px; }
.scale .track { position: absolute; left: 0; right: 0; top: 14px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--good) 0 30%, var(--warn) 30% 60%, var(--bad) 60%); opacity: .8; }
.scale .market { position: absolute; top: 8px; height: 18px; border: 2px solid var(--accent); border-radius: 4px; background: rgba(16,78,150,.08); }
.scale-l { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.issues { display: grid; gap: 12px; }
.issue { display: grid; grid-template-columns: 28px minmax(0, 1fr) 140px; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; align-items: start; }
.issue .sev { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.issue .sev.bad { background: var(--bad-bg); color: var(--bad); } .issue .sev.warn { background: var(--warn-bg); color: var(--warn); } .issue .sev.info { background: var(--info-bg); color: var(--accent); }
.issue .t { color: var(--text-strong); font-weight: 500; }
.issue .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.issue .s { text-align: right; font-weight: 600; color: var(--text-strong); }
.docs { width: 100%; border-collapse: collapse; }
.docs td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.docs td:last-child { text-align: right; }
.conf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.conf .panel { padding: 16px; }
.meter { height: 6px; border-radius: 3px; background: var(--bg-soft); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }

/* Estimator */
.stepper { display: flex; gap: 0; margin: 24px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.stepper a { flex: 1; padding: 14px 18px; color: var(--muted); display: flex; gap: 12px; align-items: center; border-left: 1px solid var(--line); }
.stepper a:first-child { border-left: 0; }
.stepper a:hover { text-decoration: none; background: var(--bg-soft); }
.stepper .n { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.stepper a.done .n { background: var(--good); border-color: var(--good); color: #fff; }
.stepper a.on { color: var(--text-strong); background: var(--info-bg); }
.stepper a.on .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.est-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; padding-bottom: 48px; }
.drop { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 36px; text-align: center; background: var(--bg-soft); }
.drop .file { display: inline-flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-top: 14px; color: var(--text-strong); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin-top: 16px; }
.q { border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-top: 12px; }
.q .row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.q .t { color: var(--text-strong); font-weight: 500; }
.q .why { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choice { border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 12px; cursor: pointer; background: var(--surface); font: 13px var(--font); color: var(--text-strong); text-align: left; }
.choice small { display: block; color: var(--muted); }
.choice.on { border-color: var(--accent); background: var(--info-bg); box-shadow: inset 0 0 0 1px var(--accent); }
.summary { padding: 20px; position: sticky; top: 88px; align-self: start; }
.summary .tot { font-size: 26px; font-weight: 600; color: var(--text-strong); margin: 4px 0 14px; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0 0 16px; font-size: 13px; }
.summary dd { margin: 0; text-align: right; color: var(--text-strong); }
.dl-list { display: grid; gap: 8px; }
.dl { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--text-strong); }
.dl:hover { text-decoration: none; border-color: var(--accent); }
.dl .ext { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--info-bg); padding: 2px 6px; border-radius: 4px; }

footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 32px 0; margin-top: 24px; font-size: 13px; color: var(--muted); }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
footer b { color: var(--text-strong); display: block; margin-bottom: 8px; font-weight: 500; }
footer a { color: var(--muted); display: block; margin: 4px 0; }
.screen { display: none; }
.screen.on { display: block; }
.proto-note { position: fixed; right: 16px; bottom: 16px; background: var(--text-strong); color: var(--bg); font-size: 12px; padding: 6px 10px; border-radius: 6px; opacity: .85; z-index: 20; }

nav.sections a { white-space: nowrap; }
/* Narrow screens: the sections go into the menu button */
@media (max-width: 1000px) {
  nav.sections { display: none; }
  nav.sections.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 24px; gap: 0; height: auto; box-shadow: 0 12px 24px -12px rgba(0,0,0,.2); }
  nav.sections.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  nav.sections.open a:last-child { border-bottom: 0; }
  .burger { display: inline-flex; }
}
/* Phone */
@media (max-width: 960px) {
  .list-layout, .verdict, .est-grid { grid-template-columns: 1fr; }
  .params { position: static; display: none; }
  .params.open { display: block; }
  .params-toggle { display: inline-flex; }
  .summary { position: static; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile:nth-child(3) { border-left: 0; }
  .tile:nth-child(n+3) { border-top: 1px solid var(--line); }
  footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: 26px; }
  .topline { display: none; }
  .head-right .btn-ghost.reg { display: none; }
  .hero { padding: 24px 0; }
  .hero-box { padding: 28px 16px; border-radius: 10px; }
  .hero-box h1 { font-size: 24px; }
  .search input { height: 44px; font-size: 14px; padding-left: 40px; background-position: 12px center; }
  .search .btn { height: 44px; padding: 0 14px; }
  .tiles { grid-template-columns: 1fr; }
  .tile { border-left: 0 !important; border-top: 1px solid var(--line); }
  .tile:first-child { border-top: 0; }
  .stat { padding: 8px 12px; border-left: 0; }
  .how { grid-template-columns: 1fr; }
  .t-card { grid-template-columns: 1fr; }
  .t-side { border-left: 0; border-top: 1px solid var(--line); }
  .results-head h2 { font-size: 24px; }
  .kpis { grid-template-columns: 1fr; }
  .kpi + .kpi { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .mrow { grid-template-columns: 1fr 90px; }
  .mrow .bar { grid-column: 1 / -1; grid-row: 2; }
  .issue { grid-template-columns: 28px minmax(0, 1fr); }
  .issue .s { grid-column: 2; text-align: left; }
  .conf { grid-template-columns: 1fr; }
  .scen { font-size: 13px; }
  .scen th, .scen td { padding: 8px 6px; }
  .stepper { flex-direction: column; }
  .stepper a { border-left: 0; border-top: 1px solid var(--line); }
  .stepper a:first-child { border-top: 0; }
  .opts { grid-template-columns: 1fr; }
  .facts dl { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  footer .wrap { grid-template-columns: 1fr; }
  .block, .verdict-main { padding: 18px; }
}
