@font-face {
  font-family: "Rehab Sans";
  src: url("../FONTS/Lato/Lato-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Rehab Sans";
  src: url("../FONTS/Lato/Lato-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Rehab Display";
  src: url("../FONTS/Red_Rose/RedRose-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #090704;
  --surface: #100c07;
  --gold: #ffc75a;
  --gold-bright: #ffe2a0;
  --orange: #f28a17;
  --orange-deep: #9d4b08;
  --text: #fff8e9;
  --muted: #cdbd9f;
  --line: rgba(255, 190, 78, 0.26);
  --line-strong: rgba(255, 199, 90, 0.58);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
  scroll-behavior: smooth;
}

body.legal-page {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #080603 0%, #140d05 52%, #2a1706 100%) fixed;
  font-family: "Rehab Sans", "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

a {
  color: var(--gold);
  text-decoration-color: rgba(255, 199, 90, 0.5);
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--gold-bright);
  text-decoration-color: currentColor;
}

.legal-header,
.legal-footer {
  width: min(100% - 2.5rem, 1440px);
  margin-inline: auto;
}

.legal-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--gold-bright);
  font-family: "Rehab Display", "Segoe UI", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.055em;
  text-decoration: none;
  text-shadow: 0 0 20px rgba(255, 171, 47, 0.32);
}

.legal-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 175, 48, 0.32));
}

.checkpoint-status,
.legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.checkpoint-status i {
  width: 0.54rem;
  height: 0.54rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(255, 199, 90, 0.1), 0 0 16px rgba(255, 165, 31, 0.65);
}

.legal-eyebrow {
  margin: 0 0 0.85rem;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.acceptance-layout {
  width: min(100% - 2.5rem, 1440px);
  margin: clamp(2rem, 5vw, 5rem) auto clamp(3rem, 6vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(560px, 1.18fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 6rem);
}

.acceptance-intro {
  position: sticky;
  top: 2rem;
  padding-block: 1rem;
}

.acceptance-intro h1,
.legal-hero h1,
.acceptance-panel h2,
.legal-section h2 {
  font-family: "Rehab Display", "Segoe UI", sans-serif;
  line-height: 1.08;
}

.acceptance-intro h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.45rem, 5.1vw, 5rem);
  letter-spacing: -0.045em;
}

.acceptance-intro h1 span {
  display: block;
  color: var(--gold);
  text-shadow: 0 0 26px rgba(255, 170, 40, 0.25);
}

.acceptance-lead {
  max-width: 56ch;
  margin: 1.4rem 0 1.8rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.16rem);
}

.emergency-notice {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem;
  border: 1px solid rgba(255, 139, 97, 0.5);
  border-radius: 16px;
  background: #1b0e08;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.notice-icon {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 139, 97, 0.7);
  border-radius: 50%;
  color: #fff2e9;
  background: #7f2e14;
  font-family: "Rehab Display", sans-serif;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(255, 101, 45, 0.22);
}

.emergency-notice strong {
  display: block;
  color: #ffe0d3;
  letter-spacing: 0.015em;
}

.emergency-notice p {
  margin: 0.28rem 0 0;
  color: #d9b8aa;
  font-size: 0.9rem;
  line-height: 1.52;
}

.checkpoint-summary {
  margin-top: 1.5rem;
  padding: 1.25rem 1.35rem;
  border-left: 2px solid var(--orange);
  background: rgba(13, 9, 5, 0.72);
}

.checkpoint-summary > span {
  color: var(--gold-bright);
  font-weight: 700;
}

.checkpoint-summary ul {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.acceptance-panel {
  padding: clamp(1.25rem, 3vw, 2.1rem);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: #0d0a06;
  box-shadow: var(--shadow), 0 0 42px rgba(202, 103, 10, 0.09);
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.panel-heading .legal-eyebrow {
  margin-bottom: 0.42rem;
}

.acceptance-panel h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.progress-count {
  color: var(--gold);
  font-family: "Rehab Display", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  white-space: nowrap;
}

.progress-track {
  width: 100%;
  height: 3px;
  margin: 1.25rem 0 1.55rem;
  overflow: hidden;
  background: #302213;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--orange-deep), var(--gold));
  box-shadow: 0 0 16px rgba(255, 178, 50, 0.7);
  transition: width 260ms ease;
}

.terms-error {
  margin: 0 0 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(255, 139, 97, 0.45);
  border-radius: 12px;
  color: #ffe5da;
  background: #281108;
}

#termsAcceptanceForm {
  display: grid;
  gap: 0.8rem;
}

.acknowledgement-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr);
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(255, 190, 78, 0.18);
  border-radius: 14px;
  background: #151008;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.acknowledgement-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 190, 78, 0.44);
  background: #1b1308;
}

