/* Shared shell for the four /guides pages (design pass, 2026-12-01). Loaded last on every page so the four guides read
   as one set: the same header and tabs, the same video frame, the same spacing around the reading column. Only the
   shell lives here; each page keeps its own article styles (article-pages.css, withdrawal-access.css). */
.rh-article {
  --shell-ink: #14201c; --shell-deep: #14533f; --shell-rule: #e3e8e6; --shell-paper: #f3eee6;
}

/* Header: logo left, the four guides as tabs right; centred on phones */
body.rh-article > :is(header.mast, header) {
  max-width: none; margin: 0; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 20px; padding: 12px clamp(16px, 4vw, 48px);
  background: #fff; border-bottom: 1px solid var(--shell-rule);
}
body.rh-article > :is(header.mast, header) nav { display: flex; flex-wrap: wrap; gap: 6px; font-size: 1rem; }
body.rh-article > :is(header.mast, header) nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px;
  border: 1px solid var(--shell-rule); border-radius: 999px; background: #fff;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--shell-ink); text-decoration: none; white-space: nowrap;
}
body.rh-article > :is(header.mast, header) nav a:hover { border-color: var(--shell-deep); color: var(--shell-deep); }
body.rh-article > :is(header.mast, header) nav a[aria-current="page"] { background: var(--shell-deep); border-color: var(--shell-deep); color: #fff; }

/* The video: one frame for all four films (the film's own paper colour behind it while it loads) */
.rh-article figure.video video {
  display: block; width: 100%; background: var(--shell-paper); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(20, 32, 28, .12), 0 18px 40px -22px rgba(20, 32, 28, .5);
}
.rh-article figure.video video::cue { font-weight: 600; color: #fff; background-color: rgba(17, 73, 68, .92); }

/* Market drops: room between the opening chart and the reading column with its "In this guide" list */
body.page-market.video-guide .layout { margin-top: clamp(32px, 5vw, 56px); }

/* Phones: one row of tabs that scrolls sideways (guides.js keeps the current guide in view), not two wrapped rows */
@media (max-width: 780px) {
  body.rh-article > :is(header.mast, header) { display: flex; justify-content: center; text-align: center; padding: 10px 16px 8px; }
  body.rh-article > :is(header.mast, header) .brand { width: 100%; display: flex; justify-content: center; }
  body.rh-article > :is(header.mast, header) nav {
    width: 100%; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin: 2px 0 0; padding: 2px 0 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  body.rh-article > :is(header.mast, header) nav::-webkit-scrollbar { display: none; }
  body.rh-article > :is(header.mast, header) nav a { flex: 0 0 auto; min-height: 44px; padding: 4px 13px; font-size: 14.5px; }
  body.rh-article > :is(header.mast, header) nav a:first-child { margin-left: auto; }   /* centred when the tabs fit, scrollable when not */
  body.rh-article > :is(header.mast, header) nav a:last-child { margin-right: auto; }
  .rh-article figure.video video { border-radius: 10px; }
}

/* Phones held upright play the portrait cut (<source media>): the player takes that shape */
@media (max-width: 700px) and (orientation: portrait) {
  .rh-article figure.video video {
    aspect-ratio: 9 / 16; width: auto; max-width: 100%; height: min(82vh, calc((100vw - 32px) * 16 / 9)); margin: 0 auto;
  }
}
