/*
 * BitStepX article screens: the single post (head, two columns from 1100px, table of contents,
 * side column, author box, related posts), the page screen, and the body as the publishing tool
 * writes it (disclosure line, key takeaways box, video, sign-up box, FAQ, risk box) plus figures,
 * tables and lists. Loaded on single posts, pages and exchanges only (inc/setup.php).
 * Values come from tokens.css only: no color values here, font sizes only through --text-*,
 * spacing through --space-*.
 *
 * Screen widths as in base.css: phones first (360px), 600px, 1100px two columns.
 */

/* ---------- Article head: breadcrumbs, meta line, title, featured image ---------- */

.bsx-main.bsx-article > * {
  margin-block: 0;
}

.bsx-main.bsx-article > * + * {
  margin-block-start: var(--space-4);
}

/* Title and featured image (the first item of the columns grid, so the side column can start beside it). */
.bsx-article__head > * {
  margin-block: 0;
}

.bsx-article__head > .bsx-article__image {
  margin-block-start: var(--space-6);
}

.bsx-main.bsx-article > .bsx-share {
  margin-block-start: var(--space-12);
}

.bsx-main.bsx-article > .bsx-author {
  margin-block-start: var(--space-12);
}

.bsx-main.bsx-article > .bsx-share + .bsx-author {
  margin-block-start: var(--space-6);
}

.bsx-main.bsx-article > .bsx-related {
  margin-block-start: var(--space-16);
}

/* The last crumb repeats the title below it: one line, cut with an ellipsis when it does not fit
   (screen readers still read all of it). Less than 8em left on the line: it starts a new line. */
.bsx-breadcrumbs li[aria-current] {
  display: block;
  flex: 1 1 0;
  min-width: min(100%, 8em);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bsx-breadcrumbs li[aria-current]::before {
  margin-right: var(--space-2);
}

/* A long unbroken word breaks instead of widening the page. */
.bsx-article__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-heavy);
  line-height: var(--leading-display);
  overflow-wrap: anywhere;
}

.bsx-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
  font-variant-numeric: tabular-nums;
}

/* "Updated …" and "N min read" wrap as one group: the read time never sits alone on a line. */
.bsx-post-meta__text {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: var(--space-3);
  white-space: nowrap;
}

/* A page has one line of text ("Last updated Nov 12, 2026"): plain text flow, no gaps between words. */
.bsx-post-meta--page {
  display: block;
}

.bsx-post-meta a.bsx-pill {
  min-height: var(--space-8);
  padding-inline: var(--space-3);
}

.bsx-article__image {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-box);
}

.bsx-article__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- Columns: title and image, table of contents, body, side ---------- */

/* Phones and tablets: one column in page order (title and image, contents folded above the body,
   side after it). */
.bsx-article__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: var(--space-8);
}

.bsx-article__cols > * {
  min-width: 0;
  margin: 0;
}

.bsx-article__side {
  display: grid;
  align-content: start;
  gap: var(--space-8);
}

.bsx-article__side > * {
  margin: 0;
}

/* A post without an exchange has no side column. */
.bsx-article__side:not(:has(*)) {
  display: none;
}

/* The card beside the body keeps its green sign-up button (.bsx-btn--signup, base.css), like the sign-up boxes in the body. */

/* ---------- Table of contents ---------- */

.bsx-toc {
  border-radius: var(--radius-lg);
  background: var(--bg-box);
}

.bsx-toc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--space-12);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-lg);
  color: var(--text-strong);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  list-style: none;
  cursor: pointer;
}

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

.bsx-toc__summary .bsx-icon {
  width: var(--space-5);
  height: var(--space-5);
  color: var(--text-muted);
  transition: transform var(--duration) var(--ease-out);
}

.bsx-toc[open] > .bsx-toc__summary .bsx-icon {
  transform: rotate(180deg);
}

.bsx-toc__list {
  display: grid;
  margin: 0;
  padding: 0 var(--space-5) var(--space-3);
  list-style: none;
}

.bsx-toc__list > li {
  margin: 0;
}

.bsx-toc__list > li + li {
  border-top: 1px solid var(--border);
}

.bsx-toc__list a {
  display: flex;
  align-items: center;
  min-height: var(--space-10);
  padding-block: var(--space-2);
  color: var(--text-body);
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
  overflow-wrap: anywhere;
}

.bsx-toc__list a:hover {
  color: var(--text-strong);
}

/* ---------- Body text ---------- */

