/* "How's {name} doing?" (js/troubleshoot.mjs, 2026-10-25): the grown-up's after-lesson check-in. The trail button, the
   one-time map note and the check-in card, in the Adult Guide's calm green (--adult), like js/grade-ui.mjs. */

/* ---------------------------------------------------------------- the trail button */
.ts-how { position: absolute; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border: 4px solid color-mix(in srgb, var(--adult, #3E8044) 40%, #FFFFFF);
  border-radius: 26px; background: #FFFFFF; color: #2B6B33; font: 700 23px/1.08 var(--font-ui); text-align: left; cursor: pointer; box-shadow: 0 6px 0 rgba(0, 0, 0, .1); }
.ts-how-ic { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: #EAF6E7; color: #E2574C; }
.ts-how-ic svg { width: 32px; height: 32px; }
.ts-how-t { display: flex; flex-direction: column; white-space: nowrap; }
.ts-how-t span:first-child { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.ts-how:active { translate: 0 4px; box-shadow: none; }
.ts-how.in { animation: tsIn .45s var(--ease-spring) both; }
@keyframes tsIn { from { scale: .6; opacity: 0; } }
/* every stop finished: the button lights up in the grown-up green and breathes gently */
.ts-how.lit { background: var(--adult, #3E8044); border-color: #FFFFFF; color: #FFFFFF; box-shadow: 0 6px 0 #2B5C30, 0 0 0 0 rgba(62, 128, 68, .45); }
.ts-how.lit .ts-how-ic { background: #FFFFFF; }
.ts-how.lit.in { animation: tsIn .45s var(--ease-spring) both, tsGlow 1.6s ease-in-out .5s infinite alternate; }
@keyframes tsGlow { to { box-shadow: 0 6px 0 #2B5C30, 0 0 0 16px rgba(62, 128, 68, .22); } }
/* no free spot for the words on a crowded trail: just the heart */
.ts-how.mini { padding: 8px; border-radius: 50%; }
.ts-how.mini .ts-how-t { display: none; }

/* ---------------------------------------------------------------- the map note (once, right after a lesson) */
.ts-nudge { position: absolute; left: 50%; top: 24px; z-index: 26; transform: translateX(-50%); /* 2026-10-26 mobile review F-21: transform, not translate: (Chrome < 104) */ display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 8px; border-radius: 30px;
  background: #FFFFFF; box-shadow: 0 0 0 5px var(--adult, #3E8044), 0 10px 0 5px rgba(20, 52, 36, .18), 0 18px 40px rgba(16, 24, 58, .25); animation: tsDrop .5s var(--ease-spring) both; }
@keyframes tsDrop { from { transform: translate(-50%, -40px); opacity: 0; } }
.ts-nudge-go { display: flex; align-items: center; gap: 14px; padding: 4px 12px 4px 4px; border: 0; background: none; font: 700 27px/1.15 var(--font-ui); color: #22314F; text-align: left; cursor: pointer; white-space: nowrap; }
.ts-nudge-t small { display: block; font-size: 19px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #3E8044; }
.ts-nudge-t b { color: #2B6B33; margin-left: 6px; }
.ts-nudge-x { flex: none; width: 56px; height: 56px; border: 0; border-radius: 50%; background: #EEF5EC; display: grid; place-items: center; cursor: pointer; }
.ts-nudge-x svg { width: 24px; height: 24px; }

/* ---------------------------------------------------------------- the check-in card */
.ts-wrap { position: absolute; inset: 0; z-index: 465; display: grid; place-items: center; background: rgba(16, 24, 58, .5); }
.ts-card { position: relative; width: 1240px; max-height: 880px; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: none;
  padding: 34px 56px 38px; border-radius: 40px; background: #FFFFFF; color: #22314F; border-top: 14px solid var(--adult, #3E8044); box-shadow: 0 30px 80px rgba(20, 52, 36, .32); }
.ts-card::-webkit-scrollbar { display: none; }
.ts-x { position: absolute; right: 26px; top: 22px; width: 72px; height: 72px; border: 0; border-radius: 50%; background: #EEF2F6; display: grid; place-items: center; cursor: pointer; }
.ts-x svg { width: 30px; height: 30px; }
.ts-kick { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5E7F62; }
.ts-card h2 { margin: 4px 90px 6px 0; font-size: 46px; line-height: 1.15; color: var(--adult, #3E8044); }
.ts-sub { margin: 0; font-size: 27px; line-height: 1.35; color: #2B6B33; }
/* the answers */
.ts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.ts-opt { position: relative; display: flex; align-items: center; gap: 18px; min-height: 104px; padding: 14px 24px; border: 4px solid #E3EAE1; border-radius: 26px; background: #F7FAF6;
  font: 700 28px/1.22 var(--font-ui); color: #22314F; text-align: left; cursor: pointer; box-shadow: 0 6px 0 rgba(0, 0, 0, .06); transition: transform .12s var(--ease-out), border-color .12s; }
@media (hover: hover) { .ts-opt:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--adult, #3E8044) 45%, #FFFFFF); } }
.ts-opt:active { transform: scale(.98); }
.ts-grid:not(.fits) .ts-opt.great { grid-column: 1 / -1; }
.ts-opt.great { min-height: 92px; background: #FFF6D8; border-color: #FFD978; color: #5A3B00; }
.ts-emoji { flex: none; font-size: 46px; line-height: 1; }
.ts-emoji.big { font-size: 56px; }
.ts-last { position: absolute; right: 14px; top: -14px; padding: 3px 12px; border-radius: 999px; background: var(--adult, #3E8044); color: #FFFFFF; font-size: 17px; font-style: normal; font-weight: 700; }
/* the answer */
.ts-back { margin: 18px 0 0; padding: 8px 18px; border: 0; border-radius: 999px; background: #EEF5EC; color: #2B6B33; font: 700 22px/1 var(--font-ui); cursor: pointer; }
.ts-head { display: flex; align-items: center; gap: 22px; }
.ts-head h2 { margin: 2px 60px 0 0; font-size: 38px; }
.ts-slow { margin: 16px 0 0; padding: 12px 24px 14px; border-radius: 22px; background: #EAF6E7; border-left: 10px solid var(--adult, #3E8044); }
.ts-slow b { display: block; font-size: 25px; color: #2B6B33; }
.ts-slow p { margin: 4px 0 10px; font-size: 24px; line-height: 1.38; color: #2B6B33; }
.ts-body { display: flex; gap: 34px; align-items: flex-start; margin-top: 16px; }
.ts-main { flex: 1; min-width: 0; }
.ts-side { flex: none; width: 360px; display: flex; flex-direction: column; gap: 18px; }
.ts-try { margin: 0 0 8px; font-size: 23px; letter-spacing: .05em; text-transform: uppercase; color: var(--adult, #3E8044); }
.ts-steps { margin: 0; padding: 0; list-style: none; counter-reset: ts; display: flex; flex-direction: column; gap: 10px; }
.ts-steps li { position: relative; padding-left: 56px; font-size: 25px; line-height: 1.36; color: #2B6B33; counter-increment: ts; }
.ts-steps li::before { content: counter(ts); position: absolute; left: 0; top: -1px; width: 40px; height: 40px; border-radius: 50%; background: #EAF6E7; color: var(--adult, #3E8044);
  display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.ts-acts { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 24px; background: #F4F8F3; }
.ts-acts > span { font-size: 20px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5E7F62; }
.ts-act { min-height: 60px; padding: 10px 20px; border: 3px solid color-mix(in srgb, var(--adult, #3E8044) 35%, #FFFFFF); border-radius: 20px; background: #FFFFFF; color: #2B6B33;
  font: 700 23px/1.2 var(--font-ui); text-align: left; cursor: pointer; box-shadow: 0 5px 0 rgba(0, 0, 0, .08); }
.ts-act.strong { background: var(--adult, #3E8044); border-color: var(--adult, #3E8044); color: #FFFFFF; }
.ts-act:active { translate: 0 3px; box-shadow: none; }
.ts-slow .ts-act { min-height: 54px; }
.ts-act.soft { min-height: 0; padding: 4px 6px; border: 0; background: none; box-shadow: none; font-size: 21px; text-decoration: underline; text-underline-offset: 4px; }
.ts-cheer { margin: 0; padding: 14px 20px; border-radius: 22px; background: #EAF6E7; font-size: 23px; font-weight: 700; line-height: 1.36; color: #2B6B33; }
.ts-cheer::before { content: '💛 '; }
/* Isaiah 2026-10-25: every word for the grown-up here is in the teacher green, and each answer says so */
.ts-green { margin: 16px 0 0; padding: 10px 18px; border-radius: 20px; border: 3px dashed color-mix(in srgb, var(--adult, #3E8044) 45%, #FFFFFF); font-size: 22px; line-height: 1.34; color: #2B6B33; }
.ts-answer.has-slow .ts-green { margin-top: 10px; padding: 6px 16px; font-size: 20px; }
.ts-green span { color: var(--child, #D62E2E); font-weight: 700; }
.ts-answer.great .ts-cheer { background: #EAF6E7; color: #2B6B33; }

/* ---------------------------------------------------------------- the Adult Guide entries */
.gg-item.gg-how { background: #E9F6E6; color: #2B6B33; }
.gg-item.gg-how > span { width: 64px; height: 64px; font-size: 36px; box-shadow: 0 0 0 4px #3E8044; }
.ip-help.ip-how { margin-left: 12px; background: #FFFFFF; color: #2B6B33; box-shadow: inset 0 0 0 3px var(--adult, #3E8044); }
/* the menu grew (live site adds two account items, phones add Play full screen): it scrolls instead of running off */
.gg-menu { max-height: 760px; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: none; }
.gg-menu::-webkit-scrollbar { display: none; }
/* the slow-down note: words on the left, its review button on the right */
.ts-slow { display: grid; grid-template-columns: 1fr auto; column-gap: 26px; align-items: center; }
.ts-slow b, .ts-slow p { grid-column: 1; }
.ts-slow p { margin-bottom: 0; }
.ts-slow .ts-act { grid-column: 2; grid-row: 1 / span 2; white-space: nowrap; }
.ts-card .ts-kick { margin-right: 90px; }
/* with the slow-down note on top, the steps tighten a little so everything still fits without scrolling */
.ts-answer.has-slow { padding-top: 28px; padding-bottom: 30px; }
.ts-answer.has-slow .ts-slow p { font-size: 22px; line-height: 1.32; }
.ts-answer.has-slow .ts-body { margin-top: 12px; }
.ts-answer.has-slow .ts-steps { gap: 7px; }
.ts-answer.has-slow .ts-steps li { font-size: 23px; line-height: 1.3; }
.ts-answer.has-slow .ts-back { margin-top: 12px; }
/* sideways phones: the dimmer reaches the real screen edges, and a tap in the side bands closes the card (it lands on
   .ts-wrap itself) instead of reaching the Map / Adult Guide buttons behind it */
html.edge-fill .ts-wrap { isolation: isolate; background: none; }
html.edge-fill .ts-wrap::before { content: ''; position: fixed; z-index: -1; background: rgba(16, 24, 58, .5);
  inset: calc(-1 * var(--edge-t)) calc(-1 * var(--edge-r)) calc(-1 * var(--edge-b)) calc(-1 * var(--edge-l)); }

/* 2026-10-26 mobile review F-09: invisible hit areas on phones (look unchanged): the check-in X (30 CSS px), "Pick a
   different answer" (16 px tall) and the map note's X (23 px; it stops 3 px short of the note's own button beside it) */
html.phone :is(.ts-back, .ts-nudge-x) { position: relative; } /* (.ts-x is already absolute) */
html.phone .ts-x::after { content: ''; position: absolute; inset: -25px -26px -40px -36px; } /* 2026-10-31: the card clips it at its top and right edges, so it grows down and left: ~40x40 px at a .30 stage */
html.phone .ts-back::after { content: ''; position: absolute; inset: -42px -16px; }
html.phone .ts-nudge-x::after { content: ''; position: absolute; inset: -24px -20px -24px -3px; }
/* 2026-11-01 phone findings: at a .30 stage (iPhone with Safari bars) the note's own button measured 168x21 px; it now
   takes the whole white note (its 8 px padding above and below), never more. 2026-11-02 overnight A/B (walker 734x271,
   lessons 14-16 and 24-26): a ring reaching past the note, up to the screen's edge and down over the map, lay over the
   child's next lesson stop right after a lesson (Lesson 18, 19 and 29 "centre covered by ts-nudge-go") and map letters,
   and Close grown to 44 px reached further over the map. The child's next stop wins: nothing invisible past the note but
   Close's own ring above (live since v113) */
html.phone .ts-nudge-go { position: relative; }
html.phone .ts-nudge-go::after { content: ''; position: absolute; left: 0; right: 0; top: -8px; bottom: -8px; }
/* Isaiah 2026-10-27: the check-in is the trail's last stop: a round heart stop on the path with its label under it */
.ts-how.node { flex-direction: column; gap: 6px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; text-align: center; }
.ts-how.node .ts-how-ic { width: 108px; height: 108px; background: #FFFFFF; border: 8px solid color-mix(in srgb, var(--adult, #3E8044) 45%, #FFFFFF); box-shadow: 0 6px 0 rgba(0, 0, 0, .12); box-sizing: border-box; }
.ts-how.node .ts-how-ic svg { width: 54px; height: 54px; }
.ts-how.node .ts-how-t { align-items: center; padding: 6px 16px; border-radius: 16px; background: #FFFFFF; color: var(--adult, #3E8044); box-shadow: 0 4px 0 rgba(0, 0, 0, .1); font-size: 24px; }
.ts-how.node .ts-how-t span:first-child { max-width: none; }
.ts-how.node:active { translate: 0 3px; }
/* Isaiah 2026-10-30: "the adult check-in should look the same" in every lesson: the stop no longer turns green and glows
   once the lesson is finished (troubleshoot.mjs never gives a node the .lit class) */
/* 2026-11-15: rows below the fold: fade the bottom edge so the menu visibly scrolls (Grown-ups account sits last) */
.gg-menu.gg-more { -webkit-mask-image: linear-gradient(#000 calc(100% - 70px), rgba(0, 0, 0, .25)); mask-image: linear-gradient(#000 calc(100% - 70px), rgba(0, 0, 0, .25)); }
