:root {
  color-scheme: light;
  --ink: #17332e;
  --ink-soft: #526761;
  --forest: #155947;
  --forest-dark: #0d4638;
  --leaf: #dff19a;
  --mist: #edf3ef;
  --paper: #fffefa;
  --ground: #f2f0e7;
  --line: #d8ded8;
  --error: #a52f2f;
  --error-soft: #fff3f1;
  --warning: #7b5412;
  --warning-soft: #fff7dc;
  --shadow: 0 22px 60px rgba(26, 54, 47, .10);
  --radius: 18px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(223, 241, 154, .42), transparent 28rem),
    linear-gradient(180deg, #f9f8f1 0, var(--ground) 58rem);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: white;
  background: var(--forest-dark);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.site-header {
  width: min(100% - 36px, 960px);
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--forest);
  border-radius: 10px 10px 10px 3px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.brand-name {
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -.025em;
}

.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.secure-label svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-button {
  min-height: 44px;
  padding: 7px 2px;
  color: var(--forest);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-shell {
  width: min(100% - 36px, 760px);
  margin: 44px auto 72px;
}

.signin-shell {
  width: min(100% - 36px, 480px);
  min-height: calc(100vh - 190px);
  margin: 56px auto 52px;
  display: grid;
  align-content: center;
}

.signin-card {
  padding: 38px;
  background: rgba(255, 254, 250, .97);
  border: 1px solid rgba(22, 62, 52, .10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.signin-card h1 { margin-bottom: 10px; font-size: clamp(38px, 9vw, 50px); }
.signin-lede { margin-bottom: 28px; color: var(--ink-soft); }
.signin-card .field + .field { margin-top: 20px; }
.signin-card .primary-button { margin-top: 26px; }

.signin-error {
  margin-top: 20px;
  padding: 12px 14px;
  color: var(--error);
  background: var(--error-soft);
  border: 1px solid rgba(165, 47, 47, .25);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 650;
}

.signin-footer { margin-top: 0; }

.intro { max-width: 680px; margin-bottom: 30px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(38px, 7vw, 58px);
  line-height: 1.02;
  letter-spacing: -.052em;
}

.lede {
  max-width: 650px;
  margin-bottom: 16px;
  color: var(--ink-soft);
  font-size: clamp(18px, 3vw, 21px);
  line-height: 1.48;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 620;
}

.form-card, .success-card {
  background: rgba(255, 254, 250, .97);
  border: 1px solid rgba(22, 62, 52, .10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: visible;
}

.form-section { padding: 34px 38px 38px; }
.form-section + .form-section { border-top: 1px solid var(--line); }

.section-heading {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 26px;
}

.section-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--forest-dark);
  background: var(--leaf);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 850;
}

.section-heading h2 {
  margin-bottom: 3px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 20px;
}

.field-wide { grid-column: 1 / -1; }

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 650;
  cursor: pointer;
}

.check-line input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: 0 0 auto;
}

.select-refresh-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.select-refresh-row .text-button { white-space: nowrap; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 720;
}

.optional-label {
  margin-left: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #7f978e;
  border-radius: 10px;
  outline: 0;
  font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

textarea {
  min-height: 112px;
  line-height: 1.45;
  resize: vertical;
}

select {
  padding-right: 36px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 17px) 21px, calc(100% - 12px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

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

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .suggestion-option:focus-visible {
  outline: 0;
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(21, 89, 71, .15);
}

.field.has-error input, .field.has-error select, .field.has-error textarea {
  border-color: var(--error);
  background: #fffafa;
}

.hint, .field-error {
  min-height: 0;
  margin: 6px 1px 0;
  font-size: 12.5px;
  line-height: 1.4;
}

.hint { color: var(--ink-soft); }
.field-error { color: var(--error); font-weight: 650; }
.field-error:empty { display: none; }

input[type="file"] {
  min-height: 56px;
  padding: 7px;
  color: var(--ink-soft);
}

input[type="file"]::file-selector-button {
  min-height: 40px;
  margin-right: 10px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--forest-dark);
  background: var(--mist);
  font: inherit;
  font-weight: 720;
  cursor: pointer;
}

.image-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--mist);
}

.image-preview img {
  width: 76px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  background: #dfe8e2;
}

.image-preview strong,
.image-preview span { display: block; overflow-wrap: anywhere; }
.image-preview strong { color: var(--ink); font-size: 13px; }
.image-preview span { margin-top: 3px; color: var(--ink-soft); font-size: 12px; }
.image-preview .text-button { white-space: nowrap; }

.address-control { position: relative; }

.suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(20, 48, 41, .18);
}

