/* Welcome / quickstart pages (/welcome and every locale copy).
   Layout only — colours, nav, footer and buttons come from styles.css and
   landing.css, which are always loaded before this file. Previously this
   lived in an inline <style> duplicated across 11 pages. */

/* ---------- Navigation on narrow screens ----------
   The shared nav row (styles.css) never wraps: below ~400px the links,
   the language pill and the "Get a license" button together are wider
   than the viewport and push the whole page sideways — by 36px in English
   and up to 68px in Russian. Let the row wrap instead of clipping it, so
   nothing becomes unreachable. Wrapping is a no-op on desktop, where the
   row has room to stay on one line. */
.site-nav .links { flex-wrap: wrap; }

@media (max-width: 600px) {
  .site-nav .links {
    justify-content: center;
    gap: 0.5rem 1rem;
  }
  /* Own row for the switcher: an absolutely positioned dropdown anchored to
     a pill sitting near the viewport edge would hang off-screen, so on
     narrow screens the menu joins the normal flow under the pill instead.
     It is then bounded by the nav padding and always fully visible.
     Centred with text-align, not display:flex — changing `display` on a
     <details> stops some browsers from hiding the closed menu. */
  .site-nav .lang-switch {
    position: static;
    flex: 0 0 100%;
    text-align: center;
  }
  .site-nav .lang-switch .lang-menu {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 0.4rem;
    box-shadow: none;
    text-align: left;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
    gap: 0.1rem;
  }
  /* "Português (Brasil)" must be allowed to break rather than widen the
     menu past the viewport. */
  .site-nav .lang-switch .lang-menu a { white-space: normal; }
}

/* ---------- Hero ---------- */
.welcome-hero {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
  text-align: center;
}
.welcome-hero .check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-soft); border: 2px solid var(--accent);
  margin-bottom: 1rem;
}
.welcome-hero .check svg {
  width: 28px; height: 28px;
  stroke: var(--accent); stroke-width: 3; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.welcome-hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}
.welcome-hero p {
  color: var(--fg-muted);
  margin: 0 auto;
  max-width: 560px;
  font-size: 1.05rem;
}

/* ---------- Provider picker ----------
   Plain anchors to the two provider sections: nothing is hidden behind a
   tab, so the whole guide stays readable (and printable) with JS off. */
.provider-picker {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0.5rem;
}
.provider-picker h2 {
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--fg-muted);
  margin: 0 0 1rem;
}
.picker-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* min() keeps a single column from overflowing a 320px viewport. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
}
.provider-card {
  display: block;
  height: 100%;
  padding: 1.15rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--fg);
}
.provider-card:hover,
.provider-card:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.provider-card .pc-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.provider-card .pc-name .pc-go { margin-left: 0.35rem; }
.provider-card .pc-desc {
  display: block;
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.picker-note {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.92rem;
}

/* ---------- Quickstart steps ---------- */
.quickstart {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}
.provider-section {
  /* Anchor jumps from the picker shouldn't tuck the heading under the
     top edge of the viewport. */
  scroll-margin-top: 1.5rem;
  padding-top: 1.5rem;
}
.provider-section + .provider-section,
.provider-section + .help-section {
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}
.provider-section > h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}
.provider-section > .section-lede {
  color: var(--fg-muted);
  margin: 0 0 1.5rem;
  max-width: 640px;
}
.qs-step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: start;
}
.qs-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}
.qs-body h3 {
  font-size: 1.15rem;
  margin: 0.4rem 0 0.5rem;
  letter-spacing: -0.01em;
}
.qs-body p,
.qs-body li {
  color: var(--fg-muted);
  max-width: 640px;
  /* Long hostnames and file names must not push the page sideways. */
  overflow-wrap: anywhere;
}
.qs-body p { margin: 0 0 1rem; }
.qs-body ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.qs-body li { margin: 0.3rem 0; }
.qs-body code,
.tshoot code,
.wl-list code,
.provider-card code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}
.qs-screenshot {
  max-width: 720px;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px -16px rgba(0,0,0,0.18);
  display: block;
  margin-top: 0.5rem;
}

/* ---------- Troubleshooting ---------- */
.help-section {
  scroll-margin-top: 1.5rem;
  padding-top: 1.5rem;
}
.help-section > h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}
.help-section > p {
  color: var(--fg-muted);
  max-width: 640px;
}
.tshoot {
  margin: 1.25rem 0 0;
  padding-left: 1.35rem;
  max-width: 660px;
}
.tshoot li {
  margin: 0 0 0.9rem;
  color: var(--fg-muted);
  overflow-wrap: anywhere;
}
.tshoot li strong { color: var(--fg); }
.tshoot ul { margin: 0.5rem 0; padding-left: 1.1rem; }
.tshoot ul li { margin: 0.25rem 0; }

/* ---------- Free vs. licensed, privacy ---------- */
.wl-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}
.wl-list li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--fg-muted);
  overflow-wrap: anywhere;
}
.wl-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 14px; height: 14px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  border-radius: 50%;
}
.wl-list li strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--fg);
}
.plans-section { margin-top: 2rem; }
.plans-section h3 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}

.privacy-block, .upgrade-block, .help-block {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.privacy-block {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: none;
}
.privacy-block .inner {
  max-width: var(--content-width);
  margin: 0 auto;
}
.privacy-block h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.upgrade-block {
  text-align: center;
  color: var(--fg-muted);
}
.upgrade-block a { font-weight: 600; }

.help-block {
  text-align: center;
  padding-top: 0;
  padding-bottom: 3rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .welcome-hero { padding: 2.25rem 1rem 1.25rem; }
  .provider-picker { padding-left: 1rem; padding-right: 1rem; }
  .quickstart { padding: 1.25rem 1rem 2.5rem; }
  .privacy-block, .upgrade-block, .help-block { padding-left: 1rem; padding-right: 1rem; }
  .qs-step { grid-template-columns: 1fr; gap: 0.75rem; }
  .qs-num { margin-bottom: 0.25rem; }
}

.qs-body .sample-caption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}
