/* ============================================================================
   101-php-01-editorial-grid — the editorial grid (UNIVERSAL: only the site's tokens, with defaults).

   Three lanes in one grid: full | wide | text. The text lane = min(text %, the space there is);
   the wide lanes take what is left up to the wide %; the outer lanes the rest. A child's own
   margins never move it sideways (a grid, not margin: auto). The widths: --x101-text / --x101-wide,
   set by editorialOpen() as percentages of the frame (--wrap).
   ========================================================================== */
.x101-editorial {
  --x101-t: calc(var(--wrap, 1200px) * var(--x101-text, 50) / 100);
  --x101-w: calc(var(--wrap, 1200px) * var(--x101-wide, 75) / 100);
  display: grid;
  grid-template-columns:
    [full-start] minmax(0, 1fr)
    [wide-start] minmax(0, calc((var(--x101-w) - var(--x101-t)) / 2))
    [text-start] min(var(--x101-t), 100%)
    [text-end]   minmax(0, calc((var(--x101-w) - var(--x101-t)) / 2))
    [wide-end]   minmax(0, 1fr) [full-end];
  max-width: var(--wrap, 1200px);
  margin: var(--space-top, 80px) auto 0;
  padding-inline: var(--gutter, 40px);
}
.x101-editorial > *          { grid-column: text; margin-block: 0; min-width: 0; }
.x101-editorial > .x101-wide { grid-column: wide; }
.x101-editorial > .x101-full { grid-column: full; }

/* ---- the rhythm: the grid spaces its children (no margin collapsing in a grid) ---- */
.x101-editorial > * + *             { margin-top: var(--space-m, 25px); }
.x101-editorial > * + h2            { margin-top: var(--space-l, 50px); }
.x101-editorial > * + h3            { margin-top: var(--space-m, 25px); }
.x101-editorial > h1 + h2           { margin-top: 6px; }
.x101-editorial > * + .x101-wide,
.x101-editorial > * + .x101-full,
.x101-editorial > .x101-wide + *,
.x101-editorial > .x101-full + *    { margin-top: var(--space-l, 50px); }

/* ---- the text it flows ---- */
.x101-list { padding: 0; list-style: none; }
.x101-list > li { position: relative; padding-left: 20px; }
.x101-list > li::before {
  content: "\2022"; position: absolute; left: 2px; top: 0;
  color: var(--accent, #dfd0b3); font-size: 15px;   /* the dot's size (a drawn dot, not text) */
}
.x101-links__sub { color: var(--muted, #a1a1a1); font-size: var(--fs-small, 18px); }

.x101-quote { margin-inline: 0; }
.x101-quote p {
  margin: 0; color: var(--muted, #a1a1a1);
  font-size: var(--fs-heading, 36px); line-height: var(--lh-heading, 1.1);
}

/* ============================================================================
   THE LANES KIND (settings: 'lanes' by column ranges, the React kit's wrapperParam idea): n equal columns, lanes placed by the
   numbers the PHP wrote (--x101-<lane>-a = first column, --x101-<lane>-s = how many). Left aligned when the lanes start at 1.
   'dense': a block placed in the aside lane takes the first row where its columns are free, so it runs along the text beside it.
   ========================================================================== */
.x101-editorial--lanes {
  grid-template-columns: repeat(var(--x101-n, 12), minmax(0, 1fr));
  column-gap: var(--x101-gap, 24px);
  grid-auto-flow: row dense;
}
.x101-editorial--lanes > *             { grid-column: var(--x101-text-a) / span var(--x101-text-s); }
.x101-editorial--lanes > .x101-wide    { grid-column: var(--x101-wide-a) / span var(--x101-wide-s); }
.x101-editorial--lanes > .x101-full    { grid-column: var(--x101-full-a) / span var(--x101-full-s); }
.x101-editorial--lanes > .x101-aside   { grid-column: var(--x101-aside-a) / span var(--x101-aside-s); grid-row: span var(--x101-rows, 1); margin-top: 0; }
/* INSET: the grid sits inside the site's own container (a section): the container is the frame, no frame of its own */
.x101-editorial--inset { max-width: none; margin: 0; padding-inline: 0; }
/* responsive: below the small breakpoint every lane is the full width and the aside stacks under its text */
@media (max-width: 47.99em) {
  .x101-editorial--lanes > *,
  .x101-editorial--lanes > .x101-wide,
  .x101-editorial--lanes > .x101-full,
  .x101-editorial--lanes > .x101-aside { grid-column: 1 / -1; grid-row: auto; }
  .x101-editorial--lanes > .x101-aside { margin-top: var(--space-m, 25px); }
}
