.topbar nav a.nav-mod {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
  padding: 8px 13px;
  border: 1px solid var(--sienna);
  background: var(--sienna);
  color: var(--on-sienna);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 3px 14px #a7472d26;
  transition: background-color .2s, box-shadow .2s;
}

.topbar nav a.nav-mod:hover {
  background: #8d3824;
  color: var(--on-sienna);
  box-shadow: 0 4px 15px #a7472d3b;
}

.mod-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(480px, 65vh, 620px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: radial-gradient(ellipse at 80% 55%, #c88f72 0%, #d9b095 48%, #e6cbb3 79%);
}

.mod-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(#a7472d25 1px, transparent 1px), linear-gradient(90deg, #a7472d25 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent 34%, black);
}

.mod-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 630px);
  padding: clamp(29px, 5.6vw, 74px);
}

.mod-copy .eyebrow {
  color: var(--accent);
  margin-bottom: 18px;
}

.mod-copy h1 {
  font-size: clamp(66px, 10.4vw, 145px);
  line-height: .87;
  letter-spacing: -.06em;
}

.mod-copy h1 em { color: var(--accent); }
.mod-lede { margin: 23px 0 28px; color: var(--muted); font-size: clamp(16px, 2vw, 20px); }

.mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mod-download, .mod-guides {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 53px;
  padding: 10px 14px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  transition: background-color .2s, border-color .2s, transform .2s, box-shadow .2s;
}

.mod-download {
  color: #23543a;
  background: #c9dcc8;
  border-color: #7fa78a;
  box-shadow: 0 5px 18px #365b411c;
}

.mod-download:hover {
  transform: translateY(-2px);
  background: #bad2ba;
  border-color: #527e61;
  box-shadow: 0 7px 22px #365b412d;
}

