.article-guide {
  --guide-ink: #191b20;
  --guide-muted: #4e5560;
  --guide-line: #dfdce0;
  --guide-accent: #b70e2b;
  --guide-paper: #f8f5f1;
  color: var(--guide-ink);
  font: 400 1rem/1.65 var(--font-secondary, system-ui), sans-serif;
}

.guide-frame {
  width: min(100%, 1180px);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 44px);
}

.guide-hero {
  padding-block: 20px clamp(28px, 5vw, 60px);
  background: var(--guide-paper);
  border-bottom: 1px solid var(--guide-line);
}

.guide-breadcrumb, .guide-meta, .guide-actions, .guide-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.guide-breadcrumb, .guide-meta {
  color: var(--guide-muted);
  font-size: .875rem;
}

.guide-breadcrumb { margin-bottom: clamp(16px, 4vw, 44px); }
.guide-hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 65px); }
.guide-photo { margin: 0; }
.guide-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }

.article-guide h1,
.article-guide h2,
.article-guide h3 {
  margin: 0;
  font-family: var(--font-primary, system-ui), sans-serif;
  font-weight: 700;
  overflow-wrap: break-word;
}

.article-guide h1 { font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.08; letter-spacing: -.035em; }
.article-guide h2 { margin-bottom: 12px; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.015em; }
.article-guide h3 { font-size: 1.08rem; line-height: 1.4; }
.article-guide:lang(th) :is(h1, h2, h3) { letter-spacing: normal; line-height: 1.32; }
.article-guide:lang(th) h1 { font-size: clamp(2rem, 4.5vw, 3.35rem); }
.article-guide:lang(th) h1 span { white-space: nowrap; }
.guide-deck { margin-block: 16px; max-width: 62ch; color: var(--guide-muted); font-size: clamp(1rem, 2.1vw, 1.2rem); }
.guide-meta strong { color: var(--guide-ink); }
.guide-actions { margin-top: 22px; }

