/* ===========================================================
   GOB Tutorial Experience — design system
   Built on the canonical GOB "FCC" brand shell (Styleguide.md):
   deep blue-black atmosphere, dark graphite shell + panels,
   Bebas Neue / Inter, orange = non-gating action, green scarce.

   NOTE: the canonical .gob-btn component lives in /css/gob-buttons.css
   and is loaded separately — it is intentionally NOT redefined here.
   =========================================================== */

:root {
  /* brand */
  --blue:        #27408e;   /* primary anchor */
  --blue-top:    #2b4794;
  --blue-mid:    #1e3068;
  --blue-deep:   #141f4a;
  --lblue:       #4a90d9;   /* secondary accent */
  --orange:      #f79420;   /* non-gating action */
  --orange-soft: #ffa84a;
  --yellow:      #ffd700;   /* accent */
  --green:       #34ec27;   /* gating / positive — SCARCE */
  --red:         #ff6d6d;

  /* shell + surfaces */
  --base:        #0b0d14;
  --shell:       rgba(14, 16, 24, 0.96);
  --shell-border:rgba(255, 255, 255, 0.09);
  --panel-1:     rgba(42, 48, 58, 0.92);
  --panel-2:     rgba(30, 35, 44, 0.95);
  --panel-flat:  rgba(20, 23, 32, 0.9);
  --panel-border:rgba(255, 255, 255, 0.12);
  --hair:        rgba(255, 255, 255, 0.08);

  /* text */
  --text:        #f7f9ff;
  --muted:       rgba(255, 255, 255, 0.72);
  --muted-2:     rgba(255, 255, 255, 0.5);
  --muted-3:     rgba(255, 255, 255, 0.34);

  --display: 'Bebas Neue Pro', 'Bebas Neue', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, sans-serif;

  --radius: 14px;
  --radius-lg: 20px;
  --nav-h: 62px;
}

* { box-sizing: border-box; }

body.gob-tut {
  font-family: var(--body);
  color: var(--text);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(39, 64, 142, 0.55) 0%, rgba(20, 31, 74, 0.25) 38%, transparent 70%),
    linear-gradient(180deg, #11183a 0%, #0c1024 46%, var(--base) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.55;
  /* clear the fixed bottom nav so it never covers the footer / last row */
  padding-bottom: calc(var(--nav-h) + 16px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.gob-tut img { max-width: 100%; display: block; }
body.gob-tut a { color: inherit; text-decoration: none; }
body.gob-tut ::selection { background: var(--orange); color: #15181f; }

/* keep the injected global footer clear of the fixed bottom nav */
body.gob-tut #site-footer { margin-bottom: calc(var(--nav-h) + 8px); }

/* ---------- Shell container ---------- */
.gob-shell {
  position: relative;
  width: min(1180px, calc(100vw - 28px));
  margin: 14px auto 22px;
  padding: 22px clamp(18px, 3vw, 38px) 40px;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.028) 0%, rgba(255, 255, 255, 0.014) 18%, transparent 40%),
    var(--shell);
  border: 1px solid var(--shell-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.gob-shell::after {
  content: ""; position: absolute; inset: 0; border-radius: 24px; pointer-events: none;
  background: repeating-linear-gradient(132deg, transparent 0 102px, rgba(255,255,255,0.012) 102px 103px, transparent 103px 208px);
}
.gob-shell > * { position: relative; z-index: 1; }

/* ---------- Header row (back link only; logo lives in the global auth-bar) ---------- */
.gob-head {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 14px; margin-bottom: 6px;
  border-bottom: 1px solid var(--hair);
}
.gob-head .spacer { flex: 1; }

/* back link — ghost text per styleguide, left-justified above the content */
.gob-back {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer; padding: 4px 2px;
  font-family: var(--body); font-weight: 600; font-size: 13.5px;
  color: var(--muted-2); transition: color .15s, transform .15s;
}
.gob-back:hover { color: var(--text); }
.gob-back:hover .chev { transform: translateX(-2px); }
.gob-back .chev { font-size: 15px; line-height: 1; transition: transform .15s; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--body); font-weight: 700;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted-2);
}
.eyebrow .tick { width: 20px; height: 2px; background: var(--orange); border-radius: 2px; }

/* ---------- Section rhythm (lesson pages) ---------- */
.lsec { margin-top: 40px; }
.lsec-eyebrow-only { margin-bottom: 18px; }
.handoff { margin-top: 40px; }

/* ---------- Alert-resume sticky footer (modal entry only) ---------- */
body.gob-tut--alert-resume .handoff,
body.gob-tut--alert-resume [data-gob-back] {
  display: none !important;
}
body.gob-tut--alert-resume {
  padding-bottom: calc(var(--nav-h) * 2 + 28px);
}
body.gob-tut--alert-resume #site-footer {
  margin-bottom: calc(var(--nav-h) * 2 + 12px);
}
.gob-tut-alert-resume {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--nav-h);
  z-index: 45;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 14px;
  background: rgba(10, 12, 20, 0.86);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.gob-tut-alert-resume__btn {
  min-width: 200px;
}

