:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #203730; background: #f1f5f3; line-height: 1.5; font-synthesis: none; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
header { background: #fff; border-bottom: 1px solid #dce5e0; }
.header-inner { max-width: 1080px; margin: auto; min-height: 80px; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand strong { font-size: 18px; font-weight: 650; letter-spacing: -.35px; }
main { max-width: 850px; padding: 40px 28px 64px; margin: auto; }
.page-intro { margin-bottom: 28px; }
.eyebrow { font-size: 11px; letter-spacing: 1.8px; font-weight: 700; color: #658273; margin: 0 0 10px; }
h1 { font-size: 34px; line-height: 1.2; letter-spacing: -.8px; font-weight: 700; margin: 0 0 12px; }
#description { color: #62756b; font-size: 15px; margin: 0; }
#form { padding: 28px 32px 0; border: 1px solid #dce5df; border-radius: 18px; background: #fff; box-shadow: 0 8px 32px #183b2b05; }
#fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.field.wide, .form-section { grid-column: 1 / -1; }
.field > label, .field > legend { font-size: 14px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.field-control { min-width: 0; display: grid; gap: 10px; }
.field-control > p { margin: 0; color: #62756b; overflow-wrap: anywhere; }
fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.form-section { display: flex; align-items: center; gap: 12px; padding: 26px 0 0; border-top: 1px solid #e5ece7; margin-top: 4px; }
.form-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.section-number { flex: 0 0 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: #edf5ef; color: #367452; font-size: 12px; font-weight: 700; }
.form-section h2 { margin: 0; font-size: 17px; line-height: 1.4; font-weight: 650; letter-spacing: -.2px; }
input:not([type="checkbox"]), select, textarea { display: block; width: 100%; min-width: 0; max-width: 100%; border: 1px solid #cbd8d0; border-radius: 8px; background: #fff; color: #243e32; font: inherit; font-size: 15px; line-height: 1.5; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
input:not([type="checkbox"]), select { height: 46px; padding-top: 10px; padding-bottom: 10px; }
select { padding-right: 28px; text-overflow: ellipsis; }
textarea { min-height: 90px; height: 90px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #91aa9a; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: #327c59; box-shadow: 0 0 0 3px #327c591a; }
input[type="file"] { padding: 7px; }
input[type="file"]::file-selector-button { border: 0; border-radius: 5px; padding: 7px 12px; margin-right: 12px; background: #eef4f0; color: #365b46; font: inherit; cursor: pointer; }
.field-checks > .field-control { grid-template-columns: minmax(0, 1fr); }
.choice { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 12px 14px; border: 1px solid #dce5df; border-radius: 8px; background: #fafcfb; font-size: 14px; line-height: 1.5; cursor: pointer; }
.choice:has(input:checked) { background: #edf7f0; border-color: #8ab79a; }
.choice:focus-within { outline: 2px solid #327c5950; outline-offset: 2px; }
.choice span { overflow-wrap: anywhere; }
input[type="checkbox"] { width: 17px; height: 17px; flex: 0 0 17px; margin: 2px 0 0; accent-color: #216b4a; }
.date-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 30px; padding: 22px 0; border-top: 1px solid #e5ece7; }
footer button { flex-shrink: 0; }
#save-status { margin: 0; font-size: 14px; color: #9b442b; }
.field-help, .selection-count { margin: 0; font-size: 13px; color: #61776a; white-space: pre-line; }
.selection-count { color: #327452; font-weight: 600; }
.required, .field-error { color: #b33535; }
.required-label::after { content: ' *'; color: #b33535; }
.field-error { margin: 0; font-size: 13px; }
.invalid > .field-control input:not([type=checkbox]), .invalid > .field-control select, .invalid > .field-control textarea, .invalid > .field-control > .option-branch > .choice { border-color: #c44747; background: #fffafa; }
.invalid > label, .invalid > legend { color: #a62e2e; }
.branch-children { display: grid; gap: 16px; }
.branch-children:has(> .field:not([hidden])) { margin: 12px 0 6px 10px; padding-left: 14px; border-left: 2px solid #c9dece; }
.cascade-field { gap: 8px; }
.branch-children .branch-children:has(> .field:not([hidden])) { margin-left: 4px; padding-left: 10px; }
.combobox { position: relative; }
.options { position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; right: 0; max-height: 250px; overflow-y: auto; padding: 5px; border: 1px solid #cbd8d0; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px #183b2b20; }
.options [role=option] { padding: 10px; border-radius: 5px; cursor: pointer; overflow-wrap: anywhere; }
.options [role=option]:hover, .options .highlight, .options [aria-selected=true] { background: #edf7f0; color: #18583b; }
#success { background: #fff; border: 1px solid #c9dece; border-radius: 18px; padding: 32px; }
#success:focus { outline: none; }
#success h2 { margin: 16px 0 8px; }
.success-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #e4f3e9; color: #226c4b; font-size: 28px; }
button { cursor: pointer; min-height: 48px; padding: 12px 26px; font: inherit; font-size: 15px; font-weight: 600; border: 0; border-radius: 8px; color: #fff; background: #226c4b; transition: background .15s; }
button:hover { background: #18583b; }
button:focus-visible { outline: 3px solid #80b29a; outline-offset: 3px; }
button:disabled { opacity: .55; cursor: wait; }
#status { color: #9b442b; background: #fff8f1; border: 1px solid #edddcf; border-radius: 10px; padding: 14px 18px; font-size: 14px; overflow-wrap: anywhere; margin: 0 0 20px; }
#status:empty { display: none; }
@media(max-width: 700px) {
  .header-inner { min-height: 68px; padding: 14px 20px; }
  .brand strong { font-size: 16px; }
  main { padding: 28px 16px 40px; }
  h1 { font-size: 28px; }
  #form { padding: 22px 20px 0; border-radius: 14px; }
  #fields { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .field-checks > .field-control { grid-template-columns: minmax(0, 1fr); }
  .field > label, .field > legend { font-size: 14px; }
  input:not([type="checkbox"]), select, textarea { font-size: 16px; }
  .form-section { padding-top: 22px; }
  footer button { width: 100%; }
  footer { flex-direction: column; align-items: stretch; }
  .date-range { gap: 10px; }
}

/* Start page for direct visits: the form is shown only after a MAX link/session. */
.landing-intro { max-width: 760px; }
.landing-lead { color: #526a5e; font-size: 16px; line-height: 1.65; margin: 0; }
.landing-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.landing-access { background: #fff; border: 1px solid #dce5df; border-radius: 18px; padding: 30px 32px; box-shadow: 0 8px 32px #183b2b05; }
.landing-access h2 { margin: 0 0 18px; font-size: 20px; line-height: 1.35; letter-spacing: -.3px; }
.landing-steps { margin: 0; padding-left: 24px; display: grid; gap: 12px; color: #29483a; font-size: 15px; line-height: 1.55; }
.landing-steps li { padding-left: 4px; }
.landing-steps li::marker { color: #327c59; font-weight: 700; }
.landing-note { margin: 22px 0 0; padding: 12px 14px; border-radius: 9px; background: #f4f8f5; color: #5c7265; font-size: 13px; line-height: 1.5; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 20px; border-radius: 8px; background: #226c4b; color: #fff; font-size: 15px; font-weight: 650; text-decoration: none; text-align: center; transition: background .15s; }
.button-link:hover { background: #18583b; }
.button-link:focus-visible { outline: 3px solid #80b29a; outline-offset: 3px; }
.button-link.secondary { background: transparent; border: 1px solid #b9d2c1; color: #226c4b; }
.button-link.secondary:hover { background: #edf5ef; }
.qr-card { margin: 0; padding: 18px; border: 1px solid #dce5df; border-radius: 18px; background: #fff; text-align: center; }
.qr-card img { display: block; width: 100%; max-width: 232px; height: auto; margin: 0 auto; }
.qr-card figcaption { margin-top: 10px; color: #60766a; font-size: 12px; line-height: 1.45; }
.qr-card figcaption strong { color: #29483a; font-weight: 650; overflow-wrap: anywhere; }
@media(max-width: 700px) {
  .landing-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .landing-access { padding: 24px 20px; }
  .landing-actions { flex-direction: column; align-items: stretch; }
  .button-link { width: 100%; }
  .qr-card { max-width: 300px; margin: 0 auto; padding: 14px; }
}
