:root {
  color-scheme: light;
  --blue: #0057a6;
  --blue-dark: #003f7d;
  --cyan: #00aeef;
  --red: #e31e24;
  --ink: #082047;
  --muted: #5b718c;
  --line: #cad9eb;
  --bg: #edf4fb;
  --soft: #f6fbff;
  --surface: #ffffff;
  --shadow: 0 22px 54px rgba(0, 57, 116, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(0, 87, 166, 0.12), rgba(237, 244, 251, 0) 360px),
    var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px clamp(16px, 4vw, 48px);
  color: #ffffff;
  background: rgba(0, 87, 166, 0.94);
  border-bottom: 3px solid var(--red);
  backdrop-filter: blur(12px);
}

.brand {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #ffffff 0 33.333%, var(--cyan) 33.333% 66.666%, var(--red) 66.666% 100%);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 19px;
  line-height: 1.1;
}

.brand small {
  margin-top: 4px;
  color: #d9efff;
  font-size: 13px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
  color: #e9f6ff;
  font-size: 14px;
  font-weight: 800;
}

.top-nav a,
.header-action,
.primary-action,
.secondary-action {
  text-decoration: none;
}

.top-nav a:hover {
  color: #ffffff;
}

.header-action,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-weight: 900;
  text-align: center;
}

.header-action,
.secondary-action {
  color: var(--blue-dark);
  background: #ffffff;
}

.primary-action {
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 14px 30px rgba(227, 30, 36, 0.24);
}

main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px clamp(14px, 4vw, 48px) 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.56fr);
  gap: 24px;
  align-items: stretch;
  padding: clamp(28px, 4.2vw, 52px);
  color: #ffffff;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 63, 125, 0.98), rgba(0, 87, 166, 0.92)),
    var(--blue);
  box-shadow: var(--shadow);
}

.hero > * {
  min-width: 0;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #bdeeff;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.06;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 14px;
  color: var(--blue-dark);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.08;
}

h3 {
  margin-bottom: 10px;
  color: var(--blue-dark);
  font-size: 22px;
  line-height: 1.18;
}

.lead {
  max-width: 760px;
  color: #e7f5ff;
  font-size: 18px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 330px;
  min-width: 0;
  padding: 22px;
  color: var(--ink);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(0, 35, 80, 0.2);
}

.panel-ribbon {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffffff 0 33.333%, var(--cyan) 33.333% 66.666%, var(--red) 66.666% 100%);
  border: 1px solid var(--line);
}

.hero-panel strong {
  color: var(--blue-dark);
  font-size: 26px;
  line-height: 1.1;
}

.hero-panel p {
  color: #17365f;
  font-size: 18px;
  line-height: 1.55;
}

.hero-panel span {
  display: block;
  padding: 14px;
  color: #ffffff;
  border-radius: var(--radius);
  background: var(--red);
  font-weight: 850;
  line-height: 1.35;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 22px 0 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.metrics-grid article {
  position: relative;
  padding: 22px;
  background: #ffffff;
}

.metrics-grid article::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  content: "";
  background: var(--blue);
}

.metrics-grid article:nth-child(2)::before,
.metrics-grid article:nth-child(4)::before {
  background: var(--red);
}

.metrics-grid article:nth-child(3)::before {
  background: var(--cyan);
}

.metrics-grid strong,
.metrics-grid span {
  display: block;
}

.metrics-grid strong {
  margin-bottom: 8px;
  color: var(--blue-dark);
  font-size: 34px;
  line-height: 1;
}

.metrics-grid span {
  color: var(--muted);
  line-height: 1.42;
}

.section {
  margin-top: 28px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.section-heading {
  max-width: 980px;
  margin-bottom: 24px;
}

.section-heading .eyebrow,
.letter-section .eyebrow {
  color: var(--blue);
}

.section-heading p,
.letter-card p,
.failure-grid p,
.program-grid p,
.roadmap p,
.monitor-grid p,
.practice-list p,
figcaption {
  color: var(--muted);
  line-height: 1.6;
}

.letter-card {
  padding: 22px;
  border-left: 5px solid var(--red);
  border-radius: var(--radius);
  background: var(--soft);
}

.letter-card p:last-child {
  margin-bottom: 0;
}

.chart-card {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.chart-card.wide {
  margin-bottom: 18px;
}

.chart-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #ffffff;
}

.chart-card figcaption {
  margin-top: 10px;
  font-size: 14px;
}

.compact-chart {
  margin-top: 18px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--blue-dark);
  font-size: 13px;
  text-transform: uppercase;
  background: #eef6ff;
}

td {
  color: #1b3b64;
}

tr:last-child td {
  border-bottom: 0;
}

.risk-layout,
.charts-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.risk-grid,
.failure-grid,
.program-grid,
.monitor-grid,
.practice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.risk-grid article,
.failure-grid article,
.program-grid article,
.monitor-grid article,
.practice-list article,
.roadmap article {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.risk-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 32px;
  line-height: 1;
}

.risk-grid span {
  color: var(--blue-dark);
  font-weight: 780;
  line-height: 1.35;
}

