/* DELF Foundation – Funding page. */

.dl .hero--page { min-height: clamp(420px, 62vh, 560px); }
.dl .hero--page .hero__copy h1 { font-size: clamp(2.1rem, 4vw, 3.3rem); max-width: 14em; }

.dl .tiles { display: grid; grid-template-columns: 1fr; gap: 40px 48px; margin-top: 44px; }
@media (min-width: 768px) { .dl .tiles { grid-template-columns: repeat(3, 1fr); } }
.dl .tile { max-width: none; border-top: 1px solid var(--rule); padding-top: 24px; }
.dl .tile__icon { display: block; font-size: 28px; line-height: 1; color: var(--navy); margin-bottom: 14px; }
.dl .tile p { margin: 0; max-width: 40ch; }

/* Grant streams */
.dl .grants { display: grid; grid-template-columns: 1fr; gap: 40px 32px; margin: 48px 0 0; }
@media (min-width: 640px) { .dl .grants { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .dl .grants { grid-template-columns: repeat(4, 1fr); } }
.dl .grant { max-width: none; border-top: 4px solid var(--marigold); padding-top: 18px; display: flex; flex-direction: column; }
.dl .grant__name { font-family: var(--sans); font-weight: 700; font-size: 1.1rem; line-height: 1.3; color: #fff; margin: 0 0 6px; }
.dl .grant__amount { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 3vw, 2.4rem); line-height: 1.1; letter-spacing: -.01em; color: #fff; font-variant-numeric: lining-nums; margin: 0 0 14px; white-space: nowrap; }
.dl .grant__text { color: rgba(255,255,255,.84); margin: 0 0 16px; max-width: 34ch; flex: 1; }
.dl .grant__for { margin: 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); font-weight: 600; color: #fff; font-size: 15px; }
.dl .grant__for span { color: var(--marigold); font-weight: 700; margin-right: 6px; }
.dl .grants-note { margin: 44px 0 0; max-width: 70ch; font-size: 15px; color: rgba(255,255,255,.78); }

/* Eligibility and requirements */
.dl .req { border-top: 4px solid var(--navy); padding-top: 22px; height: 100%; }
.dl .req h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 1.9rem); line-height: 1.2; color: var(--navy); margin: 0 0 14px; }
.dl .checklist { list-style: none; margin: 0; padding: 0; }
.dl .checklist li { position: relative; padding: 14px 0 14px 30px; border-top: 1px solid var(--rule); }
.dl .checklist li:last-child { border-bottom: 1px solid var(--rule); }
.dl .checklist li::before { content: ""; position: absolute; left: 4px; top: 1.35em; width: 10px; height: 10px; background: var(--marigold); }

/* Who can apply */
.dl .who { display: grid; grid-template-columns: 1fr; gap: 44px 32px; margin-top: 44px; }
@media (min-width: 640px) { .dl .who { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .dl .who { grid-template-columns: repeat(3, 1fr); } }
.dl .who-card { max-width: none; }
.dl .who-card .photo { margin-bottom: 20px; }
.dl .who-card .photo img { aspect-ratio: 4 / 3; object-fit: cover; background: var(--white); }
.dl .who-card p { margin: 0; max-width: 42ch; }

/* What we fund */
.dl .priority { margin: 28px 0 0; padding-left: 20px; border-left: 6px solid var(--marigold); font-weight: 600; color: var(--navy); max-width: 46ch; }
.dl .sectors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--rule); }
@media (min-width: 576px) { .dl .sectors { grid-template-columns: repeat(2, 1fr); column-gap: 32px; } }
.dl .sectors li { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid var(--rule); font-weight: 600; color: var(--navy); }
.dl .sectors i { font-size: 20px; line-height: 1; flex-shrink: 0; }

/* Closing call to action */
.dl .cta__status { margin: 14px 0 0; min-height: 1.5em; font-weight: 600; font-size: 15px; }

