/* Redesign for /crypto/birzha/{exchange}/. Scoped to exchange-page classes. */

.crypto-exchange-hero,
.crypto-exchange-article {
  box-sizing: border-box;
}

.crypto-exchange-hero *,
.crypto-exchange-article * {
  box-sizing: border-box;
}

.crypto-exchange-hero {
  margin-top: 24px;
  padding: 24px !important;
  overflow: visible !important;
  border: 1px solid #e3e7ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(20, 38, 60, .07);
}

.crypto-exchange-hero__main {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.crypto-exchange-hero__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 96px;
  padding: 14px;
  border: 1px solid #e7eaee;
  border-radius: 14px;
  background: #f7f8fa;
}

.crypto-exchange-hero__logo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 68px;
  object-fit: contain;
}

.crypto-exchange-hero__content {
  min-width: 0;
}

.crypto-exchange-hero__eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #657180;
}

.crypto-exchange-hero h1 {
  margin: 0 !important;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -.025em;
  color: #111820;
}

.crypto-exchange-hero__lead {
  max-width: 760px;
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: #4c5866;
}

.crypto-exchange-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.crypto-exchange-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #dce2e8;
  border-radius: 999px;
  background: #f7f9fb;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #475361;
}

.crypto-exchange-badge_success {
  border-color: #bfe3ce;
  background: #edf8f1;
  color: #247044;
}

.crypto-exchange-hero__action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 200px;
  text-align: center;
}

.crypto-exchange-hero__cta {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px !important;
  border-radius: 10px !important;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}

.crypto-exchange-hero__action-note {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.3;
  color: #7a8490;
}

.crypto-exchange-hero__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
  border: 1px solid #e4e8ed;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.crypto-exchange-fact {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid #e4e8ed;
}

.crypto-exchange-fact:last-child {
  border-right: 0;
}

.crypto-exchange-fact__label,
.crypto-exchange-fact__meta {
  display: block;
}

.crypto-exchange-fact__label {
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  color: #788391;
}

.crypto-exchange-fact strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: #17202a;
}

.crypto-exchange-fact__meta {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
  color: #6c7784;
}

.crypto-exchange-fact__meta a,
.crypto-exchange-hero__site-link {
  color: #1d5ca8;
  text-decoration: none;
}

.crypto-exchange-fact__meta a:hover,
.crypto-exchange-hero__site-link:hover {
  text-decoration: underline;
}

.crypto-exchange-fact__rating-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.crypto-exchange-fact__rating-row strong {
  display: inline;
}

.crypto-exchange-fact__stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.crypto-exchange-bonus {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 16px;
  padding: 15px 17px;
  border: 1px solid #ead27b;
  border-radius: 12px;
  background: #fff9df;
}

.crypto-exchange-bonus__icon {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ffd201;
  font-size: 17px;
  font-weight: 800;
  color: #171717;
}

.crypto-exchange-bonus__content {
  min-width: 0;
}

.crypto-exchange-bonus__label {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .025em;
  color: #756111;
}

.crypto-exchange-bonus__text,
.crypto-exchange-bonus__text p {
  margin: 0 !important;
  font-size: 14px;
  line-height: 1.45;
  color: #302b18;
}

.crypto-exchange-article {
  margin-top: 24px !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
}

.crypto-exchange-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.crypto-exchange-layout_no-toc {
  grid-template-columns: minmax(0, 960px);
  justify-content: center;
}

.crypto-exchange-toc-wrap {
  position: relative;
  min-width: 0;
}

.crypto-exchange-toc {
  position: sticky;
  top: 74px;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid #dfe4e9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(20, 38, 60, .06);
}

.crypto-exchange-toc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 13px 14px 11px;
  list-style: none;
  cursor: default;
  color: #151c24;
}

.crypto-exchange-toc__summary::-webkit-details-marker {
  display: none;
}

.crypto-exchange-toc__summary::marker {
  content: "";
}

.crypto-exchange-toc__summary-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
}

.crypto-exchange-toc__summary-meta {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
  color: #7a8490;
}

.crypto-exchange-toc__content {
  padding: 0 14px 14px;
}

.crypto-exchange-toc__list {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  counter-reset: exchange-toc;
  font-size: 13px;
  line-height: 1.35;
}

.crypto-exchange-toc__list > li {
  display: block !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  counter-increment: exchange-toc;
}

.crypto-exchange-toc__list a {
  position: relative;
  display: block !important;
  padding: 7px 6px 7px 26px;
  border-radius: 7px;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  color: #465260;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.crypto-exchange-toc__list a::before {
  content: counter(exchange-toc) ".";
  position: absolute;
  top: 7px;
  left: 5px;
  width: 18px;
  color: #9aa3ad;
}

.crypto-exchange-toc__list a:hover {
  background: #f4f6f8;
  color: #1d5ca8;
}

.crypto-exchange-toc__list a.is-active {
  background: #eef4fb;
  color: #184f8c;
  font-weight: 650 !important;
}

.crypto-exchange-toc__list a.is-active::before {
  color: #1d5ca8;
}

.crypto-exchange-toc__item_sub a {
  padding-left: 38px;
  font-size: 12px;
  color: #697582;
}

.crypto-exchange-toc__item_sub a::before {
  left: 18px;
}

.crypto-exchange-toc__extra {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
  padding: 11px 6px 0;
  border-top: 1px solid #ebeff2;
  font-size: 12px;
  line-height: 1.35;
}

.crypto-exchange-toc__extra span {
  color: #8a939d;
}

.crypto-exchange-toc__extra a {
  color: #1d5ca8;
  text-decoration: none;
}

