/* The how-to guide, on top of app.css and about/about.css (the hero's type, washi tape, section headings, footer). */

html { scroll-padding-top: calc(var(--gd-head, 72px) + 72px); }   /* under the header and the sticky step list */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }   /* the step list's jumps: he runs there */

/* ---------------------------------------------------------------- hero */

.gd-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; }
.gd-hero-art { position: relative; justify-self: center; width: min(100%, 400px); padding: 54px 0 10px; }
.gd-hero-cloud { position: absolute; left: 50%; bottom: -6px; width: 92%; height: auto; translate: -50% 0; opacity: 0.95; }
.gd-hero-cinna {
  position: relative; width: 100%; height: auto; filter: drop-shadow(0 14px 16px rgba(20, 70, 120, 0.2));
  animation: bob 2.8s ease-in-out infinite;
}
.gd-say {   /* his speech bubble */
  position: absolute; top: 0; right: 2%; z-index: 1; padding: 8px 18px; border-radius: 20px; background: #fff;
  color: var(--deep); font-size: 19px; white-space: nowrap; rotate: 5deg; box-shadow: 0 0 0 2px var(--sky-2), var(--shadow);
}
.gd-say::after {
  content: ""; position: absolute; left: 26%; bottom: -9px; width: 18px; height: 18px; rotate: 45deg; background: #fff;
  box-shadow: 2px 2px 0 0 var(--sky-2); clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* ---------------------------------------------------------------- the step list: sticks under the header */

.gd-toc {
  position: sticky; top: calc(var(--gd-head, 72px) + 10px); z-index: 10; display: flex; gap: 4px; width: fit-content; max-width: 100%;
  margin: 64px auto 0; padding: 6px; overflow-x: auto; scrollbar-width: none; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); box-shadow: 0 0 0 2px var(--sky-2), var(--shadow);
}
.gd-toc::-webkit-scrollbar { display: none; }
.gd-toc a {
  display: flex; flex: none; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px;
  color: var(--ink); font-size: 14px; text-decoration: none; white-space: nowrap; transition: background 0.2s, color 0.2s;
}
.gd-toc a:hover { background: var(--sky-1); }
.gd-toc b {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sky-1);
  color: var(--deep); font-weight: normal; font-size: 13.5px; transition: background 0.2s;
}
.gd-toc a.on { background: linear-gradient(180deg, #5db7ef, var(--deep)); color: #fff; }
.gd-toc a.on b { background: #fff; }

/* ---------------------------------------------------------------- the trail and the steps along it */

.gd-flow { --run: 0px; position: relative; margin-top: 56px; }
.gd-trail {   /* dotted, like the reel's month track; filled in blue down to where you're reading */
  position: absolute; top: var(--trail-top, 20px); left: 50%; width: 8px; height: var(--trail-len, 100%); margin-left: -4px;
  background: radial-gradient(circle, #a9d6f3 2.6px, transparent 3.1px) center top / 8px 15px repeat-y;
}
.gd-fill {
  position: absolute; top: 0; left: 0; right: 0; height: min(var(--run), 100%); border-radius: 99px;
  background: linear-gradient(180deg, #a6dcfb, var(--blue));
}
.gd-runner {
  position: absolute; left: 50%; top: min(var(--run), 100%); z-index: 1; width: 62px; height: auto; translate: -50% -78%;
  filter: drop-shadow(0 4px 5px rgba(20, 70, 120, 0.25)); animation: boot-run 0.32s ease-in-out infinite alternate;
}

.gd-steps { display: flex; flex-direction: column; gap: 76px; margin: 0; padding: 0; list-style: none; }
.gd-step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr); align-items: center; }
.gd-pin {
  grid-column: 2; grid-row: 1; justify-self: center; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 50%; background: #fff; color: var(--deep); font-size: 21px;
  box-shadow: 0 0 0 3px var(--sky-2), var(--shadow); transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.gd-pin.done { background: var(--deep); color: #fff; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--blue), var(--shadow); }
.gd-card {
  grid-column: 1; grid-row: 1; position: relative; padding: 30px 28px 24px; border-radius: 24px; background: #fff;
  box-shadow: 0 0 0 2px var(--sky-2), 0 12px 30px rgba(44, 132, 198, 0.14);
}
.gd-art { grid-column: 3; grid-row: 1; position: relative; justify-self: center; width: min(78%, 260px); }
.gd-step.flip .gd-card { grid-column: 3; }
.gd-step.flip .gd-art { grid-column: 1; }
.gd-art::before {   /* a little cloud to stand on */
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -10px; height: 34px; border-radius: 50%;
  background: radial-gradient(closest-side, #fff 55%, rgba(255, 255, 255, 0));
}
.gd-art img {
  position: relative; width: 100%; height: auto; filter: drop-shadow(0 10px 12px rgba(20, 70, 120, 0.16));
  animation: bob 3.2s ease-in-out infinite;
}
.gd-step:nth-child(even) .gd-art img { animation-delay: -1.6s; }

.gd-num { display: inline-block; margin: 0; padding: 1px 12px; border-radius: 999px; background: #fff0f5; color: #c95c86; font-size: 13px; letter-spacing: 1px; }
.gd-card h3 { margin: 10px 0 2px; font-weight: normal; font-size: 26px; line-height: 1.35; color: var(--deep); text-wrap: balance; }
.gd-lead { margin: 0 0 14px; color: var(--muted); }
.gd-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gd-list li { position: relative; padding-left: 22px; line-height: 1.9; }
.gd-list li::before {   /* a bullet in the step's tape colour */
  content: ""; position: absolute; left: 2px; top: 0.7em; width: 10px; height: 10px; border-radius: 50%;
  background: var(--tape); box-shadow: inset 0 0 0 1.5px rgba(44, 132, 198, 0.28);
}
.gd-tip {
  display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 0; padding: 12px 14px; border-radius: 16px;
  background: var(--sky-0); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14.5px; line-height: 1.8 !important;
}
.gd-tip b { flex: none; padding: 0 10px; border-radius: 999px; background: var(--deep); color: #fff; font-weight: normal; font-size: 12.5px; line-height: 2; }

/* a button named in the text, drawn like the app's own */
.ui {
  margin: 0 2px; padding: 1px 9px; border-radius: 999px; background: #fff; color: var(--deep); font-size: 0.9em; white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--line), 0 2px 0 var(--sky-2); -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.ui-ico { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.23em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* the tips' badges: drawn icons (guide.js TIPS) */
.gd-tip-ico svg { width: 24px; height: 24px; }
.gd-tip-ico svg.fill { fill: currentColor; }
.gd-tip-ico svg.line { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gd-tip-ico svg.dots { stroke-width: 3.6; }
.ui-total .mi { display: inline; width: 1.05em; height: 1.05em; margin-right: 4px; vertical-align: -0.17em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* steps fade in as they scroll into view (guide.js adds .reveal unless motion is reduced) */
.reveal .gd-card, .reveal .gd-art { transition: opacity 0.6s, translate 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15), scale 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.reveal .gd-art { transition-delay: 0.12s; }
.reveal .gd-step:not(.in) .gd-card { opacity: 0; translate: 0 28px; }
.reveal .gd-step:not(.in) .gd-art { opacity: 0; translate: 0 28px; scale: 0.85; }

/* ---------------------------------------------------------------- tips, questions, and off you go */

.gd-tips, .gd-faq { position: relative; }
.gd-deco { position: absolute; top: -34px; right: 3%; width: 190px; height: auto; filter: drop-shadow(0 10px 12px rgba(20, 70, 120, 0.16)); animation: bob 3s ease-in-out infinite; }
.gd-faq .gd-deco { right: auto; left: 3%; width: 160px; }

.gd-tip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 34px 0 0; padding: 0; list-style: none; }
.gd-tip-grid li {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 20px 20px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.88); box-shadow: 0 0 0 2px var(--sky-2);
}
.gd-tip-grid b { font-weight: normal; font-size: 18px; color: var(--deep); }
.gd-tip-grid li > span:last-child { font-size: 14.5px; line-height: 1.8; }
.gd-tip-ico {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 4px; border-radius: 14px;
  background: #dcf0fd; color: var(--deep); font-size: 21px; line-height: 1;
}
.gd-tip-grid li:nth-child(2) .gd-tip-ico { background: #ffe1ea; color: var(--pink-deep); }
.gd-tip-grid li:nth-child(3) .gd-tip-ico { background: #ebe5fb; color: #7a68d6; }
.gd-tip-grid li:nth-child(4) .gd-tip-ico { background: #d9f3e6; color: #2f9a68; }
.gd-tip-grid li:nth-child(5) .gd-tip-ico { background: #fff3c9; color: #a5791a; font-size: 18px; }
.gd-tip-grid li:nth-child(6) .gd-tip-ico { background: #ffe1ea; color: var(--pink-deep); }

.gd-faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 780px; margin: 34px auto 0; }
.gd-faq details { border-radius: 18px; background: #fff; box-shadow: 0 0 0 2px var(--sky-2); transition: box-shadow 0.2s; }
.gd-faq details[open] { box-shadow: 0 0 0 2px var(--blue), var(--shadow); }
.gd-faq summary { position: relative; padding: 15px 52px 15px 58px; font-size: 17px; line-height: 1.6; color: var(--deep); cursor: pointer; list-style: none; }
.gd-faq summary::-webkit-details-marker { display: none; }
.gd-faq summary::before {
  content: "Q"; position: absolute; left: 16px; top: 13px; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; background: #fff0f5; color: #c95c86; font-size: 15px;
}
.gd-faq summary::after {   /* a chevron that turns over when the answer opens */
  content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border: solid var(--blue); border-width: 0 2.5px 2.5px 0; rotate: 45deg; transition: rotate 0.2s, margin 0.2s;
}
.gd-faq details[open] summary::after { rotate: -135deg; margin-top: -2px; }
.gd-faq details p { margin: 0; padding: 0 22px 18px 58px; }

.gd-go { text-align: center; }
.gd-go-cinna { width: min(270px, 62%); height: auto; margin: 0 auto 12px; filter: drop-shadow(0 12px 14px rgba(20, 70, 120, 0.18)); animation: bob 2.6s ease-in-out infinite; }
.gd-go-about { margin: 18px 0 0; }
.gd-go-about a { color: var(--deep); text-decoration: none; }
.gd-go-about a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- smaller screens: the trail runs down the left */

@media (max-width: 900px) {
  .gd-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .gd-hero-art { width: min(76%, 330px); }
  .gd-tip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gd-deco { position: static; display: block; width: 150px; margin: 0 auto 4px; }
  .gd-faq .gd-deco { width: 130px; }
}
@media (max-width: 760px) {
  .gd-flow { margin-top: 40px; }
  .gd-trail { left: 21px; }
  .gd-steps { gap: 46px; }
  .gd-step, .gd-step.flip { grid-template-columns: 42px minmax(0, 1fr); column-gap: 10px; align-items: start; }
  .gd-pin { grid-column: 1; grid-row: 2; margin-top: 22px; width: 40px; height: 40px; font-size: 17px; }
  .gd-step .gd-card, .gd-step.flip .gd-card { grid-column: 2; grid-row: 2; padding: 26px 18px 20px; }
  .gd-step .gd-art, .gd-step.flip .gd-art { grid-column: 2; grid-row: 1; z-index: 2; width: 150px; margin: 0 4px -18px auto; }
  .gd-step.flip .gd-art { margin: 0 auto -18px 8px; }
  .gd-art::before { display: none; }
  .gd-card .tape { left: 30%; }   /* out from under the drawing perched on the card */
  .gd-step.flip .gd-card .tape { left: 70%; }
  .gd-card h3 { font-size: 23px; }
  .gd-toc { margin-top: 44px; }
  .gd-toc a:not(.on) { padding-right: 4px; }
  .gd-toc a:not(.on) span { display: none; }   /* numbers only, except the step you're on */
}
@media (max-width: 600px) {
  .gd-tip-grid { grid-template-columns: minmax(0, 1fr); }
  .gd-say { font-size: 16px; padding: 6px 14px; }
  .gd-faq summary { padding: 13px 44px 13px 52px; font-size: 16px; }
  .gd-faq summary::before { left: 12px; top: 11px; }
  .gd-faq details p { padding: 0 18px 16px 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .gd-hero-cinna, .gd-art img, .gd-deco, .gd-go-cinna, .gd-runner { animation: none; }
}
