:root {
  --green: #24523f;
  --green-dark: #102f27;
  --paper: #f8faf6;
  --ink: #13231d;
  --muted: #6b7871;
  --line: #e3e8e3;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Segoe UI", sans-serif;
  line-height: 1.75;
}
main { max-width: 720px; margin: 0 auto; padding: 32px 20px 64px; }
header { margin-bottom: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; color: var(--green-dark); text-decoration: none; }
.brand img { border-radius: 10px; }
h1 { font-size: 26px; color: var(--green-dark); margin: 8px 0 12px; }
h2 { font-size: 18px; color: var(--green); margin: 28px 0 8px; }
h3 { font-size: 15px; margin: 18px 0 4px; }
p { margin: 0 0 12px; }
.meta { color: var(--muted); font-size: 13px; }
.mail { font-size: 17px; font-weight: 600; }
a { color: var(--green); }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

/* Guide (guide.html) */
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lang { font-size: 14px; color: var(--muted); }
.toc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px 14px 38px; margin: 16px 0 8px; }
.toc li { margin: 2px 0; }
.step { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.step > div { flex: 1 1 300px; min-width: 0; }
.step ol, .step ul { padding-left: 1.3em; margin: 0 0 12px; }
.step li { margin-bottom: 6px; }
figure { margin: 0; }
figure.phone { flex: 0 0 auto; width: 200px; }
figure.phone img { display: block; width: 100%; height: auto; border-radius: 26px; border: 6px solid #1b1f1e; box-shadow: 0 10px 24px rgba(16, 47, 39, .14); }
figure.watch { flex: 0 0 auto; width: 150px; }
figure.watch img { display: block; width: 100%; height: auto; border-radius: 38px; border: 8px solid #26292b; background: #000; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.tip { background: #edf4ed; border-radius: 12px; padding: 10px 14px; font-size: 14px; }
@media (max-width: 520px) {
  figure.phone { width: calc(50% - 9px); }
  figure.watch { width: calc(50% - 9px); max-width: 170px; }
}
.step.multi > div { flex-basis: 100%; }
.shots { display: flex; flex-wrap: wrap; gap: 18px; }
@media (max-width: 520px) {
  .shots figure.phone, .shots figure.watch { width: calc(50% - 9px); }
}

/* Guide v2: larger text for older eyes, quick start, numbered pins on screenshots */
main.guide { font-size: 17px; }
main.guide h2 { font-size: 21px; margin-top: 40px; padding-top: 4px; border-top: 1px solid var(--line); }
main.guide h3 { font-size: 17px; }
.quick { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; background: #fff; border: 2px solid #c4e6cf; border-radius: 18px; padding: 18px 18px 20px; margin: 18px 0 8px; }
.quick > div { flex: 1 1 280px; min-width: 0; }
.quick-title { font-size: 19px; font-weight: 800; color: var(--green-dark); margin-bottom: 8px; }
.quick ol { list-style: none; padding: 0; margin: 0 0 10px; }
.quick li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.no, .pin { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #e0702a; color: #fff; font-size: 15px; font-weight: 800; line-height: 1; }
.no { margin-top: 2px; }
figure.pinned { position: relative; }
.pin { position: absolute; width: 20px; height: 20px; font-size: 12px; transform: translate(-30%, -30%); box-shadow: 0 0 0 2px #fff, 0 1px 5px rgba(0,0,0,.35); }
.step b, .legend b { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #e0702a; color: #fff; font-size: 13px; margin-right: 4px; vertical-align: 2px; }
.legend { flex-basis: 100%; font-size: 15px; color: var(--muted); }
.small { font-size: 15px; color: var(--muted); }
.note { background: #fff6e0; border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.diagram { display: block; width: 100%; max-width: 560px; height: auto; margin: 6px 0 14px; }

/* Guide v3: iPhone / Apple Watch tabs, captions under pictures */
.tabs { display: flex; gap: 4px; margin: 22px 0 0; border-bottom: 2px solid var(--line); }
.tabs button { flex: 1; font: inherit; font-size: 17px; font-weight: 600; padding: 14px 10px; margin-bottom: -2px; border: 0; border-bottom: 3px solid transparent; border-radius: 12px 12px 0 0; background: none; color: var(--muted); cursor: pointer; }
.tabs button:hover { color: var(--green); }
.tabs button[aria-selected="true"] { background: #dce9de; color: var(--green-dark); font-weight: 800; border-bottom-color: var(--green); }
[role="tabpanel"] > .quick { margin-top: 14px; }
figcaption { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }
figcaption .ok, figcaption .ng { display: block; font-weight: 800; font-size: 15px; }
figcaption .ok { color: #2f7d52; }
figcaption .ng { color: #b9871a; }

/* Guide v4: pictures always under the text */
.step, .quick { flex-direction: column; align-items: stretch; }
.step > div, .quick > div { flex: none; }
.step > figure, .quick > figure { align-self: flex-start; }
.lang span { color: var(--ink); font-weight: 700; }
/* A pin just to the right of its element, level with it */
.pin.right { transform: translate(4px, -50%); }
/* Pictures under the text sit in the middle */
.shots { justify-content: center; }
.step > figure, .quick > figure { align-self: center; }
/* Pins sit on the picture only, not on its caption */
.pinbox { position: relative; display: block; }
/* An orange frame around the thing to look at */
.mark { position: absolute; border-radius: 8px; outline: 2.5px solid #e0702a; outline-offset: 2px; }
.shots-label { flex-basis: 100%; margin: 14px 0 0; text-align: center; font-size: 15px; font-weight: 800; color: var(--green); }
/* The part in brackets goes on its own, smaller line */
figcaption .cap2 { display: block; font-size: 12.5px; white-space: nowrap; }

/* Guide v5: the tabs stay at the top while scrolling; everything above them is compact */
main.guide { padding-top: 14px; }
main.guide header { margin-bottom: 6px; }
main.guide .brand { font-size: 18px; gap: 8px; }
main.guide .brand img { border-radius: 8px; }
main.guide h1 { font-size: 22px; margin: 2px 0 4px; }
main.guide .intro { font-size: 15px; line-height: 1.6; color: var(--muted); margin-bottom: 0; }
.tabs { position: sticky; top: 0; z-index: 10; background: var(--paper); margin-top: 12px; padding-top: 6px; }
.tabs button { padding: 10px 8px; font-size: 16px; }
main.guide h2, main.guide h3, main.guide .quick { scroll-margin-top: 118px; }
.tabs button { white-space: nowrap; }
@media (max-width: 420px) { .tabs button { font-size: 15px; padding: 10px 4px; } }
/* Covers the hairline some phones leave above a bar stuck at the top. */
.tabs { box-shadow: 0 -12px 0 var(--paper); }

/* Guide v6: the header stays at the top too, with the tabs right under it */
main.guide header { position: sticky; top: 0; z-index: 11; height: 48px; margin-bottom: 0; flex-wrap: nowrap; background: var(--paper); box-shadow: 0 -16px 0 var(--paper); }
main.guide h1 { margin-top: 0; }
.tabs { top: 48px; padding-top: 2px; }
/* Pins on rows that sit close together (practice time and Fade out) */
.pin.sm { width: 16px; height: 16px; font-size: 10px; box-shadow: 0 0 0 1.5px #fff, 0 1px 4px rgba(0,0,0,.3); }
@media (max-width: 520px) { .pin.sm { width: 13px; height: 13px; font-size: 8.5px; } }
/* Tempo Check's three watch screens: when they don't fit in one row, the target screen sits alone above the two results */
@media (max-width: 525px) {
  .shots.trio > figure:first-child { flex-basis: 100%; max-width: none; }
  .shots.trio > figure:first-child .pinbox { width: 150px; margin: 0 auto; }
}
@media (max-width: 520px) {
  .shots.trio > figure:first-child .pinbox { width: min(170px, calc(50% - 9px)); }
}
main.guide .intro { font-size: 16px; line-height: 1.75; color: inherit; margin: 0 0 8px; }
main.guide .estimate { margin: 4px 0 18px; }
/* A phrase that never breaks inside */
.ph { display: inline-block; }
