:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f4f5f8;
  --text: #101114;
  --muted: #747985;
  --line: #e7e9ee;
  --yellow: #ffd91a;
  --green: #11a83f;
  --green-soft: #dcf7e4;
  --red: #ef2436;
  --red-soft: #ffe6e8;
  --shadow: 0 18px 55px rgba(23, 28, 39, .08);
  --radius: 8px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 50% 0, #ffffff 0, var(--bg) 42%, #ffffff 100%);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 24px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 46px 18px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
}

.top-actions,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: 800;
}

.nav {
  justify-content: center;
  gap: 34px;
}

.nav-link {
  position: relative;
  padding: 13px 0 25px;
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}

.nav-link.active,
.nav-link:hover {
  color: var(--text);
}

.nav-link.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--yellow);
  content: "";
}

.top-actions {
  gap: 16px;
}

.ghost-button,
.primary-button,
.dark-button,
.icon-button,
.cta {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 0 24px;
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
}

.primary-button,
.cta {
  border-color: var(--yellow);
  background: var(--yellow);
}

.dark-button {
  width: 100%;
  border-color: #15161a;
  background: #15161a;
  color: #fff;
}

.icon-button {
  width: 48px;
  padding: 0;
}

main,
.page {
  max-width: 1440px;
  margin: 0 auto;
}

.page {
  display: none;
  padding: 0 46px 46px;
}

.active-page {
  display: block;
}

.hero,
.security-hero,
.panel,
.benefits,
.idea-band {
  border: 1px solid rgba(229, 231, 237, .8);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  min-height: 455px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(360px, .95fr) 1.25fr;
  align-items: center;
  margin: 12px 0 40px;
  background: linear-gradient(105deg, #fff 0 42%, #f2f3f6 42% 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 72px 88px;
}

.hero-copy h1,
.security-main h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.13;
  font-weight: 850;
}

.hero-copy p {
  max-width: 445px;
  margin: 26px 0 34px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.48;
}

.hero-art {
  position: relative;
  min-height: 455px;
}

.podium,
.tile {
  position: absolute;
  box-shadow: 0 28px 65px rgba(17, 20, 27, .15);
}

.podium {
  right: 20px;
  bottom: -58px;
  width: 430px;
  height: 245px;
  border-radius: 50% 50% 0 0 / 36% 36% 0 0;
  background: linear-gradient(180deg, #fff, #dde0e5);
}

.podium-back {
  right: 62px;
  bottom: 12px;
  width: 520px;
  height: 230px;
  opacity: .78;
}

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 36px;
  background: linear-gradient(145deg, #fff, #e7e8ec);
}

.moex-tile {
  top: 88px;
  left: 80px;
  width: 245px;
  height: 210px;
  gap: 18px;
}

.moex-tile span {
  color: #e01e2d;
  font-size: 58px;
  font-weight: 900;
}

.moex-tile strong {
  font-size: 18px;
  line-height: 1.1;
}

.emblem-tile {
  right: 282px;
  bottom: 82px;
  width: 178px;
  height: 165px;
  border-radius: 28px;
  background: linear-gradient(145deg, #2a2d33, #101114);
  color: #d5d8de;
  font-size: 62px;
}

.chart-tile {
  top: 92px;
  right: 120px;
  width: 155px;
  height: 140px;
  gap: 10px;
}

.chart-tile i {
  width: 16px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(#aeb2ba, #32353a);
}

.chart-tile i:nth-child(1) { height: 34px; }
.chart-tile i:nth-child(2) { height: 58px; }
.chart-tile i:nth-child(3) { height: 80px; }
.chart-tile i:nth-child(4) { height: 46px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  gap: 36px;
}

.content-column,
.side-column {
  display: grid;
  min-width: 0;
  gap: 28px;
  align-content: start;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 58px;
  height: 68px;
  border: 1px solid #d9dde5;
  border-radius: var(--radius);
  background: #fff;
}

.search-panel input {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 28px;
  color: var(--text);
  outline: 0;
}

.search-panel button {
  border: 0;
  background: transparent;
  color: #707684;
  font-size: 30px;
  cursor: pointer;
}

.chips,
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip,
.tab,
.periods button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f0f1f4;
  padding: 0 22px;
  color: #555b66;
  font-weight: 700;
  cursor: pointer;
}

.chip.active,
.tab.active,
.periods button.active {
  background: #15161a;
  color: #fff;
}

.section-block {
  display: grid;
  gap: 18px;
}

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

.section-title h2,
.panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 850;
}

.section-title span,
.panel h2 span {
  color: #9aa0ac;
  font-size: 16px;
}

.market-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 16px;
}

