/* =============================================================================
   The page frame, measured like radionl.fm

   One container for every row (header, content, footer, player bar): 1400px
   wide with 16px at the edges (12px below 720px, 10px below 420px). The content
   is a grid of a flexible main column and a fixed-width rail: 420px, 372px
   below 1320px, 328px below 1120px. Below 980px the rail becomes a band of two
   panels under the content, below 720px one.

   Loaded after the Tukker FM stylesheets, so only widths and the grid change;
   colours, type and cards stay Tukker FM's.
   ========================================================================== */
:root {
  --container: 1400px;
  --edge: 16px;
  --rail-width: 420px;
  --gap: 16px;
}

.container,
.site-header__inner {
  width: min(100% - 2 * var(--edge), var(--container));
  max-width: none;
  margin-inline: auto;
  padding-left: 0;
  padding-right: 0;
}

.page {
  width: min(100% - 2 * var(--edge), var(--container));
  max-width: none;
  margin-inline: auto;
  padding: var(--gap) 0 28px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-width);
  gap: var(--gap);
  align-items: start;
}
.layout--full { grid-template-columns: minmax(0, 1fr); }

.layout__main,
.layout__aside {
  flex: none;
  min-width: 0;
}

@media (max-width: 1320px) {
  :root { --rail-width: 372px; }
}

@media (max-width: 1120px) {
  :root { --rail-width: 328px; --gap: 14px; }
}

@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout__rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .layout__rail > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  :root { --gap: 12px; --edge: 12px; }
  .layout__rail { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  :root { --edge: 10px; }
}
