/* The guide's look, shared by guide.html, guide.pl.html and guide.es.html (moved out of guide.html
   2 Oct 2026 so the three languages never drift apart). Same tokens as the app. */
/* Dark (2 Oct 2026), same ground as the app and the same switch (Account > Appearance). */
:root[data-theme="dark"] { --bg: #171310; --bg2: #221d18; --border: #3a322a; --border2: #4b4237; --text: #eee7db; --muted: #b4a896; --faint: #877c6d; --accent: #db7040; --green: #86b46f; --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #171310; --bg2: #221d18; --border: #3a322a; --border2: #4b4237; --text: #eee7db; --muted: #b4a896; --faint: #877c6d; --accent: #db7040; --green: #86b46f; --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark; } }
:root {
  --bg:      #f4efe6;
  --bg2:     #fdfaf4;
  --border:  #e2d9c9;
  --border2: #d2c6b1;
  --text:    #231f1a;
  --muted:   #6a6053;
  --faint:   #8d8272;
  --accent:  #b45527;
  --green:   #4f7a3f;
  --shadow:  0 1px 2px rgba(35, 31, 26, .05);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 34rem; margin: 0 auto; padding: 2rem 1rem 4rem; }
.eyebrow {
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint); margin: 0;
}
h1 {
  font-family: 'Bebas Neue', Impact, sans-serif; font-size: clamp(3.25rem, 17vw, 4.75rem);
  line-height: .9; letter-spacing: .02em; color: var(--accent); margin: .35rem 0 0;
}
.masthead { border-bottom: 2px solid var(--accent); padding-bottom: 1.5rem; }
.lede { font-size: 1.0625rem; margin: 1rem 0 0; text-wrap: pretty; }
.intro { display: flex; flex-direction: column; gap: .9rem; margin: 1.75rem 0 2.5rem; }
.intro p { margin: 0; color: var(--muted); }

h2 {
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border);
}
.steps { display: flex; flex-direction: column; gap: 1.5rem; margin: 0 0 3rem; }
.step { display: grid; grid-template-columns: 2.25rem 1fr; gap: .9rem; align-items: start; }
.num {
  font-family: 'Bebas Neue', Impact, sans-serif; font-size: 1.9rem; line-height: 1;
  color: var(--accent); text-align: right; padding-top: .1rem;
}
.step h3 { font-size: 1.0625rem; font-weight: 700; margin: 0 0 .35rem; text-wrap: balance; }
.step p { margin: 0 0 .55rem; }
.step p:last-child { margin-bottom: 0; }
.step ul { margin: 0 0 .55rem; padding-left: 1.1rem; }
.step li { margin-bottom: .3rem; }

b.tap { font-weight: 700; color: var(--accent); }
.note {
  background: var(--bg2); border: 1px solid var(--border); border-left: 3px solid var(--green);
  border-radius: 8px; padding: .75rem .85rem; font-size: .9375rem; color: var(--muted);
  box-shadow: var(--shadow); margin-bottom: .55rem;
}
.note strong { color: var(--text); }

.faq { display: flex; flex-direction: column; gap: 1rem; margin: 0 0 3rem; }
.faq h3 { font-size: 1rem; margin: 0 0 .25rem; }
.faq p { margin: 0; color: var(--muted); font-size: .9375rem; }
.faq p + p, .faq ol + p { margin-top: .5rem; }
.faq ol { margin: .5rem 0 0; padding-left: 1.15rem; color: var(--muted); font-size: .9375rem; }
.faq li { margin-bottom: .3rem; }
/* Messaging your trainer is a headline feature, so it gets its own section near the top and an
   accent box, not an h3 buried under Your week (Del, 1 Oct). */
.faq > .pt { background: color-mix(in srgb, var(--accent) 6%, var(--bg2)); border: 1.5px solid var(--accent);
  border-radius: 14px; padding: 1.1rem 1.2rem 1.2rem; box-shadow: var(--shadow); }
.faq > .pt h3 { font-size: 1.35rem; color: var(--accent); margin-bottom: .35rem; text-wrap: balance; }
.faq > .pt p.pt-lead { color: var(--text); font-size: 1rem; font-weight: 500; margin-bottom: .6rem; }
/* The RiR scale, in the badge colours the app paints each pick in (css/style.css .rir-badge.rir-N),
   so what the reader learns here is what they see in the reps box. */
