/* Rijalul Fajr brand: tokens from the "Idea 4" logo sheet + self-hosted OFL fonts.
   Contrast: navy on cream 12.9:1, muted on cream 5.8:1, navy on amber 6.7:1.
   Amber is NEVER text on a light background (1.9:1); use it for fills, accents and on navy. */

/* ---------- Fonts (self-hosted: no Google Fonts / CDN requests) ---------- */
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/outfit-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/outfit-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/noto-sans-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/noto-sans-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/noto-sans-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/noto-sans-bengali-400.woff2") format("woff2"); unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A8F1; }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/noto-sans-bengali-600.woff2") format("woff2"); unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A8F1; }
@font-face { font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/noto-sans-bengali-700.woff2") format("woff2"); unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A8F1; }
@font-face { font-family: "Noto Naskh Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/noto-naskh-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Noto Naskh Arabic"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/noto-naskh-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Noto Kufi Arabic"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/noto-kufi-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }

/* ---------- Tokens + Bootstrap 5.3 mapping ---------- */
:root {
    --rf-navy: #1E2A5C;
    --rf-navy-700: #172149;
    --rf-navy-900: #141C40;
    --rf-amber: #F4A62A;
    --rf-amber-600: #E0921A;
    --rf-dawn: #F6C77A;
    --rf-cream: #FBF8F2;
    --rf-white: #FFFFFF;
    --rf-line: #D9D4C7;
    --rf-ink: #1B1F2E;
    --rf-muted: #5C6178;
    --rf-success: #2E8B57;
    --rf-danger: #C0392B;
    --rf-radius: 1rem;
    --rf-font-body: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --rf-font-display: "Outfit", "Noto Sans", system-ui, sans-serif;

    --bs-body-bg: var(--rf-cream);
    --bs-body-color: var(--rf-ink);
    --bs-body-font-family: var(--rf-font-body);
    --bs-emphasis-color: var(--rf-ink);
    --bs-secondary-color: var(--rf-muted);
    --bs-border-color: var(--rf-line);
    --bs-border-radius: .75rem;
    --bs-primary: var(--rf-navy);
    --bs-primary-rgb: 30, 42, 92;
    --bs-warning: var(--rf-amber);
    --bs-warning-rgb: 244, 166, 42;
    --bs-success: var(--rf-success);
    --bs-success-rgb: 46, 139, 87;
    --bs-danger: var(--rf-danger);
    --bs-danger-rgb: 192, 57, 43;
    --bs-link-color: var(--rf-navy);
    --bs-link-color-rgb: 30, 42, 92;
    --bs-link-hover-color: var(--rf-navy-700);
    --bs-link-hover-color-rgb: 23, 33, 73;
    --bs-focus-ring-color: rgba(244, 166, 42, .45);
}
html[lang="bn"] { --rf-font-body: "Noto Sans Bengali", "Noto Sans", system-ui, sans-serif; --rf-font-display: "Outfit", "Noto Sans Bengali", system-ui, sans-serif; }
html[lang="ar"] { --rf-font-body: "Noto Naskh Arabic", "Noto Sans", system-ui, sans-serif; --rf-font-display: "Noto Kufi Arabic", "Outfit", system-ui, sans-serif; }
html[lang="ur"] { --rf-font-body: "Noto Nastaliq Urdu", "Noto Naskh Arabic", "Noto Sans", system-ui, sans-serif; --rf-font-display: "Noto Nastaliq Urdu", "Noto Kufi Arabic", system-ui, sans-serif; }
html[lang="ur"] body { line-height: 2; }
/* Turkish letters (latin-ext) and Urdu Nastaliq: the browser downloads them only when a page uses them. */
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/noto-sans-ext-400.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/noto-sans-ext-600.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/noto-sans-ext-700.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/outfit-ext-600.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/outfit-ext-700.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Nastaliq Urdu"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/noto-nastaliq-urdu-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Noto Nastaliq Urdu"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/noto-nastaliq-urdu-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }

/* ---------- Base type ---------- */
body { font-family: var(--rf-font-body); background: var(--rf-cream); color: var(--rf-ink); -webkit-font-smoothing: antialiased; }
html[lang="bn"] body { line-height: 1.7; }
html[lang="ar"] body { line-height: 1.8; }
h1, h2, h3, .rf-display { font-family: var(--rf-font-display); font-weight: 700; color: var(--rf-navy); }
html[lang="en"] :is(h1, h2, h3), html[lang="fr"] :is(h1, h2, h3) { letter-spacing: -.015em; }
a { color: var(--rf-navy); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--rf-amber); outline-offset: 2px; }
.text-secondary { color: var(--rf-muted) !important; }

