:root {
  color-scheme: dark;
  --bg-0: #05070d;
  --bg-1: #0b0f19;
  --panel: rgba(8, 12, 22, 0.86);
  --panel-strong: rgba(6, 9, 16, 0.95);
  --border: rgba(120, 138, 192, 0.18);
  --text-primary: #e6edf7;
  --text-muted: #9fb0c9;
  --accent: linear-gradient(135deg, #7b8cff 0%, #55c7ff 55%, #89f7ff 100%);
  --accent-strong: #7b8cff;
  --danger: #ff7d9a;
  --shadow: 0 18px 40px rgba(6, 9, 18, 0.6);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --display-font: "Aldrich", "Helvetica Neue", Arial, sans-serif;
  --body-font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --release-cover-default: url("../images/screen-2.png");
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--text-primary);
  background: var(--bg-0);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 60, 60, 0.35) 0%, rgba(60, 12, 18, 0.12) 55%, transparent 80%),
    linear-gradient(180deg, rgba(3, 4, 10, 0.92) 0%, rgba(5, 7, 13, 0.92) 55%, rgba(7, 10, 18, 0.98) 100%),
    url("../images/This Day at the End -  RED.png") center top / cover no-repeat;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='120' viewBox='0 0 140 120'%3E%3Cg fill='none' stroke='rgba(118,120,255,0.35)' stroke-width='1'%3E%3Cpath d='M35 2 L70 22 L70 62 L35 82 L0 62 L0 22 Z'/%3E%3Cpath d='M105 2 L140 22 L140 62 L105 82 L70 62 L70 22 Z'/%3E%3Cpath d='M70 62 L105 82 L105 118 L70 138 L35 118 L35 82 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 140px 120px;
  background-position: right top;
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(140deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 35%, rgba(0,0,0,0) 70%);
  mask-image: linear-gradient(140deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 35%, rgba(0,0,0,0) 70%);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}

.site-header-wrap {
  position: sticky;
  top: 18px;
  z-index: 20;
  margin-bottom: 28px;
  pointer-events: auto;
}

.site-header {
  --logo-opacity: 1;
  --logo-size: 56px;
  --logo-size-live: var(--logo-size);
  --logo-gap-base: 12px;
  --logo-gap: var(--logo-gap-base);
  --logo-extra-base: 12px;
  --logo-extra: var(--logo-extra-base);
  --brand-spacing: 16px;
  --brand-spacing-dynamic: var(--brand-spacing);
  --header-inset: 0px;
  --header-radius: 22px;
  --header-border-alpha: 0.25;
  --header-shrink: 0px;
  --header-bg-alpha: 0.74;
  --header-blur: 14px;
  --header-shadow-alpha: 0.4;
  --header-raise: 0px;
  display: flex;
  align-items: center;
  background: linear-gradient(0deg, rgba(8, 10, 18, var(--header-bg-alpha)), rgba(6, 8, 14, var(--header-bg-alpha)));
  border: 1px solid rgba(120, 130, 200, var(--header-border-alpha));
  box-shadow: 0 18px 40px rgba(0, 0, 0, var(--header-shadow-alpha));
  backdrop-filter: blur(var(--header-blur)) saturate(1.1);
  width: calc(100% - (var(--header-inset) * 2));
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 0 calc(10px + env(safe-area-inset-bottom, 0px));
  border-radius: var(--header-radius);
  pointer-events: auto;
}

.site-header__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.site-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--brand-title-gap, 8px);
  text-align: center;
}

.site-brand-logo-btn {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
  cursor: pointer;
  line-height: 0;
}

.site-brand-logo-btn:focus-visible {
  outline: 2px solid #4f82f6;
  outline-offset: 6px;
  border-radius: 14px;
}

.site-brand-logo {
  height: calc(var(--logo-size-live) + var(--logo-extra, 0px));
  width: auto;
  max-width: 90vw;
  opacity: 0;
  display: block;
  object-fit: contain;
  transform: translateY(var(--brand-logo-offset, 0px));
}

.site-header.site-header-ready .site-brand-logo {
  opacity: var(--logo-opacity, 1);
  transition: opacity 900ms ease;
}

.site-brand-title {
  font-size: clamp(14px, 2.2vw, 22px);
  --title-letter-spacing: clamp(0.6px, 0.4vw, 2px);
  transform: translateY(var(--brand-title-offset, 0px)) scale(var(--brand-title-scale, 1));
  opacity: 0;
  transform-origin: center top;
  height: var(--brand-title-height, auto);
  overflow: visible;
  padding: calc(var(--brand-title-pad-live, var(--brand-title-pad, 0px)) / 2) 0;
  box-sizing: content-box;
}

.site-header.site-header-ready .site-brand-title {
  opacity: var(--brand-title-opacity, 1);
}

