:root {
  color-scheme: light;
  --ink: #14201c;
  --muted: #66736e;
  --paper: #fbf7ee;
  --white: #ffffff;
  --soft: #f1eadf;
  --line: rgba(20, 32, 28, 0.14);
  --green: #126657;
  --green-dark: #073d35;
  --brown-dark: #382815;
  --gold: #b9812d;
  --red: #8f3f33;
  --hero-image: url("https://accessibleaudio.co.za/assets/aa-photo-hero.webp?v=20260612-photo1");
  --bg-service: url("https://accessibleaudio.co.za/assets/aa-photo-production.webp?v=20260612-photo1");
  --logo: url("https://accessibleaudio.co.za/assets/accessible-audio-logo-round.svg?v=20260624-logo1");
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: #062c27;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #062c27;
  overflow-x: hidden;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #241a08;
  backdrop-filter: blur(12px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: #fffaf1;
  font-size: 0.98rem;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--paper) var(--logo) center / cover no-repeat;
}

.nav-links {
  gap: clamp(16px, 2.4vw, 34px);
  color: #fffaf1;
  font-size: 0.9rem;
  font-weight: 760;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: #6ff1dc;
}

.submit-hero {
  position: relative;
  min-height: clamp(190px, 28svh, 300px);
  display: grid;
  align-items: center;
  padding: clamp(18px, 3vw, 40px) clamp(20px, 5vw, 72px);
  color: #fffaf1;
  background:
    linear-gradient(90deg, rgba(36, 26, 8, 0.96) 0%, rgba(36, 26, 8, 0.86) 34%, rgba(36, 26, 8, 0.42) 62%, rgba(36, 26, 8, 0.08) 100%),
    var(--hero-image) right center / cover;
}

.submit-hero-content {
  width: min(680px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.submit-hero .eyebrow {
  color: #6ff1dc;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: none;
  margin-bottom: 14px;
  color: #f4efe6;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.1vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.panel h2 {
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.2;
}

.hero-lead {
  max-width: 34rem;
  margin-bottom: 0;
  color: rgba(255, 250, 241, 0.78);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  font-weight: 670;
  line-height: 1.45;
}

.submit-section,
.site-footer {
  padding-inline: clamp(20px, 5vw, 72px);
}

.submit-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.submit-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg-service) right center / cover no-repeat;
  opacity: 0.42;
  -webkit-mask-image: linear-gradient(270deg, #000 0%, rgba(0, 0, 0, 0.94) 28%, rgba(0, 0, 0, 0.48) 54%, transparent 78%);
  mask-image: linear-gradient(270deg, #000 0%, rgba(0, 0, 0, 0.94) 28%, rgba(0, 0, 0, 0.48) 54%, transparent 78%);
}

.submit-section > * {
  position: relative;
  z-index: 1;
}

.submit-intro {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: stretch;
  gap: 16px;
  width: min(820px, 100%);
  margin-inline: auto;
  margin-bottom: clamp(18px, 2.4vw, 28px);
  text-align: left;
}

.submit-intro h2 {
  max-width: none;
}

.submit-intro p:not(.section-kicker),
.panel-header p,
.field-note,
.empty,
.file-row span {
  color: var(--muted);
  line-height: 1.7;
}

.submit-intro > p {
  max-width: 680px;
  margin: 0;
  justify-self: start;
  font-size: 1.02rem;
}

.submit-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 18px;
  width: min(820px, 100%);
  margin-inline: auto;
}

.auth-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.55fr);
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.auth-identity {
  position: relative;
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(5, 44, 39, 0.5), rgba(36, 26, 8, 0.88)),
    var(--hero-image) 60% center / cover no-repeat;
}

.auth-identity::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 38%, rgba(111, 241, 220, 0.2), transparent 42%);
}

.auth-brand-mark {
  position: relative;
  z-index: 1;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 250, 241, 0.34);
  border-radius: 50%;
  background: var(--paper) var(--logo) center / cover no-repeat;
  box-shadow: 0 0 0 10px rgba(111, 241, 220, 0.08), 0 22px 44px rgba(0, 0, 0, 0.34);
}

