.section-document,
body.section-page {
  min-width: 0;
  overflow: visible;
}

.section-document {
  background: #0c130e;
}

body.section-page {
  --accent: #c7dfa0;
  --rim: #c9ad67;
  --plate: #183d28;
  --art: url("hero-molly.webp");
  --header-underlay: linear-gradient(110deg, #1c3b22f8, #102619f8 65%, #19301df8);
  --section-veil: linear-gradient(90deg, #07110ee8, #07110ebd);
  --section-panel: linear-gradient(130deg, #111b16ed, #090e0cf0);
  --section-ornament: #101710;
  --section-divider: #c7a56535;
  --section-rim: #a98b4a66;
  min-height: 100svh;
  color: #f5ecd4;
  background: var(--section-veil), var(--art) center / cover fixed;
}

body.section-page[data-world="lucifer"] {
  --accent: #ffcb9f;
  --rim: #c77c49;
  --plate: #4b2018;
  --art: url("hero-lucifer.webp");
  --header-underlay: linear-gradient(110deg, #32140df8, #280c0af8 65%, #451b0cf8);
  --section-veil: linear-gradient(90deg, #160906ec, #160906b8);
  --section-panel: linear-gradient(130deg, #211310f5, #130b0bf5);
  --section-ornament: #201310;
  --section-divider: #d58f6049;
  --section-rim: #b9754d80;
}

.section-page .world-header {
  position: sticky;
  top: 0;
}

.section-page .world-header::after {
  content: none;
}

.section-page .world-header .world-tab {
  text-decoration: none;
}

.section-page .world-tab[aria-current="true"] .tab-gem {
  opacity: 1;
  transform: scale(1.25);
}

.section-page .world-header .tab-molly[aria-current="true"] {
  color: #efffd8;
  border-color: #b4d78bb0;
  box-shadow: inset 0 1px #d7f2b645, 0 0 12px #b5e77828;
}

.section-page .world-header .tab-lucifer[aria-current="true"] {
  color: #ffe1c5;
  border-color: #e7a879b0;
  box-shadow: inset 0 1px #ffd2a266, 0 0 12px #fb8c492c;
}

.section-page .world-header .world-actions .action[aria-current="page"]::before {
  box-shadow: inset 0 0 0 1px #ffe4b36b, inset 0 1px #f7e4b738;
}

.section-page main {
  position: relative;
  width: min(860px, calc(100% - 40px));
  margin: clamp(36px, 9vh, 90px) auto;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--section-rim);
  background: var(--section-panel);
  box-shadow: 0 24px 80px #0006;
  line-height: 1.65;
}

.section-page main::before,
.section-page main::after {
  position: absolute;
  top: -12px;
  padding: 0 8px;
  color: var(--rim);
  background: var(--section-ornament);
  font: 24px/1 Georgia, serif;
  content: "✧";
  pointer-events: none;
}

.section-page main::before { left: 24px; }
.section-page main::after { right: 24px; }
.section-page main a { color: var(--accent); }
.section-page main a:focus-visible { outline-offset: 5px; }
.section-page main h1 { margin: 0 0 16px; color: #fff0c9; font: 400 clamp(29px, 5vw, 40px)/1.2 Georgia, serif; }
.section-page main h2 { margin: 32px 0 12px; color: var(--accent); font: 400 23px Georgia, serif; }
.section-page main p { margin: 0 0 18px; color: #ddd6c5; }

.section-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 16px;
  row-gap: 3px;
  margin-bottom: 13px;
}

.section-page main .eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-page .section-back {
  font-size: 14px;
  color: #e0d3b7;
  text-underline-offset: 3px;
}

.section-page .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0;
}

.section-page main .button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border: 1px solid var(--rim);
  color: #fff0cf;
  background: linear-gradient(135deg, #ffffff15, transparent 40%), linear-gradient(180deg, var(--plate), var(--section-ornament));
  box-shadow: inset 0 0 0 3px #080d0b99, inset 0 0 20px #0005;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  font: 600 17px Georgia, serif;
  text-decoration: none;
}

.section-page .button:hover { filter: brightness(1.2); }

.section-page main .note {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--section-divider);
  color: #bfb7a3;
  font-size: 14px;
}

.section-page .status {
  display: inline-block;
  margin-bottom: 22px;
  padding: 4px 12px;
  border: 1px solid var(--section-rim);
  color: var(--accent);
  font-size: 14px;
}

@media (max-width: 540px) {
  .section-page main { margin-block: 32px; }
  .section-page .actions { display: grid; grid-template-columns: 1fr; }
  .section-page main .button { font-size: 16px; }
}

.section-page .download-page {
  --download-button-rim: #a7925b;
  --download-button-bg: linear-gradient(180deg, #234533, #142a20);
  --download-launcher-rim: #d6bc7b;
  --download-launcher-bg: linear-gradient(180deg, #36543a, #203a2a);
  --download-hover-rim: #ffe1a1;
  --download-hover-bg: linear-gradient(180deg, #3b5c41, #254635);
  --download-arrow-rim: #e3c58557;
  --download-arrow-ink: #ffe2a1;
  --download-muted-rim: #668171;
  --download-muted-bg: #172822;
  --download-muted-ink: #bfd2c8;
  --download-muted-status: #a7bfb1;
  width: min(1320px, calc(100% - clamp(40px, 8vw, 128px)));
}

body[data-world="lucifer"] .download-page {
  --download-button-rim: #bd8465;
  --download-button-bg: linear-gradient(180deg, #573026, #2b1919);
  --download-launcher-rim: #e4ae7f;
  --download-launcher-bg: linear-gradient(180deg, #693c2c, #39221e);
  --download-hover-rim: #ffcd9c;
  --download-hover-bg: linear-gradient(180deg, #743e2d, #492620);
  --download-arrow-rim: #eb997761;
  --download-arrow-ink: #ffd2a8;
  --download-muted-rim: #986e5c;
  --download-muted-bg: #32211f;
  --download-muted-ink: #e3c9bb;
  --download-muted-status: #d2b1a3;
}

.download-options {
  display: grid;
  gap: 26px;
  margin-top: 30px;
}

.section-page .download-options h2 {
  margin-top: 0;
}

@media (min-width: 1000px) {
  .download-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 3vw, 48px);
  }

  .download-options > section + section {
    border-inline-start: 1px solid var(--section-divider);
    padding-inline-start: clamp(24px, 3vw, 48px);
  }
}

.download-options > section {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
}

.download-options p {
  margin-block-end: 18px;
}

.download-options .download-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  inline-size: min(100%, 18rem);
  gap: 10px;
  margin-block: auto 0;
}

.download-options .download-actions--client {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-button--wide {
  grid-column: 1 / -1;
}

.section-page .download-page .download-button {
  min-inline-size: 0;
  justify-content: space-between;
  gap: 8px;
  min-block-size: 54px;
  padding: 10px 14px;
  border: 1px solid var(--download-button-rim);
  border-radius: 6px;
  clip-path: none;
  color: #fff3d8;
  background: var(--download-button-bg);
  box-shadow: inset 0 1px #eedfb729, 0 5px 12px #030b0766;
  font: 600 15px/1.3 Arial, Helvetica, sans-serif;
}

.section-page .download-page .download-button--launcher {
  border-color: var(--download-launcher-rim);
  background: var(--download-launcher-bg);
}

.download-button__arrow {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  block-size: 26px;
  border: 1px solid var(--download-arrow-rim);
  border-radius: 4px;
  color: var(--download-arrow-ink);
  font-size: 16px;
}

.download-page a.download-button:hover {
  border-color: var(--download-hover-rim);
  background: var(--download-hover-bg);
  filter: none;
}

.download-page .download-button:disabled {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  border-color: var(--download-muted-rim);
  color: var(--download-muted-ink);
  background: var(--download-muted-bg);
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
  text-align: start;
}

.download-button__status {
  color: var(--download-muted-status);
  font-size: 12px;
  font-weight: 400;
}

@media (max-width: 540px) {
  .download-options .download-actions {
    inline-size: 100%;
  }
}

@media (max-width: 360px) {
  .section-page .download-page .download-button {
    padding-inline: 10px;
  }
}