.article-guide a { color: var(--guide-accent); text-decoration: underline; text-underline-offset: .18em; }
.article-guide a:hover { color: #871022; }
.article-guide :is(a, button, summary):focus-visible { outline: 2px solid #972237; outline-offset: 3px; }
.article-guide .guide-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border: 1px solid var(--guide-accent);
  border-radius: 6px;
  background: var(--guide-accent);
  color: #fff;
  font: 700 .94rem/1.35 var(--font-secondary, system-ui), sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.article-guide .guide-button:hover { background: #871022; border-color: #871022; color: #fff; }
.guide-actions > a:not(.guide-button) { padding-block: 10px; }

.guide-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 215px); align-items: start; gap: clamp(24px, 4vw, 64px); padding-block: clamp(26px, 5vw, 58px); }
.guide-content { grid-area: 2 / 1; min-width: 0; }
.guide-toc { grid-area: 1 / 2 / 3 / 3; position: sticky; top: 106px; border-left: 1px solid var(--guide-line); padding-left: 18px; font-size: .92rem; }
.guide-toc ul { margin: 6px 0 0; padding: 0; list-style: none; }
.guide-toc li + li { margin-top: 5px; }
.guide-content > section + section { margin-top: clamp(30px, 5vw, 58px); }
.guide-content section[id] { scroll-margin-top: 98px; }
.guide-content p, .guide-content li { overflow-wrap: anywhere; }
.guide-content ul, .guide-content ol { padding-inline-start: 1.3em; }
.guide-content li + li { margin-top: 8px; }

.guide-summary { grid-area: 1 / 1; padding: clamp(16px, 3vw, 24px); border-left: 4px solid var(--guide-accent); background: var(--guide-paper); border-radius: 0 8px 8px 0; }
.guide-summary ul, .guide-registration ol { margin-block: 0; }
.guide-summary ul { padding-inline-start: 1.3em; list-style: disc; }
.guide-summary li + li { margin-top: 8px; }
.guide-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid var(--guide-line);
  font-size: .94rem;
}
.guide-table th, .guide-table td {
  padding: 12px 14px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--guide-line);
  overflow-wrap: anywhere;
}
.guide-table thead { background: var(--guide-paper); }
.guide-table thead th:first-child { width: 23%; }
.guide-table tbody tr:nth-child(even) { background: #fcfbfa; }
.guide-table .guide-tool, .guide-table .guide-cell-label { display: block; }
.guide-tool { margin-top: 4px; font-weight: 400; color: var(--guide-muted); }
.guide-table .guide-cell-label { display: none; }
.guide-row-links { margin-top: 8px; font-size: .875rem; font-weight: 400; }
.guide-row-links a { display: block; }
.guide-takeaway { margin-top: 7px; font-weight: 700; }

.guide-examples { display: grid; gap: 12px; }
.guide-example { padding: 16px 18px; border: 1px solid var(--guide-line); border-radius: 8px; }
.guide-example blockquote { margin: 8px 0; padding-inline-start: 11px; border-inline-start: 2px solid #d9acb1; color: #303237; }

.reward-guide h1 {
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  text-wrap: balance;
}
html:has(.reward-guide) { scroll-behavior: auto; }
.reward-guide ::selection { background: #efd2d9; color: var(--guide-ink); }
.reward-guide .guide-content p { margin-block: 0 14px; }
.reward-guide .guide-content p:last-child { margin-bottom: 0; }
.reward-guide .guide-content > section > p { max-width: 72ch; }
.reward-guide .guide-summary {
  border: 1px solid var(--guide-line);
  border-radius: 8px;
}
.reward-guide .guide-table { line-height: 1.55; }
.reward-guide .guide-table thead th:first-child { width: 16%; }
.reward-guide .guide-table :is(th, td) { padding: 16px 14px; }
.reward-guide .guide-row-example { display: block; margin-top: 10px; font-size: .8rem; font-weight: 400; }
.reward-guide .guide-row-links { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.reward-guide .guide-example h3 { margin-bottom: 14px; }
.reward-guide .guide-example { padding: clamp(18px, 3vw, 28px); }
.guide-rebate-math {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--guide-line);
  font-variant-numeric: tabular-nums;
}
.guide-rebate-math dt { color: var(--guide-muted); font-size: .875rem; }
.guide-rebate-math dd { margin-top: 4px; font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 700; }
.guide-rebate-math > div:last-child dd { color: var(--guide-accent); }
.reward-guide .guide-content > section > p + :is(table, div) { margin-top: 14px; }
.guide-screens {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.guide-screen {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-column: span 2;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--guide-line);
  border-radius: 8px;
  background: #fff;
  scroll-margin-top: 98px;
}
.guide-screen--wide { grid-column: span 3; }
.guide-screen > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 0;
  background: var(--guide-paper);
  text-decoration: none;
}
.guide-screen > a[aria-haspopup="dialog"] { cursor: zoom-in; }
.guide-screen > a:hover { background: #eeebe7; }
.guide-screen img {
  display: block;
  width: 100%;
  height: 20rem;
  object-fit: contain;
  border-radius: 4px;
}
.guide-screen--wide img { height: 13rem; }
.guide-screen__enlarge { font-size: .875rem; text-decoration: underline; text-underline-offset: .18em; }
.guide-screen figcaption {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-top: 1px solid var(--guide-line);
  color: var(--guide-muted);
  font-size: .9rem;
  overflow-wrap: anywhere;
}
.guide-screen figcaption h3 { margin-bottom: 6px; color: var(--guide-ink); font-size: 1rem; }
.guide-screen__source { font-size: .8125rem; }
.reward-guide .guide-content .guide-screen__source { margin-top: auto; }
.guide-screen figcaption strong { color: var(--guide-ink); }

html:has(.guide-screen-viewer[open]) { overflow: hidden; }
.guide-screen-viewer {
  position: fixed;
  inset: 0;
  width: min(68rem, calc(100% - 24px));
  height: min(50rem, calc(100% - 24px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #494a50;
  border-radius: 12px;
  background: #15161a;
  color: #fff;
}
.guide-screen-viewer[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.guide-screen-viewer::backdrop { background: rgb(12 13 16 / .86); }
.guide-screen-viewer__toolbar,
.guide-screen-viewer__controls { display: flex; align-items: center; gap: 8px; }
.guide-screen-viewer__toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 7px 12px;
  border-bottom: 1px solid #494a50;
  background: #222329;
  font-size: .95rem;
  line-height: 1.25;
}
.guide-screen-viewer__toolbar > strong { min-width: 0; flex: 1 1 12rem; overflow-wrap: anywhere; }
.guide-screen-viewer__controls { flex: 0 1 auto; max-width: 100%; margin-inline-start: auto; }
.guide-screen-viewer__controls button {
  min-width: 44px;
  min-height: 44px;
  padding-inline: 10px;
  border: 1px solid #686a73;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.guide-screen-viewer__controls button:is(:hover, [aria-pressed="true"]) { background: #484a53; }
.guide-screen-viewer__controls .guide-screen-viewer__close { font-size: 1.5rem; }
.guide-screen-viewer :is(button, [tabindex]):focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.guide-screen-viewer__help {
  margin: 0;
  padding: 7px 12px;
  color: #d4d5db;
  font-size: .8125rem;
  line-height: 1.45;
}
.guide-screen-viewer__caption {
  max-height: 7rem;
  overflow-y: auto;
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid #494a50;
  color: #e1e2e7;
  font-size: .8125rem;
  line-height: 1.5;
}
.article-guide .guide-screen-viewer__caption a { color: #fff; }
.guide-screen-viewer__status { position: relative; padding: 24px; color: #fff; }
.article-guide .guide-screen-viewer__status a { color: #fff; }
.guide-screen-viewer__viewport {
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  cursor: default;
  user-select: none;
}
.guide-screen-viewer__viewport img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  pointer-events: none;
  transform-origin: top left;
}
.guide-screen-viewer[data-zoomed] .guide-screen-viewer__viewport { cursor: grab; touch-action: none; }
.guide-screen-viewer[data-panning] .guide-screen-viewer__viewport { cursor: grabbing; }
@media (prefers-reduced-motion: no-preference) {
  .guide-screen-viewer[data-animating]:not([data-panning]) img { transition: transform .13s ease-out; }
}
.guide-deposit-checklist {
  padding: clamp(16px, 3vw, 26px);
  border-left: 4px solid var(--guide-accent);
  background: var(--guide-paper);
  border-radius: 0 8px 8px 0;
}
.guide-deposit-checklist ol { list-style: decimal; margin-block: 0 12px; }
.reward-guide .guide-deposit-checklist { border-left: 0; border-radius: 8px; padding: clamp(18px, 3vw, 28px); }

.guide-registration { padding: clamp(16px, 3vw, 26px); background: var(--guide-paper); border: 1px solid var(--guide-line); border-radius: 10px; }
.guide-copy { margin-block: 18px; }
.guide-copy code { padding: 6px 10px; border: 1px solid #d5d0ce; border-radius: 5px; font-size: 1rem; color: var(--guide-ink); background: #fff; }
.guide-copy [data-copy-status] { color: var(--guide-muted); font-size: .875rem; }
.guide-copy [data-copy-status][hidden] { display: none; }
.guide-disclosure, .guide-region { margin-top: 14px; color: var(--guide-muted); font-size: .9rem; }
.guide-registration .guide-offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.guide-registration .guide-offers li { display: flex; margin: 0; }
.guide-offers .guide-button { width: 100%; }
.article-guide .guide-offers .guide-button--secondary { background: #fff; color: var(--guide-accent); }
.article-guide .guide-offers .guide-button--secondary:hover { background: #f8e9ed; color: #871022; }
.reward-guide .guide-registration {
  container: reward-registration / inline-size;
  border-top: 1px solid var(--guide-accent);
}
.reward-guide .guide-registration .guide-offers {
  grid-template-columns: minmax(0, 1fr);
  margin-block: 16px;
}
.reward-copy { margin-top: 20px; }
.reward-copy__label { display: block; margin-bottom: 6px; color: var(--guide-muted); font-size: .875rem; }
.reward-copy__control {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #b9b5b4;
  border-radius: 6px;
  background: #fff;
}
.reward-copy code { padding: 11px 16px; color: var(--guide-ink); font-size: 1rem; letter-spacing: .035em; user-select: all; }
.guide-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  min-height: 46px;
  gap: 7px;
  padding: 8px 12px;
  border: 0;
  border-left: 1px solid #b9b5b4;
  background: #f0efed;
  color: var(--guide-ink);
  font: 500 .875rem/1.35 var(--font-secondary, system-ui), sans-serif;
  cursor: pointer;
}
.guide-copy-button:hover { background: #e4e2df; }
.guide-copy-button:disabled { cursor: wait; opacity: .65; }
.guide-copy-button[data-copied] { background: #e8f2eb; color: #225436; }
.guide-copy-button svg { flex: none; }
.reward-guide .guide-copy-button:focus-visible { outline-offset: -3px; }
.reward-copy__status {
  display: block;
  min-height: 1.5em;
  margin-top: 6px;
  color: var(--guide-muted);
  font-size: .8125rem;
  line-height: 1.5;
}
.reward-guide .guide-offers .guide-button { min-height: 48px; }

@container reward-registration (min-width: 46.25rem) {
  .reward-guide .guide-registration .guide-offers { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .reward-guide .guide-offers .guide-button {
    padding-inline: 6px;
    font-size: .875rem;
  }
}

.guide-faq details { border-top: 1px solid var(--guide-line); }
.guide-faq details:last-child { border-bottom: 1px solid var(--guide-line); }
.guide-faq summary { padding: 11px 3px; cursor: pointer; font-weight: 700; }
.guide-faq details p { margin: 0 3px 12px; }
.guide-method { color: var(--guide-muted); }

@media (min-width: 821px) {
  .guide-body--centered {
    width: min(100%, 1360px);
    grid-template-columns: minmax(108px, 1fr) minmax(0, 820px) minmax(108px, 1fr);
    column-gap: clamp(16px, 2.5vw, 36px);
  }

  .guide-body--centered :is(.guide-summary, .guide-content) { grid-column: 2; }

  .guide-body--centered .guide-toc {
    grid-area: 1 / 1 / 3 / 2;
    justify-self: end;
    width: min(100%, 160px);
    padding: 0 14px 0 0;
    border-left: 0;
    border-right: 1px solid var(--guide-line);
  }
}

@media (max-width: 820px) {
  .guide-body { display: block; }
  .guide-toc { position: static; margin-block: 22px; padding: 0 0 13px; border-left: 0; border-bottom: 1px solid var(--guide-line); }
  .guide-toc ul { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .guide-toc li + li { margin: 0; }
  .guide-toc a { display: inline-block; padding-block: 4px; }
}

@media (821px <= width <= 1100px) {
  .reward-guide .guide-body { display: block; width: min(100%, 908px); }
  .reward-guide .guide-toc {
    position: static;
    width: auto;
    margin-block: 22px;
    padding: 0 0 13px;
    border-right: 0;
    border-bottom: 1px solid var(--guide-line);
  }
  .reward-guide .guide-toc ul { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .reward-guide .guide-toc li + li { margin: 0; }
  .reward-guide .guide-toc a { display: inline-block; padding-block: 4px; }
}

@media (max-width: 640px) {
  .guide-screen-viewer__toolbar > strong { flex-basis: 100%; }
  .guide-screen-viewer__controls { justify-content: flex-end; width: 100%; }
  .guide-screen-viewer__controls button { min-width: 44px; }
  .guide-hero { padding-bottom: 20px; }
  .guide-hero-grid { display: block; }
  .guide-photo { display: none; }
  .guide-screens { grid-template-columns: minmax(0, 1fr); }
  .guide-screen { grid-column: 1; }
  .reward-guide .guide-table tbody th { font-size: 1.1rem; }
  .reward-guide .guide-table :is(th, td) { padding: 0; }
  .reward-guide .guide-table .guide-row-example { display: inline-block; margin: 0 0 0 12px; font-size: .8125rem; }
  .guide-table, .guide-table tbody, .guide-table tr { display: block; }
  .guide-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .guide-table tbody tr { padding: 12px; }
  .guide-table tbody tr + tr { border-top: 1px solid var(--guide-line); }
  .guide-table tbody th, .guide-table td { display: block; padding: 0; border: 0; }
  .guide-table td { margin-top: 8px; }
  .guide-table .guide-cell-label { display: block; font-weight: 700; }
  .guide-registration .guide-offers { grid-template-columns: 1fr; }
}
/* Content-sized mobile layouts for migrated exchange sections.
   Keep this stylesheet after page-specific layout styles in the final bundle. */

/* Store artwork must remain complete when the desktop tracks become narrower. */
#zdBQW_ :is(#zf6wMV, #zK3930) .image__image { object-fit: contain; }

@media (max-width: 1024px) {
  /* Registration and copying shared a Builder grid row in review heroes.
     A content-sized column gives each control its own row in every language. */
  :is(#ai-Q84kas, #z2agGR, #zlayw3, #zengiW, #zBxWdS) > .block-layout {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: min(100%, 640px);
    max-width: 640px;
    height: auto;
    min-height: 0;
    padding: 28px 20px 32px;
  }

  :is(#ai-Q84kas, #z2agGR, #zlayw3, #zengiW, #zBxWdS) > .block-layout > .layout-element {
    grid-area: auto;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
  }

  :is(#ai-Q84kas, #z2agGR, #zlayw3, #zengiW, #zBxWdS) > .block-layout > :nth-child(1) { order: 1; }
  :is(#ai-Q84kas, #z2agGR, #zlayw3, #zengiW, #zBxWdS) > .block-layout > :nth-child(2) { order: 2; }
  :is(#ai-Q84kas, #z2agGR, #zlayw3, #zengiW, #zBxWdS) > .block-layout > :nth-child(3) {
    order: 3;
    align-self: center;
    width: min(100%, 360px);
  }
  :is(#ai-Q84kas, #z2agGR, #zlayw3, #zengiW, #zBxWdS) > .block-layout > :nth-child(4) { order: 5; }
  :is(#ai-Q84kas, #z2agGR, #zlayw3, #zengiW, #zBxWdS) > .block-layout > :nth-child(5) { order: 6; }
  :is(#ai-Q84kas, #z2agGR, #zlayw3, #zengiW, #zBxWdS) > .block-layout > :nth-child(6) { order: 4; }

  :is(#ai-Q84kas, #z2agGR, #zlayw3, #zengiW, #zBxWdS) > .block-layout > .layout-element > a.grid-button {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: 12px 18px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
  }

  /* Imported layouts assign each image an increasing z-index. Use local layers
     so every card background stays behind its text and actions. */
  :is(#zqUAco, #z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout {
    isolation: isolate;
  }

  :is(#zqUAco, #z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > .layout-element {
    z-index: 1;
  }

  :is(#zqUAco, #z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > .layout-element:has(> .image-wrapper) {
    z-index: 0;
  }

  /* Binance app links form a separate row after the illustration. */
  #ai-HOSlxQ > .block-layout {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows:
      [app-title] auto [app-lead] auto [app-image] auto
      [app-stores] auto [app-code] auto [app-note] auto;
    gap: 20px 12px;
    width: min(100%, 640px);
    max-width: 640px;
    height: auto;
    min-height: 0;
    padding: 28px 16px 32px;
  }

  #ai-HOSlxQ > .block-layout > .layout-element {
    grid-area: auto / 1 / auto / -1;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
  }

  #ai-HOSlxQ > .block-layout > :has(> #ai-K8BqLK) { grid-row: app-title; }
  #ai-HOSlxQ > .block-layout > :has(> #ai-nohuMB) { grid-row: app-lead; }
  #ai-HOSlxQ > .block-layout > :has(> #ai-i9HEpj) { grid-row: app-image; }
  #ai-HOSlxQ > .block-layout > :has(> #zHb-fr) { grid-area: app-stores / 1; }
  #ai-HOSlxQ > .block-layout > :has(> #zpFeaY) { grid-area: app-stores / 2; }
  #ai-HOSlxQ > .block-layout > :has(> #zIirgA) { grid-row: app-code; }
  #ai-HOSlxQ > .block-layout > :has(> #zTH_Ws) { grid-row: app-note; }

  #ai-HOSlxQ .image-wrapper,
  #ai-HOSlxQ .image-wrapper .image {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  #ai-HOSlxQ .image-wrapper .image__image {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  #ai-HOSlxQ .image-wrapper--desktop { display: none; }
  #ai-HOSlxQ .image-wrapper--mobile { display: block; }
  #ai-HOSlxQ #ai-i9HEpj { max-width: 480px; justify-self: center; }
  #ai-HOSlxQ > .block-layout > :has(> :is(#zHb-fr, #zpFeaY)) {
    align-self: center;
    justify-self: center;
    max-width: 220px;
  }
  #ai-HOSlxQ :is(#zHb-fr, #zpFeaY) a.image { min-height: 44px; }
  #ai-HOSlxQ :is(#zHb-fr, #zpFeaY) .image__image { border-radius: 0; }

  /* Bybit's app illustration and store badges need distinct intrinsic rows.
     The old auto-placement still inherited image height limits and crop rules. */
  #zdBQW_ > .block-layout {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows:
      [bybit-app-title] auto [bybit-app-lead] auto [bybit-app-image] auto
      [bybit-app-stores] auto [bybit-app-code] auto [bybit-app-note] auto;
    gap: 20px 12px;
    width: min(100%, 640px);
    max-width: 640px;
    height: auto;
    min-height: 0;
    padding: 28px 16px 32px;
  }

  #zdBQW_ > .block-layout > .layout-element {
    grid-area: auto / 1 / auto / -1;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
  }

  #zdBQW_ > .block-layout > :has(> #zwkSez) { grid-row: bybit-app-title; }
  #zdBQW_ > .block-layout > :has(> #zkTUXV) { grid-row: bybit-app-lead; }
  #zdBQW_ > .block-layout > :has(> #ztTvt_) { grid-row: bybit-app-image; }
  #zdBQW_ > .block-layout > :has(> #zf6wMV) { grid-area: bybit-app-stores / 1; }
  #zdBQW_ > .block-layout > :has(> #zK3930) { grid-area: bybit-app-stores / 2; }
  #zdBQW_ > .block-layout > :has(> #zinqV5) { grid-row: bybit-app-code; }
  #zdBQW_ > .block-layout > :has(> #zhUglI) { grid-row: bybit-app-note; }

  #zdBQW_ .image-wrapper,
  #zdBQW_ .image-wrapper .image {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  #zdBQW_ .image-wrapper .image__image {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  #zdBQW_ .image-wrapper--desktop { display: none; }
  #zdBQW_ .image-wrapper--mobile { display: block; }
  #zdBQW_ #ztTvt_ { max-width: 480px; justify-self: center; }

  #zdBQW_ > .block-layout > :has(> :is(#zf6wMV, #zK3930)) {
    align-self: center;
    justify-self: center;
    max-width: 220px;
  }

  #zdBQW_ :is(#zf6wMV, #zK3930) {
    overflow: visible;
    border-radius: 0;
  }

  #zdBQW_ :is(#zf6wMV, #zK3930) a.image-wrapper--mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }

  #zdBQW_ :is(#zf6wMV, #zK3930) a.zh-app-store {
    flex-direction: column;
    min-height: 48px;
  }

  #zdBQW_ :is(#zf6wMV, #zK3930) .image__image {
    width: auto;
    max-width: 100%;
    height: clamp(40px, 12vw, 56px);
    border-radius: 0;
  }

  /* Each homepage logo background spans its complete, intrinsic-height action
     area. The reserved last track supplies bottom padding even when labels wrap. */
  #zqUAco > .block-layout {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows:
      [section-title] auto [section-lead] auto
      repeat(5,
        [exchange-title] auto
        [exchange-visual] minmax(clamp(132px, 32vw, 220px), auto)
        [exchange-action] auto [exchange-review] auto
        [exchange-padding] 16px [exchange-details] auto);
    gap: 12px;
    width: min(100%, 640px);
    max-width: 640px;
    height: auto;
    min-height: 0;
    padding: 28px 16px;
  }

  #zqUAco > .block-layout > .layout-element {
    grid-area: auto / 1 / auto / -1;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
  }

  #zqUAco > .block-layout > :has(> #zJlyWb) { grid-row: section-title; }
  #zqUAco > .block-layout > :has(> #zPWA1V) { grid-row: section-lead; margin-bottom: 8px; }
  #zqUAco > .block-layout > :has(> :is(#zRnOMs, #zFSN0w, #zJObQ7, #zXoNBM, #zzx3N3)) { --exchange-number: 1; --exchange-background: #13171c; }
  #zqUAco > .block-layout > :has(> :is(#zyJele, #zgQ5BF, #ziqOLj, #zXClDD, #z8z-rC)) { --exchange-number: 2; --exchange-background: #1f1f1f; }
  #zqUAco > .block-layout > :has(> :is(#zPEoXC, #zaX_Ai, #zfe3Qi, #zUUT9J, #zrGzSh)) { --exchange-number: 3; --exchange-background: #2954fe; }
  #zqUAco > .block-layout > :has(> :is(#zphyf2, #zXf8ah, #zrCC5Z, #zFqyyA, #zhfF4F)) { --exchange-number: 4; --exchange-background: #000; }
  #zqUAco > .block-layout > :has(> :is(#zeobSg, #zME360, #zGDBbK, #zt3tGm, #zHjMPx)) { --exchange-number: 5; --exchange-background: #fc712c; }

  #zqUAco > .block-layout > .layout-element:has(> .text-box h3) {
    grid-row: exchange-title var(--exchange-number);
    text-align: center;
  }
  #zqUAco > .block-layout > .layout-element:has(> .text-box ul) {
    grid-row: exchange-details var(--exchange-number);
    margin-bottom: 24px;
  }
  #zqUAco > .block-layout > .layout-element:has(> .image-wrapper) {
    grid-row: exchange-visual var(--exchange-number) / exchange-details var(--exchange-number);
    align-self: stretch;
  }
  #zqUAco .image-wrapper {
    height: 100%;
    min-height: 0;
    max-height: none;
    border-radius: 20px;
    background: var(--exchange-background);
  }
  #zqUAco .image-wrapper .image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
  }
  #zqUAco .image-wrapper .image__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }
  #zqUAco .image-wrapper--desktop { display: none; }
  #zqUAco .image-wrapper--mobile { display: block; }

  #zqUAco > .block-layout > .layout-element:has(> a.grid-button) {
    grid-column: 1 / -1;
    width: auto;
    margin-inline: 16px;
    align-self: stretch;
    z-index: 2;
  }
  #zqUAco > .block-layout > .layout-element:has(> a.grid-button[rel~="sponsored"]) {
    grid-row: exchange-action var(--exchange-number);
  }
  #zqUAco > .block-layout > .layout-element:has(> a.grid-button:not([rel~="sponsored"])) {
    grid-row: exchange-review var(--exchange-number);
  }
  #zqUAco > .block-layout > .layout-element:has(> .grid-embed:empty) { display: none; }

  /* The four-card alternatives sections share the same source structure in
     every locale. Keep each background behind title, copy and both buttons. */
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows:
      [alternatives-kicker] auto [alternatives-title] auto
      repeat(4,
        [alternative-start] 16px [alternative-title] auto
        [alternative-copy] auto [alternative-action] auto
        [alternative-review] auto [alternative-padding] 16px
        [alternative-end] 16px)
      [alternatives-code] auto [alternatives-sources] auto;
    gap: 12px;
    width: min(100%, 640px);
    max-width: 640px;
    height: auto;
    min-height: 0;
    padding: 28px 16px;
  }

  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > .layout-element {
    grid-area: auto / 1 / auto / -1;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
  }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > :nth-child(1) { grid-row: alternatives-title; }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > :nth-child(5) { grid-row: alternatives-kicker; }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > :is(:nth-child(2), :nth-child(3), :nth-child(4), :nth-child(6), :nth-child(7)) { --alternative-number: 1; }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > :nth-child(n+8):nth-child(-n+12) { --alternative-number: 2; }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > :nth-child(n+13):nth-child(-n+17) { --alternative-number: 3; }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > :nth-child(n+18):nth-child(-n+22) { --alternative-number: 4; }

  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > :has(> .image-wrapper) {
    grid-row: alternative-start var(--alternative-number) / alternative-end var(--alternative-number);
    align-self: stretch;
  }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) .image-wrapper {
    height: 100%;
    min-height: 0;
    max-height: none;
  }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) .image-wrapper .image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
  }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) .image-wrapper .image__image { width: 100%; height: 100%; object-fit: cover; }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) .image-wrapper--desktop { display: none; }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) .image-wrapper--mobile { display: block; }

  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > :is(:nth-child(3), :nth-child(9), :nth-child(14), :nth-child(19)) {
    grid-row: alternative-title var(--alternative-number);
    margin-inline: 16px;
    width: auto;
    text-align: center;
  }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > :is(:nth-child(4), :nth-child(10), :nth-child(15), :nth-child(20)) {
    grid-row: alternative-copy var(--alternative-number);
    margin-inline: 16px;
    width: auto;
    text-align: center;
  }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > :has(> a.grid-button) {
    grid-column: 1 / -1;
    grid-row: alternative-action var(--alternative-number);
    margin-inline: 16px;
    width: auto;
    z-index: 2;
  }
  /* Keep the full-width review below the offer on narrow phones. This must
     outrank the shared :has(> a.grid-button) action placement above. */
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > .layout-element:has(> a.grid-button:not([rel~="sponsored"])) { grid-row: alternative-review var(--alternative-number); }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > .alternatives-referral-row { grid-area: alternatives-code / 1 / auto / -1; margin: 0; }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > :nth-child(24) { grid-row: alternatives-sources; }

  :is(#zqUAco, #z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > .layout-element > a.grid-button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 48px;
    align-self: stretch;
    justify-self: stretch;
    padding: 10px 12px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    line-height: 1.35;
  }
}

