/* Skiliograph Science Discovery Path v1.1.0 (sticky child bar with a link back to the Path; text 1.125× larger, full width) — child bar and members box inside the apps, and the Path page.
 * All rules are scoped to .skd so they never clash with the apps (.sks-, .skb-, .skw-) or the theme. */
.skd {
  --skd-ink: #2b2d42; --skd-soft: #5c5f78; --skd-cream: #fff7e6; --skd-card: #ffffff; --skd-line: #e8dcc4;
  --skd-leaf: #2f8f4f; --skd-leaf-soft: #d8f3dc; --skd-sun: #ffcf4a; --skd-sun-deep: #e8a917; --skd-gold: #ffb703;
  font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif; color: var(--skd-ink); box-sizing: border-box;
}
.skd *, .skd *::before, .skd *::after { box-sizing: border-box; }
.skd p { margin: 0; }

/* buttons: defend against theme button styles */
.skd .skd-btn, .skd button.skd-btn {
  font: inherit; font-weight: 800; line-height: 1.2; letter-spacing: 0; text-transform: none; text-decoration: none;
  cursor: pointer; border: 0; margin: 0; min-height: 0; width: auto; box-shadow: none; background: transparent; color: var(--skd-ink);
}
.skd .skd-btn:focus-visible, .skd a:focus-visible { outline: 3px solid #4f86d9; outline-offset: 2px; }
.skd .skd-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 2px solid var(--skd-line); font-size: 17px; white-space: nowrap;
}
.skd .skd-pill:hover { border-color: var(--skd-leaf); }
.skd .skd-pill.skd-pri { background: var(--skd-sun); border-color: var(--skd-sun); box-shadow: 0 3px 0 var(--skd-sun-deep); }
.skd .skd-pill.skd-pri:hover { background: #ffd966; }
.skd .skd-pill.skd-pri:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--skd-sun-deep); }
.skd .skd-link { color: var(--skd-leaf); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; font-size: 17px; }

/* waiting text while the child is picked and the stops load */
.skd-wait { padding: 40px 16px; text-align: center; font-size: 20px; font-weight: 700; color: var(--skd-soft); }

