:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --line: rgba(29, 29, 31, 0.09);
  --line-strong: rgba(29, 29, 31, 0.14);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --accent-strong: #0a84ff;
  --success: #03875b;
  --success-soft: rgba(3, 135, 91, 0.12);
  --danger: #c9342f;
  --danger-soft: rgba(201, 52, 47, 0.1);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --shadow-lg: 0 28px 80px rgba(17, 17, 17, 0.08);
  --shadow-md: 0 18px 48px rgba(17, 17, 17, 0.08);
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

html {
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 113, 227, 0.12), transparent 30%),
    radial-gradient(circle at 100% 20%, rgba(80, 200, 120, 0.12), transparent 24%),
    linear-gradient(180deg, #fbfbfd 0%, var(--bg) 100%);
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--text);
  background: transparent;
}

a,
button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.ambient {
  position: fixed;
  inset: auto auto 0 0;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(72px);
  opacity: 0.45;
}

.ambient-one {
  width: 18rem;
  height: 18rem;
  left: -5rem;
  top: 6rem;
  background: rgba(0, 113, 227, 0.16);
}

.ambient-two {
  width: 20rem;
  height: 20rem;
  right: -7rem;
  top: 18rem;
  background: rgba(88, 86, 214, 0.14);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 76rem);
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

.hero {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.hero-copy,
.hero-panel,
.support-card {
  backdrop-filter: blur(24px);
}

.hero-copy,
.hero-panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.hero-copy {
  padding: 1.5rem;
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow,
.section-kicker,
.ticket-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

h1 {
  margin-top: 0.5rem;
  font-size: clamp(3.25rem, 7vw, 5.75rem);
  line-height: 0.94;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.02;
}

h3 {
  font-size: 1.1rem;
}

.intro,
.card-note,
.privacy-note,
.success-copy,
.hero-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.intro {
  margin-top: 1rem;
  max-width: 40rem;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.locale-picker {
  display: inline-flex;
  align-items: center;
}

.locale-picker select {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.62rem 2.2rem 0.62rem 0.95rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 247, 0.96));
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-pill,
.app-pill,
.success-ticket {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.hero-pill {
  padding: 0.52rem 0.8rem;
  background: rgba(29, 29, 31, 0.06);
  color: var(--text);
}

.hero-panel {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.hero-stack-card,
.hero-ticket-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.hero-stack-card {
  grid-template-columns: auto 1fr;
  align-items: flex-start;
}

.hero-stack-card strong,
.hero-ticket-card strong {
  font-size: 1.04rem;
}

.stack-icon {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 239, 244, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  position: relative;
}

.stack-icon::before,
.stack-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
}

.stack-icon-apps::before {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #38c4ff, #0071e3);
}

.stack-icon-apps::after {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  top: 0.35rem;
  left: 0.35rem;
}

.stack-icon-github::before {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  border: 2px solid #111;
}

.stack-icon-github::after {
  width: 0.52rem;
  height: 0.32rem;
  border-bottom: 2px solid #111;
  border-left: 2px solid #111;
  transform: rotate(-45deg);
  bottom: 0.62rem;
}

.hero-ticket-card {
  background:
    linear-gradient(135deg, rgba(0, 113, 227, 0.1), rgba(255, 255, 255, 0.92));
}

.support-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
}

.card-header,
.form-footer {
  display: grid;
  gap: 1rem;
}

.banner {
  margin: 0 0 1rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  line-height: 1.5;
}

.banner[data-tone="error"] {
  background: var(--danger-soft);
  color: var(--danger);
}

.banner[data-tone="info"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.support-form {
  display: grid;
  gap: 1.25rem;
}

.target-group {
  display: grid;
  gap: 1rem;
  border: 0;
  padding: 0;
  margin: 0;
}

.target-group legend {
  padding: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.field-hint,
.small-muted {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

.apps-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.64);
}

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

.quiet-link,
.app-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.quiet-link:hover,
.quiet-link:focus-visible,
.app-link:hover,
.app-link:focus-visible {
  text-decoration: underline;
}

.app-list {
  display: grid;
  gap: 0.9rem;
}

.app-card,
.toggle-card,
.verification {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.app-card {
  padding: 0.9rem;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.app-card.is-selected {
  border-color: rgba(0, 113, 227, 0.35);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.08);
  transform: translateY(-1px);
}

.app-card-top {
  display: grid;
  gap: 0.75rem;
}

.app-select {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.85rem;
  align-items: center;
  cursor: pointer;
}

.app-checkbox {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent);
}

.app-icon-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfbfd, #ececf0);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.app-icon-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-icon-fallback {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}

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

.app-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.app-subtitle {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.app-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.app-pill {
  padding: 0.42rem 0.72rem;
  background: rgba(29, 29, 31, 0.06);
  color: var(--muted);
}

.app-skeleton {
  min-height: 7rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 244, 1), rgba(255, 255, 255, 0.9));
  background-size: 240% 100%;
  animation: shimmer 1.7s linear infinite;
}

.extra-targets {
  display: grid;
  gap: 0.9rem;
}

.toggle-card {
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.toggle-card.is-active {
  border-color: rgba(0, 113, 227, 0.35);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.08);
  transform: translateY(-1px);
}

.toggle-label {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 1rem;
  cursor: pointer;
}

.toggle-label input {
  width: 1rem;
  height: 1rem;
  margin: 0.35rem 0 0;
  accent-color: var(--accent);
}

.toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 14px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--accent);
}

