/* Foramind Studio — Rehber (web/guide.js). A topic list on the left (a picker on phones), the topic's step-through
   (text and buttons on the left, one real picture on the right; stacked on phones) and a short FAQ.
   The topic colour comes in as --gt / --gt2 (the project tabs' colours). */
.gd { max-width: 1240px; --gt: #0039e6; --gt2: #1f5bff; }
.gd-loading { min-height: 70vh; }
.gd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------ head */
.gd-head { padding: var(--s-2) 0 0; }
.gd-head .tag svg { width: 15px; height: 15px; }
.gd-head h1 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; letter-spacing: -.03em; margin-top: var(--s-2); }
.gd-head p { color: var(--ink-3); font-size: var(--fs-16); margin: var(--s-2) 0 0; max-width: 640px; }

/* ------------------------------------------------------------ layout: topics + main */
.gd-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s-6); margin-top: var(--s-5); align-items: start; }
.gd-topics { position: sticky; top: calc(var(--gd-top, 76px) + 8px); }
.gd-pick { display: none; }
.gd-tlist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.gd-tlist a { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3) var(--s-2) var(--s-2); border-radius: var(--r-12); color: var(--ink-2);
	text-decoration: none; font-weight: 600; font-size: var(--fs-14); transition: background .2s, color .2s; }
.gd-tlist a:hover { background: var(--surface); color: var(--ink); }
.gd-tlist a:focus-visible { outline: none; box-shadow: var(--focus); }
.gd-tico { width: 34px; height: 34px; flex: none; border-radius: var(--r-12); display: grid; place-items: center; color: var(--c1); background: #fff; box-shadow: inset 0 0 0 1px var(--line-3); }
.gd-tico svg { width: 18px; height: 18px; }
.gd-tlist a[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: var(--sh-1), inset 0 0 0 1px var(--line-3); }
.gd-tlist a[aria-current="page"] .gd-tico { color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: none; }

.gd-topic { display: flex; gap: var(--s-4); align-items: flex-start; }
.gd-badge { width: 48px; height: 48px; flex: none; border-radius: var(--r-12); display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--gt), var(--gt2)); }
.gd-badge svg { width: 24px; height: 24px; }
.gd-topic h2 { font-size: var(--fs-24); letter-spacing: -.02em; line-height: 1.2; }
.gd-topic h2:focus { outline: none; }
.gd-topic h2:focus-visible { box-shadow: var(--focus); border-radius: var(--r-8); }
.gd-topic p { margin: var(--s-1) 0 0; color: var(--ink-3); font-size: var(--fs-16); max-width: 68ch; }

/* ------------------------------------------------------------ the step-through */
.gd-stage { margin-top: var(--s-4); background: #fff; border: 1px solid var(--line-3); border-radius: var(--r-18); box-shadow: var(--sh-1); overflow: clip; }
.gd-step { display: flex; flex-direction: column; }
.gd-side { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4) var(--s-5) var(--s-4); border-bottom: 1px solid var(--line-3); }
.gd-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.gd-progress { display: flex; flex-direction: column; gap: var(--s-2); }
.gd-count { font-size: var(--fs-13); font-weight: 600; color: var(--gt); }
.gd-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.gd-dot { width: 22px; height: 8px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--line-3); cursor: pointer; transition: background .2s, width .2s; position: relative; }
.gd-dot::after { content: ''; position: absolute; inset: -10px -2px; }             /* a bigger target than the bar */
.gd-dot:hover { background: var(--line-2); }
.gd-dot.on { width: 36px; background: linear-gradient(90deg, var(--gt), var(--gt2)); }
.gd-dot:focus-visible { outline: none; box-shadow: var(--focus); }
.gd-title { font-size: var(--fs-20); line-height: 1.25; letter-spacing: -.01em; margin-top: var(--s-2); }
.gd-title:focus { outline: none; }
.gd-text { margin: 0; color: var(--ink-2); font-size: var(--fs-16); line-height: 1.6; max-width: 76ch; }
.gd-text b { color: var(--ink); font-weight: 600; }
.gd-nav { display: flex; gap: var(--s-2); }
.gd-nav .btn { justify-content: center; }
.gd-nav .btn svg { width: 18px; height: 18px; }
.gd-hint { margin: 0; padding: 0 var(--s-5) var(--s-3); font-size: var(--fs-12); color: var(--muted); background: var(--surface); text-align: center; }

