/* =========================================================
   OpenBQ · Operator pathway page
   Builds on styles.css + training.css. Uses fallbacks so it
   still renders if a site variable isn't defined.
   ========================================================= */
:root {
  --op-brand: var(--brand, #24408E);
  --op-brand-2: #3B5FC4;
  --op-ink: var(--ink, #14213D);
  --op-muted: #5B6578;
  --op-line: #E3E8F2;
  --op-tint: #F4F7FC;
  --op-face: #2E7BD6;
  --op-finger: #1A9C8A;
  --op-iris: #7A4FD0;
  --op-incl: #D9822B;
  --op-radius: 16px;
}

/* new css */

.op-hero { padding-bottom: clamp(48px, 7vw, 88px); }
.op-hero-grid { margin-top: 20px; }
.op-hero-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 35% center; border-radius: 22px; box-shadow: 0 24px 60px rgba(8,16,48,.35); }

.op-steps4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.op-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.op-step__n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--dark-blue); color: #fff; font-family: var(--font-accent); font-weight: 700; margin-bottom: 16px; }
.op-step h3 { margin-bottom: 6px; }
.op-step p { margin: 0; }

.op-tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; margin-bottom: 18px; }
.op-tile h3 { font-size: 1.25rem; margin-bottom: 6px; }
.op-tile p { margin: 0; }

