/* The Capitol Bridge video page, in the colors of the video's title card. */
:root {
  color-scheme: dark;
  --bg: #18212c;
  --ink: #f4f7fb;
  --muted: #b7c3d1;
  --rule: #2a3645;
  --pad-x: clamp(16px, 3vw, 40px);
  --pad-y: 24px;
  --gap: 20px;
  /* Height the page needs besides the video: top and bottom padding, the
     header row (56px) and the gap under it, plus a little room to spare. */
  --chrome: calc(2 * var(--pad-y) + 56px + var(--gap) + 8px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

/* The page is as wide as the largest 16:9 video that fits the window's height,
   so the whole video and its controls show without scrolling on any screen. */
main {
  width: min(100%, calc((100vh - var(--chrome)) * 16 / 9 + 2 * var(--pad-x)));
  width: min(100%, calc((100svh - var(--chrome)) * 16 / 9 + 2 * var(--pad-x)));
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}

/* The wordmark and the title share one row, leaving the height to the video. */
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.wordmark {
  display: block;
  width: auto;
  height: 28px;
}

.title {
  flex: 1 1 260px;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}

/* On a phone the title sits under the wordmark, without the divider. */
@media (max-width: 560px) {
  .title {
    padding-left: 0;
    border-left: 0;
  }
}

h1 {
  margin: 0;
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  line-height: 1.2;
}

.lede {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 15px;
}

video {
  display: block;
  width: 100%;
  height: auto;
  margin-top: var(--gap);
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #000;
}