/* Every paragraph keeps the line length of its own text size (the disclosure line is smaller). */
.bsx-prose > p {
  max-width: var(--measure);
}

.bsx-prose h2 {
  font-size: var(--text-xl);
}

.bsx-prose h3 {
  font-size: var(--text-lg);
}

.bsx-prose h4 {
  font-size: var(--text-md);
}

/* A section reached from the table of contents does not stick to the top edge. */
.bsx-prose :is(h2, h3, h4) {
  overflow-wrap: anywhere;
  scroll-margin-top: var(--space-6);
}

.bsx-prose > :is(h2, h3, h4) + * {
  margin-block-start: var(--space-3);
}

.bsx-prose > h3 {
  margin-block-start: var(--space-8);
}

.bsx-prose strong {
  color: var(--text-strong);
}

.bsx-prose li + li,
.bsx-prose li > :is(ul, ol) {
  margin-top: var(--space-2);
}

.bsx-prose li::marker {
  color: var(--text-muted);
}

.bsx-prose blockquote {
  margin-inline: 0;
  padding-left: var(--space-5);
  border-left: 2px solid var(--border-strong);
}

.bsx-prose hr {
  height: 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.bsx-prose pre {
  overflow-x: auto;
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--bg-box);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

/* ---------- Tables: a table wider than the body scrolls by itself, never the page ---------- */

.bsx-prose .wp-block-table {
  margin-inline: 0;
  overflow-x: auto;
}

/* A table written without the table block: the table box itself is the scroller. */
.bsx-prose > table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* Tables written in the body. The exchange comparison table at the end of a post (.bsx-compare) keeps
   its own look from components.css, the same as on /exchanges/. */
.bsx-prose table:not(.bsx-exchange-table) {
  border-collapse: collapse;
  color: var(--text-body);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  font-variant-numeric: tabular-nums;
}

.bsx-prose .wp-block-table table {
  width: 100%;
}

.bsx-prose table:not(.bsx-exchange-table) thead,
.bsx-prose table:not(.bsx-exchange-table) tfoot {
  border: 0;
}

/* min-width: on a phone a many-column table scrolls instead of squeezing every column to one word per line. */
/* Grid: every cell has a line on all four sides (rows and columns). Every cell, the headers too, is
   centered across and down (2026-11-15 decision). */
.bsx-prose table:not(.bsx-exchange-table) th,
.bsx-prose table:not(.bsx-exchange-table) td {
  min-width: 6em;
  padding: var(--space-3);
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.bsx-prose table:not(.bsx-exchange-table) thead th {
  border-bottom-color: var(--border-strong);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.bsx-prose table:not(.bsx-exchange-table) tbody th {
  color: var(--text-strong);
  font-weight: var(--weight-medium);
}

/* ---------- Figures: chart captures, the video, images ---------- */

.bsx-prose figure {
  margin-inline: 0;
}

/* A figure fills the body width and never overflows it. A link on it stays as written. */
.bsx-prose figure img,
.bsx-prose figure video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.bsx-prose figure > a {
  display: block;
  text-decoration: none;
}

.bsx-prose figcaption {
  margin: var(--space-2) 0 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  text-align: left;
}

/* Video (tools/make_post.py): a 16:9 thumbnail that links to the video, and its caption. */
.bsx-video > a {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-box);
}

.bsx-prose .bsx-video img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
}

/* Play mark: a round shade with a triangle, drawn by CSS (no image, no emoji). */
.bsx-video > a::before,
.bsx-video > a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
}

.bsx-video > a::before {
  width: var(--space-16);
  height: var(--space-16);
  margin: calc(var(--space-8) * -1) 0 0 calc(var(--space-8) * -1);
  border-radius: var(--radius-full);
  background: var(--bg-base);
  opacity: 0.8;
  transition: opacity var(--duration) var(--ease-out);
}

.bsx-video > a::after {
  margin: calc(var(--space-3) * -1) 0 0 calc(var(--space-2) * -1);
  border-style: solid;
  border-width: var(--space-3) 0 var(--space-3) var(--space-5);
  border-color: transparent transparent transparent var(--text-strong);
}

.bsx-video > a:hover::before {
  opacity: 0.95;
}

/* ---------- Body boxes: key takeaways, sign-up box, FAQ, risk ---------- */

.bsx-lede,
.bsx-cta {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--bg-box);
}

/* Body text color like the rest of the body (not brighter); its title and bold words stay --text-strong. */
.bsx-lede {
  color: var(--text-body);
}

.bsx-lede > *,
.bsx-cta > * {
  margin: 0;
}

