/* Coach Support docs — layout on top of ../styles.css's own instrument-panel
   tokens (--av-*, --font-*). Mirrors mission-spec/docs.css's docs-shell
   convention so both subsections share one visual language. */

.docs-shell {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
}

.docs-sidebar {
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: 73px; /* nav height */
  height: calc(100vh - 73px);
  overflow-y: auto;
  padding: 40px 20px 60px 24px;
  border-right: 1px solid var(--av-border);
}

.docs-sidebar-group {
  margin-bottom: 28px;
}

.docs-sidebar-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  color: var(--av-muted);
  margin: 0 0 10px;
  font-weight: 600;
}

.docs-sidebar a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--av-label);
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -11px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.docs-sidebar a:hover { color: var(--av-white); }
.docs-sidebar a.is-active { color: var(--av-amber); border-left-color: var(--av-amber); font-weight: 600; }

.docs-content {
  flex: 1;
  min-width: 0;
  padding: 48px 56px 140px;
  max-width: 880px;
}

.docs-back {
  font-size: 13px;
  margin: 0 0 16px;
}
.docs-back a { color: var(--av-amber); }
.docs-back a:hover { border-bottom: 1px solid rgba(255,158,10,0.35); }

.docs-kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--av-amber);
  margin: 0 0 10px;
  font-weight: 600;
}

.docs-content h1 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.docs-lede {
  color: var(--av-label);
  font-size: 16px;
  line-height: 1.7;
  max-width: 68ch;
  margin: 0 0 40px;
}

.docs-content h2 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 56px 0 6px;
  padding-top: 8px;
  border-top: 1px solid var(--av-border);
  scroll-margin-top: 90px;
}
.docs-content h2 .eyebrow-num {
  color: var(--av-amber);
  font-family: var(--font-mono);
  margin-right: 10px;
}

.docs-content h2:first-of-type { border-top: none; margin-top: 8px; }

.docs-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 30px 0 8px;
  scroll-margin-top: 90px;
}

.docs-section-note {
  color: var(--av-muted);
  font-size: 13.5px;
  margin: 0 0 20px;
}

.docs-content p { color: var(--av-label); font-size: 15px; line-height: 1.75; margin: 0 0 16px; }
.docs-content li { color: var(--av-label); font-size: 15px; line-height: 1.7; }
.docs-content ul, .docs-content ol { padding-left: 22px; margin: 0 0 16px; }
.docs-content strong { color: var(--av-white); }
.docs-content a.inline-link { color: var(--av-amber); border-bottom: 1px solid rgba(255,158,10,0.35); }
.docs-content a.inline-link:hover { border-bottom-color: var(--av-amber); }

code, .docs-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--av-white);
}

/* ---------- callouts ---------- */
.docs-callout {
  border-left: 2px solid var(--av-green);
  padding: 10px 0 10px 16px;
  margin: 18px 0;
}
.docs-callout p { color: var(--av-white); font-size: 14px; margin: 0; }
.docs-callout.warn { border-left-color: var(--av-amber); }
.docs-callout.danger { border-left-color: var(--av-red); }

/* ---------- quick-nav chip row (top of index) ---------- */
.chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0 40px;
}

.chip-card {
  display: block;
  background: var(--av-panel);
  border: 1px solid var(--av-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.chip-card:hover { border-color: var(--av-amber-dim); transform: translateY(-2px); }
.chip-card .chip-title { font-weight: 700; color: var(--av-white); font-size: 14.5px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.chip-card .chip-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: var(--av-amber);
}
.chip-card .chip-icon svg { width: 100%; height: 100%; }
.chip-card .chip-desc { color: var(--av-muted); font-size: 13px; line-height: 1.5; }

/* ---------- feature screenshot figure ---------- */
.shot {
  margin: 20px 0 28px;
}
.shot img {
  display: block;
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--av-border);
  border-radius: var(--radius);
}
.shot figcaption {
  font-size: 13px;
  color: var(--av-muted);
  margin-top: 8px;
}
.shot-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}
.shot-row .shot { margin: 0; flex: 1; min-width: 220px; }

/* ---------- step list ---------- */
.docs-content ol.steps { padding-left: 0; list-style: none; counter-reset: step; }
.docs-content ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
}
.docs-content ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,158,10,0.12);
  color: var(--av-amber);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.docs-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  background: rgba(115,115,115,0.18);
  color: var(--av-muted);
  margin-left: 8px;
  vertical-align: middle;
}

