/* ==========================================================================
 * Downloads page styles
 * Shares the design tokens defined in :root of home.css.
 * ========================================================================== */

/* The page follows the site theme (light overrides the :root tokens in
 * home.css): no forced color-scheme any more. */

/* Same side gutters as the other pages on desktop; phones get a 24px gutter.
 * (A wide desktop padding made the nav sit 12px further in than on Home.) */
@media (max-width: 767.98px) {
  body.page-downloads .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Hero: tighter ground clearance so the first board row is above the fold
 * at 1440x900. Horizontal clearance is zero so the page container (12px
 * desktop / 24px phone, like every other page) provides the gutter alone. */
body.page-downloads .pv-page-hero {
  padding: 2.75rem 0 1.75rem;
}

body.page-downloads .pv-hero-link {
  margin-top: 0.75rem;
}

.pv-dl-section {
  padding: 1.5rem 0 3.5rem;
}

.pv-dl-section.pv-dl-step2 {
  padding-top: 2.75rem;
}

.pv-dl-follow-link {
  margin: 1rem 0 0;
}

/* --------------------------------------------------------------------------
 * Release control bar (one control for the whole page)
 * ------------------------------------------------------------------------ */
.pv-release-bar {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background-color: var(--pv-slate-darker);
  border: 1px solid var(--pv-border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.pv-release-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem 1.5rem;
}

.pv-release-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background-color: var(--pv-slate-deep);
  border: 1px solid var(--pv-border);
  border-radius: 8px;
}

.pv-release-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--pv-text-muted);
  font-family: var(--pv-font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  min-height: 44px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.pv-release-tab:hover {
  color: var(--pv-text-light);
}

.pv-release-tab.is-active {
  background-color: var(--pc-primary);
  color: #FFFFFF;
}

.pv-release-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}

.pv-control {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pv-control-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Small amber marker on the Containers tab, where only the release-candidate
 * channel has content. */
.pv-rc-pill {
  font-family: var(--pv-font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pv-amber-ink);
  background-color: rgba(255, 188, 125, 0.12);
  border: 1px solid rgba(255, 188, 125, 0.45);
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  white-space: nowrap;
}

.pv-control-label {
  font-family: var(--pv-font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pv-text-muted);
}

.pv-select {
  appearance: none;
  min-height: 44px;
  background-color: var(--pv-slate-deep);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%23B0BCCB' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  border: 1px solid var(--pv-border);
  border-radius: 8px;
  color: var(--pv-text-light);
  font-family: var(--pv-font-sans);
  font-size: 0.9rem;
  padding: 0.5rem 2.2rem 0.5rem 0.85rem;
  cursor: pointer;
}

/* Light theme: the default chevron stroke (#B0BCCB) is almost invisible on
 * the white input background; switches to a darker ink in daylight. */
html[data-theme="light"] .pv-select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%23556070' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.pv-release-date {
  font-family: var(--pv-font-mono);
  font-size: 0.8rem;
  color: var(--pv-text-muted);
  padding-bottom: 0.65rem;
  white-space: nowrap;
}

.pv-search-row {
  display: flex;
}

.pv-search {
  width: 100%;
  min-height: 44px;
  appearance: none;
  background-color: var(--pv-slate-deep);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='%23B0BCCB' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.85rem center;
  border: 1px solid var(--pv-border);
  border-radius: 8px;
  color: var(--pv-text-light);
  font-family: var(--pv-font-sans);
  font-size: 0.95rem;
  padding: 0.55rem 1rem 0.55rem 2.5rem;
}

.pv-search::placeholder {
  color: var(--pv-text-muted);
}

