/* Guide panel, practice bar and teaching panels in the Clay design system.
   Tokens and parts follow clay-spec (warm paper, white cards with hairlines, Panel grey only for
   the sidebar, boards, options and tracks, one marigold action, 3D clay pictures, stickers for moments).
   Everything is scoped (.cg, .practice-bar, .trip) so it never touches the Salesforce look-alike screens. */
:root {
  --paper: #FCFBF8; --panel: #F3F2EE; --card: #FFFFFF; --line: #E6E3DC;
  --ink: #1C1B19; --body: #3B3936; --mute: #6E6A64; --faint: #A39E95;
  --mari: #FFC93C; --mari-deep: #E3A400; --mari-soft: #FFF1C9;
  --good: #2F6B12; --good-soft: #E3F6DA; --bad: #C2373B; --bad-soft: #FDE2E2; --info: #2C4BB8; --info-soft: #E3EAFE;
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --lift-1: 0 1px 2px rgba(28,27,25,.06), 0 4px 12px rgba(28,27,25,.06);
  --lift-2: 0 2px 6px rgba(28,27,25,.06), 0 18px 40px -16px rgba(28,27,25,.28);
  --spring: cubic-bezier(.34, 1.56, .64, 1); --soft: cubic-bezier(.22, 1, .36, 1); --walk: cubic-bezier(.45, .05, .3, 1);
}

/* ---------- shared Clay parts (scoped) ---------- */
.cg, .practice-bar, .trip { font-family: var(--sans); -webkit-font-smoothing: antialiased; }
.cg .btn, .practice-bar .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 0;
  font: 500 14.5px/1 var(--sans); white-space: nowrap; cursor: pointer; transition: transform .25s var(--spring), box-shadow .25s, background .2s; }
