/* =====================================================================
   guide.css: the attendee guide (guide.html)

   A short dark masthead, a numbered "Start here" path, then closed cards
   in a few groups. One card open at a time is normal; nothing is long
   until the reader asks for it. Every class is g- prefixed so nothing
   collides with site.css. Colours come from the site tokens.
   ===================================================================== */
.guide {
  --g-surface: var(--chalk);
  --g-line: #dcd9cf;
  --g-shot-bg: #ffffff;
  --g-shadow: 0 1px 2px rgba(18,38,43,.05), 0 6px 18px -8px rgba(18,38,43,.16);
  font: 400 16.5px/1.65 var(--f-body);
}
.guide p { margin: 0 0 12px; }
.guide p + p { margin-top: 0; }
.guide strong { font-weight: 600; }
.guide kbd { font: 500 .82em var(--f-ui); padding: 1px 6px; border: 1px solid var(--g-line); border-bottom-width: 2px; border-radius: 4px; background: var(--g-surface); }
.guide a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.guide :focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
.g-ui { font: 500 .92em var(--f-ui); background: var(--teal-soft); padding: 1px 6px; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.g-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Masthead: white dots with a few coral ones, on the dark ground only */
.g-mast {
  background-color: var(--deep); color: var(--paper);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.14) 1.1px, transparent 1.5px),
    radial-gradient(circle at 1px 1px, rgba(232,111,81,.6) 1.5px, transparent 1.9px);
  background-size: 22px 22px, 176px 154px;
  background-position: 0 0, 39px 61px;
  padding-inline: 20px; padding-block: 48px 40px;
}
.g-mast-in { max-width: 760px; margin: 0 auto; }
.g-mark { font: 600 .78rem/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; margin: 0; }
.g-mark b { color: var(--coral); font-weight: 600; }
.g-mast h1 { font: 600 clamp(2.5rem, 7vw, 3.8rem)/1.02 var(--f-display); margin: 16px 0 0; color: var(--paper); }
.g-mast h1 em { font-style: italic; font-weight: 500; color: var(--teal-lt); }
.guide .g-lede { max-width: 46ch; margin: 12px 0 0; font-size: 1.06rem; opacity: .9; }
.guide .g-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 18px 0 0; font: 500 .86rem var(--f-ui); opacity: .92; }
.g-who { padding: 6px 12px; border: 1.5px solid var(--coral); border-radius: 999px; }

/* Page */
.g-page { max-width: 760px; margin: 0 auto; padding-inline: 20px; padding-block: 28px 80px; }

/* Start here */
.g-start { background: var(--g-surface); border: 1px solid var(--g-line); border-radius: 16px; box-shadow: var(--g-shadow); padding: 22px 24px 18px; }
.g-start-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.g-start h2 { font: 600 1.9rem/1.1 var(--f-display); margin: 0; }
.g-progress { font: 500 .84rem var(--f-ui); color: var(--muted); }
.guide .g-start > p { color: var(--muted); margin: 6px 0 14px; }
.g-path { list-style: none; counter-reset: p; margin: 0; padding: 0; }
.g-path li { counter-increment: p; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--g-line); }
.g-path li::before { content: counter(p); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 1.1rem/1 var(--f-display); background: var(--coral-soft); color: var(--ink); }
.g-path label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding-top: 3px; }
.g-path input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--teal); flex: none; }
.g-path input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--g-line); }
.g-path .g-how { font: 500 .84rem var(--f-ui); white-space: nowrap; padding-top: 5px; }

/* Controls and groups */
.g-controls { display: flex; justify-content: flex-end; margin: 26px 0 0; }
.g-btn-quiet { font: 500 .86rem var(--f-ui); color: var(--ink); background: transparent; border: 1px solid var(--g-line); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.g-btn-quiet:hover { border-color: var(--teal); }
.g-group { margin-top: 30px; }
.guide .g-group-h { font: 600 .74rem/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin: 0 0 12px; }
.g-cards { display: grid; gap: 10px; }

/* Card */
details.g-card { background: var(--g-surface); border: 1px solid var(--g-line); border-radius: 14px; box-shadow: var(--g-shadow); scroll-margin-top: calc(var(--head-h) + 16px); }
details.g-card[open] { border-left: 3px solid var(--coral); }
details.g-card > summary { list-style: none; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; min-height: 64px; cursor: pointer; border-radius: 14px; }
details.g-card > summary::-webkit-details-marker { display: none; }
.g-n { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--coral); font: 600 1.15rem/1 var(--f-display); color: var(--ink); }
.g-n.g-ref { border-color: var(--g-line); font: 600 .9rem/1 var(--f-ui); color: var(--muted); }
.g-card h3 { font: 600 1.32rem/1.2 var(--f-display); margin: 0; }
.g-sum { display: block; font-size: .92rem; color: var(--muted); margin-top: 2px; }
.g-side { display: flex; align-items: center; gap: 10px; font: 500 .78rem var(--f-ui); color: var(--muted); white-space: nowrap; }
.g-chev { width: 18px; height: 18px; transition: transform .2s; }
details.g-card[open] .g-chev { transform: rotate(180deg); }
.g-card-body { padding: 4px 22px 20px 72px; }
.g-card-body > :last-child { margin-bottom: 0; }