.bsx-lede > * + * {
  margin-top: var(--space-3);
}

.bsx-lede__title {
  color: var(--text-strong);
  font-weight: var(--weight-bold);
}

.bsx-lede :is(ul, ol) {
  padding-left: var(--space-6);
}

.bsx-cta > * + * {
  margin-top: var(--space-4);
}

/* The opening question of the box ("Ready to try this on Binance?") reads as its title. */
.bsx-cta > p:first-child > strong:first-child {
  display: block;
  margin-bottom: var(--space-3);
  font-size: var(--text-md);
  line-height: var(--leading-tight);
}

/* The referral link: the green sign-up button (same colors as .bsx-btn--signup). tools/make_post.py puts it
   in a paragraph of its own, after the box's full sentence. */
.bsx-prose .bsx-cta a[rel~="sponsored"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--space-12);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  background: var(--signup-bg);
  color: var(--signup-text);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  transition: opacity var(--duration) var(--ease-out);
}

.bsx-prose .bsx-cta a[rel~="sponsored"]:hover {
  opacity: 0.86;
}

/* Note from the exchange's record (inc/content.php): one line per value. */
.bsx-cta__note {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  color: var(--text-body);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.bsx-cta__fact {
  display: block;
}

.bsx-cta__fact + .bsx-cta__fact {
  margin-top: var(--space-1);
}

.bsx-cta__label {
  color: var(--text-muted);
}

.bsx-prose > .bsx-faq,
.bsx-prose > .bsx-compare,
.bsx-prose > .bsx-risk {
  margin-block-start: var(--space-10);
}

/* The risk box lines up with the other boxes of the body. Pretendard has no italic face: the slanted
   copy the browser draws is hard to read, so emphasis inside the box stays upright. */
.bsx-prose > .bsx-risk {
  max-width: none;
}

.bsx-risk em {
  font-style: normal;
}

.bsx-faq > * {
  margin: 0;
}

.bsx-faq > h3 {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.bsx-faq > h3 + * {
  margin-top: var(--space-2);
}

/* "Compare exchanges" at the end of every post, after the FAQ and before the risk box (inc/content.php,
   2026-12-04 decision): the /exchanges/ table under a heading that links to that screen. Spaced like the FAQ. */
.bsx-compare > * {
  margin: 0;
}

.bsx-compare > h2 + * {
  margin-top: var(--space-3);
}

/* The heading keeps the heading color; its link shows only on hover or focus. */
.bsx-compare > h2 > a {
  color: inherit;
}

/* Links in the table look as on /exchanges/: exchange names underline on hover, the green sign-up
   buttons never (the body's own links are always underlined). */
.bsx-prose .bsx-compare a {
  text-decoration: none;
}

.bsx-prose .bsx-compare a:not(.bsx-btn):hover,
.bsx-prose .bsx-compare > h2 > a:focus {
  text-decoration: underline;
}

/* From 1100px the table needs at most 37.2em of the section's own type (offers wrapped, headers on one
   line; measured 1,100 to 2,560px, both themes, 2026-12-04). The column beside the contents list is
   narrower than 37.5em just above 1100px and from about 1,560px (the type keeps growing, the column
   stops at its cap), so there the post shows the two-column cards of components.css instead of a
   sideways scroll. At 1,200px the table fits. Below 1100px components.css already shows cards. Keep
   these rules in step with the "Below 1100px" cards in components.css. */
.bsx-compare {
  container: bsx-compare / inline-size;
}

@media (min-width: 1100px) {
  @container bsx-compare (max-width: 37.49em) {
    .bsx-compare .bsx-exchange-table,
    .bsx-compare .bsx-exchange-table tbody,
    .bsx-compare .bsx-exchange-table tr,
    .bsx-compare .bsx-exchange-table th,
    .bsx-compare .bsx-exchange-table td {
      display: block;
    }

    .bsx-compare .bsx-exchange-table thead {
      display: none;
    }

    .bsx-compare .bsx-exchange-table tbody {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--space-4);
    }

    .bsx-compare .bsx-exchange-table__name {
      align-items: flex-start;
      justify-content: flex-start;
    }

    .bsx-compare .bsx-exchange-table tbody tr {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-content: start;
      gap: var(--space-4);
      padding: var(--space-5);
      border-radius: var(--radius-lg);
      background: var(--bg-box);
    }

    .bsx-compare .bsx-exchange-table tbody th,
    .bsx-compare .bsx-exchange-table tbody td,
    .bsx-compare .bsx-exchange-table tbody tr > :first-child,
    .bsx-compare .bsx-exchange-table tbody tr > :last-child {
      min-width: 0;
      padding: 0;
      border: 0;
      text-align: left;
    }

    .bsx-compare .bsx-exchange-table td {
      color: var(--text-strong);
      font-size: var(--text-base);
      font-weight: var(--weight-medium);
      overflow-wrap: anywhere;
    }

    .bsx-compare .bsx-exchange-table td::before {
      content: attr(data-label);
      display: block;
      margin-bottom: var(--space-1);
      color: var(--text-muted);
      font-size: var(--text-xs);
      font-weight: var(--weight-regular);
    }

    .bsx-compare .bsx-exchange-table .bsx-num {
      white-space: normal;
      text-align: left;
    }

    :root[data-theme="light"] .bsx-compare .bsx-exchange-table .bsx-fee__code {
      color: var(--text-strong);
    }

    .bsx-compare .bsx-exchange-table__label,
    .bsx-compare .bsx-exchange-table td.bsx-col-offer {
      min-width: 0;
      max-width: none;
    }

    .bsx-compare .bsx-exchange-table__label a {
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .bsx-compare .bsx-exchange-table tbody th,
    .bsx-compare .bsx-exchange-table .bsx-col-offer,
    .bsx-compare .bsx-exchange-table .bsx-col-cta {
      grid-column: 1 / -1;
    }

    .bsx-compare .bsx-exchange-table td.bsx-col-cta::before {
      display: none;
    }

    .bsx-compare .bsx-exchange-table td:empty {
      display: none;
    }

    .bsx-compare .bsx-exchange-table .bsx-btn {
      width: 100%;
      min-height: var(--space-12);
      white-space: normal;
    }
  }
}

/* ---------- Author box ---------- */

.bsx-author {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--bg-box);
}

.bsx-author__icon {
  display: block;
  flex: none;
  width: var(--space-12);
  height: var(--space-12);
  border-radius: var(--radius);
}

.bsx-author__body {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.bsx-author__body > * {
  margin: 0;
}

.bsx-author__name {
  color: var(--text-strong);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

.bsx-author__bio {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.bsx-author__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.bsx-author__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--space-10);
}

/* ---------- Share card: below the article, above the author box (bitstepx/share) ----------
   Same box as the author box. Big buttons filled with each network's color (--brand-*, 2026-11-28
   user decision "share should stand out"): two to a line on a phone, three from 600px.
   "Copy link" stays neutral with a line around it. */

.bsx-share {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--bg-box);
}

.bsx-share__title {
  margin: 0;
  color: var(--text-strong);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.bsx-share__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.bsx-share__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--space-12);
  padding-inline: var(--space-3);
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: filter var(--duration) var(--ease-out);
}