.cg .btn.sm, .practice-bar .btn.sm { height: 34px; padding: 0 13px; font-size: 13.5px; border-radius: 10px; }
.cg .btn.mari { background: var(--mari); color: var(--ink); box-shadow: inset 0 -3px 0 rgba(0,0,0,.08), 0 6px 16px -6px rgba(227,164,0,.7); }
.cg .btn.mari:hover { transform: translateY(-2px); }
.cg .btn.ghost, .practice-bar .btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.cg .btn.ghost:hover, .practice-bar .btn.ghost:hover { box-shadow: inset 0 0 0 1px #CFCAC1; }
.cg .btn:active { transform: translateY(1px) scale(.98); }
.cg .btn:focus-visible, .cg .litem:focus-visible, .cg .opt:focus-visible { outline: 3px solid var(--mari); outline-offset: 3px; }
.cg .linkbtn { background: none; border: 0; padding: 4px 2px; color: var(--mute); font: 400 13.5px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cg .label { font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.cg .small { font-size: 13.5px; color: var(--mute); line-height: 1.5; }
.cg .tag, .practice-bar .pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font: 500 12.5px/1 var(--sans); white-space: nowrap; }
.cg .tag.grey { background: var(--panel); color: var(--mute); }
.practice-bar .pill { border-radius: 8px; height: 26px; }
.practice-bar .pill.mari { background: var(--mari-soft); color: #7A5600; }
.cg code { font: 12.5px var(--mono); background: var(--panel); padding: 1px 5px; border-radius: 6px; color: var(--ink); }
.cg b { color: var(--ink); font-weight: 600; }
.cg .swap-in { animation: swapin .55s var(--soft); }
@keyframes swapin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Stickers mark a moment (one per box) */
.cg .sticker { --rot: -6deg; position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font: 700 13.5px/1 var(--sans); color: var(--ink); white-space: nowrap;
  border: 4px solid #fff; box-shadow: 0 1px 0 #E9E5DD, 0 8px 16px -6px rgba(28,27,25,.35); transform: rotate(var(--rot)); background: var(--mari); }
.cg .sticker::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 38%); pointer-events: none; }
.cg .sticker.win { --rot: -4deg; background: #C9F0E3; color: #134E3A; }
.cg .sticker.warn { --rot: 5deg; background: #FFD5D2; color: #8E1F23; }
.cg .sticker.info { --rot: 3deg; background: #DCE5FF; color: #1F3A99; }
.cg .sticker.round { width: 104px; height: 104px; padding: 10px; border-radius: 50%; justify-content: center; text-align: center; white-space: normal; line-height: 1.15; font-size: 15px; border-width: 5px; }
.cg .sticker.slap { animation: slap .6s var(--spring) both; }
@keyframes slap { 0% { transform: rotate(calc(var(--rot) - 18deg)) scale(1.7); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(var(--rot)) scale(1); opacity: 1; } }

/* ---------- practice bar (Clay top bar) ---------- */
.practice-bar { background: rgba(252,251,248,.94); color: var(--body); font-size: 13.5px; display: flex; align-items: center; gap: 12px; padding: 7px 16px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.practice-bar .brand { display: inline-flex; align-items: center; gap: 8px; font: 600 16px/1 var(--sans); letter-spacing: -.04em; color: var(--ink); }
.practice-bar .brand i { width: 16px; height: 16px; border-radius: 6px 6px 6px 2px; background: radial-gradient(circle at 30% 25%, #FFE9A8, var(--mari) 50%, var(--mari-deep)); box-shadow: 0 2px 4px rgba(227,164,0,.4); }
.practice-bar .sp { flex: 1; }

/* ---------- the guide panel ---------- */
.cg { background: var(--paper); color: var(--body); font-size: 15px; line-height: 1.55; border-left: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0; position: sticky; top: 0; height: 100vh; max-height: 100vh; z-index: 9500; }
.cg .coach-scroll { overflow-y: auto; padding: 22px 18px 24px; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.cg .coach-scroll > * { flex-shrink: 0; }
.cg h2 { margin: 8px 0 0; font: 400 28px/1.06 var(--sans); letter-spacing: -.045em; color: var(--ink); }
.cg h3 { margin: 6px 0 8px; font: 400 21px/1.2 var(--sans); letter-spacing: -.035em; color: var(--ink); }
.cg p { margin: 0 0 8px; }
.cg .prog { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--mute); margin-top: 12px; }
.cg .prog .bar { flex: 1; height: 6px; border-radius: 99px; background: #E3E0D9; overflow: hidden; }
.cg .prog .bar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .8s var(--soft); }

/* coach bar: "Step N of M" and the one thing to do */
.cg .coachbar { background: var(--card); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line), var(--lift-1); padding: 16px; display: grid; gap: 10px; }
.cg .cb-top { display: flex; align-items: center; gap: 10px; }
.cg .stepno { flex: none; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; font: 500 12.5px/1 var(--sans); white-space: nowrap; }
.cg .dots { display: flex; gap: 5px; margin-left: auto; }
.cg .dots i { width: 7px; height: 7px; border-radius: 99px; background: #DDD9D1; transition: width .4s var(--spring), background .3s; }
.cg .dots i.d { background: var(--ink); }
.cg .dots i.on { width: 20px; background: var(--mari); }
.cg .skyav { flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--info-soft); overflow: hidden; }
.cg .skyav svg { display: block; }
.cg .doit { font-size: 17.5px; line-height: 1.42; letter-spacing: -.015em; color: var(--ink); }
.cg .doit b { background: linear-gradient(transparent 62%, var(--mari-soft) 62%); }
.cg .why { font-size: 14px; color: var(--mute); line-height: 1.5; }
.cg .why b { color: var(--body); }
.cg .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.cg .vals-h { font-size: 13px; color: var(--mute); margin-top: 6px; }
.cg .vals { display: grid; gap: 8px; margin-top: 8px; }
.cg .val { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--panel); transition: background .25s, box-shadow .25s; }
.cg .val .k { font-size: 12.5px; color: var(--mute); grid-column: 1; }
.cg .val .v { font: 12.5px/1.4 var(--mono); color: var(--ink); overflow-wrap: anywhere; grid-column: 1; }
.cg .val .btn, .cg .val .ok { grid-column: 2; grid-row: 1 / span 2; }
.cg .val .ok { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; }
.cg .val.done { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.cg .val.done .v { color: var(--mute); }
.cg .val.now { background: var(--card); box-shadow: inset 0 0 0 2px var(--mari), 0 10px 22px -12px rgba(227,164,0,.7); }

/* feedback boxes, with a sticker for the moment */
.cg .feedback { position: relative; padding: 14px 16px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.cg .feedback.good { background: var(--good-soft); color: #1F4A0B; box-shadow: none; }
.cg .feedback.bad { background: var(--bad-soft); color: #7A1E22; box-shadow: none; }
.cg .feedback.tip { background: var(--mari-soft); color: #4A3A00; box-shadow: none; }
.cg .feedback b { color: inherit; }
.cg .feedback .sticker { position: absolute; top: -16px; right: 14px; }
.cg .feedback:has(.sticker) { margin-top: 10px; }

/* white cards */
.cg .gcard { background: var(--card); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); padding: 16px 18px; }
.cg .pcard .label, .cg .mission .label, .cg .labwrap .label { display: block; }
.cg .pts { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 10px; }
.cg .pts li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 14.5px; line-height: 1.45; }
.cg .pts li i { width: 22px; height: 22px; border-radius: 50%; background: var(--mari); color: var(--ink); display: grid; place-items: center; font: 600 12px var(--sans); font-style: normal; }
.cg .mission p { font-size: 14.5px; margin-top: 8px; }
.cg .pieces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.cg .pieces span { background: var(--panel); border-radius: 10px; padding: 7px 9px; font-size: 13px; font-weight: 500; color: var(--ink); display: flex; gap: 7px; align-items: center; }
.cg .pieces span i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1.5px #D7D3CB; color: var(--mute); display: grid; place-items: center; font-size: 11.5px; flex: none; }

/* the 3D clay picture for the part */
.cg .stagecard { background: var(--card); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cg .stage { position: relative; height: 240px; isolation: isolate; }
.cg .stage > svg { display: block; width: 100%; height: 100%; }
.cg .motion { display: flex; gap: 10px; align-items: baseline; padding: 11px 14px 13px; font-size: 13px; line-height: 1.45; color: var(--mute); }
.cg .motion .tag { flex: none; }
.cg .stage-wrap { position: relative; }
.cg .stage-wrap .seal { position: absolute; right: 10px; top: 10px; z-index: 2; }
.cg .stage .walker { transition: transform 1.4s var(--walk); }
.cg .stage .walker.walking .bod { animation: step .32s ease-in-out infinite alternate; }
@keyframes step { to { transform: translateY(-2.5px); } }
.cg .stage .grow { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); opacity: 0; transition: transform .9s var(--spring), opacity .3s; }
.cg .stage .grow.in { transform: none; opacity: 1; }
.cg .stage .drop { transform-box: fill-box; transform-origin: 50% 100%; transform: translateY(-70px); opacity: 0; }
.cg .stage .drop.in { animation: drop .8s var(--soft) forwards; }
@keyframes drop { 0% { transform: translateY(-70px); opacity: 0; } 55% { transform: translateY(0) scale(1.06, .9); opacity: 1; } 75% { transform: translateY(-6px) scale(.98, 1.03); } 100% { transform: none; opacity: 1; } }
.cg .stage .fadeable { transition: opacity .6s var(--soft); }
.cg .stage .gone { opacity: 0 !important; }
.cg .stage .iso-label rect { filter: drop-shadow(0 2px 3px rgba(28,27,25,.12)); }

/* the SkyShip portal: a white pane on the panel */
.cg .pane { background: var(--card); border-radius: 20px; box-shadow: var(--lift-2); overflow: hidden; }
.cg .pane-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink); background: #F7F6F2; }
.cg .pane-h .tag { margin-left: auto; }
.cg .sky-dot { width: 18px; height: 18px; border-radius: 6px; background: linear-gradient(135deg, #3CC4B0, #7C97F6); }
.cg .pane-b { padding: 14px; display: grid; gap: 8px; }
.cg .sky .row { display: flex; gap: 6px; }
.cg .sky input { flex: 1; min-width: 0; height: 34px; font: 12.5px var(--mono); border: 0; border-radius: 10px; padding: 0 10px; color: var(--ink); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.cg .sky ul { margin: 0; padding-left: 18px; font: 12.5px var(--mono); overflow-wrap: anywhere; color: var(--ink); }

/* your route: the lesson-list style */
.cg .route .label { margin: 4px 0 8px 4px; }
.cg .lnav { display: grid; gap: 2px; }
.cg .litem { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; padding: 9px 12px; border-radius: 14px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background .2s; }
.cg .litem:hover { background: rgba(255,255,255,.6); }
.cg .litem.here { background: var(--card); box-shadow: var(--lift-1); cursor: default; }
.cg .litem .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 500 13px/1 var(--sans); color: var(--mute); box-shadow: inset 0 0 0 1.5px #D7D3CB; }
.cg .litem.here .n { background: var(--mari); color: var(--ink); box-shadow: none; }
.cg .litem.done .n { background: var(--ink); color: #fff; box-shadow: none; }
.cg .litem b { display: block; font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.cg .litem .m { display: block; font-size: 12.5px; color: var(--mute); line-height: 1.35; margin-top: 2px; }

.cg .coach-foot { border-top: 1px solid var(--line); padding: 10px 18px; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--mute); background: var(--paper); }
.cg .coach-handle { display: none; }

/* finished: the lab */
.cg .done-wrap { display: flex; flex-direction: column; gap: 16px; }
.cg .labwrap { display: grid; gap: 12px; }
.cg .labwrap h3 { margin: 0; }
.cg .labcard { background: var(--paper); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); padding: 14px; display: grid; gap: 10px; }
.cg .labcard.solved { background: var(--card); }
.cg .labcard .q { font-weight: 500; color: var(--ink); }
.cg .opts { display: grid; gap: 6px; }
.cg .opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px 6px 7px; border-radius: 14px; border: 0; background: var(--panel); font: 500 14.5px var(--sans); color: var(--ink); text-align: left; cursor: pointer; transition: transform .25s var(--spring), background .2s; }
.cg .opt:hover { transform: translateX(4px); background: #ECEAE4; }
.cg .opt .k { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--card); font-size: 13px; box-shadow: inset 0 0 0 1.5px #D7D3CB; flex: none; }
.cg .srcs summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.cg .srcs { font-size: 13px; color: var(--mute); }
.cg .srcs a { color: var(--info); }

/* "press this next" on the Salesforce screen: marigold ring that pulses */
.coach-pulse { outline: 2.5px solid var(--mari) !important; outline-offset: 3px; border-radius: 6px; animation: ring 1.8s var(--soft) infinite; position: relative; z-index: 3; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255,201,60,.75); } 70%, 100% { box-shadow: 0 0 0 14px rgba(255,201,60,0); } }
.show-me-flash { animation: showMe 1s ease-out 2; }
@keyframes showMe { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,201,60,0); } 40% { box-shadow: 0 0 0 10px rgba(255,201,60,.55); } }

/* ---------- Behind the scenes: the request's trip (inside the Developer Console) ---------- */
.trip { background: var(--card); color: var(--body); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); padding: 16px; font-size: 13.5px; }
.trip h4 { margin: 0 0 12px; font: 400 19px var(--sans); letter-spacing: -.03em; color: var(--ink); }
.trip .stops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.trip .stop { background: var(--panel); border-radius: 14px; padding: 10px; min-width: 0; transition: background .3s, transform .3s; }
.trip .stop .t { font-weight: 600; color: var(--ink); }
.trip .stop .s { color: var(--mute); font: 12px var(--mono); }
.trip .stop .add { font: 11.5px var(--mono); color: #7A5600; margin-top: 6px; overflow-wrap: anywhere; opacity: 0; transition: opacity .3s; }
.trip .stop.lit { background: var(--good-soft); }
.trip .stop.lit .add { opacity: 1; color: var(--good); }
.trip .stop.fail { background: var(--bad-soft); animation: shake .45s; }
.trip .stop.fail .add { color: var(--bad); opacity: 1; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.trip .wire { height: 6px; border-radius: 99px; background: var(--panel); margin: 12px 0 6px; position: relative; }
.trip .wire .pkt { position: absolute; top: 50%; left: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 6px; background: radial-gradient(circle at 30% 25%, #FFE9A8, var(--mari) 55%, var(--mari-deep));
  box-shadow: 0 4px 10px -2px rgba(227,164,0,.6); transition: left .55s var(--walk); }
.trip .wire .pkt.bad { background: var(--bad); box-shadow: none; }
.trip .wire .pkt.good { background: var(--good); box-shadow: none; }
.trip .httpbox { font: 12px/1.6 var(--mono); background: #0F1115; color: #E6E3DC; border-radius: 14px; padding: 12px; margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.trip .httpbox .h { color: #F78FC4; font-weight: 600; }
.trip .httpbox .y { color: var(--mari); font-weight: 600; }
.trip .httpbox .g { color: #8D8A83; font-style: italic; }

/* confetti: little clay pieces */
.confetti { position: fixed; top: -14px; width: 10px; height: 10px; z-index: 9999; border-radius: 3px; pointer-events: none; box-shadow: inset -2px -2px 0 rgba(0,0,0,.12); animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(106vh) rotate(540deg) rotateX(360deg); } }

/* ---------- phone and tablet: the guide becomes a bottom sheet ---------- */
@media (max-width: 1100px) {
  .cg { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; max-height: 48vh; z-index: 9500; border-left: 0;
    border-radius: 22px 22px 0 0; box-shadow: 0 -12px 34px rgba(28,27,25,.18); }
  .cg .coach-handle { display: flex; justify-content: center; padding: 8px 0 0; cursor: pointer; background: none; border: 0; width: 100%; }
  .cg .coach-handle i { width: 44px; height: 5px; border-radius: 99px; background: #D7D3CB; }
  .cg .coach-scroll { padding-top: 8px; }
  .cg h2 { font-size: 22px; }
  .cg .stage { height: 200px; }
  .cg.min .coach-scroll > *:not(.coachbar):not(.ghead) { display: none; }
  .cg.min .coach-foot { display: none; }
}
@media (max-width: 760px) {
  .practice-bar .pb-t { display: none; }
  .trip .stops { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .trip .wire { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cg .stage .grow, .cg .stage .drop { transform: none; }
}
