:root {
  color-scheme: dark;
  --ink: #f8f4e8;
  --dark: #0b1620;
  --dark-2: #101f2d;
  --paper: #fbf4e3;
  --paper-soft: #fff9ed;
  --paper-line: #dacbb7;
  --muted: #9fb1c2;
  --line: rgba(248, 244, 232, 0.16);
  --blue: #2c6fe8;
  --blue-dark: #184dad;
  --amber: #e6a93b;
  --signal: #de7b45;
  --teal: #35c092;
  --red: #a74428;
  --shadow: 0 28px 90px rgba(3, 10, 18, 0.38);
  --paper-shadow: 0 30px 80px rgba(6, 18, 28, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(120deg, rgba(230, 169, 59, 0.08) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, #08121b 0%, var(--dark) 42%, #0f1e2b 100%);
  color: var(--ink);
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0;
  background: rgba(8, 18, 27, 0.78);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  gap: 2px;
  text-decoration: none;
}

.brand strong {
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand span,
.hero-lede,
.diagnostic-panel p,
.form-copy p,
.boundary-box p,
.form-note,
.form-status,
.site-footer p,
.check-grid p {
  color: var(--muted);
}

.brand span {
  font-size: 0.78rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.site-header nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 10px;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  border-color: rgba(230, 169, 59, 0.46);
  background: rgba(230, 169, 59, 0.1);
  color: #f6d99b;
}

main {
  display: grid;
  gap: 72px;
  overflow-x: hidden;
}

.hero-section,
.content-band,
.request-section,
.site-footer {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(390px, 0.74fr);
  gap: 24px;
  align-items: stretch;
  padding-top: 48px;
}

.hero-copy,
.diagnostic-panel,
.audit-form,
.boundary-box,
.check-grid article,
.form-confirmation {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  gap: 22px;
  min-height: 640px;
  padding: 36px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(230, 169, 59, 0.95) 0 5px, transparent 5px),
    linear-gradient(135deg, rgba(44, 111, 232, 0.18), rgba(53, 192, 146, 0.08) 50%, rgba(222, 123, 69, 0.13)),
    var(--dark-2);
  animation: pageEnter 520ms ease-out both;
}

.eyebrow {
  margin: 0;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: 4.15rem;
  line-height: 0.96;
}

h2 {
  margin-bottom: 0;
  font-size: 2.2rem;
  line-height: 1.04;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.hero-lede {
  max-width: 680px;
  margin-bottom: 0;
  color: #cfdae2;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-self: end;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248, 244, 232, 0.18);
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease, border-color 150ms ease, background 150ms ease;
}

.button-primary {
  border-color: var(--blue);
  background: linear-gradient(180deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 16px 28px rgba(24, 77, 173, 0.24);
}

.button-primary:hover,
.button-primary:focus-visible {
  filter: saturate(1.08) brightness(1.02);
  transform: translateY(-1px);
  box-shadow: 0 20px 34px rgba(24, 77, 173, 0.3);
}

.button-primary:active {
  transform: translateY(1px);
  box-shadow: 0 8px 18px rgba(24, 77, 173, 0.24);
}

.button-secondary {
  background: rgba(248, 244, 232, 0.08);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(230, 169, 59, 0.46);
  background: rgba(230, 169, 59, 0.1);
  color: #f6d99b;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.trust-list li {
  border: 1px solid rgba(248, 244, 232, 0.18);
  border-radius: 999px;
  background: rgba(248, 244, 232, 0.08);
  padding: 8px 11px;
  color: #eef3f6;
  font-size: 0.82rem;
  font-weight: 800;
}

.diagnostic-panel {
  display: grid;
  gap: 20px;
  padding: 24px;
  background: rgba(13, 30, 43, 0.86);
  animation: pageEnter 520ms ease-out 90ms both;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-header span {
  border: 1px solid rgba(230, 169, 59, 0.46);
  border-radius: 999px;
  background: rgba(230, 169, 59, 0.1);
  padding: 8px 12px;
  color: #f6d99b;
  font-size: 0.82rem;
  font-weight: 900;
}

.panel-header strong {
  color: var(--signal);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.signal-grid {
  display: grid;
  gap: 10px;
}

.signal {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  border: 1px solid rgba(248, 244, 232, 0.12);
  border-radius: 8px;
  background: rgba(2, 9, 16, 0.25);
  padding: 12px;
}

.signal em,
.check-grid article span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(230, 169, 59, 0.15);
  color: #f6d99b;
  font-style: normal;
  font-weight: 900;
}

.signal span {
  color: #eef3f6;
  font-size: 0.92rem;
  font-weight: 900;
}

.signal b {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.signal-hot {
  border-color: rgba(222, 123, 69, 0.32);
}

.signal-cool {
  border-color: rgba(44, 111, 232, 0.38);
}

.signal-muted {
  border-color: rgba(53, 192, 146, 0.32);
}

.diagnostic-panel p {
  margin-bottom: 0;
}

.section-heading {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 24px;
}

.content-band,
.request-section {
  animation: pageEnter 520ms ease-out 120ms both;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.check-grid article {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 198px;
  padding: 18px;
  background: rgba(13, 30, 43, 0.74);
  box-shadow: none;
}

.check-grid article:nth-child(2) span {
  background: rgba(53, 192, 146, 0.14);
  color: #a8efd1;
}

.check-grid article:nth-child(3) span {
  background: rgba(222, 123, 69, 0.16);
  color: #ffd0bd;
}

.request-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 0.9fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 20px;
}

.form-copy {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(230, 169, 59, 0.95) 0 5px, transparent 5px),
    rgba(13, 30, 43, 0.78);
  box-shadow: var(--shadow);
}

.boundary-box {
  box-shadow: none;
  padding: 20px;
  background: rgba(2, 9, 16, 0.24);
}

.audit-form {
  display: grid;
  gap: 16px;
  border-color: rgba(230, 169, 59, 0.4);
  background:
    linear-gradient(180deg, rgba(255, 249, 237, 0.98), rgba(251, 244, 227, 0.96)),
    var(--paper);
  color: #151b23;
  padding: 30px;
  box-shadow: var(--paper-shadow);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.audit-form:focus-within {
  border-color: var(--blue);
  box-shadow: 0 34px 90px rgba(44, 111, 232, 0.16);
  transform: translateY(-2px);
}

.form-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.form-kicker span {
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.form-kicker b {
  border-radius: 999px;
  background: #e8f1ff;
  color: var(--blue-dark);
  padding: 6px 10px;
  font-size: 0.78rem;
}

.field-group {
  display: grid;
  gap: 8px;
}

.audit-form label {
  font-size: 0.9rem;
  font-weight: 850;
}

.audit-form input,
.audit-form select,
.audit-form textarea {
  width: 100%;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: var(--paper-soft);
  color: #151b23;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.audit-form input,
.audit-form select {
  min-height: 48px;
  padding: 0 14px;
}

.audit-form textarea {
  min-height: 104px;
  resize: vertical;
  padding: 13px 14px;
}

.audit-form select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--blue-dark) 50%),
    linear-gradient(135deg, var(--blue-dark) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 21px,
    calc(100% - 12px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.audit-spam-check {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.audit-form input:focus,
.audit-form select:focus,
.audit-form textarea:focus,
.button:focus-visible {
  outline: 3px solid rgba(44, 111, 232, 0.22);
  outline-offset: 2px;
  border-color: var(--blue);
  background-color: #ffffff;
  box-shadow: 0 10px 24px rgba(24, 77, 173, 0.12);
}

.field-invalid,
[aria-invalid="true"] {
  border-color: var(--red) !important;
  background: #fff4ed !important;
}

.form-status {
  min-height: 24px;
  margin: 0;
}

.form-status[data-state="pending"] {
  color: var(--blue-dark);
  font-weight: 800;
}

.form-status[data-state="error"] {
  color: var(--red);
  font-weight: 800;
}

.form-status[data-state="success"] {
  color: #166b4c;
  font-weight: 800;
}

.form-submit {
  width: 100%;
}

.form-submit[disabled] {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.form-confirmation {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: #eef8f1;
  color: #151b23;
  box-shadow: none;
  border-color: rgba(22, 107, 76, 0.2);
}

.form-confirmation[hidden] {
  display: none;
}

.form-confirmation h3,
.form-confirmation p {
  margin-bottom: 0;
}

.form-confirmation p {
  color: #4d5965;
}

.field-help {
  margin: -2px 0 0;
  color: #5e6a77;
  font-size: 0.86rem;
}

.profile-first-hero .hero-copy {
  background:
    linear-gradient(90deg, rgba(44, 111, 232, 0.95) 0 5px, transparent 5px),
    linear-gradient(135deg, rgba(53, 192, 146, 0.14), rgba(44, 111, 232, 0.16) 48%, rgba(230, 169, 59, 0.12)),
    var(--dark-2);
}

.profile-first-request .form-copy {
  background:
    linear-gradient(90deg, rgba(44, 111, 232, 0.95) 0 5px, transparent 5px),
    rgba(13, 30, 43, 0.78);
}

.profile-first-form {
  border-color: rgba(44, 111, 232, 0.42);
}

.router-page {
  min-height: 100vh;
}

.router-shell {
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.router-card {
  display: grid;
  gap: 18px;
  width: min(720px, 100%);
  border: 1px solid rgba(230, 169, 59, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(230, 169, 59, 0.95) 0 5px, transparent 5px),
    linear-gradient(135deg, rgba(44, 111, 232, 0.16), rgba(53, 192, 146, 0.08) 54%, rgba(230, 169, 59, 0.11)),
    var(--dark-2);
  box-shadow: var(--shadow);
  padding: 36px;
  animation: pageEnter 520ms ease-out both;
}

.router-card h1 {
  font-size: 3.2rem;
}

.router-progress {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(248, 244, 232, 0.12);
}

.router-progress span {
  display: block;
  width: 44%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--teal), var(--blue));
  animation: routerProgress 940ms ease-in-out infinite alternate;
}

.router-fallback {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 6px;
}

.router-fallback[hidden] {
  display: none;
}

.router-fallback p {
  flex-basis: 100%;
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 48px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #f6d99b;
  text-decoration: none;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes routerProgress {
  from {
    transform: translateX(-10%);
  }
  to {
    transform: translateX(138%);
  }
}

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

@media (max-width: 1040px) {
  .hero-section,
  .request-section {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 0;
  }

  .form-copy {
    position: static;
  }

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

@media (max-width: 760px) {
  .site-header {
    position: static;
    align-items: flex-start;
    width: min(100% - 28px, 1160px);
    padding: 16px 0;
  }

  .site-header nav {
    display: none;
  }

  .hero-section,
  .content-band,
  .request-section,
  .site-footer {
    width: min(100% - 28px, 1160px);
  }

  main {
    gap: 54px;
  }

  .hero-section {
    padding-top: 22px;
  }

  .hero-copy,
  .diagnostic-panel,
  .form-copy,
  .audit-form {
    padding: 22px;
  }

  h1 {
    font-size: 2.6rem;
  }

  h2 {
    font-size: 1.82rem;
  }

  .hero-actions,
  .check-grid,
  .router-fallback {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .signal {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .signal b {
    grid-column: 2;
    text-align: left;
  }

  .check-grid article {
    min-height: 0;
  }
}

@media (max-width: 430px) {
  .hero-section,
  .content-band,
  .request-section,
  .site-footer,
  .site-header {
    width: min(100% - 22px, 1160px);
  }

  h1 {
    font-size: 2.34rem;
  }

  .router-card h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.65rem;
  }

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