.bsx-share__btn:hover {
  filter: brightness(1.12);
  text-decoration: none;
}

.bsx-share__btn[hidden] {
  display: none;
}

.bsx-share__btn .bsx-icon {
  flex: none;
  width: var(--space-5);
  height: var(--space-5);
}

/* Network colors: the card's buttons and the round buttons under the title. */
:is(.bsx-share__link, .bsx-share-bar__btn)[data-network] {
  color: var(--brand-text);
}

:is(.bsx-share__link, .bsx-share-bar__btn)[data-network="x"] {
  background: var(--btn-bg);
  color: var(--btn-text);
}

:is(.bsx-share__link, .bsx-share-bar__btn)[data-network="facebook"] {
  background: var(--brand-facebook);
}

:is(.bsx-share__link, .bsx-share-bar__btn)[data-network="whatsapp"] {
  background: var(--brand-whatsapp);
}

:is(.bsx-share__link, .bsx-share-bar__btn)[data-network="telegram"] {
  background: var(--brand-telegram);
}

:is(.bsx-share__link, .bsx-share-bar__btn)[data-network="reddit"] {
  background: var(--brand-reddit);
}

/* Two classes: these come before the bar's own button rule (border: 0) below. */
.bsx-share__btn.bsx-share__copy,
.bsx-share-bar__btn.bsx-share-bar__copy {
  border: 1px solid var(--control-border);
  background: var(--bg-pill);
  color: var(--text-strong);
}

.bsx-share__btn.bsx-share__copy:hover,
.bsx-share-bar__btn.bsx-share-bar__copy:hover {
  filter: none;
  background: var(--bg-pill-hover);
}