.crypto-exchange-toc__extra a:hover {
  text-decoration: underline;
}

.crypto-exchange-article__body {
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 0 8px !important;
  float: none !important;
  color: #2d3742;
}

.crypto-exchange-article__body > :first-child {
  margin-top: 0 !important;
}

.crypto-exchange-article__body h2,
.crypto-exchange-article__body h3 {
  border: 0 !important;
  padding: 0 !important;
  color: #121920 !important;
  scroll-margin-top: 90px;
}

.crypto-exchange-article__body h2 {
  margin: 42px 0 14px !important;
  font-size: clamp(25px, 3vw, 32px) !important;
  font-weight: 750 !important;
  line-height: 1.18 !important;
  letter-spacing: -.015em;
}

.crypto-exchange-article__body h3 {
  margin: 30px 0 11px !important;
  font-size: clamp(20px, 2.4vw, 24px) !important;
  font-weight: 720 !important;
  line-height: 1.25 !important;
}

.crypto-exchange-article__body p,
.crypto-exchange-article__body li {
  font-size: 16px;
  line-height: 1.65;
}

.crypto-exchange-article__body p {
  margin: 0 0 16px;
}

.crypto-exchange-article__body ul,
.crypto-exchange-article__body ol {
  margin-top: 10px;
  margin-bottom: 20px;
}

.crypto-exchange-article__body li + li {
  margin-top: 7px;
}

.crypto-exchange-article__body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.crypto-exchange-article__body .youtube-iframe,
.crypto-exchange-article__body iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 12px;
}

.crypto-exchange-article__official {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 32px;
  padding: 16px 18px;
  border: 1px solid #dfe4e9;
  border-radius: 12px;
  background: #f7f9fb;
}

.crypto-exchange-article__official b {
  font-size: 14px;
  color: #222b35;
}

.crypto-exchange-article__official span {
  color: #1d5ca8;
}

@media (min-width: 901px) {
  .crypto-exchange-article {
    position: relative;
    left: 50%;
    width: calc(100vw - 32px) !important;
    max-width: 1280px !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    transform: translateX(-50%);
  }

  .crypto-exchange-toc details:not([open]) > .crypto-exchange-toc__content {
    display: block !important;
  }
}

@media (max-width: 1100px) {
  .crypto-exchange-hero__main {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .crypto-exchange-hero__logo {
    width: 116px;
  }

  .crypto-exchange-hero__action {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .crypto-exchange-hero__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crypto-exchange-fact:nth-child(2) {
    border-right: 0;
  }

  .crypto-exchange-fact:nth-child(-n+2) {
    border-bottom: 1px solid #e4e8ed;
  }
}

@media (max-width: 900px) {
  .crypto-exchange-layout,
  .crypto-exchange-layout_no-toc {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
  }

  .crypto-exchange-toc-wrap {
    order: 1;
    width: 100%;
  }

  .crypto-exchange-article__body {
    order: 2;
  }

  .crypto-exchange-toc {
    position: static;
    top: auto;
  }

  .crypto-exchange-toc__summary {
    min-height: 54px;
    padding: 13px 15px;
    background: #f7f9fb;
    cursor: pointer;
  }

  .crypto-exchange-toc__summary::after {
    content: "";
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    margin: -5px 3px 0 8px;
    border-right: 2px solid #35414e;
    border-bottom: 2px solid #35414e;
    transform: rotate(45deg);
    transition: transform .2s ease, margin .2s ease;
  }

  .crypto-exchange-toc[open] > .crypto-exchange-toc__summary {
    border-bottom: 1px solid #e3e8ed;
  }

  .crypto-exchange-toc[open] > .crypto-exchange-toc__summary::after {
    margin-top: 5px;
    transform: rotate(225deg);
  }

  .crypto-exchange-toc:not([open]) > .crypto-exchange-toc__content {
    display: none !important;
  }

  .crypto-exchange-toc__content {
    max-height: min(60vh, 520px);
    padding: 11px 14px 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 650px) {
  .crypto-exchange-hero {
    margin-top: 16px;
    padding: 17px !important;
    border-radius: 13px;
  }

  .crypto-exchange-hero__main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .crypto-exchange-hero__logo {
    width: 112px;
    height: 76px;
    padding: 10px;
  }

  .crypto-exchange-hero__content {
    width: 100%;
  }

  .crypto-exchange-hero h1 {
    font-size: 32px;
  }

  .crypto-exchange-hero__lead {
    margin-top: 9px;
    font-size: 15px;
  }

  .crypto-exchange-hero__action {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .crypto-exchange-hero__cta {
    width: 100%;
  }

  .crypto-exchange-hero__facts {
    display: block;
    margin-top: 18px;
  }

  .crypto-exchange-fact {
    border-right: 0 !important;
    border-bottom: 1px solid #e4e8ed;
  }

  .crypto-exchange-fact:last-child {
    border-bottom: 0;
  }

  .crypto-exchange-bonus {
    padding: 14px;
  }

  .crypto-exchange-article {
    margin-top: 18px !important;
  }

  .crypto-exchange-layout {
    gap: 20px;
  }

  .crypto-exchange-article__body h2 {
    margin-top: 34px !important;
    font-size: 25px !important;
  }

  .crypto-exchange-article__body h3 {
    margin-top: 26px !important;
    font-size: 21px !important;
  }

  .crypto-exchange-article__body p,
  .crypto-exchange-article__body li {
    font-size: 15px;
    line-height: 1.6;
  }

  .crypto-exchange-toc__extra {
    display: none;
  }
}
