/* pages.css: download, 404, error pages and the privacy policy. Colors, type and buttons come from site.css. */

/* Head: the logo, one line and a way home. The 404 and the error pages share it. */
.page-head {
  padding-block: var(--section) 48px;
  text-align: center;
}

.page-head .wrap {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.page-head .lede {
  max-width: 640px;
}

.page-logo {
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
}

.page-head .btn {
  margin-top: 16px;
}

/* The main download buttons take the app's accent, as the home page's primary button does. Their text is --accent-ink, 5.4:1
   on the accent in both themes, and the hover darkens the fill and keeps that contrast. */
.dl > .btn {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.dl > .btn:hover {
  opacity: 1;
  filter: brightness(0.92);
}

/* Prose: the error pages and the privacy policy. */
.wiki-solo {
  padding-top: var(--section);
}

.wiki-body {
  max-width: 640px;
  margin-inline: auto;
  padding-bottom: var(--section);
}

.wiki-body > h1 {
  margin-bottom: 16px;
}

.wiki-body h2 {
  margin-top: 56px;
  margin-bottom: 16px;
}

.wiki-body p {
  margin-top: 16px;
}

.wiki-body ul {
  margin-top: 16px;
  padding-left: 20px;
}

.wiki-body li + li {
  margin-top: 8px;
}

.wiki-body .wiki-table {
  margin-top: 24px;
  overflow-x: auto;
}

.wiki-body .wiki-table table {
  font-size: 15px;
  line-height: 22px;
}

.wiki-body th,
.wiki-body td {
  padding-right: 16px;
}

.wiki-body code {
  overflow-wrap: anywhere;
}

/* The error index: one line per error. */
.wiki-body.error-index h2 {
  margin-top: 48px;
  font-size: 20px;
  line-height: 28px;
}

.wiki-body .error-list {
  margin-top: 8px;
  padding-left: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.wiki-body .error-list li {
  margin-top: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.wiki-body .error-list a {
  font-weight: 500;
}

.wiki-body .error-list span {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 22px;
  color: var(--muted);
}

/* Requirements: one row under the header, four columns on a wide screen and a stack on a phone. */
.dl-req {
  padding-bottom: 48px;
}

.dl-req-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding-block: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dl-req-list > div {
  display: grid;
  gap: 4px;
  align-content: start;
}

.dl-req-list dt {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
}

.dl-req-list dd {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  overflow-wrap: anywhere;
}

.dl-req-link {
  margin-top: 16px;
  font-size: 15px;
  line-height: 22px;
}

.dl-req-link a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

@media (min-width: 900px) {
  .dl-req-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}

.dl-cards {
  display: grid;
  gap: 16px;
  max-width: 640px;
}

.dl {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.dl h2 {
  font-size: 24px;
  line-height: 32px;
}

.dl .alt {
  display: grid;
  gap: 4px;
  font-size: 15px;
  line-height: 22px;
}

.dl .alt .file-meta {
  font-size: 14px;
}

html[data-os="windows"] #windows {
  border-color: var(--ink);
}

.dl-note {
  max-width: 640px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Steps: plain rows with a hairline between them, opened with a plus sign. */
.steps {
  border-top: 1px solid var(--line);
}

.step {
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}

.step > h3,
.step summary h3 {
  font-size: 20px;
  line-height: 28px;
}

.step summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

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

.step summary::after {
  content: "+";
  font-size: 20px;
  line-height: 28px;
  color: var(--muted);
}

.step[open] summary::after {
  content: "\2212";
}

.step > p {
  margin-top: 12px;
  max-width: 640px;
}

.step code {
  overflow-wrap: anywhere;
}

/* The checksums: mono, one per row, wrapping rather than widening the page. */
.builds-table-wrap {
  overflow-x: auto;
}

.builds-table {
  font-size: 15px;
  line-height: 22px;
}

.builds-table th {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--muted);
}

.builds-table td code {
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

/* The file links are targets of their own, so they are at least 24px tall. */
.builds-table a,
.dl .alt a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

@media (max-width: 640px) {
  .builds-table thead {
    display: none;
  }

  .builds-table,
  .builds-table tbody {
    display: block;
  }

  .builds-table tr {
    display: grid;
    gap: 4px;
    padding-block: 16px;
    border-bottom: 1px solid var(--line);
  }

  .builds-table td {
    padding: 0;
    border: 0;
  }

  /* The header row is hidden here, so each cell names itself: "SHA-512" above its value. */
  .builds-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--muted);
  }
}

/* The version and day of each file, under its name in the table. The size stays on one line. */
.builds-table td .file-meta {
  display: block;
  margin-top: 2px;
}

.builds-table td:nth-child(4) {
  white-space: nowrap;
}

/* Less air between the download sections: they sit closer at every width. */
.dl-page .section {
  padding-block: 72px;
}

/* Commands: monospace blocks that wrap on a phone instead of scrolling sideways. The copy button sits
   in the top corner, so the text keeps clear of it. */
.dl-page pre {
  max-width: 640px;
  margin-top: 12px;
  padding-right: 56px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The three steps: one row on a wide screen, a stack on a phone. Numbered by CSS, so the list
   reads as an ordered list and the numbers are not in the text. */
.dl-steps {
  display: grid;
  gap: 24px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 900px) {
  .dl-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dl-steps li {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  counter-increment: step;
}

.dl-steps li::before {
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}

.dl-steps p {
  max-width: none;
}

/* Recent releases: plain bullets, newest first. */
.dl-recent-list {
  margin: 0;
  padding-left: 20px;
  max-width: 640px;
}

.dl-recent-list li + li {
  margin-top: 8px;
}

.dl-all {
  margin-top: 24px;
}

/* The only link on its line: as tall as the line, so the whole line is the target (WCAG 2.5.8). */
.dl-all a {
  display: inline-block;
}


/* A link alone in a table cell is a target by itself, so it gets the full 24px height (WCAG 2.5.8). */
.wiki-table td a:only-child {
  display: inline-block;
  min-height: 24px;
  line-height: 24px;
  /* Chinese breaks between any two characters, which squeezed this column to one character wide at 320px. The table scrolls in its box instead. */
  white-space: nowrap;
}

/* Download, build 5 layout: the button leads, the requirements sit beside it, the rest folds away. */
.dl-hero {
  padding: 72px 0 48px;
}

.dl-hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .dl-hero-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
}

.dl-hero-main {
  display: grid;
  justify-items: start;
  gap: 16px;
}

.dl-hero-main h1 {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.05;
}

.dl-hero .btn-lg {
  min-height: 56px;
  padding-inline: 32px;
  font-size: 17px;
}

.dl-hero .dl-req {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.dl-hero .dl-req-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0;
}

.dl-install .dl-steps {
  margin-top: 0;
}

.dl-fold {
  border-top: 1px solid var(--line);
  padding-block: 8px;
}

.dl-fold:last-child {
  border-bottom: 1px solid var(--line);
}

.dl-fold summary {
  cursor: pointer;
  padding-block: 12px;
  list-style: none;
}

.dl-fold summary::-webkit-details-marker {
  display: none;
}

.dl-fold summary h2 {
  display: inline;
  font-size: 20px;
  line-height: 28px;
  color: var(--ink);
}

.dl-fold summary::after {
  content: "+";
  float: right;
  color: var(--accent-text);
}

.dl-fold[open] summary::after {
  content: "–";
}

.dl-fold > :not(summary) {
  max-width: 720px;
  margin-bottom: 16px;
}


/* Pricing page */
.page-pricing {
  padding-block: 72px var(--section);
}

.pricing-hero {
  padding-bottom: 56px;
}

.pricing-hero-header {
  max-width: 640px;
  margin-bottom: 40px;
}

.pricing-hero-header h1 {
  font-size: clamp(36px, 6vw, 48px);
  line-height: 1.1;
  margin-bottom: 16px;
}

.pricing-main-card {
  max-width: 680px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.pricing-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.pricing-badge {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--accent-text);
  margin-bottom: 12px;
}

.pricing-card-title-group h2 {
  font-size: 24px;
  line-height: 32px;
  margin: 0;
}

.pricing-price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pricing-price {
  font-family: var(--font-mono);
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.pricing-price-sub {
  font-size: 15px;
  line-height: 22px;
  color: var(--muted);
}

.pricing-feature-list {
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.pricing-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 22px;
}

.pricing-feature-list .icon-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--accent);
}

.pricing-cta-wrap {
  display: flex;
  align-items: center;
}

/* Sub-sections */
.pricing-section {
  padding-block: 48px;
  border-top: 1px solid var(--line);
}

.pricing-section h2 {
  font-size: 24px;
  line-height: 32px;
  margin-bottom: 24px;
}

.pricing-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 900px;
}

@media (max-width: 680px) {
  .pricing-grid-2 {
    grid-template-columns: 1fr;
  }
}

.pricing-info-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.pricing-info-card h3 {
  font-size: 18px;
  line-height: 26px;
  margin-bottom: 8px;
}

.pricing-info-card p {
  font-size: 15px;
  line-height: 22px;
  color: var(--muted);
  margin: 0;
}

/* Support Card */
.pricing-support-card {
  max-width: 900px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.pricing-support-content {
  flex: 1 1 480px;
}

.pricing-support-content h2 {
  font-size: 22px;
  line-height: 30px;
  margin: 0 0 12px;
}

.pricing-support-content p {
  font-size: 15px;
  line-height: 22px;
  color: var(--muted);
  margin: 0 0 8px;
}

.pricing-support-content .pricing-support-goal {
  color: var(--ink);
  font-weight: 500;
  margin-top: 8px;
  margin-bottom: 0;
}

.pricing-support-action {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .pricing-main-card {
    padding: 24px 20px;
  }

  .pricing-support-card {
    padding: 24px 20px;
  }
}
