/* Download buttons by system (partials/get.html), on the landing and the
   downloads page. */

.get {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  min-width: 0;
  text-align: center;
}

.get > * {
  min-width: 0;
  max-width: 100%;
}

.get [hidden] {
  display: none !important;
}

.get-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

.get-cmd {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  justify-items: center;
  max-width: 100%;
}

.get-cmd-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.get-cmd-row {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.get-cmd-row code {
  flex: 1 1 auto;
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  overflow-x: auto;
  min-width: 0;
  background: none;
  padding: 0;
}

.get-copy {
  flex: none;
  font: inherit;
  font-size: var(--font-size-xs);
  cursor: pointer;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg);
  color: var(--color-text);
}

.get-copy:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.get-note {
  justify-self: center;
  margin: 0;
  max-width: 34rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* The landing band after the hero */

.get-band .get-head {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  text-align: center;
  margin-bottom: var(--space-6);
}

.get-band .get-mark svg {
  width: 3.5rem;
  height: auto;
}

.get-band h2 {
  margin: 0;
}

.get-band .desc {
  margin: 0;
  max-width: 36rem;
}

/* The box at the top of the downloads page */

.get-box {
  padding: var(--space-6) var(--space-4);
  margin-bottom: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  scroll-margin-top: var(--space-6);
}

.get-box .get-cmd-row {
  background: var(--color-bg);
}

.get-box h2 {
  margin: 0 0 var(--space-4);
  text-align: center;
}

.download .checksum code {
  font-size: var(--font-size-2xs);
  overflow-wrap: anywhere;
}

/* The install script of the desktop app, folded under its download. */
.get-alt {
  justify-self: center;
  max-width: 100%;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.get-alt summary {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.get-alt summary:hover {
  color: var(--color-text);
}

.get-alt .get-cmd-row {
  margin-top: var(--space-2);
}

/* The desktop downloads by system logo (partials/get_desktop.html). */
.get-platforms {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
}

.get-platforms-label {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.get-platforms ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  width: 100%;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.get-platform {
  display: flex;
  height: 100%;
  box-sizing: border-box;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  color: var(--color-text);
  text-decoration: none;
  text-align: left;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 10px);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.get-platform:hover,
.get-platform:focus-visible {
  border-color: var(--color-accent, currentColor);
  transform: translateY(-1px);
}

.get-platform .os-icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.get-platform span {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.get-platform b {
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.get-platform small {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .get-platform { transition: none; }
  .get-platform:hover, .get-platform:focus-visible { transform: none; }
}