.pv-select:focus-visible,
.pv-search:focus-visible,
.pv-release-tab:focus-visible,
.pv-dl-copy:focus-visible,
.pv-more summary:focus-visible,
.pv-internal summary:focus-visible,
.pv-chip:focus-visible,
.pv-more-link:focus-visible,
.btn-pv-dl:focus-visible,
.btn-pv-dl-outline:focus-visible,
.pv-quiet-link:focus-visible {
  outline: 2px solid var(--pv-sky);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
 * Artifact legend above the board list (2x2 chip grid on phones)
 * ------------------------------------------------------------------------ */
.pv-artifact-legend {
  font-size: 0.85rem;
  color: var(--pv-text-muted);
  margin: 0 0 1rem;
}

.pv-artifact-legend strong {
  color: var(--pv-text-light);
  font-weight: 600;
}

.pv-legend-chips .pv-legend-item::after {
  content: "·";
  margin: 0 0.55rem;
}

.pv-legend-chips .pv-legend-item:last-child::after {
  content: none;
}

/* --------------------------------------------------------------------------
 * Board / container lists
 * ------------------------------------------------------------------------ */
.pv-board-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pv-group-label {
  font-family: var(--pv-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--pv-text-muted);
  margin: 1.5rem 0 0.55rem;
}

/* first group in a list doesn't need the big top gap */
.pv-board-list > .pv-group-label:first-child {
  margin-top: 0;
}

.pv-group-note {
  font-size: 0.8rem;
  color: var(--pv-text-muted);
  margin: -0.3rem 0 0.55rem;
}

/* Compact device rows (~80px on desktop): name + machine chip + boot medium
 * badge on one line, one-line spec below, actions on the right. */
.pv-board-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
  background-color: var(--pv-card-bg);
  border: 1px solid var(--pv-border);
  border-radius: 10px;
  padding: 1.15rem 1.25rem;
}

.pv-board-row.pv-board-row-compact {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1.1rem;
}

.pv-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
}

