/* How it works page (how-it-works.html): one card per app screen, a phone
   picture with numbered gold dots beside steps using the same numbers.
   Uses the colour tokens from style.css. */
:root { --dot: #D7A43B; --dot-text: #1A1405; --gold-soft: #FBF1DC; }
@media (prefers-color-scheme: dark) { :root { --dot: #FFC74C; --gold-soft: #2A2410; } }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.g-toc { background: var(--surface); border-bottom: 1px solid var(--border); }
.g-toc .wrap { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.g-toc a { font-size: .875rem; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--surface-alt); color: var(--text); font-weight: 600; }
.g-toc a:hover { color: var(--primary); }

.guide { font-size: 1.0625rem; }
.guide a { font-weight: 600; }
.g-main { padding-top: 32px; padding-bottom: 40px; display: grid; gap: 28px; }
.guide h2, .guide h3 { margin: 0; }
.g-eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-hi); }
.part { padding-top: 24px; display: grid; gap: 6px; }
.part h2 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); font-weight: 800; }
.part p { margin: 0; color: var(--text-2); max-width: 65ch; }

.screen { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; align-items: start; scroll-margin-top: 80px; box-shadow: var(--shadow); }
.screen.noimg { grid-template-columns: minmax(0, 1fr); }
.screen h3 { font-size: 1.45rem; font-weight: 800; }
.screen .where { margin: 6px 0 14px; font-size: .94rem; color: var(--text-2); }
.where b { color: var(--text); }
.g-intro { margin: 0 0 14px; }
.body { min-width: 0; }
.g-phone { position: relative; border-radius: 26px; overflow: hidden; border: 6px solid #1d2420; background: #1d2420; max-width: 300px; width: 100%; margin: 0 auto; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.g-phone img { display: block; width: 100%; height: auto; }
.mk { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background: var(--dot); color: var(--dot-text); font-size: 14px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 2px 6px rgba(0, 0, 0, .35); }
.caption { text-align: center; font-size: .82rem; color: var(--text-2); margin-top: 8px; }

ol.g-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; }
ol.g-steps > li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; }
ol.g-steps > li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--dot); color: var(--dot-text); font-weight: 800; font-size: 14px; display: grid; place-items: center; margin-top: 1px; }
ol.g-steps.plain > li::before { background: var(--surface-alt); color: var(--text); }
.key { display: inline-block; padding: 0 8px; border-radius: 6px; background: var(--surface-alt); border: 1px solid var(--border); font-weight: 700; font-size: .92em; white-space: nowrap; }
.tip { background: var(--gold-soft); border-radius: 12px; padding: 12px 16px; margin-top: 16px; font-size: .97rem; }
.tip b { color: var(--gold-hi); }

.tabgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 6px; max-width: 640px; }
.tabitem { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface-alt); border-radius: 14px; padding: 12px; }
.tabicon { width: 64px; height: 64px; border-radius: 14px; background: #FFFFFF; border: 1px solid var(--border); display: grid; place-items: center; }
.tabicon img { width: 50px; height: auto; display: block; }
.tabitem b { display: block; font-size: 1.03rem; }
.tabitem span { display: block; font-size: .9rem; color: var(--text-2); line-height: 1.45; margin-top: 2px; }

.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.roles div { background: var(--surface-alt); border-radius: 12px; padding: 12px 14px; font-size: .94rem; color: var(--text-2); }
.roles b { display: block; color: var(--text); font-size: 1rem; }
.faq { display: grid; gap: 10px; }
.guide details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; }
.guide summary { font-weight: 700; cursor: pointer; }
.guide details p { margin: 10px 0 0; color: var(--text-2); }
.g-note { padding-bottom: 48px; color: var(--text-2); font-size: .9rem; }

@media (max-width: 720px) {
  .screen { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 20px; }
  .g-phone { max-width: 270px; }
  .guide { font-size: 1.03rem; }
}
