:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #17231b;
  background: #f4f7f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --green: #2fb34b;
  --green-dark: #187b32;
  --green-soft: #e7f5ea;
  --ink: #07110b;
  --muted: #748078;
  --border: #d7ded9;
  --surface: #fff;
  --focus: #36b851;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  padding: 28px 16px 40px;
}

.site-header,
.page-content {
  width: min(100%, 720px);
  margin: 0 auto;
}

.site-header {
  padding: 28px 30px 24px;
  border-radius: 12px 12px 0 0;
  color: #fff;
  background: var(--ink);
  text-align: center;
}

.header-content {
  width: 100%;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 7px;
  font-size: clamp(1.65rem, 4vw, 2rem);
  letter-spacing: -0.035em;
}

.site-header p:last-child {
  margin-bottom: 0;
  color: #aab8af;
  font-size: 0.94rem;
  line-height: 1.5;
}

.page-content {
  padding: 28px 26px 26px;
  border-radius: 0 0 12px 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(20 39 27 / 9%);
}

.form-section {
  margin: 0;
  padding: 0 0 24px;
  border: 0;
  border-bottom: 1px solid #e8ede9;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.form-section + .form-section {
  padding-top: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.section-number {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  overflow: hidden;
  border-radius: 50%;
  color: transparent;
  background: var(--green);
  font-size: 0;
}

.section-heading h2 {
  margin: 0;
  color: #66736b;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.section-heading p {
  display: none;
}

.section-description {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 17px;
}

.customer-fields {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field label,
.subsection legend {
  font-size: 0.88rem;
  font-weight: 650;
}

.required {
  color: #dc5555;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cfd7d1;
  border-radius: 4px;
  color: inherit;
  background: #fff;
  font: inherit;
}

input::placeholder {
  color: #98a39b;
}

input:focus,
select:focus {
  border-color: var(--focus);
  outline: 3px solid rgb(47 179 75 / 14%);
}

input[readonly] {
  color: #526158;
  background: #f5f8f6;
}

input[type="file"] {
  padding: 6px;
}

input[type="file"]::file-selector-button {
  min-height: 28px;
  margin-right: 10px;
  padding: 4px 10px;
  border: 0;
  border-radius: 3px;
  color: #174e27;
  background: var(--green-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.field small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.subsection {
  min-width: 0;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid #e8ede9;
}

.subsection legend {
  padding: 0 8px 0 0;
  color: #66736b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.subsection legend::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 9px 1px 0;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.subsection > .field {
  max-width: 100%;
  margin-bottom: 16px;
}

.subsection .subsection {
  margin-top: 18px;
  padding-top: 16px;
}

.month-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.month-grid .field label {
  text-transform: capitalize;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkbox-card {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  line-height: 1.4;
  cursor: pointer;
}

.checkbox-card input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
  accent-color: var(--green);
}

.form-footer {
  display: grid;
  justify-items: stretch;
  gap: 14px;
  padding: 22px 0 0;
}

.privacy-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

button {
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid var(--green);
  border-radius: 4px;
  color: #07130a;
  background: var(--green);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

button:hover:not(:disabled) {
  border-color: var(--green-dark);
  background: #27a841;
}

button:focus-visible {
  outline: 3px solid rgb(47 179 75 / 28%);
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

#extract-invoice-button {
  align-self: flex-start;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px dashed #85ca93;
  color: #17652c;
  background: #f4fbf5;
  font-size: 0.86rem;
}

#extract-invoice-button:hover:not(:disabled) {
  background: var(--green-soft);
}

.form-status {
  justify-self: stretch;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.form-status:empty {
  display: none;
}

.form-status.success {
  color: #236b3b;
}

.form-status.error {
  color: #a12e24;
}

@media (max-width: 640px) {
  body {
    padding: 14px 10px 24px;
  }

  .site-header {
    padding: 24px 18px 20px;
  }

  .page-content {
    padding: 22px 18px 20px;
  }

  .customer-fields,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .month-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #extract-invoice-button {
    align-self: stretch;
  }
}
