/* RiskProof staff how-to — TSK Royston. No external fonts or CDNs. */
:root {
  --teal: #0e7373;
  --teal-dark: #0a4f4f;
  --teal-deep: #083c3c;
  --teal-soft: #d7efef;
  --cream: #fff8eb;
  --cream-dark: #f3e6cf;
  --ink: #1c2428;
  --ink-soft: #3a474c;
  --line: #d5c7ad;
  --red: #ff1a1a;
  --card: #ffffff;
  --shadow: 0 8px 24px rgba(8, 44, 44, 0.12);
  --radius: 16px;
  --max: 980px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.45;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal);
  color: #fff;
  padding: 0.5rem 1rem;
}
.skip:focus { left: 0; z-index: 80; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--teal-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.site-header a.brand,
.site-header a.back {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}
.site-header .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
}
.site-header .title {
  font-size: 1rem;
  font-weight: 700;
  flex: 1;
  line-height: 1.2;
}
.site-header .sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.85;
}

.lang-toggle {
  appearance: none;
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  min-width: 72px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  margin-left: auto;
}
.lang-toggle:hover,
.lang-toggle:focus {
  background: #fff;
  color: var(--teal-dark);
  outline: none;
}

main { width: min(var(--max), calc(100% - 2rem)); margin: 1.25rem auto 6rem; }

.lead {
  font-size: 1.15rem;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

.nav-cards {
  display: grid;
  gap: 1rem;
}
.nav-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 2px solid var(--teal);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  min-height: 88px;
}
.nav-card:hover, .nav-card:focus {
  background: var(--teal-soft);
  outline: none;
}
.nav-card .num {
  flex: 0 0 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
  display: grid;
  place-items: center;
}
.nav-card .labels { flex: 1; }
.nav-card h2 {
  margin: 0;
  font-size: 1.15rem;
}
.nav-card p {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.nav-card .go {
  font-size: 1.6rem;
  color: var(--teal);
  font-weight: 700;
}

.guide-intro { margin-bottom: 1.25rem; }
.guide-intro h1 {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
  color: var(--teal-deep);
}
.guide-intro p { margin: 0; color: var(--ink-soft); }

.jump {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.8rem 0 0;
  padding: 0.7rem 1rem;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  min-height: 48px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}
.jump:hover, .jump:focus { background: var(--teal-dark); outline: none; }

.section-label {
  margin: 1.75rem 0 0.75rem;
  padding: 0.55rem 0.8rem;
  background: var(--teal-soft);
  border-left: 6px solid var(--teal);
  border-radius: 0 10px 10px 0;
  font-size: 1.05rem;
  color: var(--teal-deep);
}
.section-label h2 { margin: 0; font-size: 1.05rem; }

.step {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1rem 1.15rem;
  margin: 0 0 1.1rem;
  border: 1px solid var(--cream-dark);
}
.step .step-head { order: 1; }
.step .tip { order: 2; }
.step figure.shot { order: 3; }
.step .tip { margin-top: 0; margin-bottom: 0.8rem; }
.step-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.step-num {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.step-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--cream);
}
.step-icon.icon-app {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.step-icon.icon-home {
  object-fit: contain;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.step:not(:has(figure)) .step-head {
  margin-bottom: 0;
}
.step:not(:has(figure)):has(.tip) .step-head {
  margin-bottom: 0.75rem;
}
.step-head .action {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  flex: 1;
  padding-top: 0.2rem;
}
.step figure.shot {
  margin: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.shot-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  cursor: zoom-in;
  font: inherit;
}
.shot-open img {
  width: 100%;
  height: auto;
  background: #fff;
  pointer-events: none;
}
.shot-locator {
  width: 104px;
  margin-top: 0.6rem;
  border-color: #ff1a1a;
  border-width: 2px;
  border-radius: 8px;
  background: #fff;
}
.shot-locator img { background: #fff; }
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 20, 20, 0.92);
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem 1rem;
}
.lightbox.is-open {
  display: flex;
}
body.lb-open { overflow: hidden; }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 3.5rem);
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.lightbox .lb-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  appearance: none;
  border: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox .lb-close:focus {
  outline: 3px solid #ffe08a;
}
.action:focus { outline: none; }
.action:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.tip {
  margin: 0.8rem 0 0;
  padding: 0.7rem 0.85rem;
  background: var(--cream);
  border-left: 5px solid var(--teal);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
  font-size: 1rem;
}

.pager {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--teal-dark);
  color: #fff;
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
}
.pager-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pager button {
  appearance: none;
  border: 0;
  font: inherit;
  font-weight: 800;
  min-height: 56px;
  min-width: 56px;
  padding: 0 1rem;
  border-radius: 14px;
  background: #fff;
  color: var(--teal-dark);
  cursor: pointer;
}
.pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pager button.primary {
  flex: 1;
  background: #ffe08a;
  color: var(--ink);
}
.pager .count {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}
.mobile-start {
  display: none;
}

.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto 2rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* Phone: one step at a time, big pager */
@media (max-width: 767px) {
  html { font-size: 17px; }
  main { margin-bottom: 7.5rem; width: calc(100% - 1.25rem); }
  body.home main { margin-bottom: 2rem; }

  body.guide-page.step-mode .desktop-only { display: none; }
  body.guide-page.step-mode .section-label { display: none; }
  body.guide-page.step-mode .guide-intro p { display: none; }
  body.guide-page.step-mode .jump { display: none; }

  body.guide-page:not(.step-mode) .steps,
  body.guide-page:not(.step-mode) .section-label {
    display: none;
  }
  body.guide-page:not(.step-mode) .mobile-start {
    display: block;
    width: 100%;
    margin: 1rem 0 0;
    min-height: 56px;
    font-size: 1.15rem;
  }

  body.guide-page.step-mode .pager { display: block; }
  body.guide-page.step-mode .site-footer { display: none; }
  body.guide-page.step-mode .step { display: none; margin: 0; }
  body.guide-page.step-mode .step.is-current { display: block; }

  /* Leave room for the locator, tip and pager so required tips stay on screen. */
  body.guide-page.step-mode .shot-open:not(.shot-locator) {
    background: #fff;
  }
  body.guide-page.step-mode .step:has(.tip) .shot-open:not(.shot-locator) img {
    max-height: 34vh;
    width: 100%;
    object-fit: contain;
    object-position: center;
  }
  body.guide-page.step-mode .step:not(:has(.tip)) .shot-open:not(.shot-locator) img {
    max-height: 46vh;
    width: 100%;
    object-fit: contain;
    object-position: center;
  }
}


@media (min-width: 768px) {
  .nav-cards { grid-template-columns: 1fr; }
  .guide-intro h1 { font-size: 1.9rem; }
  .step { padding: 1.2rem 1.3rem 1.4rem; }
  .step-head .action { font-size: 1.2rem; }
  .shot-locator { width: 128px; }
  .shot-open:not(.shot-locator) img {
    max-height: 420px;
    width: 100%;
    object-fit: contain;
    object-position: center;
  }
}

@media (min-width: 900px) {
  .nav-cards { grid-template-columns: 1fr; }
}