.op-cert { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.op-cert__img { width: 100%; max-width: 380px; justify-self: center; }
.op-facts { list-style: none; margin: 24px 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.op-facts li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.op-facts strong { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--dark-blue); line-height: 1.1; }
.op-facts span { font-size: .92rem; color: var(--text-muted); }

@media (max-width: 1020px) {
  .op-steps4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-cert { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .op-steps4, .op-facts { grid-template-columns: minmax(0, 1fr); }
}

/* keep image ratios (HTML width/height attributes would otherwise fix the height) */
.op-hero-img img, .op-tile img, .op-cert__img img { height: auto; }
.op-hero-img img { object-position: center; }
.op-tile img { object-position: 60% center; }
.op-tile--contain img { object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 8px; }



/* ---------- Hero ---------- */
.op-hero .lead { max-width: 62ch; }
.op-crumbs { display: flex; gap: .5rem; font-size: .9rem; margin-bottom: 1rem; opacity: .85; }
.op-crumbs a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.op-meta { list-style: none; padding: 0; margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.op-meta li {
  padding: .45rem .9rem; border-radius: 999px; font-size: .9rem;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
}
.op-meta strong { font-weight: 700; margin-right: .2rem; }

.section--tint { background: var(--op-tint); }

/* ---------- Outcomes ---------- */
.op-outcomes { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.op-outcome { background: #fff; border: 1px solid var(--op-line); border-radius: var(--op-radius); padding: 1.5rem; }
.op-outcome__n { font-weight: 700; color: var(--op-brand); font-size: .85rem; letter-spacing: .08em; }
.op-outcome h3 { margin: .4rem 0 .5rem; font-size: 1.15rem; }
.op-outcome p { margin: 0; }

/* ---------- Filters ---------- */
.op-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 2rem; }
.op-chip {
  font: inherit; font-size: .92rem; cursor: pointer;
  padding: .5rem 1rem; border-radius: 999px;
  border: 1px solid var(--op-line); background: #fff; color: var(--op-ink);
  transition: background .15s, color .15s, border-color .15s;
}
.op-chip span { opacity: .6; margin-left: .25rem; font-size: .82em; }
.op-chip:hover { border-color: var(--op-brand); }
.op-chip.is-active { background: var(--op-brand); border-color: var(--op-brand); color: #fff; }
.op-chip:focus-visible { outline: 3px solid var(--op-brand-2); outline-offset: 2px; }

/* ---------- Video grid ---------- */
.op-videos { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.op-video[hidden] { display: none; }
.op-video__btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; height: 100%; width: 100%;
  background: #fff; border: 1px solid var(--op-line); border-radius: var(--op-radius); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.op-video__btn:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(20,33,61,.35); }
.op-video__btn:focus-visible { outline: 3px solid var(--op-brand-2); outline-offset: 3px; }

.op-thumb {
  --g1: var(--op-brand); --g2: var(--op-brand-2);
  position: relative; display: block; aspect-ratio: 16 / 9;
  /* poster image sits on top; gradient shows if image is missing */
  background-image: var(--poster, none), radial-gradient(circle at 78% 22%, rgba(255,255,255,.22), transparent 45%), linear-gradient(135deg, var(--g1), var(--g2));
  background-size: cover; background-position: center;
}
.op-thumb--b { --g1: #1D3577; --g2: #4A6FD8; }
.op-thumb--c { --g1: #8A4B12; --g2: var(--op-incl); }
.op-thumb--face { --g1: #1B4F96; --g2: var(--op-face); }
.op-thumb--finger { --g1: #0E5E53; --g2: var(--op-finger); }
.op-thumb--iris { --g1: #4A2B8C; --g2: var(--op-iris); }

.op-thumb__label {
  position: absolute; top: .75rem; left: .75rem; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: rgba(0,0,0,.35); padding: .25rem .6rem; border-radius: 999px; backdrop-filter: blur(4px);
}
.op-thumb__time {
  position: absolute; bottom: .75rem; right: .75rem; font-size: .78rem; font-variant-numeric: tabular-nums;
  color: #fff; background: rgba(0,0,0,.6); padding: .2rem .5rem; border-radius: 6px;
}
.op-play {
  position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--op-brand);
  box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .2s;
}
.op-play svg { width: 24px; height: 24px; fill: currentColor; margin-left: 3px; }
.op-video__btn:hover .op-play { transform: scale(1.1); }

.op-video__body { display: flex; flex-direction: column; gap: .4rem; padding: 1.1rem 1.2rem 1.3rem; }
.op-video__title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--op-ink); }
.op-video__desc { font-size: .92rem; color: var(--op-muted); line-height: 1.5; }

.op-tag {
  align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--op-brand); background: rgba(36,64,142,.08); padding: .2rem .55rem; border-radius: 6px;
}
.op-tag--face { color: var(--op-face); background: rgba(46,123,214,.1); }
.op-tag--finger { color: var(--op-finger); background: rgba(26,156,138,.1); }
.op-tag--iris { color: var(--op-iris); background: rgba(122,79,208,.1); }
.op-tag--incl { color: var(--op-incl); background: rgba(217,130,43,.12); }
.op-empty { text-align: center; padding: 2rem 0; }

/* ---------- Lesson accordion ---------- */
.op-lessons { display: grid; gap: .9rem; max-width: 900px; }
.op-lesson { background: #fff; border: 1px solid var(--op-line); border-radius: var(--op-radius); }
.op-lesson summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem;
}
.op-lesson summary::-webkit-details-marker { display: none; }
.op-lesson summary::after {
  content: ""; margin-left: auto; width: 10px; height: 10px; flex: none;
  border-right: 2px solid var(--op-brand); border-bottom: 2px solid var(--op-brand);
  transform: rotate(45deg); transition: transform .2s;
}
.op-lesson[open] summary::after { transform: rotate(-135deg); }
.op-lesson summary:focus-visible { outline: 3px solid var(--op-brand-2); outline-offset: -3px; border-radius: var(--op-radius); }
.op-lesson__n {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--op-brand); color: #fff; font-weight: 700;
}
.op-lesson__t { font-weight: 700; font-size: 1.08rem; display: flex; flex-direction: column; }
.op-lesson__t small { font-weight: 400; font-size: .85rem; color: var(--op-muted); margin-top: .15rem; }
.op-lesson__body { padding: 0 1.3rem 1.4rem calc(1.3rem + 38px + 1rem); }
.op-lesson__body h4 { margin: 1.1rem 0 .5rem; font-size: 1rem; }
.op-lesson__body p { margin: .5rem 0; line-height: 1.6; }
.op-note {
  margin-top: 1rem; padding: .85rem 1rem; border-radius: 10px;
  background: var(--op-tint); border-left: 4px solid var(--op-brand); font-size: .95rem;
}
.op-steps { padding-left: 1.2rem; line-height: 1.6; }
.op-steps li { margin: .35rem 0; }

/* ---------- Glance table ---------- */
.op-table-wrap { overflow-x: auto; border-radius: var(--op-radius); border: 1px solid var(--op-line); background: #fff; }
.op-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.op-table th, .op-table td { padding: .9rem 1.1rem; text-align: left; border-bottom: 1px solid var(--op-line); vertical-align: top; }
.op-table thead th { background: var(--op-brand); color: #fff; font-weight: 700; }
.op-table tbody th { font-weight: 700; color: var(--op-ink); width: 22%; }
.op-table tbody tr:last-child > * { border-bottom: 0; }

/* ---------- Documents ---------- */
.op-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.op-doc {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.2rem;
  background: #fff; border: 1px solid var(--op-line); border-radius: var(--op-radius);
  transition: border-color .15s, box-shadow .15s;
}
.op-doc:hover { border-color: var(--op-brand); box-shadow: 0 10px 24px -16px rgba(20,33,61,.4); }
.op-doc__type {
  flex: none; width: 48px; height: 58px; border-radius: 6px 14px 6px 6px; display: grid; place-items: center;
  font-size: .72rem; font-weight: 700; color: #fff; background: var(--op-brand);
}
.op-doc__type--face { background: var(--op-face); }
.op-doc__type--finger { background: var(--op-finger); }
.op-doc__type--iris { background: var(--op-iris); }
.op-doc__type--incl { background: var(--op-incl); }
.op-doc__type--web { background: var(--op-ink); }
.op-doc__body { flex: 1; min-width: 0; }
.op-doc__body h3 { margin: 0 0 .3rem; font-size: 1.02rem; }
.op-doc__body p { margin: 0 0 .4rem; font-size: .9rem; }
.op-doc__meta { font-size: .8rem; color: var(--op-muted); }
.op-doc__dl {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--op-brand); border: 1px solid var(--op-line); transition: background .15s, color .15s;
}
.op-doc__dl svg { width: 18px; height: 18px; }
.op-doc__dl:hover, .op-doc__dl:focus-visible { background: var(--op-brand); color: #fff; border-color: var(--op-brand); }

/* ---------- Video modal ---------- */
.op-modal {
  width: min(960px, 94vw); padding: 0; border: 0; border-radius: var(--op-radius);
  background: #0B1224; color: #fff; overflow: hidden;
}
.op-modal::backdrop { background: rgba(8,14,30,.78); backdrop-filter: blur(3px); }
.op-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; }
.op-modal__head h2 { margin: 0; font-size: 1rem; color: #fff; }
.op-modal__close { all: unset; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
.op-modal__close:hover, .op-modal__close:focus-visible { background: rgba(255,255,255,.12); }
.op-modal__close svg { width: 20px; height: 20px; }
.op-modal__media { aspect-ratio: 16 / 9; background: #000; }
.op-modal__media video, .op-modal__media iframe { width: 100%; height: 100%; display: block; border: 0; }
.op-modal__fallback { height: 100%; display: grid; place-items: center; text-align: center; padding: 2rem; color: rgba(255,255,255,.75); }

@media (max-width: 640px) {
  .op-lesson__body { padding-left: 1.3rem; }
  .op-docs { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .op-video__btn, .op-play, .op-lesson summary::after { transition: none; }
}

/* =========================================================
   Carousels (videos + documents)
   ========================================================= */
.op-carousel { position: relative; }
.op-carousel__bar { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; flex-wrap: wrap; margin: 1.25rem 0 1.25rem; }
.op-carousel__bar .op-filters { margin: 0; flex: 1; }
.op-carousel__nav { display: flex; gap: .5rem; margin-left: auto; }
.op-carousel__btn {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  border: 1px solid var(--op-line); background: #fff; color: var(--op-brand);
  transition: background .15s, color .15s, opacity .15s;
}
.op-carousel__btn svg { width: 20px; height: 20px; }
.op-carousel__btn:hover:not(:disabled) { background: var(--op-brand); color: #fff; border-color: var(--op-brand); }
.op-carousel__btn:focus-visible { outline: 3px solid var(--op-brand-2); outline-offset: 2px; }
.op-carousel__btn:disabled { opacity: .35; cursor: default; }

.op-carousel__track {
  display: flex !important; gap: 1.5rem; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  padding: 6px 4px 18px; margin: -6px -4px 0;
}
.op-carousel__track::-webkit-scrollbar { display: none; }
.op-carousel__track:focus-visible { outline: 3px solid var(--op-brand-2); outline-offset: 4px; border-radius: var(--op-radius); }
.op-carousel__track > li { scroll-snap-align: start; flex: 0 0 var(--op-card-w); }

/* cards visible per view */
.op-videos.op-carousel__track { --op-card-w: calc((100% - 3 * 1.5rem) / 4); }
.op-docs.op-carousel__track   { --op-card-w: calc((100% - 2 * 1.5rem) / 3); }
@media (max-width: 1024px) {
  .op-videos.op-carousel__track { --op-card-w: calc((100% - 2 * 1.5rem) / 3); }
  .op-docs.op-carousel__track   { --op-card-w: calc((100% - 1.5rem) / 2); }
}
@media (max-width: 720px) {
  .op-videos.op-carousel__track { --op-card-w: 78%; }
  .op-docs.op-carousel__track   { --op-card-w: 85%; }
  .op-carousel__nav { display: none; }            /* swipe on touch screens */
  .op-carousel__bar .op-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -24px; padding: 2px 24px; }
  .op-carousel__bar .op-filters::-webkit-scrollbar { display: none; }
  .op-chip { white-space: nowrap; flex: none; }
}
@media (prefers-reduced-motion: reduce) { .op-carousel__track { scroll-behavior: auto; } }


