/* Shared foundations. System fonts keep every language fast and readable. */
:root {
  --ink: #152c48;
  --muted: #53677c;
  --blue: #145bd7;
  --blue-dark: #114bae;
  --cyan: #edf4ff;
  --line: #d7e2ee;
  --paper: #fff;
  --bg: #f5f8fc;
  --shadow: 0 12px 36px rgba(21,44,72,.055);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 2rem; }
body { margin: 0; min-width: 0; font-size: 1rem; line-height: 1.65; }
a { color: var(--blue-dark); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid #145bd7; outline-offset: 4px;
}
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2, h3 { text-wrap: balance; }
h1:focus, h2:focus { outline-offset: 5px; }
.skip-link { position: fixed; inset-inline-start: 1rem; top: -6rem; padding: .75rem 1rem; background: #fff; z-index: 100; border: 2px solid var(--blue); border-radius: .5rem; }
.skip-link:focus { top: 1rem; }
.topbar { display: flex; align-items: center; gap: 2rem; max-width: 1240px; min-height: 96px; padding: 1.25rem 2rem; margin: 0 auto; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand-logo { display: block; width: 48px; height: 48px; object-fit: contain; flex: 0 0 48px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.2; gap: .15rem; text-align: start; }
.brand-country { color: var(--blue-dark); font-size: .75rem; font-weight: 800; letter-spacing: .14em; }
.brand-title { font-size: 1.125rem; font-weight: 750; letter-spacing: -.025em; }
.header-nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: .25rem 1.5rem; margin-inline-start: auto; }
.header-nav a { padding: .6rem 0; min-height: 44px; display: inline-flex; align-items: center; font-size: .875rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.header-nav a:hover, .header-nav a[aria-current=page] { color: var(--blue-dark); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .5rem; }
.language-control { display: flex; align-items: center; gap: .6rem; font-size: .875rem; font-weight: 600; }
.language-control>span { display: none; }
.language-control select { min-height: 44px; max-width: 150px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .5rem .65rem; color: var(--ink); }
main { max-width: 1240px; margin: 0 auto; padding: 2.5rem 2rem 3.5rem; }
.intro { margin-bottom: 2rem; }
.intro>div { display: grid; grid-template-columns: minmax(0,1.13fr) minmax(0,1fr); gap: 0 3rem; align-items: end; }
.eyebrow { color: var(--blue-dark); font-size: .875rem; font-weight: 700; line-height: 1.5; margin: 0 0 .8rem; }
.intro .eyebrow { grid-column: 1/-1; }
.intro h1 { font-size: clamp(2.2rem,4.1vw,3.45rem); line-height: 1.13; letter-spacing: -.045em; font-weight: 750; max-width: 18ch; margin: 0; }
.lede { color: var(--muted); margin: 0 0 .15rem; font-size: 1.0625rem; line-height: 1.8; max-width: 53ch; }
.finder { background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 14px; padding: 1.5rem 1.75rem; margin-bottom: 2.25rem; }
.finder-head, .results-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.finder-head>div, .results-head>div { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.finder h2, .results h2, .how h2, .emergency h2 { font-size: 1.2rem; line-height: 1.4; letter-spacing: -.02em; margin: 0; font-weight: 700; }
.step { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #e4edfc; color: var(--blue-dark); font-size: .875rem; font-weight: 700; }
.text-button { border: none; border-radius: 6px; color: var(--blue-dark); background: transparent; padding: .5rem .25rem; min-height: 44px; font-size: .875rem; font-weight: 650; flex-shrink: 0; }
.text-button:hover { text-decoration: underline; }
.controls { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 1rem; margin: 1.15rem 0 1.25rem; }
.controls label { display: flex; flex-direction: column; gap: .45rem; min-width: 0; font-size: .875rem; font-weight: 650; }
.controls select, .controls input { width: 100%; min-width: 0; max-width: 100%; min-height: 54px; padding: .8rem .9rem; border: 1px solid #aebfd3; border-radius: 8px; background: #fff; color: var(--ink); font-size: 1rem; font-weight: 400; line-height: 1.5; }
.controls input::placeholder { color: #5f7082; opacity: 1; }
.finder-actions { display: flex; align-items: center; gap: 1.5rem; justify-content: space-between; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .8rem 1.5rem; border: 1px solid var(--blue); border-radius: 8px; background: var(--blue); color: #fff; font-size: 1rem; font-weight: 650; line-height: 1.5; text-decoration: none; }
.primary-button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.finder-actions>.primary-button { flex-shrink: 0; }
.trust-note { display: flex; gap: .7rem; align-items: center; max-width: 465px; }
.trust-note>div { display: flex; flex-direction: column; }
.trust-note strong { font-size: .875rem; font-weight: 650; }
.trust-note #trustText { font-size: .875rem; line-height: 1.55; color: var(--muted); }
.results-head { margin-bottom: .65rem; }
.results-head>div { align-items: flex-start; }
.results-head .step { margin-top: .15rem; }
.results-head p { color: var(--muted); font-size: .9375rem; margin: .25rem 0 0; }
.verified-badge { font-size: .875rem; color: #3b5676; border: 1px solid var(--line); padding: .4rem .75rem; border-radius: 7px; text-align: center; }
.small-note { font-size: .875rem; color: var(--muted); line-height: 1.7; }
#resultsNote { max-width: 900px; margin: 0 0 1.25rem; }
.results-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.1rem; }
.program-card { border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; background: #fff; display: flex; flex-direction: column; min-width: 0; transition: border-color .15s ease, box-shadow .15s ease; }
.program-card:hover { border-color: #94b3dc; box-shadow: var(--shadow); }
.card-top { display: flex; align-items: center; gap: .75rem; }
.program-type { font-size: .875rem; font-weight: 650; color: var(--blue-dark); }
.program-card h3 { font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.4; margin: 1rem 0 .45rem; }
.program-summary { color: var(--muted); font-size: 1rem; line-height: 1.7; margin: 0 0 1.2rem; flex: 1; }
.resource-scope { color: #3a536f; background: var(--bg); font-size: .875rem; font-weight: 600; line-height: 1.5; padding: .3rem .6rem; border-radius: 5px; width: fit-content; max-width: 100%; margin: 0 0 .5rem; }
.source-line { color: var(--muted); font-size: .875rem; margin: .25rem 0; }
.destination-domain { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; margin: 0 0 1rem; text-align: start; }
.card-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid #b9cee7; border-radius: 7px; padding: .6rem .9rem; background: #fff; color: var(--blue-dark); font-size: .9375rem; font-weight: 650; line-height: 1.5; text-decoration: none; cursor: pointer; }
.secondary-button:hover { background: var(--cyan); border-color: #87abd7; }
.official-link { display: inline-flex; align-items: center; color: var(--blue-dark); min-height: 44px; font-size: .9375rem; font-weight: 650; text-decoration: none; }
.official-link:hover { text-decoration: underline; }
.initial-state { display: flex; align-items: center; gap: 1rem; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 1.3rem 1.5rem; }
.initial-state p { margin: 0; }
.empty-state { text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 2rem 1.5rem; }
.empty-state div { font-size: 2rem; color: var(--blue); }
.empty-state h3 { font-size: 1.2rem; margin: .5rem 0; }
.empty-state p { color: var(--muted); }
.state-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1rem 1.5rem; align-items: center; border: 1px solid var(--line); border-inline-start: 4px solid var(--blue); border-radius: 10px; background: #f2f7ff; padding: 1.4rem 1.5rem; margin-bottom: 2rem; }
.state-panel h2 { font-size: 1.5rem; margin: 0; }
.state-panel .eyebrow { margin: 0 0 .2rem; }
#stateNote { color: var(--muted); max-width: 750px; margin: .4rem 0 0; font-size: 1rem; }
#directoryNote { grid-column: 1/-1; border-top: 1px solid var(--line); padding-top: .85rem; margin: 0; font-size: .875rem; }
.emergency { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 2rem 0; padding: 1.6rem 1.75rem; background: #152f50; color: #fff; border-radius: 12px; }
.emergency>div { display: flex; align-items: flex-start; gap: 1rem; }
.emergency p { color: #dce7f5; max-width: 780px; font-size: 1rem; margin: .3rem 0 0; }
.emergency a { flex-shrink: 0; color: #152f50; background: #fff; border: 1px solid #fff; border-radius: 7px; padding: .7rem 1.2rem; min-height: 46px; font-weight: 700; text-align: center; text-decoration: none; }
.emergency a:hover { background: #e8f0fc; }
.emergency a:focus-visible { outline-color: #fff; }
.how { padding: .5rem 0 1.5rem; }
.how h2 { font-size: 1.4rem; }
.how ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2rem; list-style: none; padding: 0; margin: 1.4rem 0 0; counter-reset: steps; }
.how li { counter-increment: steps; display: grid; grid-template-columns: 30px 1fr; align-content: start; gap: .25rem .75rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.how li::before { content: counter(steps); grid-row: 1/3; color: var(--blue); font-size: 1.125rem; font-weight: 750; }
.how li strong { font-size: 1rem; }
.how li span { color: var(--muted); font-size: 1rem; }
.translation-note { color: var(--muted); font-size: .875rem; padding-top: 1.2rem; margin: 1.5rem 0 0; border-top: 1px solid var(--line); line-height: 1.7; }
footer { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.5rem 4rem; border-top: 1px solid var(--line); padding: 2.3rem 2rem; color: var(--muted); font-size: .9375rem; }
footer p { margin: .6rem 0 0; }
.footer-brand .brand-logo { width: 42px; height: 42px; flex-basis: 42px; }
.footer-brand .brand-title { font-size: 1.0625rem; }
#disclaimer { align-self: center; max-width: 590px; }
#footerNav { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
#footerNav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
#footerNav a:hover { text-decoration: underline; }