/* Steps */
.g-steps { list-style: none; counter-reset: s; padding: 0; margin: 6px 0 16px; }
.g-steps > li { counter-increment: s; position: relative; padding-left: 40px; margin: 0 0 14px; }
.g-steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 .82rem/1 var(--f-ui); background: var(--coral-soft); color: var(--ink); }
.guide .g-steps > li > p { margin: 2px 0 8px; }

/* Screenshots */
figure.g-shot { margin: 8px 0 18px; }
figure.g-shot button { all: unset; display: block; cursor: zoom-in; border: 1px solid var(--g-line); border-radius: 10px; overflow: hidden; background: var(--g-shot-bg); box-shadow: var(--g-shadow); }
figure.g-shot button:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
figure.g-shot img { display: block; width: 100%; height: auto; max-width: 100%; max-height: 460px; object-fit: contain; background: var(--g-shot-bg); }
figure.g-shot.g-narrow { max-width: 320px; }
figure.g-shot.g-mid { max-width: 460px; }
figure.g-shot figcaption { margin-top: 6px; font-size: .86rem; color: var(--muted); }

/* Notes */
.g-note { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; padding: 12px 16px; border-radius: 10px; margin: 6px 0 16px; background: var(--teal-soft); }
.g-note.g-warn { background: var(--coral-soft); }
.g-note b { font: 600 .7rem/1.9 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.g-note.g-warn b { color: var(--ink); }
.guide .g-note p:last-child { margin: 0; }

/* Facts list */
dl.g-facts { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0,1fr); gap: 8px 16px; margin: 6px 0 16px; padding: 14px 16px; border: 1px solid var(--g-line); border-radius: 10px; }
dl.g-facts dt { font: 600 .78rem var(--f-ui); color: var(--muted); padding-top: 2px; }
dl.g-facts dd { margin: 0; }

/* Card footer links */
.g-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--g-line); font: 500 .86rem var(--f-ui); }
.g-card-foot .g-next { font-weight: 600; text-decoration: none; }

/* Resources */
.g-res { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 6px 0 6px; }
.guide .g-res a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--g-line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.guide .g-res a:hover { border-color: var(--teal); }
.g-res .g-k { display: flex; justify-content: space-between; gap: 8px; font: 600 .68rem/1.3 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.g-res .g-k span + span { color: var(--muted); letter-spacing: .02em; text-transform: none; font-weight: 500; }
.g-res .g-t { font: 600 1.18rem/1.2 var(--f-display); }
.g-res .g-d { font-size: .88rem; color: var(--muted); }
.guide .g-res a.g-feature { grid-column: 1 / -1; background: var(--deep); border-color: var(--deep); color: var(--paper); }
.g-res a.g-feature .g-k { color: var(--teal-lt); }
.g-res a.g-feature .g-k span + span, .g-res a.g-feature .g-d { color: var(--paper); opacity: .85; }

/* Help */
.g-help { margin-top: 36px; padding: 22px 24px; border-radius: 16px; background: var(--deep); color: var(--paper); }
.g-help h2 { font: 600 1.7rem/1.1 var(--f-display); margin: 0 0 6px; color: var(--paper); }
.guide .g-help p { margin: 0 0 4px; opacity: .92; }
.g-help .g-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; }
.g-help .g-addr { font: 600 1.02rem var(--f-ui); user-select: all; overflow-wrap: anywhere; }
.guide .g-help a { color: var(--paper); text-decoration-color: var(--coral); }
.g-btn-copy { font: 600 .86rem var(--f-ui); color: var(--ink); background: var(--coral); border: 0; border-radius: 999px; padding: 9px 16px; cursor: pointer; }
.guide .g-foot { margin-top: 22px; font-size: .82rem; color: var(--muted); }

/* Lightbox */
dialog.g-lb { border: 0; padding: 0; background: transparent; max-width: min(1400px, 96vw); }
dialog.g-lb::backdrop { background: rgba(8,20,24,.88); }
dialog.g-lb img { display: block; max-width: 100%; max-height: 86vh; border-radius: 8px; background: #fff; }
dialog.g-lb button { position: absolute; top: 8px; right: 8px; font: 600 .82rem var(--f-ui); padding: 8px 14px; border: 0; border-radius: 999px; background: var(--g-surface); color: var(--ink); cursor: pointer; }

@media (max-width: 640px) {
  .guide { font-size: 16px; }
  .g-mast { padding-block: 32px 28px; padding-inline: 16px; }
  .g-page { padding-inline: 16px; }
  .g-start { padding: 18px 16px 12px; }
  .g-path li { grid-template-columns: 32px minmax(0,1fr); }
  .g-path .g-how { grid-column: 2; padding-top: 0; }
  details.g-card > summary { grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; padding: 12px 14px; }
  .g-n { width: 32px; height: 32px; font-size: 1rem; }
  .g-side .g-count { display: none; }
  .g-card-body { padding: 2px 16px 18px; }
  .g-res { grid-template-columns: minmax(0,1fr); }
  dl.g-facts { grid-template-columns: minmax(0,1fr); gap: 0 0; }
  dl.g-facts dd { margin-bottom: 8px; }
  .g-help { padding: 20px 16px; }
  /* Wide UI strips: crop to the part that matters, full image on tap */
  figure.g-shot.g-wide img { aspect-ratio: 4 / 3; object-fit: cover; object-position: var(--focus, 50% 50%); max-height: none; }
}
@media (prefers-reduced-motion: reduce) { .g-chev { transition: none; } }