.suggestion-option {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.suggestion-option:hover, .suggestion-option:focus { background: var(--mist); }

.additional-signers { margin-top: 25px; }

.additional-signer {
  padding: 22px;
  background: #f6f8f5;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.additional-signer + .additional-signer { margin-top: 14px; }
.additional-signer h3 { margin: 0 0 17px; font-size: 15px; }

.number-suffix { position: relative; }
.number-suffix input { padding-right: 64px; }
.number-suffix span {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--ink-soft);
  font-size: 13px;
  transform: translateY(-50%);
  pointer-events: none;
}

.notice, .status-banner, .error-summary {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
}

.notice {
  margin-top: 18px;
  color: var(--warning);
  background: var(--warning-soft);
  border: 1px solid #ead18a;
}

.status-banner {
  margin-bottom: 16px;
  color: var(--error);
  background: var(--error-soft);
  border: 1px solid #efc5c0;
  font-weight: 650;
}

.error-summary {
  margin: 24px 38px 0;
  color: #722020;
  background: var(--error-soft);
  border: 1px solid #efc5c0;
}

.error-summary h2 { margin-bottom: 5px; font-size: 16px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: inherit; font-weight: 700; }

.submit-area {
  padding: 28px 38px 36px;
  background: #f5f7f2;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}

.submit-area p {
  margin-bottom: 17px;
  color: var(--ink-soft);
  font-size: 13px;
}

.primary-button, .secondary-button {
  min-height: 52px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 780;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  background: var(--forest);
  border: 1px solid var(--forest);
  box-shadow: 0 9px 20px rgba(21, 89, 71, .18);
}

.primary-button:hover { background: var(--forest-dark); }
.primary-button:disabled { cursor: wait; opacity: .72; }

.button-spinner {
  width: 17px;
  height: 17px;
  display: none;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.primary-button.is-busy .button-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-card { padding: 46px 42px; text-align: center; }
.success-card h2 { margin-bottom: 10px; font-size: 34px; letter-spacing: -.04em; }
.success-card > p:not(.eyebrow) { max-width: 510px; margin: 0 auto 27px; color: var(--ink-soft); }

.success-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  color: var(--forest-dark);
  background: var(--leaf);
  border-radius: 50%;
}

.success-icon svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.reference-block {
  max-width: 420px;
  margin: 0 auto 24px;
  padding: 16px;
  background: var(--mist);
  border-radius: 11px;
}

.reference-block span { display: block; color: var(--ink-soft); font-size: 12px; }
.reference-block strong { display: block; margin: 3px 0; font-size: 20px; letter-spacing: .025em; }

.text-button {
  min-height: 44px;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.secondary-button {
  color: var(--forest);
  background: white;
  border: 1.5px solid var(--forest);
}

.secondary-button:hover { background: var(--mist); }

.site-footer {
  width: min(100% - 36px, 760px);
  margin: -35px auto 40px;
  color: var(--ink-soft);
  text-align: center;
  font-size: 12px;
}

[hidden] { display: none !important; }

@media (max-width: 620px) {
  .site-header { width: min(100% - 28px, 960px); min-height: 66px; }
  .brand-name { font-size: 16px; }
  .secure-label { font-size: 12px; }
  .page-shell { width: min(100% - 24px, 760px); margin-top: 30px; }
  .intro { padding: 0 6px; }
  h1 { font-size: 41px; }
  .form-section { padding: 28px 22px 31px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .select-refresh-row { grid-template-columns: 1fr; }
  .select-refresh-row .text-button { justify-self: start; }
  .section-heading { grid-template-columns: 30px 1fr; gap: 11px; }
  .section-number { width: 29px; height: 29px; }
  .error-summary { margin: 20px 22px 0; }
  .submit-area { padding: 25px 22px 29px; }
  .additional-signer { padding: 18px; }
  .image-preview { grid-template-columns: 68px minmax(0, 1fr); }
  .image-preview img { width: 68px; height: 54px; }
  .image-preview .text-button { grid-column: 1 / -1; justify-self: start; }
  .success-card { padding: 38px 24px; }
  .signin-shell { width: min(100% - 24px, 480px); margin-top: 34px; }
  .signin-card { padding: 30px 22px; }
}

@media (max-width: 390px) {
  .secure-label span { display: none; }
  .secure-label { display: none; }
  .intro-meta span[aria-hidden="true"] { display: none; }
  .intro-meta { flex-direction: column; gap: 2px; }
}

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

@media print {
  body { background: white; }
  .site-header, .site-footer, .submit-area { display: none; }
  .page-shell { width: 100%; margin: 0; }
  .form-card { box-shadow: none; }
}
