/* ══════════════════════════════════════════════════════════════════════
   css/course-published.css — "Your course is live" (js/course-published.js)

   Drawn from the approved board "After Publish" (G60, 15 Oct 2026), rule for
   rule: its app mock was built on the course home's tokens (funnel-home.css),
   so the fallbacks here are the same values. Scoped under `.cp`.
   ══════════════════════════════════════════════════════════════════════ */

.cp {
  --cp-s: var(--surface, #ffffff); --cp-s2: #faf9f4; --cp-s3: #f1eee5;
  --cp-bd: var(--border, #e8e4d8); --cp-bd2: #d8d3c2;
  --cp-tx: var(--text, #15172b); --cp-tx2: var(--text-2, #4d5168); --cp-tx3: var(--text-3, #8a8fa6);
  --cp-ac: var(--accent, #6a4cf1); --cp-acd: #4a32b8; --cp-acs: #efeaff;
  --cp-ok: #1f8a5b; --cp-oks: #e3f4ec; --cp-wn: #a4660f; --cp-wns: #fbf0dc;
  --cp-display: "Bricolage Grotesque", Inter, ui-sans-serif, system-ui, sans-serif;
  --cp-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--cp-tx); text-align: left;
  display: flex; flex-direction: column; gap: 16px;
}
.cp *, .cp-sheet * { box-sizing: border-box; }
.cp h2, .cp h3 { margin: 0; font-family: var(--cp-display); letter-spacing: -.01em; text-wrap: balance; }
.cp button { font: inherit; cursor: pointer; }
.cp button:focus-visible, .cp a:focus-visible { outline: 2px solid var(--cp-ac); outline-offset: 2px; }
.cp p { margin: 0; }

/* ── the moment ── */
.cp-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; row-gap: 10px;
  /* The words sit level with the middle of the picture: a growing row above and below them. */
  grid-template-rows: 1fr auto auto auto auto auto 1fr;
  grid-template-areas: ". pic" "eb pic" "h pic" "sub pic" "addr pic" "acts pic" ". pic";
  align-items: start;
  background: var(--cp-s); border: 1px solid var(--cp-bd); border-radius: 14px; padding: 22px;
}
.cp-eb { grid-area: eb; font-family: var(--cp-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--cp-tx3); }
.cp-h { grid-area: h; font-weight: 700; font-size: 30px; line-height: 1.15; }
.cp-sub { grid-area: sub; color: var(--cp-tx2); }
.cp-hero > .cp-addr { grid-area: addr; justify-self: start; }
.cp-hero > .cp-acts { grid-area: acts; margin-top: 6px; }
.cp-hero > .cp-pic { grid-area: pic; align-self: center; }

.cp-addr { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0;
  font-family: var(--cp-mono); font-size: 12px; color: var(--cp-tx2);
  background: var(--cp-s3); border: 1px solid var(--cp-bd); border-radius: 8px; padding: 3px 4px 3px 9px; }
.cp-addr-u { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cp-addr button, .cp-addr a { flex: none; border: 0; background: var(--cp-s); border-radius: 6px; padding: 2px 8px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 12px; font-weight: 600; color: var(--cp-acd); text-decoration: none; white-space: nowrap; }
.cp-addr button:hover, .cp-addr a:hover { background: var(--cp-acs); }

.cp-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; padding: 8px 14px;
  font-weight: 600; font-size: 13.5px; border: 1px solid var(--cp-bd2); background: var(--cp-s); color: var(--cp-tx);
  white-space: nowrap; text-decoration: none; min-height: 36px; }
.cp-btn:hover { border-color: var(--cp-tx3); }
.cp-btn.big { padding: 11px 20px; font-size: 15px; min-height: 44px; }
.cp-btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; min-height: 30px; }
.cp-btn.dark { background: var(--cp-tx); border-color: var(--cp-tx); color: #fff; }
.cp-btn.dark:hover { background: #2a2d45; }
.cp-btn.pri { background: var(--cp-ac); border-color: var(--cp-ac); color: #fff; }
.cp-btn.pri:hover { background: var(--cp-acd); border-color: var(--cp-acd); }
.cp-btn.ghost { border-color: transparent; background: transparent; color: var(--cp-acd); }
.cp-btn.ghost:hover { background: var(--cp-acs); }
.cp-link { border: 0; background: none; padding: 0; color: var(--cp-acd); font-weight: 600; font-size: 12.5px;
  text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

/* ── the picture of the real page: a computer, a phone beside it ── */
.cp-pic { position: relative; padding: 0 26px 18px 0; min-width: 0; }
.cp-brow { border: 1px solid var(--cp-bd2); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(21,23,43,.14); }
.cp-bar { display: flex; align-items: center; gap: 5px; padding: 6px 8px; background: var(--cp-s3); border-bottom: 1px solid var(--cp-bd); }
.cp-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--cp-bd2); flex: none; }
.cp-bar span { flex: 1; min-width: 0; margin-left: 6px; background: #fff; border-radius: 6px; font-family: var(--cp-mono); font-size: 10px;
  color: var(--cp-tx2); padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-shot { position: relative; overflow: hidden; background: var(--cp-s2); }
.cp-shot .ccw-frame-wrap { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.cp-shot iframe { pointer-events: none; transform-origin: 0 0; border: 0; }
.cp-shot-d { min-height: 200px; }
.cp-phone { position: absolute; right: 0; bottom: 0; width: 27%; min-width: 74px; border: 3px solid #15172b; border-radius: 14px;
  overflow: hidden; background: #fff; box-shadow: 0 10px 24px rgba(21,23,43,.25); }
.cp-shot-m { min-height: 120px; }
.cp-pic-link { position: absolute; inset: 0; z-index: 2; border-radius: 10px; }
.cp-pic-link:focus-visible { outline: 2px solid var(--cp-ac); outline-offset: 2px; }
.cp-pic-wait .cp-shot { background: linear-gradient(180deg, var(--cp-s3), var(--cp-s2)); }
.cp-pic-none { display: none !important; }
.cp-pic-flat { padding: 0; }

/* ── confetti: a short burst, once; none with reduced motion ── */
.cp-conf { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.cp-conf i { position: absolute; top: -12px; width: 7px; height: 11px; border-radius: 2px; opacity: .9; animation: cpfall 1.8s ease-in 1 forwards; }
@keyframes cpfall { to { transform: translateY(300px) rotate(320deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cp-conf { display: none; } }

/* ── below the moment ── */
.cp-loading { color: var(--cp-tx3); font-size: 13px; margin: 0; padding: 4px 2px; }
.cp-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cp-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cp-card { background: var(--cp-s); border: 1px solid var(--cp-bd); border-radius: 14px; min-width: 0; overflow: hidden; }
.cp-ch { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--cp-bd); flex-wrap: wrap; }
.cp-ch h3 { font-size: 16px; }
.cp-ch small { color: var(--cp-tx3); font-size: 12.5px; }
.cp-cb { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }

.cp-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 16px; border-top: 1px solid var(--cp-bd); }
.cp-row:first-child { border-top: 0; }
.cp-row.wn { background: #fffaf0; }
.cp-row-b b { display: block; font-weight: 600; }
.cp-row-b small { display: block; color: var(--cp-tx2); font-size: 12.5px; overflow-wrap: anywhere; }
.cp-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.cp-ic.ok { background: var(--cp-oks); color: var(--cp-ok); }
.cp-ic.wn { background: var(--cp-wns); color: var(--cp-wn); }
.cp-ic.off { background: var(--cp-s3); color: var(--cp-tx3); }
.cp-warn { margin-top: 6px; background: var(--cp-wns); color: #6b420a; border-radius: 8px; padding: 7px 9px; font-size: 12.5px; }
.cp-warn b { display: inline; }
.cp-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.cp-chip { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 8px; background: var(--cp-s3); color: var(--cp-tx3); }
.cp-chip.on { background: var(--cp-oks); color: var(--cp-ok); }
.cp-where { font-size: 11.5px; color: var(--cp-tx3); white-space: nowrap; text-align: right; }
.cp-where .cp-link { display: block; margin-left: auto; }
.cp-more { display: none; width: 100%; justify-content: space-between; align-items: center; padding: 10px 16px; border: 0; border-top: 1px solid var(--cp-bd);
  background: none; color: var(--cp-acd); font-weight: 600; font-size: 13px; }

.cp-next { background: var(--cp-acs); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cp-next > b { font-size: 15px; }
.cp-next > span { font-size: 13px; color: var(--cp-tx2); }
.cp-share { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-cb > .cp-addr { align-self: flex-start; }

.cp-sticky { display: none; }

/* ── the course home's sheets ── */
.fh-overlay .fh-sheet.cp-sheet { max-width: 540px; max-height: calc(100vh - 32px); overflow: auto; position: relative; }
.cp-in-sheet { gap: 12px; }
.cp-in-sheet .cp-pic { padding: 0; }
.cp-in-sheet .cp-addr { align-self: flex-start; }
.cp-whatslive .cp-wl { display: inline-flex; gap: 6px; font-size: 13px; }
.cp-whatslive .cp-wl-rows { display: none; margin-top: 8px; border: 1px solid var(--cp-bd); border-radius: 12px; overflow: hidden; }
.cp-whatslive.cp-open .cp-wl-rows { display: block; }
.cp-sheet-ft .fh-btn { min-height: 40px; }

/* ── a narrow column (and a phone): one column ── */
@media (max-width: 900px) {
  .cp-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .cp-hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "eb" "h" "pic" "sub" "addr" "acts"; padding: 14px; }
  .cp-h { font-size: 24px; }
  /* The picture is the page as a phone shows it: the phone alone, centred. */
  .cp-screen .cp-hero .cp-pic { padding: 0; justify-self: center; width: 62%; max-width: 230px; }
  .cp-screen .cp-hero .cp-brow { display: none; }
  .cp-screen .cp-hero .cp-phone { position: static; width: 100%; border-radius: 16px; }
  .cp-screen .cp-hero .cp-shot-m { min-height: 260px; }
  .cp-screen .cp-hero > .cp-acts { display: none; }
  .cp-row { grid-template-columns: 26px minmax(0, 1fr); padding: 10px 14px; }
  .cp-where { grid-column: 2; text-align: left; display: flex; gap: 6px; align-items: baseline; }
  .cp-where .cp-link { display: inline; margin: 0; }
  .cp-ch, .cp-cb { padding-left: 14px; padding-right: 14px; }
  /* Four parts, the amber one always among them; "See all" opens the rest in place. */
  .cp [data-cp-summary] .cp-row.cp-fold { display: none; }
  .cp [data-cp-summary].cp-open .cp-row.cp-fold { display: grid; }
  .cp [data-cp-summary] .cp-more { display: flex; }
  /* The two buttons stay on screen while scrolling, so the way out is one tap. */
  .cp-sticky { display: flex; gap: 8px; position: sticky; bottom: 0; z-index: 4; margin: 0 -2px; padding: 10px 2px;
    background: var(--cp-s); border-top: 1px solid var(--cp-bd); }
  .cp-sticky .cp-btn { flex: 1 1 0; min-width: 0; white-space: normal; text-align: center; min-height: 44px; }
  .cp-sticky [data-cp-overview] { order: 0; }
  .cp-sticky [data-cp-view] { order: 1; }
}
