.legal-page {
  background: #0a0a0a;
  color: #e8e8e8;
  font-family: Inter, sans-serif;
  margin: 0;
  min-height: 100vh;
  line-height: 1.65;
}

html.bysurf-capacitor-ios body.legal-page {
  padding-top: calc(env(safe-area-inset-top, 0px) + 54px);
  box-sizing: border-box;
}

html.bysurf-capacitor-ios body.legal-page .legal-header {
  padding-top: 0;
}

.legal-header {
  border-bottom: 1px solid #222;
  padding: 20px clamp(20px, 4vw, 48px);
}

.legal-header a {
  color: #009dff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.legal-header a:hover {
  opacity: 0.9;
}

.legal-header-brand {
  color: #ccc;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Android TV WebView embed (?tv=1) — use in-app Back, not desktop home */
body.legal-tv .legal-header,
html.legal-tv .legal-header {
  display: none !important;
}

body.legal-tv .site-footer-section:first-child {
  display: none !important;
}

.legal-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px clamp(20px, 4vw, 48px) 72px;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #222;
  font-size: 0.88rem;
}

.legal-nav a {
  color: #aaa;
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  color: #009dff;
}

.legal-nav a[aria-current="page"] {
  font-weight: 600;
}

.legal-main h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.legal-updated {
  margin: 0 0 28px;
  color: #777;
  font-size: 0.88rem;
}

.legal-main h2 {
  margin: 36px 0 12px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.legal-main h3 {
  margin: 24px 0 8px;
  font-size: 1.02rem;
  font-weight: 600;
  color: #f0f0f0;
}

.legal-main p,
.legal-main li {
  font-size: 0.96rem;
  color: #ccc;
}

.legal-main ul,
.legal-main ol {
  margin: 0 0 16px;
  padding-left: 1.35rem;
}

.legal-main li {
  margin-bottom: 8px;
}

.legal-main a {
  color: #009dff;
}

.legal-main a:hover {
  opacity: 0.92;
}

.legal-note {
  margin: 20px 0;
  padding: 14px 16px;
  border-left: 3px solid #009dff;
  background: #121820;
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  color: #bbb;
}

.legal-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #222;
  font-size: 0.82rem;
  color: #666;
}

.legal-footer .legal-withdraw-cta {
  margin-bottom: 0;
}

.legal-footer .site-footer-grid {
  margin-top: 24px;
}

.site-legal-footer {
  margin-top: 48px;
  padding: 32px clamp(20px, 3.5vw, 48px) 40px;
  border-top: 1px solid #222;
  text-align: center;
  font-size: 0.82rem;
  color: #666;
}

.site-footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 56px;
  justify-content: center;
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.site-footer-section {
  flex: 0 1 auto;
  min-width: 148px;
}

.site-footer-heading {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.site-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer-links a {
  color: #888;
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s ease;
}

.site-footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.legal-shell--narrow {
  max-width: 640px;
}

.legal-form-box {
  margin: 16px 0 24px;
  padding: 18px 20px;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  background: #111;
  font-size: 0.92rem;
  color: #bbb;
  line-height: 1.6;
}

.legal-withdraw-cta {
  display: inline-block;
  margin-bottom: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #009dff;
  color: #fff !important;
  font-weight: 600;
  text-decoration: none !important;
}

.legal-withdraw-cta:hover {
  opacity: 0.92;
}

.legal-note--success {
  border-left-color: #4caf50;
  background: #0f1a12;
}

.withdraw-form label {
  display: block;
  margin: 18px 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ddd;
}

.withdraw-form input[type="text"],
.withdraw-form input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #333;
  border-radius: 10px;
  background: #141414;
  color: #eee;
  font: inherit;
  font-size: 0.95rem;
}

.withdraw-form input:focus {
  outline: 2px solid #009dff;
  outline-offset: 1px;
}

.withdraw-checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px !important;
  font-weight: 400 !important;
  color: #ccc !important;
  cursor: pointer;
}

.withdraw-checkbox-label input {
  margin-top: 3px;
  flex-shrink: 0;
}

.withdraw-form-hint {
  margin: 14px 0 0;
  font-size: 0.84rem;
  color: #777;
  line-height: 1.5;
}

.withdraw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.withdraw-btn--primary {
  background: #009dff;
  color: #fff;
}

.withdraw-btn--secondary {
  background: transparent;
  color: #aaa;
  border: 1px solid #333;
}

.withdraw-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.withdraw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.withdraw-form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  color: #8fd18f;
}

