/* Scoped to Help and Downloads so device tools retain their own layouts. */
.help-page, .downloads-page { --help-line: var(--border, #283244); }
.help-page h3, .downloads-page h3 { margin: 0 0 10px; font-size: var(--t-strong); line-height: 1.4; }
.help-page p, .downloads-page p { line-height: 1.65; }
.help-start { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.help-start > div:first-child { flex: 1; }
.help-start p { margin: 0; color: var(--text-muted, #94a3b8); }
.help-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.help-search { margin: 24px 0 16px; }
.help-search label { display: block; margin-bottom: 8px; font-weight: 600; }
.help-search-row { display: flex; gap: 10px; }
.help-search-row input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--help-line); border-radius: 10px; color: var(--text-main, #e2e8f0); background: var(--bg-card, #141b28); font: inherit; }
#docs-search-status { margin: 8px 0 0; font-size: var(--t-cap); }
.help-index { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.help-index a { border: 1px solid var(--help-line); border-radius: 8px; padding: 8px 12px; color: var(--text-muted, #94a3b8); text-decoration: none; font-size: var(--t-body); }
.help-index a:hover { color: var(--primary, #60a5fa); border-color: currentColor; }
.help-section { margin-bottom: 28px; scroll-margin-top: 90px; }
.help-card-grid, .download-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.help-task { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.help-task h4 { margin: 0; font-size: var(--t-strong); line-height: 1.4; }
.help-answer { margin: 10px 0; }
.help-path { color: var(--text-muted, #94a3b8); font-size: var(--t-cap); margin: 0 0 14px; overflow-wrap: anywhere; }
.help-details { width: 100%; margin: 0 0 16px; }
.help-details summary, .download-updates summary { cursor: pointer; font-weight: 600; line-height: 1.5; padding: 8px 0; }
.help-task > .btn { margin-top: auto; white-space: normal; text-align: left; }
.help-page .docs-list { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.65; font-size: var(--t-body); }
.help-page [hidden], .downloads-page [hidden] { display: none !important; }
.help-support { border-top: 1px solid var(--help-line); margin-top: 24px; padding-top: 18px; color: var(--text-muted, #94a3b8); font-size: var(--t-body); }
.help-support a { color: var(--primary, #60a5fa); }
.help-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.help-page :is(a, button, input, summary):focus-visible, .downloads-page :is(a, button, summary):focus-visible { outline: 2px solid var(--primary, #60a5fa); outline-offset: 4px; }
.download-intro { margin-bottom: 18px; }
.download-intro p { margin: 0; }
.download-choice { min-width: 0; }
.download-choice .settings-row { gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 18px 0; }
.download-choice .settings-row span:last-child { overflow-wrap: anywhere; }
.download-label { color: var(--primary, #60a5fa); font-size: var(--t-cap); font-weight: 700; margin: 0 0 8px; }
.download-choice > p:not(.download-label) { color: var(--text-muted, #94a3b8); }
.download-integrity { border-top: 1px solid var(--help-line); margin: 16px 0 0; padding-top: 8px; font-size: var(--t-body); }
.download-integrity code { display: block; overflow-wrap: anywhere; word-break: break-word; font-size: var(--t-cap); line-height: 1.8; user-select: all; }
.download-install, .download-updates, .download-history { margin-top: 20px; }
.download-steps { display: grid; gap: 14px; line-height: 1.65; margin: 16px 0 22px; padding-left: 22px; }
.download-history-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.download-history-head > span { font-size: var(--t-cap); }
.downloads-page .changelog-pager { flex-wrap: wrap; gap: 12px; align-items: center; }
.downloads-page .btn { white-space: normal; }
@media (max-width: 760px) {
  .help-start { align-items: stretch; flex-direction: column; gap: 16px; }
  .help-card-grid, .download-choices { grid-template-columns: minmax(0, 1fr); }
  .help-search-row { flex-wrap: wrap; }
  .help-search-row input { flex-basis: 100%; }
  .help-actions > .btn { flex: 1 1 180px; }
}

/* ---- Three install routes ---------------------------------------------------------------
   Play spans the row because it is the choice most people should make; the two APK cards sit
   side by side underneath, where their version rows and checksums have room. */
.download-choice-featured { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.download-choice-featured > div:first-child { flex: 1 1 320px; min-width: 0; }
.download-choice-featured .btn { flex: 0 0 auto; }
.download-choice-featured .fh-help { flex-basis: 100%; margin: 0; }
.download-compare { margin-top: 20px; }
.download-compare > p { margin: 0 0 14px; }
.download-compare table { width: 100%; border-collapse: collapse; font-size: var(--t-body); }
.download-compare th, .download-compare td { padding: 10px 12px; border-bottom: 1px solid var(--help-line); text-align: left; vertical-align: top; line-height: 1.55; }
.download-compare thead th { font-size: var(--t-cap); letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted, #94a3b8); font-weight: 700; }
.download-compare tbody th { color: var(--text-muted, #94a3b8); font-weight: 600; width: 26%; }
.download-compare tbody tr:last-child th, .download-compare tbody tr:last-child td { border-bottom: 0; }
.download-compare .fh-help { margin: 14px 0 0; }
@media (max-width: 760px) {
  .download-choice-featured { flex-direction: column; align-items: stretch; }
  /* A four-column table does not fit a phone, so each row becomes its own labelled block. */
  .download-compare table, .download-compare tbody, .download-compare tr,
  .download-compare tbody th, .download-compare td { display: block; width: auto; }
  .download-compare thead { display: none; }
  .download-compare tr { border-bottom: 1px solid var(--help-line); padding: 10px 0; }
  .download-compare tr:last-child { border-bottom: 0; }
  .download-compare tbody th { padding: 0 12px 6px; font-size: var(--t-cap); text-transform: uppercase; letter-spacing: .04em; }
  .download-compare td { border: 0; padding: 2px 12px 6px; }
  .download-compare td::before { content: attr(data-label) ': '; color: var(--text-muted, #94a3b8); font-weight: 600; }
}