.pv-board-name {
  margin: 0;
  color: var(--pv-text-white);
  font-family: var(--pv-font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

.pv-board-row-compact .pv-board-name {
  font-size: 1rem;
}

.pv-board-machine {
  font-family: var(--pv-font-mono);
  font-size: 0.78rem;
  color: var(--pv-sky-ink);
  background-color: rgba(0, 169, 232, 0.1);
  border: 1px solid rgba(0, 169, 232, 0.35);
  border-radius: 5px;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
}

/* Boot medium derived from the board description. */
.pv-boot-badge {
  font-family: var(--pv-font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pv-text-muted);
  border: 1px solid var(--pv-border);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  white-space: nowrap;
}

.pv-boot-badge.pv-boot-usb {
  color: var(--pv-amber-ink);
  border-color: rgba(255, 188, 125, 0.45);
  background-color: rgba(255, 188, 125, 0.1);
}

.pv-board-row-compact .pv-board-spec {
  margin: 0.3rem 0 0;
  color: var(--pv-text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
  max-width: 52rem;
}

.pv-sha-missing {
  margin: 0.45rem 0 0;
  color: var(--pv-text-muted);
  font-size: 0.78rem;
}

/* visible, copyable SHA256 */
.pv-sha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.pv-sha-label {
  font-family: var(--pv-font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pv-text-muted);
}

.pv-dl-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  background-color: var(--pv-slate-deep);
  border: 1px solid var(--pv-border);
  border-radius: 6px;
  color: var(--pv-text-light);
  cursor: pointer;
  padding: 0.5rem 0.7rem;
  transition: border-color 0.15s ease;
}

.pv-dl-copy:hover {
  border-color: var(--pv-blue);
  color: var(--pv-text-white);
}

.pv-sha-val {
  font-family: var(--pv-font-mono);
  font-size: 0.72rem;
  color: var(--pv-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.pv-copy-icon {
  color: var(--pv-teal-ink);
  font-size: 0.85rem;
}

.pv-dl-copy.is-copied .pv-copy-icon,
.pv-dl-copy .fa-check {
  color: var(--pv-teal-ink);
}

.pv-copy-mini {
  padding: 0.45rem 0.6rem;
}

/* per-machine SHA rows inside a details block */
.pv-sha-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0.55rem;
}

.pv-sha-machine {
  font-family: var(--pv-font-mono);
  font-size: 0.72rem;
  color: var(--pv-sky-ink);
  flex-shrink: 0;
  min-width: 5.5ch;
}

.pv-sha-item .pv-sha-val {
  flex: 1 1 auto;
}

/* --------------------------------------------------------------------------
 * Actions column
 * ------------------------------------------------------------------------ */
.pv-board-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}

/* Compact rows: one line with the outlined download button and the two
 * disclosures. */
.pv-board-row-compact .pv-board-actions {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.btn-pv-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background-color: var(--pc-primary);
  border: 1px solid var(--pc-primary);
  border-radius: 8px;
  color: #FFFFFF;
  font-family: var(--pv-font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  min-height: 48px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-pv-dl:hover {
  background-color: var(--pc-violet);
  border-color: var(--pc-violet);
  color: #FFFFFF;
  text-decoration: none;
}

/* Smaller outlined download button per board row (one loud button per page
 * would be 14 loud buttons). */
.btn-pv-dl-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background-color: transparent;
  border: 1px solid var(--pc-violet);
  border-radius: 8px;
  color: var(--pv-violet-ink);
  font-family: var(--pv-font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  min-height: 40px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-pv-dl-outline:hover {
  background-color: rgba(108, 99, 255, 0.14);
  color: var(--pv-violet-ink);
  text-decoration: none;
}

.btn-pv-dl-outline i {
  font-size: 0.8rem;
}

/* quiet "Other artifacts" disclosure */
.pv-more summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--pv-text-muted);
  font-family: var(--pv-font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.25rem;
}

.pv-more summary::-webkit-details-marker {
  display: none;
}

.pv-more summary i {
  color: var(--pv-sky-ink);
  font-size: 0.75rem;
  transition: transform 0.15s ease;
}

.pv-more[open] summary {
  color: var(--pv-text-light);
}

.pv-more[open] summary i {
  transform: rotate(180deg);
}

/* In board rows the menus float over the list instead of pushing rows down.
 * They anchor to their summary button and close on outside click / Escape. */
.pv-board-row .pv-more {
  position: relative;
}

.pv-board-row details.pv-more[open] {
  z-index: 40;
}

.pv-board-row .pv-more .pv-more-panel {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.4rem;
  width: max-content;
  max-width: min(26rem, calc(100vw - 64px));
  z-index: 40;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.pv-details-panel {
  padding: 0.8rem 0.9rem;
}

/* Details panel text: meta facts first (format / boot medium may be stated
 * on the row), the full description as smaller muted copy below. */
.pv-details-meta {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: var(--pv-text-muted);
  max-width: 24rem;
}

.pv-details-meta strong {
  color: var(--pv-text-light);
  font-weight: 600;
}

.pv-details-desc {
  margin: 0.5rem 0 0;
  max-width: 24rem;
  color: var(--pv-text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.pv-details-panel .pv-sha,
.pv-details-panel .pv-sha-missing {
  margin: 0 0 0.3rem;
}

/* Compact-row disclosures read as quiet chips. */
.pv-board-row-compact .pv-more summary {
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 6px;
  gap: 0.4rem;
}

.pv-board-row-compact .pv-more summary:hover {
  border-color: var(--pv-border);
  color: var(--pv-text-light);
}

.pv-more-panel {
  display: flex;
  flex-direction: column;
  background-color: var(--pv-slate-darker);
  border: 1px solid var(--pv-border);
  border-radius: 8px;
  padding: 0.4rem;
  margin-top: 0.25rem;
}

.pv-more-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  color: var(--pv-text-light);
  font-size: 0.85rem;
  text-decoration: none;
}

.pv-more-link i {
  color: var(--pv-text-muted);
  font-size: 0.75rem;
}

.pv-more-link:hover {
  background-color: var(--pv-slate);
  color: var(--pv-text-white);
  text-decoration: none;
}

.pv-more-link:hover i {
  color: var(--pv-sky-ink);
}

/* quiet text links (GitHub, setup guide, …) */
.pv-quiet-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--pv-sky-ink);
  font-family: var(--pv-font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.pv-quiet-link:hover {
  color: var(--pv-text-white);
  text-decoration: none;
}

.pv-quiet-link i {
  font-size: 0.8em;
  transition: transform 0.15s ease;
}

.pv-quiet-link:hover i {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
 * Container rows: pvr-export chips
 * ------------------------------------------------------------------------ */
.pv-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.pv-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--pv-slate-deep);
  border: 1px solid var(--pv-border);
  border-radius: 6px;
  color: var(--pv-text-light);
  font-family: var(--pv-font-mono);
  font-size: 0.8rem;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.pv-chip i {
  color: var(--pv-text-muted);
  font-size: 0.75rem;
}

.pv-chip:hover {
  border-color: var(--pv-sky);
  color: var(--pv-text-white);
  text-decoration: none;
}

.pv-chip:hover i {
  color: var(--pv-sky-ink);
}

.pv-chips-empty {
  color: var(--pv-text-muted);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
 * Container rows share the compact board-row shape: identity + one
 * description line on the left, the pvr-export chips and disclosures on the
 * right.
 * ------------------------------------------------------------------------ */
.pv-container-row {
  align-items: start;
}

.pv-container-row .pv-container-actions {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  max-width: 26rem;
  gap: 0.4rem 0.5rem;
}

.pv-container-row .pv-chip-row {
  margin-top: 0;
  justify-content: flex-end;
  gap: 0.4rem;
}

.pv-container-row .pv-chip {
  padding: 0.4rem 0.7rem;
}

/* "Other artifacts" label: wordy on phones, so it shortens to "More". */
.pv-summary-short {
  display: none;
}

/* --------------------------------------------------------------------------
 * Empty / error / loading states
 * ------------------------------------------------------------------------ */
.pv-empty {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--pv-text-muted);
}

.pv-empty i {
  color: var(--pv-amber-ink);
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.pv-empty h3 {
  color: var(--pv-text-white);
  font-weight: 700;
}

.pv-empty .btn-pv-dl {
  margin-top: 1rem;
}

#download-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: var(--pv-text-muted);
}

#download-loading .spinner-border {
  color: var(--pv-sky-ink);
}

/* --------------------------------------------------------------------------
 * "Flash it" step
 * ------------------------------------------------------------------------ */
.pv-section-heading {
  margin: 0.2rem 0 0.4rem;
  color: var(--pv-text-white);
  font-family: var(--pv-font-sans);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pv-section-sub {
  color: var(--pv-text-muted);
  max-width: 60rem;
  margin: 0 0 1.75rem;
}

.pv-flash-card {
  background-color: var(--pv-card-bg);
  border: 1px solid var(--pv-border);
  border-radius: 10px;
  padding: 1.5rem;
}

/* Cards align to the top of the step: the pvflasher card keeps its natural
 * height instead of stretching to the column's full height (which left a
 * band of dead interior below its content). */
.pv-dl-step2 > .container > .row {
  align-items: start;
}

.pv-flash-primary {
  border-top: 3px solid var(--pv-sky);
}

.pv-flash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pv-flash-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--pv-sky);
  color: var(--pv-on-accent);
}

.pv-flash-icon-alt {
  background-color: var(--pv-teal);
}

.pv-flash-title {
  margin: 0;
  color: var(--pv-text-white);
  font-family: var(--pv-font-sans);
  font-size: 1.25rem;
  font-weight: 700;
}

.pv-flash-sub {
  margin: 0 0 1rem;
  color: var(--pv-text-muted);
  font-size: 0.92rem;
}

.pv-flash-panel {
  background-color: var(--pv-slate-darker);
  border: 1px solid var(--pv-border);
  border-radius: 8px;
  padding: 1rem;
}

.pv-flash-panel .btn-pv-dl {
  width: 100%;
}

/* package list inside the "All platforms" details (2 columns so the card
 * doesn't stretch to ~900px) */
.pv-flash-card .pv-more-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.1rem 1.25rem;
}

.pv-flash-card .pv-more-panel .pv-package-head,
.pv-flash-card .pv-more-panel .pv-code {
  grid-column: 1 / -1;
}

/* Filled "Recommended" pill for the pvflasher card. */
.pv-badge-recommended {
  display: inline-flex;
  align-items: center;
  background-color: var(--pv-teal);
  color: var(--pv-on-accent) !important;
  font-family: var(--pv-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
}

/* Collapsed "Internal / testing" group at the end of the container list */
.pv-internal {
  margin-top: 1.5rem;
}

.pv-internal > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  min-height: 44px;
  font-family: var(--pv-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--pv-text-muted);
  padding: 0.45rem 0.25rem;
}

.pv-internal > summary::-webkit-details-marker {
  display: none;
}

.pv-internal > summary i {
  color: var(--pv-text-muted);
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.pv-internal[open] > summary {
  color: var(--pv-text-light);
}

.pv-internal[open] > summary i {
  transform: rotate(180deg);
}

.pv-internal[open] > .pv-group-note {
  margin-bottom: 0.55rem;
}

/* package properties inside the "All platforms" details */
.pv-package-head {
  font-family: var(--pv-font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pv-text-muted);
  margin: 0.8rem 0.25rem 0.3rem;
}

.pv-package-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--pv-text-light);
  font-size: 0.85rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  text-decoration: none;
}

.pv-package-link i {
  color: var(--pv-text-muted);
  font-size: 0.9rem;
  width: 1.2em;
}

.pv-package-link:hover {
  background-color: var(--pv-slate);
  color: var(--pv-text-white);
  text-decoration: none;
}

.pv-code {
  margin: 0.75rem 0 0;
  background-color: var(--pv-slate-deep);
  border: 1px solid var(--pv-border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-family: var(--pv-font-mono);
  font-size: 0.78rem;
  color: var(--pv-text-light);
  white-space: pre;
  overflow-x: auto;
}

.pv-warn {
  display: flex;
  gap: 0.6rem;
  margin: 0.9rem 0 0;
  padding: 0.75rem 0.9rem;
  background-color: rgba(255, 188, 125, 0.08);
  border: 1px solid rgba(255, 188, 125, 0.4);
  border-radius: 8px;
  color: var(--pv-amber-ink);
  font-size: 0.85rem;
}

.pv-warn i {
  color: var(--pv-amber-ink);
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
 * Phone (≤767px): rows stack, full-width download, ≥44px targets
 * ------------------------------------------------------------------------ */
@media (max-width: 767.98px) {
  .pv-artifact-legend.pv-legend-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .pv-legend-chips .pv-legend-item {
    background-color: var(--pv-slate-darker);
    border: 1px solid var(--pv-border);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .pv-legend-chips .pv-legend-item::after {
    content: none;
  }

  .pv-legend-chips .pv-legend-item strong {
    display: block;
  }

  .pv-board-row {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    padding: 1rem;
  }

  .pv-board-row.pv-board-row-compact {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    align-items: stretch;
  }

  /* ~170px card: name alone on line 1, machine chip + boot badge together
   * on line 2, spec clamped to 2 lines (Details carries the rest). */
  .pv-board-row.pv-board-row-compact .pv-board-name {
    flex: 1 1 100%;
  }

  .pv-board-row.pv-board-row-compact .pv-board-spec {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin-top: 0.25rem;
  }

  .pv-board-actions {
    grid-column: 1;
  }

  .pv-board-row-compact .pv-board-actions {
    justify-content: flex-start;
  }

  /* One action row: download button + "Details"/"More" disclosures. */
  .pv-board-row-compact .btn-pv-dl-outline {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .pv-summary-long {
    display: none;
  }

  .pv-summary-short {
    display: inline;
  }

  /* Container rows stack the same way; action bits start-aligned. */
  .pv-container-row .pv-container-actions,
  .pv-container-row .pv-chip-row {
    justify-content: flex-start;
    max-width: none;
  }

  .pv-board-actions .btn-pv-dl {
    width: 100%;
  }

  .pv-board-row .pv-more .pv-more-panel {
    /* Actions sit left-aligned on phones: anchor the floating Details /
     * Other panels to the left so they stay on screen. */
    right: auto;
    left: 0;
    max-width: calc(100vw - 48px);
  }

  .pv-dl-copy,
  .pv-copy-mini {
    min-height: 44px;
  }

  .pv-more summary {
    min-height: 44px;
  }

  .pv-board-row-compact .pv-more summary {
    min-height: 44px;
    padding: 0.55rem 0.6rem;
  }

  .pv-chip {
    min-height: 44px;
  }

  .pv-package-link {
    min-height: 44px;
  }

  .pv-internal > summary {
    min-height: 44px;
  }

  .pv-release-date {
    padding-bottom: 0;
    white-space: normal;
  }

  .pv-flash-card .pv-more-panel {
    grid-template-columns: 1fr;
  }

  .pv-dl-section {
    padding: 1.25rem 0 3.5rem;
  }

  .pv-dl-section.pv-dl-step2 {
    padding-top: 1.75rem;
  }

  .pv-flash-card {
    padding: 1.15rem;
  }
}

/* Phones: menus open inside the card (in the page flow) instead of floating
   over the next card; only one is open at a time (see downloads.html). */
@media (max-width: 767.98px) {
  .pv-board-row details.pv-more[open] {
    flex-basis: 100%;
    width: 100%;
  }
  .pv-board-row .pv-more .pv-more-panel {
    position: static;
    width: auto;
    max-width: none;
    margin-top: 0.5rem;
    box-shadow: none;
  }
}

/* Three tabs no longer fit at their desktop padding on a 360px phone. */
@media (max-width: 767.98px) {
  .pv-release-tabs {
    display: flex;
    width: 100%;
  }

  .pv-release-tab {
    flex: 1 1 auto;
    padding: 0.5rem 0.6rem;
  }
}