/* ---------- child bar (top of each app's journey map) ---------- */
.skd-kidbar { width: 100%; margin: 0 0 14px; padding: 8px 10px; background: var(--skd-card); border-radius: 18px; box-shadow: 0 4px 0 var(--skd-line); }
.skd-kidbar .skd-pill { background: var(--skd-cream); }
.skd-kb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.skd-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 800; font-size: 19px; margin-right: auto; }
.skd-who-icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 21px; }
.skd-who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skd .skd-switch { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; border: 2px solid var(--skd-line); background: #fff; font-size: 17px; }
.skd .skd-switch-knob { position: relative; width: 36px; height: 20px; border-radius: 999px; background: #d9d2c4; transition: background .15s; }
.skd .skd-switch-knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.skd .skd-switch.is-on { border-color: #e8b923; background: #fff4c2; }
.skd .skd-switch.is-on .skd-switch-knob { background: #e0a100; }
.skd .skd-switch.is-on .skd-switch-knob::after { transform: translateX(16px); }
.skd .skd-switch:disabled { opacity: .55; cursor: not-allowed; }
.skd-xnote { font-size: 16px; font-weight: 700; color: #8a5d00; }
.skd-xnote:empty { display: none; }
.skd-legacy { margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: var(--skd-leaf-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.skd-legacy p { flex: 1 1 220px; }

/* ---------- members box (under the map) ---------- */
.skd-member { width: 100%; max-width: 640px; margin: 4px auto 12px; padding: 14px 16px; border-radius: 20px; background: var(--skd-leaf-soft); border: 2px dashed #9fd3ad; text-align: left; font-size: 18px; font-weight: 600; }
.skd-m-head { font-weight: 800; font-size: 20px; margin-bottom: 2px !important; }
.skd-m-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 10px; }

/* ---------- the Path page ---------- */
.skd-path { display: grid; gap: 22px; width: 100%; max-width: none; margin: 0; }
.skd-loading { padding: 24px; text-align: center; color: var(--skd-soft); }
.skd-who-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.skd-kids { display: flex; flex-wrap: wrap; gap: 8px; }
.skd .skd-kid { padding: 6px 14px 6px 8px; border-radius: 999px; background: #fff; border: 2px solid var(--skd-line); font-size: 18px; display: inline-flex; align-items: center; gap: 6px; }
.skd .skd-kid span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--kc, #eee); }
.skd .skd-kid.is-on { border-color: var(--skd-leaf); background: var(--skd-leaf-soft); }
.skd-nokid { font-weight: 700; color: var(--skd-soft); }
.skd-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.skd-stat { background: var(--skd-cream); border-radius: 18px; padding: 12px 10px; text-align: center; display: flex; flex-direction: column; }
.skd-stat b { font-size: 29px; line-height: 1.1; }
.skd-stat span { font-size: 16px; font-weight: 700; color: var(--skd-soft); }
.skd-access { padding: 14px 16px; border-radius: 18px; background: var(--skd-cream); font-size: 18px; }
.skd-access.is-open { background: var(--skd-leaf-soft); }

.skd-strand { border-radius: 24px; background: #fff; border: 2px solid var(--skd-line); padding: 18px 16px; display: grid; gap: 8px; }
.skd-strand-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.skd .skd-strand h2 { margin: 0; font-family: inherit; font-size: 29px; line-height: 1.15; color: var(--skd-ink); }
.skd-strand-blurb, .skd-start { color: var(--skd-soft); font-size: 18px; font-weight: 600; }
.skd-sbadge { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 12px; border-radius: 999px; background: #f1ebe0; font-weight: 800; font-size: 17px; }
.skd-sbadge small { font-weight: 700; color: var(--skd-soft); font-size: 15px; }
.skd-sbadge.is-earned { background: var(--skd-sun); }
.skd-sbadge.is-earned small { color: var(--skd-ink); }
.skd-cards { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.skd-card { margin: 0; padding: 14px; border-radius: 20px; background: var(--skd-cream); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.skd-card.is-soon { background: #f6f3ed; }
.skd-card.is-soon .skd-card-icon { filter: grayscale(.6); opacity: .7; }
.skd-card.is-mastered { background: var(--skd-leaf-soft); }
.skd-card-head { display: flex; gap: 10px; align-items: center; }
.skd-card-icon { flex: 0 0 48px; height: 48px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-size: 32px; box-shadow: 0 3px 0 rgba(43, 45, 66, .08); }
.skd-card-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.skd-card-title b { font-size: 20px; line-height: 1.15; }
.skd-chip { align-self: flex-start; font-size: 14px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: #fff; color: var(--skd-soft); }
.is-mastered .skd-chip { background: var(--skd-leaf); color: #fff; }
.is-going .skd-chip { background: #fff1a8; color: var(--skd-ink); }
.skd-covers { font-size: 16px; line-height: 1.35; color: var(--skd-soft); font-weight: 600; }
.skd-card-prog { font-size: 15px; font-weight: 700; display: grid; gap: 4px; }
.skd-bar { display: block; height: 8px; border-radius: 999px; background: #fff; overflow: hidden; }
.skd-bar i { display: block; height: 100%; background: var(--skd-gold); border-radius: 999px; }
.skd-badge { font-size: 16px; font-weight: 800; color: var(--skd-soft); }
.skd-badge small { font-weight: 600; }
.skd-badge.is-earned { color: var(--skd-ink); }
.skd-badge.is-gold { color: #8a5d00; }
.skd-first { font-size: 15px; font-weight: 600; color: var(--skd-soft); padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .7); }
.skd .skd-play { margin-top: auto; align-self: flex-start; padding: 7px 16px; border-radius: 999px; background: var(--skd-leaf); color: #fff; font-weight: 800; font-size: 17px; text-decoration: none; }
.skd .skd-play:hover { background: #26773f; color: #fff; }
.skd .skd-play.is-off { background: #e7e0d3; color: var(--skd-soft); }

.skd-prodigy { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 24px; background: #f6f3ed; }
.skd-prodigy.is-earned { background: linear-gradient(135deg, #fff8d6, #ffe7a0); }
.skd-prodigy-icon { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 43px; background: #fff; }
.skd .skd-prodigy h2 { margin: 0 0 4px; font-family: inherit; font-size: 27px; color: var(--skd-ink); }
.skd-prodigy p { font-weight: 600; margin-bottom: 8px !important; }
.skd-how { padding: 4px 4px 0; }
.skd .skd-how h2 { margin: 0 0 6px; font-family: inherit; font-size: 25px; color: var(--skd-ink); }
.skd-how ul { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; font-size: 18px; }
.skd-small { font-size: 16px; color: var(--skd-soft); }

/* certificate: only shown when printing */
.skd-cert { display: none; }
@media print {
  html.skd-printing body * { visibility: hidden !important; }
  html.skd-printing .skd-cert, html.skd-printing .skd-cert * { visibility: visible !important; }
  html.skd-printing .skd-cert { display: block; position: fixed; inset: 0; background: #fff; }
  @page { size: landscape; margin: 12mm; }
}
.skd-cert-in { height: 100%; border: 10px double #2f8f4f; border-radius: 18px; padding: 36px 40px; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 10px; font-family: 'Baloo 2', system-ui, sans-serif; color: #2b2d42; }
.skd-cert-brand { font-size: 28px; font-weight: 800; color: #1F2A44; }
.skd-cert-brand span { color: #E8780C; }
.skd-cert-kicker { font-size: 16px; letter-spacing: .2em; text-transform: uppercase; color: #5c5f78; }
.skd-cert-title { font-size: 44px; font-weight: 800; color: #2f8f4f; line-height: 1.1; }
.skd-cert-to { font-size: 18px; }
.skd-cert-name { font-size: 56px; font-weight: 800; line-height: 1.1; }
.skd-cert-text { font-size: 18px; max-width: 34em; margin: 0 auto !important; }
.skd-cert-badges { display: flex; justify-content: center; gap: 18px; font-weight: 800; font-size: 18px; flex-wrap: wrap; }
.skd-cert-date { font-size: 18px; color: #5c5f78; }

@media (max-width: 560px) {
  .skd-stats { grid-template-columns: 1fr; }
  .skd-stat { flex-direction: row; justify-content: space-between; align-items: baseline; padding: 10px 14px; text-align: left; }
  .skd .skd-strand h2 { font-size: 25px; }
  .skd-strand { padding: 14px 12px; }
  .skd-prodigy { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .skd .skd-switch-knob, .skd .skd-switch-knob::after { transition: none; } }

/* ---------- v1.1.0: sticky child bar on every screen of every app (like the Growth Path) ---------- */
.skd-kidbar { position: relative; z-index: 50; background: #fff; background: color-mix(in srgb, var(--skd-kc, #ffffff) 38%, #ffffff); }
.skd-kidbar.is-stuck { position: fixed; z-index: 9990; margin: 0; box-shadow: 0 4px 0 var(--skd-line), 0 10px 24px rgba(43, 45, 66, .16); }
.skd-kidph { margin: 0 0 14px; }
.skd-kidbar .skd-pill { background: #fff; }
.skd .skd-back-link { color: var(--skd-ink); text-decoration: none; }
.skd .skd-back-link:hover { border-color: var(--skd-leaf); color: var(--skd-ink); }
.skd-back-short { display: none; }
.skd-kidnotes { display: flex; flex-direction: column; gap: 8px; margin: -4px 0 12px; }
.skd-kidnotes:empty, .skd-kidnotes .skd-xnote:empty { display: none; }
.skd-kidnotes .skd-legacy { margin-top: 0; }
@media (max-width: 560px) {
  .skd-back-long { display: none; }
  .skd-back-short { display: inline; }
  .skd-kidbar .skd-pill, .skd-kidbar .skd-switch { padding: 5px 10px; font-size: 15px; }
  .skd-who { flex-basis: 100%; }
}
