/* ══════════════════════════════════════════════════════════════
   RippleCheck — sub-page styles (download / docs / license)
   Layers on top of styles.css; reuses its tokens, .nav and .btn.
   Unlike the landing page these pages are fully responsive — they are
   reference content people will legitimately open on a phone.
   ══════════════════════════════════════════════════════════════ */

.page-wrap { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.page-wrap.wide { max-width: 1060px; }

/* ─── Page hero ─── */
.page-hero { padding: 96px 0 56px; text-align: center; position: relative; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 120% at 50% 0%, rgba(0, 229, 153, 0.07), transparent 70%);
  pointer-events: none;
}
.page-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-tint);
  border: 1px solid var(--accent-tint-strong);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
.page-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.08; color: #fff; margin-bottom: 18px;
}
.page-title .accent { color: var(--accent); }
.page-lead {
  font-size: 1.1rem; line-height: 1.6; color: var(--text-muted);
  max-width: 620px; margin: 0 auto;
}

/* ─── Sections ─── */
.page-section { padding: 40px 0; }
.page-section + .page-section { border-top: 1px solid var(--border-subtle); }
.section-title {
  font-size: 1.5rem; font-weight: 650; color: #fff;
  letter-spacing: -0.02em; margin-bottom: 10px; scroll-margin-top: 90px;
}
.section-intro { color: var(--text-muted); margin-bottom: 24px; max-width: 680px; }
.page-section p { color: var(--text-secondary); margin-bottom: 14px; }
.page-section p:last-child { margin-bottom: 0; }
.page-section a:not(.btn):not(.dl-btn) {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 229, 153, 0.35);
}
.page-section a:not(.btn):not(.dl-btn):hover { text-decoration-color: var(--accent); }

/* ─── Download cards ─── */
.dl-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px; margin: 8px 0 4px;
  align-items: start; /* Mac card is taller (Gatekeeper fix) — don't stretch Windows */
}
.dl-card {
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  border-radius: 14px; padding: 26px; display: flex; flex-direction: column;
  transition: border-color 200ms, box-shadow 200ms, transform 200ms;
}
.dl-card:hover {
  border-color: rgba(0, 229, 153, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 229, 153, 0.08), 0 18px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}
