:root {
  --navy: #12334a;
  --navy-deep: #0a2537;
  --blue: #1e6fb8;
  --blue-light: #eaf4fb;
  --teal: #087c72;
  --green: #0a7654;
  --green-light: #e8f6f0;
  --amber: #f5b942;
  --amber-light: #fff7db;
  --ink: #17212b;
  --muted: #5e6d78;
  --line: #d7e1e8;
  --surface: #ffffff;
  --canvas: #edf3f7;
  --danger: #b42318;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(20, 49, 70, 0.13);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button, input, textarea, select { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  color: white;
  background: var(--navy-deep);
  border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  border-bottom: 1px solid rgba(18, 51, 74, 0.12);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 12px 12px 12px 4px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand strong { display: block; font-size: 18px; letter-spacing: 0.02em; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.pilot-chip {
  padding: 7px 11px;
  border: 1px solid #bad6e9;
  border-radius: 99px;
  color: #18517b;
  background: var(--blue-light);
  font-size: 13px;
  font-weight: 700;
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.guide-link { color: var(--navy); font-size: 14px; font-weight: 800; text-decoration: none; }
.guide-link:hover { color: var(--blue); text-decoration: underline; }

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto 46px;
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.35fr);
  align-items: start;
  gap: 30px;
}

.intro-panel {
  position: sticky;
  top: 24px;
  overflow: hidden;
  padding: clamp(26px, 4vw, 46px);
  color: white;
  background:
    linear-gradient(135deg, rgba(255,255,255,.055) 25%, transparent 25%) 0 0 / 42px 42px,
    linear-gradient(315deg, rgba(255,255,255,.035) 25%, transparent 25%) 0 0 / 42px 42px,
    linear-gradient(150deg, var(--navy), var(--navy-deep));
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.eyebrow, .form-kicker, .preview-label {
  margin: 0 0 8px;
  color: #76c8ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(36px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -0.045em; }
.intro-copy { margin: 22px 0 26px; color: #d9e6ee; font-size: 17px; line-height: 1.65; }

.free-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  color: var(--ink);
  background: var(--amber-light);
  border: 1px solid rgba(245,185,66,.65);
  border-radius: 16px;
}
.free-card .zero { color: var(--navy); font-size: 34px; font-weight: 900; letter-spacing: -0.04em; }
.free-card strong { color: var(--navy); }
.free-card p { margin: 2px 0 0; color: #52606a; font-size: 14px; line-height: 1.45; }

.trust-list { margin: 26px 0; padding: 0; list-style: none; }
.trust-list li { display: grid; grid-template-columns: 23px 1fr; gap: 8px; margin: 12px 0; color: #edf7fb; }
.trust-list span { color: #62dfae; font-weight: 900; }

.demo-notice { padding-top: 19px; border-top: 1px solid rgba(255,255,255,.17); }
.demo-notice strong, .demo-notice span { display: block; }
.demo-notice strong { color: #ffe29a; }
.demo-notice span { margin-top: 2px; color: #bed0dc; font-size: 14px; }

.form-card {
  min-width: 0;
  padding: clamp(22px, 4vw, 42px);
  background: var(--surface);
  border: 1px solid rgba(18, 51, 74, 0.1);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.form-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.form-topline h2 { margin: 0; color: var(--navy); font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; }
.form-topline .form-kicker { color: var(--blue); }
#step-counter { color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap; }

.steps {
  position: relative;
  margin: 28px 0 34px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}
.steps::before { content: ""; position: absolute; top: 16px; left: 16%; right: 16%; height: 2px; background: var(--line); }
.steps li { position: relative; z-index: 1; display: grid; place-items: center; gap: 5px; color: #75838e; }
.steps li span { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: white; font-size: 14px; font-weight: 800; }
.steps li em { font-size: 13px; font-style: normal; font-weight: 700; }
.steps li.active, .steps li.done { color: var(--navy); }
.steps li.active span { color: white; border-color: var(--blue); background: var(--blue); box-shadow: 0 0 0 5px var(--blue-light); }
.steps li.done span { color: white; border-color: var(--teal); background: var(--teal); }

.form-step[hidden], .success-panel[hidden] { display: none; }
.section-heading { display: grid; grid-template-columns: 40px 1fr; gap: 12px; margin-bottom: 28px; }
.section-number { margin: 2px 0 0; color: var(--blue); font-weight: 900; }
.section-heading h3 { margin: 0; color: var(--navy); font-size: 24px; letter-spacing: -0.02em; }
.section-heading p:not(.section-number) { margin: 3px 0 0; color: var(--muted); }

.field { margin: 0 0 24px; padding: 0; border: 0; }
.field > label, .field > legend { display: block; margin-bottom: 8px; color: var(--navy); font-size: 15px; font-weight: 800; }
.field label > span, .field legend > span { color: var(--danger); }
.field .optional { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.field > small, .field-meta small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.field-meta { display: flex; justify-content: space-between; gap: 12px; }

input[type="text"], input[type="tel"], input[type="email"], input[type="url"], textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  background: white;
  border: 1px solid #bccbd5;
  border-radius: 10px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,111,184,.13); }
input:disabled { color: #81909a; background: #f3f6f8; cursor: not-allowed; }
input.invalid, textarea.invalid, select.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180,35,24,.1); }

.compact-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compact-options legend { grid-column: 1 / -1; }
.choice-card {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 0 !important;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
}
.choice-card:has(input:checked) { border-color: var(--blue); background: var(--blue-light); }
.choice-card input { margin-top: 4px; accent-color: var(--blue); }
.choice-card strong, .choice-card small { display: block; }
.choice-card small { margin-top: 1px; color: var(--muted); font-size: 12px; font-weight: 500; }

.legend-help { margin: -4px 0 10px; color: var(--muted); font-size: 13px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-grid label { min-height: 43px; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.check-grid label:has(input:checked) { color: var(--navy); border-color: #72aed4; background: var(--blue-light); font-weight: 700; }
.check-grid input, .channel-toggle input, .approval-row input, .final-confirmation input { width: 18px; height: 18px; accent-color: var(--blue); }

.privacy-inline { display: grid; grid-template-columns: 28px 1fr; gap: 10px; margin-bottom: 22px; padding: 13px 15px; color: #18517b; background: var(--blue-light); border-radius: 11px; }
.privacy-inline span { width: 24px; height: 24px; display: grid; place-items: center; color: white; background: var(--blue); border-radius: 50%; font-size: 13px; font-weight: 900; }
.privacy-inline p { margin: 0; font-size: 14px; }

.channel-list { display: grid; gap: 9px; }
.channel-row { display: grid; grid-template-columns: minmax(118px, .55fr) 1.45fr; gap: 10px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 11px; }
.channel-row:has(input[type="checkbox"]:checked) { border-color: #72aed4; background: #f7fbfe; }
.channel-toggle { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; cursor: pointer; }
.channel-toggle span { color: var(--navy) !important; font-weight: 750; }
.group-error { min-height: 20px; margin: 6px 0 0; color: var(--danger); font-size: 13px; font-weight: 700; }

.upload-box { min-height: 82px; display: flex !important; align-items: center; gap: 13px; padding: 15px; border: 1px dashed #82a7bf; border-radius: 12px; background: #f8fbfd; cursor: pointer; }
.upload-box:hover { border-color: var(--blue); background: var(--blue-light); }
.upload-box[aria-disabled="true"] { cursor: default; opacity: .82; }
.upload-box[aria-disabled="true"]:hover { border-color: #82a7bf; background: #f8fbfd; }
.field-label { display: block; margin-bottom: 8px; color: var(--navy); font-size: 14px; font-weight: 800; }
.upload-box .upload-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--blue); background: white; border: 1px solid #c5dbe9; border-radius: 10px; font-size: 24px; font-weight: 400; }
.upload-box strong, .upload-box small { display: block; }
.upload-box small { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; }
.file-list { margin: 8px 0 0; padding: 0; list-style: none; color: var(--teal); font-size: 13px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.form-actions.end { justify-content: flex-end; }
.form-actions.split { justify-content: space-between; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border: 0; border-radius: 10px; font-weight: 800; cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, background .14s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .68; transform: none; }
.button:focus-visible, .text-button:focus-visible, .icon-button:focus-visible { outline: 3px solid rgba(30,111,184,.32); outline-offset: 3px; }
.button.primary { color: white; background: var(--blue); box-shadow: 0 8px 18px rgba(30,111,184,.2); }
.button.primary:hover { background: #185d9b; }
.button.ghost { color: var(--navy); background: #edf3f6; }
.button.submit { min-width: 196px; background: var(--green); }
.button.submit:hover { background: #075d43; }

.preview-card { padding: 22px; border: 1px solid #bfd2de; border-radius: 16px; background: linear-gradient(145deg, #fafdff, #f3f8fb); }
.preview-top { display: grid; grid-template-columns: 52px 1fr; gap: 13px; align-items: center; }
.avatar { width: 52px; height: 52px; display: grid; place-items: center; color: white; background: var(--navy); border-radius: 15px; font-weight: 900; }
.preview-label { margin: 0 0 1px; color: var(--teal); font-size: 11px; }
.preview-card h4 { margin: 0; color: var(--navy); font-size: 21px; }
.preview-card p { margin: 2px 0 0; color: var(--muted); }
.preview-description { margin: 18px 0 !important; color: var(--ink) !important; line-height: 1.6; }
.preview-specialties { margin: -6px 0 18px; padding: 10px 12px; color: #355263; background: white; border-left: 3px solid var(--teal); font-size: 14px; }
.preview-group { padding-top: 14px; border-top: 1px solid var(--line); }
.preview-group + .preview-group { margin-top: 13px; }
.preview-group strong { color: var(--navy); font-size: 13px; text-transform: uppercase; letter-spacing: .045em; }
.preview-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.preview-tags span { padding: 5px 9px; color: #18517b; background: var(--blue-light); border-radius: 99px; font-size: 12px; font-weight: 750; }

.approval-block { margin-top: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; }
.approval-row { display: grid; grid-template-columns: 20px 1fr auto; gap: 9px; align-items: center; }
.approval-row label { color: var(--navy); font-weight: 700; }
.text-button { padding: 3px 0; color: var(--blue); background: transparent; border: 0; border-bottom: 1px solid currentColor; font-size: 14px; font-weight: 800; cursor: pointer; }
.final-confirmation { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); cursor: pointer; }
.final-confirmation input { margin-top: 3px; }
.final-confirmation span { color: #33434e !important; font-size: 14px; }
.no-publish { margin-top: 14px; padding: 12px 14px; color: #6c4c00; background: var(--amber-light); border-radius: 10px; font-size: 14px; }

.success-panel { padding: 34px 10px 20px; text-align: center; }
.success-icon { width: 68px; height: 68px; margin: 0 auto 20px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 50%; font-size: 34px; font-weight: 900; box-shadow: 0 0 0 10px var(--green-light); }
.success-panel .form-kicker { margin-top: 28px; color: var(--green); }
.success-panel h3 { margin: 0; color: var(--navy); font-size: 28px; }
.success-panel > p { max-width: 540px; margin: 10px auto 20px; color: var(--muted); }
.success-note { max-width: 540px; margin: 0 auto 24px; padding: 15px; color: #28624e; background: var(--green-light); border-radius: 11px; }
.success-actions { max-width: 560px; margin: 18px auto 13px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 9px; }
.success-status { min-height: 22px; margin: 0 auto 13px !important; color: var(--green) !important; font-size: 13px; font-weight: 750; }
.success-panel > .text-button { margin-top: 4px; }

footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto 34px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; }
footer p { margin: 0; }
footer a { color: var(--blue); }

dialog { width: min(680px, calc(100% - 28px)); max-height: min(780px, calc(100vh - 40px)); padding: 0; color: var(--ink); background: white; border: 0; border-radius: 18px; box-shadow: 0 28px 90px rgba(4,24,38,.35); }
dialog::backdrop { background: rgba(7, 30, 45, .72); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.dialog-head .form-kicker { color: var(--blue); }
.dialog-head h2 { margin: 0; color: var(--navy); font-size: 26px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; color: var(--navy); background: #edf3f6; border: 0; border-radius: 10px; font-size: 26px; cursor: pointer; }
.dialog-body { overflow-y: auto; padding: 22px 26px 10px; }
.dialog-body h3 { color: var(--navy); }
.dialog-body li { margin: 8px 0; }
.privacy-warning { padding: 15px; color: #18517b; background: var(--blue-light); border-radius: 11px; }
.privacy-warning p { margin: 3px 0 0; }
.legal-pending { padding: 13px; color: #6c4c00; background: var(--amber-light); border-radius: 10px; font-size: 14px; }
.dialog-actions { padding: 16px 26px 24px; text-align: right; }

@media (max-width: 880px) {
  .page-shell { grid-template-columns: 1fr; }
  .intro-panel { position: static; }
  h1 { max-width: 700px; }
}

@media (max-width: 580px) {
  .header-inner, .page-shell, footer { width: min(100% - 20px, 1180px); }
  .header-inner { min-height: 68px; }
  .brand small { display: none; }
  .pilot-chip { font-size: 12px; }
  .header-actions { gap: 8px; }
  .guide-link { font-size: 12px; }
  .header-actions .pilot-chip { display: none; }
  .page-shell { margin-top: 10px; gap: 12px; }
  .intro-panel, .form-card { border-radius: 16px; }
  .intro-panel { padding: 24px 20px; }
  h1 { font-size: 36px; }
  .intro-copy { font-size: 16px; }
  .form-card { padding: 22px 17px; }
  .form-topline { align-items: end; }
  .steps { margin: 22px 0 28px; }
  .compact-options, .check-grid { grid-template-columns: 1fr; }
  .channel-row { grid-template-columns: 1fr; }
  .channel-row input[type="text"], .channel-row input[type="tel"], .channel-row input[type="email"], .channel-row input[type="url"] { margin-top: 2px; }
  .form-actions.split { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .success-actions { grid-template-columns: 1fr; }
  .approval-row { grid-template-columns: 20px 1fr; }
  .approval-row .text-button { grid-column: 2; justify-self: start; }
  footer { flex-direction: column; gap: 4px; }
  .dialog-head, .dialog-body, .dialog-actions { padding-left: 18px; padding-right: 18px; }
  .dialog-actions .button { width: 100%; }
}

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