:is(.bsx-share__copy, .bsx-share-bar__copy) .bsx-icon--check,
:is(.bsx-share__copy, .bsx-share-bar__copy)[data-copied] .bsx-icon--link {
  display: none;
}

:is(.bsx-share__copy, .bsx-share-bar__copy)[data-copied] .bsx-icon--check {
  display: block;
  color: var(--signup-bg);
}

/* ---------- Share bar: round icon buttons in one line under the post title (bitstepx/share-bar) ----------
   Six 40px buttons fit one line in the 328px a 360px phone leaves. Centered between two light
   lines (--border) so the row reads as its own strip (2026-11-28 user decision). */

.bsx-article__head > .bsx-share-bar {
  margin-block-start: var(--space-4);
}

.bsx-share-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  padding-block: var(--space-3);
  border-block: 1px solid var(--border);
}

.bsx-share-bar__btn {
  display: inline-grid;
  place-items: center;
  width: var(--space-10);
  height: var(--space-10);
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  font: inherit;
  cursor: pointer;
  transition: filter var(--duration) var(--ease-out);
}

.bsx-share-bar__btn:hover {
  filter: brightness(1.12);
  text-decoration: none;
}

.bsx-share-bar__btn[hidden] {
  display: none;
}

.bsx-share-bar__btn .bsx-icon {
  width: var(--space-5);
  height: var(--space-5);
}

/* ---------- Related posts: cards below the article ---------- */

.bsx-related__title {
  margin: 0 0 var(--space-6);
  font-size: var(--text-xl);
}

.bsx-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(var(--space-16) * 4.5)), 1fr));
  gap: var(--space-10) var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bsx-related__grid > li {
  min-width: 0;
  margin: 0;
}

/* ---------- Page screen: breadcrumbs, title, last updated, body ---------- */

.bsx-page > * {
  margin-block: 0;
}

.bsx-page > * + * {
  margin-block-start: var(--space-4);
}

.bsx-page > .bsx-prose {
  margin-block-start: var(--space-8);
}

.bsx-page > .bsx-page-title {
  overflow-wrap: anywhere;
}

/* ---------- Phones: figures run to the screen edges ---------- */

@media (max-width: 599px) {
  .bsx-article__image,
  .bsx-prose > figure:not(.wp-block-table, .wp-block-pullquote) {
    margin-inline: calc(var(--space-4) * -1);
  }

  .bsx-article__image,
  .bsx-prose > figure:not(.wp-block-table, .wp-block-pullquote) :is(img, video, iframe),
  .bsx-prose > .bsx-video > a {
    border-radius: 0;
  }

  .bsx-prose > figure:not(.wp-block-table, .wp-block-pullquote) > figcaption {
    padding-inline: var(--space-4);
  }
}

/* ---------- Wider screens ---------- */

@media (min-width: 600px) {
  .bsx-lede,
  .bsx-cta,
  .bsx-share,
  .bsx-author {
    padding: var(--space-6);
  }

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

  .bsx-toc__summary {
    padding-inline: var(--space-6);
  }

  .bsx-toc__list {
    padding-inline: var(--space-6);
  }
}

/* Two columns: title, featured image and body on the left. On the right, from the title row down,
   the side column (exchange card), then the table of contents, which stays in view (sticky) for the
   rest of the body. The contents come last on purpose: a sticky grid item is held inside the whole
   grid, not its own row, so anything placed under it in the same column would slide beneath it.
   Rows: the head row, a row that grows only when the side column is taller than the head, then the
   rest of the body beside the contents. The author box lines up with the body column. */
@media (min-width: 1100px) {
  .bsx-article {
    --bsx-rail: calc(var(--space-16) * 5.5);
  }

  .bsx-article__title {
    font-size: var(--text-3xl);
  }

  .bsx-main.bsx-article > :is(.bsx-share, .bsx-author) {
    max-width: calc(100% - var(--bsx-rail) - var(--space-12));
  }

  .bsx-article__cols {
    grid-template-columns: minmax(0, 1fr) var(--bsx-rail);
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "head side"
      "body side"
      "body toc";
    gap: 0 var(--space-12);
  }

  .bsx-article__head {
    grid-area: head;
    padding-bottom: var(--space-8);
  }

  .bsx-article__body {
    grid-area: body;
  }

  .bsx-article__side {
    grid-area: side;
    padding-bottom: var(--space-8);
  }

  .bsx-toc {
    position: sticky;
    top: var(--space-6);
    grid-area: toc;
    max-height: calc(100vh - var(--space-12));
    overflow-y: auto;
  }
}