.failure-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.failure-grid article {
  min-height: 230px;
}

.failure-grid span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  color: #ffffff;
  border-radius: var(--radius);
  background: var(--blue);
  font-weight: 900;
}

.failure-grid article:nth-child(2) span,
.failure-grid article:nth-child(5) span {
  background: var(--red);
}

.failure-grid article:nth-child(3) span {
  background: var(--cyan);
}

.failure-grid strong,
.program-grid strong,
.roadmap strong,
.monitor-grid strong,
.practice-list strong {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-dark);
  font-size: 19px;
  line-height: 1.2;
}

.program-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.roadmap article {
  border-top: 5px solid var(--blue);
}

.roadmap article:nth-child(2),
.roadmap article:nth-child(4) {
  border-top-color: var(--red);
}

.roadmap article:nth-child(3) {
  border-top-color: var(--cyan);
}

.roadmap span,
.monitor-grid span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.monitor-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.monitor-grid article {
  min-height: 190px;
}

.practice-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-footer {
  max-width: 1320px;
  margin: 28px auto 0;
  padding: 28px clamp(14px, 4vw, 48px) 36px;
  color: #ffffff;
  background: var(--blue-dark);
  border-top: 4px solid var(--red);
}

.site-footer strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.site-footer p {
  margin-bottom: 0;
  color: #d7ecff;
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    grid-column: 1 / -1;
    order: 3;
  }

  .hero,
  .risk-layout,
  .charts-two {
    grid-template-columns: 1fr;
  }

  .metrics-grid,
  .program-grid,
  .roadmap,
  .failure-grid,
  .monitor-grid,
  .practice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  table {
    background: transparent;
  }

  thead {
    display: none;
  }

  tr {
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
  }

  td {
    display: grid;
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
    overflow-wrap: anywhere;
  }

  td::before {
    color: var(--blue-dark);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .negative-table td:nth-child(1)::before,
  .positive-table td:nth-child(1)::before {
    content: "Год";
  }

  .negative-table td:nth-child(2)::before,
  .positive-table td:nth-child(2)::before {
    content: "Корпус";
  }

  .negative-table td:nth-child(3)::before {
    content: "Негатив";
  }

  .negative-table td:nth-child(4)::before {
    content: "Доля";
  }

  .negative-table td:nth-child(5)::before {
    content: "Топ-источник";
  }

  .negative-table td:nth-child(6)::before {
    content: "Доля топ-3";
  }

  .positive-table td:nth-child(3)::before {
    content: "Инициативы";
  }

  .positive-table td:nth-child(4)::before {
    content: "Результат";
  }

  .positive-table td:nth-child(5)::before {
    content: "Слабая стадия";
  }

  .positive-table td:nth-child(6)::before {
    content: "Индекс";
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .brand {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .top-nav {
    flex-wrap: wrap;
    gap: 14px;
    max-width: 100%;
    overflow-x: visible;
    padding-bottom: 2px;
    font-size: 13px;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .header-action,
  .primary-action,
  .secondary-action {
    width: 100%;
  }

  main {
    padding-top: 18px;
  }

  .hero {
    display: block;
    padding: 26px 16px;
    overflow: hidden;
  }

  .hero-copy {
    width: 100%;
    max-width: min(100%, 282px);
  }

  .hero-panel {
    min-height: 0;
    max-width: min(100%, 282px);
    margin-top: 24px;
  }

  h1 {
    font-size: clamp(23px, 6.1vw, 27px);
    line-height: 1.12;
  }

  h2 {
    font-size: clamp(24px, 7vw, 31px);
  }

  .lead,
  .hero-panel p {
    font-size: 16px;
  }

  .metrics-grid,
  .risk-grid,
  .program-grid,
  .roadmap,
  .failure-grid,
  .monitor-grid,
  .practice-list {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 24px 16px;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  table {
    background: transparent;
  }

  thead {
    display: none;
  }

  tr {
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
  }

  td {
    display: grid;
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
    overflow-wrap: anywhere;
  }

  td::before {
    color: var(--blue-dark);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .negative-table td:nth-child(1)::before,
  .positive-table td:nth-child(1)::before {
    content: "Год";
  }

  .negative-table td:nth-child(2)::before {
    content: "Корпус";
  }

  .negative-table td:nth-child(3)::before {
    content: "Негатив";
  }

  .negative-table td:nth-child(4)::before {
    content: "Доля";
  }

  .negative-table td:nth-child(5)::before {
    content: "Топ-источник";
  }

  .negative-table td:nth-child(6)::before {
    content: "Доля топ-3";
  }

  .positive-table td:nth-child(2)::before {
    content: "Корпус";
  }

  .positive-table td:nth-child(3)::before {
    content: "Инициативы";
  }

  .positive-table td:nth-child(4)::before {
    content: "Результат";
  }

  .positive-table td:nth-child(5)::before {
    content: "Слабая стадия";
  }

  .positive-table td:nth-child(6)::before {
    content: "Индекс";
  }
}