.withdraw-form-status.is-error {
  color: #ef5350;
}

.checkout-page-body {
  margin: 0;
  min-height: 100vh;
  background: #0f0f0f;
  color: #fff;
  font-family: Inter, sans-serif;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
  min-height: 100vh;
}

.checkout-summary {
  position: relative;
  padding: clamp(28px, 4vw, 48px);
  background-color: #0a0a0a;
  background-image: var(--auth-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.checkout-summary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: 0;
}

.checkout-summary > * {
  position: relative;
  z-index: 1;
}

.checkout-main {
  padding: clamp(28px, 4vw, 56px);
  background: #181818;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.checkout-main-inner {
  width: min(440px, 100%);
}

.checkout-back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: #009dff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.checkout-back-link:hover {
  opacity: 0.9;
}

.checkout-summary-brand {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #aaa;
}

.checkout-summary-pay-label {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: #888;
}

.checkout-summary .checkout-interval-wrap {
  padding: 0;
  margin: 0 0 20px;
}

.checkout-summary .billing-interval-toggle {
  margin: 0;
  max-width: 100%;
}

.checkout-summary-compare {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #666;
  text-decoration: line-through;
}

.checkout-summary-compare[hidden] {
  display: none !important;
}

.checkout-summary-row--discount[hidden],
#checkoutDiscountRow[hidden] {
  display: none !important;
}

.checkout-summary-total {
  margin: 0 0 6px;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.checkout-summary-total-note {
  margin: 0 0 28px;
  font-size: 0.84rem;
  color: #777;
}

.checkout-summary-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.checkout-summary-line-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.checkout-summary-line-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #eee;
}

.checkout-summary-line-desc {
  font-size: 0.8rem;
  color: #777;
  line-height: 1.45;
}

.checkout-summary-line-price {
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ddd;
}

.checkout-summary-breakdown {
  margin-top: auto;
  padding-top: 20px;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.88rem;
  color: #999;
}

.checkout-summary-row--total {
  margin-top: 4px;
  padding-top: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.checkout-coupon-field {
  margin: 6px 0 10px;
  padding: 10px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.checkout-coupon-field[hidden] {
  display: none !important;
}

.checkout-coupon-label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: #999;
}

.checkout-coupon-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.checkout-coupon-input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.checkout-coupon-input:focus {
  outline: none;
  border-color: var(--accent, #009dff);
}

.checkout-coupon-apply {
  flex-shrink: 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
}

.checkout-coupon-apply:hover {
  background: rgba(255, 255, 255, 0.18);
}

.checkout-coupon-apply:disabled {
  opacity: 0.6;
  cursor: default;
}

.checkout-coupon-msg {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: #9ad0ff;
}

.checkout-coupon-msg.is-error {
  color: #ff9b9b;
}

.checkout-coupon-msg.is-ok {
  color: #9dffb0;
}

.checkout-discount-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.checkout-coupon-remove {
  border: none;
  background: transparent;
  color: #9ad0ff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checkout-coupon-remove:hover {
  color: #fff;
}

.checkout-summary-foot {
  margin: 20px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #666;
}

.checkout-main-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
}

.checkout-main-lead {
  margin: 0 0 24px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #888;
}

.checkout-admin-banner {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 157, 255, 0.12);
  color: #9ed8ff;
  font-size: 0.84rem;
  line-height: 1.45;
}

.cancel-kind-fieldset {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.cancel-kind-fieldset legend {
  padding: 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ddd;
}
.cancel-kind-fieldset .withdraw-checkbox-label {
  margin-bottom: 10px;
}
.cancel-kind-fieldset .withdraw-checkbox-label:last-child {
  margin-bottom: 0;
}

.checkout-legal-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.checkout-precontract-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #ccc;
}
.checkout-precontract-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}
.checkout-precontract-card p {
  margin: 0 0 8px;
}
.checkout-precontract-card p:last-child {
  margin-bottom: 0;
}
.checkout-precontract-list {
  margin: 0;
  padding: 0 0 0 1.15em;
}
.checkout-precontract-list li {
  margin: 0 0 6px;
}
.checkout-precontract-list li:last-child {
  margin-bottom: 0;
}
.checkout-precontract-card a {
  color: #8ecbff;
}

.checkout-disclosure {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  overflow: hidden;
}

.checkout-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ddd;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.checkout-disclosure-summary::-webkit-details-marker {
  display: none;
}

.checkout-disclosure-summary::after {
  content: '+';
  font-size: 1.1rem;
  font-weight: 400;
  color: #888;
  line-height: 1;
}