.acknowledgement-card:has(input:checked) {
  border-color: rgba(255, 199, 90, 0.6);
  background: #1c1408;
  box-shadow: inset 3px 0 0 var(--orange), 0 0 22px rgba(205, 112, 19, 0.07);
}

.acknowledgement-card--final {
  margin-top: 0.35rem;
  border-color: rgba(255, 199, 90, 0.42);
}

.acknowledgement-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.check-control {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.08rem;
  display: grid;
  place-items: center;
  border: 1px solid #82602d;
  border-radius: 6px;
  background: #080603;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.check-control::after {
  content: "";
  width: 0.68rem;
  height: 0.38rem;
  border-left: 2px solid #120b03;
  border-bottom: 2px solid #120b03;
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg) scale(0.65);
  transition: opacity 160ms ease, transform 160ms ease;
}

.acknowledgement-card input:checked + .check-control {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 16px rgba(255, 181, 48, 0.3);
}

.acknowledgement-card input:checked + .check-control::after {
  opacity: 1;
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.acknowledgement-card input:focus-visible + .check-control {
  outline: 3px solid rgba(255, 199, 90, 0.28);
  outline-offset: 3px;
}

.acknowledgement-copy {
  min-width: 0;
}

.acknowledgement-copy strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.35;
}

.acknowledgement-copy > span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.accept-terms-button {
  width: 100%;
  min-height: 58px;
  margin-top: 0.55rem;
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 1px solid var(--gold);
  border-radius: 13px;
  color: #170d03;
  background: linear-gradient(110deg, #e57a12, #ffc75a 56%, #ffe29e);
  box-shadow: 0 12px 32px rgba(205, 103, 11, 0.22), 0 0 24px rgba(255, 190, 70, 0.08);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.accept-terms-button svg {
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.accept-terms-button:not(:disabled):hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 16px 38px rgba(205, 103, 11, 0.3), 0 0 30px rgba(255, 190, 70, 0.15);
}

.accept-terms-button:focus-visible {
  outline: 3px solid rgba(255, 226, 160, 0.38);
  outline-offset: 3px;
}

.accept-terms-button:disabled {
  border-color: #54452f;
  color: #978b78;
  background: #262019;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.72;
}

.accept-terms-button.is-submitting {
  cursor: wait;
}

.terms-form-note {
  margin: 0;
  color: #9f927d;
  font-size: 0.79rem;
  text-align: center;
}

.leave-checkpoint {
  display: block;
  width: max-content;
  margin: 1.15rem auto 0;
  color: #ac9e86;
  font-size: 0.86rem;
}

.legal-footer {
  min-height: 86px;
  padding-block: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: #9e9079;
  font-size: 0.86rem;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
}

.legal-footer a {
  color: #cbb996;
}

/* Public Terms page */
.legal-content {
  width: min(100% - 2.5rem, 1120px);
  margin: clamp(2.5rem, 6vw, 6rem) auto;
}

.legal-hero {
  max-width: 800px;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  letter-spacing: -0.05em;
}

.legal-hero h1 span {
  color: var(--gold);
}

.legal-hero > p:last-child {
  max-width: 65ch;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.legal-document {
  display: grid;
  gap: 1rem;
}

.legal-section {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0e0a06;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
}

.legal-section--critical {
  border-color: rgba(255, 139, 97, 0.45);
  background: #180d08;
}

.legal-section-number {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--orange);
  font-family: "Rehab Display", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.legal-section h2 {
  margin: 0 0 0.65rem;
  color: var(--text);
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
}

.legal-section p,
.legal-section li {
  color: var(--muted);
}

.legal-section p {
  margin: 0;
}

.legal-section p + p,
.legal-section ul {
  margin-top: 0.75rem;
}

.legal-section ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

@media (max-width: 980px) {
  .acceptance-layout {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .acceptance-intro {
    position: static;
    padding-bottom: 0;
  }

  .acceptance-intro h1 {
    max-width: 15ch;
  }
}

@media (max-width: 620px) {
  .legal-header,
  .legal-footer,
  .acceptance-layout,
  .legal-content {
    width: min(100% - 1.25rem, 100%);
  }

  .legal-header {
    min-height: 72px;
  }

  .legal-brand img {
    width: 40px;
    height: 40px;
  }

  .checkpoint-status,
  .legal-updated {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .acceptance-layout {
    margin-top: 1.4rem;
    gap: 1.5rem;
  }

  .acceptance-intro h1 {
    font-size: clamp(2.2rem, 13vw, 3.5rem);
  }

  .acceptance-panel {
    padding: 1rem;
    border-radius: 18px;
  }

  .acknowledgement-card {
    padding: 0.9rem;
  }

  .legal-footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
