/* how-to-use.css — app user guide (/net-speed-meter/how-to-use). Tokens only (Ground Rule 10).
   Screenshots open in the shared lightbox (gallery.css + screenshot-gallery.js). */

/* ---- Hero ---- */
.guide-hero { padding-block: var(--sp-6) var(--sp-7); background: var(--grad-hero); }
.guide-hero__grid { display: grid; gap: var(--sp-6); align-items: center; }
.guide-hero__id { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.guide-hero__icon { width: var(--app-icon); height: var(--app-icon); border-radius: var(--r-md); }
.guide-hero__lead { margin-top: var(--sp-3); max-width: 56ch; }
.guide-hero__actions { margin-top: var(--sp-5); }

@media (min-width: 992px) {
  .guide-hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--sp-7); }
}

@media (max-width: 575.98px) {
  .guide-hero__actions > * { width: 100%; justify-content: center; }
}

/* ---- Sticky in-page nav ---- */
.guide-nav {
  position: sticky;
  top: var(--header-h);
  z-index: var(--z-sticky);
  background: var(--surface);
  border-block: var(--border-w) solid var(--border);
  transition: top var(--dur) var(--ease);
}
.is-header-hidden .guide-nav { top: 0; }

.guide-nav__list {
  display: flex;
  gap: var(--sp-5);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.guide-nav__list::-webkit-scrollbar { display: none; }

.guide-nav__link {
  display: flex;
  align-items: center;
  min-height: var(--control-h);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  white-space: nowrap;
  text-decoration: none;
  border-bottom: var(--focus-w) solid transparent;
}
.guide-nav__link:hover { color: var(--text-strong); border-bottom-color: var(--primary); text-decoration: none; }

/* Anchors land below the header + sticky nav. */
.guide-section, .guide-feature { scroll-margin-top: calc(var(--header-h) + var(--control-h) + var(--sp-3)); }

/* ---- Screenshots ---- */
.guide-shot { margin: 0; }
.guide-shot .gallery__link { cursor: zoom-in; }
.guide-shot img {
  width: 100%;
  border: var(--border-w) solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
}

/* ---- Quick start: 4 steps in a row from md up ---- */
.guide-steps { margin: 0; }
@media (min-width: 768px) {
  .guide-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
  .guide-steps .steps__item {
    padding: calc(var(--step-dot) + var(--sp-5)) var(--sp-5) var(--sp-5);
    background: var(--surface);
    border: var(--border-w) solid var(--border);
    border-radius: var(--r-md);
  }
  .guide-steps .steps__item::before { left: var(--sp-5); top: var(--sp-5); }
  .guide-steps .steps__item::after { display: none; }
}
@media (min-width: 1200px) {
  .guide-steps { grid-template-columns: repeat(4, 1fr); }
}

.guide-up { color: var(--warning); }
.guide-down { color: var(--info); }

/* ---- Widget ---- */
.guide-split { display: grid; gap: var(--sp-6); align-items: start; }
@media (min-width: 992px) { .guide-split { grid-template-columns: 1fr 1fr; } }

.guide-widget {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: var(--sp-7) var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--grad-cta);
}
/* Native size (219 px): the capture is small, scaling it up blurs the text. */
.guide-widget img { width: 219px; max-width: 100%; border-radius: var(--r-md); box-shadow: var(--sh-3); }

.guide-legend { display: grid; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.guide-legend__item {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-4);
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  border-radius: var(--r-md);
}
.guide-legend__item strong { color: var(--text-strong); }
.guide-legend__item p { margin-top: var(--sp-1); color: var(--text-muted); }
.guide-legend__dot {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: var(--step-dot);
  height: var(--step-dot);
  border-radius: var(--r-sm);
  background: var(--primary-tint);
  color: var(--primary);
  font-weight: var(--fw-heavy);
}
.guide-legend__dot--up { background: var(--warning-tint); color: var(--warning); }
.guide-legend__dot--down { background: var(--info-tint); color: var(--info); }

/* ---- Right-click menu ---- */
.guide-menu { display: grid; gap: var(--sp-6); align-items: start; }
.guide-menu__shot { max-width: 356px; margin-inline: auto; }
.guide-menu__groups { display: grid; gap: var(--sp-4); }

@media (min-width: 768px) {
  .guide-menu__groups { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 992px) {
  .guide-menu { grid-template-columns: 356px minmax(0, 1fr); gap: var(--sp-7); }
  .guide-menu__shot { position: sticky; top: calc(var(--header-h) + var(--control-h) + var(--sp-5)); }
}

.guide-group { box-shadow: none; }
.guide-group__title { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--text-subtle); }
.guide-group__list { display: grid; gap: var(--sp-1); margin: 0; }
.guide-group__list dt { font-weight: var(--fw-semibold); color: var(--text-strong); }
.guide-group__list dd { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); color: var(--text-muted); }

/* ---- Tools ---- */
.guide-tool-chips { margin: 0 0 var(--sp-5); padding: 0; list-style: none; }

.guide-feature { display: grid; gap: var(--sp-5); align-items: center; padding-block: var(--sp-7); }
.guide-feature + .guide-feature { border-top: var(--border-w) dashed var(--border-strong); }
.guide-feature--flush { padding-block: 0; }
.guide-feature__body h3 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); font-size: var(--fs-h3); margin-bottom: var(--sp-3); }
.guide-feature__body h2 { margin-bottom: var(--sp-3); }
.guide-feature__body > * + * { margin-top: var(--sp-3); }
.guide-feature__body ol, .guide-feature__body ul { padding-left: 1.25em; }
.guide-feature__body li + li { margin-top: var(--sp-1); }
.guide-feature__body p { color: var(--text-muted); }
.guide-feature__body .callout p { color: var(--text); }
.guide-feature__body li .badge { margin-left: var(--sp-1); }

@media (min-width: 992px) {
  .guide-feature { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--sp-7); }
  .guide-feature:nth-of-type(even) .guide-shot { order: 2; }
}

/* ---- Plans + FAQ ---- */
.guide-plans__more, .guide-faq__more { margin-top: var(--sp-5); font-size: var(--fs-sm); color: var(--text-muted); }
.table--center tbody th { text-align: left; }
#plans .table td:nth-child(2) { white-space: nowrap; }
