/* Draci Strakonice: the frame. One pair of margins, one 12-column grid, one section rhythm. */

.wrap { padding-inline: var(--margin); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
/* Below 768px every grid child takes the full width unless it says otherwise. */
@media (max-width: 47.99em) {
  .grid > * { grid-column: 1 / -1 !important; }
}

.section { padding-block: calc(var(--section) / 2); }
.section--flush-top { padding-top: 0; }

/* Section heading: always present, on the outer margin, at the head step. */
.section-head { margin-bottom: clamp(1.5rem, 3vw, 3rem); }
.section-head h2 { font-size: var(--step-head); line-height: 0.98; letter-spacing: var(--head-tracking); }
.section-head p { margin-top: 1rem; }
.section-head--split { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; }

/* Fields: a section that changes the whole ground. Each field sets its own ink. */
.field-ink { background: var(--ink); color: var(--on-ink); }
.field-ink .muted { color: var(--on-ink-muted); }
.field-gold { background: var(--accent); color: var(--accent-ink); }
.field-surface { background: var(--surface); }

/* Generic content page: header + body + aside (blueprint B in the brief). */
.page-header { padding-top: clamp(2rem, 6vw, 5rem); padding-bottom: clamp(2rem, 4vw, 4rem); }
.page-header h1 { font-size: var(--step-head); line-height: 0.98; letter-spacing: var(--head-tracking); max-width: 18ch; }
.page-header .lead { margin-top: 1.25rem; max-width: 46ch; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.5rem; font-size: var(--step-small); color: var(--muted); margin-bottom: 1.25rem; }
.breadcrumbs a { color: var(--ink); text-decoration: underline; min-height: var(--touch); display: inline-flex; align-items: center; }
.breadcrumbs li { display: flex; align-items: center; min-height: var(--touch); }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--muted); }

.content-grid { row-gap: 3rem; padding-bottom: calc(var(--section) / 2); }
.content-grid__body { grid-column: 1 / 8; }
.content-grid__aside { grid-column: 9 / 13; }
.content-grid__aside > .sticky { position: sticky; top: 2rem; }
@media (max-width: 63.99em) {
  .content-grid__body { grid-column: 1 / 9; }
  .content-grid__aside { grid-column: 9 / 13; }
}
@media (max-width: 47.99em) {
  .content-grid__aside { order: -1; }
}

.stack > * + * { margin-top: var(--stack, 1rem); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster, 0.75rem 1.25rem); }
