@import url('/assets/fonts/fonts.css');

:root {
  --navy: #021f3f;
  --navy-soft: #0e355f;
  --blue: #0442bf;
  --blue-light: #e9f0ff;
  --paper: #f4f7fb;
  --white: #fff;
  --ink: #15263a;
  --muted: #5e6c7c;
  --line: #dbe3ec;
  --tip: #e9f7f1;
  --tip-line: #16845d;
  --warn: #fff5df;
  --warn-line: #b66a08;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Montserrat', 'Helvetica Neue', sans-serif;
  --shadow: 0 18px 50px rgba(2, 31, 63, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
}

body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #397aff, var(--blue));
}

img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
button, input { font: inherit; }
h1, h2, h3 { margin: 0; color: var(--navy); font-family: var(--font-display); line-height: 1.12; text-transform: uppercase; }
h1 { font-size: clamp(2.7rem, 7vw, 5.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { margin-bottom: 16px; font-size: clamp(1.4rem, 2vw, 1.75rem); letter-spacing: .015em; }
p { margin: 0 0 18px; }
strong { color: var(--navy); }

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--white);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.help-header {
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid rgba(2, 31, 63, .08);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}
.header-inner {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.help-brand { display: flex; }
.help-brand img { width: 220px; }
.back-app {
  display: inline-flex;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: white;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
}
.back-app:hover { background: #05399e; }

.help-hero {
  overflow: hidden;
  position: relative;
  padding: 72px 20px 78px;
  background:
    radial-gradient(circle at 82% 15%, rgba(61, 120, 255, .26), transparent 28%),
    repeating-linear-gradient(60deg, transparent 0 40px, rgba(255,255,255,.025) 40px 41px),
    var(--navy);
  color: white;
}
.help-hero::after {
  content: 'HELP';
  position: absolute;
  right: -18px;
  bottom: -62px;
  color: rgba(255,255,255,.035);
  font: 700 clamp(8rem, 22vw, 20rem)/1 var(--font-display);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; width: min(920px, 100%); margin: auto; text-align: center; }
.help-hero h1 { margin-bottom: 20px; color: white; }
.help-hero > .hero-inner > p:not(.eyebrow) { max-width: 690px; margin: 0 auto 36px; color: #d8e4f2; font-size: 1.05rem; }
.eyebrow, .kicker {
  margin: 0 0 10px;
  color: #4f83ff;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.toc-toggle { display: none; }
.help-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 760px);
  width: min(1100px, calc(100% - 40px));
  margin: 52px auto 100px;
  align-items: start;
  justify-content: center;
  gap: 66px;
}
.help-sidebar { position: sticky; top: 100px; max-height: calc(100vh - 125px); overflow: auto; }
.help-sidebar nav { display: grid; gap: 2px; border-left: 2px solid var(--line); }
.help-sidebar a {
  padding: 8px 0 8px 18px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transform: translateX(-2px);
}
.help-sidebar a:hover { color: var(--blue); }
.help-sidebar a.active { border-left-color: var(--blue); color: var(--blue); }

.help-chapter { margin-bottom: 86px; scroll-margin-top: 96px; }
.chapter-heading { display: flex; margin-bottom: 32px; align-items: flex-end; gap: 18px; }
.chapter-number { color: #c6d1dd; font: 700 3.5rem/.85 var(--font-display); }
.chapter-heading .kicker { margin-bottom: 6px; }

.help-topic {
  margin-bottom: 24px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 35px rgba(2, 31, 63, .045);
  scroll-margin-top: 98px;
}
.help-topic > :last-child { margin-bottom: 0; }
.help-topic ul:not(.legend):not(.check-list), .help-topic ol:not(.steps) { padding-left: 22px; }

.steps { display: grid; margin: 24px 0; padding: 0; gap: 13px; list-style: none; }
.steps li { display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 13px; }
.steps li > span { display: grid; width: 32px; height: 32px; border-radius: 50%; place-items: center; background: var(--blue); color: white; font-size: .78rem; font-weight: 700; }
.steps li > div { padding-top: 2px; }
.steps.compact { gap: 9px; }

.callout { margin: 25px 0; padding: 18px 20px; border-left: 4px solid; border-radius: 0 10px 10px 0; }
.callout strong { display: block; margin-bottom: 3px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.callout p { margin: 0; }
.callout.tip { border-color: var(--tip-line); background: var(--tip); }
.callout.tip strong { color: var(--tip-line); }
.callout.important { border-color: var(--warn-line); background: var(--warn); }
.callout.important strong { color: var(--warn-line); }

.help-figure { margin: 28px 0; text-align: center; }
.help-figure img { display: block; width: 100%; margin: auto; border: 1px solid var(--line); border-radius: 12px; background: #e9eef4; box-shadow: var(--shadow); }
.help-figure figcaption { max-width: 620px; margin: 13px auto 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.email-shot img { max-width: 660px; }
.phone-shot img { max-width: 360px; }
.wide-shot img { max-width: 680px; }
.shot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.shot-pair .help-figure { margin-top: 20px; }

.legend, .check-list { display: grid; margin: 22px 0; padding: 0; gap: 13px; list-style: none; }
.legend li { display: flex; align-items: center; gap: 13px; }
.legend-dot { display: inline-block; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; }
.legend-dot.selected { background: var(--blue); box-shadow: inset 0 0 0 5px white; outline: 2px solid var(--blue); }
.legend-dot.today { border: 2px solid var(--blue); background: white; }
.legend-dot.workout { width: 9px; height: 9px; margin: 0 7px; background: var(--blue); }
.check-list li { position: relative; padding-left: 28px; }
.check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--tip-line); font-weight: 800; }

.rm-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0; gap: 12px; }
.rm-grid > div { display: grid; padding: 18px 12px; border: 1px solid #cbd9f5; border-radius: 10px; background: var(--blue-light); text-align: center; }
.rm-grid strong { color: var(--blue); font: 700 1.5rem var(--font-display); }
.rm-grid span { color: var(--muted); font-size: .76rem; line-height: 1.4; }

.do-dont { display: grid; grid-template-columns: 1fr 1fr; margin: 24px 0; gap: 14px; }
.do-dont > div { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.do-dont strong { display: block; margin-bottom: 10px; }
.do-dont ul { margin: 0; padding-left: 18px; }

.faq-list { padding: 10px 30px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary { position: relative; padding: 22px 42px 22px 0; color: var(--navy); font-weight: 700; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; top: 13px; right: 2px; color: var(--blue); font: 500 2rem var(--font-display); }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details > div { padding: 0 30px 8px 0; color: var(--muted); }

.glossary dl { margin: 0; }
.glossary dl > div { display: grid; grid-template-columns: 150px 1fr; padding: 15px 0; border-bottom: 1px solid var(--line); gap: 20px; }
.glossary dl > div:last-child { border-bottom: 0; }
.glossary dt { color: var(--blue); font-weight: 800; }
.glossary dd { margin: 0; color: var(--muted); }

.help-footer { padding: 34px 20px; background: var(--navy); color: #b9c8d8; font-size: .75rem; text-align: center; }
.help-footer p { margin: 3px; }

@media (max-width: 850px) {
  html { scroll-padding-top: 78px; }
  .help-layout { display: block; width: min(720px, calc(100% - 28px)); margin-top: 30px; }
  .toc-toggle {
    display: flex;
    position: sticky;
    top: 71px;
    z-index: 80;
    width: 100%;
    min-height: 48px;
    padding: 10px 18px;
    border: 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
    justify-content: space-between;
    background: white;
    color: var(--navy);
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
  }
  .help-sidebar {
    display: none;
    position: sticky;
    top: 119px;
    z-index: 75;
    max-height: calc(100vh - 130px);
    margin: -30px -14px 30px;
    padding: 16px 24px 22px;
    border-bottom: 1px solid var(--line);
    background: white;
    box-shadow: 0 16px 30px rgba(2,31,63,.12);
  }
  .help-sidebar.open { display: block; }
  .help-sidebar nav { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .header-inner { width: calc(100% - 28px); min-height: 66px; }
  .help-brand img { width: 165px; }
  .back-app { min-height: 38px; padding: 8px 12px; font-size: .72rem; }
  .help-hero { padding: 50px 18px 58px; }
  .help-hero > .hero-inner > p:not(.eyebrow) { font-size: .94rem; }
  .toc-toggle { top: 65px; }
  .help-sidebar { top: 113px; }
  .help-sidebar nav { grid-template-columns: 1fr; }
  .help-chapter { margin-bottom: 62px; }
  .chapter-heading { gap: 12px; }
  .chapter-number { font-size: 2.8rem; }
  .help-topic { padding: 24px 20px; border-radius: 12px; }
  .shot-pair, .do-dont { grid-template-columns: 1fr; }
  .rm-grid { gap: 7px; }
  .rm-grid > div { padding: 14px 7px; }
  .rm-grid span { font-size: .68rem; }
  .glossary dl > div { grid-template-columns: 1fr; gap: 3px; }
  .faq-list { padding: 6px 20px; }
  .email-shot { margin-left: -10px; margin-right: -10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .help-header, .help-hero, .toc-toggle, .help-sidebar, .help-footer { display: none; }
  body { background: white; color: black; font-size: 11pt; }
  .help-layout { display: block; width: 100%; margin: 0; }
  .help-chapter { break-before: page; margin: 0; }
  .help-chapter:first-of-type { break-before: auto; }
  .help-topic { break-inside: avoid; border: 0; box-shadow: none; }
  .help-figure img { max-height: 150mm; width: auto; box-shadow: none; }
}