.metric-card,
.news-card,
.facts-grid article,
.dividend-cards article {
  border-radius: var(--radius);
  background: linear-gradient(145deg, #fff, #f2f3f6);
  padding: 24px;
}

.metric-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #4e5562;
  font-size: 14px;
}

.metric-card small {
  border: 1px solid #d3d7df;
  border-radius: 5px;
  padding: 2px 6px;
  color: #8a909c;
}

.metric-card strong {
  display: block;
  margin: 18px 0 6px;
  font-size: 24px;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

em {
  font-style: normal;
  font-weight: 750;
}

.panel {
  min-width: 0;
  padding: 28px;
}

.compact {
  padding: 30px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-head a,
.panel-link {
  color: #5f6674;
  font-weight: 700;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #727886;
  font-size: 14px;
  font-weight: 700;
}

.sort-control select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 36px 0 14px;
  color: var(--text);
  font-weight: 750;
}

.table {
  display: grid;
  min-width: 0;
}

.row {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(110px, .7fr) minmax(110px, .7fr) 125px;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row-head {
  min-height: 52px;
  color: #8a909c;
  font-size: 13px;
}

.catalog-table #instrument-list {
  display: grid;
}

.catalog-table .row {
  grid-template-columns: minmax(210px, 1.35fr) 120px minmax(130px, .9fr) 120px 125px;
}

.empty-state {
  min-height: 90px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.instrument {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  font-weight: 750;
}

.instrument small {
  display: block;
  margin-top: 4px;
  color: #8a909c;
  font-weight: 650;
}

.logo {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}

.green { background: #0faa4a; }
.lime { background: linear-gradient(135deg, #1db954, #a1df34); }
.red { background: #e51f31; }
.blue { background: #2e65a8; }
.sky { background: #1684c8; }
.scarlet { background: #d91936; }
.orange { background: #ff5a1f; }
.teal { background: #6ab7a1; }
.yellow { background: #f5bd00; }

.signal {
  display: inline-flex;
  width: max-content;
  min-height: 32px;
  align-items: center;
  border-radius: 7px;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 800;
}

.signal.buy {
  background: var(--green-soft);
  color: var(--green);
}

.signal.hold {
  background: #f0f1f3;
  color: #2e3238;
}

.signal.sell {
  background: var(--red-soft);
  color: var(--red);
}

.news-grid,
.dividend-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.news-card h3 {
  min-height: 84px;
  margin: 16px 0 36px;
  font-size: 17px;
  line-height: 1.45;
}

.news-card small,
.news-card span,
.dividend-cards span,
.dividend-cards small,
.facts-grid span,
.quote-card dt {
  color: #7a808d;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 42px;
  padding: 34px;
}

.benefits article {
  display: flex;
  gap: 18px;
  align-items: center;
}

.benefits b,
.idea-icon {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 28, 39, .12);
  font-size: 28px;
}

.benefits strong,
.benefits span {
  display: block;
}

.benefits strong {
  margin-bottom: 8px;
}

.benefits span {
  color: var(--muted);
  line-height: 1.4;
}

.side-row {
  display: grid;
  grid-template-columns: 1fr auto 68px;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
}

.side-row small {
  color: #9aa0ac;
  text-align: right;
}

.panel-link {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 20px;
}

.price-list {
  display: grid;
  gap: 18px;
}

.price-list div {
  display: grid;
  grid-template-columns: 1fr auto 72px;
  gap: 18px;
  align-items: center;
}

.security-page {
  padding-top: 12px;
}

.security-hero {
  margin-bottom: 28px;
  padding: 26px 36px 0;
}

.breadcrumbs {
  color: #747985;
  font-size: 14px;
  font-weight: 650;
}

.breadcrumbs span {
  margin: 0 12px;
  color: #b0b5be;
}

.security-main {
  display: grid;
  grid-template-columns: 96px minmax(260px, 1fr) auto 390px;
  gap: 28px;
  align-items: start;
  padding: 34px 0 26px;
}

.sber-logo {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #18ad53, #97db33);
  color: #fff;
  font-size: 48px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(17, 168, 63, .24);
}

.security-main p {
  margin: 10px 0 28px;
  color: #747985;
  font-size: 17px;
  font-weight: 650;
}

.security-main strong {
  display: block;
  font-size: 42px;
  line-height: 1;
}

.security-main em {
  display: block;
  margin-top: 12px;
  font-size: 18px;
}

.security-actions {
  display: flex;
  gap: 12px;
  padding-top: 42px;
}

.asset-passport {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 28px 34px;
}

dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 26px;
  margin: 0;
}

dt {
  color: #6f7684;
}

dd {
  margin: 0;
  font-weight: 800;
}

.security-tabs {
  border-top: 1px solid transparent;
}

.security-tabs .tab {
  border-radius: 0;
  background: transparent;
  color: #5f6674;
  padding: 0 4px 18px;
}

.security-tabs .tab.active {
  position: relative;
  color: #101114;
}

.security-tabs .tab.active::after {
  position: absolute;
  right: 4px;
  bottom: 0;
  left: 4px;
  height: 3px;
  border-radius: 3px;
  background: var(--yellow);
  content: "";
}

.security-layout {
  grid-template-columns: minmax(0, 1fr) 430px;
}

.about-card {
  display: grid;
  grid-template-columns: 1fr 345px;
  gap: 30px;
}

.about-card p {
  max-width: 520px;
  margin: 18px 0;
  line-height: 1.7;
}

.about-card a {
  font-weight: 750;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.facts-grid article,
.dividend-cards article {
  padding: 18px;
}

.facts-grid strong,
.dividend-cards strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.periods {
  display: flex;
  gap: 8px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.kpi-grid article {
  display: flex;
  gap: 16px;
  min-height: 110px;
  border-bottom: 1px solid var(--line);
  padding: 24px 18px;
}

.kpi-grid article:nth-last-child(-n+3) {
  border-bottom: 0;
}

.kpi-icon {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
}

.kpi-grid span,
.quote-card dt {
  color: #7a808d;
}

.kpi-grid strong {
  display: inline-block;
  margin: 8px 14px 0 0;
  font-size: 20px;
}

.dividend-cards {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 22px;
}

.dividend-table .row {
  grid-template-columns: repeat(4, 1fr);
}

.company-news {
  display: grid;
  gap: 8px;
}

.company-news a {
  display: grid;
  grid-template-columns: 42px 135px 1fr 24px;
  gap: 18px;
  align-items: center;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
}

.company-news a:last-child {
  border-bottom: 0;
}

.company-news small {
  color: #7a808d;
  line-height: 1.45;
}

.analyst-card {
  text-align: center;
}

.analyst-card .panel-head {
  text-align: left;
}

.gauge {
  position: relative;
  width: 210px;
  height: 105px;
  margin: 10px auto 8px;
  overflow: hidden;
}

.gauge::before {
  position: absolute;
  inset: 0;
  border: 16px solid transparent;
  border-top-left-radius: 210px;
  border-top-right-radius: 210px;
  border-top-color: var(--green);
  border-left-color: var(--green);
  border-right-color: var(--red);
  transform: rotate(45deg);
  content: "";
}

.gauge::after {
  position: absolute;
  right: 54px;
  bottom: 4px;
  left: 54px;
  height: 88px;
  border-top: 16px solid var(--yellow);
  border-radius: 130px 130px 0 0;
  content: "";
}

.gauge span {
  position: absolute;
  left: 102px;
  bottom: 9px;
  width: 7px;
  height: 78px;
  border-radius: 10px;
  background: #14161b;
  transform: rotate(-42deg);
  transform-origin: bottom center;
  z-index: 2;
}

.recommendation {
  display: block;
  color: var(--green);
  font-size: 27px;
}

.analyst-card p {
  color: #59606d;
}

.vote-list {
  display: grid;
  gap: 18px;
  margin: 28px 0;
  text-align: left;
}

.vote-list div,
.quote-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
}

.dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 14px;
  border-radius: 50%;
  vertical-align: -1px;
}

.vote-list .green { background: var(--green); }
.vote-list .yellow { background: #f5bd00; }
.vote-list .red { background: var(--red); }

.wide {
  width: 100%;
  margin-top: 12px;
}

.quote-card dl {
  margin-top: 22px;
}

.idea-band {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) 180px 190px 240px;
  gap: 32px;
  align-items: center;
  margin-top: 30px;
  padding: 34px;
  background: linear-gradient(95deg, #fff8dc, #fff 55%, #fff7d7);
}

.idea-band > div {
  display: flex;
  gap: 22px;
}

.idea-band h2 {
  margin-bottom: 10px;
}

.idea-band p {
  max-width: 530px;
  color: #565d69;
  line-height: 1.55;
}

.idea-band article {
  border-left: 1px solid #e8dfbe;
  padding-left: 28px;
}

.idea-band article span,
.idea-band article small {
  display: block;
  color: #747985;
}

.idea-band article strong {
  display: block;
  margin-top: 12px;
  font-size: 34px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .layout,
  .security-layout {
    grid-template-columns: 1fr;
  }

  .side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .security-main {
    grid-template-columns: 84px 1fr;
  }

  .asset-passport,
  .security-actions {
    grid-column: 1 / -1;
  }

  .security-actions {
    padding-top: 0;
  }

  .idea-band,
  .benefits {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .topbar,
  .page {
    padding-right: 18px;
    padding-left: 18px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .top-actions {
    justify-content: space-between;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-copy {
    padding: 38px 28px 0;
  }

  .hero-copy h1,
  .security-main h1 {
    font-size: 34px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .hero-art {
    min-height: 310px;
  }

  .moex-tile {
    left: 28px;
  }

  .chart-tile {
    right: 28px;
  }

  .emblem-tile {
    right: 145px;
  }

  .market-strip,
  .news-grid,
  .kpi-grid,
  .dividend-cards,
  .benefits,
  .side-column,
  .about-card,
  .idea-band {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 1fr auto;
    min-width: 0;
    gap: 8px 18px;
    padding: 14px 0;
  }

  .catalog-table .row {
    grid-template-columns: 1fr auto;
  }

  .row-head {
    display: none;
  }

  .row .signal {
    justify-self: end;
  }

  .security-main {
    grid-template-columns: 72px 1fr;
    gap: 18px;
  }

  .sber-logo {
    width: 68px;
    height: 68px;
    font-size: 38px;
  }

  .security-main strong {
    font-size: 32px;
  }

  .asset-passport dl,
  .quote-card dl,
  .vote-list div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .company-news a {
    grid-template-columns: 42px 1fr 20px;
  }

  .company-news strong {
    grid-column: 2 / 3;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .sort-control {
    width: 100%;
    justify-content: space-between;
  }

  .sort-control select {
    min-width: 0;
    width: 58%;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 20px;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .ghost-button,
  .primary-button,
  .dark-button,
  .cta {
    min-height: 44px;
    padding: 0 16px;
  }

  .panel,
  .compact,
  .security-hero,
  .benefits,
  .idea-band {
    padding: 20px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .price-list div,
  .side-row {
    grid-template-columns: 1fr;
  }

  .side-row small,
  .price-list em,
  .price-list strong {
    text-align: left;
  }
}
