/* Binance Academy clone — layout restoration overrides
   Chrome saves often miss emotion/CSS-in-JS rules and apply nested
   responsive paddings that crush the article column.
   When inlined into archive.html, article lives under #playback (same document). */

/* -------------------------------------------------------------------------- */
/* Root / safety                                                              */
/* -------------------------------------------------------------------------- */
html {
  font-size: 16px !important;
  zoom: 1 !important;
}

body.wb-playback-shell,
body {
  font-size: 16px !important;
  line-height: 1.5 !important;
  overflow-x: hidden !important;
}

/* Force Academy dark theme — saved emotion CSS also ships a light body rule */
body.wb-playback-shell {
  background-color: #181a20 !important;
  background: #181a20 !important;
  color: #eaecef !important;
}

/* Inlined archive: keep Academy dark canvas on the article root */
#playback.wb-archived-page,
#playback {
  background-color: #181a20 !important;
  color: #eaecef !important;
}

#playback #__APP,
#playback .css-gpt1ua {
  background-color: transparent;
}

/* Don't let article SVG/img rules touch Wayback toolbar icons */
#playback svg:not(.css-14hpydf):not([width]):not([height]) {
  max-width: 100%;
}

#playback img,
#playback .coverImage,
#playback .css-1ewqh5z,
#playback .css-182lng5,
img.coverImage,
.coverImage,
.css-1ewqh5z,
.css-182lng5 {
  max-width: 100% !important;
  height: auto !important;
}

/* Wayback chrome must stay interactive / unscaled by Academy layout rules */
#wm-ipp-base,
#wm-ipp-base img,
#wm-ipp-base svg {
  max-width: none;
}

/* -------------------------------------------------------------------------- */
/* Header / nav                                                               */
/* -------------------------------------------------------------------------- */
nav.css-1r6yh41 {
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}