.auth-signal {
  position: relative;
  z-index: 1;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-signal i {
  width: 3px;
  height: 100%;
  display: block;
  border-radius: 999px;
  background: #8ff9e8;
  box-shadow: 0 0 14px rgba(111, 241, 220, 0.6);
  animation: auth-signal 1.35s ease-in-out infinite alternate;
}

.auth-signal i:nth-child(2),
.auth-signal i:nth-child(4) {
  animation-delay: -0.7s;
}

.auth-signal i:nth-child(3) {
  animation-delay: -1.1s;
}

.auth-copy {
  display: grid;
  align-content: center;
  padding: clamp(28px, 5vw, 54px);
}

.auth-copy .section-kicker {
  margin-bottom: 10px;
}

.auth-copy h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.15rem);
}

.auth-copy > p:not(.section-kicker) {
  max-width: 34rem;
  margin-bottom: 24px;
  color: var(--submit-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.auth-controls {
  display: grid;
  gap: 16px;
}

.google-auth-button {
  min-height: 58px;
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  gap: 14px;
  padding: 14px 18px;
  border-color: rgba(255, 255, 255, 0.84);
  background: #ffffff;
  color: #1f1f1f;
  font-weight: 820;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.google-auth-button:hover {
  border-color: #ffffff;
  background: #f7fffd;
}

.google-auth-button.is-loading .auth-arrow {
  animation: auth-arrow 720ms ease-in-out infinite alternate;
}

.google-mark {
  width: 22px;
  height: 22px;
}

.auth-arrow {
  color: var(--green-dark);
  font-size: 1.3rem;
  line-height: 1;
}

.auth-assurance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--submit-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-assurance-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 0.25rem;
  border: 2px solid #b8fff4;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(111, 241, 220, 0.08);
  animation: auth-assurance 2.2s ease-in-out infinite;
}

.auth-logout {
  width: auto;
  justify-self: start;
}

.auth-panel.is-authenticated {
  grid-template-columns: 150px minmax(0, 1fr);
}

.auth-panel.is-authenticated .auth-identity {
  min-height: 210px;
}

@keyframes auth-signal {
  from { transform: scaleY(0.28); opacity: 0.46; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes auth-arrow {
  from { transform: translateX(0); }
  to { transform: translateX(5px); }
}

@keyframes auth-assurance {
  0%, 100% { box-shadow: 0 0 0 5px rgba(111, 241, 220, 0.08); }
  50% { box-shadow: 0 0 0 9px rgba(111, 241, 220, 0.02); }
}

.panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(18px, 3vw, 26px);
  box-shadow: 0 18px 46px rgb(20 32 28 / 0.09);
}

.panel-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.panel-header p {
  max-width: 520px;
  margin: 0;
}

.grid-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.stack-form {
  display: grid;
  gap: 18px;
}

.analysis-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(18, 102, 87, 0.2);
  border-radius: 6px;
  background: rgba(231, 239, 233, 0.72);
}

.analysis-state {
  color: var(--green-dark);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.45;
}

.analysis-state.error {
  color: var(--red);
}

.chapter-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.cost-estimate-panel,
.payment-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(240, 194, 99, 0.32);
  border-radius: 6px;
  background: rgba(240, 194, 99, 0.08);
}

.cost-estimate-panel .section-kicker,
.payment-panel .section-kicker {
  margin-bottom: 6px;
  color: #f0c263;
}

.cost-estimate-panel > div > strong,
.payment-panel > div > strong {
  display: block;
  color: #fffaf1;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.payment-panel > div > span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 250, 241, 0.74);
}

.payment-payer-note {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid #f0c263;
  background: rgba(240, 194, 99, 0.1);
  color: #fffaf1;
  line-height: 1.5;
}

.cost-estimate-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cost-estimate-panel li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 250, 241, 0.12);
  color: rgba(255, 250, 241, 0.74);
}

.cost-estimate-panel li strong {
  color: #f0c263;
  white-space: nowrap;
}

