/* =====================================================================
   FMS Delhi – Online Admission Portal
   Theme follows www.fms.edu: maroon #98002E, ink #1D1A17, warm surface,
   Crimson Pro (headings) + Inter (body). Built on Bootstrap 5.3.
   ===================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
    --fms-maroon: #98002E;
    --fms-maroon-dark: #74001F;
    --fms-maroon-tint: #F7E8EC;
    --fms-ink: #1D1A17;
    --fms-ink-soft: #2C2824;
    --fms-surface: #F8F4F1;
    --fms-surface-2: #F1EBE6;
    --fms-stroke: #EDE9E6;
    --fms-stroke-strong: #DCD4CE;
    --fms-muted: #475467;
    --fms-navy: #1B2F6E;
    --fms-success: #1F7A4D;
    --fms-success-tint: #E8F4EE;
    --fms-warning: #9A6200;
    --fms-warning-tint: #FDF4E3;
    --fms-danger: #B42318;
    --fms-danger-tint: #FDECEA;
    --fms-radius: 10px;
    --fms-shadow: 0 1px 2px rgba(29, 26, 23, .05), 0 4px 16px rgba(29, 26, 23, .04);
    --font-heading: "Crimson Pro", Georgia, "Times New Roman", serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    /* Bootstrap overrides */
    --bs-primary: var(--fms-maroon);
    --bs-primary-rgb: 152, 0, 46;
    --bs-link-color: var(--fms-maroon);
    --bs-link-color-rgb: 152, 0, 46;
    --bs-link-hover-color: var(--fms-maroon-dark);
    --bs-link-hover-color-rgb: 116, 0, 31;
    --bs-body-font-family: var(--font-body);
    --bs-body-font-size: .9375rem;
    --bs-body-color: var(--fms-ink);
    --bs-body-bg: var(--fms-surface);
    --bs-border-color: var(--fms-stroke);
    --bs-secondary-color: var(--fms-muted);
    --bs-focus-ring-color: rgba(152, 0, 46, .2);
}