/* Desktop auth buttons (missing emotion classes) */
.css-1db3nvi,
.css-1ahvd5c {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.css-o9hh3a {
  width: 8px !important;
  flex: 0 0 8px !important;
}

.css-1vn5yfg,
.css-1l3o1oy {
  appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  color: #eaecef !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 20px !important;
  padding: 6px 12px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

.css-n4ewt4,
.css-o2yk9c {
  appearance: none !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: #fcd535 !important;
  color: #202630 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 20px !important;
  padding: 6px 12px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

/* Home icon in nav */
nav .bn-svg.w-\[24px\],
nav svg.w-\[24px\] {
  width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px !important;
}

/* -------------------------------------------------------------------------- */
/* Learn & Earn promo banner (classes were never saved by Chrome)             */
/* -------------------------------------------------------------------------- */
.css-1mwvzej {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px 16px !important;
  min-height: 0 !important;
  background-color: #181a20 !important;
  color: #eaecef !important;
}

.css-94sbqg {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  flex: 0 0 40px !important;
  display: block !important;
}

.css-7qqeey {
  color: #eaecef !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 24px !important;
  text-align: center !important;
  margin: 0 !important;
}

.css-fhb7qr {
  appearance: none !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: #fcd535 !important;
  color: #202630 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 20px !important;
  padding: 8px 14px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

/* -------------------------------------------------------------------------- */
/* Page shell: content + TOC                                                  */
/* -------------------------------------------------------------------------- */
.css-aa2yx7 {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
  margin-bottom: 64px !important;
}

.css-1uhxyyb {
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-top: 24px !important;
  box-sizing: border-box !important;
  justify-content: center !important;
  gap: 48px !important;
}

@media screen and (min-width: 768px) {
  .css-1uhxyyb {
    flex-direction: row !important;
    align-items: flex-start !important;
  }
}

/* Main article column ~720–800px */
.css-wcquo4 {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 800px !important;
}

.css-190yvx7 {
  max-width: 760px !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-top: 16px !important;
  padding-bottom: 24px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/* TOC / share sidebar */
.css-1olcmky {
  position: sticky !important;
  top: 72px !important;
  padding: 8px 0 24px !important;
  box-sizing: border-box !important;
  align-self: flex-start !important;
}

@media screen and (min-width: 768px) {
  .css-1olcmky {
    flex: 0 0 260px !important;
    width: 260px !important;
    max-width: 260px !important;
  }
}

.css-14bgbm8 {
  display: grid !important;
  grid-gap: 40px !important;
  grid-template-columns: 1fr !important;
}

.css-zzqkfp,
.css-1ds83c4 {
  font-size: 16px !important;
  line-height: 24px !important;
  font-weight: 600 !important;
  margin-bottom: 16px !important;
}

/* -------------------------------------------------------------------------- */
/* Hero / cover                                                               */
/* -------------------------------------------------------------------------- */
.cover {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  width: 100% !important;
  margin-bottom: 16px !important;
}

.coverRatio {
  width: 100% !important;
  padding-top: 56.25% !important;
}

.coverBox {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.coverImage {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 12px !important;
}

.css-1yjvs5a {
  margin-bottom: 16px !important;
}

.css-hy4spq {
  font-size: 12px !important;
  height: 22px !important;
  line-height: 18px !important;
  margin-bottom: 8px !important;
}

/* -------------------------------------------------------------------------- */
/* Typography — restore readable Academy article proportions                  */
/* -------------------------------------------------------------------------- */
h1.css-1xq39uu,
.css-1xq39uu {
  font-size: 32px !important;
  line-height: 40px !important;
  font-weight: 600 !important;
  margin-top: 12px !important;
  margin-bottom: 16px !important;
  letter-spacing: -0.01em !important;
}

@media screen and (min-width: 768px) {
  h1.css-1xq39uu,
  .css-1xq39uu {
    /* Saved MQ bumps this to 48px which reads as "zoomed"; keep desktop title large but sane */
    font-size: 40px !important;
    line-height: 48px !important;
  }
}

h2.css-kvhcte,
.css-kvhcte {
  font-size: 24px !important;
  line-height: 32px !important;
  font-weight: 600 !important;
  padding-top: 28px !important;
  padding-bottom: 4px !important;
}

h3.css-10t0ciq,
.css-10t0ciq {
  font-size: 20px !important;
  line-height: 28px !important;
  font-weight: 600 !important;
  padding-top: 24px !important;
  padding-bottom: 4px !important;
}

/* Body copy: override desktop 20px bump that makes the page feel oversized */
p.css-1ylexj7,
.css-1ylexj7,
.richtext-paragraph {
  font-size: 16px !important;
  line-height: 1.6 !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.css-15jw5b {
  font-size: 16px !important;
}

.richtext-text,
.css-1iqe90x {
  font-size: inherit !important;
  line-height: inherit !important;
}

.css-15yt89c {
  margin-top: 8px !important;
  margin-bottom: 8px !important;
  padding-left: 1.25em !important;
}

.css-orkytx {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}

/* Intermediate pill / meta row */
.css-11x5pqs {
  font-size: 14px !important;
  height: 28px !important;
  padding: 0 8px !important;
}

.css-11vn4ca,
.css-s6fc93,
.css-1b3jcwj {
  font-size: 14px !important;
  line-height: 20px !important;
}

/* Breadcrumbs */
.bn-breadcrumb {
  margin-top: 12px !important;
  margin-bottom: 4px !important;
}

.bn-breadcrumb-item {
  font-size: 12px !important;
  line-height: 18px !important;
  min-width: 0 !important;
}

.bn-breadcrumb-separator .bn-svg,
.bn-breadcrumb-separator {
  font-size: 16px !important;
}

/* -------------------------------------------------------------------------- */
/* Article body — remove nested horizontal padding that crushes the column    */
/* -------------------------------------------------------------------------- */
article.css-16ht4fr,
.css-16ht4fr {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 24px !important;
  padding-bottom: 48px !important;
  box-sizing: border-box !important;
}

@media screen and (min-width: 768px) {
  article.css-16ht4fr,
  .css-16ht4fr {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

.richtext-container,
.css-fbxu07 {
  width: 100% !important;
  max-width: 100% !important;
}

/* Inline article images */
.css-1ewqh5z,
.css-182lng5 {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 16px 0 !important;
  border-radius: 8px !important;
}

/* Invalid saved token */
.css-1g8a46g {
  margin-bottom: 16px !important;
}

/* -------------------------------------------------------------------------- */
/* Narrow screens                                                             */
/* -------------------------------------------------------------------------- */
@media screen and (max-width: 767px) {
  .css-aa2yx7 {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .css-1uhxyyb {
    flex-direction: column !important;
    gap: 24px !important;
  }

  .css-1olcmky {
    width: 100% !important;
    max-width: 100% !important;
    position: static !important;
  }

  h1.css-1xq39uu,
  .css-1xq39uu {
    font-size: 28px !important;
    line-height: 36px !important;
  }

  .css-1mwvzej {
    flex-wrap: wrap !important;
    padding: 12px !important;
  }
}

/* Allow highlighting / copying article text and links */
article,
article *,
.richtext-container,
.richtext-container *,
.richtext-paragraph,
.richtext-text,
a {
  -webkit-user-select: text !important;
  user-select: text !important;
}

/* Hide live Binance chat / cookie widgets in the offline archive shell */
#onetrust-consent-sdk,
#onetrust-banner-sdk,
#kuma-vip-chat-widget-script,
[id*="kuma-vip"],
iframe#switch-account-iframe,
#ot-sdk-btn-floating,
#pre-chat-container,
.chat-container {
  display: none !important;
  visibility: hidden !important;
}