.production-options {
  display: grid;
  gap: 18px;
}

.select-action {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
}

.select-action button {
  margin-top: 8px;
}

.sample-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sample-actions button {
  min-width: 0;
}

.voice-pricing-note {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
}

.voice-pricing-note strong {
  color: #f0c263;
}

.terms-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.terms-consent input {
  flex: 0 0 auto;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: #f0c263;
}

.terms-consent a {
  color: #f0c263;
  font-weight: 800;
}

label,
legend {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 760;
}

input,
select {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input[type="file"] {
  min-height: 52px;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgb(185 129 45 / 0.34);
  outline-offset: 2px;
}

fieldset {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.46);
}

.inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-weight: 670;
}

.inline input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 16px;
  margin-top: 10px;
}

.option-grid > label {
  display: grid;
  gap: 8px;
  align-content: start;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  grid-column: 1 / -1;
}

.captcha-slot {
  grid-column: 1 / -1;
  min-height: 65px;
}

button {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 820;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

button:hover {
  background: var(--green-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button:disabled:hover {
  border-color: inherit;
  background: inherit;
}

button.secondary {
  border-color: rgba(18, 102, 87, 0.22);
  background: #e7efe9;
  color: var(--green-dark);
}

button.secondary:hover {
  border-color: rgba(18, 102, 87, 0.4);
  background: #dbe8e1;
}

button.ghost {
  min-height: auto;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
  color: var(--green);
}

.files-list {
  display: grid;
  gap: 10px;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.64);
}

.file-row > * {
  min-width: 0;
}

.file-row strong,
.file-row span {
  display: block;
}

.file-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.file-row-actions button {
  width: auto;
}

.production-status {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  background: rgba(240, 194, 99, 0.1);
}

.production-status strong { color: var(--ink); }
.production-status span { color: var(--muted); line-height: 1.5; }
.production-status--confirmed,
.production-status--processing,
.production-status--complete { border-left-color: var(--green); background: rgba(111, 241, 220, 0.1); }
.production-status--error { border-left-color: #ff8e82; background: rgba(176, 48, 39, 0.18); }

.chapter-downloads {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.chapter-downloads-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.chapter-downloads-heading span {
  color: var(--submit-muted);
  font-size: 0.9rem;
}

.chapter-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 0.65rem;
  max-height: min(52vh, 32rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 6px 2px 2px;
  scrollbar-color: rgba(111, 241, 220, 0.55) rgba(255, 255, 255, 0.06);
}

.chapter-download-grid button {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.25rem;
  width: 100%;
  min-width: 0;
  min-height: 74px;
  text-align: left;
}

.chapter-download-title,
.chapter-download-meta {
  overflow-wrap: anywhere;
}

.chapter-download-title {
  color: inherit !important;
  font-weight: 780;
}

.chapter-download-meta {
  color: rgba(223, 255, 250, 0.76) !important;
  font-size: 0.82rem;
  font-weight: 650;
}

.badge {
  border-radius: 999px;
  background: #e9f1ed;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 10px;
}

.status {
  min-height: 28px;
  margin: 18px 0 0;
  color: var(--green-dark);
  font-weight: 820;
}

.status.error {
  color: var(--red);
}

.submit-section {
  --submit-ink: #fffaf1;
  --submit-muted: rgba(255, 250, 241, 0.72);
  --submit-line: rgba(255, 250, 241, 0.16);
  --submit-panel: rgba(6, 32, 28, 0.92);
  --submit-panel-soft: rgba(255, 250, 241, 0.07);
  color: var(--submit-ink);
  border-top-color: rgba(255, 250, 241, 0.12);
  background: #062c27;
}

.submit-section::before {
  opacity: 0.18;
  mix-blend-mode: screen;
}

.submit-section .section-kicker {
  color: #6ff1dc;
}

.submit-section h2,
.submit-section label,
.submit-section legend,
.submit-section .panel h2 {
  color: var(--submit-ink);
}

.submit-section .submit-intro p:not(.section-kicker),
.submit-section .panel-header p,
.submit-section .field-note,
.submit-section .empty,
.submit-section .file-row span,
.submit-section .chapter-list {
  color: var(--submit-muted);
}

.submit-section .panel {
  color: var(--submit-ink);
  background: var(--submit-panel);
  border-color: var(--submit-line);
  box-shadow: 0 22px 56px rgb(0 0 0 / 0.24);
}

.submit-section .analysis-panel {
  background: rgba(111, 241, 220, 0.08);
  border-color: rgba(111, 241, 220, 0.22);
}

.submit-section .analysis-state,
.submit-section .status {
  color: #b8fff4;
}

.submit-section input,
.submit-section select {
  color-scheme: dark;
  color: var(--submit-ink);
  border-color: var(--submit-line);
  background: rgba(255, 250, 241, 0.08);
}

.submit-section select option {
  background: #06201c;
  color: var(--submit-ink);
}

.submit-section input::file-selector-button {
  margin-right: 12px;
  border: 1px solid rgba(111, 241, 220, 0.28);
  border-radius: 5px;
  background: rgba(111, 241, 220, 0.12);
  color: var(--submit-ink);
  font: inherit;
  font-weight: 760;
}

.submit-section fieldset,
.submit-section .file-row {
  border-color: var(--submit-line);
  background: var(--submit-panel-soft);
}

.submit-section button.secondary {
  border-color: rgba(111, 241, 220, 0.28);
  background: rgba(111, 241, 220, 0.12);
  color: #dffffa;
}

.submit-section button.secondary:hover {
  border-color: rgba(111, 241, 220, 0.42);
  background: rgba(111, 241, 220, 0.2);
}

.submit-section button.ghost {
  color: #6ff1dc;
}

.submit-section .file-row .badge {
  color: #052c27;
  background: #9ff5e7;
}

.submit-section .production-status strong {
  color: var(--submit-ink);
}

.submit-section button.danger {
  border-color: rgba(255, 143, 143, 0.62);
  background: rgba(118, 31, 31, 0.38);
  color: #fff4f1;
}

.submit-section button.danger:hover {
  border-color: #ffb0a8;
  background: rgba(151, 42, 42, 0.56);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-block: 26px;
  color: rgba(255, 255, 255, 0.82);
  background: #052c27;
}

.site-footer p {
  margin-bottom: 0;
  font-weight: 820;
}

.motion-ready .brand-mark {
  box-shadow: 0 0 0 4px rgba(111, 241, 220, 0.08), 0 8px 22px rgba(0, 0, 0, 0.28);
}

.motion-ready .nav-links a {
  position: relative;
  padding-block: 8px;
  transition: color 180ms ease, transform 180ms ease;
}

.motion-ready .nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.motion-ready .nav-links a:hover {
  transform: translateY(-1px);
}

.motion-ready .nav-links a:hover::after,
.motion-ready .nav-links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero-kicker-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.hero-kicker-row .eyebrow {
  margin-bottom: 0;
}

.hero-signal {
  height: 18px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.hero-signal i {
  width: 2px;
  height: 100%;
  display: block;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(111, 241, 220, 0.48);
  transform: scaleY(0.32);
  animation: signal-pulse 1.35s ease-in-out infinite alternate;
}

.hero-signal i:nth-child(2),
.hero-signal i:nth-child(6) {
  animation-delay: -0.9s;
}

.hero-signal i:nth-child(3),
.hero-signal i:nth-child(5) {
  animation-delay: -0.45s;
}

.hero-signal i:nth-child(4) {
  animation-delay: -1.15s;
}

.motion-ready button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease,
    border-color 180ms ease, color 180ms ease;
}

.motion-ready button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 28%, rgba(255, 255, 255, 0.2), transparent 72%);
  transform: translateX(-125%);
  transition: transform 420ms ease;
}

.motion-ready button:not(:disabled):hover {
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26);
  transform: translateY(-3px);
}

.motion-ready button:not(:disabled):hover::after {
  transform: translateX(125%);
}

.motion-ready button:not(:disabled):active {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  transform: translateY(0);
}

.motion-ready button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.motion-ready .motion-hero-item {
  opacity: 0;
  animation: hero-rise 680ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--motion-order, 0) * 85ms);
}

