.download-body { min-height: 100vh; background: #0b0910; }
.download-header { position: relative; z-index: 5; border-bottom: 1px solid rgba(174,126,211,.25); background: rgba(11,8,15,.9); backdrop-filter: blur(15px); }
.download-header .brand-bar { min-height: 5rem; }
.download-header-actions { display: flex; align-items: center; gap: .65rem; }
.download-home-link { color: #cfc2d3; font-size: .72rem; font-weight: 900; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }
.download-home-link:hover,.download-home-link:focus-visible { color: var(--purple-bright); outline: none; }
.download-main { position: relative; z-index: 2; min-height: calc(100vh - 13rem); padding-block: clamp(3rem,8vw,7rem); }
.download-landing { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(18rem,.55fr); align-items: center; gap: clamp(2rem,7vw,7rem); }
.download-eyebrow { display: flex; align-items: center; gap: .7rem; margin: 0 0 1rem; color: var(--purple-bright); font-size: .7rem; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.download-eyebrow::before { content: ""; width: 2.8rem; height: 1px; background: linear-gradient(90deg,transparent,currentColor); }
.download-copy h1,.access-panel h1 { margin: 0; color: #fff8ef; font: 700 clamp(4rem,9vw,7.5rem)/.82 Georgia,"Times New Roman",serif; letter-spacing: -.065em; }
.download-copy h1 em,.access-panel h1 em { display: block; margin-top: .22em; color: var(--purple-bright); font-size: .55em; font-style: normal; letter-spacing: -.04em; }
.download-lead { max-width: 46rem; margin: 1.6rem 0 0; color: #d0c4d2; font: 1.08rem/1.75 Georgia,serif; }
.download-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 2rem; }
.discord-button,.contact-button,.download-button { display: inline-flex; min-height: 3.2rem; align-items: center; justify-content: center; gap: .75rem; border: 1px solid #a96dff; border-radius: .25rem; background: linear-gradient(135deg,#8550db,#593184); color: #fff; padding: .75rem 1rem; font-size: .76rem; font-weight: 900; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; box-shadow: 0 14px 38px rgba(84,43,132,.3); }
.discord-button:hover,.discord-button:focus-visible,.contact-button:hover,.contact-button:focus-visible,.download-button:hover,.download-button:focus-visible { outline: 2px solid #ecf6ff; outline-offset: 3px; }
.discord-button.is-disabled { border-color: #4d4353; background: #1b161f; color: #817784; box-shadow: none; cursor: not-allowed; }
.download-note { color: #877d8b; font-size: .72rem; }
.gate-card { position: relative; overflow: hidden; border: 1px solid #5b4668; background: linear-gradient(145deg,rgba(37,28,45,.93),rgba(16,12,20,.97)); padding: 1.5rem; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.grimsby-badge { position: relative; z-index: 1; display: flex; align-items: center; gap: .85rem; margin: -.2rem 0 1.2rem; border-bottom: 1px solid rgba(185,145,210,.18); padding: 0 0 1rem; }
.grimsby-badge img { width: 6rem; height: 6rem; border: 1px solid #765193; border-radius: 12px; object-fit: contain; box-shadow: 0 0 28px rgba(144,82,207,.28); }
.grimsby-badge strong,.grimsby-badge small { display: block; }
.grimsby-badge strong { color: #fff; font: 700 1rem Georgia,serif; }
.grimsby-badge small { margin-top: .2rem; color: #aa95b5; font-size: .62rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.gate-card::after { content: "⚙"; position: absolute; right: -1.5rem; bottom: -2.5rem; color: rgba(203,157,238,.07); font: 10rem/1 "Segoe UI Symbol",sans-serif; }
.gate-card > span { display: inline-flex; border: 1px solid #634979; color: var(--purple-bright); padding: .35rem .5rem; font-size: .62rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.gate-card h2 { margin: 1.2rem 0 .6rem; color: #fff; font: 700 1.7rem Georgia,serif; }
.gate-card h2 em { color: var(--purple-bright); font-style: normal; }
.gate-card p { color: #b8acbc; }
.gate-card ol { margin: 1.2rem 0 0; padding: 0; list-style: none; counter-reset: gate; }
.gate-card li { position: relative; border-top: 1px solid rgba(185,145,210,.18); padding: .75rem 0 .75rem 2rem; color: #cabecd; font-size: .84rem; counter-increment: gate; }
.gate-card li::before { content: "0" counter(gate); position: absolute; left: 0; color: #8e64aa; font: 700 .75rem Georgia,serif; }
.gate-card .gate-assurance { position: relative; z-index: 1; margin: 1.2rem 0 0; border-left: 2px solid var(--purple); background: rgba(124,76,167,.12); color: #eee5f2; padding: .8rem .9rem; font-size: .8rem; }
.gate-card .gate-signature { position: relative; z-index: 1; margin: .85rem 0 0; color: var(--purple-bright); font: 700 .95rem Georgia,serif; text-align: right; }
.download-dashboard { display: grid; gap: 2rem; }
.download-dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid #4e3a5a; padding-bottom: 1.5rem; }
.download-welcome { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; gap: clamp(1.1rem,3vw,2rem); }
.download-welcome > img { width: clamp(7.5rem,13vw,10.5rem); height: auto; flex: 0 0 auto; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)) drop-shadow(0 0 20px rgba(144,82,207,.16)); }
.download-welcome .download-eyebrow { margin-bottom: .75rem; }
.download-welcome > div > p:last-child { max-width: 45rem; margin: .85rem 0 0; color: #c8bdcb; font: 1.02rem/1.6 Georgia,serif; }
.download-dashboard h1 { margin: 0; color: #fff8ef; font: 700 clamp(3rem,7vw,5.8rem)/.9 Georgia,serif; letter-spacing: -.055em; }
.download-welcome h1 { font-size: clamp(2.2rem,4.5vw,3.8rem); }
.account-card { flex: 0 0 auto; border: 1px solid #4e3c5a; background: #17121d; padding: .8rem 1rem; text-align: right; }
.account-card strong,.account-card span { display: block; }
.account-card strong { color: #f2eaf4; font-size: .9rem; }
.account-card span { margin-top: .2rem; color: #a890b4; font-size: .66rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.account-card { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; }
.account-card .account-links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .55rem .8rem; margin-top: .5rem; }
.account-card a { display: inline-block; color: var(--purple-bright); font-size: .64rem; font-weight: 900; text-decoration: none; text-transform: uppercase; }
/* Older markup keeps the links as plain siblings: keep them apart there too. */
.account-card > a + a { margin-left: .8rem; }
.account-card a.developer-access-link { color: var(--amber); }
.account-card a:hover,.account-card a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.workshop-traffic { position: relative; display: grid; width: min(100%,34rem); grid-template-columns: minmax(0,1fr) 8rem; overflow: hidden; margin: 1rem 0 0 auto; border: 1px solid #5a4567; background: linear-gradient(125deg,rgba(35,27,43,.97),rgba(14,11,18,.98)); box-shadow: 0 16px 38px rgba(0,0,0,.22); }
.workshop-traffic::after { content: "⚙"; position: absolute; right: -1.5rem; bottom: -2.5rem; color: rgba(192,146,224,.05); font: 8rem/1 "Segoe UI Symbol",sans-serif; pointer-events: none; }
.traffic-total { position: relative; z-index: 1; padding: .9rem 1rem; }
.traffic-total > p { margin: 0 0 .5rem; color: var(--purple-bright); font-size: .57rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.traffic-total > strong { display: block; width: fit-content; border: 1px solid #554160; background: #0e0b12; color: #f5eff8; padding: .25rem .4rem .28rem .5rem; font: 700 clamp(1.4rem,3vw,2rem)/1 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: .09em; text-shadow: 0 0 13px rgba(184,124,235,.32); box-shadow: inset 0 0 16px rgba(114,67,153,.1); }
.traffic-total > span { display: block; margin-top: .55rem; color: #fff; font-size: .56rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.traffic-total > small { display: block; margin-top: .05rem; color: #a99ead; font: .72rem/1.35 Georgia,serif; }
.traffic-today { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: 1px solid #4e3a5a; background: rgba(15,11,19,.55); padding: .75rem; text-align: center; }
.traffic-today > span { color: var(--purple-bright); text-shadow: 0 0 14px var(--purple); }
.traffic-today > strong { margin-top: .15rem; color: #fff8ef; font: 700 clamp(1.7rem,4vw,2.3rem)/1 Georgia,serif; }
.traffic-today > p { margin: .2rem 0 0; color: #e3d9e6; font-size: .55rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.traffic-today > small { margin-top: .35rem; color: #817685; font-size: .54rem; line-height: 1.3; }
.download-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
.download-shelf { display:grid; gap:1.2rem; }
.download-shelf + .download-shelf { margin-top:1.4rem; border-top:1px solid #493754; padding-top:2.4rem; }
.download-shelf-head { display:grid; grid-template-columns:minmax(0,1fr) minmax(16rem,.65fr); align-items:end; gap:2rem; }
.download-shelf-head .download-eyebrow { margin-bottom:.55rem; }
.download-shelf-head h2 { margin:0; color:#fff8ef; font:700 clamp(2rem,5vw,3.4rem)/.95 Georgia,serif; letter-spacing:-.04em; }
.download-shelf-head > p { max-width:34rem; margin:0; color:#a99ead; }
.download-card { position: relative; display: flex; flex-direction: column; overflow: hidden; min-height: 20rem; border: 1px solid #4f3d5b; background: linear-gradient(145deg,rgba(32,25,39,.96),rgba(15,12,19,.97)); padding: 1.6rem; }
.download-card-icons { position: absolute; top: 1rem; right: 1rem; z-index: 1; display: flex; align-items: center; justify-content: flex-end; min-width: 4rem; }
.download-card-icons img { width: 4.5rem; height: 4.5rem; object-fit: contain; filter: drop-shadow(0 7px 12px rgba(0,0,0,.35)); }
.download-card-icons img + img { margin-left: -1.2rem; }
.download-card-glyph { display: grid; width: 4rem; height: 4rem; place-items: center; border: 1px solid #785895; background: radial-gradient(circle at 40% 35%,rgba(178,118,255,.28),rgba(23,17,28,.95)); color: #eadcff; font: 700 2rem Georgia,serif; transform: rotate(4deg); box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.download-card::after { content: ""; position: absolute; right: -5rem; bottom: -6rem; width: 14rem; height: 14rem; border: 1px solid rgba(169,109,255,.24); transform: rotate(45deg); }
.download-version { display: inline-flex; color: #b991d3; font-size: .65rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.download-card h3 { margin: 2rem 0 .7rem; color: #fff; font: 700 clamp(1.6rem,4vw,2.25rem)/1 Georgia,serif; }
.download-card p { max-width: 32rem; margin-bottom: 1.5rem; color: #b9aebd; }
/* The actions sit at the bottom of the card, after the text, never on top of it. */
.download-card-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; margin-top: auto; gap: .75rem 1rem; }
.download-button { position: static; min-height: 2.8rem; box-shadow: none; }
.download-button.is-pending { border-color: #55475e; background: #1a151f; color: #978b9c; box-shadow: none; cursor: not-allowed; }
.download-extra-link { color: var(--purple-bright); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.download-extra-link:hover,.download-extra-link:focus-visible { color: #fff; outline: 2px solid var(--purple-bright); outline-offset: 3px; }
.download-shelf-dropdown { border: 1px solid #493754; background: linear-gradient(145deg,rgba(30,23,37,.78),rgba(14,11,18,.72)); padding: 1.15rem 1.2rem 1.3rem; }
.download-shelf-summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; cursor: pointer; }
.download-shelf-summary::-webkit-details-marker { display: none; }
.download-shelf-summary::marker { content: ""; }
.download-shelf-summary:focus-visible { outline: 2px solid var(--purple-bright); outline-offset: 5px; }
.download-shelf-summary .download-eyebrow { margin-bottom: .55rem; }
.download-shelf-summary h2 { margin: 0; color: #fff8ef; font: 700 clamp(1.8rem,4vw,2.8rem)/.95 Georgia,serif; letter-spacing: -.04em; }
.download-shelf-toggle { display: inline-flex; align-items: center; gap: .35rem; flex: 0 0 auto; color: #b9aebd; font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.download-shelf-toggle b { color: var(--purple-bright); }
.download-shelf-toggle > span { margin-left: .35rem; color: var(--purple-bright); font-size: 1.05rem; line-height: 1; transition: transform .2s; }
.download-shelf-dropdown[open] .download-shelf-toggle > span { transform: rotate(180deg); }
.download-shelf-body { display: grid; gap: 1.2rem; }
.download-shelf-copy { max-width: 42rem; margin: 1.15rem 0 0; color: #a99ead; }
.download-shelf-dropdown .download-grid { margin-top: 0; }
.empty-downloads { border: 1px solid #4c3a57; background: #17121d; padding: clamp(2rem,6vw,4rem); text-align: center; }
.empty-downloads strong { display: block; color: #fff; font: 700 1.7rem Georgia,serif; }
.empty-downloads p { max-width: 38rem; margin: .7rem auto 0; color: #a99ead; }
.developer-portal-card { display: flex; align-items: center; justify-content: space-between; gap: 2rem; border: 1px solid #6d5538; background: linear-gradient(135deg,rgba(116,80,36,.18),rgba(23,18,29,.88)); padding: clamp(1.2rem,3vw,2rem); }
.developer-portal-card .download-eyebrow { margin-bottom: .55rem; color: var(--amber); }
.developer-portal-card h2 { margin: 0; color: #fff8ef; font: 700 clamp(1.8rem,4vw,2.8rem)/1 Georgia,serif; letter-spacing: -.035em; }
.developer-portal-card p:last-child { max-width: 38rem; margin: .65rem 0 0; color: #bfae98; }
.developer-portal-card .download-button { flex: 0 0 auto; border-color: #b7854b; background: linear-gradient(135deg,#b1763e,#714526); color: #fff8ef; }
.access-panel { max-width: 58rem; margin-inline: auto; border: 1px solid #5b4268; background: linear-gradient(145deg,rgba(36,26,43,.94),rgba(14,11,18,.98)); padding: clamp(2rem,7vw,5rem); text-align: center; box-shadow: 0 35px 90px rgba(0,0,0,.38); }
.grimsby-denied { width: clamp(8rem,22vw,13rem); height: auto; margin: -1rem auto 1.1rem; object-fit: contain; filter: drop-shadow(0 18px 26px rgba(0,0,0,.4)); }
.access-mark { display: grid; width: 4rem; height: 4rem; margin: 0 auto 1.5rem; place-items: center; border: 1px solid #ac667d; background: rgba(137,58,83,.16); color: #e9a5b8; font: 700 1.4rem Georgia,serif; clip-path: polygon(50% 0,100% 50%,50% 100%,0 50%); }
.access-panel h1 { font-size: clamp(3.2rem,8vw,6rem); }
.access-panel > p { max-width: 43rem; margin: 1.5rem auto 0; color: #c7bac9; font: 1.04rem/1.75 Georgia,serif; }
.access-panel > p strong { color: #fff3ff; }
.access-panel .contact-prompt { color: var(--purple-bright); font-weight: 700; }
.access-panel .download-eyebrow { justify-content: center; }
.access-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2rem; }
.secondary-button { display: inline-flex; min-height: 3.2rem; align-items: center; border: 1px solid #604d6b; background: #17121d; color: #d8cddd; padding: .75rem 1rem; font-size: .72rem; font-weight: 900; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }
.download-footer { position: relative; z-index: 2; border-top: 1px solid #493754; background: #08060b; }
.download-footer-inner { display: flex; min-height: 8rem; align-items: center; justify-content: space-between; gap: 1rem; }
.download-footer-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.download-footer-brand img { width: 3rem; height: 3rem; border-radius: .3rem; }
.download-footer-brand strong,.download-footer-brand small { display: block; }
.download-footer-brand strong { font: 700 .9rem Georgia,serif; }
.download-footer-brand small { color: #8e8292; font-size: .66rem; }
.download-footer-inner > a:last-child { color: var(--purple-bright); font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
/* Private Downloads: the Developers Access shelf, set apart with the workshop's amber instead of purple. */
.download-shelf.is-private { border: 1px solid #6d5538; background: linear-gradient(135deg,rgba(116,80,36,.16),rgba(19,14,23,.6) 58%); padding: clamp(1.2rem,3vw,2rem); box-shadow: inset 0 1px rgba(255,222,176,.05), 0 20px 50px rgba(0,0,0,.22); }
.download-shelf.is-private .download-eyebrow { color: var(--amber); }
.download-shelf.is-private .download-shelf-head > p { color: #bfae98; }
.download-shelf.is-private .download-shelf-copy { color: #bfae98; }
.download-shelf.is-private .download-card { border-color: #6a5238; background: linear-gradient(145deg,rgba(43,33,30,.96),rgba(15,12,19,.97)); }
.download-shelf.is-private .download-card::after { border-color: rgba(230,170,85,.24); }
.download-shelf.is-private .download-version { color: #dfb474; }
.download-private-tag { display: inline-flex; align-items: center; gap: .4rem; margin-left: .6rem; border: 1px solid #7a6240; background: rgba(230,170,85,.08); color: #f2cd8f; padding: .14rem .45rem; font-size: .56rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.download-private-tag::before { content: ""; width: .36rem; height: .36rem; background: var(--amber); box-shadow: 0 0 8px rgba(230,170,85,.5); transform: rotate(45deg); }
@media (max-width:800px) { .download-landing,.download-shelf-head { grid-template-columns:1fr; } .download-shelf-summary { align-items:flex-start; flex-direction:column; gap:.85rem; } .gate-card { max-width:36rem; } .download-dashboard-head { align-items:flex-start; flex-direction:column; } .account-card { text-align:left; } }
@media (max-width:650px) { .download-header-actions .download-home-link { display:none; } .download-grid { grid-template-columns:1fr; } .download-welcome > img { width:6.5rem; } .download-footer-inner { align-items:flex-start; flex-direction:column; justify-content:center; } }
@media (max-width:430px) { .download-actions,.access-actions { align-items:stretch; flex-direction:column; } .discord-button,.contact-button,.secondary-button { width:100%; } .download-welcome { align-items:flex-start; flex-direction:column; } }
@media (max-width:800px) { .account-card { align-items:flex-start; } .account-card .account-links { justify-content:flex-start; } }

/* Shelf sub-groups: custom content first, then the standalone JARs. */
.download-group + .download-group { margin-top: 2.2rem; }
.download-group-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: 1rem; }
.download-group-head h3 { display: flex; align-items: center; gap: .6rem; margin: 0; color: var(--purple-bright); font: 900 .74rem/1 system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; }
.download-group-head h3::before { content: ""; width: .45rem; height: .45rem; background: var(--purple); box-shadow: 0 0 9px var(--purple); transform: rotate(45deg); }
.download-group-head p { flex: 1 1 16rem; margin: 0; border-top: 1px solid rgba(192,159,216,.18); padding-top: .5rem; color: #8d8194; font-size: .74rem; }
