.peak-gate__card { max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid #e8e5dd; border-radius: 12px; padding: 32px; box-shadow: 0 10px 30px rgba(13,27,61,.06); }
.peak-gate__card h2 { font-size: 1.5rem; font-weight: 700; color: #0d1b3d; margin: 6px 0 12px; line-height: 1.25; }
.peak-gate__card p { color: #5a6478; margin: 0 0 16px; }
.peak-gate__card form p { margin-bottom: 14px; }
.peak-gate__card label { display: block; font-weight: 600; font-size: 14px; color: #0d1b3d; margin-bottom: 6px; }
.peak-gate__card input[type="text"], .peak-gate__card input[type="password"] { width: 100%; padding: 11px 13px; border: 1px solid #d9d6cd; border-radius: 6px; font: inherit; box-sizing: border-box; }
.peak-gate__card .login-remember label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; color: #5a6478; }
.peak-gate__card input[type="submit"] { width: 100%; padding: 13px; border: 0; border-radius: 6px; background: #f29040; color: #0d1b3d; font: inherit; font-weight: 600; cursor: pointer; }
.peak-gate__card input[type="submit"]:hover { background: #d97a2c; }
.peak-gate__small { font-size: 14px; }
.peak-gate__small a { color: #5a8a9a; text-decoration: underline; }

/* ---------- My Programs ---------- */
.peak-hub__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.peak-hub__head h2 { font-size: 1.75rem; color: #0d1b3d; margin: 0 0 4px; }
.peak-hub__meta { color: #5a6478; margin: 0; }
.peak-hub__notice { background: #fff4ea; border: 1px solid #f29040; border-radius: 10px; padding: 16px 20px; margin-bottom: 24px; color: #0d1b3d; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.peak-hub__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.peak-hub__card { background: #fff; border: 1px solid #e8e5dd; border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 10px 30px rgba(13,27,61,.05); scroll-margin-top: 110px; }
.peak-hub__card.is-owned { border-top: 4px solid #f29040; }
.peak-hub__card.is-locked { background: #f7f8fa; box-shadow: none; }
.peak-hub__card.is-locked h3, .peak-hub__card.is-locked p { color: #6b7385; }
.peak-hub__card:target { outline: 3px solid #5a8a9a; outline-offset: 2px; }
.peak-hub__card-top { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.peak-hub__badge { width: 52px; height: 52px; flex: none; }
.peak-hub__card.is-locked .peak-hub__badge { filter: grayscale(1); opacity: .55; }
.peak-hub__status { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5a8a9a; }
.peak-hub__card.is-owned .peak-hub__status { color: #c96f20; }
.peak-hub__card h3 { font-size: 1.2rem; color: #0d1b3d; margin: 2px 0 0; line-height: 1.25; }
.peak-hub__card p { color: #5a6478; margin: 0 0 12px; }
.peak-hub__pages { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid #eee; }
.peak-hub__pages li { border-bottom: 1px solid #eee; }
.peak-hub__pages a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; color: #0d1b3d; font-weight: 600; text-decoration: none; }
.peak-hub__pages a:hover { color: #c96f20; }
.peak-hub__pages a span { color: #f29040; }
.peak-hub__empty { font-size: 14px; font-style: italic; }
.peak-hub__actions { margin-top: auto !important; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.peak-hub__more, .peak-strip__link, .peak-hub__foot a { color: #3f6f7f; font-weight: 600; }
.peak-hub__foot { margin-top: 32px; color: #5a6478; font-size: 15px; }

/* ---------- Member strip on product pages ---------- */
.peak-strip { background: #eef3f5; border-bottom: 1px solid #d6e2e7; }
.peak-strip__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; color: #0d1b3d; font-weight: 600; }
.peak-strip__btns { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.peak-strip .pk-btn { padding: 10px 18px; font-size: 15px; }
@media (max-width: 640px) { .peak-hub__grid { grid-template-columns: 1fr; } .peak-strip__inner { flex-direction: column; align-items: flex-start; } }

/* ---------- SafetyNET Courses ---------- */
.peak-sn { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px 32px; }
.peak-sn__group { background: #fff; border: 1px solid #e8e5dd; border-top: 4px solid #f29040; border-radius: 12px; padding: 22px 24px; }
.peak-sn__group h2 { font-size: 1.2rem; color: #0d1b3d; margin: 0 0 10px; }
.peak-sn__pages { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid #eee; }
.peak-sn__pages li { border-bottom: 1px solid #eee; padding: 0; }
.peak-sn__pages a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; color: #0d1b3d; font-weight: 600; text-decoration: none; }
.peak-sn__pages a:hover { color: #c96f20; }
.peak-sn__pages a span { color: #f29040; flex-shrink: 0; }
.peak-sn__roman { display: block; margin-top: 10px; font-size: 2.6rem; line-height: 1; font-weight: 600; color: #c5c9d1; letter-spacing: 0.02em; }
.peak-sn__empty { color: #5a6478; margin: 0; }
.peak-sn-course__wrap { max-width: 920px; margin: 0 auto; }
.peak-sn-course__back { display: inline-flex; margin-bottom: 16px; font-weight: 600; color: #0d1b3d; text-decoration: none; }
.peak-sn-course__back:hover { color: #c96f20; }
.peak-sn-course__note { background: #eef3f5; border: 1px solid #d6e2e7; border-radius: 10px; padding: 14px 16px; margin: 0 0 20px; color: #5a6478; font-size: 0.95rem; }

/* SafetyNET AI Tutor — WP two-column shell */
.bb-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.85);z-index:9999;align-items:center;justify-content:center;}
.bb-overlay:target,.bb-overlay.is-open{display:flex;}
.bb-overlay img{max-width:90%;max-height:90vh;border-radius:6px;box-shadow:0 4px 24px rgba(0,0,0,0.5);cursor:zoom-out;}

.pk-site--sn-tutor .pk-nav,
.pk-site--sn-tutor .pk-footer { display: none !important; }
.pk-site--sn-tutor .pk-main { padding: 0; min-height: 100vh; }

.sn-tutor { min-height: 100vh; background: #f4f6f8; display: flex; flex-direction: column; }
.sn-tutor__topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid #e2e8ee;
  position: sticky; top: 0; z-index: 20;
}
.sn-tutor__topbar--orange {
  background: #f5921e; border-bottom: 1px solid #e07f12; color: #fff;
}
.sn-tutor__topbar--orange .sn-tutor__lesson-title { color: #fff; }
.sn-tutor__topbar--orange .sn-tutor__home {
  background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.35); color: #fff;
}
.sn-tutor__topbar--orange .sn-tutor__home:hover { background: rgba(255,255,255,0.3); border-color: #fff; color: #fff; }
.sn-tutor__topbar--orange .sn-tutor__tool {
  background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); color: #fff;
}
.sn-tutor__topbar--orange .sn-tutor__tool:hover,
.sn-tutor__topbar--orange .sn-tutor__tool.is-on {
  background: #fff; color: #c96f20; border-color: #fff;
}
.sn-tutor__topbar--orange .sn-tutor__tool--reset { color: #fff; font-weight: 700; }
.sn-tutor__topbar--orange .sn-tutor__tool--reset:hover { color: #c96f20; }
.sn-tutor__home {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid #dde4ea;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; color: #1e3d47; font-size: 18px; background: #fff;
}
.sn-tutor__home:hover { border-color: #f5921e; color: #c96f20; }
.sn-tutor__lesson-title {
  flex: 1; margin: 0; font-size: 1.05rem; font-weight: 700; color: #1e3d47;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sn-tutor__tools { display: flex; gap: 6px; align-items: center; }
.sn-tutor__tool {
  border: 1px solid #dde4ea; background: #fff; border-radius: 8px;
  padding: 6px 10px; cursor: pointer; color: #1e3d47; font-size: 0.9rem;
}
.sn-tutor__tool:hover { border-color: #f5921e; }
.sn-tutor__tool--reset { color: #c96f20; font-weight: 600; }

.sn-tutor__grid {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 16px; padding: 16px; max-width: 1400px; width: 100%; margin: 0 auto; box-sizing: border-box;
}
@media (max-width: 960px) {
  .sn-tutor__grid { grid-template-columns: 1fr; }
}

.sn-tutor__left-card {
  background: #fff; border: 1px solid #dde4ea; border-radius: 12px;
  padding: 8px 4px 16px; box-shadow: 0 1px 2px rgba(16,24,40,0.04);
  min-height: 420px;
}
.sn-tutor__content { padding: 0 8px; }
.sn-tutor__content details summary::-webkit-details-marker { display: none; }

.sn-tutor__right {
  background: #fff; border: 1px solid #dde4ea; border-radius: 12px;
  display: flex; flex-direction: column; min-height: 520px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04); overflow: hidden;
}
.sn-tutor__right-head {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-bottom: 1px solid #e8eef1; background: #fff;
}
.sn-tutor__avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #f5921e; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.sn-tutor__brand { font-weight: 700; color: #1e3d47; }
.sn-tutor__brand-sub { font-size: 0.85rem; color: #5a6478; margin-top: 2px; }

.sn-tutor__panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sn-tutor__intro { padding: 16px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.sn-tutor__instructions {
  border: 1px solid #b7d7e2; background: #eef7fa; border-radius: 10px; padding: 14px 16px;
}
.sn-tutor__instructions-label {
  display: flex; align-items: center; gap: 6px; font-weight: 700; color: #1e3d47; margin-bottom: 8px;
}
.sn-tutor__meta {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: #4e7a8a; margin-bottom: 10px;
}
.sn-tutor__instructions p { margin: 0 0 12px; color: #333; line-height: 1.55; font-size: 0.95rem; }
.sn-tutor__ready-note {
  background: #fff; border: 1px solid #d0e4ea; border-radius: 6px; padding: 12px 14px;
  font-size: 0.92rem; color: #444; line-height: 1.55;
}
.sn-tutor__start {
  margin-top: auto; width: 100%; border: 0; border-radius: 10px;
  background: #f5921e; color: #fff; font-weight: 700; font-size: 1rem;
  padding: 14px 16px; cursor: pointer;
}
.sn-tutor__start:hover { background: #e07f12; }
.sn-tutor__start:disabled { opacity: 0.7; cursor: wait; }

.sn-tutor__chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sn-tutor__messages {
  flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px;
  background: #fafbfc;
}
.sn-tutor__bubble {
  max-width: 100%; border-radius: 12px; padding: 12px 14px; font-size: 0.95rem; line-height: 1.55;
}
.sn-tutor__bubble--bot { background: #fff; border: 1px solid #e2e8ee; color: #1e3d47; }
.sn-tutor__bubble--user {
  align-self: flex-end; background: #1e3d47; color: #fff; border-radius: 12px 12px 4px 12px;
}
.sn-tutor__md p { margin: 0 0 0.7em; }
.sn-tutor__md p:last-child { margin-bottom: 0; }
.sn-tutor__bb-title {
  font-weight: 700; color: #f5921e; margin-bottom: 0.6em; font-size: 1rem;
}
.sn-tutor__rule { border: 0; border-top: 1px solid #e2e8ee; margin: 12px 0; }
.sn-tutor__typing { color: #5a6478; font-size: 0.9rem; padding: 4px 8px; }
.sn-tutor__error { color: #b42318; margin: 0 16px 8px; font-size: 0.9rem; }
.sn-tutor__privacy { color: #667085; margin: 0 16px 8px; font-size: 0.8rem; line-height: 1.35; }

.sn-tutor__nav { margin-top: 12px; }
.sn-tutor__nav-label { font-weight: 600; color: #4e7a8a; margin-bottom: 8px; font-size: 0.9rem; }
.sn-tutor__nav-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sn-tutor__nav-btn {
  border: 1px solid #c8dfe6; background: #e8f4f7; color: #1e3d47;
  border-radius: 999px; padding: 8px 12px; font-weight: 600; cursor: pointer; font-size: 0.85rem;
}
.sn-tutor__nav-btn:hover { border-color: #f5921e; background: #fff7ef; }

.sn-tutor__compose {
  display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid #e2e8ee; background: #fff;
}
.sn-tutor__compose input {
  flex: 1; border: 1px solid #dde4ea; border-radius: 10px; padding: 10px 12px; font-size: 0.95rem;
}
.sn-tutor__send {
  border: 0; border-radius: 10px; background: #f5921e; color: #fff; font-weight: 700;
  padding: 0 16px; cursor: pointer;
}
.sn-tutor__send:disabled { opacity: 0.5; cursor: not-allowed; }

/* deprecate old single-column notice */
.peak-sn-course__note { display: none; }

.sn-tutor__tool--mic.is-on { box-shadow: inset 0 0 0 2px #fff; }
.sn-tutor__toast {
  position: fixed; top: 64px; right: 16px; z-index: 40;
  background: #1e3d47; color: #fff; padding: 8px 14px; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.sn-tutor__learner { font-size: 0.95rem; line-height: 1.55; color: #333; }
.sn-tutor__your-turn {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 8px;
  background: #fff7ef; border: 1px dashed #f5921e; color: #c96f20;
  border-radius: 8px; padding: 8px 12px; font-weight: 700; font-size: 0.9rem;
}
.sn-tutor__nav-btn--blue { background: #e8f1ff; border-color: #9db7e8; color: #1e3d70; }
.sn-tutor__nav-btn--green { background: #e8f7ee; border-color: #8fcea5; color: #1e5a35; }
.sn-tutor__nav-btn--yellow { background: #fff8e1; border-color: #e6cd78; color: #7a5b00; }
.sn-tutor__nav-btn--red { background: #fdecea; border-color: #e5a39a; color: #8a1f14; }
.sn-tutor__compose--action {
  background: #fff7ef; border-top: 2px solid #f5921e;
}
.sn-tutor__compose--locked {
  justify-content: center; color: #5a6478; font-size: 0.9rem; background: #f4f6f8;
}
.sn-tutor__left { min-height: 0; }

/* SafetyNET teacher guide link (teacher-only, signed URL) */
.sn-tutor__guide { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #d5e3e8; border-radius: 8px; background: #f4f9fb; }
.sn-tutor__guide-btn { font: inherit; font-weight: 600; color: #1e3d47; background: #fff; border: 1px solid #9fbfca; border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.sn-tutor__guide-btn:hover { background: #e8f2f5; }
.sn-tutor__guide-note { color: #5a6478; font-size: 0.85rem; }
.snb-guide p { margin: 0 0 6px; }

/* Chat stays in view: fixed-height panel that scrolls inside, so the page never jumps */
@media (min-width: 961px) {
  .sn-tutor__right { position: sticky; top: 72px; align-self: start; height: calc(100vh - 88px); min-height: 480px; }
}
@media (max-width: 960px) {
  .sn-tutor__right { height: 85vh; min-height: 420px; }
}
.sn-tutor__intro { overflow-y: auto; min-height: 0; }
.sn-tutor__messages { overscroll-behavior: contain; scroll-padding-top: 8px; }

/* Per-message read-aloud button */
.sn-tutor__bubble--bot { position: relative; padding-right: 44px; }
.sn-tutor__listen {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid #d5e3e8; background: #fff; cursor: pointer; font-size: 0.9rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; color: #1e3d47;
}
.sn-tutor__listen:hover { border-color: #f5921e; }
.sn-tutor__listen.is-playing { background: #fff1e3; border-color: #f5921e; color: #c96f20; }

/* Builder: "Preview in tutor" opens a new tab */
.snb-tab-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font: inherit; color: inherit; cursor: pointer; }
.snb-tab-link:hover { color: #c96f20; border-bottom-color: #f5c48e; }
.snb-ext { flex: none; opacity: 0.8; }
.snb-preview-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; background: #fff8e1; border-bottom: 1px solid #e6cd78; color: #5c4500; font-size: 0.92rem; }
.snb-preview-banner a { margin-left: auto; font-weight: 600; }

/* Read-aloud loading / playing animation */
.sn-tutor__spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #f5c48e; border-top-color: #f5921e;
  animation: sn-spin 0.8s linear infinite; display: inline-block;
}
.sn-tutor__listen.is-loading { border-color: #f5921e; background: #fff7ef; }
.sn-tutor__eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.sn-tutor__eq i { width: 3px; background: #c96f20; border-radius: 1px; animation: sn-eq 0.9s ease-in-out infinite; }
.sn-tutor__eq i:nth-child(2) { animation-delay: 0.15s; }
.sn-tutor__eq i:nth-child(3) { animation-delay: 0.3s; }
.sn-tutor__audio-status {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 0.8rem; color: #c96f20;
}
.sn-tutor__audio-status::after { content: ''; width: 18px; text-align: left; animation: sn-dots 1.2s steps(4) infinite; }
.sn-tutor__tool--mic.is-loading { position: relative; }
.sn-tutor__tool--mic.is-loading::after {
  content: ''; position: absolute; inset: -4px; border-radius: inherit;
  border: 2px solid rgba(255,255,255,0.9); animation: sn-pulse 1.1s ease-out infinite;
}
@keyframes sn-spin { to { transform: rotate(360deg); } }
@keyframes sn-eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
@keyframes sn-pulse { 0% { opacity: 0.9; transform: scale(0.9); } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes sn-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
@media (prefers-reduced-motion: reduce) {
  .sn-tutor__spinner, .sn-tutor__eq i, .sn-tutor__tool--mic.is-loading::after { animation-duration: 2.4s; }
}

/* Building Blocks follow the chat: the left column scrolls on its own (desktop) and the
   block the tutor is working on is opened and outlined */
@media (min-width: 961px) {
  .sn-tutor__left { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 88px); overflow-y: auto; overscroll-behavior: contain; }
}
.sn-tutor__content details { transition: box-shadow 0.2s ease; }
.sn-tutor__content details.sn-bb-active { box-shadow: 0 0 0 2px #f5921e; border-color: #f5921e !important; }