/* ---------- Panels ---------- */
.panel {
  border: 1px solid var(--panel-border); border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), transparent 18%),
    linear-gradient(180deg, var(--panel-1), var(--panel-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 26px rgba(0,0,0,0.3);
}

/* ---------- Depth badge ---------- */
.depth {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--body); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid transparent;
}
.depth.foundational { color: var(--orange); background: rgba(247,148,32,.12); border-color: rgba(247,148,32,.3); }
.depth.advanced { color: var(--lblue); background: rgba(74,144,217,.12); border-color: rgba(74,144,217,.3); }

/* ---------- Persistent bottom nav ---------- */
.gob-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; justify-content: center; padding: 8px 14px;
  background: rgba(10, 12, 20, 0.86);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.gob-bottomnav .navwrap { display: flex; gap: 4px; width: 100%; max-width: 680px; }
.gob-navbtn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: none; background: transparent; cursor: pointer; border-radius: 10px;
  color: var(--muted-2); font-family: var(--body); padding: 4px;
  transition: background .15s, color .15s;
}
.gob-navbtn .ico { width: 20px; height: 20px; display: block; }
.gob-navbtn .lbl { font-family: var(--display); font-size: 13px; letter-spacing: .06em; }
.gob-navbtn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.gob-navbtn.active { color: var(--text); background: rgba(255,255,255,0.07); }
.gob-navbtn.active .ico { color: var(--orange); }

