/* Use cases and the product overview: what these pages add to /assets/hub.css and /assets/product/replay.css.
   Load after both. Every selector starts at a class that begins with uc- or pd-, or at these pages' own body. */

/* The engine paints a new canvas white until a saved slate gives it a colour. Here the stage shows through. */
:is([data-hub="use-cases"], [data-hub="product"]) .rp-canvas { background-color: transparent !important }
/* A replay in a card that is one big link: its buttons stay in reach, above the link. */
.hub-card-media > .replay { width: 100% }
.hub-card .rp-controls { position: relative; z-index: 1 }
.hub-card:not(.wide) > .hub-card-media { flex: 1; display: grid; align-items: center }
/* hub.css styles every paragraph in a split or a tab panel as body copy. A replay's own lines are not body copy. */
:is(.hub-split, .hub-tabpanel) .replay p:not(.kicker):not(.plan-chip) { max-width: none; margin-top: 0; color: inherit }
:is(.hub-split, .hub-tabpanel) .replay p.rp-label:not(.kicker):not(.plan-chip) { color: var(--rp-soft) }
:is(.hub-split, .hub-tabpanel) .replay p.rp-note:not(.kicker):not(.plan-chip) { color: #3e5145 }
.hub-section[data-tone="ink"] .replay { color: var(--ink) }

/* Replay proportions. A figure under 720px wide uses the narrow ratio (docs/replay.md). */
.uc-one { --rp-controls-tall: calc(4rem + 1px) }
.uc-views.uc-one { --rp-controls-tall: calc(4rem + 1px) }
.uc-lanes { --rp-ratio: 16 / 11; --rp-ratio-narrow: 16 / 13 }
.uc-map { --rp-ratio: 16 / 10; --rp-ratio-narrow: 5 / 4 }
.uc-wide { --rp-ratio: 16 / 9; --rp-ratio-narrow: 4 / 3 }
@media (max-width: 800px) {
  .uc-views.uc-one { --rp-controls-tall: calc(7.25rem + 1px) }
  .uc-lanes { --rp-ratio-narrow: 1 / 1 }
  .uc-tall { --rp-ratio-narrow: 4 / 5 }
}
@media (prefers-reduced-motion: reduce) {
  .uc-one:not(.uc-views) { --rp-controls-on: 0 }
  .uc-one:not(.uc-views) > .rp-controls { display: none }
}

/* A stage on its own in the middle of a section. */
.uc-center { max-width: 980px; margin-inline: auto }
/* A sentence the product says, set large in a section's words. */
.uc-quote { max-width: none !important; margin-top: 1.6rem !important; padding-top: .9rem; border-top: 1px solid var(--s-line); color: var(--s-ink) !important; font: 700 clamp(1.7rem, 2.7vw, 2.6rem)/1.02 "Archivo Narrow", "Arial Narrow", sans-serif; letter-spacing: -.03em }
.hub-section[data-tone="ink"] .uc-quote { color: #f4ce84 !important }
.uc-quote small { display: block; margin-bottom: .5rem; color: var(--s-soft); font: 600 .75rem/1.4 ui-monospace, Menlo, monospace; letter-spacing: 0 }
.uc-more { display: inline-block; margin-top: 1.4rem; font-weight: 600 }
.uc-fine { max-width: 34rem; margin-top: .8rem; color: var(--s-soft, #506356); font-size: .86rem; line-height: 1.5 }
.hub-points dd { overflow-wrap: anywhere }

/* Scenario pages. */
.uc-route { --rp-ratio: 16 / 8; --rp-ratio-narrow: 5 / 4 }
.uc-lesson { --rp-ratio: 16 / 10; --rp-ratio-narrow: 2 / 3 }
.uc-lesson-walk { --rp-ratio: 16 / 12; --rp-ratio-narrow: 2 / 3 }
@media (min-width: 801px) { .uc-lesson, .uc-lesson-walk { --rp-ratio-narrow: 16 / 13 } }
.hub-split .plan-chip { margin-top: 1.2rem }
.hub-head.center .plan-chip { margin-top: 1rem }
/* A still slate large enough to stand beside a section's words. */
.stage.mini.uc-large { box-shadow: 0 18px 34px -24px #17281f8c }
.stage.mini .stage-foot { padding: .45rem .6rem .5rem }
.hub-split .stage-foot { max-width: none !important; margin-top: 0 !important }

/* ---- The two hubs ---- */
.hub-kicker > .cat-tile { --cat: var(--hub); --cat-deep: var(--hub-deep) }
[data-hub="product"] .hub-kicker > .cat-tile { background: #f7e3ae }
.uc-medley { --rp-ratio: 16 / 10; --rp-ratio-narrow: 2 / 3 }
@media (min-width: 801px) { .uc-medley { --rp-ratio-narrow: 16 / 13 } }
.uc-card-release { --rp-ratio: 16 / 10; --rp-ratio-narrow: 5 / 4 }
.uc-card-handoff { --rp-ratio: 16 / 10; --rp-ratio-narrow: 16 / 11 }
.uc-card-lesson { --rp-ratio: 16 / 11; --rp-ratio-narrow: 16 / 13 }
@media (max-width: 800px) { .uc-card-lesson { --rp-ratio-narrow: 2 / 3 } }
.uc-session { --rp-ratio: 16 / 10; --rp-ratio-narrow: 1 / 1 }
.hub-pin-steps .plan-chip { margin-top: .8rem }
.hub-head a { font-weight: 600 }

/* The product overview: each category card wears its own colour on its tile and behind its canvas. */
.pd-card .hub-card-media { background: color-mix(in srgb, var(--cat) 58%, var(--s-card)) }
.pd-cat { display: flex; align-items: center; gap: .6rem; margin: 0; font: 600 .8rem/1.3 ui-monospace, Menlo, monospace; color: var(--s-ink) !important }
.pd-cat .cat-tile { width: 2.2rem; height: 2.2rem; border-radius: 8px }
.pd-cat .cat-tile svg { width: 1.5rem; height: 1.5rem }
.pd-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem }
.pd-chips .plan-chip { margin: 0 }
.pd-code { margin: 0 0 .8rem; padding: .8rem .9rem; overflow-x: auto; border-radius: 8px; background: #1b3128; color: #f3f1e4; font: 500 .8rem/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere }
.hub-tabpanel .pd-code { margin: 1.1rem 0 0; border: 1px solid #4d6759 }
.pd-hero { --rp-ratio: 16 / 9; --rp-ratio-narrow: 3 / 5 }
.pd-card-draw { --rp-ratio: 16 / 9; --rp-ratio-narrow: 16 / 11 }
.pd-card-present { --rp-ratio: 16 / 9; --rp-ratio-narrow: 4 / 3 }
.pd-tab { --rp-ratio: 16 / 10; --rp-ratio-narrow: 1 / 1 }
/* A still slate that takes the height its card's row gives it. */
@media (min-width: 801px) {
  .hub-card:not(.wide) > .hub-card-media:has(> .pd-fill) { align-items: stretch }
  .pd-fill { display: flex; flex-direction: column }
  .stage.mini.pd-fill .stage-body { flex: 1; aspect-ratio: auto; min-height: 260px }
}
.hub-tabpanel .pd-cat { margin-bottom: .9rem }
.hub-tabpanel .pd-chips { margin-top: 1.1rem }
.hub-section[data-tone="ink"] .pd-cat { color: #faf9f1 !important }
.hub-tabpanel > div > p:not(.kicker):not(.plan-chip) { max-width: 42ch }
.hub-card:not(.wide) > .hub-card-media:has(> .pd-code) { align-content: center }
/* A square drawing keeps its own shape on a phone, so its notes stay readable. */
@media (max-width: 800px) { .stage.mini.pd-square .stage-body { aspect-ratio: 572 / 600 } }
