  /* Rollout — the staged surface deployment ladder.
     The ladder is read top to bottom like the plan it is: the wave number
     first, then the region, then the window it opens in. */

  /* The ladder needs more room than a single column of tiles. */
  .tr-card.wide {
    max-width: 1080px;
  }
  /* Four stat tiles: four across, then two, then one. The shared .tr-grid is
     auto-fit, which leaves the fourth tile orphaned on a row of its own at
     desktop widths. */
  .tr-card.wide .tr-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  @media (max-width: 959px) {
    .tr-card.wide .tr-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  .rg-prose {
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--text-dim);
    margin: 0;
  }
  /* The theme sets .page__content p { font-size: 1em } and .page__content p
     { margin: 0 0 1.3em }, which outranks a single-class rule. Every rule
     below that styles a paragraph or a list item is scoped under
     .tr-card.wide so it wins on specificity and not on load order. The
     anchor is the card that is already in the markup, so an edit to the
     page cannot quietly drop the scope again. */
  .tr-card.wide .rg-prose p {
    font-size: inherit;
    margin: 0 0 11px;
  }
  .rg-prose strong {
    color: var(--accent-gold);
    font-weight: 100;
  }

  .rg-ladder {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  @media (min-width: 1060px) {
    .rg-ladder {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    /* Ten rungs do not divide by three, so the last one runs the full width
       of the board and closes it instead of sitting alone. */
    .rg-ladder .rg-card:last-child {
      grid-column: 1 / -1;
    }
    .rg-ladder .rg-card:last-child .rg-grid-list {
      max-width: 680px;
    }
  }
  .rg-card {
    position: relative;
    border-radius: 12px;
    padding: 14px 15px 15px;
    background: rgba(6, 7, 10, .62);
    border: 1px solid rgba(134, 227, 227, .13);
    display: flex;
    flex-direction: column;
    gap: 9px;
    transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
  }
  /* An open region is lit; a standby region is built but not yet lit. */
  .rg-card.open {
    border-color: rgba(255, 214, 90, .38);
    background: linear-gradient(180deg, rgba(255, 214, 90, .1), rgba(255, 214, 90, .02));
    box-shadow: 0 0 30px rgba(255, 214, 90, .08);
  }
  .rg-card.standby {
    border-color: rgba(134, 227, 227, .2);
  }
  .rg-card.sealed {
    border-style: dashed;
    border-color: rgba(134, 227, 227, .1);
    opacity: .72;
  }
  /* The region the reader is sitting in. */
  .rg-card.mine {
    border-color: rgba(134, 227, 227, .4);
    box-shadow: 0 0 34px rgba(134, 227, 227, .12);
  }
  .rg-card-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
  }
  .rg-wave {
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent-gold);
  }
  .rg-tag {
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .rg-status {
    margin-left: auto;
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 9px;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(134, 227, 227, .22);
    color: var(--text-dim);
  }
  .rg-status.open {
    border-color: rgba(255, 214, 90, .4);
    color: var(--accent-gold);
  }
  .rg-status.standby {
    border-color: rgba(242, 215, 122, .3);
    color: var(--warn);
  }
  .rg-name {
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: clamp(16px, 2.2vw, 20px);
    letter-spacing: .06em;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
  }
  .rg-window {
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .tr-card.wide .rg-note {
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 11.5px;
    line-height: 1.7;
    letter-spacing: .02em;
    color: var(--text-dim);
    margin: 0;
  }
  .rg-meter {
    height: 4px;
    border-radius: 999px;
    background: rgba(134, 227, 227, .1);
    overflow: hidden;
  }
  .rg-meter-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 214, 90, .85), rgba(134, 227, 227, .55));
    transition: width .7s ease;
  }
  .rg-card.sealed .rg-meter-fill {
    background: rgba(134, 227, 227, .3);
  }
  .rg-meta {
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .rg-made {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .rg-chip {
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 9.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-dim);
    border: 1px solid rgba(134, 227, 227, .16);
    border-radius: 999px;
    padding: 3px 9px;
  }
  .rg-grids summary {
    cursor: pointer;
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
    list-style: none;
    outline: none;
  }
  .rg-grids summary::-webkit-details-marker { display: none; }
  .rg-grids summary::before {
    content: '+ ';
    color: var(--accent);
  }
  .rg-grids[open] summary::before {
    content: '− ';
  }
  .rg-grids summary:hover {
    color: var(--accent);
  }
  .rg-grid-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 3px 10px;
    border-top: 1px solid rgba(134, 227, 227, .1);
    padding-top: 9px;
  }
  .tr-card.wide .rg-grid-list li {
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--text-dim);
  }
  /* The little flag in front of a country name. */
  .tr-card.wide .rg-grid-list .rg-flag {
    font-size: 10px;
    letter-spacing: 0;
    margin-right: 1px;
  }
  .tr-card.wide .rg-grid-list .rg-flag.aboriginal {
    font-size: 9px;
    line-height: 1;
    display: inline-block;
    position: relative;
    background: linear-gradient(180deg, #000 50%, #d62828 50%);
    color: transparent;
    -webkit-text-fill-color: transparent;
    border-radius: 1px;
    padding: 0 1px;
  }
  .tr-card.wide .rg-grid-list .rg-flag.aboriginal::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ffd65a;
    left: 1px;
    top: 1px;
  }
  /* A peak carries a height as well as a name, so its columns run a little
     wider than the country list's. */
  .rg-peaks .rg-grid-list {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  }
  /* The summit height trails the name in the same dim ink, on figures that
     line up down the column. */
  .tr-card.wide .rg-grid-list .rg-peak-height {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
  }
  /* The UNESCO star beside a peak's height. */
  .tr-card.wide .rg-grid-list .rg-peak-star {
    color: var(--text-dim);
  }
  /* The badge on the region the reader is in. */
  .rg-mine {
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
  }
  .rg-mine.soft {
    color: var(--accent);
    background: transparent;
    border: 1px solid rgba(134, 227, 227, .34);
  }
  .tr-card.wide .rg-where {
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--accent);
    margin: 0 0 14px;
    line-height: 1.7;
  }
  /* Your own grid sits under the stats as a band, not as a tile with a wide
     empty space beside it. */
  .tr-card.wide .tr-grid + .tr-tile {
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 13px 18px;
    #border-left: 2px solid var(--accent);
  }
  .tr-card.wide .tr-grid + .tr-tile .tr-tile-label {
    flex: 0 0 auto;
  }
  .tr-card.wide .tr-grid + .tr-tile .rg-where {
    margin: 0;
  }
  /* A reader the gate sent here is told so, on a line of its own under the
     grid. */
  .tr-card.wide .tr-grid + .tr-tile .rg-closed {
    flex: 1 0 100%;
    margin: 4px 0 0;
    font-family: 'Cosmic', sans-serif;
    font-weight: 100;
    font-size: 11.5px;
    letter-spacing: .08em;
    text-transform: none;
    color: var(--text-muted);
  }
  .tr-card.wide .rg-closed[hidden] {
    display: none;
  }

  /* treasury.css styles .tr-sub and .tr-foot as paragraphs, so the theme's
     .page__content p rule outranks them there too. Corrected for this page
     only, so the shared stylesheet and the pages using it are left alone. */
  .tr-card.wide .tr-sub {
    font-size: 13px;
    margin: 0 0 36px;
  }
  .tr-card.wide .tr-foot {
    font-size: 11px;
    margin: 22px 0 0;
  }

  .rg-devices {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0;
  }
  .rg-device {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .rg-device-img {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
  }
  .rg-device-img img {
    max-height: 60px;
    max-width: 100%;
    height: auto;
    width: auto;
  }
  .rg-device-name {
    font-weight: bold;
    margin-bottom: 4px;
  }
  .rg-device-note {
    font-size: 0.9em;
    color: var(--text-muted);
  }
  
  @media (max-width: 560px) {
    .rg-ladder {
      grid-template-columns: minmax(0, 1fr);
    }
    .tr-card.wide .tr-grid {
      grid-template-columns: minmax(0, 1fr);
    }
    .rg-grid-list {
      grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    /* A single card is narrower than a peak's name and height, so the peaks
       run one to a row rather than spill out of the card. */
    .rg-peaks .rg-grid-list {
      grid-template-columns: minmax(0, 1fr);
    }
  }
