/* How-To Videos (W-071): the library by topic and the pop-up player. Its own colours on its own sheet inside the site's frame,
   light and dark (the reader's system setting), the site's navy and gold; one column on a phone. Loaded by howto.php only. */
.howto, .howto-pop {
  --ht-bg: #ffffff; --ht-ink: #1d2330; --ht-muted: #667085; --ht-line: #d9dee7; --ht-head: #0b2350; --ht-head-ink: #f3dfae;
  --ht-row: #f7f8fb; --ht-link: #1d4f91; --ht-gold: #d9a441; --ht-num-ink: #03132d; --ht-red: #a8181a;
}
@media (prefers-color-scheme: dark) {
  .howto, .howto-pop { --ht-bg: #151a24; --ht-ink: #e6e9f0; --ht-muted: #9aa3b2; --ht-line: #39445a; --ht-head: #0b2350; --ht-head-ink: #f3dfae;
    --ht-row: #1d2431; --ht-link: #9fc3f5; --ht-gold: #d9a441; --ht-num-ink: #03132d; --ht-red: #a8181a; }
}
.howto { background: var(--ht-bg); color: var(--ht-ink); border: 1px solid var(--ht-head); border-radius: 7px; padding: 12px 14px 4px; margin: 0 0 16px; max-width: 980px; }
.howto-lead, .howto-none { margin: 0 0 12px; }
.howto-lead { color: var(--ht-muted); }
.howto-group { border: 1px solid var(--ht-head); border-radius: 7px; margin: 0 0 14px; overflow: hidden; }
.howto-group > h2 { margin: 0; padding: 7px 12px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--ht-head-ink); background: var(--ht-head); border-bottom: 2px solid var(--ht-red); }
.howto-list { list-style: none; margin: 0; padding: 0; }
.howto-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; background: var(--ht-bg); scroll-margin-top: 12px; }
.howto-row:nth-child(even) { background: var(--ht-row); }
.howto-row + .howto-row { border-top: 1px solid var(--ht-line); }
.howto-row:target { box-shadow: inset 3px 0 0 var(--ht-gold); }
.howto-num { flex: 0 0 auto; min-width: 34px; padding: 3px 7px; border-radius: 5px; background: var(--ht-gold); color: var(--ht-num-ink); font-weight: 700; font-size: 14px; line-height: 1.3; text-align: center; font-variant-numeric: tabular-nums; }
.howto-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.howto-line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.howto-title { color: var(--ht-link); font-size: 16px; font-weight: 600; text-decoration: none; }
.howto-title::before { content: "\25B6"; display: inline-block; margin-right: 7px; font-size: 11px; color: var(--ht-gold); vertical-align: 2px; }
.howto-title:hover { text-decoration: underline; }
.howto-title:focus-visible { outline: 2px solid var(--ht-gold); outline-offset: 2px; border-radius: 3px; }
.howto-len { color: var(--ht-muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.howto-blurb { margin: 3px 0 0; font-size: 14px; }
.howto-note { color: var(--ht-muted); font-size: 13px; }

/* the pop-up: 16 : 9, as wide as the window lets it be with its head line above it; the page stays where it is under the dimmed backdrop */
.howto-pop { width: min(1100px, calc(100vw - 32px), calc((100vh - 96px) * 16 / 9)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--ht-gold); border-radius: 8px; background: #03132d; color: #f3dfae; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, .55); }
.howto-pop::backdrop { background: rgba(3, 19, 45, .78); }
.howto-pop-head { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; background: #0b2350; border-bottom: 2px solid var(--ht-red); }
.howto-pop-head h2 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 16px; font-weight: 600; color: #f3dfae; overflow-wrap: anywhere; }
.howto-pop-close { flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border: 1px solid rgba(217, 164, 65, .55); border-radius: 6px; background: transparent; color: #f3dfae; font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.howto-pop-close:hover { background: #16325f; }
.howto-pop-close:focus-visible { outline: 2px solid var(--ht-gold); outline-offset: 1px; }
.howto-pop video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.howto-pop video:focus { outline: none; }

@media (max-width: 760px) {
  .howto { padding: 10px 9px 2px; }
  .howto-row { gap: 9px; padding: 9px 9px; }
  .howto-pop { width: 100vw; margin-left: 0; margin-right: 0; border-left: 0; border-right: 0; border-radius: 0; }
}
