:root {
  --bg: #0b1220;
  --surface: #0f1a33;
  --surface-2: #111f3d;
  --text: #eaf0ff;
  --muted: #b9c6e8;
  --border: rgba(234, 240, 255, 0.12);
  --accent: #8bd5ff;
  --accent-2: #a9ffcf;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --max: 1100px;
  --radius: 16px;
  --header-height: 89px;
  --header-offset: calc(var(--header-height) + 18px);
  --header-identity-width: 332px;
  --brand-width: 176px;
  --context-chip-width: 144px;
  --brand-size: 15px;
  --header-label-size: 13px;
  --header-chip-size: 12px;
}

* { box-sizing: border-box; }
html {
  color-scheme: dark;
  scroll-padding-top: var(--header-offset);
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: radial-gradient(1200px 700px at 15% 10%, rgba(139, 213, 255, 0.18), transparent 60%),
              radial-gradient(1000px 600px at 90% 15%, rgba(169, 255, 207, 0.10), transparent 55%),
              linear-gradient(180deg, var(--bg), #070b14 70%);
  color: var(--text);
  line-height: 1.55;
  padding-top: var(--header-height);
}

a {
  color: var(--text);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--max);
  padding: 0 20px;
  margin: 0 auto;
}

.header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 18, 32, 0.65);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(var(--header-height) - 1px);
  gap: 14px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.header-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 var(--header-identity-width);
  width: var(--header-identity-width);
  min-width: var(--header-identity-width);
  max-width: var(--header-identity-width);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 var(--brand-width);
  width: var(--brand-width);
  min-width: var(--brand-width);
  max-width: var(--brand-width);
  overflow: hidden;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(139, 213, 255, 0.95), rgba(169, 255, 207, 0.75));
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.brand-title {
  display: block;
  line-height: 1.1;
  flex: 0 0 auto;
}

.brand-title strong {
  display: block;
  font-size: var(--brand-size);
  line-height: 1;
  letter-spacing: 0.4px;
}

.context-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--context-chip-width);
  width: var(--context-chip-width);
  min-width: var(--context-chip-width);
  max-width: var(--context-chip-width);
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(234, 240, 255, 0.04);
  color: var(--muted);
  font-size: var(--header-chip-size);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.2px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}

.context-chip:hover,
.context-chip:focus-visible,
.context-chip[aria-current='page'] {
  color: var(--text);
  text-decoration: none;
}

.context-chip.placeholder {
  visibility: hidden;
  pointer-events: none;
}

.nav {
  display: none;
  gap: 14px;
  align-items: center;
  min-height: 40px;
}

.nav-group {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-group summary,
.nav-link {
  display: inline-flex;
  align-items: center;
  list-style: none;
  font-size: var(--header-label-size);
  line-height: 1;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 10px;
  min-height: 36px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "▼";
  font-size: 10px;
  margin-left: 8px;
  opacity: 0.75;
}

.nav-group[open] summary,
.nav-group summary:hover,
.nav-link:hover {
  color: var(--text);
  background: rgba(234, 240, 255, 0.06);
  text-decoration: none;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 26, 51, 0.96);
  box-shadow: var(--shadow);
}

.nav-menu a {
  display: block;
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
}

.nav-menu a:hover {
  color: var(--text);
  background: rgba(234, 240, 255, 0.06);
  text-decoration: none;
}

.cta-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(234, 240, 255, 0.04);
  color: var(--text);
  font-size: var(--header-label-size);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  background: rgba(234, 240, 255, 0.08);
  text-decoration: none;
}

.button.primary {
  border: 1px solid rgba(139, 213, 255, 0.35);
  background: linear-gradient(135deg, rgba(139, 213, 255, 0.20), rgba(169, 255, 207, 0.12));
}

.hero {
  padding: 56px 0 26px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.hero-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 26, 51, 0.9), rgba(15, 26, 51, 0.55));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card-inner {
  padding: 26px;
}

.kicker {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(234, 240, 255, 0.04);
}

.h1 {
  margin: 14px 0 10px;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.6px;
}

.subhead {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.badges {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.badge {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 31, 61, 0.62);
  padding: 16px;
}

.badge strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.badge span {
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 26px 0;
}

[id] {
  scroll-margin-top: var(--header-offset);
}

.section h2 {
  margin: 0 0 12px;
  font-size: 20px;
  letter-spacing: -0.2px;
}

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

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 26, 51, 0.55);
  padding: 16px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 26, 51, 0.55);
  padding: 16px;
}

.step .num {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: rgba(11, 18, 32, 0.95);
  background: linear-gradient(135deg, rgba(139, 213, 255, 0.95), rgba(169, 255, 207, 0.75));
}

.step h3 {
  margin: 0;
  font-size: 14px;
}

.step p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.callout {
  border: 1px dashed rgba(139, 213, 255, 0.45);
  background: rgba(139, 213, 255, 0.06);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--muted);
}

.intake-form {
  display: grid;
  gap: 14px;
}

.form-card,
.subsection {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 26, 51, 0.55);
  padding: 16px;
}

.form-card h3,
.subsection h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.section-heading,
.field-label-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.info-popover {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.info-popover summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(139, 213, 255, 0.35);
  background: rgba(139, 213, 255, 0.12);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.info-popover summary::-webkit-details-marker {
  display: none;
}

.info-popover summary:focus-visible {
  outline: 2px solid rgba(139, 213, 255, 0.45);
  outline-offset: 2px;
}

.info-popover-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  width: min(280px, calc(100vw - 48px));
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 26, 51, 0.98);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.form-card p,
.subsection p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.field-grid.compact {
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.8);
  color: var(--text);
  font: inherit;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(139, 213, 255, 0.35);
  outline-offset: 1px;
}

.checkbox-grid,
.radio-row {
  display: grid;
  gap: 10px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(11, 18, 32, 0.42);
  color: var(--muted);
  font-size: 13px;
}

.choice input {
  margin-top: 2px;
}

.choice-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dependent-list {
  display: grid;
  gap: 12px;
}

.dependent-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(11, 18, 32, 0.42);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.form-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.form-status.success {
  background: rgba(169, 255, 207, 0.10);
  border-color: rgba(169, 255, 207, 0.35);
  color: var(--text);
}

.form-status.error {
  background: rgba(255, 157, 157, 0.10);
  border-color: rgba(255, 157, 157, 0.35);
  color: #ffd7d7;
}

.footer {
  padding: 30px 0 42px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.footer small {
  display: block;
  color: var(--muted);
}

@media (min-width: 820px) {
  .nav { display: flex; }
  .header-inner {
    flex-wrap: nowrap;
    min-height: calc(var(--header-height) - 1px);
  }
  .brand,
  .header-identity,
  .nav,
  .cta-row {
    flex: 0 0 auto;
  }
  .hero-grid {
    grid-template-columns: 1.25fr 0.75fr;
    gap: 16px;
  }
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .badges {
    grid-template-columns: 1fr;
  }
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .field-span-2 {
    grid-column: span 2;
  }
  .checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .h1 { font-size: 44px; }
}

@media (max-width: 819px) {
  :root {
    --header-height: 111px;
    --header-offset: calc(var(--header-height) + 18px);
  }
  .header-identity {
    width: auto;
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }
  .brand {
    width: auto;
    min-width: 0;
    max-width: none;
    flex: 0 1 auto;
  }
  .context-chip {
    display: none;
  }
  .button {
    padding: 9px 12px;
  }
}

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