/* Use-case landing pages (public/site/<slug>.html). Loads after site.css; colours, type and space come from tokens.css.
   Reuse from site.css: .band and .plain sections, .narrow, .lede, .cta, .btn, .steps (numbered list), .facts (cards),
   .compare (table that stacks into cards on phones, with data-label on each td), .split with .shot and .device. */

/* Page opening: the h1 and answer, in place of the home page's hero grid. */
.uc-head { padding: var(--space-6) 0 var(--section-y); }
.uc-title { font-family: var(--font-display); font-size: var(--fs-h2); line-height: var(--lh-display); font-weight: var(--fw-display); letter-spacing: var(--tracking-display); text-wrap: balance; margin: 0 0 var(--space-4); max-width: 22ch; }
.uc-head .trust { margin-top: var(--space-3); }

/* Where a claim about another product came from: small, muted, under the paragraph it supports. */
.uc-source { font-size: var(--fs-small); color: var(--text-muted); }

/* "Who this is not for": plain items with a left rule, like .gpt-list but in the text colour. */
.uc-notfor { margin: var(--space-5) 0 0; padding: 0; list-style: none; display: grid; gap: var(--space-4); max-width: var(--measure); }
.uc-notfor li { padding-left: var(--space-4); border-left: 3px solid var(--accent); }
.uc-notfor strong { display: block; }

/* Capture beside a step list: keep a whole capture, not the home page's cropped frame. */
.shot .uc-shot { aspect-ratio: auto; object-fit: initial; }

/* Facts cards followed by a button need room above it. */
.facts + .btn { margin-top: var(--space-2); }

@media (min-width: 960px) {
  .uc-head .lede { max-width: 56ch; }
  .split > .shot { justify-self: end; width: 100%; max-width: 404px; }
}

/* A paragraph straight after a numbered list. */
.steps + p { margin-top: var(--space-5); }

/* ---- the guides (the 11 pages in src/static.mjs GUIDES): the text, and a box for the door the guide is about ----
   The box ({{GUIDE_BOX}}, written once in static.mjs guideBox) holds the door's button, the code to scan from a
   computer, the free daily limit and the price of a pass. On a phone it closes the page, as a card on its own band.
   From 960px the page is two columns: the text on the left, its sections divided by a rule in place of the full-width
   bands, and the box on the right, where it stays in view while the text scrolls. */
.guide__side { padding: var(--section-y) var(--gutter); background: var(--bg-band); }
.sidebox { display: grid; gap: var(--space-4); max-width: 460px; margin: 0 auto; padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.sidebox > * { margin: 0; min-width: 0; }
.sidebox__kind { font-size: var(--fs-caption); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--link); }
.sidebox__kind + .sidebox__title { margin-top: calc(-1 * var(--space-3)); }
.sidebox__title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--fw-heading); letter-spacing: var(--tracking-display); line-height: var(--lh-heading); text-wrap: balance; }
.sidebox .cta { margin: 0; flex-direction: column; flex-wrap: nowrap; gap: var(--space-2); }
.sidebox .btn { width: 100%; padding: 0 var(--space-3); }
/* The code is for a visitor at a computer, so a phone leaves it out. It is scanned as dark on white in both themes. */
.sidebox__scan { display: none; }
.sidebox__scan img { display: block; flex: none; width: 104px; height: 104px; padding: 4px; border-radius: var(--radius-sm); background: #FFFFFF; }
.sidebox__scan p { margin: 0; font-size: var(--fs-caption); line-height: 1.4; color: var(--text-muted); }
.sidebox__note { font-size: var(--fs-small); color: var(--text-muted); }
.sidebox__facts { display: grid; border-top: 1px solid var(--border); }
.sidebox__facts div { display: grid; gap: 2px; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.sidebox__facts dt { font-size: var(--fs-small); font-weight: 700; }
.sidebox__facts dd { margin: 0; font-size: var(--fs-small); line-height: 1.45; color: var(--text-muted); }
.sidebox__more { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); font-size: var(--fs-small); }
.sidebox__more a { display: inline-flex; align-items: center; min-height: 44px; font-weight: var(--fw-strong); }

@media (min-width: 960px) {
  .guide { display: grid; grid-template-columns: minmax(0, 1fr) 348px; column-gap: var(--space-8); align-items: start; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter) var(--space-8); }
  .guide__main > section { padding: var(--space-7) 0; background: none; border-top: 1px solid var(--hairline); }
  .guide__main > .uc-head { padding: var(--space-7) 0; border-top: 0; }
  .guide__main .wrap { max-width: none; padding: 0; }
  .guide__main .uc-title { max-width: 18ch; font-size: clamp(2.25rem, 1.2rem + 2.4vw, 3.25rem); }
  .guide__side { position: sticky; top: calc(var(--header-h) + var(--space-5)); margin-top: var(--space-7); padding: 0; background: none; }
  .sidebox { max-width: none; box-shadow: var(--elev-1); }
  .sidebox__scan { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); background: var(--bg-band); }
}
/* ---- the related links that close a use-case page or a guide ({{RELATED}}, src/static.mjs relatedBlock) ---- */
.related { padding: var(--space-7) 0; border-top: 1px solid var(--hairline); }
.related__title { margin: 0 0 var(--space-2); font-family: var(--font-body); font-size: var(--fs-caption); font-weight: var(--fw-strong); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-muted); }
.related__list { list-style: none; margin: 0; padding: 0; display: grid; justify-items: start; gap: 0 var(--space-7); }
.related__list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: var(--fw-strong); }
.related__list a::after { content: ""; flex: none; width: 7px; height: 7px; margin-left: var(--space-2); border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); }
@media (min-width: 640px) { .related__list { grid-template-columns: repeat(2, minmax(0, max-content)); } }

/* ---- the hubs (/use-cases, /guides and /compare; {{HUB}}, src/static.mjs hubBlock): a group's heading over its
   cards. A card is site.css .use, the page's name as a link over one sentence from that page, and the whole card is
   the link. ---- */
.hub { padding: var(--space-7) 0; }
.hub__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.hub .h2 { font-size: var(--fs-h3); margin-bottom: var(--space-4); }
.uc-head:has(+ .hub) { padding-bottom: var(--space-7); }
.hub .use, .hub .use:nth-child(4) { position: relative; grid-column: auto; transition: border-color var(--dur-1) var(--ease-out); }
.hub .use:hover { border-color: var(--accent); }
.hub__link { font-size: var(--fs-body); font-weight: 700; line-height: 1.3; text-decoration: none; }
.hub .use p { font-size: var(--fs-small); }
.hub__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-md); }
.hub__link:focus-visible { outline: none; }
.hub__link:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.hub-end { padding: var(--space-7) 0 var(--section-y); }
@media (min-width: 640px) { .hub__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .hub__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* A page with the trail above it ({{CRUMBS}}) opens closer to the header. */
.crumbs + main .uc-head { padding-top: var(--space-4); }
@media (min-width: 960px) {
  .crumbs + main .guide__main > .uc-head { padding-top: var(--space-5); }
  .crumbs + main .guide__side { margin-top: var(--space-5); }
}

/* A short window: the box drops its code so the button and the price stay in view. */
@media (min-width: 960px) and (max-height: 760px) { .sidebox__scan { display: none; } }
@media print { .guide__side { position: static; } }