.title-rest {
  font-family: var(--display-font);
  font-size: clamp(22px, 3.6vw, 36px);
  letter-spacing: var(--title-letter-spacing, clamp(0.6px, 0.4vw, 2px));
  line-height: calc(1.1em + 2px);
  color: #ffffff;
  text-shadow: none;
  font-weight: 500;
  text-transform: uppercase;
  font-style: italic;
}

.downloads-header__inner {
  justify-content: space-between;
  gap: 20px;
}

.downloads-brand {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 16px;
}

.downloads-brand .site-brand-logo {
  width: 200px;
  max-width: 200px;
  height: auto;
}

.downloads-brand-title {
  opacity: 1;
}

.downloads-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.upload-form textarea {
  min-height: 120px;
  font-size: 13px;
}
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.brand-copy h1 {
  font-family: var(--display-font);
  font-size: 30px;
  margin: 0;
  letter-spacing: 0.04em;
}

.brand-kicker {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.auth-kicker,
.eyebrow,
.panel-kicker,
.brand-kicker {
  font-family: var(--display-font);
}

.admin-pill {
  position: fixed;
  left: 28px;
  bottom: 28px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(85, 199, 255, 0.12);
  border: 1px solid rgba(85, 199, 255, 0.3);
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(123, 140, 255, 0.3);
  background: rgba(12, 18, 32, 0.6);
  font-size: 12px;
  position: relative;
}

.auth-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.auth-email {
  color: var(--text-muted);
}

.auth-signout {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 9, 18, 0.82);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .auth-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.auth-locked .page {
  filter: blur(6px);
  pointer-events: none;
}

.auth-card {
  width: min(420px, 100%);
  border-radius: var(--radius-xl);
  background: var(--panel-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}

.auth-logo {
  width: 64px;
  height: auto;
  max-height: 64px;
  border-radius: 18px;
  margin: 0 auto 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  object-fit: contain;
  display: block;
}

.auth-kicker {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0 0 12px;
  font-family: var(--display-font);
  font-size: 26px;
}

.auth-subtitle {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-signin {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.auth-signin + .auth-signin {
  margin-top: 10px;
}
.auth-signin--microsoft {
  background: linear-gradient(120deg, #0ea5e9, #2563eb);
  color: #eff6ff;
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.35);
}

.auth-signin.is-hidden {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.auth-signin__spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(11, 16, 32, 0.35);
  border-top-color: rgba(11, 16, 32, 0.85);
  opacity: 0;
  transition: opacity 0.2s ease;
  animation: auth-spin 0.8s linear infinite;
}

.auth-signin.is-loading {
  cursor: wait;
}

.auth-signin.is-loading .auth-signin__spinner {
  opacity: 1;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-status {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 32px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 32px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-info h2 {
  font-family: var(--display-font);
  font-size: 34px;
  margin: 12px 0 10px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.hero-notes {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 20px;
}

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

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(123, 140, 255, 0.4);
  color: var(--text-primary);
  text-decoration: none;
  background: rgba(20, 28, 46, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-btn__icon {
  width: 18px;
  height: 18px;
  color: currentColor;
  fill: currentColor;
  flex: 0 0 auto;
}

.download-btn.primary {
  background: var(--accent);
  color: #0b1020;
  border: none;
  font-weight: 600;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 18px rgba(7, 12, 26, 0.35);
}

.download-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
  transform: none;
}

.hero-meta {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-media {
  display: flex;
  align-items: stretch;
}

.hero-image {
  width: 100%;
  border-radius: var(--radius-lg);
  background: var(--release-cover-default) center/cover;
  min-height: 260px;
  border: 1px solid rgba(120, 138, 192, 0.2);
}

.releases {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.section-head h3 {
  font-family: var(--display-font);
  font-size: 22px;
  margin: 0 0 6px;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

.status-chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(123, 140, 255, 0.16);
  border: 1px solid rgba(123, 140, 255, 0.35);
}

.access-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 125, 154, 0.45);
  background: rgba(255, 125, 154, 0.12);
  font-size: 13px;
}

.access-banner strong {
  color: var(--danger);
  font-weight: 600;
}

.access-banner span {
  color: var(--text-muted);
}

.release-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.release-card {
  background: var(--panel-strong);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 210px;
}

.release-cover {
  width: 100%;
  height: 120px;
  border-radius: 14px;
  background: rgba(10, 14, 24, 0.75);
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.release-cover--empty {
  border-style: solid;
  background-image: var(--release-cover-default);
}

.release-title {
  font-family: var(--display-font);
  font-size: 18px;
  margin: 0;
}

.release-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.release-notes {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.release-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.release-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(85, 199, 255, 0.12);
  border: 1px solid rgba(85, 199, 255, 0.28);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.empty-state {
  border: 1px dashed rgba(123, 140, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
}

.admin-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #0b1020;
  box-shadow: 0 18px 35px rgba(10, 14, 30, 0.5);
  font-size: 28px;
  display: none;
  align-items: center;
  justify-content: center;
}

.admin-fab__icon { line-height: 1; }

body.admin-on .admin-fab {
  display: flex;
}

body.auth-locked .admin-fab {
  display: none;
}

body.auth-locked .admin-pill {
  display: none;
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 12, 0.6);
  z-index: 10;
}

.upload-panel {
  position: fixed;
  right: 24px;
  bottom: 94px;
  width: min(520px, calc(100vw - 48px));
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow);
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 20;
}

body.panel-open .upload-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.panel-kicker {
  margin: 0 0 4px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.panel-head h3 {
  margin: 0;
  font-family: var(--display-font);
}

.panel-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 12px;
}

.upload-form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.upload-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.upload-form input,
.upload-form textarea {
  background: rgba(9, 13, 25, 0.8);
  border: 1px solid rgba(120, 138, 192, 0.22);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 14px;
}

.upload-form input[type="file"] {
  background: #1b2234;
  border-color: #2a3650;
  color: var(--text-primary);
}

.upload-form input[type="file"]::file-selector-button {
  background: #212b3f;
  border: 1px solid #2f3c59;
  color: var(--text-primary);
  border-radius: 8px;
  padding: 6px 10px;
  margin-right: 10px;
  cursor: pointer;
}

.upload-form input[type="file"]::file-selector-button:hover {
  background: #27344a;
  border-color: #3a4969;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.form-meta progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent-strong);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.progress-meta span {
  white-space: nowrap;
}

.inline-status {
  color: var(--text-primary);
  font-size: 12px;
}

.primary-btn {
  margin-top: 8px;
  border-radius: 14px;
  padding: 12px 18px;
  border: none;
  font-weight: 600;
  color: #0b1020;
  background: var(--accent);
  cursor: pointer;
}

.form-footnote {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(12, 17, 30, 0.9);
  border: 1px solid rgba(120, 138, 192, 0.3);
  color: var(--text-primary);
  font-size: 13px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

.icon-btn {
  border: 0;
  background: rgba(14, 20, 36, 0.8);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ghost-btn {
  border: 1px solid rgba(120, 138, 192, 0.35);
  background: transparent;
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
}

.download-progress-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 45;
}

.download-progress-modal[hidden] {
  display: none;
}

.download-progress-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.75);
  backdrop-filter: blur(6px);
}

.download-progress-modal__card {
  position: relative;
  z-index: 1;
  width: min(420px, 90vw);
  background: var(--panel-strong);
  border: 1px solid rgba(120, 138, 192, 0.3);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: left;
}

.download-progress-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.download-progress-modal__eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--text-muted);
}

.download-progress-modal__title {
  margin: 0;
  font-size: 18px;
}

.download-progress-modal__file {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.download-progress-modal__bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.download-progress-modal__bar progress {
  width: 100%;
  height: 10px;
  accent-color: var(--accent-strong);
}

.download-progress-modal__percent {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 64px;
  text-align: right;
}

.download-progress-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.mobile-download-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.mobile-download-modal[hidden] {
  display: none;
}

.mobile-download-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.75);
  backdrop-filter: blur(6px);
}

.mobile-download-modal__card {
  position: relative;
  z-index: 1;
  width: min(420px, 90vw);
  background: var(--panel-strong);
  border: 1px solid rgba(120, 138, 192, 0.3);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: left;
}

.mobile-download-modal__card h3 {
  margin: 0;
  font-size: 18px;
}

.mobile-download-modal__card p {
  margin: 12px 0 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.mobile-download-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 880px) {
  .downloads-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
  }
  .downloads-brand {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
  .downloads-header-actions {
    width: auto;
    justify-content: flex-end;
    margin-left: auto;
  }
  .hero-card {
    grid-template-columns: 1fr;
  }
  .hero-media { order: -1; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 1024px) {
  .auth-user {
    padding: 4px;
    border-radius: 999px;
  }
  .auth-email {
    display: none;
  }
  .auth-signout {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    display: none;
    min-width: 140px;
    max-width: calc(100vw - 24px);
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(8, 12, 22, 0.96);
    border: 1px solid rgba(120, 138, 192, 0.35);
    box-shadow: 0 16px 30px rgba(6, 10, 18, 0.55);
    justify-content: center;
    text-transform: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
    z-index: 30;
  }
  .auth-user.menu-open .auth-signout {
    display: inline-flex;
  }
}

@media (max-width: 560px) {
  .page { padding: 24px 16px 96px; }
  .site-header {
    --logo-size: 46px;
    --logo-extra: 0px;
  }
  .downloads-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
  }
  .downloads-header-actions {
    width: auto;
    justify-content: flex-end;
    order: 1;
    margin-left: auto;
  }
  .downloads-brand {
    flex-direction: row;
    text-align: left;
  }
  .downloads-brand .site-brand-logo {
    width: 150px;
    max-width: 150px;
  }
  .admin-pill {
    left: 18px;
    bottom: 18px;
  }
  .hero-info h2 { font-size: 28px; }
  .download-actions { flex-direction: column; }
  .admin-fab { right: 18px; bottom: 18px; }
}