.mod-download:focus-visible { outline-color: #356949; }
.mod-guides { color: var(--ink); background: var(--panel); border-color: #c9957f; }
.mod-guides:hover { background: var(--raised); border-color: #ad745c; transform: translateY(-2px); }
.mod-arrow { color: #326746; font-size: 18px; line-height: 1; margin-left: 2px; }
.mod-guides span { color: var(--accent); }
.modrinth-mark { flex: 0 0 23px; width: 23px; height: 23px; overflow: hidden; }
.modrinth-mark img { display: block; width: auto; max-width: none; height: 100%; filter: brightness(.72); }

.mod-official {
  max-width: 420px;
  margin: 20px 0 0;
  padding-left: 13px;
  border-left: 2px solid #b86f53;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mod-official strong { color: var(--ink); }

.mod-art {
  position: absolute;
  inset: 0 0 0 47%;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: -1;
}

.mod-woodcut {
  width: min(88%, 510px);
  aspect-ratio: 1;
  position: relative;
  transform: translate(5%, -1%) rotate(-19deg);
  border-radius: 46% 54% 47% 53% / 51% 46% 54% 49%;
  border: 2px solid #b5694c;
  background:
    radial-gradient(ellipse at 42% 42%, #e7bb9275, #e1ab8040 45%, #8a452a55 84%),
    repeating-radial-gradient(ellipse at 46% 51%, #a25d41 0 1px, #d9ac87 2px 7px, #bd805f 8px 11px, #e3b891 12px 13px, #ac7052 14px 18px);
  box-shadow: 10px 15px 0 #c17b5d, 11px 16px 0 1px #ab654b, 20px 26px 54px #9448292b, inset 0 0 0 8px #cc8b69, inset 0 0 38px #8d442940;
}

.mod-woodcut::before, .mod-woodcut::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.mod-woodcut::before {
  inset: -21px;
  border: 1px solid #ae6c4e59;
  transform: rotate(8deg);
}

.mod-woodcut::after {
  inset: 0;
  opacity: .36;
  background: repeating-conic-gradient(from 7deg at 46% 51%, #ffefd199 0deg .2deg, transparent .3deg 11deg, #984c2f80 11.4deg 11.8deg, transparent 12deg 21deg);
  mix-blend-mode: soft-light;
}

.mod-features { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 5vw, 63px); }

.features-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px 28px;
  margin-bottom: 24px;
}

.features-heading h2 { font-size: clamp(56px, 7.5vw, 95px); }
.features-heading h2 em { color: var(--accent); font-weight: 400; }
.features-heading p { max-width: 33ch; margin: 0 0 2px; color: var(--muted); }

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 12px;
}

.feature-card {
  --feature-accent: var(--accent);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: radial-gradient(ellipse at 100% 0%, #dcb59e, var(--panel) 68%);
}

.feature-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -120px -100px auto auto;
  width: 300px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 11px, currentColor 12px 13px);
  color: var(--feature-accent);
  opacity: .08;
  pointer-events: none;
  mask-image: linear-gradient(225deg, black 24%, transparent 80%);
}

.feature-card > header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.feature-card h3 { margin: 0; color: var(--ink); font-size: clamp(18px, 2vw, 24px); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid color-mix(in srgb, var(--feature-accent) 38%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--feature-accent) 12%, var(--panel));
  color: var(--feature-accent);
  font: 500 24px/1 var(--mono);
}

.feature-card dl { margin: 0; }
.feature-card dl > div { padding: 10px 0; border-top: 1px solid #65453725; }
.feature-card dl > div:last-child { padding-bottom: 0; }
.feature-card dt { color: var(--feature-accent); font-weight: 700; font-size: 14px; }
.feature-card dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.feature-telemetry { grid-row: span 2; }
.feature-telemetry dl { display: flex; flex: 1; flex-direction: column; }
.feature-telemetry dl > div { display: grid; flex: 1; align-content: center; }
.feature-routing { --feature-accent: #3e5531; background: radial-gradient(ellipse at 100% 0%, #bfc8a9, #dce0c9 68%); }
.feature-rendering { --feature-accent: #5c3a15; background: radial-gradient(ellipse at 100% 0%, #d5b382, #e7d0aa 68%); }
.feature-community { --feature-accent: #543963; grid-column: 1 / -1; background: radial-gradient(ellipse at 100% 0%, #ccb3cd, #e2d1df 66%); }
.feature-community dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 26px; }
.feature-community dl > div { padding-bottom: 0; }

.feature-ideas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 20px;
  margin-top: 12px;
  padding: 14px clamp(18px, 3vw, 32px);
  border: 1px dashed #8e6a55;
  border-radius: 11px;
  color: var(--muted);
}

.feature-ideas h3 { margin: 0; font: 500 11px/1.45 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.feature-ideas ul { display: flex; flex-wrap: wrap; gap: 4px 19px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.feature-ideas li::before { content: "◇"; margin-right: 6px; color: var(--accent); }

.mod-release {
  display: grid;
  grid-template-columns: 1fr minmax(290px, .86fr);
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
  min-height: 380px;
  margin-top: 22px;
  padding: clamp(27px, 5.3vw, 68px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(120deg, #ddbaa3, #e8d4c2 61%, #d9dfc9);
  scroll-margin-top: 18px;
}

.mod-release:focus { outline: none; }
.mod-release:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.mod-release h2 { font-size: clamp(51px, 7vw, 89px); }
.mod-release h2 em { color: var(--accent); font-weight: 400; }
.mod-release-copy > p:last-child { max-width: 38ch; margin: 20px 0 0; color: var(--muted); }
.release-label { display: flex; gap: 10px; align-items: center; }
.release-label span { width: 8px; height: 8px; border-radius: 50%; background: var(--sienna); box-shadow: 0 0 0 4px #a7472d24; }

.release-distribution { display: grid; min-width: 0; gap: 17px; }

.release-track {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 27px;
  padding: 32px 20px 25px;
  border-radius: 13px;
  border: 1px solid #a4bca9;
  background: radial-gradient(ellipse at 50% 0%, #c2d3bd, #dbe5d4 75%);
}

.release-track img { width: min(75%, 240px); height: auto; display: block; filter: brightness(.35) saturate(1.35); }
.release-track ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  max-width: 360px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.release-track li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #3e5143;
  text-align: center;
  font: 500 11px/1.4 var(--mono);
}

.release-track li + li::before {
  content: "";
  position: absolute;
  inset: 8px 50% auto -50%;
  height: 1px;
  background: #9fb1a0;
}

.release-track li span {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid #788e7d;
  border-radius: 50%;
  background: #dbe5d4;
}

.release-track li:first-child span { background: #396b4b; color: #fff; border-color: #396b4b; }
.release-track [aria-current] { color: var(--accent); }
.release-track [aria-current] span { background: var(--sienna); border-color: var(--sienna); box-shadow: 0 0 0 4px #a7472d24; }

.direct-download { display: grid; gap: 8px; }

.jar-download {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 95px;
  padding: 16px clamp(14px, 2vw, 24px);
  overflow: hidden;
  border: 1px solid #7c2e20;
  border-radius: 13px;
  background: linear-gradient(115deg, #762c20, #a1442d 72%, #ad5035);
  color: var(--on-sienna);
  box-shadow: 0 7px 17px #64241440, inset 0 1px #ffdbc956;
  transition: transform .2s, box-shadow .2s, filter .2s;
}

.jar-download::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -100% -4% -100% 34%;
  background: repeating-radial-gradient(ellipse at 93% 48%, #ffd8ba40 0 1px, transparent 2px 9px);
  mask-image: linear-gradient(90deg, transparent, black);
}

.jar-download-label { font: 400 clamp(29px, 3.15vw, 44px)/1 var(--serif); }

.jar-download-icon {
  position: relative;
  flex: 0 0 45px;
  height: 45px;
  display: grid;
  place-items: center;
  padding-bottom: 5px;
  border: 1px solid #ffe0c370;
  border-radius: 9px;
  background: #ffe1c626;
  font-size: 26px;
  line-height: 1;
  transition: transform .2s;
}

.jar-download-icon::after {
  content: "";
  position: absolute;
  bottom: 8px;
  width: 15px;
  border-bottom: 1px solid currentColor;
}

.jar-download[href]:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 10px 21px #64241452, inset 0 1px #ffdbc956;
}

.jar-download[href]:hover .jar-download-icon { transform: translateY(2px); }
.jar-download[aria-disabled="true"] { cursor: not-allowed; }
.direct-download p { margin: 0; color: var(--muted); font-size: 13px; }

@media (max-width: 870px) {
  .mod-art { inset-inline-start: 42%; opacity: .61; }
  .mod-hero { background: radial-gradient(ellipse at 82% 55%, #d4a88c, #e6cbb3 76%); }
  .mod-release { gap: 28px; }
}

@media (max-width: 660px) {
  .topbar nav .nav-mod { padding: 5px 8px; margin-left: 2px; gap: 5px; }
  .mod-hero { min-height: 460px; }
  .mod-art { inset: -12% -33% 8% 24%; opacity: .38; }
  .mod-copy { padding: 28px 23px; }
  .features-heading { display: block; margin-bottom: 15px; }
  .features-heading p { margin: 10px 0 0; }
  .feature-grid, .feature-community dl { grid-template-columns: minmax(0, 1fr); }
  .feature-telemetry { grid-row: auto; }
  .feature-community dl > div:not(:last-child) { padding-bottom: 10px; }
  .mod-release { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
  .mod-release h2 br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .topbar nav .nav-mod, .mod-download, .mod-guides, .jar-download, .jar-download-icon { transition: none; }
  .mod-download:hover, .mod-guides:hover, .jar-download[href]:hover, .jar-download[href]:hover .jar-download-icon { transform: none; }
}