.dl-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.dl-card-head svg { color: #fff; flex-shrink: 0; }
.dl-card h3 { font-size: 1.15rem; font-weight: 650; color: #fff; letter-spacing: -0.01em; }
.dl-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; white-space: nowrap;
  background: var(--moderate-bg); border: 1px solid var(--moderate-border); color: var(--moderate-fg);
}
.dl-meta { font-size: 12.5px; color: var(--text-subtle); margin-bottom: 18px; font-family: var(--font-mono); }

/* ─── macOS Gatekeeper "damaged" fix (pinned under the Mac button) ─── */
.gatekeeper-fix {
  margin-top: 16px;
  background: var(--moderate-bg);
  border: 1px solid var(--moderate-border);
  border-left: 3px solid var(--moderate-fg);
  border-radius: 11px;
  padding: 15px 16px;
}
.gatekeeper-fix-head { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 10px; }
.gatekeeper-fix-head svg { flex-shrink: 0; margin-top: 1px; }
.gatekeeper-fix-head strong { color: #fff; font-size: 0.95rem; font-weight: 650; line-height: 1.4; }
.gatekeeper-fix p {
  margin: 0 0 10px !important; color: var(--text-secondary) !important;
  font-size: 0.9rem; line-height: 1.6;
}
.gatekeeper-fix p strong { color: #fff; font-weight: 650; }
.gatekeeper-fix .gatekeeper-fix-foot {
  margin: 10px 0 0 !important; color: var(--text-muted) !important; font-size: 0.87rem;
}

/* copyable command block — terminal-style card: label + copy button in a top
   bar, the command on its own full-width line below so it wraps cleanly and
   can never collide with the button (mirrors the site's mono code styling). */
.cmd-copy {
  margin-top: 12px;
  background: #0d1117; border: 1px solid var(--border-default);
  border-radius: 8px; overflow: hidden;
}
.cmd-copy-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 6px 6px 6px 12px;
  background: var(--bg-overlay); border-bottom: 1px solid var(--border-subtle);
}
.cmd-copy-tag {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-subtle);
}
.cmd-copy-text {
  display: block; margin: 0; padding: 12px 13px;
  background: none; border: none; border-radius: 0;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65;
  color: var(--text-primary);
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
.cmd-prompt { color: var(--text-subtle); user-select: none; margin-right: 2px; }
.cmd-copy-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border: 1px solid var(--accent-tint-strong); border-radius: 6px;
  background: var(--accent-tint); color: var(--accent);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  cursor: pointer; transition: background 140ms, color 140ms, border-color 140ms;
}
.cmd-copy-btn:hover { background: var(--accent-tint-strong); color: var(--accent-hover); }
.cmd-copy-btn svg { flex-shrink: 0; }
.cmd-copy-btn.copied { background: var(--accent); color: var(--accent-fg-on-solid); border-color: var(--accent); }
.cmd-copy-btn.copied svg { display: none; }
.cmd-copy-label { white-space: nowrap; }
.dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: #fff; color: #000; font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 9px; text-decoration: none;
  transition: background 160ms, transform 120ms; margin-top: auto;
}
.dl-btn:hover { background: #e2e2e2; transform: translateY(-1px); }
.dl-btn.secondary {
  background: rgba(255, 255, 255, 0.06); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.dl-btn.secondary:hover { background: rgba(255, 255, 255, 0.12); }

/* ─── Numbered install steps ─── */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 22px 46px; color: var(--text-secondary); line-height: 1.6;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 650; font-family: var(--font-mono);
  background: var(--accent-tint); border: 1px solid var(--accent-tint-strong); color: var(--accent);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 6px;
  width: 1px; background: var(--border-default);
}
.steps li strong { color: #fff; font-weight: 600; }

/* ─── Callouts ─── */
.callout {
  display: flex; gap: 13px; padding: 16px 18px; border-radius: 11px;
  margin: 22px 0; font-size: 0.94rem; line-height: 1.6;
}
.callout svg { flex-shrink: 0; margin-top: 2px; }
.callout p { margin: 0 !important; color: var(--text-secondary) !important; }
.callout strong { color: #fff; }
.callout.warn { background: var(--moderate-bg); border: 1px solid var(--moderate-border); }
.callout.info { background: var(--accent-tint); border: 1px solid var(--accent-tint-strong); }

/* ─── Code blocks ─── */
.code-block {
  background: #0d1117; border: 1px solid var(--border-default);
  border-radius: 10px; padding: 15px 18px; margin: 14px 0 20px;
  overflow-x: auto; font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.75; color: var(--text-secondary);
}
.code-block code {
  background: none; border: none; padding: 0; font-size: inherit; color: inherit;
  white-space: pre; display: block;
}
.code-block .c-comment { color: var(--text-subtle); }
.code-block .c-prompt { color: var(--accent); user-select: none; }
.code-block .c-str { color: #a5d6ff; }
.code-block .c-key { color: #7ee787; }

/* ─── Docs: format cards + table ─── */
.fmt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 8px; }
.fmt-chip {
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  border-radius: 11px; padding: 18px 20px;
}
.fmt-chip h4 { color: #fff; font-size: 0.98rem; font-weight: 620; margin-bottom: 6px; }
.fmt-chip p { font-size: 0.88rem; color: var(--text-muted); margin: 0 !important; }

.risk-table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 0.92rem; }
.risk-table th, .risk-table td {
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border-subtle);
}
.risk-table th { color: var(--text-subtle); font-weight: 600; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; }
.risk-table td { color: var(--text-secondary); }
.risk-table td:first-child { white-space: nowrap; font-family: var(--font-mono); font-size: 12.5px; }
.risk-safe { color: var(--safe-fg); }
.risk-moderate { color: var(--moderate-fg); }
.risk-high { color: var(--high-fg); }

/* ─── Docs table of contents ─── */
.toc {
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  border-radius: 12px; padding: 20px 24px; margin-bottom: 8px;
}
.toc h4 {
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-subtle); margin-bottom: 12px; font-weight: 600;
}
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 9px 24px; }
.toc a { color: var(--text-secondary) !important; font-size: 0.92rem; text-decoration: none !important; }
.toc a:hover { color: var(--accent) !important; }

/* ─── License ─── */
.license-box {
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  border-radius: 12px; padding: 30px 34px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.85;
  color: var(--text-secondary); white-space: pre-wrap; overflow-x: auto;
}
.license-box .lic-title { color: #fff; font-weight: 600; }
.license-box .lic-copy { color: var(--accent); }

/* ─── Sub-page footer ─── */
.page-footer {
  border-top: 1px solid var(--border-subtle); margin-top: 70px;
  padding: 44px 0 40px; text-align: center;
}
.page-footer-links {
  display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; margin-bottom: 22px;
}
.page-footer-links a { color: var(--text-muted); font-size: 0.92rem; transition: color 160ms; }
.page-footer-links a:hover { color: #fff; }
.page-footer-note { color: var(--text-subtle); font-size: 0.85rem; margin-bottom: 6px; }

/* ─── Entrance motion (mirrors .scroll-reveal in styles.css) ─── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .dl-card:hover, .dl-btn:hover { transform: none; }
}

/* ─── Responsive ─── */
@media (max-width: 760px) {
  .page-hero { padding: 64px 0 40px; }
  .nav-downloads { display: none !important; }
  .nav-right { gap: 18px; }
  .nav-link.optional-link { display: none; }
  .dl-card { padding: 22px; }
  .license-box { padding: 22px 18px; font-size: 11.5px; }
}
