:root {
  --page: #f1eff5;
  --paper: #fffefd;
  --teal: #064d49;
  --teal-deep: #033a37;
  --teal-hover: #0a625d;
  --gold: #b79a2e;
  --gold-bright: #d4b947;
  --gold-dark: #8f7720;
  --ink: #202b2e;
  --muted: #667176;
  --line: #d7dcdd;
  --line-strong: #bdc6c7;
  --soft: #f6f8f7;
  --danger: #a43b3b;
  --shadow: 0 24px 70px rgba(32, 39, 48, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page); }
body { margin: 0; color: var(--ink); background-color: var(--page); background-image: linear-gradient(rgba(6, 77, 73, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(6, 77, 73, .025) 1px, transparent 1px); background-size: 42px 42px; font-family: "Source Sans 3", sans-serif; font-size: 15px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.reading-progress { position: fixed; z-index: 50; top: 0; left: 0; width: 100%; height: 4px; background: rgba(3, 58, 55, .14); }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--gold-bright); box-shadow: 0 0 10px rgba(212, 185, 71, .45); transition: width .12s linear; }
.page-shell { padding: 38px 20px 80px; }
.form-sheet { width: min(1080px, 100%); margin: 0 auto; background: var(--paper); border: 1px solid rgba(6, 77, 73, .1); border-radius: 6px; box-shadow: var(--shadow); overflow: clip; counter-reset: form-section; }
.form-header { position: relative; display: grid; grid-template-columns: 200px 1fr; align-items: center; min-height: 285px; padding: 38px 58px; color: #f7f3df; background-color: var(--teal-deep); background-image: linear-gradient(120deg, rgba(255,255,255,.035) 25%, transparent 25%), linear-gradient(300deg, rgba(183,154,46,.07) 18%, transparent 18%); background-size: 220px 220px, 260px 260px; border-top: 5px solid var(--gold-bright); text-align: left; }
.form-header::after { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; content: ""; background: linear-gradient(90deg, transparent, var(--gold-bright), transparent); opacity: .7; }
.brand-mark { display: grid; width: 164px; height: 164px; place-items: center; background: var(--teal); border: 1px solid rgba(212,185,71,.7); box-shadow: 0 16px 30px rgba(0,0,0,.2); }
.brand-logo { display: block; width: 150px; height: 150px; object-fit: cover; }
.header-copy { padding-left: 32px; border-left: 1px solid rgba(212,185,71,.38); }
h1, h2, .field > span, .field-heading, legend { font-family: "Philosopher", sans-serif; color: var(--gold); letter-spacing: 0; }
h1 { max-width: 660px; margin: 3px 0 14px; color: var(--gold-bright); font-size: clamp(27px, 3vw, 38px); line-height: 1.08; }
.form-header p { margin: 0; line-height: 1.45; }
.eyebrow { color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.company-address { max-width: 680px; color: #f8f6eb; font-size: 13px; font-weight: 600; }
.header-description { max-width: 660px; margin-top: 8px !important; color: rgba(255,255,255,.72); font-size: 14px; }
.section-nav { position: sticky; z-index: 20; top: 4px; display: flex; gap: 3px; padding: 10px 14px; overflow-x: auto; background: rgba(255,254,253,.96); border-bottom: 1px solid var(--line); box-shadow: 0 8px 18px rgba(31,42,44,.06); scrollbar-width: none; }
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a { flex: 1 0 auto; padding: 8px 9px; color: #687376; border-bottom: 2px solid transparent; font-size: 12px; font-weight: 600; text-align: center; text-decoration: none; transition: color .18s, border-color .18s, background .18s; }
.section-nav a:hover { color: var(--teal); background: #f3f7f5; }
.section-nav a.active { color: var(--teal); border-bottom-color: var(--gold); }
section { counter-increment: form-section; scroll-margin-top: 72px; border-top: 1px solid #e4e8e7; }
section:nth-of-type(even) { background: #fbfcfb; }
h2 { display: flex; align-items: center; gap: 14px; margin: 0; padding: 26px 54px 0; color: var(--teal); background: transparent; font-size: 21px; font-weight: 700; }
h2::before { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; content: counter(form-section, decimal-leading-zero); color: var(--gold-dark); background: #f5f0dc; border: 1px solid #dfd19b; border-radius: 50%; font-family: "Source Sans 3", sans-serif; font-size: 11px; font-weight: 700; }
.section-body { padding: 28px 54px 40px; }
.form-grid { display: grid; gap: 22px 28px; }
.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-column { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.field > span, .field-heading, legend { color: var(--teal-deep); font-size: 14px; font-weight: 700; }
.field-heading { margin: 0 0 14px; font-size: 15px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 4px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { background: white; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(183, 154, 46, .13); }
input::placeholder { color: #a2a7ad; }
small { color: var(--muted); font-size: 12px; line-height: 1.2; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.grouped-field legend { margin-bottom: 6px; }
.subgrid { display: grid; gap: 14px 18px; }
.subfield { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.phone-grid { display: grid; grid-template-columns: minmax(95px, .7fr) minmax(0, 2fr); gap: 12px; }
.required { margin-left: 2px; color: var(--danger); }
.instructions { margin: 18px 0 0; color: #59636c; font-size: 13px; line-height: 1.5; }
.repeat-list { display: grid; gap: 18px; }
.repeat-card { position: relative; padding: 26px; background: var(--soft); border: 1px solid #dfe5e3; border-left: 3px solid var(--gold); border-radius: 4px; box-shadow: 0 5px 14px rgba(35,47,48,.035); }
.repeat-card + .repeat-card { margin-top: 2px; }
.remove-button { position: absolute; z-index: 2; top: 6px; right: 8px; width: 28px; height: 28px; padding: 0; color: #798087; background: transparent; border: 0; font-size: 23px; line-height: 1; }
.remove-button:hover { color: var(--danger); }
.repeat-card:only-child .remove-button { display: none; }
.add-button { margin-top: 16px; padding: 10px 16px; color: var(--teal); background: white; border: 1px solid var(--teal); border-radius: 4px; font-family: "Philosopher", sans-serif; font-weight: 700; transition: color .15s, background .15s, transform .15s; }
.add-button:hover { color: white; background: var(--teal); }
.add-button:active { transform: translateY(1px); }
.person-card .form-grid { align-items: start; }
.person-card .capacity-field { display: flex; }
.person-card.employee .capacity-field { display: none; }
.signature-field { margin-top: 2px; }
.signature-pad { position: relative; overflow: hidden; height: 150px; background-color: white; background-image: linear-gradient(transparent calc(100% - 36px), rgba(6,77,73,.1) calc(100% - 35px), transparent calc(100% - 34px)); border: 1px solid var(--line); border-radius: 4px; }
.signature-pad canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.clear-signature { position: absolute; right: 8px; bottom: 8px; padding: 5px 11px; color: var(--teal); background: rgba(255,255,255,.92); border: 1px solid #cfd5d8; border-radius: 2px; font-size: 12px; }
.upload-zone { position: relative; display: grid; min-height: 130px; place-items: center; align-content: center; gap: 4px; padding: 18px; color: #6f7881; background: #fafcfb; border: 1px dashed #aebcba; border-radius: 4px; text-align: center; transition: background .15s, border-color .15s, transform .15s; }
.upload-zone.compact { min-height: 118px; }
.upload-zone.dragging { background: #f1f7f5; border-color: var(--teal); }
.upload-zone input[type="file"] { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-zone strong { color: var(--ink); font-size: 14px; }
.upload-zone span { font-size: 12px; }
.upload-zone button { margin-top: 8px; padding: 8px 14px; color: white; background: var(--teal); border: 0; border-radius: 4px; pointer-events: none; }
.upload-zone.has-files { border-style: solid; border-color: var(--gold); }
.upload-zone.has-files strong { color: var(--teal); }
.declarations { display: grid; gap: 22px; }
.declarations legend, .checklist legend { margin-bottom: 8px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; color: #434d56; cursor: pointer; }
.check-row input { flex: 0 0 19px; width: 19px; min-height: 19px; margin: 2px 0 0; accent-color: var(--teal); }
.choice-row { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.other-detail[hidden] { display: none !important; }
.checklist fieldset { min-width: 0; }
.field-hint { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.website-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.website-hint.warn { color: #8a5a12; }
.website-hint strong { color: var(--teal); font-weight: 700; }
.document-uploads .add-button { margin-top: 12px; }
.document-list { display: grid; gap: 12px; }
.document-entry { margin: 0; }
.document-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.document-entry .document-label-field.is-required input { border-color: var(--gold); }
.document-entry.is-other .document-label-field small::after { content: " (required for Other)"; color: var(--danger); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; padding: 30px 54px 40px; background: #f7f9f8; border-top: 1px solid #dfe5e3; }
#form-status { flex: 1; color: var(--teal); text-align: right; }
#form-status.error { color: var(--danger); }
.submit-button { min-width: 154px; padding: 13px 30px; color: white; background: var(--teal); border: 1px solid var(--teal); border-radius: 4px; box-shadow: 0 8px 18px rgba(6,77,73,.2); font-family: "Philosopher", sans-serif; font-size: 16px; font-weight: 700; transition: background .15s, box-shadow .15s, transform .15s; }
.submit-button:hover { background: var(--teal-hover); }
.submit-button:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(6,77,73,.18); }
.submit-button:disabled { cursor: wait; opacity: .65; }

.success-panel { margin: 0; padding: 48px 54px 56px; background: var(--paper); }
.success-panel .eyebrow { margin: 0 0 8px; color: var(--gold-dark); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.success-panel h2 { margin: 0 0 12px; color: var(--teal-deep); font-family: Philosopher, sans-serif; font-size: 30px; }
.success-lead { margin: 0 0 10px; color: var(--ink); font-size: 16px; }
.success-reference { margin: 0 0 22px; color: var(--teal); font-size: 15px; }
.success-summary { display: grid; gap: 10px; margin: 0 0 24px; padding: 18px; background: var(--soft); border: 1px solid var(--line); border-radius: 4px; }
.success-summary-row { display: grid; grid-template-columns: minmax(120px, .35fr) 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid #e7eceb; }
.success-summary-row:last-child { border-bottom: 0; }
.success-summary-row span { color: var(--muted); font-size: 13px; }
.success-summary-row strong { color: var(--teal-deep); font-weight: 600; overflow-wrap: anywhere; }
.success-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.success-actions .quiet-button { min-height: 46px; padding: 12px 18px; color: var(--teal); background: white; border: 1px solid var(--teal); border-radius: 4px; font-family: Philosopher, sans-serif; font-weight: 700; }
.success-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; max-width: 52rem; }
.success-pdf-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--teal);
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 720px) {
  .success-panel { padding: 28px 20px 36px; }
  .success-summary-row { grid-template-columns: 1fr; gap: 2px; }
  .success-actions { flex-direction: column; }
  .success-actions .quiet-button, .success-actions .submit-button { width: 100%; }
}

@media (max-width: 720px) {
  .page-shell { padding: 0; }
  .form-sheet { border: 0; border-radius: 0; box-shadow: none; }
  .form-header { display: flex; min-height: 0; align-items: center; flex-direction: column; padding: 28px 22px 32px; text-align: center; }
  .brand-mark { width: 124px; height: 124px; margin-bottom: 22px; }
  .brand-logo { width: 114px; height: 114px; }
  .header-copy { padding: 0; border-left: 0; }
  h1 { margin-top: 5px; font-size: 27px; }
  .company-address, .header-description { margin-right: auto !important; margin-left: auto !important; }
  .section-nav { top: 4px; padding: 8px 10px; }
  .section-nav a { padding: 7px 12px; }
  h2 { align-items: flex-start; padding: 24px 20px 0; font-size: 19px; line-height: 1.25; }
  .section-body { padding: 24px 20px 34px; }
  .two-column, .three-column { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .subgrid.two-column { grid-template-columns: 1fr; }
  .subfield.full { grid-column: auto; }
  .repeat-card { padding: 24px 16px 20px; }
  .field.spacer > span { display: none; }
  .signature-pad { height: 132px; }
  .form-actions { align-items: stretch; flex-direction: column; padding: 26px 20px 34px; }
  #form-status { text-align: center; }
  .submit-button { width: 100%; }
}

/* Landing */
.landing-body {
  min-height: 100vh;
  background-color: #031f1e;
  background-image:
    radial-gradient(ellipse 90% 70% at 12% 0%, rgba(212, 185, 71, .18), transparent 55%),
    radial-gradient(ellipse 70% 55% at 90% 100%, rgba(6, 77, 73, .55), transparent 50%),
    linear-gradient(160deg, #022826 0%, #033a37 42%, #052f2d 100%);
}
.landing-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 48px 22px 72px;
}
.landing-hero {
  margin-bottom: 36px;
  animation: landing-rise .7s ease both;
}
.landing-brand {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 28px;
  align-items: center;
  padding: 34px 40px;
  color: #f7f3df;
  background: linear-gradient(135deg, rgba(3, 58, 55, .92), rgba(6, 77, 73, .78));
  border: 1px solid rgba(212, 185, 71, .35);
  border-top: 5px solid var(--gold-bright);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
}
.landing-logo {
  width: 148px;
  height: 148px;
  object-fit: cover;
  border: 1px solid rgba(212, 185, 71, .65);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .25);
}
.landing-brand-copy { border-left: 1px solid rgba(212, 185, 71, .35); padding-left: 28px; }
.landing-brand .eyebrow { color: #fff; margin: 0 0 6px; }
.landing-brand h1 {
  max-width: none;
  margin: 0 0 12px;
  color: var(--gold-bright);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.02;
}
.landing-address {
  margin: 0;
  color: #f8f6eb;
  font-size: 13px;
  font-weight: 600;
}
.landing-lead {
  margin: 10px 0 0;
  max-width: 34rem;
  color: rgba(255, 255, 255, .72);
  font-size: 16px;
  line-height: 1.45;
}
.landing-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.landing-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
  padding: 26px 24px 22px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 254, 253, .96);
  border: 1px solid rgba(212, 185, 71, .28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  animation: landing-rise .75s ease both;
}
.landing-choice:nth-child(2) { animation-delay: .08s; }
.landing-choice:nth-child(3) { animation-delay: .16s; }
.landing-choice:hover,
.landing-choice:focus-visible {
  transform: translateY(-4px);
  border-color: var(--gold-bright);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .26);
  outline: none;
}
.landing-choice-kicker {
  color: var(--gold-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.landing-choice strong {
  font-family: "Philosopher", sans-serif;
  font-size: 26px;
  line-height: 1.15;
  color: var(--teal-deep);
  font-weight: 700;
}
.landing-choice-text {
  flex: 1;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.landing-choice-cta {
  align-self: flex-start;
  margin-top: 8px;
  padding: 9px 14px;
  color: #fff;
  background: var(--teal);
  font-size: 13px;
  font-weight: 700;
}
.landing-choice:hover .landing-choice-cta,
.landing-choice:focus-visible .landing-choice-cta {
  background: var(--teal-hover);
}
@keyframes landing-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
  .landing-choices { grid-template-columns: 1fr; }
  .landing-brand { grid-template-columns: 1fr; text-align: center; padding: 28px 22px; }
  .landing-logo { margin: 0 auto; }
  .landing-brand-copy { border-left: 0; padding-left: 0; }
  .landing-lead { margin-left: auto; margin-right: auto; }
}