/* ---------- Toast (bottom-right per styleguide) ---------- */
.gob-toast {
  position: fixed; right: 22px; bottom: calc(var(--nav-h) + 22px); z-index: 70;
  min-width: 260px; max-width: 320px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  background: rgba(28, 33, 43, 0.97); border: 1px solid rgba(255,255,255,0.14);
  border-left: 3px solid var(--orange);
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
  transform: translateX(120%); opacity: 0; transition: transform .22s ease, opacity .22s ease;
}
.gob-toast.show { transform: translateX(0); opacity: 1; }
.gob-toast .ti { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--orange); background: rgba(247,148,32,.18);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; }
.gob-toast .tt { font-family: var(--display); font-size: 16px; letter-spacing: .04em; color: #fff; }
.gob-toast .ts { font-size: 12px; color: rgba(255,255,255,0.54); }

.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* ---------- Sammy tip modal (GOB.showTip / tutorial alerts) ---------- */
.gob-tip-overlay {
  position: fixed; inset: 0; z-index: 10040;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .22s ease;
}
.gob-tip-overlay.open { opacity: 1; }
.gob-tip-overlay .gob-modal {
  position: relative; width: min(440px, calc(100vw - 48px));
  padding: 24px 24px 20px; border-radius: 18px;
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), transparent 18%),
    var(--panel-2);
  box-shadow: 0 28px 70px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateY(8px) scale(0.98);
  transition: transform .24s cubic-bezier(0.22, 1, 0.36, 1);
}
.gob-tip-overlay.open .gob-modal { transform: translateY(0) scale(1); }
.gob-tip-overlay .gob-modal-x {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  border: none; border-radius: 8px; background: transparent;
  color: var(--muted-2); font-size: 20px; line-height: 1; cursor: pointer;
}
.gob-tip-overlay .gob-modal-x:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.gob-tip-overlay .gob-modal-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.gob-tip-overlay .gob-modal-avatar {
  width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--hair);
}
.gob-tip-overlay .gob-modal-kicker {
  font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 4px;
}
.gob-tip-overlay .gob-modal-title {
  font-family: var(--display); font-size: 28px; line-height: 1; letter-spacing: .02em;
  color: var(--text);
}
.gob-tip-overlay .gob-modal-body {
  margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: var(--muted); text-wrap: pretty;
}
.gob-tip-overlay .gob-modal-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.gob-tip-overlay .gob-modal-actions .btn {
  flex: 1 1 140px; min-height: 44px; border-radius: 10px;
  font-family: var(--display); font-size: 17px; letter-spacing: .04em;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.gob-tip-overlay .btn-primary {
  background: var(--orange); color: #15181f; border-color: var(--orange-soft);
  box-shadow: 0 8px 20px rgba(247,148,32,0.28);
}
.gob-tip-overlay .btn-primary:hover { background: var(--orange-soft); }
.gob-tip-overlay .btn-ghost {
  background: transparent; color: var(--muted);
  border-color: var(--panel-border);
}
.gob-tip-overlay .btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.gob-tip-overlay .gob-modal-mute {
  display: block; width: 100%; margin-top: 12px; padding: 0; border: none; background: none;
  font-size: 11px; color: var(--muted-3); cursor: pointer; text-align: left;
}
.gob-tip-overlay .gob-modal-mute:hover { color: var(--muted); }

/* ===========================================================
   Tutorial Alert — Coach Sammy "coach-card" (premium takeover)
   One component serves all 7 tutorial-alert lessons.
   Distinct from the .gob-modal tip above: full-screen takeover,
   two-column branded card. Built entirely on the tokens above.
   =========================================================== */
.gob-talert-overlay {
  position: fixed; inset: 0; z-index: 10045;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 100% at 50% 50%, rgba(7,8,12,0.55) 20%, rgba(7,8,12,0.82));
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  opacity: 1; /* resting state is fully visible — never opacity:0 */
}
/* entrance: scrim fade + card rise/scale, dropped on animationend */
.gob-talert-overlay.is-entering { animation: gob-talert-ov-in .4s ease; }
@keyframes gob-talert-ov-in { from { opacity: 0; } }
/* leaving: brief fade before removal */
.gob-talert-overlay.is-leaving { opacity: 0; transition: opacity .25s ease; }

.gob-talert {
  position: relative; width: min(94vw, 800px);
  display: grid; grid-template-columns: 256px 1fr;
  background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
  border: 1px solid var(--panel-border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 50px 110px -34px rgba(0,0,0,0.85), 0 0 0 1px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05);
}
.gob-talert-overlay.is-entering .gob-talert {
  animation: gob-talert-in .5s cubic-bezier(.2,.8,.2,1) .08s backwards;
}
@keyframes gob-talert-in { from { transform: translateY(14px) scale(.985); opacity: 0; } }

.gob-talert-close {
  position: absolute; top: 15px; right: 16px; z-index: 5; width: 30px; height: 30px;
  border: none; border-radius: 8px; background: transparent; color: var(--muted-2);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s;
}
.gob-talert-close:hover { background: rgba(255,255,255,0.07); color: var(--text); }