.checkout-disclosure[open] .checkout-disclosure-summary::after {
  content: '−';
}

.checkout-disclosure-body {
  padding: 0 16px 16px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #999;
}

.checkout-disclosure-body p {
  margin: 0 0 10px;
}

.checkout-disclosure-body p:last-child {
  margin-bottom: 0;
}

.checkout-disclosure-body a {
  color: #009dff;
  text-decoration: none;
}

.checkout-section-label {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #777;
}

.checkout-agreements {
  margin-bottom: 22px;
}

.checkout-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #aaa;
  cursor: pointer;
}

.checkout-consent-label:last-child {
  margin-bottom: 0;
}

.checkout-consent-label input {
  margin-top: 3px;
  flex-shrink: 0;
}

.checkout-consent-label a {
  color: #009dff;
  text-decoration: none;
}

.checkout-pay-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
  font-size: 0.78rem;
  color: #666;
}

.checkout-pay-divider::before,
.checkout-pay-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.checkout-submit-btn {
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 10px;
  background: #009dff;
  color: #fff;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.checkout-submit-btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.checkout-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkout-status-msg {
  margin-top: 14px;
  font-size: 0.88rem;
  color: #8fd18f;
  text-align: center;
}

.checkout-status-msg.is-error {
  color: #ef5350;
}

.checkout-footnote {
  margin: 14px 0 0;
  font-size: 0.78rem;
  color: #666;
  text-align: center;
}

.checkout-inline-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 28px;
  font-size: 0.78rem;
}

.checkout-inline-legal a {
  color: #666;
  text-decoration: none;
}

.checkout-inline-legal a:hover {
  color: #009dff;
}

@media (max-width: 860px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    padding-bottom: 24px;
  }

  .checkout-summary-breakdown {
    margin-top: 12px;
  }

  .checkout-main {
    padding-top: 0;
  }
}

.cancel-subscription-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  background: #101010;
}

.cancel-subscription-panel h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #fff;
}

.cancel-subscription-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.cancel-subscription-detail {
  margin: 0;
  font-size: 0.88rem;
  color: #bbb;
  line-height: 1.55;
}

.cancel-subscription-detail strong {
  color: #ddd;
}

.auth-dob-wrap {
  margin-bottom: 0;
}

.auth-dob-wrap input[type="date"] {
  width: 100%;
  box-sizing: border-box;
}

.auth-field-hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: #777;
  line-height: 1.45;
}

.checkout-precontract {
  margin-bottom: 14px;
  font-size: 0.82rem;
  color: #999;
  line-height: 1.55;
}

.checkout-precontract strong {
  color: #ccc;
}

/* Beta waitlist */
.beta-waitlist-eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #009dff;
}

.beta-waitlist-shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 8px;
}

.beta-waitlist-shot {
  aspect-ratio: 9 / 16;
  max-height: 220px;
  border-radius: 14px;
  border: 1px solid #2a2a2a;
  background:
    linear-gradient(160deg, rgba(0, 157, 255, 0.18), transparent 55%),
    #141414;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  color: #888;
  font-size: 0.78rem;
  font-weight: 600;
}

.beta-waitlist-shot-note {
  margin: 0 0 28px;
  font-size: 0.8rem;
  color: #666;
}

.beta-waitlist-form label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ddd;
}

.beta-waitlist-form input[type="email"],
.beta-waitlist-form input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #333;
  background: #121212;
  color: #fff;
  font: inherit;
}

.beta-optional {
  font-weight: 500;
  color: #777;
}

.beta-platform-fieldset {
  margin: 8px 0 20px;
  padding: 14px;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
}

.beta-platform-fieldset legend {
  padding: 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ddd;
}

.beta-platform-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-weight: 500;
  color: #ccc;
  cursor: pointer;
}

.beta-platform-option:last-child {
  margin-bottom: 0;
}

.beta-platform-option input {
  width: 18px;
  height: 18px;
  accent-color: #009dff;
}

.beta-waitlist-form .legal-withdraw-cta {
  display: inline-flex;
  border: none;
  cursor: pointer;
  font: inherit;
}

.beta-waitlist-form .legal-withdraw-cta:disabled {
  opacity: 0.6;
  cursor: wait;
}

.beta-waitlist-privacy {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: #777;
}

.beta-waitlist-privacy a {
  color: #009dff;
}

@media (max-width: 640px) {
  .beta-waitlist-shots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .beta-waitlist-shot {
    max-height: 160px;
  }
}