/* ---------- mission route strip ---------- */
.route-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 28px;
}
.route-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--av-white);
  background: var(--av-panel);
  border: 1px solid var(--av-border);
  border-radius: 20px;
  padding: 6px 14px;
}
.route-arrow {
  color: var(--av-amber);
  font-size: 14px;
}

/* ---------- mission prev/next ---------- */
.docs-prev-next {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 48px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--av-border);
  font-size: 14px;
}

/* ---------- pack/mission index cards ---------- */
.pack-card {
  display: block;
  background: var(--av-panel);
  border: 1px solid var(--av-border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 0 0 16px;
  transition: border-color 0.2s ease;
}
.pack-card:hover { border-color: var(--av-amber-dim); }
.pack-card .pack-title { font-weight: 700; color: var(--av-white); font-size: 17px; margin-bottom: 6px; }
.pack-card .pack-desc { color: var(--av-muted); font-size: 13.5px; line-height: 1.6; margin: 0; }

.mission-list { list-style: none; padding: 0; margin: 0 0 24px; }
.mission-list li {
  border-bottom: 1px solid rgba(56,56,56,0.5);
}
.mission-list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 2px;
  color: var(--av-label);
  font-size: 14.5px;
}
.mission-list a:hover { color: var(--av-white); }
.mission-list .m-num {
  font-family: var(--font-mono);
  color: var(--av-amber);
  font-size: 12px;
  flex-shrink: 0;
  width: 20px;
}

/* ---------- annotated screenshot: hotspots + scroll-linked callouts ---------- */
.annotated {
  position: relative;
  display: flex;
  gap: 36px;
  align-items: flex-start;
  margin: 24px 0 44px;
}
.annotated-media {
  position: sticky;
  top: 96px;
  flex: 0 0 42%;
  max-width: 440px;
  border: 1px solid var(--av-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--av-black);
  line-height: 0;
}
.annotated-media img { display: block; width: 100%; height: auto; }
.hotspot {
  position: absolute;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(15,15,15,0.88);
  border: 2px solid var(--av-amber-dim);
  color: var(--av-amber);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 6;
  padding: 0;
  line-height: 1;
}
.hotspot:hover { border-color: var(--av-amber); }
.hotspot.is-active {
  background: var(--av-amber);
  border-color: var(--av-amber);
  color: var(--av-black);
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 0 0 7px rgba(255,158,10,0.16);
}
.annotated-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}
.annotated-line-path { fill: none; stroke: var(--av-amber); stroke-width: 1.5; opacity: 0.85; }
.annotated-line-dot { fill: var(--av-amber); }
.annotated-steps { flex: 1; min-width: 0; }
.annotated-step {
  padding: 16px 20px;
  margin-bottom: 12px;
  border: 1px solid var(--av-border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.012);
  opacity: 0.5;
  transition: opacity 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  scroll-margin-top: 100px;
}
.annotated-step.is-active {
  opacity: 1;
  border-color: var(--av-amber-dim);
  background: rgba(255,158,10,0.05);
}
.annotated-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(255,158,10,0.15);
  color: var(--av-amber);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  margin-right: 8px;
}
.annotated-step h4 { display: inline; font-size: 14.5px; color: var(--av-white); margin: 0; }
.annotated-step p { margin: 8px 0 0; }

@media (max-width: 900px) {
  .annotated { flex-direction: column; }
  .annotated-media {
    position: sticky;
    top: 12px;
    flex: none;
    max-width: 100%;
    margin-bottom: 18px;
    z-index: 2;
  }
  .annotated-lines { display: none; }
}

/* ---------- small linked-card gallery (e.g. "what's in the Toolbox") ---------- */
.mini-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 20px 0 32px;
}
.mini-gallery a {
  display: block;
  border: 1px solid var(--av-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--av-panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.mini-gallery a:hover { border-color: var(--av-amber-dim); transform: translateY(-2px); }
.mini-gallery img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--av-border); }
.mini-gallery .mg-label {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--av-white);
}
.mini-gallery .mg-label span { color: var(--av-amber); }

@media (max-width: 920px) {
  .docs-sidebar { display: none; }
  .docs-content { padding: 32px 20px 100px; max-width: 100%; }
  .chip-grid { grid-template-columns: 1fr; }
  .shot-row { flex-direction: column; }
}