html { scroll-behavior: smooth; }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--fms-surface); -webkit-font-smoothing: antialiased; }
main { flex: 1 0 auto; }
h1, h2, h3, h4, .serif { font-family: var(--font-heading); font-weight: 600; color: var(--fms-ink); letter-spacing: .1px; }
h1 { font-size: clamp(1.75rem, 2.6vw, 2.35rem); }
h2 { font-size: clamp(1.45rem, 2vw, 1.8rem); }
h3 { font-size: 1.35rem; }
.text-muted, .text-secondary { color: var(--fms-muted) !important; }
.text-maroon { color: var(--fms-maroon) !important; }
.bg-maroon { background: var(--fms-maroon) !important; color: #fff; }
.small-caps { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 600; }
a { text-underline-offset: 2px; }
::selection { background: var(--fms-maroon-tint); }

/* ---------- 2. Buttons & form controls ---------- */
.btn { font-weight: 500; border-radius: 6px; padding: .55rem 1.1rem; }
.btn-sm { padding: .35rem .75rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-primary {
    --bs-btn-bg: var(--fms-maroon); --bs-btn-border-color: var(--fms-maroon);
    --bs-btn-hover-bg: var(--fms-maroon-dark); --bs-btn-hover-border-color: var(--fms-maroon-dark);
    --bs-btn-active-bg: #5E0019; --bs-btn-active-border-color: #5E0019;
    --bs-btn-disabled-bg: #B86A80; --bs-btn-disabled-border-color: #B86A80;
    --bs-btn-focus-shadow-rgb: 152, 0, 46;
}
.btn-outline-primary {
    --bs-btn-color: var(--fms-maroon); --bs-btn-border-color: var(--fms-maroon);
    --bs-btn-hover-bg: var(--fms-maroon); --bs-btn-hover-border-color: var(--fms-maroon); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--fms-maroon-dark); --bs-btn-active-border-color: var(--fms-maroon-dark);
    --bs-btn-focus-shadow-rgb: 152, 0, 46;
}
.btn-ink { --bs-btn-bg: var(--fms-ink); --bs-btn-color: #fff; --bs-btn-border-color: var(--fms-ink); --bs-btn-hover-bg: #000; --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #000; }
.btn-light-outline { color: #fff; border: 1px solid rgba(255, 255, 255, .55); }
.btn-light-outline:hover { background: #fff; color: var(--fms-maroon); }

.form-label { font-weight: 500; font-size: .875rem; margin-bottom: .35rem; color: var(--fms-ink-soft); }
.form-control, .form-select { border-color: var(--fms-stroke-strong); border-radius: 6px; padding: .55rem .8rem; font-size: .9375rem; background-color: #fff; }
.form-control:focus, .form-select:focus { border-color: #C46B85; box-shadow: 0 0 0 .2rem rgba(152, 0, 46, .12); }
.form-control[readonly], .form-control:disabled, .form-select:disabled { background: var(--fms-surface); color: var(--fms-muted); }
.form-check-input:checked { background-color: var(--fms-maroon); border-color: var(--fms-maroon); }
.form-check-input:focus { border-color: #C46B85; box-shadow: 0 0 0 .2rem rgba(152, 0, 46, .12); }
.form-text { color: var(--fms-muted); font-size: .8rem; }
.req { color: var(--fms-maroon); font-weight: 600; margin-left: 2px; }
.input-validation-error { border-color: var(--fms-danger) !important; }
.field-validation-error { color: var(--fms-danger); font-size: .8rem; display: block; margin-top: .25rem; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.validation-summary-valid { display: none; }
.input-group-text { background: var(--fms-surface); border-color: var(--fms-stroke-strong); color: var(--fms-muted); }

/* Radio / option tiles */
.option-tiles { display: flex; flex-wrap: wrap; gap: .5rem; }
.option-tile { position: relative; }
.option-tile input { position: absolute; opacity: 0; pointer-events: none; }
.option-tile label { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border: 1px solid var(--fms-stroke-strong); border-radius: 6px; background: #fff; cursor: pointer; font-size: .9rem; transition: all .15s; }
.option-tile input:checked + label { border-color: var(--fms-maroon); background: var(--fms-maroon-tint); color: var(--fms-maroon); font-weight: 600; }
.option-tile input:focus-visible + label { box-shadow: 0 0 0 .2rem rgba(152, 0, 46, .2); }

/* ---------- 3. Header ---------- */
.topbar { background: var(--fms-ink); color: #D7D1CB; font-size: .78rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 34px; }
.topbar a { color: #D7D1CB; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar .sep { opacity: .35; margin: 0 .6rem; }

.masthead { background: #fff; border-bottom: 1px solid var(--fms-stroke); }
.masthead .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 84px; padding-top: .6rem; padding-bottom: .6rem; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--fms-ink); min-width: 0; }
.brand img { height: 52px; width: auto; flex-shrink: 0; }
.brand-divider { width: 1px; align-self: stretch; background: var(--fms-stroke-strong); margin: .35rem 0; }
.brand-text { line-height: 1.15; min-width: 0; }
.brand-title { font-family: var(--font-heading); font-size: 1.45rem; font-weight: 600; color: var(--fms-ink); }
.brand-sub { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--fms-muted); margin-top: .2rem; }
.masthead-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

.mainnav { background: var(--fms-maroon); }
.mainnav .container { display: flex; align-items: center; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.mainnav .container::-webkit-scrollbar { display: none; }
.mainnav a { color: #fff; text-decoration: none; font-size: .86rem; font-weight: 500; padding: .7rem .9rem; white-space: nowrap; opacity: .92; border-bottom: 3px solid transparent; }
.mainnav a:hover, .mainnav a.active { opacity: 1; border-bottom-color: #fff; background: rgba(255, 255, 255, .06); }
.mainnav .nav-right { margin-left: auto; }

.user-chip { display: flex; align-items: center; gap: .65rem; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--fms-maroon-tint); color: var(--fms-maroon); display: grid; place-items: center; font-weight: 700; font-family: var(--font-heading); font-size: 1.15rem; overflow: hidden; flex-shrink: 0; border: 1px solid var(--fms-stroke); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar.is-admin { background: var(--fms-ink); color: #fff; border-color: var(--fms-ink); }
.admin-badge { display: inline-flex; align-items: center; gap: .35rem; background: var(--fms-ink); color: #F4C9D5; font-size: .7rem; font-weight: 700; letter-spacing: .1em; padding: .3rem .6rem; border-radius: 4px; }
.impersonation-bar { background: var(--fms-ink); color: #E9E4DF; font-size: .85rem; border-bottom: 3px solid #F4C9D5; }
.impersonation-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .55rem; padding-bottom: .55rem; flex-wrap: wrap; }
.user-name { font-weight: 600; font-size: .88rem; line-height: 1.2; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta { font-size: .75rem; color: var(--fms-muted); }

/* ---------- 4. Page band (title area) ---------- */
.page-band { background: #fff; border-bottom: 1px solid var(--fms-stroke); padding: 1.4rem 0 1.2rem; }
.page-band h1 { margin: 0; }
.page-band .lead-sm { color: var(--fms-muted); margin: .35rem 0 0; font-size: .92rem; }
.breadcrumb { font-size: .8rem; margin-bottom: .4rem; --bs-breadcrumb-divider-color: var(--fms-muted); }
.breadcrumb a { color: var(--fms-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--fms-maroon); }

/* ---------- 5. Cards & sections ---------- */
.card-fms { background: #fff; border: 1px solid var(--fms-stroke); border-radius: var(--fms-radius); box-shadow: var(--fms-shadow); }
.card-fms + .card-fms { margin-top: 1.25rem; }
.card-fms-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--fms-stroke); }
.card-fms-header h2, .card-fms-header h3 { margin: 0; font-size: 1.3rem; }
.card-fms-header .icon { width: 34px; height: 34px; border-radius: 8px; background: var(--fms-maroon-tint); color: var(--fms-maroon); display: grid; place-items: center; flex-shrink: 0; }
.card-fms-body { padding: 1.25rem; }
.card-fms-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--fms-stroke); background: #FCFAF8; border-radius: 0 0 var(--fms-radius) var(--fms-radius); }

.section-title { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 2px dotted rgba(152, 0, 46, .35); }
.section-eyebrow { color: var(--fms-maroon); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 600; }
.form-section { padding: 1.25rem; border: 1px solid var(--fms-stroke); border-radius: 8px; background: #fff; }
.form-section + .form-section { margin-top: 1rem; }
.form-section-title { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .95rem; margin-bottom: 1rem; color: var(--fms-ink); }
.form-section-title .badge { font-weight: 500; }
.subtle-panel { background: var(--fms-surface); border: 1px dashed var(--fms-stroke-strong); border-radius: 8px; padding: 1rem; }

/* Read-only key/value grid */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem 1.5rem; margin: 0; }
.kv > div { min-width: 0; }
.kv dt { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fms-muted); margin-bottom: .15rem; }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.kv .wide { grid-column: 1 / -1; }
.locked-note { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--fms-muted); background: var(--fms-surface); border: 1px solid var(--fms-stroke); border-radius: 20px; padding: .2rem .65rem; }

/* Tables */
.table-fms { --bs-table-bg: #fff; margin: 0; font-size: .9rem; }
.table-fms thead th { background: var(--fms-surface); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fms-muted); font-weight: 600; border-bottom: 1px solid var(--fms-stroke-strong); white-space: nowrap; }
.table-fms td, .table-fms th { padding: .7rem .85rem; vertical-align: middle; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .65rem; border-radius: 20px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pill-success { background: var(--fms-success-tint); color: var(--fms-success); }
.pill-warning { background: var(--fms-warning-tint); color: var(--fms-warning); }
.pill-danger { background: var(--fms-danger-tint); color: var(--fms-danger); }
.pill-muted { background: var(--fms-surface-2); color: var(--fms-muted); }
.pill-maroon { background: var(--fms-maroon-tint); color: var(--fms-maroon); }

/* Alerts */
.alert { border-radius: 8px; font-size: .9rem; border-width: 1px; }
.alert-fms { background: var(--fms-maroon-tint); border-color: #E9C4CF; color: var(--fms-maroon-dark); }

/* ---------- 6. Home / landing ---------- */
.hero { position: relative; background: linear-gradient(120deg, var(--fms-ink) 0%, #3A1220 55%, var(--fms-maroon) 100%); color: #fff; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 18px 18px; pointer-events: none; }
.hero .container { position: relative; z-index: 1; padding-top: 3.25rem; padding-bottom: 3.25rem; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin-bottom: .75rem; }
.hero .hero-sub { color: rgba(255, 255, 255, .82); font-size: 1.05rem; max-width: 640px; }
.hero .eyebrow { display: inline-block; color: #F4C9D5; text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 600; margin-bottom: .9rem; }
.hero-status { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 30px; padding: .4rem .9rem; font-size: .85rem; margin-top: 1.25rem; }
.hero-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .2); }
.hero-status.closed .dot { background: #FBBF24; box-shadow: 0 0 0 4px rgba(251, 191, 36, .2); }
.hero-card { background: rgba(255, 255, 255, .97); color: var(--fms-ink); border-radius: var(--fms-radius); padding: 1.5rem; box-shadow: 0 20px 40px rgba(0, 0, 0, .25); }
.hero-card h2 { font-size: 1.4rem; }

.dates-list { list-style: none; margin: 0; padding: 0; }
.dates-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px dashed var(--fms-stroke-strong); font-size: .9rem; }
.dates-list li:last-child { border-bottom: 0; }
.dates-list .when { font-weight: 600; color: var(--fms-maroon); text-align: right; white-space: nowrap; }

/* Important Dates: MBA / Ph.D. segmented switch with sliding panes (site.js initDateTabs) */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--fms-stroke); }
.seg-btn { border: 0; background: transparent; color: var(--fms-muted); font-weight: 600; font-size: .8rem; padding: .3rem .9rem; border-radius: 999px; transition: background .2s, color .2s; }
.seg-btn.active { background: var(--fms-maroon); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.seg-btn:focus-visible { outline: 2px solid var(--fms-maroon); outline-offset: 2px; }
.dates-viewport { overflow: hidden; }
.dates-track { display: flex; width: 200%; transition: transform .4s cubic-bezier(.4, 0, .2, 1); }
.dates-card.is-phd .dates-track { transform: translateX(-50%); }
.dates-pane { flex: 0 0 50%; min-width: 0; }
.dates-pane[aria-hidden="true"] { visibility: hidden; transition: visibility 0s .4s; }
.dates-pane-title { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--fms-muted); margin-bottom: .25rem; }
.dates-switch { display: inline-flex; align-items: center; gap: .15rem; margin-top: .75rem; padding: .35rem .75rem; border: 1px solid var(--fms-maroon); border-radius: 999px; background: #fff; color: var(--fms-maroon); font-size: .82rem; font-weight: 600; transition: background .2s, color .2s; }
.dates-switch:hover { background: var(--fms-maroon); color: #fff; }
@media (prefers-reduced-motion: reduce) { .dates-track { transition: none; } }

/* Combobox: text input + filtered dropdown list (district of the chosen state), site.js initComboboxes */
.combobox { position: relative; }
.combobox .form-control { padding-right: 2.4rem; }
.combobox-toggle { position: absolute; top: 0; right: 0; height: 100%; width: 2.4rem; border: 0; background: transparent; color: var(--fms-muted); display: grid; place-items: center; border-radius: 0 var(--fms-radius) var(--fms-radius) 0; }
.combobox-toggle:hover { color: var(--fms-maroon); }
.combobox.open .combobox-toggle i { transform: rotate(180deg); }
.combobox-toggle i { transition: transform .2s; }
.combobox-list { position: absolute; z-index: 1050; left: 0; right: 0; top: calc(100% + 4px); max-height: 240px; overflow-y: auto; margin: 0; padding: .3rem; list-style: none; background: #fff; border: 1px solid var(--fms-stroke-strong); border-radius: var(--fms-radius); box-shadow: 0 12px 28px rgba(0, 0, 0, .14); }
.combobox-list li { padding: .4rem .65rem; border-radius: 6px; font-size: .9rem; cursor: pointer; }
.combobox-list li mark { background: transparent; color: var(--fms-maroon); font-weight: 700; padding: 0; }
.combobox-list li:hover, .combobox-list li.active { background: #FBEFF3; color: var(--fms-maroon); }
.combobox-list li.combobox-empty { color: var(--fms-muted); cursor: default; font-size: .82rem; }
.combobox-list li.combobox-empty:hover { background: transparent; color: var(--fms-muted); }

/* How to apply: the Ph.D.-only step */
.howto-phd { border-color: var(--fms-maroon); background: #fff8f6; }
.howto-badge { display: inline-flex; align-items: center; font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--fms-maroon); background: #fff; border: 1px solid var(--fms-maroon); border-radius: 999px; padding: .15rem .5rem; white-space: nowrap; }

.programme-card { height: 100%; padding: 1.25rem; border: 1px solid var(--fms-stroke); border-top: 3px solid var(--fms-maroon); border-radius: var(--fms-radius); background: #fff; box-shadow: var(--fms-shadow); }
.programme-card h3 { font-size: 1.2rem; margin-bottom: .35rem; }

.howto { counter-reset: how; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.howto-item { position: relative; background: #fff; border: 1px solid var(--fms-stroke); border-radius: var(--fms-radius); padding: 1.1rem 1rem 1rem; }
.howto-item .num { width: 34px; height: 34px; border-radius: 50%; background: var(--fms-maroon); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; margin-bottom: .6rem; }
.howto-item h4 { font-family: var(--font-body); font-size: .92rem; font-weight: 600; margin-bottom: .25rem; }
.howto-item p { font-size: .8rem; color: var(--fms-muted); margin: 0; }

/* Countdown (Live Soon) */
.countdown { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.75rem 0 .5rem; }
.countdown .unit { min-width: 92px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; padding: .9rem .6rem; text-align: center; backdrop-filter: blur(2px); }
.countdown .value { font-family: var(--font-heading); font-size: 2.6rem; font-weight: 700; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.countdown .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: rgba(255, 255, 255, .75); margin-top: .35rem; }

/* ---------- 7. Auth pages ---------- */
.auth-wrap { padding: 2.5rem 0 3rem; }
.auth-card { max-width: 560px; margin: 0 auto; }
.auth-card.wide { max-width: 860px; }
.auth-aside { background: var(--fms-ink); color: #E9E4DF; border-radius: var(--fms-radius); padding: 1.5rem; height: 100%; }
.auth-aside h3 { color: #fff; font-size: 1.25rem; }
.auth-aside ul { padding-left: 1.1rem; font-size: .86rem; }
.auth-aside li { margin-bottom: .45rem; }
.otp-input { font-size: 1.6rem; letter-spacing: .6em; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.app-no-display { font-family: var(--font-heading); font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 700; color: var(--fms-maroon); letter-spacing: .08em; line-height: 1; }
.age-output { font-size: .82rem; margin-top: .35rem; font-weight: 600; }
.age-output.ok { color: var(--fms-success); }
.age-output.bad { color: var(--fms-danger); }

.pwd-rules { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .2rem .9rem; font-size: .78rem; color: var(--fms-muted); }
.pwd-rules li::before { content: "\F28A"; font-family: "bootstrap-icons"; margin-right: .4rem; color: var(--fms-stroke-strong); }
.pwd-rules li.ok { color: var(--fms-success); }
.pwd-rules li.ok::before { content: "\F26A"; color: var(--fms-success); }

/* DNTCaptcha (the tag helper renders a div.dntCaptcha with image, refresh link, hidden fields and the input) */
.dntCaptcha { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.dntCaptcha img { border: 1px solid var(--fms-stroke-strong); border-radius: 6px; height: 46px; background: var(--fms-surface); }
.dntCaptcha .captcha-input { flex: 1 1 180px; max-width: 240px; }
.captcha-refresh { cursor: pointer; color: var(--fms-maroon); font-size: 1.25rem; text-decoration: none; }
.captcha-refresh:hover { color: var(--fms-maroon-dark); }
.captcha-refresh.spinning { display: inline-block; animation: captcha-spin .8s linear infinite; pointer-events: none; }
@keyframes captcha-spin { to { transform: rotate(360deg); } }

/* ---------- 8. Candidate area ---------- */
.candidate-shell { padding: 1.75rem 0 3rem; }
.step-tracker { list-style: none; margin: 0; padding: .5rem 0; position: relative; }
.step-tracker li { position: relative; }
.step-tracker li + li::before { content: ""; position: absolute; left: 27px; top: -10px; height: 20px; width: 2px; background: var(--fms-stroke-strong); }
.step-tracker li.completed + li::before { background: var(--fms-maroon); }
.step-link { display: flex; align-items: center; gap: .75rem; padding: .55rem .9rem; border-radius: 8px; color: var(--fms-ink); text-decoration: none; margin: 0 .35rem; }
.step-link:hover { background: var(--fms-surface); color: var(--fms-ink); }
.step-link.disabled { pointer-events: none; color: #9AA1AC; }
.step-link.active { background: var(--fms-maroon-tint); }
.step-link.active .step-title { color: var(--fms-maroon); }
.step-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 700; flex-shrink: 0; border: 2px solid var(--fms-stroke-strong); background: #fff; color: var(--fms-muted); }
.completed .step-num { background: var(--fms-maroon); border-color: var(--fms-maroon); color: #fff; }
.current .step-num { border-color: var(--fms-maroon); color: var(--fms-maroon); }
.step-title { font-size: .875rem; font-weight: 600; line-height: 1.2; }
.step-state { font-size: .72rem; color: var(--fms-muted); }
.completed .step-state { color: var(--fms-success); }
.current .step-state { color: var(--fms-maroon); }

.progress-fms { height: 8px; background: var(--fms-surface-2); border-radius: 10px; overflow: hidden; }
.progress-fms .bar { height: 100%; background: linear-gradient(90deg, var(--fms-maroon), #C2185B); border-radius: 10px; transition: width .4s; }

.profile-card { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.profile-photo { width: 92px; height: 112px; border-radius: 8px; border: 1px solid var(--fms-stroke-strong); background: var(--fms-surface); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; color: var(--fms-muted); font-size: 2rem; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.stat { padding: .9rem 1rem; border: 1px solid var(--fms-stroke); border-radius: 8px; background: #fff; height: 100%; }
.stat .k { font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--fms-muted); }
.stat .v { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; color: var(--fms-ink); margin-top: .15rem; line-height: 1.15; }

.step-card { display: flex; flex-direction: column; height: 100%; padding: 1.1rem; border: 1px solid var(--fms-stroke); border-radius: var(--fms-radius); background: #fff; transition: box-shadow .15s, border-color .15s; }
.step-card:hover { box-shadow: var(--fms-shadow); }
.step-card.current { border-color: var(--fms-maroon); box-shadow: 0 0 0 3px var(--fms-maroon-tint); }
.step-card.locked { background: #FCFAF8; }
.step-card .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.step-card .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--fms-surface); color: var(--fms-maroon); display: grid; place-items: center; font-size: 1.2rem; }
.step-card.completed .ico { background: var(--fms-maroon); color: #fff; }
.step-card h4 { font-family: var(--font-body); font-size: .95rem; font-weight: 600; margin: 0 0 .2rem; }
.step-card p { font-size: .8rem; color: var(--fms-muted); margin: 0 0 .9rem; flex: 1; }

.submitted-banner { display: flex; gap: 1rem; align-items: center; background: var(--fms-success-tint); border: 1px solid #BFE0CD; border-radius: var(--fms-radius); padding: 1rem 1.25rem; }
.submitted-banner .bi { font-size: 2rem; color: var(--fms-success); }

/* Course choice cards */
.course-option input { position: absolute; opacity: 0; }
.course-option label { display: block; height: 100%; padding: 1.1rem 1.1rem 1rem 3rem; border: 1.5px solid var(--fms-stroke-strong); border-radius: var(--fms-radius); background: #fff; cursor: pointer; position: relative; transition: all .15s; }
.course-option label::before { content: ""; position: absolute; left: 1.1rem; top: 1.25rem; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--fms-stroke-strong); background: #fff; }
.course-option input:checked + label { border-color: var(--fms-maroon); background: #FFFBFC; box-shadow: 0 0 0 3px var(--fms-maroon-tint); }
.course-option input:checked + label::before { border-color: var(--fms-maroon); background: radial-gradient(var(--fms-maroon) 45%, #fff 50%); }
.course-option.is-closed label { cursor: not-allowed; opacity: .65; background: var(--fms-surface); }
.course-option input:focus-visible + label { box-shadow: 0 0 0 .25rem rgba(152, 0, 46, .25); }
.course-option .title { font-weight: 600; font-size: 1rem; }
/* Several programmes can be chosen: square tick box. */
.course-option input[type=checkbox] + label::before { border-radius: 4px; }
.course-option input[type=checkbox]:checked + label::before { background: var(--fms-maroon) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m3.5 8.5 3 3 6-7'/%3e%3c/svg%3e") center / 12px no-repeat; }

/* Document slots */
.doc-slot { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--fms-stroke); border-radius: var(--fms-radius); background: #fff; }
.doc-slot + .doc-slot { margin-top: .85rem; }
.doc-thumb { width: 84px; height: 96px; border-radius: 6px; border: 1px solid var(--fms-stroke); background: var(--fms-surface); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; color: var(--fms-muted); font-size: 1.8rem; }
.doc-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.doc-slot .meta { font-size: .78rem; color: var(--fms-muted); }

/* Upload page: status cards */
.doc-summary-pill { font-size: .85rem; padding: .35rem .8rem; }
.progress-fms .bar.is-complete { background: linear-gradient(90deg, var(--fms-success), #34A26A); }
.doc-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.doc-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 20px; font-size: .8rem; font-weight: 500;
    border: 1px solid var(--fms-stroke-strong); background: #fff; color: var(--fms-muted); text-decoration: none; }
.doc-chip.done { background: var(--fms-success-tint); border-color: #BFE0CD; color: var(--fms-success); }
.doc-chip.todo { background: var(--fms-warning-tint); border-color: #F0D9A6; color: var(--fms-warning); }
.doc-chip:hover { filter: brightness(.97); }

.doc-card { position: relative; display: flex; margin-top: 1rem; background: #fff; border: 1px solid var(--fms-stroke);
    border-radius: var(--fms-radius); overflow: hidden; scroll-margin-top: 90px; transition: border-color .2s, box-shadow .2s; }
.doc-rail { width: 128px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
    padding: 1rem .5rem; text-align: center; font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.doc-rail .bi { font-size: 2.1rem; line-height: 1; }
.doc-card.is-uploaded { border: 1.5px solid #9FD3B6; }
.doc-card.is-uploaded .doc-rail { background: var(--fms-success-tint); color: var(--fms-success); }
.doc-card.is-pending { border: 1.5px dashed #E2B65E; }
.doc-card.is-pending .doc-rail { background: var(--fms-warning-tint); color: var(--fms-warning); }
.doc-card.is-pending.is-optional { border-color: var(--fms-stroke-strong); }
.doc-card.is-pending.is-optional .doc-rail { background: var(--fms-surface); color: var(--fms-muted); }
.doc-card-body { flex: 1; min-width: 0; padding: 1rem 1.15rem; }
.doc-title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 0; }
.doc-card .meta { font-size: .8rem; color: var(--fms-muted); }

.doc-file { display: flex; align-items: center; gap: .9rem; padding: .75rem; border-radius: 8px; background: #F6FBF8; border: 1px solid #D8EEE1; flex-wrap: wrap; }
.doc-file-thumb { width: 58px; height: 70px; flex-shrink: 0; border-radius: 6px; border: 1px solid var(--fms-stroke); background: #fff;
    display: grid; place-items: center; overflow: hidden; font-size: 1.8rem; color: var(--fms-danger); }
.doc-file-thumb img { width: 100%; height: 100%; object-fit: contain; }
.doc-actions { display: flex; flex-wrap: wrap; gap: .4rem; }

.drop-zone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
    padding: 1.1rem 1rem; text-align: center; cursor: pointer; border: 2px dashed var(--fms-stroke-strong); border-radius: 8px;
    background: #FCFAF8; transition: border-color .15s, background .15s; margin: 0; }
.drop-zone:hover, .drop-zone.drag-over, .drop-zone:focus-within { border-color: var(--fms-maroon); background: var(--fms-maroon-tint); }
.drop-zone.has-file { border-style: solid; border-color: var(--fms-navy); background: #EEF2FA; }
.drop-zone.has-error { border-style: solid; border-color: var(--fms-danger); background: var(--fms-danger-tint); }
.dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.dz-preview { display: grid; place-items: center; min-height: 40px; font-size: 1.8rem; color: var(--fms-maroon); }
.dz-preview img { max-height: 96px; max-width: 160px; border-radius: 6px; border: 1px solid var(--fms-stroke); background: #fff; }
.dz-title { font-weight: 600; font-size: .9rem; color: var(--fms-ink); }
.dz-hint { font-size: .76rem; color: var(--fms-muted); }
.dz-file { font-size: .82rem; font-weight: 600; }
.dz-file.is-ready { color: var(--fms-navy); }
.dz-file.is-error { color: var(--fms-danger); }
[data-upload-btn].is-ready { box-shadow: 0 0 0 .25rem rgba(152, 0, 46, .18); }

.doc-busy { display: none; position: absolute; inset: 0; z-index: 2; align-items: center; justify-content: center; gap: .6rem;
    background: rgba(255, 255, 255, .82); font-weight: 600; color: var(--fms-ink); }
.doc-card.is-uploading .doc-busy { display: flex; }
.doc-card.just-uploaded { animation: doc-flash 2.6s ease-out 1; }
@keyframes doc-flash {
    0% { box-shadow: 0 0 0 0 rgba(31, 122, 77, .55); }
    25% { box-shadow: 0 0 0 9px rgba(31, 122, 77, .22); }
    100% { box-shadow: 0 0 0 0 rgba(31, 122, 77, 0); }
}
@media (max-width: 575.98px) {
    .doc-card { flex-direction: column; }
    .doc-rail { width: auto; flex-direction: row; justify-content: flex-start; padding: .6rem 1rem; }
    .doc-rail .bi { font-size: 1.3rem; }
}

/* Repeater rows */
.repeat-row { position: relative; padding: 1rem; border: 1px solid var(--fms-stroke); border-radius: 8px; background: #FCFAF8; }
.repeat-row + .repeat-row { margin-top: .75rem; }
.repeat-row .row-label { font-size: .75rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--fms-maroon); margin-bottom: .6rem; }
.repeat-row .remove-row { position: absolute; top: .6rem; right: .6rem; }

/* Work-experience table */
.work-table { min-width: 860px; }
.work-table td { vertical-align: top; padding: .5rem .45rem; }
.work-table td .form-check-input { margin-top: .55rem; }
.work-table .field-validation-error { font-size: .72rem; }

/* Sticky form actions */
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }

/* ---------- Toasts (Toastify) ---------- */
.toastify.fms-toast {
    background: #fff;
    color: var(--fms-ink);
    border: 1px solid var(--fms-stroke);
    border-left: 5px solid var(--fms-navy);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(29, 26, 23, .16);
    padding: .8rem 2.4rem .8rem .95rem;
    max-width: min(380px, calc(100vw - 32px));
    font-family: var(--font-body);
    font-size: .875rem;
    line-height: 1.4;
}
.toastify.fms-toast .fms-toast-body { display: flex; gap: .6rem; align-items: flex-start; }
.toastify.fms-toast .fms-toast-body .bi { font-size: 1.1rem; margin-top: .05rem; flex-shrink: 0; }
.toastify.fms-toast .toast-close { position: absolute; top: .45rem; right: .55rem; color: var(--fms-muted); opacity: .7; font-size: 1.1rem; padding: 0 .25rem; }
.toastify.fms-toast .toast-close:hover { opacity: 1; color: var(--fms-ink); }
.toastify.fms-toast-success { border-left-color: var(--fms-success); }
.toastify.fms-toast-success .bi { color: var(--fms-success); }
.toastify.fms-toast-error { border-left-color: var(--fms-maroon); }
.toastify.fms-toast-error .bi { color: var(--fms-maroon); }
.toastify.fms-toast-warning { border-left-color: var(--fms-warning); }
.toastify.fms-toast-warning .bi { color: var(--fms-warning); }
.toastify.fms-toast-info .bi { color: var(--fms-navy); }
.toastify.fms-toast .toast-step { display: block; margin-top: .2rem; font-size: .72rem; color: var(--fms-muted); }
.toastify.fms-toast.is-clickable { cursor: pointer; }
.toastify.fms-toast.is-clickable:hover { box-shadow: 0 12px 34px rgba(29, 26, 23, .22); }

/* ---------- 9. Footer ---------- */
.site-footer { background: var(--fms-ink); color: #BDB6AF; font-size: .86rem; margin-top: auto; }
.site-footer .container { padding-top: 2.5rem; padding-bottom: 1.5rem; }
.site-footer h5 { color: #fff; font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; margin-bottom: .9rem; }
.site-footer a { color: #D7D1CB; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer .footer-logo { height: 54px; width: auto; margin-bottom: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .78rem; color: #8F8780; }
.footer-bottom .container { padding-top: 1rem; padding-bottom: 1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-policies { display: inline-flex; gap: .5rem; flex-wrap: wrap; }

/* Policy pages (Privacy, Terms of Use, Cancellation & Refund) */
.policy-text { max-width: 860px; line-height: 1.65; }
.policy-text p { text-align: justify; }
.policy-links { display: flex; gap: .5rem; flex-wrap: wrap; padding-top: 1rem; border-top: 1px solid var(--fms-stroke); color: var(--fms-muted); }
.policy-links a.active { font-weight: 600; color: var(--fms-ink); text-decoration: none; }
.social a { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); margin-right: .35rem; }
.social a:hover { background: var(--fms-maroon); border-color: var(--fms-maroon); }

/* ---------- 10. Responsive ---------- */
@media (max-width: 991.98px) {
    .candidate-sidebar { margin-bottom: 1.25rem; }
    .step-tracker { display: flex; overflow-x: auto; gap: .25rem; padding: .5rem; }
    .step-tracker li + li::before { display: none; }
    .step-link { flex-direction: column; text-align: center; min-width: 96px; gap: .35rem; padding: .5rem; margin: 0; }
    .step-state { display: none; }
    .step-title { font-size: .72rem; }
}
@media (max-width: 767.98px) {
    .topbar .hide-sm { display: none; }
    .brand img { height: 42px; }
    .brand-title { font-size: 1.15rem; }
    .brand-sub { font-size: .62rem; letter-spacing: .1em; }
    .masthead .container { min-height: 70px; }
    .masthead-actions .btn-text { display: none; }
    .hero .container { padding-top: 2.25rem; padding-bottom: 2.25rem; }
    .countdown .unit { min-width: 70px; }
    .countdown .value { font-size: 2rem; }
    .card-fms-body, .card-fms-header, .card-fms-footer { padding: 1rem; }
    .doc-slot { flex-direction: column; }
    .user-name { max-width: 120px; }
    .user-meta-wrap { display: none; }
}
@media (max-width: 420px) {
    .brand-divider, .brand-text { display: none; }
}

/* ---------- 11. Print ---------- */
.print-sheet { background: #fff; max-width: 900px; margin: 1.5rem auto; padding: 2rem; border: 1px solid var(--fms-stroke); }
.print-head { display: flex; align-items: center; gap: 1rem; border-bottom: 3px double var(--fms-maroon); padding-bottom: .9rem; margin-bottom: 1.1rem; }
.print-head img:not(.print-photo) { height: 60px; }
.print-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; margin: 0; }
.print-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-bottom: 1rem; }
.print-table th, .print-table td { border: 1px solid #CFC8C2; padding: .4rem .55rem; vertical-align: top; text-align: left; }
.print-table th { background: #F4EFEB; width: 30%; font-weight: 600; }
.print-section { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--fms-maroon); margin: 1rem 0 .4rem; }
.ack-badge { border: 2px solid var(--fms-success); color: var(--fms-success); border-radius: 6px; padding: .35rem .7rem; font-weight: 700; letter-spacing: .08em; font-size: .85rem; white-space: nowrap; }
.download-tile { display: flex; align-items: center; gap: .85rem; padding: 1rem; border: 1px solid var(--fms-stroke); border-radius: var(--fms-radius); background: #fff; height: 100%; color: var(--fms-ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.download-tile:hover { border-color: var(--fms-maroon); box-shadow: var(--fms-shadow); color: var(--fms-ink); }
.download-tile.disabled { pointer-events: none; background: #FCFAF8; color: var(--fms-muted); }
.download-tile .ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--fms-maroon-tint); color: var(--fms-maroon); font-size: 1.3rem; flex-shrink: 0; }
.download-tile.disabled .ico { background: var(--fms-surface-2); color: var(--fms-muted); }
.print-photo { width: 120px; height: 145px; border: 1px solid #999; object-fit: contain; background: #fff; }
.print-sign { width: 160px; height: 55px; border: 1px solid #999; object-fit: contain; }
@media print {
    @page { size: A4; margin: 12mm; }
    body { background: #fff; }
    .no-print, .topbar, .masthead, .mainnav, .site-footer, .toastify { display: none !important; }
    .print-sheet { border: 0; margin: 0; padding: 0; max-width: none; }
    a { text-decoration: none; color: inherit; }
}

/* ---------- 11a. Application form: compact A4, no browser header / footer ----------
   The form uses its own page (zero page margin, so the browser has no room for its date / URL header and footer).
   The white space of every printed page comes from the repeated <thead> / <tfoot> spacer rows of .a4-frame
   (top / bottom) and the sheet's side padding. */
@page a4form { size: A4 portrait; margin: 0; }
.a4-form { width: 210mm; max-width: 100%; margin: 1rem auto; padding: 0 11mm; font-size: 9pt; line-height: 1.25; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.a4-frame { width: 100%; border-collapse: collapse; }
.a4-frame > thead > tr > td, .a4-frame > tfoot > tr > td, .a4-frame > tbody > tr > td { padding: 0; border: 0; }
.a4-gap { height: 8mm; }
.a4-form .print-head { gap: .6rem; padding-bottom: 1.6mm; margin-bottom: 2mm; border-bottom-width: 3px; }
.a4-form .print-head img:not(.print-photo) { height: 38px; }
.a4-form .print-title { font-size: 12.5pt; line-height: 1.15; }
.a4-form .print-qr svg { width: 22mm; height: 22mm; display: block; }
.a4-form .print-draft { border: 1px solid #E0B252; background: #FFF8E6; padding: 1mm 2mm; font-size: 8.5pt; margin-bottom: 2mm; }

/* "Photograph, Signature, 10th Marksheet": items separated by commas without stray spaces before them. */
.comma-list > :not(:last-child)::after { content: ","; color: var(--fms-ink); display: inline-block; } /* inline-block: no link underline */

/* The whole form is one table on a 12-column grid; colspan gives each section its own column widths. */
.form-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 8pt; line-height: 1.22; }
.form-table col { width: 8.3333%; }
.form-table th, .form-table td { border: 1px solid #CFC8C2; padding: .5mm 1.4mm; vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.form-table th { background: #F4EFEB; font-weight: 600; }
.form-table .form-sec th { background: #F3E1E7; color: var(--fms-maroon); font-family: var(--font-heading); font-size: 9.5pt; font-weight: 700; padding: .7mm 1.6mm; }
.form-table .form-colhead th { background: #EAE1DA; }
.form-table .form-photo { text-align: center; vertical-align: middle; padding: 1mm; background: #fff; }
.form-table .form-photo img { width: 26mm; height: 32mm; object-fit: contain; display: block; margin: 0 auto; }
.form-table .form-photo-missing { width: 26mm; height: 32mm; margin: 0 auto; border: 1px dashed #999; display: grid; place-items: center; color: #888; }
.form-table .form-declaration { text-align: justify; }
.form-table .form-sign td { vertical-align: bottom; }
.form-table .form-sign img { width: 42mm; height: 13mm; object-fit: contain; display: block; margin: 0 auto .5mm; }
.form-table tr { break-inside: avoid; page-break-inside: avoid; }
.form-table .form-sec, .form-table .form-colhead { break-after: avoid; page-break-after: avoid; }
@media screen {
    .a4-form { background: #fff; border: 1px solid var(--fms-stroke); box-shadow: var(--fms-shadow); }
}
/* Values of the view / print pages in capitals (an email keeps its case: .keep-case). */
.form-table td, .summary-table td { text-transform: uppercase; }
.form-table td.keep-case, .summary-table td.keep-case, .form-table .keep-case, .summary-table .keep-case { text-transform: none; }
/* View-only form (fee not paid): no QR, no print button, and printing shows only a notice. */
.view-only-note { display: none; }
@media print {
    .view-only .a4-form { display: none !important; }
    .view-only .view-only-note { display: block !important; padding: 30mm 15mm; font-size: 14pt; text-align: center; }
}
@media print {
    .a4-form { page: a4form; width: auto; margin: 0; padding: 0 11mm; border: 0; box-shadow: none; }
}

/* ---------- 11b. Error pages (404, 403, 500 …): Home/Status, Home/Error; the static wwwroot/errors/*.html copy this look ---------- */
.error-page { padding: 3.5rem 0 4.5rem; background: radial-gradient(1200px 380px at 50% -120px, var(--fms-maroon-tint), transparent 70%); }
.error-card { position: relative; max-width: 640px; margin: 0 auto; padding: 2.6rem 2.2rem 2rem; text-align: center; background: #fff;
    border: 1px solid var(--fms-stroke); border-top: 4px solid var(--fms-maroon); border-radius: var(--fms-radius); box-shadow: var(--fms-shadow); overflow: hidden; }
.error-code { position: absolute; inset: auto 0 auto 0; top: -.4rem; font-family: var(--font-heading); font-weight: 700; font-size: 9rem; line-height: 1;
    color: var(--fms-maroon); opacity: .06; pointer-events: none; user-select: none; }
.error-icon { position: relative; width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--fms-maroon-tint); color: var(--fms-maroon); font-size: 2rem; }
.error-eyebrow { position: relative; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fms-maroon); }
.error-title { position: relative; margin: .35rem 0 .6rem; font-size: 2rem; }
.error-message { position: relative; color: var(--fms-muted); max-width: 30rem; margin: 0 auto 1.4rem; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.error-reference { margin-top: 1.2rem; font-size: .85rem; }
.error-help { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--fms-stroke); font-size: .85rem; color: var(--fms-ink-soft); }
@media (max-width: 575.98px) { .error-card { padding: 2rem 1.2rem 1.6rem; } .error-code { font-size: 6.5rem; } .error-title { font-size: 1.6rem; } }

/* ---------- 11c. JavaScript turned off (_NoScript): covers the page with the steps to turn it on ---------- */
.nojs { position: fixed; inset: 0; z-index: 2147483000; overflow-y: auto; padding: 2rem 1rem;
    background: radial-gradient(1200px 380px at 50% -120px, var(--fms-maroon-tint), transparent 70%), var(--fms-surface); }
.nojs-card { max-width: 760px; margin: 0 auto; padding: 2rem 1.8rem 1.6rem; text-align: center; background: #fff; border: 1px solid var(--fms-stroke);
    border-top: 4px solid var(--fms-maroon); border-radius: var(--fms-radius); box-shadow: var(--fms-shadow); }
.nojs-logo { height: 46px; margin-bottom: 1.2rem; }
.nojs-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem; text-align: left; margin: .4rem 0 1rem; }
.nojs-step { border: 1px solid var(--fms-stroke); border-left: 3px solid var(--fms-maroon); border-radius: 8px; padding: .65rem .8rem; background: #FCFAF8; font-size: .85rem; }
.nojs-step strong { display: block; margin-bottom: .2rem; color: var(--fms-ink); }
.nojs-step span { color: var(--fms-ink-soft); }
.nojs-after { font-size: .9rem; color: var(--fms-ink-soft); margin-bottom: 0; }

/* ---------- 11d. Content protection (Security:ContentProtection): no selecting page text; form fields stay editable ---------- */
body[data-protect] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body[data-protect] input, body[data-protect] textarea, body[data-protect] select, body[data-protect] [contenteditable] { -webkit-user-select: text; user-select: text; }

/* ---------- 12. Help bot (chat widget) ---------- */
.chatbot { position: fixed; right: 18px; bottom: 18px; z-index: 1080; font-size: .9rem; }
.chatbot-launch { display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 999px; padding: .7rem 1.1rem; background: var(--fms-maroon); color: #fff; font-weight: 600; box-shadow: 0 6px 20px rgba(152, 0, 46, .35); }
.chatbot-launch:hover, .chatbot-launch:focus-visible { background: var(--fms-maroon-dark); color: #fff; }
.chatbot.is-open .chatbot-launch { display: none; }
.chatbot-panel { width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 90px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--fms-stroke-strong); border-radius: 14px; box-shadow: 0 12px 40px rgba(29, 26, 23, .22); overflow: hidden; }
.chatbot-panel[hidden] { display: none; }
.chatbot-head { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; background: var(--fms-maroon); color: #fff; }
.chatbot-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; line-height: 1.1; }
.chatbot-sub { font-size: .75rem; opacity: .85; }
.chatbot-close { border: 0; background: transparent; color: #fff; font-size: 1rem; padding: .25rem .4rem; border-radius: 6px; }
.chatbot-close:hover { background: rgba(255, 255, 255, .15); }
.chatbot-body { flex: 1; overflow-y: auto; padding: .8rem; background: var(--fms-surface); display: flex; flex-direction: column; gap: .5rem; }
.chat-msg { max-width: 88%; padding: .55rem .75rem; border-radius: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-bot { align-self: flex-start; background: #fff; border: 1px solid var(--fms-stroke); border-bottom-left-radius: 4px; }
.chat-user { align-self: flex-end; background: var(--fms-maroon); color: #fff; border-bottom-right-radius: 4px; }
.chat-links { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.chat-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.chat-chip { border: 1px solid var(--fms-maroon); color: var(--fms-maroon); background: var(--fms-maroon-tint); border-radius: 999px; padding: .2rem .65rem; font-size: .8rem; text-align: left; }
.chat-chip:hover, .chat-chip:focus-visible { background: var(--fms-maroon); color: #fff; }
.chat-typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--fms-muted); animation: chat-dot 1s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chatbot-form { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid var(--fms-stroke); background: #fff; }
.chatbot-form .form-control { font-size: .9rem; }
.chatbot-note { font-size: .7rem; color: var(--fms-muted); text-align: center; padding: 0 .6rem .5rem; background: #fff; }
@media (max-width: 480px) { .chatbot { right: 10px; bottom: 10px; } .chatbot-launch span { display: none; } }
@media print { .chatbot { display: none !important; } }

/* Bulletin / format viewer (own tab, minimal layout): a slim bar, then the PDF fills the rest of the window. */
.bulletin-page { display: flex; flex-direction: column; height: 100vh; background: var(--fms-surface); }
.bulletin-bar { flex: 0 0 auto; padding: .55rem 0; background: #fff; border-bottom: 1px solid var(--fms-stroke-strong); }
.bulletin-logo { height: 34px; width: auto; }
.bulletin-frame { flex: 1 1 auto; min-height: 0; padding: .75rem var(--bs-gutter-x, .75rem); }
.bulletin-frame iframe { background: #fff; border: 1px solid var(--fms-stroke-strong) !important; border-radius: 6px; }

/* Long words typed without spaces (a 75-letter name, a statement in capitals) wrap inside their box instead of
   floating out of it – everywhere candidate data is shown (user, 26/10/2026). */
.card-fms, .card-fms-body, .card-fms-footer, .summary-table td, .summary-table th, .table-fms td, .print-table td,
.download-tile, .submitted-banner, .alert, .toast, .toast-body, .form-text, .field-validation-error, .validation-summary-errors,
.step-title, .page-head, .page-head h1, .page-subtitle, .hero-status, dd, dt, .chat-msg, .form-section-title, .side-ident, .side-ident * {
  overflow-wrap: anywhere; word-break: break-word; min-width: 0;
}
.table-fms, .summary-table { table-layout: fixed; }
.summary-table th { width: 38%; }