@media (360px <= width <= 1024px) {
  #zqUAco > .block-layout > .layout-element:has(> a.grid-button[rel~="sponsored"]) {
    grid-column: 1;
    margin-right: 0;
  }
  #zqUAco > .block-layout > .layout-element:has(> a.grid-button:not([rel~="sponsored"])) {
    grid-row: exchange-action var(--exchange-number);
    grid-column: 2;
    margin-left: 0;
  }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > .layout-element:has(> a.grid-button[rel~="sponsored"]) {
    grid-column: 1;
    margin-right: 0;
  }
  :is(#z4L5YW, #zFW6QJ, #zNqZyl, #zKD44p, #zMPvH8) > .block-layout > .layout-element:has(> a.grid-button:not([rel~="sponsored"])) {
    grid-row: alternative-action var(--alternative-number);
    grid-column: 2;
    margin-left: 0;
  }
}

@media (max-width: 359px) {
  #zqUAco .image-wrapper .image__image { object-fit: contain; }
}

@media (max-width: 600px) {
  /* Preserve the localized field label already present in every AI-tools cell.
     The header remains available to assistive technology without a narrow column. */
  .exchange-comparison table {
    display: block;
    border: 0;
    background: transparent;
    font-size: 1rem;
  }
  .exchange-comparison thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .exchange-comparison tbody { display: grid; gap: 16px; }
  .exchange-comparison tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 18px;
  }
  .exchange-comparison table tbody th,
  .exchange-comparison table tbody td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    overflow-wrap: break-word;
    word-break: normal;
  }
  .exchange-comparison table tbody th[scope="row"],
  .exchange-comparison tbody td:first-child {
    width: auto;
    min-width: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #dadce0;
    font-size: 1.1rem;
    font-weight: 600;
  }
  .exchange-comparison .comparison-label {
    display: block;
    margin-bottom: 3px;
    color: #5e6268;
    font-size: .875rem;
    font-weight: 500;
  }
}