/* Refined page rhythm and interactive details */
.dl .funding-page .h-display { text-wrap: balance; }
.dl .grants .grant {
    padding: 22px 20px 20px;
    border: 1px solid rgba(255,255,255,.16);
    border-top: 4px solid var(--marigold);
    border-radius: 4px;
    background: rgba(255,255,255,.035);
    transition: background-color .2s ease, transform .2s ease, border-color .2s ease;
}
.dl .grants .grant:hover {
    background: rgba(255,255,255,.075);
    border-top-color: #f1c477;
    transform: translateY(-3px);
}
.dl .grants .grant__text { max-width: none; }
.dl .who-card .photo img { display: block; width: 100%; }
.dl .who-card .item-title { margin-top: 0; }
.dl .faq .accordion-item { border-color: #e5eaf0; }
.dl .faq .accordion-button { font-weight: 650; line-height: 1.45; }
.dl .faq .accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(15,37,71,.12); }
.dl .faq .accordion-body { line-height: 1.75; color: #4d5b6d; }
.dl .notice { border-radius: 6px; }
.dl .cta--funding {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #fbfcfe !important;
    color: #0f2547 !important;
    border-top: 1px solid #e7ecf2;
    border-bottom: 1px solid #e7ecf2;
    padding-block: clamp(54px, 7vw, 88px);
}
.dl .cta--funding::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: min(46vw, 540px);
    aspect-ratio: 1;
    right: -8%;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15,37,71,.045), rgba(15,37,71,0) 68%);
    pointer-events: none;
}
.dl .cta--funding h2 {
    max-width: 19ch;
    margin: 0 0 16px;
    color: #0f2547 !important;
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.12;
    text-wrap: balance;
}
.dl .cta--funding > .container > p:not(.cta__status) {
    max-width: 62ch;
    margin: 0;
    color: #536174 !important;
    font-size: 1.05rem;
    line-height: 1.75;
}
.dl .cta--funding .cta__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}
.dl .cta--funding .btn-navy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 22px;
    border: 1px solid #0f2547;
    border-radius: 4px;
    background: #0f2547;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}
.dl .cta--funding .btn-navy:hover {
    background: #1b3a66;
    transform: translateY(-2px);
}
.dl .cta--funding .btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid #cbd4df;
    border-radius: 4px;
    background: #fff;
    color: #0f2547;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease;
}
.dl .cta--funding .btn-line:hover {
    border-color: #0f2547;
    background: #f3f6fa;
}
.dl .cta--funding .cta__status {
    color: #536174;
}
@media (max-width: 575.98px) {
    .dl .grants .grant { padding: 20px 16px 18px; }
    .dl .cta--funding { padding-block: 48px; }
    .dl .cta--funding .cta__actions { align-items: stretch; flex-direction: column; }
    .dl .cta--funding .cta__actions > * { width: 100%; }
    .dl .cta--funding::before { width: 85vw; right: -38%; }
}
@media (prefers-reduced-motion: reduce) {
    .dl .grants .grant,
    .dl .cta--funding .btn-navy,
    .dl .cta--funding .btn-line { transition: none; }
    .dl .grants .grant:hover,
    .dl .cta--funding .btn-navy:hover { transform: none; }
}