.rir-scale { display: grid; grid-template-columns: auto 1fr; gap: .45rem .7rem; align-items: center;
  margin: .75rem 0; padding: .8rem .9rem; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; font-size: .9375rem; }
.rir-chip { min-width: 2.4em; padding: .15em .5em; border-radius: 1em; color: #fff; text-align: center;
  font-family: 'DM Mono', ui-monospace, monospace; font-size: .8125rem; font-weight: 500; }
.rir-chip.r0 { background: #a63f30; }
.rir-chip.r1 { background: #c2702a; }
.rir-chip.r2 { background: #9a6a17; }
.rir-chip.r3 { background: #4f7a3f; }
.rir-chip.r4 { background: #3a6b96; }

.report {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.15rem; box-shadow: var(--shadow);
}
.report ol { margin: 0; padding-left: 1.15rem; }
.report li { margin-bottom: .4rem; }
.report p { margin: .9rem 0 0; color: var(--muted); font-size: .9375rem; }
.report p.lead-in { margin-top: 0; color: var(--text); }

footer {
  margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
  font-family: 'DM Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .06em;
  color: var(--faint); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Back to the app. Same tab by design: a new tab from an installed app strands the user. */
.back { display: inline-block; font-family: "DM Mono", ui-monospace, monospace; font-size: 12px;
  letter-spacing: .06em; text-decoration: none; color: var(--accent); padding: .5rem 0; margin: 0 0 1rem; }
/* Home: always on screen, so leaving the guide is one tap from anywhere in it. It loads the app
   (which opens on Home) instead of stepping back, since back first undoes every #link followed. */
.home-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border2); background: var(--bg2);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(35, 31, 26, .12); }
.home-fab svg { width: 20px; height: 20px; }
/* Back to top: appears once the reader has scrolled a screen down, stacked above Home. */
.to-top { position: fixed; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border2);
  background: var(--bg2); color: var(--accent); font-size: 20px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(35, 31, 26, .12); opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* ── PICTURES (29 Sept 2026) ─────────────────────────────────────────────────────────────────
   Each one is a page in guide-figs/: a real screen drawn with the app's own css/style.css and
   made-up data, framed here as a phone. The page lays out at 390px, a real phone's width, and is
   scaled down to whatever the column has (fitShot below), so it is the same picture on a phone
   and on the PC. The ring marks the one thing to tap. A step with more than one screen gets a
   row you swipe, with the next phone peeking in from the right so the swipe is discoverable. */
.shots { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: .75rem -1rem 1.1rem 0; padding: 4px 1rem 6px 0; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 min(230px, 76%); margin: 0; scroll-snap-align: start; }
.shot.solo { width: min(250px, 100%); margin: .75rem 0 1.1rem; }
.phone { position: relative; overflow: hidden; box-sizing: content-box; border: 7px solid #1d1a16;
  border-radius: 30px; background: var(--bg); box-shadow: 0 6px 18px rgba(35, 31, 26, .14); }
.phone iframe { position: absolute; top: 0; left: 0; width: 390px; border: 0;
  transform-origin: 0 0; pointer-events: none; }
.shot figcaption { font-size: .875rem; line-height: 1.45; color: var(--muted); margin-top: .6rem; text-wrap: pretty; }
.shot figcaption b { color: var(--text); }
/* The same red as the rings in the pictures, so ① in a caption is visibly ① on the screen. */
.n { display: inline-block; width: 1.2em; height: 1.2em; border-radius: 50%; background: #e8412c;
  color: #fff; font-size: .75em; font-weight: 700; line-height: 1.2em; text-align: center; vertical-align: .1em; }
.step p.swipe { font-family: 'DM Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .06em;
  color: var(--faint); margin: .75rem 0 -.35rem; }
.step p.sub { font-weight: 700; margin: 1.1rem 0 .2rem; }
/* A grid column grows to its content's minimum by default, and a row of phones must never be what
   widens the page into a sideways scroll. */
.step > div { min-width: 0; }

/* Justified body text (29 Sept 2026). A phone column is narrow, so justifying alone opens wide gaps
   between words; hyphenation lets a long word break and keeps the spacing even. Captions and the
   one-line labels stay ragged: too short to justify cleanly. */
.lede, .intro p, .step p, .step li, .faq p, .faq li, .report p, .report li, .note {
  text-align: justify; -webkit-hyphens: auto; hyphens: auto;
}

/* ── FINDING YOUR WAY (1 Oct 2026) ───────────────────────────────────────────────────────────
   Del: the guide took too long to get around on a phone, and was too small on a PC. One finder
   does both jobs. On a phone, a bar sticks to the top saying where you are (and how far down, the
   line under it), and a tap opens the finder as a sheet: type to search every topic's words, or
   tap a topic to jump there. On a PC the same finder is a column down the left that is always
   open and follows you as you read, and the reading column is wider and larger. */
.step, .faq > div, .report { scroll-margin-top: 76px; }
.where { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 12px;
  width: calc(100% + 2rem); margin: 0 -1rem 1.25rem; padding: calc(.55rem + env(safe-area-inset-top)) 1rem .6rem;
  background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 0; border-bottom: 1px solid var(--border); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.where::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--read, 0%); background: var(--accent); }
.where-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.where-sec { font-family: 'DM Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.where-topic { font-weight: 700; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.where-find { flex: none; display: flex; align-items: center; gap: 6px; border: 1px solid var(--border2); background: var(--bg2);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 700; color: var(--accent); }
.where-find svg { width: 14px; height: 14px; }

.finder { position: fixed; inset: 0; z-index: 20; visibility: hidden; transition: visibility 0s .25s; }
.finder.open { visibility: visible; transition: none; }
.finder-scrim { position: absolute; inset: 0; background: rgba(35, 31, 26, .35); opacity: 0; transition: opacity .25s; }
.finder.open .finder-scrim { opacity: 1; }
.finder-panel { position: absolute; left: 0; right: 0; bottom: 0; top: max(8vh, calc(env(safe-area-inset-top) + 24px));
  display: flex; flex-direction: column; background: var(--bg); border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 30px rgba(35, 31, 26, .18); transform: translateY(100%); transition: transform .25s ease; }
.finder.open .finder-panel { transform: none; }
.finder-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
#guide-find { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border2);
  border-radius: 10px; background: var(--bg2); color: var(--text); -webkit-appearance: none; appearance: none; }
#guide-find:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.finder-close { flex: none; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; padding: 8px 4px; cursor: pointer; }
.finder-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 4px 8px calc(16px + env(safe-area-inset-bottom)); }
.f-sec { font-family: 'DM Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); padding: 16px 10px 4px; }
.f-item { display: flex; gap: 8px; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 15px;
  line-height: 1.35; color: var(--text); padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.f-item:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.f-item.cur { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-weight: 700; }
.f-item span { min-width: 0; }
.f-item small { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); font-weight: 400; margin-top: 3px; }
.f-num { flex: none; width: 1.1em; font-family: 'Bebas Neue', Impact, sans-serif; font-size: 1.15em; line-height: 1.15; color: var(--accent); }
.f-item mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.f-none { padding: 18px 10px; color: var(--muted); font-size: 15px; }
html.finder-on { overflow: hidden; }
/* Where a jump lands: a short warm wash so the eye finds the topic on a long page. */
.hit { animation: hit 1.8s ease-out; border-radius: 8px; }
@keyframes hit { from { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 14%, transparent); } }
@media (prefers-reduced-motion: reduce) {
  .finder-panel, .finder-scrim { transition: none; } .hit { animation: none; }
}

/* A PC: the finder is a column down the left, always open; the reading column is wider and the
   type and pictures larger. */
/* ── ONE TOPIC AT A TIME (26 Oct 2026) ───────────────────────────────────────────────────────
   js/guide.js marks every step and topic .topic and opens one (.active). With none open, a phone
   shows the start page (masthead, intro, a card per section); a PC shows the intro and Start. */
.topic:not(.active), .wrap > h2, .faq > p { display: none; }
.steps, .faq { margin: 0; gap: 0; }
body.has-topic .masthead, body.has-topic .intro, body.has-topic .hub, body.has-topic .start, body.has-topic a.back { display: none; }
.top-back { display: none; }
body.has-topic .top-back { display: inline-block; font-family: 'DM Mono', ui-monospace, monospace; font-size: 13px; letter-spacing: .04em;
  border: 0; background: none; color: var(--accent); padding: .5rem 0; margin: 0 0 1rem; cursor: pointer; }
.start { display: none; }
.hub { display: flex; flex-direction: column; gap: 1rem; margin: 0 0 2rem; }
.hub-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: .4rem .4rem .5rem; box-shadow: var(--shadow); }
.hub-head { border: 0; margin: 0; padding: .7rem .7rem .35rem; }
.hub-item { display: flex; align-items: center; gap: .65rem; width: 100%; min-height: 48px; text-align: left; border: 0; background: none;
  font: inherit; font-size: 1rem; font-weight: 500; line-height: 1.3; color: var(--text); padding: .55rem .7rem; border-radius: 9px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.hub-item + .hub-item { border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; }
.hub-item:active, .hub-item:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.hub-num { flex: none; width: 1.3rem; font-family: 'Bebas Neue', Impact, sans-serif; font-size: 1.4rem; line-height: 1; color: var(--accent); text-align: center; }
.hub-title { flex: 1; min-width: 0; }
.hub-go { flex: none; font-size: 1.4rem; line-height: 1; color: var(--faint); }
.topic-nav { display: flex; flex-direction: column; gap: .6rem; margin: 2.5rem 0 0; }
.topic-nav:empty { display: none; }
.topic-nav button { font: inherit; cursor: pointer; border-radius: 12px; padding: .8rem 1rem; text-align: left; -webkit-tap-highlight-color: transparent; }
.nav-next { order: -1; border: 0; background: var(--accent); color: #fff; font-weight: 700; font-size: 1.0625rem; line-height: 1.3; }
.nav-next small { display: block; font-family: 'DM Mono', ui-monospace, monospace; font-size: 11px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; opacity: .85; margin-bottom: .15rem; }
.nav-all { border: 1px solid var(--border2); background: var(--bg2); color: var(--accent); font-weight: 700; }

@media (min-width: 1100px) {
  body { font-size: 18px; }
  .layout { display: grid; grid-template-columns: 280px minmax(0, 50rem); gap: 5rem; justify-content: center; padding: 0 2.5rem; }
  .wrap { max-width: none; margin: 0; padding: 2.75rem 0 6rem; }
  .where { display: none; }
  .step, .faq > div, .report { scroll-margin-top: 28px; }  .finder { position: sticky; top: 0; inset: auto; height: 100vh; visibility: visible; z-index: auto; transition: none; padding: 2.75rem 0 1.5rem; }
  .finder-scrim, .finder-close { display: none; }
  .finder-panel { position: static; height: 100%; transform: none; transition: none; background: none; box-shadow: none; border-radius: 0; }
  .finder-head { padding: 0 0 10px; border: 0; }
  .finder-list { padding: 0 0 1rem; margin: 0 -10px; }
  .f-item { font-size: 15px; }
  .eyebrow, h2 { font-size: 12px; }
  h1 { font-size: 6.5rem; }
  .lede { font-size: 1.2rem; }
  .step { grid-template-columns: 3rem 1fr; gap: 1.4rem; }
  .num { font-size: 2.5rem; }
  .step h3 { font-size: 1.3rem; }
  .steps { gap: 2.25rem; }
  .faq { gap: 1.5rem; }
  .faq h3 { font-size: 1.15rem; }
  .faq > .pt h3 { font-size: 1.6rem; }
  .faq > .pt p.pt-lead { font-size: 1.1rem; }
  .faq p, .faq ol, .note, .report p, .shot figcaption { font-size: 1rem; }
  .shots { gap: 22px; margin-right: 0; padding-right: 0; }
  .shot { flex-basis: 300px; }
  .shot.solo { width: 320px; }
  .hub, body.has-topic .top-back, .nav-all { display: none; }
  .start { display: inline-block; font: inherit; font-weight: 700; border: 0; border-radius: 12px; background: var(--accent);
    color: #fff; padding: .85rem 1.4rem; cursor: pointer; }
  .topic-nav { flex-direction: row; }
  .nav-next { min-width: 22rem; }
  .home-fab { right: 28px; bottom: 28px; }
  .to-top { right: 28px; bottom: 84px; }
}
