.pagewrap { max-width: 760px; margin: 0 auto; }

.rail { font-size: 13px; line-height: 1.55; }
.rail > .railhead {
  margin: 0 0 8px; padding-bottom: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: var(--bg-ink-2); border-bottom: 1px solid var(--bg-ink);
}

.railapps { list-style: none; margin: 0; padding: 0; }
.railapps li { margin: 0; border-bottom: 1px solid var(--bg-line-2); }
.railapps .row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 4px; margin: 0; text-align: left;
  font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
  text-decoration: none;
}
.railapps .row:hover { background: var(--surface); color: var(--ink); }
.railapps .row:hover b { text-decoration: underline; text-underline-offset: 3px; }
.railapps img {
  width: 22px; height: 22px; flex: none; display: block;
  border: 1px solid var(--bg-line); border-radius: 5px;
}
.railapps b {
  flex: 1 1 auto; min-width: 0;
  font-size: 12.5px; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.railapps .go { flex: none; font-size: 14px; line-height: 1; font-style: normal; color: var(--bg-ink-3); }
.rail .glabel {
  font-size: 11px; color: var(--bg-ink-3); letter-spacing: .04em;
  margin: 14px 0 4px;
}
.rail .glabel:first-of-type { margin-top: 0; }

.sideslot { display: block; min-height: 600px; }
.sideslot > ins { display: block; }

.hbanner {
  display: flex; flex-direction: column; min-height: 600px;
  text-decoration: none; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-bottom: 3px solid var(--ink);
}
.hbanner:hover { background: var(--surface-2); }

.hb-top {
  display: flex; align-items: center;
  padding: 16px 16px 15px; background: var(--accent);
}
.hb-logo { height: 21px; width: auto; display: block; }
.hb-logo .ink { fill: var(--surface); }
.hb-logo .bar { fill: var(--mark); }
.hb-logo .tile { fill: var(--accent); }

.hb-mid { flex: 1 1 auto; display: flex; flex-direction: column; padding: 20px 16px 0; }
.hb-head {
  font-size: 19px; font-weight: 800; line-height: 1.34; letter-spacing: -.025em;
  margin-bottom: 12px;
}
.hb-body { font-size: 12.5px; line-height: 1.65; color: var(--ink-2); letter-spacing: -.01em; }
.hb-quiet { margin-top: 7px; }

.hb-mini {
  flex: 1 1 auto;
  margin: 18px -16px 0; padding: 14px 16px 16px;
  background: var(--bg); border-top: 1px solid var(--line);
  display: grid; gap: 9px; grid-auto-rows: 1fr;
}
.mc {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-bottom: 3px solid var(--ink);
  padding: 7px 9px 9px;
}
.mc b {
  display: block; font-size: 10.5px; font-weight: 700; color: var(--ink); letter-spacing: -.01em;
  padding-bottom: 6px; margin-bottom: 7px; border-bottom: 1px solid var(--line);
}
.mc i { display: block; height: 5px; background: var(--line); margin-bottom: 5px; }
.mc i:last-child { margin-bottom: 0; }
.mc i.num { width: 44%; height: 10px; margin-left: auto; background: var(--ink-3); }
.mc .sw { display: flex; gap: 4px; }
.mc .sw em { flex: 1 1 0; height: 15px; }
.mc .sw em:nth-child(1) { background: var(--mark); }
.mc .sw em:nth-child(2) { background: var(--ink); }
.mc .sw em:nth-child(3) { background: var(--ink-3); }
.mc .sw em:nth-child(4) { background: var(--line); }
.mc .sw em:nth-child(5) { background: var(--surface-2); border: 1px solid var(--line); }

.hb-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 20px 16px 18px; padding: 10px 13px;
  font-size: 13px; font-weight: 700; letter-spacing: -.01em;
  border: 1px solid var(--ink); background: none; color: var(--ink);
  transition: background .12s, color .12s;
}
.hb-cta i { font-style: normal; font-size: 14px; line-height: 1; }
.hbanner:hover .hb-cta { background: var(--accent); color: var(--accent-ink); }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 8px);
  width: max-content; max-width: min(560px, calc(100vw - 32px));
  overflow-wrap: anywhere;
  background: var(--accent); color: var(--accent-ink);
  padding: 9px 15px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s;
  z-index: 100;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}

@media (min-width: 1240px) {
  .pagewrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr);
    max-width: none; margin: 0;
  }
  .pagewrap > .prose { grid-column: 2; grid-row: 1; width: 100%; margin: 0; }
  .pagewrap > .rail-apps { grid-column: 1; grid-row: 1; justify-self: end; }
  .pagewrap > .rail-side   { grid-column: 3; grid-row: 1; justify-self: start; }
  .rail {
    align-self: start;
    width: 176px;
    margin-top: 38px;
  }
  .rail-apps { margin-right: 28px; }
  .rail-side   { margin-left: 28px; }
  .rail-side { position: sticky; top: 20px; }
}

@media (min-width: 1520px) {
  .rail-apps { width: 190px; margin-right: 32px; }
  .rail-side   { width: 300px; margin-left: 32px; }
  .railapps b { font-size: 13px; }
  .railapps .row { padding: 8px 5px; }
}

@media (max-width: 1239.98px) {
  .rail {
    max-width: 760px; margin: 0 auto; padding: 0 20px 36px;
  }
  .rail-apps { padding-top: 26px; }
  .sideslot { min-height: 0; }
  .hbanner { min-height: 0; }
  .hb-mid { padding: 16px 16px 0; }
  .hb-head { font-size: 17px; }
  .hb-cta { margin: 14px 16px 14px; }
  .hb-mini { display: none; }
}

@media (min-width: 560px) and (max-width: 1239.98px) {
  .railapps { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .railapps li:nth-last-child(-n+1):nth-child(odd) { grid-column: 1 / -1; }
}


.bait { height: 8px; width: 8px; position: absolute; left: -9999px; top: -9999px; pointer-events: none; }

.blocknote {
  position: fixed; z-index: 60;
  left: 20px; bottom: 20px; width: min(340px, calc(100vw - 40px));
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 16px 18px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .14);
  opacity: 0; transform: translateY(10px);
  transition: opacity .26s ease, transform .26s ease;
}
.blocknote.on { opacity: 1; transform: translateY(0); }
.blocknote b { display: block; font-size: 15px; margin-bottom: 7px; }
.blocknote p { font-size: 13.5px; line-height: 1.62; color: var(--ink-2); margin: 0 0 8px; }
.blocknote .how { color: var(--ink); margin-bottom: 12px; }
.blocknote .bn-close {
  font: inherit; font-size: 13px; cursor: pointer;
  padding: 7px 14px; border-radius: 7px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
}
.blocknote .bn-close:hover { background: var(--line); }

@media (prefers-reduced-motion: reduce) {
  .blocknote { transition: none; }
}