/* Keep the four grant cards the same width on desktop. */
@media (min-width: 1100px) {
    .dl .grants { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dl .grant__amount { font-size: clamp(1.65rem, 2.1vw, 1.95rem); }
}

/* Application options and quick grant enquiry */
.dl .funding-apply { background:#f5f7fa; border-top:1px solid #e5eaf0; border-bottom:1px solid #e5eaf0; }
.dl .funding-apply__intro { max-width:760px; margin:0 auto 42px; text-align:center; }
.dl .funding-eyebrow,.dl .application-option__eyebrow { display:inline-block; margin:0 0 12px; color:#8a6224; font-size:.76rem; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
.dl .funding-apply__intro .h-display { margin:0 0 16px; text-wrap:balance; }
.dl .funding-apply__intro .lede { max-width:68ch; margin-inline:auto; }
.dl .funding-apply__grid { display:grid; grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr); gap:26px; align-items:stretch; }
.dl .application-option { min-width:0; padding:clamp(24px,3vw,38px); border:1px solid #e1e7ef; border-radius:8px; background:#fff; box-shadow:0 12px 34px rgba(15,37,71,.055); }
.dl .application-option--form { display:flex; flex-direction:column; align-items:flex-start; }
.dl .application-option__icon { display:grid; place-items:center; width:48px; height:48px; margin-bottom:24px; border-radius:6px; background:#eef2f7; color:#0f2547; font-size:1.35rem; }
.dl .application-option h3 { margin:0 0 12px; color:#0f2547; font-family:var(--serif); font-size:clamp(1.45rem,2.2vw,1.9rem); line-height:1.2; text-wrap:balance; }
.dl .application-option>p:not(.application-option__eyebrow) { color:#536174; line-height:1.7; }
.dl .application-option .btn-navy,.dl .quick-grant-form .btn-navy { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:48px; padding:12px 18px; border:1px solid #0f2547; border-radius:4px; background:#0f2547; color:#fff; font-weight:750; text-align:center; text-decoration:none; transition:background-color .2s ease,transform .2s ease; }
.dl .application-option .btn-navy:hover,.dl .quick-grant-form .btn-navy:hover { background:#1b3a66; transform:translateY(-1px); }
.dl .application-option__note { margin:auto 0 0; padding-top:28px; font-size:.91rem; }
.dl .application-option a:not(.btn-navy) { color:#0f4a87; font-weight:700; text-underline-offset:3px; }
.dl .quick-grant-form { margin-top:10px; }
.dl .quick-grant-form__fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px 16px; }
.dl .quick-grant-form .form-field { min-width:0; }
.dl .quick-grant-form .form-field--full { grid-column:1/-1; }
.dl .quick-grant-form label:not(.quick-grant-form__consent) { display:block; margin-bottom:7px; color:#172a45; font-size:.9rem; font-weight:700; }
.dl .quick-grant-form label span[aria-hidden="true"] { color:#a46d19; }
.dl .quick-grant-form input:not([type="checkbox"]),.dl .quick-grant-form select,.dl .quick-grant-form textarea { display:block; width:100%; min-height:46px; padding:11px 12px; border:1px solid #cbd4df; border-radius:4px; background:#fff; color:#172a45; font:inherit; font-size:.94rem; }
.dl .quick-grant-form textarea { min-height:118px; resize:vertical; }
.dl .quick-grant-form input:focus,.dl .quick-grant-form select:focus,.dl .quick-grant-form textarea:focus { border-color:#0f4a87; outline:3px solid rgba(15,74,135,.12); outline-offset:1px; }
.dl .quick-grant-form small { display:block; margin-top:7px; color:#647287; font-size:.8rem; line-height:1.5; }
.dl .quick-grant-form__consent { display:flex; align-items:flex-start; gap:10px; margin:20px 0; color:#536174; font-size:.87rem; line-height:1.55; }
.dl .quick-grant-form__consent input { margin-top:4px; flex:0 0 auto; }
.dl .quick-grant-form__note,.dl .quick-grant-form__status { margin:12px 0 0; color:#647287; font-size:.82rem; line-height:1.55; }
.dl .quick-grant-form__status { color:#0f4a87; font-weight:650; }
@media(max-width:991.98px) { .dl .funding-apply__grid { grid-template-columns:1fr; } }
@media(max-width:575.98px) { .dl .funding-apply__intro { text-align:left; margin-bottom:28px; } .dl .quick-grant-form__fields { grid-template-columns:1fr; } .dl .quick-grant-form .form-field--full { grid-column:auto; } .dl .application-option .btn-navy,.dl .quick-grant-form .btn-navy { width:100%; } }
@media(prefers-reduced-motion:reduce) { .dl .application-option .btn-navy,.dl .quick-grant-form .btn-navy { transition:none; } .dl .application-option .btn-navy:hover,.dl .quick-grant-form .btn-navy:hover { transform:none; } }

/* Polish: application options section */
.dl .funding-apply__intro { margin: 0 0 42px; text-align: left; max-width: 760px; }          
.dl .funding-apply__intro .lede { margin-inline: 0; }
.dl .quick-grant-form .form-field { display: flex; flex-direction: column; justify-content: flex-end; }   
.dl .application-option__list-title { margin: 6px 0 4px; color: #0f2547; font-size: .95rem; font-weight: 700; }
.dl .application-option .checklist { width: 100%; margin: 0 0 26px; }
.dl .application-option .checklist li { padding: 11px 0 11px 28px; font-size: 15px; line-height: 1.55; color: #3a4a5f; }
.dl .application-option .checklist li::before { top: 1.1em; width: 9px; height: 9px; }
.dl .application-option--form .btn-navy { align-self: flex-start; }

/* Polish: clearer keyboard focus (the original ring was only 12% opaque) */
.dl .quick-grant-form input:focus-visible, .dl .quick-grant-form select:focus-visible, .dl .quick-grant-form textarea:focus-visible,
.dl .application-option .btn-navy:focus-visible, .dl .quick-grant-form .btn-navy:focus-visible, .dl .application-option a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.dl .quick-grant-form input:focus, .dl .quick-grant-form select:focus, .dl .quick-grant-form textarea:focus { outline: 0; border-color: #0f4a87; }
.dl .quick-grant-form input:focus-visible, .dl .quick-grant-form select:focus-visible, .dl .quick-grant-form textarea:focus-visible { outline: 3px solid var(--link); }

/* Polish: the message shown after "Prepare email" */
.dl .quick-grant-form__status:empty { display: none; }
.dl .quick-grant-form__status:not(:empty) { margin-top: 16px; padding: 12px 14px; border-left: 4px solid #0f4a87; border-radius: 3px; background: #eef4fb; color: #173a63; font-size: .9rem; line-height: 1.55; font-weight: 600; }

/* Balance and type polish */

/* 1. Intro paragraphs under section headings. */
.dl .band > .container > .row > [class*="col-lg-"]:only-child { flex: 0 0 auto; width: 100%; max-width: 100%; }   
.dl .band > .container > .lede,
.dl .band > .container > .row > [class*="col-lg-"]:only-child > .lede { max-width: 60rem; font-size: 1.15rem; text-wrap: pretty; }
.dl .funding-apply__intro { max-width: 60rem; }
.dl .funding-apply__intro .lede { max-width: none; text-wrap: pretty; }

/* 2. Grant cards: keep the divider above "For ..." on one line across all four cards (some labels wrap to two lines) */
@media (min-width: 1100px) { .dl .grant__for { min-height: 4rem; } }

/* 3. Small type: nothing below about 13px */
.dl .funding-eyebrow, .dl .application-option__eyebrow { font-size: .8rem; }
.dl .quick-grant-form small { font-size: .875rem; }
.dl .quick-grant-form__note, .dl .quick-grant-form__status { font-size: .875rem; }
.dl .quick-grant-form__consent { font-size: .9rem; }
.dl .application-option__note { font-size: .9rem; }

/* Alignment and typography corrections */

.dl section[aria-labelledby="intro-title"] .lede,                       
.dl #grants .lede,                                                    
.dl #grants .grants-note,                                               
.dl #eligibility > .container > .lede,                                
.dl section[aria-labelledby="who-title"] > .container > .lede,          
.dl .funding-apply__intro .lede,                                      
.dl .cta--funding > .container > p:not(.cta__status) {                  
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    text-wrap: wrap;
}

/* Centered headings (1, 2, 6, 7, 10) and the paragraph blocks beneath them, centered as blocks so the two sit on one axis */
.dl section[aria-labelledby="intro-title"] .h-display,
.dl #grants-title,
.dl section[aria-labelledby="who-title"] .h-display,
.dl .funding-apply__intro,
.dl .funding-apply__intro .h-display,
.dl .cta--funding h2 { text-align: center; }

.dl section[aria-labelledby="intro-title"] .lede,
.dl #grants .lede,
.dl section[aria-labelledby="who-title"] > .container > .lede,
.dl .funding-apply__intro .lede { margin-inline: auto; }
.dl .funding-apply__intro { margin-inline: auto; }
.dl #grants .grants-note { max-width: 60rem; margin-inline: auto; }
.dl .cta--funding h2 { margin-inline: auto; }
.dl .cta--funding > .container > p:not(.cta__status) { max-width: 48rem; margin-inline: auto; }

/* 10: the closing call to action keeps its buttons on the same centered axis as its heading */
.dl .cta--funding .cta__actions { justify-content: center; }
.dl .cta--funding .cta__status { text-align: center; }

/* 3: grant card descriptions only (titles, amounts and labels keep their size) */
.dl .grants .grant__text { font-size: .925rem; line-height: 1.65; }

/* 8: the four application steps, explanatory text only (step titles and numbers unchanged) */
.dl #how-to-apply .steps li p { font-size: .94rem; line-height: 1.65; }

/* 9: answers in the funding questions (section title and question headings unchanged) */
.dl #faq .accordion-body { font-size: .94rem; line-height: 1.7; }

/* Narrow phones: justified text over about 30 characters per line leaves uneven gaps, so use a clean left edge there */
@media (max-width: 479.98px) {
    .dl section[aria-labelledby="intro-title"] .lede,
    .dl #grants .lede,
    .dl #grants .grants-note,
    .dl #eligibility > .container > .lede,
    .dl section[aria-labelledby="who-title"] > .container > .lede,
    .dl .funding-apply__intro .lede,
    .dl .cta--funding > .container > p:not(.cta__status) { text-align: left; }
}