/*
 * The Opportunities page (/features/opportunities/): the site's own hero, film
 * and FAQ, plus the list drawn with the film's sample data and the five kinds,
 * each a line and a clip. DESIGN.md §9, "The Opportunities
 * page in detail". Linked from that page only, and every selector starts .op-
 * inside main.op-page, so nothing reaches another page.
 */

.op-page {
  /* The app's bad (DESIGN.md §3): a page's lost citations. */
  --op-bad: #c42a52;
}

/* ---------- The film's chapters ---------- */

.op-page .op-chapters {
  width: min(960px, 100%);
}

/* ---------- 01 The list ---------- */

.op-page .op-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 64px;
}

.op-page .op-list-head .lede {
  margin: 0 0 6px;
}

.op-page .op-board {
  position: relative;
  margin-top: 48px;
  overflow: hidden;
  border: 1px solid rgb(17 17 17 / 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow:
    0 1px 2px rgb(17 17 17 / 0.06),
    0 40px 90px -40px rgb(0 30 70 / 0.42);
}

.op-page .op-board-still img {
  display: block;
  width: 100%;
  height: auto;
}

.op-page .op-board-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  padding: 26px 28px 0;
  color: var(--ink);
  font: var(--display-weight) 28px/1.2 var(--display);
  letter-spacing: -0.02em;
}

.op-page .op-board-head b {
  margin-right: -4px;
  font-weight: inherit;
}

.op-page .op-board-head span {
  color: var(--muted);
  font: 400 14px/1 var(--font);
  letter-spacing: 0;
}

.op-page .op-tabs {
  display: flex;
  gap: 2px;
  width: max-content;
  max-width: calc(100% - 56px);
  margin: 20px 28px 0;
  padding: 4px;
  overflow-x: auto;
  border-radius: 999px;
  background: var(--sheet);
  scrollbar-width: none;
}

.op-page .op-tabs::-webkit-scrollbar {
  display: none;
}

.op-page .op-tab {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font: 450 14px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
}

.op-page .op-tab i {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.op-page .op-tab:hover {
  color: var(--ink);
}

.op-page .op-tab[aria-selected="true"] {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.op-page .op-tab:focus-visible,
.op-page .op-row:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.op-page .op-board-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 520px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.op-page .op-rows {
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 0;
  padding: 20px 28px 28px;
  list-style: none;
}

.op-page .op-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 10px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease);
}

.op-page .op-row:hover {
  transform: translateX(2px);
}

.op-page .op-row[aria-pressed="true"] {
  border-color: var(--ink-2);
  background: var(--sheet);
}

.op-page .op-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--sheet-2);
  color: var(--ink-2);
  font: 500 13px/1 var(--font);
}

.op-page .op-mark img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.op-page .op-mark[data-own] {
  background: var(--wash);
  color: var(--brand);
}