/* the picture: one real screen, fully lit; the element to act on gets a coloured ring that ripples twice when the
   step opens (drawn here, so it stays crisp). Nothing around it is dimmed: the learner sees the whole screen. */
.gd-media { margin: 0; display: grid; place-items: center; padding: var(--s-5); background: var(--surface); min-width: 0; min-height: 300px; }
.gd-shot { position: relative; width: 100%; max-width: min(var(--wmax), calc(max(300px, min(580px, 100vh - 380px)) * var(--hw))); aspect-ratio: var(--ar); border-radius: var(--r-12); overflow: hidden;
	background: #fff; box-shadow: var(--sh-2), 0 0 0 1px var(--line-3); touch-action: pan-y; }
.gd-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gd-missing { aspect-ratio: 16 / 9; max-width: 100%; }
.gd-spot { position: absolute; border-radius: var(--r-12); pointer-events: none;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gt), 0 4px 16px 4px rgba(20, 22, 58, .16); animation: gdSpot .5s var(--ease, ease) both; }
.gd-spot::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; box-shadow: 0 0 0 3px var(--gt); opacity: 0;
	animation: gdRipple 1.3s ease-out .45s 2; }
@keyframes gdSpot { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes gdRipple { from { inset: -4px; opacity: .75; } to { inset: -18px; opacity: 0; } }
.gd-play { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px 0 10px; border: 0; border-radius: var(--r-pill);
	background: rgba(20, 22, 58, .78); color: #fff; font: inherit; font-size: var(--fs-13); font-weight: 600; cursor: pointer; }
.gd-play svg { width: 16px; height: 16px; }
.gd-play:hover { background: rgba(20, 22, 58, .9); }
.gd-play:focus-visible { outline: none; box-shadow: var(--focus); }

/* ------------------------------------------------------------ FAQ */
.gd-faq { margin-top: var(--s-6); }
.gd-faq h2 { font-size: var(--fs-20); letter-spacing: -.01em; margin-bottom: var(--s-3); }
.gd-faq details { border-top: 1px solid var(--line-3); }
.gd-faq details:last-of-type { border-bottom: 1px solid var(--line-3); }
.gd-faq .gd-ask { margin-top: var(--s-4); }   /* opens the help bubble's question-and-answer chat */
.gd-faq summary { cursor: pointer; padding: var(--s-3) var(--s-1); font-weight: 600; font-size: var(--fs-16); border-radius: var(--r-8); }
.gd-faq summary:focus-visible { outline: none; box-shadow: var(--focus); }
.gd-faq details p { margin: 0 0 var(--s-4); padding: 0 var(--s-1); color: var(--ink-3); font-size: var(--fs-14); line-height: 1.6; max-width: 72ch; }

/* ------------------------------------------------------------ narrower screens */
@media (max-width: 1023px) {
	.gd-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
	.gd-topics { position: static; }
	.gd-tlist { display: none; }
	.gd-pick { display: flex; flex-direction: column; gap: var(--s-1); font-size: var(--fs-13); font-weight: 600; color: var(--muted); }
	.gd-pick select { width: 100%; }
}
@media (max-width: 600px) {
	.gd-head h1 { font-size: var(--fs-24); }
	.gd-head p { display: none; }
	.gd-topic { gap: var(--s-3); }
	.gd-badge { width: 40px; height: 40px; }
	.gd-badge svg { width: 20px; height: 20px; }
	.gd-topic h2 { font-size: var(--fs-20); }
	.gd-topic p { font-size: var(--fs-14); }
	.gd-stage { border-radius: var(--r-12); }
	.gd-media { padding: var(--s-3); min-height: 0; }
	.gd-play { right: 6px; bottom: 6px; min-height: 28px; padding: 0 10px 0 8px; font-size: var(--fs-12); }
	.gd-play svg { width: 13px; height: 13px; }
	.gd-side { padding: var(--s-4); }
	.gd-bar { flex-direction: column; align-items: stretch; }
	.gd-nav .btn { flex: 1; min-height: 42px; }
	.gd-title { font-size: var(--fs-18); }
	.gd-text { font-size: var(--fs-14); }
}
@media (hover: none) { .gd-hint { display: none; } }

@media (prefers-reduced-motion: reduce) {
	.gd-spot, .gd-spot::after { animation: none; }
	.gd-dot, .gd-tlist a { transition: none; }
}
