/* /capstone page specifics. Rides on acct.css for cards, buttons, fields, alerts. */

.cap-wrap { max-width: 760px; }

.cap-code-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin: .4rem 0 .6rem;
}
.cap-code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .35rem .7rem;
  border-radius: .5rem;
  background: var(--card-2, rgba(127, 127, 127, .12));
  border: 1px solid var(--line, rgba(127, 127, 127, .25));
  color: var(--brass, #c89b3c);
}

.cap-sub { margin-top: .6rem; }
.cap-sub-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.cap-sub-when { margin-top: .35rem; font-size: .85em; }

/* «تسليماتي»: Part 1 flags and Part 2 PRs, each under its own small heading */
.cap-group + .cap-group { margin-top: 1rem; }
.cap-group-h { margin: .2rem 0 0; font-size: .95rem; color: var(--ink-2, inherit); }
.cap-pr-link { font-weight: 600; }
.cap-pr-eg { overflow-wrap: anywhere; }   /* the example PR URL must wrap on a phone */

.cap-badge {
  display: inline-block;
  font-size: .8em;
  font-weight: 600;
  padding: .15rem .55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.cap-badge.is-ok   { background: rgba( 70, 160,  90, .16); color: #3fae63; border-color: rgba(70,160,90,.35); }
.cap-badge.is-warn { background: rgba(200, 150,  40, .16); color: #c89b3c; border-color: rgba(200,150,40,.35); }
.cap-badge.is-bad  { background: rgba(200,  70,  70, .16); color: #d66; border-color: rgba(200,70,70,.35); }
.cap-badge.is-muted{ background: rgba(127,127,127,.14); color: var(--muted, #888); }

.cap-flagdot { font-size: .82em; }
.cap-flagdot.is-ok { color: #3fae63; }
.cap-flagdot.is-no { color: var(--muted, #888); }

.cap-hint { margin-top: .4rem; font-size: .88em; line-height: 1.7; }

input[type="file"].acct-input { padding: .45rem .5rem; }

.cap-banner {
  margin: 0 0 1rem;
  padding: .8rem 1rem;
  border-radius: .6rem;
  border: 1px solid rgba(200, 150, 40, .4);
  background: rgba(200, 150, 40, .1);
  line-height: 1.8;
}
.cap-banner b { color: var(--brass, #c89b3c); }

.cap-coupon { margin-bottom: 1rem; border-color: rgba(70, 160, 90, .4); }
.cap-coupon h3 { margin-top: 0; color: #3fae63; }

.cap-poc h3 { margin: 1rem 0 .4rem; }
.cap-guide { margin: .4rem 0; padding-inline-start: 1.2rem; line-height: 1.9; }
.cap-guide li { margin-bottom: .45rem; }
.cap-disc {
  margin-top: .8rem;
  padding: .7rem .9rem;
  border-radius: .5rem;
  border: 1px dashed var(--line, rgba(127, 127, 127, .35));
  background: var(--card-2, rgba(127, 127, 127, .08));
  line-height: 1.9;
  font-size: .95em;
}

/* ──────────────── 50% video bonus: the Winter Arc-style promo ────────────────
   Same shape as .pg-enroll .en-hero-promo (bordered band + solid pill), in the Red
   Team colour so it matches the capstone strip on the landing page, the c0 map tag
   and the /course/c0 and /chapter/ctf banners. The pill is a deeper red (#A8443A)
   so its white text clears 4.5:1; the link is pulled toward --ink for the same
   reason, since the bare track colour reads about 4:1 on the tint. */
.pg-capstone .cap-promo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 16px 0 4px; padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--t-foundation, #C4564A) 42%, var(--rule, rgba(127,127,127,.35)));
  background: color-mix(in srgb, var(--t-foundation, #C4564A) 11%, var(--surface, transparent));
  color: var(--ink-2, inherit);
  font-size: 15px; line-height: 1.7;
}
.pg-capstone .cap-promo b { color: var(--ink, inherit); }
.pg-capstone .cap-promo-tx { min-width: 0; flex: 1 1 260px; }
.pg-capstone .cap-promo-link {
  font-weight: 600; white-space: nowrap; text-decoration: none;
  color: color-mix(in srgb, var(--t-foundation, #C4564A) 70%, var(--ink, #DEE4EC));
}
.pg-capstone .cap-promo-link:hover { text-decoration: underline; }

.pg-capstone .cap-promo-pill {
  align-self: center; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; line-height: 1.4;
  padding: 4px 11px; border-radius: 20px;
  color: #fff; background: #A8443A;
}
.pg-capstone .cap-promo-pill .ico {
  flex: none; width: 15px; height: 15px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.pg-capstone .cap-promo-pill-h {
  vertical-align: middle; margin-inline-end: .5rem; font-size: 11.5px;
}

/* step 3 before it can be used: signed out, or signed in but not started yet */
.pg-capstone .cap-lock { border-style: dashed; }
.pg-capstone .cap-lock p { margin-top: 0; }

/* ──────────────── capstone video: click-to-play poster ──────────────── */
.pg-capstone .cap-video-card { padding: 14px; }
.pg-capstone .cap-video {
  position: relative;
  margin-top: .6rem;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line, rgba(127, 127, 127, .25));
}
.pg-capstone .cap-video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.pg-capstone .cap-video-play {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pg-capstone .cap-video-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: .78;
  transition: opacity .2s, transform .3s;
}
.pg-capstone .cap-video-play:hover .cap-video-poster,
.pg-capstone .cap-video-play:focus-visible .cap-video-poster {
  opacity: 1; transform: scale(1.02);
}
.pg-capstone .cap-video-pbtn {
  position: relative;
  width: 68px; height: 68px;
  color: var(--brass, #c89b3c);
  display: inline-flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .55));
}
.pg-capstone .cap-video-pbtn svg {
  width: 100%; height: 100%;
  fill: rgba(14, 17, 22, .78);
  stroke: currentColor; stroke-width: 1.2;
}
.pg-capstone .cap-video-cap {
  position: absolute; left: 12px; bottom: 10px;
  color: #fff; font-size: 13px; font-weight: 600;
  background: rgba(0, 0, 0, .45);
  padding: 3px 10px; border-radius: 999px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .5);
}
.pg-capstone .cap-video.is-on .cap-video-play { display: none; }
.pg-capstone .cap-video.is-on .cap-video-cap { display: none; }
@media (max-width: 600px) {
  .pg-capstone .cap-video-pbtn { width: 56px; height: 56px; }
}