.op-page .op-what {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.op-page .op-line {
  overflow: hidden;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.op-page .op-line b {
  color: var(--ink);
  font-weight: 500;
}

.op-page .op-caption {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.op-page .op-end {
  display: grid;
  justify-items: end;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.op-page .op-figure {
  color: var(--ink);
  font: var(--display-weight) 24px/1 var(--display);
}

.op-page .op-figure[data-bad] {
  color: var(--op-bad);
}

.op-page .op-of {
  color: var(--muted);
  font-size: 15px;
}

.op-page .op-unit {
  color: var(--muted);
  font-size: 12px;
}

.op-page .op-vs {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.op-page .op-vs small {
  color: var(--ink-2);
  font-size: 12px;
}

.op-page .op-vs .op-vs-word {
  color: var(--faint);
  font: 500 11px/1 var(--mono);
  text-transform: uppercase;
}

.op-page .op-vs b {
  font: var(--display-weight) 24px/1 var(--display);
}

.op-page .op-vs-you {
  color: var(--brand);
}

.op-page .op-vs-other {
  color: var(--ink);
}

.op-page .op-chev {
  color: var(--faint);
  font-size: 18px;
}

/* The chosen row's proof: at the right, or under the row on a narrow screen. */

.op-page .op-side {
  padding: 28px;
  border-left: 1px solid var(--line);
}

.op-page .op-proof-kind {
  margin: 0;
  color: var(--faint);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.op-page .op-proof-title {
  margin-top: 10px;
  color: var(--ink);
  font: 450 19px/1.35 var(--font);
  letter-spacing: 0;
}

.op-page .op-proof-line {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.5;
}

.op-page .op-proof-facts {
  margin: 22px 0 0;
}

.op-page .op-proof-facts div {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.op-page .op-proof-facts dt {
  color: var(--muted);
  font-size: 13px;
}

.op-page .op-proof-facts dd {
  margin: 4px 0 0;
  color: var(--body);
  font-size: 15px;
  line-height: 1.5;
}

.op-page .op-proof.is-new {
  animation: op-fade 0.16s var(--ease);
}

.op-page .op-rows.is-rising .op-item {
  animation: op-rise 0.36s var(--ease) both;
  animation-delay: calc(var(--i) * 40ms);
}

@keyframes op-fade {
  from {
    opacity: 0;
  }
}

@keyframes op-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- 02 to 06 The kinds: one line, a few ticks, and a big clip ---------- */

/* The copy is short, so the clip takes the room and the copy sits at its middle. */
@media (min-width: 1100.02px) {
  .op-page .op-part {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.6fr);
    gap: 56px;
  }

  .op-page .op-part.is-flip {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.72fr);
  }
}

.op-page .op-part h2 {
  margin-top: 4px;
}

.op-page .op-lede {
  max-width: 400px;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.55;
}

.op-page .op-watch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
}

.op-page .op-watch i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--ink);
}

.op-page .op-watch i::after {
  margin-left: 2px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #fff;
  content: "";
}

.op-page .op-watch small {
  color: var(--muted);
  font-size: 13px;
}

.op-page .op-watch:hover {
  color: var(--brand);
}

/* Each kind's clip of today's drawer, 16:10 like the clips themselves. */
.op-page .op-clip {
  border-radius: 14px;
}

.op-page .op-clip video {
  aspect-ratio: 1600 / 1000;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .op-page .op-rows.is-rising .op-item,
  .op-page .op-proof.is-new {
    animation: none;
  }

  .op-page .op-row {
    transition: none;
  }

  .op-page .op-row:hover {
    transform: none;
  }
}

/* ---------- Narrower screens ---------- */

/* The same width as the script's (min-width: 1000px), which moves the proof. */
@media (max-width: 999.98px) {
  .op-page .op-board-body {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .op-page .op-side {
    display: none;
  }

  .op-page .op-item.is-on .op-proof {
    margin: 4px 0 6px;
    padding: 18px 18px 4px;
    border-radius: 14px;
    background: var(--sheet);
  }
}

@media (max-width: 960px) {
  .op-page .op-list-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .op-page .op-list-head .lede {
    margin-top: 20px;
  }
}

@media (max-width: 640px) {
  .op-page .op-board {
    margin-top: 32px;
    border-radius: 16px;
  }

  .op-page .op-board-head {
    padding: 20px 16px 0;
    font-size: 24px;
  }

  .op-page .op-tabs {
    max-width: calc(100% - 32px);
    margin: 16px 16px 0;
  }

  .op-page .op-rows {
    padding: 14px 12px 16px;
  }

  .op-page .op-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px;
  }

  .op-page .op-chev {
    display: none;
  }

  .op-page .op-line {
    font-size: 14.5px;
  }

  .op-page .op-figure,
  .op-page .op-vs b {
    font-size: 21px;
  }
}

@media (max-width: 420px) {
  .op-page .op-vs .op-vs-name,
  .op-page .op-vs .op-vs-who {
    display: none;
  }
}