/* ---------- Buttons ---------- */
.btn-primary {
    --bs-btn-bg: var(--rf-navy); --bs-btn-border-color: var(--rf-navy);
    --bs-btn-hover-bg: var(--rf-navy-700); --bs-btn-hover-border-color: var(--rf-navy-700);
    --bs-btn-active-bg: var(--rf-navy-900); --bs-btn-active-border-color: var(--rf-navy-900);
    --bs-btn-disabled-bg: var(--rf-navy); --bs-btn-disabled-border-color: var(--rf-navy);
    --bs-btn-focus-shadow-rgb: 244, 166, 42;
}
.btn-outline-primary {
    --bs-btn-color: var(--rf-navy); --bs-btn-border-color: var(--rf-navy);
    --bs-btn-hover-color: var(--rf-cream); --bs-btn-hover-bg: var(--rf-navy); --bs-btn-hover-border-color: var(--rf-navy);
    --bs-btn-active-color: var(--rf-cream); --bs-btn-active-bg: var(--rf-navy-700); --bs-btn-active-border-color: var(--rf-navy-700);
    --bs-btn-focus-shadow-rgb: 244, 166, 42;
}
.btn-accent { /* amber call-to-action, navy text (6.7:1) */
    --bs-btn-color: var(--rf-navy); --bs-btn-bg: var(--rf-amber); --bs-btn-border-color: var(--rf-amber);
    --bs-btn-hover-color: var(--rf-navy); --bs-btn-hover-bg: var(--rf-amber-600); --bs-btn-hover-border-color: var(--rf-amber-600);
    --bs-btn-active-color: var(--rf-navy); --bs-btn-active-bg: var(--rf-amber-600); --bs-btn-active-border-color: var(--rf-amber-600);
    --bs-btn-focus-shadow-rgb: 30, 42, 92;
    font-weight: 700;
}
.rf-btn-pill { border-radius: 999px; padding-inline: 1.2rem; font-weight: 600; }
.form-control:focus, .form-select:focus { border-color: var(--rf-amber); box-shadow: 0 0 0 .25rem rgba(244, 166, 42, .3); }
.form-check-input:checked { background-color: var(--rf-navy); border-color: var(--rf-navy); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--rf-navy); --bs-dropdown-link-active-color: var(--rf-cream); --bs-dropdown-border-color: var(--rf-line); }

/* ---------- Logo lockup (_BrandLogo) ---------- */
.rf-logo { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.rf-logo__badge { width: 3rem; height: 3rem; flex: none; }
.rf-logo__words { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.rf-logo__latin { font-family: "Outfit", sans-serif; font-weight: 700; font-size: 1.45rem; letter-spacing: -.02em; }
.rf-logo__arabic { font-family: "Noto Kufi Arabic", sans-serif; font-weight: 700; font-size: .98rem; margin-top: .3rem; }
.rf-logo--light .rf-logo__latin, .rf-logo--light .rf-logo__arabic { color: var(--rf-navy); }
.rf-logo--dark .rf-logo__latin { color: var(--rf-cream); }
.rf-logo--dark .rf-logo__arabic { color: var(--rf-amber); }
.rf-logo--v { flex-direction: column; gap: 1rem; text-align: center; }
.rf-logo--v .rf-logo__badge { width: 7rem; height: 7rem; }
.rf-logo--v .rf-logo__words { align-items: center; }
.rf-logo--v .rf-logo__latin { font-size: 2.2rem; }
.rf-logo--v .rf-logo__arabic { font-size: 1.5rem; margin-top: .55rem; }

/* ---------- Shared pieces ---------- */
.rf-skip { position: absolute; top: .5rem; inset-inline-start: .5rem; z-index: 1100; background: var(--rf-navy); color: var(--rf-cream); padding: .5rem 1rem; border-radius: .5rem; }
.rf-card { background: var(--rf-white); border: 1px solid var(--rf-line); border-radius: var(--rf-radius); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: 0 18px 40px -32px rgba(30, 42, 92, .45); }
.rf-lang .dropdown-toggle { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; border: 0; }
.rf-lang--dark .dropdown-toggle { color: var(--rf-cream); }
.rf-lang--dark .dropdown-toggle:hover, .rf-lang--dark .dropdown-toggle:focus-visible { color: var(--rf-dawn); }

/* ---------- Toasts (PP §12.8) ---------- */
.rf-toasts { position: fixed; top: 1rem; inset-inline-end: 1rem; z-index: 1090; display: grid; gap: .6rem; width: min(380px, calc(100vw - 2rem)); }
@media (max-width: 575.98px) { .rf-toasts { top: auto; bottom: calc(5rem + env(safe-area-inset-bottom)); inset-inline: 1rem; width: auto; } }
.rf-toast { display: flex; align-items: flex-start; gap: .65rem; padding: .8rem 1rem; background: var(--rf-white); color: var(--rf-ink); border: 1px solid var(--rf-line); border-inline-start: 5px solid var(--rf-navy); border-radius: .85rem; box-shadow: 0 16px 32px -20px rgba(30, 42, 92, .55); cursor: pointer; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
.rf-toast.is-in { opacity: 1; transform: none; }
.rf-toast .bi { font-size: 1.15rem; line-height: 1.4; color: var(--rf-navy); }
.rf-toast--success { border-inline-start-color: var(--rf-success); }
.rf-toast--success .bi { color: var(--rf-success); }
.rf-toast--error { border-inline-start-color: var(--rf-danger); }
.rf-toast--error .bi { color: var(--rf-danger); }
.rf-toast--warning { border-inline-start-color: var(--rf-amber); }
@media (prefers-reduced-motion: reduce) { .rf-toast { transition: none; } }