.motion-ready main > .reveal-section {
  border-radius: clamp(20px, 2.5vw, 30px) clamp(20px, 2.5vw, 30px) 0 0;
  box-shadow: 0 -20px 52px rgba(2, 12, 10, 0.22);
}

.motion-ready .reveal-section {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  transition: opacity 680ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
    transform 680ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
}

.motion-ready .reveal-section.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.motion-ready .panel {
  transform: translateY(0);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

@media (hover: hover) {
  .motion-ready .panel:hover {
    border-color: rgba(111, 241, 220, 0.42);
    box-shadow: 0 28px 62px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
  }
}

@media (min-width: 901px) {
  .motion-ready .submit-hero.motion-hero {
    background-position-y: center, calc(50% + var(--hero-depth, 0px));
  }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes signal-pulse {
  from {
    opacity: 0.5;
    transform: scaleY(0.28);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-signal i,
  .auth-assurance-dot,
  .google-auth-button.is-loading .auth-arrow {
    animation: none;
  }

  .motion-ready .hero-signal i {
    animation: none;
    opacity: 0.75;
    transform: scaleY(0.55);
  }

  .motion-ready .motion-hero-item,
  .motion-ready .reveal-section,
  .motion-ready .reveal-section.is-visible,
  .motion-ready .panel {
    opacity: 1;
    animation: none;
    transform: none;
    transition: none;
  }

  .motion-ready button,
  .motion-ready .nav-links a,
  .motion-ready .nav-links a::after {
    transition: none;
  }

  .motion-ready button::after {
    display: none;
  }
}

@media (max-width: 900px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 12px;
    min-height: auto;
    padding: 14px 16px;
  }

  .brand {
    max-width: none;
    align-items: center;
  }

  .nav-links {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
    gap: 8px 16px;
    font-size: 0.82rem;
  }

  .submit-hero {
    min-height: 440px;
    align-items: end;
    padding: 36px 20px;
    background:
      linear-gradient(180deg, rgba(36, 26, 8, 0.1), rgba(36, 26, 8, 0.7) 46%, rgba(36, 26, 8, 0.96) 100%),
      var(--hero-image) 58% top / cover;
  }

  .submit-hero-content {
    width: 100%;
    max-width: calc(100vw - 40px);
    padding-top: 120px;
  }

  .submit-intro,
  .submit-grid {
    grid-template-columns: 1fr;
  }

  .submit-intro {
    justify-items: center;
    text-align: center;
  }

  .submit-intro h2 {
    max-width: 16ch;
  }

  .submit-intro > p {
    max-width: 760px;
    margin: 0 auto;
    justify-self: center;
  }

  .submit-section::before {
    background-size: 720px auto;
    background-position: 70% center;
    opacity: 0.3;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.32) 52%, transparent 100%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.32) 52%, transparent 100%);
  }

  .panel-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .file-row-actions {
    grid-column: 1;
    width: 100%;
    justify-content: space-between;
  }

  .file-row-actions button {
    flex: 1 1 104px;
  }
}

@media (max-width: 760px) {
  .grid-form,
  .option-grid,
  .select-action {
    grid-template-columns: 1fr;
  }

  .chapter-downloads-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel {
    padding: 18px;
  }

  .auth-panel,
  .auth-panel.is-authenticated {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .auth-identity,
  .auth-panel.is-authenticated .auth-identity {
    min-height: 150px;
  }

  .auth-brand-mark {
    width: 64px;
    height: 64px;
  }

  .auth-signal {
    height: 20px;
  }
}

@media (max-width: 520px) {
  .nav-links {
    grid-template-columns: repeat(2, max-content);
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  h2 {
    font-size: clamp(2rem, 9vw, 2.65rem);
  }

  .hero-lead,
  .submit-intro p:not(.section-kicker),
  .panel-header p {
    font-size: 0.98rem;
    overflow-wrap: break-word;
  }

  button {
    width: 100%;
  }
}
