@font-face {
  font-family: FormSans;
  src: url("/assets/NotoSans-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #182e38;
  --muted: #6b7c81;
  --green: #123e40;
  --teal: #21746e;
  --line: #dce5e3;
  --paper: #ffffff;
  --soft-green: #eef5f2;
  --error: #a73432;
  font-family: FormSans, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f6f7f3; font-size: 14px; line-height: 1.6; }
button, input { font: inherit; }
button, a, input, canvas, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--teal); }
button:focus-visible, a:focus-visible, summary:focus-visible, canvas:focus-visible { outline: 3px solid #78b8aa; outline-offset: 4px; }
[hidden] { display: none !important; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.shell { width: min(1220px, calc(100% - 64px)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.8); }
.header-content { height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ink); }
.brand-mark { position: relative; display: grid; place-items: center; width: 52px; height: 55px; border-radius: 12px; background: var(--green); color: white; font-size: 21px; font-weight: 700; letter-spacing: -.8px; }
.brand-mark span { position: absolute; right: -3px; top: -3px; width: 13px; height: 13px; border-radius: 50%; background: #dfbd71; border: 3px solid #fff; }
.brand-text { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.brand-text small { display: block; font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: 1px; }
.header-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #536b68; }
.header-note .icon { color: var(--teal); }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 48px 0 35px; }
.eyebrow { margin: 0 0 14px; font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--teal); }
h1 { font-size: clamp(30px, 3.5vw, 46px); line-height: 1.2; letter-spacing: -1.7px; margin: 0; font-weight: 700; }
h1 span { color: var(--teal); }
.hero-description { max-width: 620px; color: var(--muted); font-size: 14px; line-height: 1.85; margin: 19px 0; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; color: #536b68; font-size: 11px; }
.hero-tags span { display: flex; align-items: center; gap: 6px; }
.hero-tags .icon { width: 15px; height: 15px; color: var(--teal); }
.hero-tags .year-tag { border: 1px solid #d5dfd5; border-radius: 6px; padding: 3px 8px; }
.hero-badge { position: relative; flex-shrink: 0; width: 221px; height: 218px; border: 1px solid #d6e2d8; border-radius: 26px 26px 70px 26px; background: #eaf1e8; padding: 24px 28px; overflow: hidden; }
.hero-badge > span { font-size: 9px; color: var(--teal); font-weight: 700; letter-spacing: 2px; }
.hero-badge strong { display: block; font-size: 58px; line-height: 1.2; color: var(--green); letter-spacing: -3px; margin-top: 4px; }
.hero-badge strong small { font-size: 30px; letter-spacing: -1px; }
.hero-badge p { margin: 7px 0 0; color: #61766a; font-size: 12px; line-height: 1.6; }
.badge-flower { position: absolute; width: 70px; height: 70px; right: -10px; bottom: -6px; fill: none; stroke: #c6d8c3; stroke-width: 7; stroke-linecap: round; }
.steps { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; margin: 0 0 27px; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: #fff9; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #596f70; }
.steps li span { font-size: 10px; font-weight: 700; color: var(--teal); background: #edf4ef; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; }

.work-area { display: grid; grid-template-columns: minmax(0, 1fr) 362px; align-items: start; gap: 28px; }
.form-column { min-width: 0; }
.optional-note { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; line-height: 1.7; color: var(--muted); margin: 0 0 17px; }
.optional-note .icon { width: 15px; height: 15px; margin-top: 2px; color: var(--teal); }
.optional-note strong { color: #455e60; font-weight: 400; }
fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: 17px; padding: 26px; margin: 0 0 18px; }
.section-heading { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 25px; }
.section-number { display: grid; place-items: center; background: var(--soft-green); color: var(--teal); font-size: 13px; font-weight: 700; width: 33px; height: 33px; border-radius: 10px; flex-shrink: 0; }
h2 { font-size: 15px; letter-spacing: -.2px; line-height: 1.5; margin: 0; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.optional-tag, .required-tag { margin-left: auto; font-size: 9px; line-height: 1.4; padding: 4px 7px; border-radius: 5px; color: #74877b; background: #f3f6f2; white-space: nowrap; }
.required-tag { color: #8b6834; background: #faf3e5; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 19px 14px; }
.field { min-width: 0; }
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.field label, .email-section > label { display: block; font-size: 11px; font-weight: 700; color: #41575f; margin-bottom: 7px; }
input:not([type="checkbox"]) { display: block; width: 100%; min-width: 0; height: 43px; padding: 9px 11px; border: 1px solid #dce4e4; border-radius: 7px; background: #fbfcfc; color: var(--ink); font-size: 13px; transition: border-color .15s, box-shadow .15s; }
input:not([type="checkbox"]):focus { outline: 0; border-color: #4d998c; box-shadow: 0 0 0 3px #eaf3ef; background: white; }
input::placeholder { color: #9babab; }
input[aria-invalid="true"] { border-color: #c65d53; }
.field-hint { font-size: 9px; color: #83928e; line-height: 1.55; margin: 5px 0 0; }
.field-error { font-size: 10px; line-height: 1.55; margin: 5px 0 0; color: var(--error); }
.beneficiary-card { display: flex; align-items: flex-start; gap: 11px; background: #f3f7f3; border: 1px solid #e1eae0; border-radius: 10px; padding: 15px; margin-bottom: 17px; }
.beneficiary-icon { display: grid; place-items: center; width: 29px; height: 29px; background: #e2ede2; color: #56865b; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.beneficiary-icon .icon { width: 15px; height: 15px; }
.small-label { font-size: 8px; color: #82938a; font-weight: 700; letter-spacing: 1.2px; }
.beneficiary-card strong { display: block; color: #35564a; font-size: 12px; margin: 2px 0 4px; }
.beneficiary-card p { color: #809084; font-size: 10px; margin: 1px 0; }
.beneficiary-card .iban { word-break: break-all; font-family: "Consolas", monospace; font-size: 10px; }
.fixed-tag { margin-left: auto; font-size: 8px; color: #769174; white-space: nowrap; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; color: #5c7071; line-height: 1.65; font-size: 11px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--teal); width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; }
.allocation-fields { margin-top: 21px; }
.checkbox-options { display: grid; gap: 13px; border-top: 1px solid #e9eeea; padding-top: 19px; margin-top: 20px; }
.representative-card summary { display: flex; align-items: center; gap: 10px; list-style: none; }
.representative-card summary::-webkit-details-marker { display: none; }
.summary-description { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.chevron { width: 17px; height: 17px; color: #7d948b; transition: transform .2s; }
.representative-card[open] .chevron { transform: rotate(180deg); }
.representative-card .form-grid { margin-top: 23px; }
.signature-section { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 25px; }
.signature-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 9px; }
h3 { font-size: 12px; margin: 0; }
.text-button { border: 0; background: transparent; padding: 5px 0; color: #73877e; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--teal); }
.signature-pad { position: relative; border: 1px dashed #bbcfc6; border-radius: 10px; background: linear-gradient(transparent 74%, #eff2ec 74%, #eff2ec calc(74% + 1px), transparent calc(74% + 1px)), #fdfefd; overflow: hidden; }
.signature-pad.invalid { border-color: #c65d53; background-color: #fffafa; }
.signature-pad canvas { display: block; width: 100%; height: 152px; touch-action: none; }
.signature-placeholder { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; color: #9aaa9f; font-size: 12px; white-space: nowrap; pointer-events: none; }
.signature-placeholder .icon { width: 19px; height: 19px; }
.signature-bottom { display: flex; justify-content: space-between; gap: 10px; color: #98a49c; font-size: 9px; margin-top: 8px; }
.signature-bottom .signed { color: var(--teal); }
.signature-disclaimer { font-size: 9px; color: #94a099; line-height: 1.8; margin: 16px 0 0; max-width: 540px; }
.is-busy .signature-pad { pointer-events: none; opacity: .65; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 21px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 13px; border-radius: 8px; border: 1px solid transparent; font-size: 11px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.button .icon { width: 16px; height: 16px; }
.primary-button { color: white; background: var(--green); padding: 15px 19px; min-height: 50px; font-size: 12px; box-shadow: 0 5px 12px #123e4012; }
.primary-button:hover:not(:disabled) { background: #1c5654; }
.primary-button .icon:last-child { margin-left: 14px; }
.secondary-button { color: #466663; background: #fff; border-color: #d7e4de; }
.secondary-button:hover:not(:disabled) { background: #f3f8f5; }
.download-button { background: var(--teal); color: #fff; }
.download-button:hover { background: #195e59; }
.full-button { width: 100%; }
.submission-note { font-size: 9px; color: #8b9891; line-height: 1.8; margin: 14px 0 0; }

.document-column { position: sticky; top: 22px; min-width: 0; padding-top: 0; }
.document-card { border: 1px solid var(--line); border-radius: 17px; padding: 22px; background: white; box-shadow: 0 12px 40px #34513d06; }
.document-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 19px; }
.document-icon { color: var(--teal); display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; background: #edf4ef; }
.document-heading h2 { font-size: 14px; }
.document-heading p { margin: 1px 0 0; color: var(--muted); font-size: 10px; }
.pdf-tag { margin-left: auto; border-radius: 4px; background: #f8efea; color: #aa7968; font-size: 8px; font-weight: 700; padding: 3px 6px; }
.template-preview { display: block; text-decoration: none; border: 1px solid #e3e8e2; border-radius: 9px; padding: 13px 13px 8px; background: #f6f7f4; }
.template-thumb { display: block; width: 100%; height: auto; max-height: 320px; object-fit: contain; background: #fff; box-shadow: 0 2px 8px #172e380c; }
.template-preview > span { display: flex; justify-content: center; align-items: center; gap: 7px; font-size: 9px; color: #8b9990; margin-top: 9px; }
.template-preview > span .icon { width: 11px; height: 11px; }
.result-placeholder { border-top: 1px solid #edf0eb; padding-top: 17px; margin-top: 20px; }
.result-placeholder h3 { font-size: 12px; }
.result-placeholder p { font-size: 11px; color: #839189; line-height: 1.85; margin: 5px 0 0; }
.result { margin-top: 20px; border-top: 1px solid #edf0eb; padding-top: 18px; }
.result-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; color: var(--teal); }
.result-heading > .icon { border-radius: 50%; background: #edf5ee; width: 27px; height: 27px; padding: 5px; }
.result-heading p { font-size: 9px; margin: 1px 0 0; color: #8d9a91; }
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 9px; }
.actions-grid .button { padding-inline: 9px; font-size: 10px; gap: 6px; }
.action-hint { font-size: 9px; color: #88988e; line-height: 1.85; margin: 7px 0 0; }
.action-hint strong { color: #6a7e72; font-weight: 700; }
.email-section { border-top: 1px solid #e7ede7; margin-top: 17px; padding-top: 15px; }
.email-section .full-button { margin-top: 10px; }
.privacy-note { display: flex; align-items: flex-start; gap: 10px; margin: 18px 7px 0; color: #87a08d; }
.privacy-note > .icon { width: 18px; height: 18px; margin-top: 2px; }
.privacy-note strong { color: #6b856f; font-size: 11px; font-weight: 700; }
.privacy-note p { font-size: 10px; line-height: 1.85; margin: 4px 0 0; color: #8b9c90; }
.notice { margin: 0 0 20px; padding: 14px 17px; background: #ebf4ed; border: 1px solid #ccdfcf; border-radius: 10px; color: #3d6c50; font-size: 12px; }
.notice.error { color: var(--error); background: #fff3ef; border-color: #ebcbc4; }
.notice ul { margin: 8px 0 0; padding-left: 20px; }
.notice a { color: inherit; text-underline-offset: 3px; }
#retry-button { margin-top: 18px; }
.site-footer { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); margin-top: 44px; padding-block: 21px 26px; font-size: 9px; color: #95a194; }

.pdf-dialog { width: min(1100px, calc(100% - 32px)); height: min(92dvh, 1000px); padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: white; }
.pdf-dialog[open] { display: flex; flex-direction: column; }
.pdf-dialog::backdrop { background: #102d35b3; backdrop-filter: blur(3px); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.dialog-header p { color: var(--muted); font-size: 11px; margin: 3px 0 0; }
.pdf-dialog iframe { width: 100%; flex: 1; min-height: 0; border: 0; background: #e9ece9; }
.dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dialog-footer p { font-size: 10px; color: var(--muted); margin: 0 auto 0 0; }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 40px); }
  .work-area { grid-template-columns: minmax(0, 1fr) 315px; gap: 20px; }
  .form-card { padding: 21px; }
  .document-card { padding: 17px; }
  .hero-badge { width: 190px; height: 202px; padding: 22px; }
  .hero-badge strong { font-size: 52px; }
  .section-heading { gap: 9px; }
}

@media (max-width: 820px) {
  .work-area { grid-template-columns: minmax(0, 1fr); }
  .document-column { position: static; }
  .document-card { padding: 23px; }
  .template-thumb { max-height: 350px; }
  .header-note { font-size: 10px; }
  .hero { gap: 25px; padding-top: 35px; }
  .hero-description { max-width: 480px; }
  .hero-badge { width: 160px; height: 187px; padding: 19px; border-bottom-right-radius: 55px; }
  .hero-badge strong { font-size: 44px; }
  .hero-badge p { font-size: 10px; }
  .hero-tags { gap: 12px; font-size: 10px; }
  .form-card { padding: 25px; }
  .document-column { display: grid; grid-template-columns: minmax(0, 1fr); }
  .actions-grid .button { font-size: 12px; }
}

@media (max-width: 540px) {
  .shell { width: calc(100% - 32px); }
  .header-content { height: 76px; }
  .brand-mark { width: 43px; height: 46px; font-size: 18px; }
  .brand-text { font-size: 15px; }
  .brand-text small { font-size: 9px; }
  .header-note { display: none; }
  .hero { padding: 29px 0 26px; }
  h1 { font-size: 31px; letter-spacing: -1.2px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.6px; }
  .hero-description { font-size: 12px; margin: 14px 0; }
  .hero-badge { display: none; }
  .hero-tags { gap: 12px; font-size: 9px; }
  .steps { padding: 12px; gap: 8px; margin-bottom: 20px; }
  .steps li { flex: 1; align-items: flex-start; gap: 6px; font-size: 9px; line-height: 1.55; }
  .steps li span { width: 21px; height: 21px; font-size: 8px; flex-shrink: 0; }
  .optional-note { font-size: 10px; margin-bottom: 14px; }
  .form-card { padding: 19px 16px; border-radius: 13px; margin-bottom: 15px; }
  .section-heading { margin-bottom: 21px; }
  .section-number { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
  h2 { font-size: 13px; }
  .section-heading p { font-size: 9px; }
  .optional-tag, .required-tag { font-size: 7px; padding: 3px 5px; }
  .form-grid { gap: 16px 10px; }
  .field label { font-size: 10px; }
  input:not([type="checkbox"]) { height: 44px; padding-inline: 9px; font-size: 16px; }
  .field-hint, .field-error { font-size: 9px; }
  .beneficiary-card { padding: 12px 10px; gap: 8px; }
  .beneficiary-card strong { font-size: 11px; }
  .fixed-tag { display: none; }
  .checkbox-row { font-size: 10px; }
  .summary-description { font-size: 9px; max-width: 225px; }
  .representative-card summary { gap: 7px; }
  .signature-pad canvas { height: 145px; }
  .signature-bottom { font-size: 8px; }
  .signature-placeholder { font-size: 11px; }
  .submit-row { align-items: stretch; flex-direction: column; gap: 10px; }
  .primary-button { justify-content: center; }
  .submit-row .text-button { align-self: center; }
  .submission-note { text-align: center; }
  .document-card { padding: 20px; }
  .actions-grid .button { font-size: 10px; }
  .site-footer { font-size: 8px; flex-direction: column; gap: 3px; margin-top: 32px; }
  .dialog-header { padding: 13px; gap: 10px; }
  .dialog-header p { font-size: 9px; }
  .dialog-footer { padding: 12px; }
  .dialog-footer p { width: 100%; }
}

@media (max-width: 360px) {
  .actions-grid { grid-template-columns: 1fr; }
  .section-heading .optional-tag, .section-heading .required-tag { display: none; }
  .signature-bottom { flex-direction: column; gap: 1px; }
  h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
