/* The All features page: the theme index, the theme sections, the card grid. Colours come from tokens.css only. */
.feat-layout { display: block; padding-bottom: var(--section); }
.feat-main { min-width: 0; }

/* Theme index: a row that scrolls sideways inside itself, a sticky column from 1100 px. */
.theme-index { display: flex; gap: 8px; margin-top: var(--s6); padding-bottom: 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.theme-index::-webkit-scrollbar { display: none; }
.theme-index a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--win); color: var(--text2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.theme-index a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
@media (min-width: 1100px) {
  .feat-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); column-gap: var(--s7); align-items: start; }
  .theme-index { position: sticky; top: 88px; flex-direction: column; gap: 2px; margin-top: var(--section); padding: 0; overflow: visible; }
  .theme-index a { min-height: 36px; padding: 0 12px; border-color: transparent; background: none; }
}

/* A theme: the pain, the answer, one sentence, a stage, the cards. */
.feat-main .theme { scroll-margin-top: 72px; }
.theme .pain { color: var(--text2); font-size: var(--lead); line-height: 1.4; }
.theme h2 { margin-top: var(--s3); }
.theme .how { margin-top: var(--s3); max-width: var(--measure); }
.theme .stagetabs { margin-top: var(--s5); }
.theme .cards { margin-top: var(--s5); }

/* The card grid: three columns, two on a tablet, one on a phone. Cards in a row share a height. */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.cards .card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: var(--s4); }
.cards .card[hidden] { display: none; }
.cards .card h3 { font-size: 16px; line-height: 22px; }
.cards .card p { font-size: 14px; line-height: 21px; color: var(--text2); }
.cards .card .who { margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.02em; color: var(--text3); }
/* The sentence takes the spare height, so a Play control, a link or a command line sits at the foot of every card. */
.cards .card p:not(.who) { flex: 1 0 auto; }
.cards .card .play, .cards .card .more { margin-top: var(--s2); }
.cards .card .code { align-self: stretch; margin-top: var(--s2); }
.cards .card .more { font-size: 14px; font-weight: 500; }
@media (max-width: 1099px) and (min-width: 721px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .cards { grid-template-columns: minmax(0, 1fr); } }

/* The list of limits. */
.theme.not .plain { display: grid; gap: 8px; margin-top: var(--s4); max-width: var(--measure); }
.theme.not .plain li { position: relative; padding-left: 16px; max-width: 68ch; }
.theme.not .plain li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 4px; height: 4px; border-radius: 50%; background: var(--text2); }
