/* scenarios-s00.css - Интерактивная панель сценариев блока 00 AURORA */

/* 1. Главный контейнер панели сценариев */
.s00-scenarios-panel {
  margin: 0 0 28px;
  padding: 20px 22px 24px;
  background: #f9fbf9;
  border: 1px solid #d1d7d4;
  border-radius: 10px;
  box-sizing: border-box;
}

/* 2. Сегментированные переключатели */
.s00-controls-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8e4;
}

.s00-ctrl-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.s00-ctrl-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #626d77);
  min-width: 82px;
}

.s00-btn-group {
  display: inline-flex;
  flex-wrap: wrap;
  background: #eaeee5;
  padding: 3px;
  border-radius: 6px;
  gap: 2px;
}

.s00-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink, #080e1b);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.25;
  white-space: nowrap;
}

.s00-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink, #080e1b);
}

.s00-btn:focus-visible {
  outline: 2px solid var(--focus, #3d5947);
  outline-offset: 1px;
}

.s00-btn[aria-pressed="true"] {
  background: #ffffff;
  color: #121d17;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Строка состояния и сброс */
.s00-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12.5px;
  color: var(--muted, #626d77);
  margin-top: 4px;
}

.s00-status-text {
  font-weight: 500;
}

.s00-reset-btn {
  background: none;
  border: none;
  color: var(--focus, #3d5947);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: 12.5px;
  padding: 0;
  font-weight: 600;
}

.s00-reset-btn:hover {
  color: var(--ink, #080e1b);
}

/* 3. 4 Плитки KPI */
.s00-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

@media (max-width: 1180px) {
  .s00-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .s00-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.s00-kpi-grid .deck-kpi-card {
  margin: 0;
}

.s00-tile-badge {
  background: #eaeff2 !important;
  color: #4a5a52 !important;
  border: 1px solid #c9d3cd !important;
  font-size: 10.5px !important;
  padding: 2px 6px !important;
}

.s00-note-star {
  font-weight: 700;
  color: #b37d2e;
  cursor: help;
  font-size: 14px;
  margin-left: 2px;
}

.s00-debt-sub {
  display: block;
  font-size: 11px;
  color: #3d6b8f;
  font-weight: 600;
  margin-top: 2px;
}

/* 4. Графики (Сетка: накопительный поток + IRR панели) */
.s00-charts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 18px;
  background: #ffffff;
  border: 1px solid #d4ded7;
  border-radius: 8px;
  padding: 16px 18px;
}

@media (max-width: 1300px) {
  .s00-charts-layout {
    grid-template-columns: 1fr;
  }
}

.s00-chart-main,
.s00-chart-side {
  display: flex;
  flex-direction: column;
}

.s00-chart-title,
.s00-side-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink, #080e1b);
  margin-bottom: 8px;
}

.s00-svg-container {
  width: 100%;
  overflow-x: auto;
}

.s00-svg-container svg {
  display: block;
  width: 100%;
  height: auto;
}

.s00-shadow-line {
  cursor: pointer;
  transition: stroke-width 0.15s ease, opacity 0.15s ease;
}

.s00-shadow-line:hover {
  stroke-width: 2.5 !important;
  opacity: 0.8 !important;
}

.s00-bar-group {
  cursor: pointer;
}

.s00-bar-group:hover rect {
  opacity: 0.85 !important;
}

/* 5. Динамический текст под графиком */
.s00-dynamic-text-wrap {
  background: #eaeee5;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.s00-dynamic-text {
  font-size: 14.5px !important;
  line-height: 1.6 !important;
  color: var(--ink, #080e1b) !important;
  margin: 0 !important;
}

/* 6. Постоянная подпись */
.s00-permanent-footnote {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted, #626d77);
  margin-top: 8px;
}

.s00-noscript-note {
  font-size: 13px;
  margin-top: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid #d1d7d4;
  border-radius: 4px;
}

/* 7. Статические таблицы спойлера */
.strategy-r03 .s00-sp-variants-table th,
.strategy-r03 .s00-sp-variants-table td {
  font-size: 13.5px !important;
  line-height: 1.35 !important;
  padding: 8px 10px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.strategy-r03 .s00-sp-variants-table thead th {
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: var(--muted, #626d77) !important;
  white-space: normal !important;
}

.strategy-r03 .s00-sp-variants-table th[scope="row"] {
  width: 26% !important;
  min-width: 200px !important;
  font-weight: 600 !important;
  color: var(--ink, #080e1b) !important;
  white-space: normal !important;
}

.s00-sp-variants-table tr.is-s1 { --scn: #2e5c3e; }
.s00-sp-variants-table tr.is-s4 { --scn: #3d6b8f; }
.s00-sp-variants-table tr.is-s6 { --scn: #4a6b82; }
.s00-sp-variants-table tr.is-s2 { --scn: #626d77; }
.s00-sp-variants-table tr.is-s3 { --scn: #b37d2e; }

.s00-hz-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 8px 1px 0;
  border-radius: 50%;
  background: var(--scn, #626d77);
  vertical-align: middle;
}

.s00-hz-v {
  display: inline-block;
  min-width: 64px;
  padding: 3px 7px;
  border-radius: 4px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.s00-hz-v.is-neg, .s00-hz-legend i.is-neg { background: #f6e3df; color: #8a2f22; }
.s00-hz-v.is-low, .s00-hz-legend i.is-low { background: #fbf1de; color: #7a5418; }
.s00-hz-v.is-mid, .s00-hz-legend i.is-mid { background: #e3efe6; color: #244e38; }
.s00-hz-v.is-high, .s00-hz-legend i.is-high { background: #2e5c3e; color: #ffffff; }
.s00-hz-v.is-none, .s00-hz-legend i.is-none { background: #eef1ef; color: #626d77; font-weight: 600; }

.s00-hz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12px;
  color: var(--muted, #626d77);
}

.s00-hz-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.s00-hz-legend i {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 2px;
}

/* Печать */
@media print {
  .s00-controls-wrap,
  .s00-reset-btn,
  .s00-noscript-note {
    display: none !important;
  }
}

/* Адаптив 400px */
@media (max-width: 480px) {
  .s00-scenarios-panel {
    padding: 14px 12px 18px;
  }
  .s00-btn {
    padding: 5px 8px;
    font-size: 12px;
  }
  .s00-ctrl-label {
    min-width: 100%;
    margin-bottom: 2px;
  }
  .s00-btn-group {
    width: 100%;
    display: flex;
  }
  .s00-btn-group .s00-btn {
    flex: 1;
    text-align: center;
  }
}


/* Таблицы с двухстрочной шапкой в спойлере */
.strategy-r03 .s00-sp-variants-table thead tr:first-child th {
  border-bottom: 1px solid #c9d3cd !important;
  text-align: center !important;
}
.strategy-r03 .s00-sp-variants-table thead tr:first-child th:first-child,
.strategy-r03 .s00-sp-variants-table thead tr:first-child th:nth-child(2),
.strategy-r03 .s00-sp-variants-table thead tr:first-child th:last-child {
  text-align: left !important;
}
.strategy-r03 .s00-sp-variants-table thead tr:nth-child(2) th {
  font-size: 10.5px !important;
  padding: 4px 6px !important;
  text-align: center !important;
  border-bottom: 2px solid var(--line, #d1d7d4) !important;
}


/* Ореол у всех текстов в SVG (fix-01, п. 3.1) */
.s00-svg-container text {
  paint-order: stroke;
  stroke: var(--bg-card, #ffffff);
  stroke-width: 4px;
  stroke-linejoin: round;
}

/* Двухстрочные ячейки в таблицах спойлера (раунд 3, п. 2.5) */
.s00-hz-v {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px 2px !important;
  border-radius: 4px !important;
  line-height: 1.15 !important;
}
.s00-hz-proj {
  font-size: 12px !important;
  font-weight: 700 !important;
}
.s00-hz-owner {
  font-size: 10px !important;
  opacity: 0.85 !important;
}
.s00-hz-v.is-none, .s00-hz-legend i.is-none { background: #eef1ef; color: #626d77; }


/* Легенда над панелью IRR при ширине < 560 px (раунд 4, п. 1) */
.s00-irr-legend {
  display: none;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--muted, #626d77);
  margin: -4px 0 8px;
  flex-wrap: wrap;
}

.s00-irr-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.s00-irr-legend-dash {
  display: inline-block;
  width: 18px;
  height: 0;
  border-top: 2.5px dashed currentColor !important;
  vertical-align: middle;
}

.s00-irr-legend-dash.is-target {
  color: #b37d2e !important;
  border-top-color: #b37d2e !important;
}

.s00-irr-legend-dash.is-rate {
  color: #4a6b82 !important;
  border-top-color: #4a6b82 !important;
}
