/* Escape Velocity — finding your way around (guide.js): the first month list, page intros, page tours, the short menu. */

/* ---------- the first month list ---------- */
.guide-list { margin-bottom: 1.2rem; border-left: 4px solid var(--brand); }
.guide-list .gd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.guide-list .gd-head h2 { margin-bottom: .2rem; }
.guide-list .gd-head > div { flex: 1; min-width: 0; }
.guide-list .gd-head .btn { flex: none; }
.gd-bar { height: .45rem; border-radius: 99px; background: var(--line); margin: .8rem 0 .4rem; overflow: hidden; }
.gd-bar i { display: block; height: 100%; border-radius: inherit; background: var(--pos); transition: width .4s ease; }
.gd-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); column-gap: 1.6rem; }
.gd-items li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--line); min-height: 2.9rem; }
.gd-ck { width: 1.35rem; height: 1.35rem; flex: none; border-radius: 50%; border: 2px solid var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; line-height: 1; }
.gd-items li.done .gd-ck { background: var(--pos); border-color: var(--pos); color: var(--card-solid); }
.gd-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gd-txt small { color: var(--muted); font-size: .82rem; }
.gd-t { font: inherit; font-weight: 600; color: var(--brand); text-align: left; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
a.gd-t:hover, button.gd-t:hover { text-decoration: underline; }
.gd-items li.done .gd-t { color: var(--muted); font-weight: 500; text-decoration: line-through; cursor: default; }
.gd-items li .btn.sm { flex: none; }
.guide-list.gd-done .gd-head, .guide-help .gd-head { align-items: center; }
.guide-help .gd-head { display: flex; justify-content: space-between; gap: 1rem; }
.guide-help .gd-head > div { flex: 1; min-width: 0; }
.guide-help .gd-head .btn { flex: none; }
@media (max-width: 600px) { .guide-help .gd-head { flex-direction: column; align-items: stretch; } }
.guide-list.gd-done .nudge-btns { display: flex; gap: .5rem; flex-wrap: wrap; }

/* the dashboard chart before there are two dates */
.gd-empty { display: flex; flex-direction: column; align-items: center; gap: .7rem; text-align: center; }
.gd-empty svg { width: min(100%, 22rem); height: 5rem; overflow: visible; }
.gd-empty polyline { fill: none; stroke: var(--muted); stroke-width: 2.5; stroke-dasharray: 6 6; opacity: .7; vector-effect: non-scaling-stroke; }
.gd-empty p { margin: 0; max-width: 30rem; }

/* ---------- the page intro ---------- */
.guide-intro { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: -.4rem 0 1.2rem; padding: .7rem 1rem; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--brand); background: var(--card); }
.guide-intro p { margin: 0; flex: 1 1 22rem; line-height: 1.5; }
.guide-intro-btns { display: flex; gap: .5rem; flex: none; }

/* ---------- the tour ---------- */
#guideTour { position: fixed; inset: 0; z-index: 2500; }
#guideTour .gt-scrim { position: absolute; inset: 0; }
#guideTour .gt-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 200vmax rgba(3, 6, 20, .74); outline: 2px solid var(--brand); outline-offset: 0; pointer-events: none; transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease; }
#guideTour .gt-pop { position: fixed; width: min(22rem, calc(100vw - 20px)); padding: 1rem 1.1rem .9rem; border-radius: 14px; background: var(--card-solid); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
#guideTour .gt-pop h2 { font-size: 1.1rem; margin: 0 0 .35rem; }
#guideTour .gt-pop p { margin: 0; line-height: 1.5; }
#guideTour .gt-count { color: var(--muted); font-size: .8rem; font-weight: 600; margin-bottom: .25rem !important; }
#guideTour .gt-btns { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .9rem; }
#guideTour .gt-btns span { display: flex; gap: .4rem; }
body.no-anim #guideTour .gt-hole { transition: none; }
@media (prefers-reduced-motion: reduce) { #guideTour .gt-hole { transition: none; } }
/* The little card with Back, Next and Skip glows and breathes, so it is the thing the eye goes to (the spotlight stays as it was). */
#guideTour .gt-pop { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 60%, transparent), 0 0 30px color-mix(in srgb, var(--brand) 50%, transparent), 0 18px 50px rgba(0, 0, 0, .45); }
@media (prefers-reduced-motion: no-preference) {
  body:not(.no-anim) #guideTour .gt-pop { animation: gtGlow 2.1s ease-in-out infinite; }
  body:not(.no-anim) #guideTour .gt-btns .btn.primary { animation: gtNudge 2.1s ease-in-out infinite; }
}
@keyframes gtGlow {
  0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 55%, transparent), 0 0 16px color-mix(in srgb, var(--brand) 38%, transparent), 0 18px 50px rgba(0, 0, 0, .45); }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 85%, transparent), 0 0 48px color-mix(in srgb, var(--brand) 80%, transparent), 0 18px 50px rgba(0, 0, 0, .45); }
}
@keyframes gtNudge { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); } 55% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--brand) 0%, transparent); } }
@media print { #guideTour, .guide-intro, .guide-list { display: none !important; } }

/* ---------- the short menu ---------- */
.nav .nav-all { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .55rem .9rem; border: 0; border-radius: 12px; background: none; color: var(--side-ink); font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; text-align: left; }
.nav .nav-all svg { width: 1.1rem; height: 1.1rem; margin-left: .12rem; }
.nav .nav-all small { margin-left: auto; opacity: .75; font-size: .8rem; }
.nav .nav-all:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav .nav-all:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.sheet-all { margin: .6rem 0 0; text-align: center; }
/* Four tabs whose names differ a lot in length ("Die with zero"): each takes the room its name needs. */
@media (max-width: 860px) {
  body.gd-simple #tabbar > * { flex: 1 1 auto; }
}
@media (max-width: 600px) {
  .guide-intro { flex-direction: column; align-items: stretch; }
  .guide-intro p { flex: none; }
  .guide-intro-btns .btn { flex: 1 1 auto; }
  .gd-items { grid-template-columns: 1fr; }
  .gd-items li { flex-wrap: wrap; row-gap: .4rem; }
  .gd-items li .gd-txt { flex-basis: calc(100% - 2.1rem); }
  .gd-items li .btn.sm { margin-left: 2.05rem; }
}

/* Tinted note boxes sit on the card colour, like the cards do, so a background star can't show through their words
   (the page intros moved one of them on top of a star on Investments). */
.note-box { background: linear-gradient(var(--brand-soft), var(--brand-soft)), var(--card); backdrop-filter: blur(var(--blur, 0px)); }
