/* download-page.css - standalone download and changelog page */

body.download-page {
  background: var(--paper, #F4ECDD);
  color: var(--ink, #1F1A12);
}

body.download-page.changelog-open {
  overflow: hidden;
}

.download-main {
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 48px 0 76px;
}

.download-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 58px;
  align-items: end;
  padding: 42px 0 40px;
  border-bottom: 1px solid rgba(74, 44, 26, .14);
}

.download-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Noto Serif SC", serif;
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--brick, #B5612C);
}

.download-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: .65;
}

.download-hero h1,
.download-section h2 {
  margin: 14px 0 0;
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink, #1F1A12);
}

.download-hero h1 {
  max-width: 690px;
  font-size: clamp(44px, 5.9vw, 72px);
  line-height: 1.08;
}

.download-hero p,
.download-section__head p,
.download-status p,
.plan-strip p,
.latest-release li,
.history-preview span,
.changelog-panel p,
.change-section li,
.history-row em {
  color: var(--ink-2, #6F5A3E);
  line-height: 1.82;
}

.download-hero__copy > p {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: 17px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.download-traits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid rgba(74, 44, 26, .12);
}

.download-trait {
  min-height: 68px;
  padding: 18px 22px 0 0;
  border-right: 1px solid rgba(74, 44, 26, .14);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-content: start;
}

.download-trait:last-child { border-right: 0; }

.download-trait > span {
  color: var(--brick, #B5612C);
  font-family: var(--font-mono, monospace);
  font-size: 18px;
  line-height: 1.2;
}

.download-trait strong {
  font-size: 14px;
  color: var(--ink, #1F1A12);
}

.download-trait em {
  grid-column: 2;
  font-style: normal;
  color: var(--ink-mute, #8D7C63);
  font-size: 13px;
}

.download-status {
  position: relative;
  padding: 28px 30px 24px;
  border: 1px solid rgba(74, 44, 26, .16);
  background: rgba(251, 246, 234, .62);
  box-shadow: 0 18px 48px rgba(66, 41, 20, .08);
  border-radius: 8px;
}

.status-ribbon {
  position: absolute;
  top: 0;
  right: 28px;
  width: 24px;
  height: 38px;
  display: grid;
  place-items: start center;
  padding-top: 6px;
  color: #fff;
  background: var(--brick, #B5612C);
  font-size: 12px;
  font-family: "Noto Serif SC", serif;
}

.status-ribbon::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -9px;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 9px solid var(--brick, #B5612C);
}

.download-status h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 19px;
}

.status-divider {
  height: 1px;
  background: rgba(74, 44, 26, .13);
  margin: 18px 0;
}

.download-status strong {
  display: block;
  color: var(--brick, #B5612C);
  margin-bottom: 10px;
}

.download-status p {
  margin: 0;
  font-size: 14px;
}

.status-latest {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(74, 44, 26, .13);
  color: var(--ink-2, #6F5A3E);
}

.status-latest b {
  color: var(--ink, #1F1A12);
  font-size: 18px;
}

.status-latest button,
.history-preview button,
.release-page-link {
  border: 0;
  background: transparent;
  color: var(--brick, #B5612C);
  font: inherit;
  cursor: pointer;
}

.status-latest button,
.release-page-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-self: end;
  white-space: nowrap;
}

.download-section {
  padding: 44px 0;
  border-bottom: 1px solid rgba(74, 44, 26, .12);
}

.download-section__bar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 26px;
}

.download-section__bar h2,
.download-section__head h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.16;
}

.download-section__bar p,
.download-section__head p {
  margin: 10px 0 0;
  font-size: 15px;
}

.download-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  font-size: 14px;
}

.download-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--ink-2, #6F5A3E);
  border-left: 1px solid rgba(74, 44, 26, .16);
  padding-left: 16px;
}

.download-tabs a:hover { color: var(--brick, #B5612C); }

.download-desktop .rel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-desktop .rel-card {
  min-height: 86px;
}

.download-planned {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.download-planned article {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: baseline;
  min-height: 58px;
  padding: 15px 18px;
  border: 1px dashed rgba(74, 44, 26, .24);
  background: rgba(251, 246, 234, .28);
  border-radius: 8px;
}

.download-planned span {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--brick, #B5612C);
  text-transform: uppercase;
}

.download-planned strong {
  font-size: 14px;
  color: var(--ink, #1F1A12);
}

.download-planned p {
  margin: 0;
  color: var(--ink-mute, #8D7C63);
  font-size: 13px;
  line-height: 1.65;
}

.download-support {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.download-support article {
  padding: 18px 20px;
  border: 1px solid rgba(74, 44, 26, .13);
  background: rgba(251, 246, 234, .38);
  border-radius: 8px;
}

.download-support span {
  font-family: "Noto Serif SC", serif;
  font-size: 14px;
  color: var(--brick, #B5612C);
}

.download-support p {
  margin: 8px 0 0;
  color: var(--ink-2, #6F5A3E);
  line-height: 1.78;
  font-size: 13.5px;
}

.download-changelog {
  padding-bottom: 52px;
}

.changelog-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
}

.latest-release,
.history-preview,
.changelog-current,
.history-list {
  border: 1px solid rgba(74, 44, 26, .16);
  background: rgba(251, 246, 234, .48);
  border-radius: 8px;
}

.latest-release {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
  box-shadow: 0 16px 42px rgba(66, 41, 20, .06);
}

.latest-release__version {
  padding: 28px 22px;
  border-right: 1px solid rgba(74, 44, 26, .14);
}

.latest-release__version strong {
  display: block;
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
}

.latest-release__version span {
  display: inline-flex;
  margin: 10px 0;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--brick, #B5612C);
  color: #fff;
  font-size: 12px;
}

.latest-release__version time,
.history-row time {
  display: block;
  color: var(--ink-soft, #9C8B6E);
  font-size: 13px;
}

.latest-release__body {
  min-width: 0;
  padding: 24px 26px 26px;
}

.latest-release__summary {
  max-width: 68ch;
  margin: 0 0 18px;
  color: var(--ink-mute, #6f604c);
  font-size: 15px;
  line-height: 1.75;
}

.latest-release__groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 18px;
}

.latest-release__group {
  min-width: 0;
  padding: 18px 18px 16px;
  border: 1px solid rgba(74, 44, 26, .11);
  border-radius: 6px;
  background: rgba(255, 252, 244, .38);
}

.latest-release h3,
.change-section h4 {
  margin: 0 0 10px;
  color: var(--brick, #B5612C);
  font-family: "Noto Serif SC", serif;
  font-size: 15px;
}

.latest-release h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.latest-release h3 span {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(181, 97, 44, .09);
  color: var(--brick, #B5612C);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
}

.latest-release ul,
.change-section ul {
  margin: 0;
  padding-left: 17px;
}

.latest-release li,
.change-section li {
  margin: 7px 0;
  font-size: 14px;
}

.latest-release li {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.latest-release__more {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brick, #B5612C);
  font-family: "Noto Serif SC", serif;
  font-size: 13px;
  cursor: pointer;
}

.latest-release__more:hover { text-decoration: underline; }

.history-preview {
  display: grid;
  align-content: start;
  overflow: hidden;
}

.history-preview button {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 55px;
  padding: 0 22px;
  text-align: left;
  border-bottom: 1px solid rgba(74, 44, 26, .11);
}

.history-preview button:hover {
  background: rgba(181, 97, 44, .06);
}

.history-preview strong {
  color: var(--ink, #1F1A12);
  font-family: "Noto Serif SC", serif;
}

.history-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.history-preview__all {
  justify-content: center;
  color: var(--brick, #B5612C) !important;
  font-family: "Noto Serif SC", serif !important;
}

.download-section__head {
  max-width: 700px;
  margin-bottom: 28px;
}

.plan-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-strip article {
  min-height: 178px;
  padding: 22px;
  border: 1px solid rgba(74, 44, 26, .14);
  background: rgba(251, 246, 234, .46);
  border-radius: 8px;
}

.plan-strip span {
  font-family: "Noto Serif SC", serif;
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--brick, #B5612C);
}

.plan-strip h3 {
  margin: 16px 0 0;
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  font-weight: 700;
}

.plan-strip p {
  margin: 12px 0 0;
  font-size: 14px;
}

.changelog-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.changelog-layer[data-open="1"] {
  pointer-events: auto;
}

.changelog-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(31, 26, 18, .32);
  opacity: 0;
  transition: opacity .22s ease;
}

.changelog-layer[data-open="1"] .changelog-backdrop {
  opacity: 1;
}

.changelog-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(590px, 100vw);
  height: 100%;
  overflow-y: auto;
  padding: 38px 40px 46px;
  background: var(--paper, #F4ECDD);
  border-left: 1px solid rgba(74, 44, 26, .18);
  box-shadow: -18px 0 50px rgba(35, 25, 14, .18);
  transform: translateX(102%);
  transition: transform .26s ease;
}

.changelog-layer[data-open="1"] .changelog-panel {
  transform: translateX(0);
}

.changelog-close {
  position: absolute;
  top: 26px;
  right: 28px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink, #1F1A12);
  cursor: pointer;
}

.changelog-panel__head h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 30px;
}

.changelog-panel__head p {
  margin: 10px 0 26px;
  font-size: 14px;
}

.changelog-current {
  padding: 20px 20px 16px;
}

.release-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink-soft, #9C8B6E);
  font-size: 13px;
}

.release-meta-row span {
  color: var(--brick, #B5612C);
}

.changelog-current h3 {
  margin: 14px 0 12px;
  font-family: "Noto Serif SC", serif;
  font-size: 23px;
}

.changelog-current > p {
  margin: 0 0 18px;
  font-size: 14px;
}

.change-section-list {
  display: grid;
  gap: 12px;
}

.change-section {
  border-top: 1px solid rgba(74, 44, 26, .12);
  padding-top: 14px;
}

.changelog-history {
  margin-top: 24px;
}

.changelog-history h3 {
  margin: 0 0 12px;
  font-family: "Noto Serif SC", serif;
  color: var(--brick, #B5612C);
  font-size: 16px;
}

.history-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(74, 44, 26, .11);
  color: inherit;
}

.history-row:last-child { border-bottom: 0; }

.history-row:hover { background: rgba(181, 97, 44, .06); }

.history-row strong {
  display: block;
  font-family: "Noto Serif SC", serif;
  color: var(--ink, #1F1A12);
}

.history-row em {
  display: block;
  font-style: normal;
  font-size: 13px;
  margin-top: 3px;
}

.release-page-link {
  width: 100%;
  justify-content: center;
  min-height: 52px;
  margin-top: 24px;
  border: 1px solid rgba(74, 44, 26, .16);
  border-radius: 6px;
  background: rgba(251, 246, 234, .5);
  font-family: "Noto Serif SC", serif;
}

@media (max-width: 980px) {
  .download-hero,
  .changelog-preview,
  .latest-release {
    grid-template-columns: 1fr;
  }

  .latest-release__version {
    border-right: 0;
    border-bottom: 1px solid rgba(74, 44, 26, .14);
  }

  .latest-release__groups,
  .plan-strip {
    grid-template-columns: 1fr;
  }

  .latest-release__body { padding: 22px; }
}

@media (max-width: 860px) {
  .download-main {
    width: min(100vw - 32px, 640px);
    padding-top: 30px;
  }

  .download-traits,
  .download-desktop .rel-grid,
  .download-planned,
  .download-support {
    grid-template-columns: 1fr;
  }

  .download-planned article {
    grid-template-columns: auto auto;
  }

  .download-planned p {
    grid-column: 1 / -1;
  }

  .download-trait {
    border-right: 0;
    border-bottom: 1px solid rgba(74, 44, 26, .14);
    padding-bottom: 16px;
  }

  .download-section__bar {
    display: block;
  }

  .download-tabs {
    justify-content: flex-start;
    margin-top: 18px;
  }

  .status-latest,
  .history-preview button,
  .history-row {
    grid-template-columns: 1fr;
  }

  .status-latest button {
    justify-self: start;
  }

  .changelog-panel {
    padding: 34px 24px 42px;
  }
}
