:root{color-scheme:light;--navy:#102c3c;--deep:#0a2231;--gold:#dfbd7c;--teal:#116367;--text:#192f3b;--muted:#46606d;--line:#dae3e7;--paper:#fff;font-family:system-ui,"Segoe UI",Tahoma,sans-serif}
*{box-sizing:border-box}
body{margin:0;background:#eff4f5;color:var(--text);font-size:16px}
main{max-width:960px;margin:auto;padding:clamp(12px,3vw,30px)}
header{position:relative;isolation:isolate;overflow:hidden;border-radius:22px;padding:clamp(24px,6vw,54px);background:radial-gradient(ellipse at 95% 115%,#1d5761,transparent 58%),var(--deep);color:#f5f9fa;border:1px solid #294653;text-align:start}
header::after{content:"";position:absolute;z-index:-1;inset-inline-end:-120px;top:-210px;width:480px;height:480px;border:1px solid #dfbd7c35;border-radius:50%;box-shadow:0 0 0 35px #dfbd7c0a,0 0 0 70px #dfbd7c08;pointer-events:none}
h1{margin:0;color:var(--gold);font:600 clamp(27px,5vw,51px)/1.08 Georgia,serif;max-width:20ch}
header p{margin:15px 0 19px;color:#e5eff0}
h2{font-size:clamp(20px,3vw,25px);margin:0 0 16px;color:var(--navy)}
h3{color:var(--navy);margin:0 0 12px}
section{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:clamp(15px,3.4vw,30px);margin:16px 0;box-shadow:0 5px 18px #102c3c08}
section>h2{border-inline-start:4px solid #b58b45;padding-inline-start:12px}
p{line-height:1.65}
label{display:block;margin:12px 0 6px;font-weight:600}
input:not([type=checkbox]),select,textarea{width:100%;min-width:0;min-height:46px;padding:10px 12px;border:1px solid #a9bcc5;border-radius:9px;background:#fbfdfe;color:var(--text);font:inherit}
input:not([type=checkbox]):disabled,select:disabled{opacity:.85;background:#eaf0f3;color:var(--text)}
input[type=checkbox]{width:18px;height:18px;accent-color:var(--teal);margin-inline:0 8px;vertical-align:middle}
input[type=file]{padding:8px}
button{min-height:44px;padding:9px 16px;margin:5px 5px 5px 0;background:var(--teal);color:white;border:1px solid transparent;border-radius:9px;font:600 15px/1.5 system-ui,sans-serif;cursor:pointer}
button:hover{background:#0b5054}
button:disabled{opacity:.55;cursor:default}
button.secondary{background:#e8eff2;color:var(--navy);border-color:#c4d3d9}
button.secondary:hover{background:#dce8ed}
header button.secondary{margin-inline:0 5px;background:#fff0;color:#fff;border-color:#9bb2b9}
header button.secondary:hover{background:#ffffff23}
header button[aria-pressed=true]{background:var(--gold);border-color:var(--gold);color:var(--deep)}
:focus-visible{outline:3px solid #ad702f;outline-offset:3px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(215px,100%),1fr));gap:2px 16px}
.member,.sig{border:1px solid var(--line);background:#f5f9fa;border-radius:12px;padding:clamp(12px,2.5vw,19px);margin:14px 0}
.member>b{display:inline-block;margin-inline-end:8px}
.notice{border-inline-start:4px solid #ba9049;background:#fff4da;border-radius:10px;padding:12px 16px;color:#59461e}
.consent{border-bottom:1px solid var(--line);padding:14px 0}
.consent label{font-weight:600}
small,footer{color:var(--muted)}
footer{padding:20px;text-align:center}
fieldset{border:0;padding:0}
#receipt{color:#145944;font-weight:700;overflow-wrap:anywhere}
#receipt:not(:empty){padding:12px;margin:12px 0;border-radius:9px;background:#eaf6f0}
@media(max-width:520px){header{border-radius:16px}section{border-radius:13px}.grid{grid-template-columns:1fr}header button.secondary{padding-inline:12px}}
@media print{button,input[type=file]{display:none!important}body{background:white}section,.member,.sig{break-inside:avoid;box-shadow:none}header{background:white;border:0}header h1,header p{color:var(--navy)}main{max-width:none;padding:0}}

/* Application layout and selectable service cards */
:root{--navy:#182b2b;--deep:#112625;--gold:#e1c695;--teal:#285e51;--text:#203532;--muted:#4f625b;--line:#dce5db;--paper:#fffefa}
html{scroll-padding-top:82px}
body{background:#f3f4ed}
main{max-width:1080px}
header{border:0;background:radial-gradient(ellipse at 100% 0%,#345b4e,transparent 62%),var(--deep);border-radius:14px}
header h1{letter-spacing:.035em}
header p{font-size:1.1rem}
.notice{background:#f7efdc;border-color:#b58b45}
.form-navigation{position:sticky;top:0;z-index:4;display:flex;gap:7px;margin:16px 0;padding:9px;overflow:auto;background:#f9faf5;border:1px solid var(--line);border-radius:12px;box-shadow:0 4px 12px #20353212}
.form-navigation a{display:flex;align-items:center;flex:none;min-height:40px;padding:6px 12px;color:var(--navy);border-radius:7px;text-decoration:none;font-weight:650;font-size:.875rem}
.form-navigation a:hover,.form-navigation a:focus-visible{background:#e1ece4}
section{border-radius:13px;box-shadow:none}
section:target{border-color:#578775}
section>h2{padding:0 0 12px;border:0;border-bottom:1px solid var(--line);font-family:Georgia,"Segoe UI",serif}
html[dir=rtl] section>h2{font-family:Tahoma,"Segoe UI",sans-serif}
.service-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(155px,100%),1fr));gap:10px;margin:16px 0 20px}
.service-option{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-height:100px;margin:0;padding:14px;background:#f8faf5;border:1px solid #b7c8bb;border-radius:11px;cursor:pointer}
.service-option:hover{background:#edf4eb;border-color:#55836f}
.service-option input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.service-option:has(input:checked){background:#e4f0e6;border-color:#3d745f;box-shadow:inset 0 0 0 1px #3d745f}
.service-option:has(input:focus-visible){outline:3px solid #ad702f;outline-offset:2px}
.service-check{display:grid;place-items:center;width:22px;height:22px;border:1px solid #698a79;border-radius:5px;background:#fff;color:#fff}
.service-option input:checked+.service-check{background:#285e51}
.service-option input:checked+.service-check::before{content:"✓"}
.service-option:has(input:disabled){cursor:default}
select{background-color:#f8faf6;padding-inline:12px}
.member,.sig{background:#f3f7f0}
@media(max-width:520px){.service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.service-option{min-height:88px;padding:12px}.form-navigation{margin:12px 0;padding:6px}}
@media(max-width:330px){.service-grid{grid-template-columns:1fr}}
@media print{.form-navigation{display:none}}


/* One section at a time, with a compact progress indicator */
html{scroll-padding-top:12px}
main{max-width:740px;padding:clamp(12px,3vw,24px)}
header{padding:clamp(18px,4vw,28px);background:#152e2b}
header::after{display:none}
header h1{font-size:clamp(22px,4vw,32px);max-width:none;letter-spacing:0}
header p{font-size:.95rem;margin:7px 0 9px}
header button.secondary{min-height:36px;padding-block:5px}
.notice{font-size:.9rem;margin:12px 0;padding-block:8px}
.form-progress{padding:9px 2px 0;color:var(--muted);font-size:.875rem;font-weight:600}
.form-progress progress{display:block;width:100%;height:6px;margin-top:7px;appearance:none;border:0;border-radius:20px;background:#dfe7dc;accent-color:var(--teal)}
.form-progress progress::-webkit-progress-bar{background:#dfe7dc;border-radius:20px}
.form-progress progress::-webkit-progress-value{background:var(--teal);border-radius:20px}
.form-progress progress::-moz-progress-bar{background:var(--teal);border-radius:20px}
.form-controls{display:flex;justify-content:space-between;gap:12px}
.form-controls button{margin:0;min-width:100px}
.inactive-step{display:none}
section{margin:13px 0;padding:clamp(16px,3vw,23px)}
section>h2{border:0;padding:0;margin-bottom:12px}
.service-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 16px}
.service-option{flex-direction:row;align-items:center;gap:9px;min-height:48px;padding:10px;font-size:.9rem}
.service-check{flex:0 0 20px;width:20px;height:20px}
.member,.sig{background:transparent}
footer{font-size:.875rem}
@media(max-width:430px){.service-grid{grid-template-columns:1fr}.grid{gap:0}.form-controls button{flex:1}}
@media print{.inactive-step{display:block}.form-controls,.form-progress{display:none}}

/* Compact native choices and the applicant’s own income summary */
.question-options{min-width:0;margin:12px 0 8px}
.question-options legend{font-weight:600;line-height:1.4;padding:0}
.answer-options{display:flex;flex-wrap:wrap;gap:7px;margin-top:7px}
.answer-option{display:inline-flex;align-items:center;gap:7px;min-height:40px;margin:0;padding:6px 10px;border:1px solid #d4dfd8;border-radius:7px;background:#f7faf7;font-weight:500;font-size:.9rem;cursor:pointer}
.answer-option input[type=radio]{appearance:auto;width:16px;min-width:16px;height:16px;min-height:16px;padding:0;margin:0;accent-color:var(--teal)}
.answer-option:has(input:checked){background:#e4f0e6;border-color:#578775}
.income-summary{width:100%;border-spacing:0;margin-top:20px;border:1px solid var(--line);border-radius:9px;overflow:hidden;font-size:.9rem}
.income-summary caption{text-align:start;font-weight:650;padding-block:0 7px}
.income-summary th,.income-summary td{padding:11px;text-align:start}
.income-summary td{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap}
.income-summary tr:nth-child(odd){background:#eef4ef}

/* Keep each view short and quiet. */
body{background:#f5f6f2}
main{max-width:600px}
header{background:transparent;color:var(--navy);border-radius:0;padding:8px 0 12px;border-bottom:1px solid var(--line)}
header h1{color:var(--navy);font-size:clamp(20px,4vw,28px)}
header p{color:var(--muted);font-size:.85rem}
header button.secondary{color:var(--navy);border-color:var(--line);background:#fff;font-size:.83rem;min-height:34px}
header button.secondary:hover{background:#e8efe9}
header button[aria-pressed=true]{background:#e2eee5;border-color:#adc3b0;color:#233e34}
section>h2{font-size:clamp(19px,4vw,23px)}
#app>section>.grid{grid-template-columns:1fr}
#app>section .member .grid{grid-template-columns:repeat(auto-fit,minmax(min(165px,100%),1fr))}
.service-grid{grid-template-columns:1fr}
.service-option{min-height:40px;padding:7px 10px}
.notice{border-inline-start-width:2px;background:#f7f3e8}
footer{padding:12px 0}
@media print{header button{display:none}}

/* Compact option labels and system fonts for each language. */
:root{font-family:"Segoe UI",system-ui,sans-serif}
html[lang=ar]{font-family:"Segoe UI",Tahoma,Arial,sans-serif}
body{line-height:1.5}
header h1,section>h2,html[dir=rtl] section>h2{font-family:inherit;font-weight:650;letter-spacing:0}
header h1{font-size:clamp(19px,4vw,25px);line-height:1.3}
section>h2{font-size:clamp(18px,3.5vw,21px);line-height:1.4}
h3{font-size:1rem}
label,.question-options legend{font-size:.92rem;font-weight:550}
button{font-family:inherit}
.service-grid{gap:5px;margin:10px 0 13px}
.service-option{width:fit-content;max-width:100%;min-height:38px;gap:7px;padding:5px 10px;border-radius:7px;font-size:.85rem;line-height:1.4}
.service-option strong{font-weight:550;overflow-wrap:anywhere}
.service-check{flex-basis:16px;width:16px;height:16px;border-radius:4px;font-size:.7rem}
.answer-options{gap:5px;margin-top:6px}
.answer-option{min-height:36px;gap:5px;padding:4px 8px;font-size:.85rem;border-radius:6px}
.answer-option input[type=radio]{width:14px;min-width:14px;height:14px;min-height:14px}
@media(pointer:coarse){.answer-option,.service-option{min-height:44px}}
html[dir=rtl] .answer-option,html[dir=rtl] .service-option{font-size:.9rem;line-height:1.6}

/* Compact controls for state, application type, and requested start date. */
#section-0 > .grid:has(#state){
  grid-template-columns:minmax(0,1fr);
  gap:12px;
}
#section-0 > .grid:has(#state) label{
  margin:0 0 5px;
  font-size:.85rem;
  font-weight:600;
}
#section-0 :is(#state,#type,#effective){
  min-height:38px;
  padding:6px 9px;
  border-color:#bbc9c0;
  border-radius:6px;
  background:#f8faf7;
  font-size:.875rem;
}
#section-0 :is(#state,#type,#effective):focus{
  border-color:var(--teal);
  background:#fff;
}
@media(min-width:540px){
  #section-0 > .grid:has(#state){grid-template-columns:.8fr 1fr 1.15fr}
}
@media(pointer:coarse){
  #section-0 :is(#state,#type,#effective){min-height:44px;font-size:1rem}
}

/* Fit related fields on the same section without extra navigation. */
@media(min-width:540px){
  #app>section>.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 14px}
  #section-0 > .grid:has(#state){grid-template-columns:.8fr 1fr 1.15fr;gap:12px}
}

/* Square corners for the primary applicant section and its fields. */
#section-1,#section-1 :is(input,select,textarea){border-radius:0}

/* Ink and copper theme across the application and dashboard. */
:root{
  --navy:#182a45;--deep:#15233b;--teal:#284a74;
  --text:#24334b;--muted:#4c5b71;--line:#d7dfe9;--paper:#fff;
  --tint:#f2f6fb;--selected:#e6effa;--edge:#aabbd0;--copper:#9b5a2e;
}
body{background:#edf1f7}
main>header{background:var(--deep);padding:16px 20px;border-bottom:3px solid #bd8255}
header h1{color:#fff}
header p{color:#dae4f3}
header button.secondary{color:#fff;background:transparent;border-color:#63758e}
header button.secondary:hover{background:#253b59}
header button[aria-pressed=true]{color:#152944;border-color:#e5edf8;background:#e5edf8}
main :is(header,section,button,input,select,textarea,.notice,.member,.sig,.service-option,.service-check,.answer-option,.income-summary,#receipt){border-radius:0}
main #app canvas{border-radius:0!important}
input:not([type=checkbox]):not([type=radio]),select,textarea,#section-0 :is(#state,#type,#effective){background:#f8fafd;border-color:var(--edge);color:var(--text)}
#section-0 :is(#state,#type,#effective):focus{background:#fff;border-color:var(--teal)}
button:hover{background:#193558}
button.secondary{background:var(--tint);border-color:var(--line)}
button.secondary:hover{background:var(--selected)}
:focus-visible,.service-option:has(input:focus-visible){outline-color:var(--copper)}
.notice{background:#fff7ec;border-color:var(--copper);color:#663d24}
.member,.sig{background:var(--tint)}
.service-option,.answer-option{background:var(--tint);border-color:var(--line)}
.service-option:hover,.service-option:has(input:checked),.answer-option:has(input:checked){background:var(--selected);border-color:#6482a7}
.service-option:has(input:checked){box-shadow:inset 0 0 0 1px #6482a7}
.service-check{border-color:#728cab}
.service-option input:checked+.service-check{background:var(--teal)}
.income-summary tr:nth-child(odd){background:var(--tint)}
.form-progress progress,.form-progress progress::-webkit-progress-bar{background:#dbe4f0;border-radius:0}
.form-progress progress::-webkit-progress-value{border-radius:0}
.form-progress progress::-moz-progress-bar{border-radius:0}
@media print{main>header{background:#fff;border:0}header h1,header p{color:var(--navy)}}

#receipt[data-kind="error"]:not(:empty){background:#fff1ed;color:#782c20;border-inline-start:3px solid #a3432d}
#receipt[data-kind="success"]:not(:empty){border-inline-start:3px solid #2d7258}

.staff-answers{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(165px,100%),1fr));gap:12px;margin:0}
.staff-answers dt{color:var(--muted);font-size:.88rem}
.staff-answers dd{margin:0;overflow-wrap:anywhere}
.staff-signature{display:block;max-width:min(100%,350px);height:auto}
@media print{.staff-actions,#message,#login{display:none}}

.agency-logo{display:block;width:min(135px,46%);height:auto;margin-block-end:8px}
.income-reference{margin-top:16px;padding:12px;background:var(--tint);border:1px solid var(--line);font-size:.9rem}
.income-reference summary{cursor:pointer;font-weight:650}
.income-reference thead{background:#dbe4f0}
.income-reference th,.income-reference td{padding:7px;text-align:center;white-space:normal}
@media print{.agency-logo{width:102px}}

/* Brand header and form hierarchy */
:root{--navy:#15243a;--deep:#111c2c;--teal:#25476c;--edge:#aebccc;--line:#d5dce6;--tint:#f5f7fb;--selected:#e9eff8;--copper:#a16936}
body{background:#f2f4f7}
main{max-width:720px}
main>header{padding:22px clamp(16px,4vw,28px);border-bottom:2px solid #c39963;background:#111c2c}
header .agency-logo{width:min(182px,68%);height:auto;margin:0 0 10px}
header h1{font-size:clamp(18px,3vw,22px);line-height:1.4}
header p{color:#dbe4f0}
header button.secondary{min-height:36px;padding-inline:12px;border-color:#8396af}
header button[aria-pressed=true]{background:#e9d7b8;border-color:#e9d7b8;color:#181f2b}
#app>section{border-color:var(--line);padding:clamp(17px,4vw,27px)}
section>h2{margin-block-end:15px;font-size:clamp(19px,3.5vw,24px);font-weight:650}
.form-controls{margin-top:14px}
.form-controls .secondary:disabled{visibility:hidden}
.form-progress{padding-inline:0}
.service-option{border-color:#c2cdd9}
.notice{background:#fbf5ea}
@media print{main>header{background:white;border:0}header h1,header p{color:var(--navy)}}

#section-3 .income-reference{margin:0 0 18px}
.income-reference h3{margin:0 0 6px;font-size:1rem}
.income-reference p{margin:6px 0 10px}
.income-reference .income-summary{margin-top:8px}

#receipt[data-kind="error"]{white-space:pre-line}

#app [hidden]{display:none!important}

/* Consistent control heights, aligned labels, and equal-sized choices. */
#app{--control-size:44px}
#app .grid{grid-auto-rows:auto;align-items:stretch}
#app .grid>div{display:flex;flex-direction:column;justify-content:flex-end;min-width:0}
#app .grid>div>label{margin:10px 0 5px}
#app :is(input:not([type=checkbox],[type=radio]),select,textarea){
  height:var(--control-size);min-height:var(--control-size);max-height:var(--control-size);width:100%;min-width:0
}
#app #section-0 > .grid:has(#state){grid-template-columns:minmax(0,1fr)}
#app .service-grid{width:min(100%,440px);grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#app .service-option{width:100%;min-height:var(--control-size);margin:0;padding:5px 9px;align-self:stretch}
#app .question-options{margin:0;display:flex;flex-direction:column;justify-content:flex-end}
#app .question-options legend{margin-block-start:10px}
#app .answer-options{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px;margin-top:5px}
#app .answer-option{min-height:var(--control-size);justify-content:center;padding:3px;gap:4px;text-align:center;font-size:.8rem}
#app .answer-option span{overflow-wrap:anywhere}
@media(min-width:540px){
  #app #section-0 > .grid:has(#state){grid-template-columns:repeat(3,minmax(0,1fr))}
  #app .member .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:360px){#app .service-grid{grid-template-columns:minmax(0,1fr)}}

#app input::placeholder,#app textarea::placeholder{color:#647287;opacity:1}
#app select:has(option[value=""]:checked){color:#647287}


#section-2>h2+p{padding:10px 12px;border-inline-start:3px solid var(--teal);background:var(--tint);font-weight:600}

.secure-ssn{margin-top:10px}
#app .secure-ssn input:disabled{opacity:1;background:#eef1f5}

.ssn-parts{display:flex;align-items:center;gap:8px}
.ssn-parts span{font-variant-numeric:tabular-nums;color:var(--muted)}
#app .ssn-parts input{max-width:10rem}

#app #section-2 input[type=number][id$="_income"]{appearance:textfield}
#app #section-2 input[type=number][id$="_income"]::-webkit-inner-spin-button,
#app #section-2 input[type=number][id$="_income"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* Aligned household fields and full-surface answer targets. */
#app #section-2 .member .grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px 14px;
}
#app #section-2 .member .question-options:has(input[name$="_cover"]){grid-column:1/-1}
#app .answer-options{
  width:min(100%,390px);
  grid-auto-columns:minmax(0,1fr);
  gap:8px;
}
#app .answer-option{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  padding:6px 8px;
  min-height:44px;
  font-size:.875rem;
}
#app .answer-option input[type=radio]{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  margin:0;
  opacity:0;
  cursor:pointer;
}
#app .answer-option:has(input:checked){
  background:var(--teal);
  color:#fff;
  border-color:var(--teal);
}
#app .answer-option:has(input:focus-visible){
  outline:2px solid var(--copper);
  outline-offset:2px;
}
@media(max-width:355px){#app #section-2 .member .grid{grid-template-columns:minmax(0,1fr)}}

.fixed-service{display:inline-block;margin:3px 0 13px;padding:6px 10px;background:var(--tint);border-inline-start:3px solid var(--teal);font-weight:650}

#app #sig-intake{display:block;width:100%;height:140px;touch-action:none;background:white;border:1px solid var(--edge);margin-block:6px}

#application-attachments {margin-block:16px}
