/* Site shell: the countdown banner pinned at the top, the left menu (rail or drawer), the content column.
   Shared by every page and the docs. Tokens come from style.css. */
:root { --banner-h: 56px; --side-w: 208px; --rail-w: 60px; }
html { scroll-padding-top: calc(var(--banner-h) + 16px); }

/* ---------- countdown banner ---------- */
.banner { position: sticky; top: 0; z-index: 30; height: var(--banner-h); display: flex; align-items: center; gap: 20px; padding: 0 20px; background: var(--ink); color: var(--cream); font-variant-numeric: var(--nums); }
.bn-menu { display: none; flex: none; width: 44px; height: 44px; margin-left: -8px; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: none; color: var(--cream); }
.bn-menu:hover { background: #ffffff14; }
.bn-menu svg { width: 22px; height: 22px; }
.bn-brand { flex: none; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; min-width: 44px; color: var(--cream); font: 800 19px var(--display); letter-spacing: -.035em; text-decoration: none; }
.bn-brand img { width: 28px; height: 28px; }
.bn-brand small { font: 400 14px var(--body); letter-spacing: 0; color: #b9baae; margin-left: 4px; }
.bn-event { flex: none; display: flex; align-items: center; gap: 12px; padding-left: 20px; border-left: 1px solid #45463d; min-height: 32px; }
.bn-text { display: flex; align-items: baseline; gap: 10px; }
.bn-dot { width: 8px; height: 8px; border-radius: 50%; background: #8d8e80; flex: none; }
.banner[data-phase="collect"] .bn-dot, .banner[data-phase="buy"] .bn-dot { background: #f0704e; }
.banner[data-phase="rip"] .bn-dot, .banner[data-phase="draw"] .bn-dot { background: #ff6a42; animation: bn-beat 1s ease-in-out infinite; }
@keyframes bn-beat { 50% { opacity: .3; } }
.bn-label { font-size: 13px; color: #cecfc2; white-space: nowrap; }
.bn-clock { font: 600 25px/1 var(--display); letter-spacing: -.035em; white-space: nowrap; }
.banner[data-phase="rip"] .bn-clock, .banner[data-phase="draw"] .bn-clock { color: #ffa88b; }
.bn-at { font-size: 13px; color: #cecfc2; white-space: nowrap; }
.bn-at:empty { display: none; }
.bn-status { flex: 1; min-width: 0; margin: 0; font-size: 13.5px; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-status a { color: #ffa88b; text-underline-offset: 3px; }
.bn-times { flex: none; display: flex; align-items: center; gap: 0; font-size: 13px; color: #a9aa9e; white-space: nowrap; }
.bn-times li + li::before { content: "·"; margin: 0 8px; color: #6a6b61; }
.bn-times li.next { color: var(--cream); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100svh - var(--banner-h)); }
.side-rail .layout { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
.layout > main { min-width: 0; }

/* ---------- left menu: plain text, the current page marked by weight, color and a thin rule ---------- */
.side { position: sticky; top: var(--banner-h); align-self: start; height: calc(100svh - var(--banner-h)); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; padding: 22px 16px 16px 20px; border-right: 1px solid var(--border); background: var(--cream); }
.side-k { margin: 22px 0 6px; font-size: 12px; color: var(--muted); }
.side-list { display: flex; flex-direction: column; }
.side-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 34px; color: var(--muted); font-size: 15px; text-decoration: none; white-space: nowrap; }
.side-item:hover { color: var(--ink); }
.side-item[aria-current="page"]:not(.off), .side-item.on { color: var(--ink); font-weight: 600; }
.side-item[aria-current="page"]:not(.off)::before, .side-item.on::before { content: ""; position: absolute; left: -20px; top: 9px; bottom: 9px; width: 2px; background: var(--red); }
.side-item .ic { display: none; width: 20px; height: 20px; }
.side-item .arrow { font-size: 12px; color: #9a9b8f; }
.side-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.side-buy { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 6px; background: var(--red); color: var(--white); font-size: 14px; font-weight: 500; text-decoration: none; }
.side-buy:hover { background: var(--red-deep); }
.side-buy[aria-disabled="true"] { opacity: .55; cursor: default; }
.side-buy[aria-disabled="true"]:hover { background: var(--red); }
.side-buy .ic { display: none; width: 18px; height: 18px; }
.side-toggle { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 13px; text-align: left; }
.side-toggle:hover { color: var(--ink); }
.side-toggle .ic { width: 16px; height: 16px; }
.lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* icon rail */
.side-rail .side { padding-left: 0; padding-right: 0; align-items: center; }
.side-rail .side .lbl, .side-rail .side .side-k, .side-rail .side .arrow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; }
.side-rail .side-item { justify-content: center; width: 44px; min-height: 44px; }
.side-rail .side-item .ic { display: block; }
.side-rail .side-item[aria-current="page"]:not(.off)::before, .side-rail .side-item.on::before { left: -8px; }
.side-rail .side-item[aria-current="page"]:not(.off) .ic, .side-rail .side-item.on .ic { color: var(--red); }
.side-rail .side-list + .side-list { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.side-rail .side-buy { width: 44px; height: 44px; padding: 0; justify-content: center; }
.side-rail .side-buy .ic { display: block; }
.side-rail .side-toggle { width: 44px; height: 44px; justify-content: center; }
.side-rail .side-toggle .ic { transform: rotate(180deg); }

.side-head { display: none; }
.side-backdrop { position: fixed; inset: 0; z-index: 35; background: #11120fa6; }

@media (max-width: 1240px) { .bn-status { display: none; } }
@media (max-width: 900px) {
  :root { --banner-h: 60px; }
  .banner { gap: 10px; padding: 0 16px; }
  .bn-menu { display: inline-flex; }
  .bn-brand { font-size: 0; gap: 0; justify-content: center; }
  .bn-brand img { width: 26px; height: 26px; }
  .bn-brand small { display: none; }
  .bn-event { flex: 1; min-width: 0; padding-left: 10px; gap: 8px; }
  .bn-text { flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
  .bn-label { font-size: 11px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .bn-clock { font-size: 22px; }
  .bn-at { display: none; }
  .bn-dot { align-self: flex-start; margin-top: 4px; }
  .bn-times { flex-direction: column; align-items: flex-end; font-size: 11px; line-height: 14px; }
  .bn-times li + li::before { content: none; }
  .layout, .side-rail .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); height: 100%; padding: 12px 16px 16px 24px; transform: translateX(-104%); visibility: hidden; }
  .shell-ready .side { transition: transform .24s ease, visibility 0s .24s; }
  .side-open .side { transform: none; visibility: visible; transition: transform .24s ease; }
  .side-item, .side .doc-link, .side .back { min-height: 44px; }
  .side-item[aria-current="page"]:not(.off)::before, .side-item.on::before { left: -24px; top: 12px; bottom: 12px; }
  .side-buy { min-height: 44px; }
  .side-toggle { display: none; }
  .side-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -4px 6px 0; }
  .side-title { font: 700 16px var(--display); letter-spacing: -.02em; }
  .side-close { width: 44px; height: 44px; border: 0; border-radius: 6px; background: none; color: var(--ink); font-size: 26px; line-height: 1; }
  .side-close:hover { background: var(--wash); }
}
@media (max-width: 360px) { .bn-brand { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .bn-dot { animation: none !important; }
  .side, .side-toggle .ic { transition: none !important; }
}
