/* Экраны: формы, результаты, сценарии, графики. */
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px 14px; margin: 8px 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; padding: 6px 12px 10px; min-width: 0; }
legend { font-weight: 600; font-size: 0.86rem; padding: 0 6px; color: var(--ink-2); }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 8px 16px; margin: 6px 0; }
.kv > div { border-left: 3px solid var(--teal-soft); padding-left: 10px; min-width: 0; }
.kv dt { color: var(--ink-3); font-size: 0.78rem; }
.kv dd { font-weight: 600; overflow-wrap: anywhere; }

.compare-box { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-end; padding: 10px 12px; background: var(--teal-soft); border: 1px solid #a9d3d4; border-radius: var(--radius); margin: 8px 0; }
.compare-box strong { font-size: 1.15rem; display: block; }
.compare-box .note { flex-basis: 100%; }

.member, .row-card, .sc-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 8px 0; background: #fbfcfc; }
.member > summary, .sc-card > summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.sc-card { background: var(--card); border-left: 4px solid var(--teal); }
.sc-title { overflow-wrap: anywhere; }
.warnlist li { color: var(--amber); }
.no-data { color: var(--amber); font-weight: 600; }
.delta { font-weight: 400; }
.delta.up { color: var(--red); }
.delta.down { color: var(--green); }
.marks { margin-top: 8px; color: var(--ink-2); }

.figure { margin: 12px 0 18px; max-width: 760px; }
.figure figcaption { font-weight: 600; margin-bottom: 4px; }
.chart { width: 100%; height: auto; display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.chart .plot-bg { fill: #fbfcfc; }
.chart .grid-line { stroke: var(--line-soft); stroke-width: 1; }
.chart .axis, .chart .tick-line { stroke: var(--ink-3); stroke-width: 1; }
.chart .zero-line { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 4 3; }
.chart .tick { fill: var(--ink-2); font-size: 11px; font-family: var(--font); }
.chart .axis-label { fill: var(--ink-2); font-size: 12px; font-family: var(--font); }
.chart .band { fill: rgba(11, 107, 115, 0.16); stroke: none; }
.chart .line { stroke-width: 2.2; stroke-linejoin: round; }
.chart .line { fill: none; }
.chart .line.s0 { stroke: #17497d; }
.chart .line.s1 { stroke: #1f6b3a; }
.chart .line.s2 { stroke: #b3541e; }
.chart .line.s3 { stroke: #a3261b; }
.chart .dot.s0 { fill: #17497d; }
.chart .dot.s1 { fill: #1f6b3a; }
.chart .dot.s2 { fill: #b3541e; }
.chart .dot.s3 { fill: #a3261b; }
.chart .line.s1 { stroke-dasharray: 7 4; }
.chart .line.s2 { stroke-dasharray: 2 4; }
.chart .line.s3 { stroke-dasharray: 10 3 2 3; }
.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0; font-size: 0.86rem; }
.legend .swatch { display: inline-block; width: 22px; height: 0; border-top: 3px solid; margin-right: 6px; vertical-align: middle; }
.swatch.s0 { border-color: #17497d; }
.swatch.s1 { border-color: #1f6b3a; border-top-style: dashed; }
.swatch.s2 { border-color: #b3541e; border-top-style: dotted; }
.swatch.s3 { border-color: #a3261b; border-top-style: dashed; }
.swatch.band-sw { height: 10px; border: 0; background: rgba(11, 107, 115, 0.3); }
.chart-data summary { cursor: pointer; color: var(--teal); font-weight: 600; }

@media (max-width: 600px) {
  main { padding: 12px; }
  .head { padding: 12px; }
  .btn { width: 100%; }
  .btn.small { width: auto; }
  .row > .btn { flex: 1 1 100%; }
  table.compare td:first-child, table.compare th:first-child { position: static; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
