:root {
  color-scheme: dark;
  --background: #171717;
  --surface: #202020;
  --surface-raised: #272727;
  --border: #3d3d3d;
  --text: #f4f1ed;
  --muted: #b9b3ac;
  --accent: #f28b3c;
  --accent-hover: #ff9b50;
  --accent-ink: #1b120c;
  --error: #ffb4ad;
  --error-surface: #351e1d;
  --success: #b9e3c6;
  --success-surface: #1b3022;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--text);
}

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

button,
select {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.65rem 0.85rem;
  border-radius: 0.35rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(100% - 2rem, 41rem);
  margin: 0 auto;
  padding: 2rem 0;
}

.page-header {
  margin-bottom: 1.2rem;
}

.product-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.product-logo {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
}

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

.product-brand .eyebrow {
  margin: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 0.9rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

h3 {
  margin: 1.1rem 0 0.35rem;
  font-size: 1rem;
}

.intro {
  max-width: 39rem;
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.form-panel,
.privacy-section {
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface);
}

.form-panel {
  padding: 1.5rem;
}

.field-group + .field-group {
  margin-top: 1.05rem;
}

label,
.field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.field-label {
  margin-top: 0;
}

.optional {
  margin-left: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #555;
  border-radius: 0.4rem;
  background: #191919;
  color: var(--text);
}

input,
select {
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
}

textarea {
  min-height: 7rem;
  padding: 0.65rem 0.75rem;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #777;
}

input[aria-invalid='true'],
select[aria-invalid='true'],
textarea[aria-invalid='true'] {
  border-color: var(--error);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.field-hint,
.field-error {
  margin: 0.3rem 0 0;
  font-size: 0.86rem;
}

.field-hint {
  color: var(--muted);
}

.field-error {
  color: var(--error);
  font-weight: 650;
}

.field-error:not([hidden])::before {
  content: 'Error: ';
}

.verification-group[aria-invalid='true'] {
  padding-left: 0.75rem;
  border-left: 3px solid var(--error);
}

.turnstile-widget {
  width: 100%;
  min-height: 4.1rem;
}

.verification-group {
  margin-top: 1.05rem;
}

.message {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: var(--surface-raised);
}

.message:not([hidden])::before {
  content: 'Status: ';
  font-weight: 800;
}

.message-error {
  border-color: #77423e;
  background: var(--error-surface);
  color: var(--error);
}

.message-error:not([hidden])::before {
  content: 'Error: ';
}

.primary-button,
.secondary-button {
  min-height: 2.9rem;
  padding: 0.7rem 1rem;
  border-radius: 0.4rem;
  font-weight: 800;
}

.secondary-button {
  margin-top: 1.35rem;
}

.primary-button {
  width: 100%;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.primary-button:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.secondary-button {
  border: 1px solid #666;
  background: transparent;
  color: var(--text);
}

.secondary-button:hover {
  border-color: var(--accent);
}

.success-state {
  padding: 0.25rem 0;
}

.success-state h2 {
  font-size: 1.65rem;
}

.reference-id {
  display: inline-block;
  margin: 0.4rem 0 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid #4a6e55;
  border-radius: 0.35rem;
  background: var(--success-surface);
  color: var(--success);
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.privacy-section {
  margin-top: 1.2rem;
  padding: 1.25rem;
}

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

.developer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 2rem;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.developer-link {
  display: block;
  border-radius: 0.25rem;
  line-height: 0;
}

.developer-link:hover {
  outline: 1px solid #555;
  outline-offset: 3px;
}

.developer-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.developer-logo {
  display: block;
  width: 112px;
  height: auto;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 36rem) {
  .page-shell {
    width: min(100% - 1rem, 41rem);
    padding-top: 1.5rem;
  }

  .product-logo {
    width: 2.25rem;
    height: 2.25rem;
  }

  .form-panel,
  .privacy-section {
    border-radius: 0.45rem;
  }

  .form-panel {
    padding: 1.2rem;
  }

  .privacy-section {
    padding: 1.2rem;
  }

  .developer-brand {
    margin-top: 0.9rem;
  }
}

@media (min-width: 44rem) and (max-height: 56.25rem) {
  .page-shell {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .page-header {
    margin-bottom: 0.45rem;
  }

  .intro {
    margin-top: 0.35rem;
  }

  .form-panel {
    padding: 0.9rem 1rem;
  }

  .field-group + .field-group {
    margin-top: 0.55rem;
  }

  .field-hint,
  .field-error {
    margin-top: 0.15rem;
  }

  textarea#description {
    height: 4.75rem;
    min-height: 4.75rem;
  }

  .primary-button {
    margin-top: 0.7rem;
  }

  .verification-group {
    margin-top: 0.65rem;
  }

  .privacy-section {
    margin-top: 0.7rem;
    padding: 0.9rem 1rem;
  }

  .developer-brand {
    margin-top: 0.65rem;
  }
}

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