/* left rail (branded) */
.gob-talert-rail {
  position: relative; padding: 30px 22px 26px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: linear-gradient(168deg, rgba(247,148,32,0.17), rgba(247,148,32,0.015) 52%), rgba(0,0,0,0.2);
  border-right: 1px solid var(--hair);
}
.gob-talert-mark {
  position: absolute; top: 16px; left: 18px; display: flex; align-items: center; gap: 6px;
  font-family: var(--body); font-size: 10px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--orange-soft);
}
.gob-talert-mark svg { width: 15px; height: 15px; }
.gob-talert-id { display: flex; flex-direction: column; align-items: center; }
.gob-talert-portrait {
  display: block; width: 124px; height: 124px; border-radius: 22px; overflow: hidden; margin-top: 34px;
  box-shadow: 0 0 0 2px var(--orange), 0 16px 34px -12px rgba(0,0,0,0.75);
}
.gob-talert-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gob-talert-coach {
  font-family: var(--display); font-size: 27px; line-height: 1; letter-spacing: .03em;
  margin-top: 18px; white-space: nowrap;
}
.gob-talert-progress {
  margin-top: auto; padding-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 11px;
}
.gob-talert-num {
  font-family: var(--display); font-size: 15px; letter-spacing: .07em; color: var(--orange-soft); white-space: nowrap;
}
.gob-talert-dots { display: flex; align-items: center; gap: 7px; }
.gob-talert-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: .3s; }
.gob-talert-dots i.on { background: var(--orange); width: 20px; border-radius: 3px; }
.gob-talert-dots i.done { background: rgba(247,148,32,0.55); }

/* right content */
.gob-talert-content {
  padding: 40px 40px 38px; display: flex; flex-direction: column; justify-content: center; min-height: 330px;
}
.gob-talert-title {
  font-family: var(--body); font-weight: 800; font-size: 37px; line-height: 1.02; letter-spacing: -0.012em;
  margin: 0; color: var(--text);
}
.gob-talert-text {
  font-size: 16.5px; line-height: 1.55; color: var(--muted); margin: 14px 0 30px; max-width: 42ch; text-wrap: pretty;
}
.gob-talert-actions { display: flex; align-items: center; gap: 22px; }
.gob-talert-btn { font-family: var(--body); cursor: pointer; border: none; transition: .16s; text-decoration: none; }
.gob-talert-btn-primary {
  background: linear-gradient(180deg, var(--orange-soft), var(--orange)); color: #15181f;
  font-size: 16px; font-weight: 700; padding: 14px 32px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 22px -7px rgba(247,148,32,0.6), inset 0 1px 0 rgba(255,255,255,0.45);
}
.gob-talert-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -8px rgba(247,148,32,0.7), inset 0 1px 0 rgba(255,255,255,0.45);
}
.gob-talert-btn-ghost {
  background: transparent; color: var(--muted); font-family: var(--display); font-size: 20px;
  letter-spacing: .04em; padding: 8px 4px;
}
.gob-talert-btn-ghost:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .gob-talert-overlay, .gob-talert-overlay.is-entering, .gob-talert-overlay.is-entering .gob-talert {
    animation: none; opacity: 1; transform: none;
  }
}

/* responsive: rail moves on top below ~560px */
@media (max-width: 560px) {
  .gob-talert { grid-template-columns: 1fr; width: min(94vw, 420px); }
  .gob-talert-rail {
    flex-direction: row; justify-content: flex-start; gap: 16px; text-align: left;
    padding: 46px 20px 18px; border-right: none; border-bottom: 1px solid var(--hair);
  }
  .gob-talert-portrait { width: 64px; height: 64px; border-radius: 14px; margin-top: 0; }
  .gob-talert-coach { font-size: 22px; margin-top: 0; }
  .gob-talert-id { flex-direction: column; gap: 8px; }
  .gob-talert-progress { margin: 0; padding-top: 0; align-items: flex-start; }
  .gob-talert-content { padding: 26px 24px 28px; min-height: 0; }
  .gob-talert-title { font-size: 30px; }
}