.toggle-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.toggle-title {
  display: block;
  font-weight: 700;
}

.toggle-copy {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.conditional-field,
.field,
.verification,
.success-state {
  display: grid;
  gap: 0.45rem;
}

.conditional-field {
  padding: 0 1rem 1rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

label {
  font-size: 0.94rem;
  font-weight: 700;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.92rem 1rem;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

textarea {
  min-height: 10rem;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
.submit-button:focus-visible,
.secondary-button:focus-visible,
.quiet-link:focus-visible,
.app-link:focus-visible {
  outline: none;
  border-color: rgba(0, 113, 227, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: rgba(201, 52, 47, 0.45);
  box-shadow: 0 0 0 4px rgba(201, 52, 47, 0.08);
}

.verification {
  padding: 1rem;
}

.turnstile-slot {
  min-height: 65px;
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
  line-height: 1.45;
}

.submit-button,
.secondary-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.96rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.submit-button {
  justify-self: start;
  min-width: 13.5rem;
  background: linear-gradient(135deg, #0071e3, #2997ff);
  color: #fff;
}

.secondary-button {
  justify-self: start;
  background: rgba(29, 29, 31, 0.06);
  color: var(--text);
}

.submit-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.submit-button[disabled] {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.success-state {
  padding-top: 0.35rem;
}

.support-card.is-success {
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.support-card.is-success .success-state {
  width: min(100%, 34rem);
  min-height: 20rem;
  margin: 0 auto;
  align-content: center;
  gap: 1rem;
}

.success-ticket {
  width: fit-content;
  padding: 0.58rem 0.82rem;
  background: var(--success-soft);
  color: var(--success);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

@media (min-width: 48rem) {
  .page-shell {
    padding: 2.2rem 1.5rem 5rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  }

  .hero-copy {
    padding: 2rem;
  }

  .support-card {
    padding: 1.6rem;
  }

  .card-header,
  .form-footer {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .app-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .extra-targets,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 70rem) {
  .app-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b0b0f;
    --surface: rgba(22, 22, 26, 0.78);
    --surface-strong: rgba(28, 28, 32, 0.94);
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.12);
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --accent: #2997ff;
    --accent-soft: rgba(41, 151, 255, 0.14);
    --accent-strong: #58a6ff;
    --success: #33d17a;
    --success-soft: rgba(51, 209, 122, 0.14);
    --danger: #ff8a80;
    --danger-soft: rgba(255, 138, 128, 0.12);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.34);
    --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.28);
  }

  html {
    background:
      radial-gradient(circle at 0% 0%, rgba(41, 151, 255, 0.12), transparent 30%),
      radial-gradient(circle at 100% 20%, rgba(88, 86, 214, 0.16), transparent 26%),
      linear-gradient(180deg, #0f0f13 0%, #08080b 100%);
  }

  .hero-copy,
  .hero-panel,
  .support-card {
    border-color: rgba(255, 255, 255, 0.08);
  }

  .hero-stack-card,
  .hero-ticket-card,
  .apps-panel,
  .app-card,
  .toggle-card,
  .verification {
    background: rgba(20, 20, 24, 0.84);
  }

  .hero-pill,
  .app-pill,
  .secondary-button {
    background: rgba(255, 255, 255, 0.07);
  }

  .stack-icon {
    background:
      linear-gradient(145deg, rgba(47, 47, 56, 0.98), rgba(24, 24, 29, 0.96));
  }

  .app-icon-shell {
    background: linear-gradient(180deg, #2b2b31, #19191d);
  }

  .locale-picker select {
    background: linear-gradient(180deg, rgba(42, 42, 48, 0.98), rgba(24, 24, 29, 0.96));
  }

  input[type="text"],
  input[type="email"],
  textarea {
    background: rgba(10, 10, 13, 0.82);
  }

  .app-skeleton {
    background:
      linear-gradient(90deg, rgba(30, 30, 36, 0.9), rgba(45, 45, 52, 0.96), rgba(30, 30, 36, 0.9));
    background-size: 240% 100%;
  }
}
