/* Phase 49 EF NEXUS Global Pathways (docs/PHASE49_EF_NEXUS_STUDY_ABROAD_PROMPT.md §8).
   The EF NEXUS identity - royal blue, signal red, cool white, the roof-line of the logo - deliberately distinct from
   NIIT navy and gold. Shared by the candidate portal (/nexus.html, body.efn) and the Study Abroad Desk inside the staff
   portal (.nx). No inline styles anywhere (the CSP forbids them); dynamic widths use CSS custom properties. */

:root, .nx {
  --efn-blue: #0d47a1;
  --efn-blue-2: #1565c0;
  --efn-blue-3: #1e88e5;
  --efn-sky: #e3f0ff;
  --efn-sky-2: #f0f6ff;
  --efn-red: #e53935;
  --efn-red-soft: #fdecea;
  --efn-ink: #0b1b33;
  --efn-text: #1e2a3b;
  --efn-muted: #5b6b82;
  --efn-line: #dbe5f3;
  --efn-bg: #f5f8ff;
  --efn-card: #ffffff;
  --efn-green: #138a5e;
  --efn-green-soft: #e3f6ee;
  --efn-amber: #b26a00;
  --efn-amber-soft: #fff3dc;
  --efn-radius: 18px;
  --efn-shadow: 0 1px 2px rgba(13, 71, 161, .06), 0 10px 30px rgba(13, 71, 161, .08);
  --efn-font: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  body.efn {
    --efn-ink: #eaf2ff; --efn-text: #d6e2f5; --efn-muted: #9fb2cc; --efn-line: #22344f; --efn-bg: #07111f; --efn-card: #0d1b2f;
    --efn-sky: #10294a; --efn-sky-2: #0b1f3a; --efn-red-soft: #3a1416; --efn-green-soft: #0e3326; --efn-amber-soft: #3a2a08;
    --efn-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  }
}

/* ---------------------------------------------------------------------------------------------------- base (portal) */
body.efn { margin: 0; font-family: var(--efn-font); background: var(--efn-bg); color: var(--efn-text); -webkit-font-smoothing: antialiased; }
.efn *, .nx * { box-sizing: border-box; }
.efn h1, .efn h2, .efn h3, .nx h2, .nx h3 { color: var(--efn-ink); letter-spacing: -.01em; margin: 0; }
.efn a { color: var(--efn-blue-2); }
.efn button, .efn input, .efn select, .efn textarea, .nx button, .nx input, .nx select, .nx textarea { font: inherit; }
.efn [hidden], .nx [hidden] { display: none !important; }
.efn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --------------------------------------------------------------------------------------------------- shared atoms */
.efn-btn, .nx-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 0; border-radius: 12px; padding: .7rem 1.1rem; font-weight: 700; cursor: pointer; background: var(--efn-blue); color: #fff; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; text-decoration: none; line-height: 1.1; }
.efn-btn:hover, .nx-btn:hover { background: var(--efn-blue-2); box-shadow: 0 6px 18px rgba(13, 71, 161, .25); }
.efn-btn:active, .nx-btn:active { transform: translateY(1px); }
.efn-btn:disabled, .nx-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.efn-btn.red, .nx-btn.red { background: var(--efn-red); }
.efn-btn.red:hover, .nx-btn.red:hover { background: #c62828; box-shadow: 0 6px 18px rgba(229, 57, 53, .28); }
.efn-btn.ghost, .nx-btn.ghost { background: transparent; color: var(--efn-blue-2); box-shadow: inset 0 0 0 1.5px var(--efn-line); }
.efn-btn.ghost:hover, .nx-btn.ghost:hover { background: var(--efn-sky-2); box-shadow: inset 0 0 0 1.5px var(--efn-blue-3); }
.efn-btn.small, .nx-btn.small { padding: .45rem .75rem; font-size: .85rem; border-radius: 10px; }
.efn-btn.block { width: 100%; }

.efn-card, .nx-card { background: var(--efn-card); border-radius: var(--efn-radius); box-shadow: var(--efn-shadow); padding: 1.25rem; border: 1px solid var(--efn-line); }
.efn-card h3, .nx-card h3 { font-size: 1.02rem; margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; }
.efn-eyebrow, .nx-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; font-weight: 800; color: var(--efn-red); margin: 0 0 .3rem; }
.efn-muted, .nx-muted { color: var(--efn-muted); }
.efn-small, .nx-small { font-size: .85rem; }

.efn-tag, .nx-tag { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--efn-sky); color: var(--efn-blue); white-space: nowrap; }
.efn-tag.green, .nx-tag.green { background: var(--efn-green-soft); color: var(--efn-green); }
.efn-tag.red, .nx-tag.red { background: var(--efn-red-soft); color: var(--efn-red); }
.efn-tag.amber, .nx-tag.amber { background: var(--efn-amber-soft); color: var(--efn-amber); }
.efn-tag.grey, .nx-tag.grey { background: rgba(91, 107, 130, .14); color: var(--efn-muted); }

.efn-field, .nx-field { display: grid; gap: .3rem; margin-bottom: .8rem; }
.efn-field label, .nx-field label { font-size: .8rem; font-weight: 700; color: var(--efn-ink); }
.efn-field input, .efn-field select, .efn-field textarea, .nx-field input, .nx-field select, .nx-field textarea {
  width: 100%; border: 1.5px solid var(--efn-line); background: var(--efn-card); color: var(--efn-text); border-radius: 12px; padding: .65rem .8rem; outline: none; transition: border-color .12s, box-shadow .12s;
}
.efn-field input:focus, .efn-field select:focus, .efn-field textarea:focus, .nx-field input:focus, .nx-field select:focus, .nx-field textarea:focus { border-color: var(--efn-blue-3); box-shadow: 0 0 0 4px rgba(30, 136, 229, .15); }
.efn-grid2, .nx-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .9rem; }
.efn-error, .nx-error { color: var(--efn-red); font-weight: 600; font-size: .88rem; min-height: 1.2em; margin: .4rem 0 0; }
.efn-empty, .nx-empty { text-align: center; padding: 2rem 1rem; color: var(--efn-muted); }
.efn-empty strong, .nx-empty strong { display: block; color: var(--efn-ink); font-size: 1.05rem; margin: .4rem 0 .2rem; }
.efn-empty .ico, .nx-empty .ico { font-size: 2rem; }

.efn-roof { display: block; width: 46px; height: 14px; position: relative; }
.efn-roof::before { content: ""; position: absolute; inset: 0; background: var(--efn-red); clip-path: polygon(0 100%, 50% 0, 100% 100%, 86% 100%, 50% 30%, 14% 100%); }

/* ------------------------------------------------------------------------------------------------------- sign-in */
.efn-login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.efn-hero { position: relative; overflow: hidden; color: #fff; padding: 3rem clamp(1.5rem, 5vw, 4.5rem); display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(1200px 500px at 120% -10%, rgba(30, 136, 229, .55), transparent 60%), radial-gradient(800px 400px at -20% 120%, rgba(229, 57, 53, .35), transparent 60%), linear-gradient(160deg, #0a3a86, #0d47a1 45%, #0b2f6b); }
.efn-hero::after { content: ""; position: absolute; right: -80px; bottom: -40px; width: 420px; height: 260px; background: rgba(255, 255, 255, .06); clip-path: polygon(0 100%, 50% 0, 100% 100%, 82% 100%, 50% 34%, 18% 100%); }
.efn-hero .brand { display: flex; align-items: center; gap: .9rem; }
.efn-hero .brand img { width: 64px; height: 64px; border-radius: 16px; background: #fff; padding: 4px; }
.efn-hero .brand strong { display: block; font-size: 1.35rem; letter-spacing: .18em; font-weight: 900; }
.efn-hero .brand small { opacity: .8; letter-spacing: .08em; }
.efn-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; margin: 2.5rem 0 1rem; font-weight: 900; }
.efn-hero h1 em { font-style: normal; color: #ffb4b1; }
.efn-hero p.lead { font-size: 1.08rem; max-width: 34rem; opacity: .92; line-height: 1.55; }
.efn-hero .promise { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.efn-hero .promise span { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: .4rem .8rem; font-size: .85rem; font-weight: 600; }
.efn-hero .steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-top: 2.5rem; position: relative; z-index: 1; }
.efn-hero .steps div { background: rgba(255, 255, 255, .1); border-radius: 14px; padding: .7rem; font-size: .76rem; line-height: 1.3; }
.efn-hero .steps b { display: block; font-size: 1.15rem; color: #ffb4b1; }
.efn-hero footer { font-size: .8rem; opacity: .75; margin-top: 2rem; position: relative; z-index: 1; }
.efn-auth { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.efn-auth .panel { width: min(440px, 100%); }
.efn-auth h2 { font-size: 1.7rem; margin: .3rem 0 .4rem; font-weight: 800; }
.efn-auth .switch { display: grid; grid-template-columns: 1fr 1fr; background: var(--efn-sky-2); border-radius: 14px; padding: 4px; margin: 1.2rem 0; }
.efn-auth .switch button { border: 0; background: transparent; border-radius: 11px; padding: .6rem; font-weight: 700; color: var(--efn-muted); cursor: pointer; }
.efn-auth .switch button.on { background: var(--efn-card); color: var(--efn-blue); box-shadow: var(--efn-shadow); }
.efn-pass { position: relative; }
.efn-pass button { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--efn-blue-2); font-weight: 700; cursor: pointer; padding: .3rem .5rem; }
.efn-note { font-size: .82rem; color: var(--efn-muted); margin-top: 1rem; line-height: 1.5; }
.efn-back { display: inline-flex; gap: .3rem; font-size: .85rem; font-weight: 700; text-decoration: none; color: var(--efn-muted); }

/* ---------------------------------------------------------------------------------------------------------- shell */
.efn-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.efn-side { background: linear-gradient(180deg, #0b3d8f, #0a2f6e); color: #dce9ff; padding: 1.2rem .9rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1rem; }
.efn-side .brand { display: flex; gap: .7rem; align-items: center; padding: .2rem .4rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.efn-side .brand img { width: 44px; height: 44px; border-radius: 12px; background: #fff; padding: 3px; }
.efn-side .brand strong { display: block; color: #fff; letter-spacing: .14em; font-weight: 900; }
.efn-side .brand small { font-size: .72rem; opacity: .75; }
.efn-nav { display: grid; gap: .25rem; }
.efn-nav button { display: flex; align-items: center; gap: .7rem; border: 0; background: transparent; color: inherit; padding: .7rem .8rem; border-radius: 12px; cursor: pointer; font-weight: 600; text-align: left; position: relative; }
.efn-nav button .ico { width: 1.4rem; text-align: center; font-size: 1.05rem; }
.efn-nav button:hover { background: rgba(255, 255, 255, .08); }
.efn-nav button.on { background: #fff; color: var(--efn-blue); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.efn-nav button.on::before { content: ""; position: absolute; left: -.9rem; top: 22%; bottom: 22%; width: 4px; border-radius: 4px; background: var(--efn-red); }
.efn-nav .count { margin-left: auto; background: var(--efn-red); color: #fff; border-radius: 999px; font-size: .7rem; padding: .1rem .45rem; font-weight: 800; }
.efn-side .foot { margin-top: auto; font-size: .78rem; opacity: .85; display: grid; gap: .6rem; }
.efn-side .foot button { border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; border-radius: 10px; padding: .55rem; cursor: pointer; font-weight: 700; }
.efn-main { min-width: 0; }
.efn-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1rem; padding: .9rem clamp(1rem, 3vw, 2rem); background: color-mix(in srgb, var(--efn-bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--efn-line); }
.efn-top h1 { font-size: 1.25rem; font-weight: 800; }
.efn-top .crumb { font-size: .75rem; color: var(--efn-muted); font-weight: 600; letter-spacing: .04em; }
.efn-top .actions { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.efn-icon { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--efn-line); background: var(--efn-card); cursor: pointer; font-size: 1.05rem; color: var(--efn-ink); }
.efn-icon .dot { position: absolute; top: -4px; right: -4px; background: var(--efn-red); color: #fff; font-size: .65rem; border-radius: 999px; padding: .1rem .35rem; font-weight: 800; }
.efn-me { display: flex; align-items: center; gap: .55rem; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; border: 1px solid var(--efn-line); background: var(--efn-card); }
.efn-me .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--efn-blue), var(--efn-red)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.efn-me small { display: block; font-size: .7rem; color: var(--efn-muted); }
.efn-content { padding: clamp(1rem, 3vw, 2rem); display: grid; gap: 1.2rem; max-width: 1240px; }
.efn-tabbar { display: none; }

/* --------------------------------------------------------------------------------------------------- journey page */
.efn-next { display: grid; grid-template-columns: auto 1fr auto; gap: 1.4rem; align-items: center; color: #fff; border: 0; position: relative; overflow: hidden;
  background: radial-gradient(600px 240px at 100% 0, rgba(229, 57, 53, .45), transparent 60%), linear-gradient(135deg, #0d47a1, #1565c0 60%, #0b3d8f); }
.efn-next h2, .efn-next h3 { color: #fff; }
.efn-next .efn-eyebrow { color: #ffcdd2; }
.efn-next p { margin: .35rem 0 0; opacity: .92; line-height: 1.5; }
.efn-ring { --p: 0; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .18) 0); }
.efn-ring span { width: 88px; height: 88px; border-radius: 50%; background: #0d47a1; display: grid; place-items: center; font-weight: 900; font-size: 1.5rem; }
.efn-ring span small { display: block; font-size: .62rem; font-weight: 600; opacity: .8; letter-spacing: .08em; }
.efn-checks { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .35rem; }
.efn-checks li { display: flex; gap: .5rem; align-items: center; font-weight: 600; font-size: .92rem; }
.efn-checks li::before { content: "○"; width: 1.3rem; height: 1.3rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); font-size: .8rem; }
.efn-checks li.done::before { content: "✓"; background: #fff; color: var(--efn-green); }

.efn-rail { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0; position: relative; padding: 1rem .5rem .4rem; }
.efn-rail::before { content: ""; position: absolute; left: 5%; right: 5%; top: 2.05rem; height: 4px; border-radius: 4px; background: var(--efn-line); }
.efn-rail::after { content: ""; position: absolute; left: 5%; top: 2.05rem; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--efn-blue), var(--efn-red)); width: calc(var(--done, 0) * .9%); transition: width .6s ease; }
.efn-step { position: relative; z-index: 1; display: grid; justify-items: center; gap: .45rem; text-align: center; font-size: .74rem; font-weight: 700; color: var(--efn-muted); padding: 0 .15rem; }
.efn-step .pin { width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; background: var(--efn-card); border: 3px solid var(--efn-line); color: var(--efn-muted); font-weight: 900; }
.efn-step.done .pin { background: var(--efn-blue); border-color: var(--efn-blue); color: #fff; }
.efn-step.current .pin { background: var(--efn-red); border-color: #ffcdd2; color: #fff; box-shadow: 0 0 0 6px rgba(229, 57, 53, .15); animation: efn-pulse 2s ease-in-out infinite; }
.efn-step.current { color: var(--efn-ink); }
@keyframes efn-pulse { 50% { box-shadow: 0 0 0 10px rgba(229, 57, 53, .05); } }
@media (prefers-reduced-motion: reduce) { .efn-step.current .pin { animation: none; } .efn-rail::after { transition: none; } }

.efn-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.efn-tile { cursor: pointer; text-align: left; border: 1px solid var(--efn-line); }
.efn-tile:hover { border-color: var(--efn-blue-3); transform: translateY(-1px); }
.efn-tile .big { font-size: 1.6rem; font-weight: 900; color: var(--efn-ink); display: block; margin: .2rem 0; }
.efn-tile .lbl { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--efn-muted); }
.efn-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; align-items: start; }
.efn-officer { display: flex; gap: .9rem; align-items: center; }
.efn-officer .av { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, var(--efn-blue), var(--efn-blue-3)); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; flex: none; }
.efn-officer + .row { margin-top: 1rem; }
.efn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.efn-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.efn-timeline li { display: grid; grid-template-columns: 14px 1fr; gap: .8rem; padding: .5rem 0; position: relative; }
.efn-timeline li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--efn-blue); margin-top: .3rem; box-shadow: 0 0 0 4px var(--efn-sky); }
.efn-timeline li.override::before { background: var(--efn-red); box-shadow: 0 0 0 4px var(--efn-red-soft); }
.efn-timeline li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 1.3rem; bottom: -.4rem; width: 2px; background: var(--efn-line); }
.efn-timeline strong { color: var(--efn-ink); }

.efn-list { display: grid; gap: .7rem; }
.efn-item { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .9rem 1rem; border: 1px solid var(--efn-line); border-radius: 14px; background: var(--efn-card); }
.efn-item .badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--efn-sky); color: var(--efn-blue); font-size: 1.15rem; font-weight: 900; }
.efn-item h4 { margin: 0; font-size: .97rem; color: var(--efn-ink); }
.efn-item p { margin: .15rem 0 0; font-size: .84rem; color: var(--efn-muted); }
.efn-item .end { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }

.efn-amount { font-size: 1.35rem; font-weight: 900; color: var(--efn-ink); }
.efn-approvals { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .35rem; }

/* ------------------------------------------------------------------------------------------------------- messages */
.efn-chat { display: grid; grid-template-rows: 1fr auto; height: min(68vh, 680px); padding: 0; overflow: hidden; }
.efn-chat .feed { overflow-y: auto; padding: 1.2rem; display: flex; flex-direction: column-reverse; gap: .7rem; background: linear-gradient(180deg, var(--efn-sky-2), var(--efn-card)); }
.efn-bubble { max-width: min(76%, 560px); padding: .75rem .95rem; border-radius: 16px 16px 16px 4px; background: var(--efn-card); border: 1px solid var(--efn-line); box-shadow: 0 1px 2px rgba(13, 71, 161, .05); }
.efn-bubble.mine { align-self: flex-end; background: var(--efn-blue); color: #fff; border-color: var(--efn-blue); border-radius: 16px 16px 4px 16px; }
.efn-bubble.ann { max-width: 100%; align-self: stretch; border-left: 4px solid var(--efn-red); background: var(--efn-card); border-radius: 12px; }
.efn-bubble .who { font-size: .72rem; font-weight: 800; opacity: .75; margin-bottom: .2rem; display: block; }
.efn-bubble p { margin: 0; white-space: pre-wrap; line-height: 1.45; }
.efn-bubble time { display: block; font-size: .68rem; opacity: .6; margin-top: .35rem; }
.efn-compose { display: flex; gap: .6rem; padding: .8rem; border-top: 1px solid var(--efn-line); background: var(--efn-card); }
.efn-compose textarea { flex: 1; resize: none; border: 1.5px solid var(--efn-line); border-radius: 12px; padding: .65rem .8rem; min-height: 46px; max-height: 140px; background: var(--efn-card); color: var(--efn-text); }

/* ------------------------------------------------------------------------------------------------------- meetings */
.efn-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.efn-slot { border: 1.5px solid var(--efn-line); background: var(--efn-card); border-radius: 14px; padding: .7rem; text-align: left; cursor: pointer; color: var(--efn-text); }
.efn-slot strong { display: block; color: var(--efn-ink); }
.efn-slot:hover { border-color: var(--efn-blue-3); background: var(--efn-sky-2); }
.efn-slot.mine-officer { border-color: var(--efn-blue); }

/* ------------------------------------------------------------------------------------------------------- the exam */
.efn-exam { position: fixed; inset: 0; z-index: 50; background: var(--efn-bg); display: grid; grid-template-rows: auto 1fr; user-select: none; }
.efn-exam textarea { user-select: text; }
.efn-exam-top { display: flex; align-items: center; gap: 1rem; padding: .8rem clamp(1rem, 3vw, 2rem); background: #0b3d8f; color: #fff; }
.efn-exam-top h2 { color: #fff; font-size: 1.05rem; }
.efn-timer { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 900; font-size: 1.35rem; background: rgba(255, 255, 255, .12); padding: .35rem .8rem; border-radius: 10px; }
.efn-timer.low { background: var(--efn-red); animation: efn-blink 1s steps(2) infinite; }
@keyframes efn-blink { 50% { opacity: .75; } }
.efn-save { font-size: .78rem; opacity: .85; }
.efn-exam-body { overflow-y: auto; padding: 1.4rem clamp(1rem, 4vw, 3rem) 6rem; }
.efn-exam-body .inner { max-width: 860px; margin: 0 auto; display: grid; gap: 1rem; }
.efn-q { padding: 1.3rem; }
.efn-q .head { display: flex; justify-content: space-between; gap: .8rem; margin-bottom: .6rem; font-size: .8rem; font-weight: 800; color: var(--efn-muted); }
.efn-q .prompt { font-size: 1.05rem; color: var(--efn-ink); line-height: 1.55; margin: 0 0 .9rem; white-space: pre-wrap; }
.efn-opt { display: flex; gap: .7rem; align-items: center; padding: .75rem .9rem; border: 1.5px solid var(--efn-line); border-radius: 12px; margin-bottom: .5rem; cursor: pointer; background: var(--efn-card); }
.efn-opt:hover { border-color: var(--efn-blue-3); }
.efn-opt input { accent-color: var(--efn-blue); width: 1.1rem; height: 1.1rem; }
.efn-opt.on { border-color: var(--efn-blue); background: var(--efn-sky-2); }
.efn-q textarea { width: 100%; min-height: 140px; border: 1.5px solid var(--efn-line); border-radius: 12px; padding: .8rem; background: var(--efn-card); color: var(--efn-text); line-height: 1.55; }
.efn-q textarea.essay { min-height: 260px; }
.efn-words { font-size: .78rem; color: var(--efn-muted); text-align: right; margin-top: .3rem; }
.efn-words.over { color: var(--efn-red); font-weight: 700; }
.efn-exam-nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; padding: .7rem clamp(1rem, 3vw, 2rem); background: var(--efn-card); border-top: 1px solid var(--efn-line); }
.efn-exam-nav .dots { display: flex; gap: .3rem; flex-wrap: wrap; flex: 1; }
.efn-exam-nav .dots button { width: 2rem; height: 2rem; border-radius: 8px; border: 1.5px solid var(--efn-line); background: var(--efn-card); font-weight: 800; font-size: .75rem; cursor: pointer; color: var(--efn-text); }
.efn-exam-nav .dots button.done { background: var(--efn-blue); border-color: var(--efn-blue); color: #fff; }
.efn-integrity { background: var(--efn-amber-soft); color: var(--efn-amber); border-radius: 12px; padding: .7rem .9rem; font-size: .85rem; font-weight: 600; }

/* ------------------------------------------------------------------------------------------------------- dialogs */
.efn-dialog, .nx-dialog { border: 0; border-radius: 20px; padding: 0; width: min(560px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); box-shadow: 0 30px 80px rgba(11, 27, 51, .35); background: var(--efn-card); color: var(--efn-text); }
.efn-dialog::backdrop, .nx-dialog::backdrop { background: rgba(7, 17, 31, .55); backdrop-filter: blur(3px); }
.efn-dialog form, .nx-dialog form { padding: 1.4rem; }
.efn-dialog h3, .nx-dialog h3 { margin: 0 0 .3rem; font-size: 1.2rem; color: var(--efn-ink); }
.efn-dialog .acts, .nx-dialog .acts { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }
.efn-toast, .nx-toast { position: fixed; z-index: 100; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--efn-ink); color: #fff; padding: .8rem 1.1rem; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: calc(100vw - 2rem); }
.efn-toast.err, .nx-toast.err { background: var(--efn-red); }

/* --------------------------------------------------------------------------------------------------- responsive */
@media (max-width: 1100px) { .efn-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .efn-cols { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .efn-login { grid-template-columns: 1fr; }
  .efn-hero { padding: 2rem 1.25rem; }
  .efn-hero h1 { margin-top: 1.5rem; }
  .efn-hero .steps { grid-template-columns: repeat(2, 1fr); }
  .efn-shell { grid-template-columns: 1fr; }
  .efn-side { display: none; }
  .efn-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--efn-card); border-top: 1px solid var(--efn-line); padding: .35rem .3rem calc(.35rem + env(safe-area-inset-bottom)); }
  .efn-tabbar button { border: 0; background: transparent; display: grid; justify-items: center; gap: .1rem; font-size: .68rem; font-weight: 700; color: var(--efn-muted); padding: .35rem 0; border-radius: 10px; cursor: pointer; position: relative; }
  .efn-tabbar button .ico { font-size: 1.15rem; }
  .efn-tabbar button.on { color: var(--efn-blue); background: var(--efn-sky-2); }
  .efn-tabbar .count { position: absolute; top: 0; right: 22%; background: var(--efn-red); color: #fff; border-radius: 999px; font-size: .6rem; padding: 0 .3rem; }
  .efn-content { padding-bottom: 6rem; }
  .efn-next { grid-template-columns: 1fr; text-align: left; }
  .efn-ring { width: 92px; height: 92px; } .efn-ring span { width: 72px; height: 72px; font-size: 1.2rem; }
  .efn-rail { grid-template-columns: 1fr; gap: .2rem; padding: .2rem 0; }
  .efn-rail::before, .efn-rail::after { display: none; }
  .efn-step { grid-template-columns: auto 1fr; justify-items: start; text-align: left; align-items: center; font-size: .86rem; }
  .efn-me div { display: none; }
}
@media (max-width: 560px) {
  .efn-tiles { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .efn-grid2, .nx-grid2 { grid-template-columns: 1fr; }
  .efn-item { grid-template-columns: auto 1fr; }
  .efn-item .end { grid-column: 1 / -1; justify-content: flex-start; }
  .efn-top h1 { font-size: 1.05rem; }
}

/* ============================================================================ the Study Abroad Desk (staff portal) */
.nx { font-family: var(--efn-font); color: var(--efn-text); display: grid; gap: 1.1rem; }
.nx-hero { display: flex; gap: 1.2rem; align-items: center; padding: 1.3rem 1.5rem; border-radius: 22px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(500px 200px at 100% 0, rgba(229, 57, 53, .5), transparent 60%), linear-gradient(135deg, #0b3d8f, #0d47a1 55%, #1565c0); }
.nx-hero img { width: 58px; height: 58px; border-radius: 14px; background: #fff; padding: 3px; }
.nx-hero h2 { color: #fff; font-size: 1.4rem; font-weight: 900; }
.nx-hero p { margin: .2rem 0 0; opacity: .88; }
.nx-hero .acts { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.nx-hero .nx-btn.ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.nx-hero .nx-btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.nx-tabs { display: flex; gap: .3rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: thin; }
.nx-tabs button { border: 0; background: var(--efn-card); border: 1px solid var(--efn-line); color: var(--efn-muted); border-radius: 12px; padding: .55rem .9rem; font-weight: 700; cursor: pointer; white-space: nowrap; display: inline-flex; gap: .4rem; align-items: center; }
.nx-tabs button.on { background: var(--efn-blue); color: #fff; border-color: var(--efn-blue); }
.nx-tabs .count { background: var(--efn-red); color: #fff; border-radius: 999px; font-size: .68rem; padding: 0 .4rem; }
.nx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.nx-kpi { padding: 1rem; }
.nx-kpi b { display: block; font-size: 1.7rem; font-weight: 900; color: var(--efn-ink); }
.nx-kpi span { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--efn-muted); }
.nx-kpi.alert b { color: var(--efn-red); }
.nx-funnel { display: grid; gap: .45rem; }
.nx-bar { display: grid; grid-template-columns: 190px 1fr 90px; gap: .7rem; align-items: center; font-size: .84rem; }
.nx-bar .track { height: 12px; background: var(--efn-sky-2); border-radius: 999px; overflow: hidden; }
.nx-bar .fill { --w: 0; height: 100%; width: calc(var(--w) * 1%); background: linear-gradient(90deg, var(--efn-blue), var(--efn-blue-3)); border-radius: 999px; }
.nx-bar strong { color: var(--efn-ink); }
.nx-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: .8rem; overflow-x: auto; padding-bottom: .5rem; }
.nx-col { background: var(--efn-sky-2); border-radius: 16px; padding: .7rem; min-height: 160px; border: 1px solid var(--efn-line); }
.nx-col h4 { margin: 0 0 .6rem; font-size: .82rem; color: var(--efn-ink); display: flex; justify-content: space-between; }
.nx-case { background: var(--efn-card); border-radius: 12px; padding: .7rem; margin-bottom: .5rem; border: 1px solid var(--efn-line); cursor: pointer; display: grid; gap: .25rem; text-align: left; width: 100%; color: var(--efn-text); }
.nx-case:hover { border-color: var(--efn-blue-3); box-shadow: var(--efn-shadow); }
.nx-case strong { color: var(--efn-ink); font-size: .9rem; }
.nx-case small { color: var(--efn-muted); font-size: .75rem; }
.nx-case.stuck { border-left: 4px solid var(--efn-red); }
.nx-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.nx-toolbar input, .nx-toolbar select { border: 1.5px solid var(--efn-line); border-radius: 10px; padding: .5rem .7rem; background: var(--efn-card); color: var(--efn-text); }
.nx-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.nx-table th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--efn-muted); padding: .55rem .6rem; border-bottom: 1.5px solid var(--efn-line); }
.nx-table td { padding: .6rem; border-bottom: 1px solid var(--efn-line); vertical-align: top; }
.nx-table tr:hover td { background: var(--efn-sky-2); }
.nx-scroll { overflow-x: auto; }
.nx-two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; align-items: start; }
.nx-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.nx-file { display: grid; gap: 1rem; }
.nx-filehead { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nx-filehead .av { width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, var(--efn-blue), var(--efn-red)); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 1.15rem; }
.nx-filehead h2 { font-size: 1.3rem; }
.nx-steps { display: flex; gap: .25rem; flex-wrap: wrap; }
.nx-steps span { padding: .25rem .55rem; border-radius: 8px; font-size: .72rem; font-weight: 800; background: var(--efn-sky-2); color: var(--efn-muted); }
.nx-steps span.done { background: var(--efn-sky); color: var(--efn-blue); }
.nx-steps span.current { background: var(--efn-red); color: #fff; }
.nx-flag { font-size: .8rem; color: var(--efn-amber); background: var(--efn-amber-soft); border-radius: 10px; padding: .45rem .65rem; margin-top: .4rem; }
.nx-flag.high { color: var(--efn-red); background: var(--efn-red-soft); }
.nx-meter { --v: 0; height: 8px; border-radius: 999px; background: var(--efn-sky-2); overflow: hidden; margin-top: .3rem; }
.nx-meter i { display: block; height: 100%; width: calc(var(--v) * 1%); background: linear-gradient(90deg, #ffb300, var(--efn-red)); }
.nx-answer { white-space: pre-wrap; background: var(--efn-sky-2); border-radius: 12px; padding: .8rem; border: 1px solid var(--efn-line); line-height: 1.5; }
.nx-activity { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; max-height: 520px; overflow-y: auto; }
.nx-activity li { padding: .55rem .2rem; border-bottom: 1px solid var(--efn-line); font-size: .86rem; }
.nx-activity small { color: var(--efn-muted); display: block; font-size: .74rem; }
.nx-cred { background: var(--efn-sky-2); border: 1.5px dashed var(--efn-blue-3); border-radius: 14px; padding: 1rem; font-family: ui-monospace, Consolas, monospace; display: grid; gap: .3rem; }
@media (max-width: 1000px) { .nx-two, .nx-three { grid-template-columns: 1fr; } .nx-bar { grid-template-columns: 120px 1fr 70px; } }
@media (max-width: 600px) { .nx-hero { flex-wrap: wrap; } .nx-hero .acts { margin-left: 0; } }

/* the EF NEXUS entry point on the NIIT sign-in page */
.portal-choice.nexus-choice { display: flex; align-items: center; justify-content: center; gap: .45rem; text-decoration: none; grid-column: 1 / -1; background: linear-gradient(135deg, #0d47a1, #1565c0); color: #fff; border-color: #0d47a1; }
.portal-choice.nexus-choice:hover { background: linear-gradient(135deg, #0b3d8f, #0d47a1); color: #fff; }
.portal-choice.nexus-choice img { width: 22px; height: 22px; border-radius: 6px; background: #fff; padding: 1px; }

/* Desk inside the staff portal: neutralise the portal's global form sizing, keep wide content scrolling inside cards. */
.nx > *, .nx-two > *, .nx-three > * { min-width: 0; }
.nx-bar .track, .nx-bar .fill { display: block; }
.nx-toolbar input, .nx-toolbar select, .nx-toolbar textarea { width: auto; flex: 1 1 170px; min-width: 0; margin: 0; }
.nx-toolbar input[type=radio], .nx-toolbar input[type=checkbox], .nx label input[type=checkbox], .nx-dialog input[type=checkbox], .nx-dialog input[type=radio] { width: auto; flex: none; margin: 0 .35rem 0 0; vertical-align: middle; }
.nx-card h3 .nx-toolbar { margin-left: auto; }
.nx-card h3 { flex-wrap: wrap; }
.nx-card h3 > .nx-btn { margin-left: auto; }
.efn-card h3 > .efn-btn { margin-left: auto; }
.nx textarea, .nx-dialog textarea { font-family: var(--efn-font); font-size: .92rem; }

/* Phase 51: the Kairova entry on the NIIT sign-in page (midnight and gold, Kairova's own identity). */
.portal-choice.kairova-choice { display: flex; align-items: center; justify-content: center; gap: .45rem; text-decoration: none; grid-column: 1 / -1; background: linear-gradient(135deg, #0b1026, #1c2566 60%, #3a1f6b); color: #fff; border-color: #0b1026; }
.portal-choice.kairova-choice:hover { background: linear-gradient(135deg, #1c2566, #3a1f6b); color: #e9b949; }
.portal-choice.kairova-choice img { width: 22px; height: 22px; border-radius: 6px; }

/* ---------------------------------------------------------------------------------------------------- Phase 54: proctored exam
   docs/PHASE54_PROCTORED_EXAMINATION_CONTROL_ROOM_PROMPT.md - the lobby (system check), the full-screen paper with its
   watermark, the shields that hide the paper, the invigilator's messages and the phone-camera page. */
.efn-eyebrow.light { color: #ffb4b0; }
.efn-btn.light { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
.efn-btn.light:hover { background: rgba(255, 255, 255, .12); }
.efn-btn.big { padding: .95rem 1.4rem; font-size: 1.02rem; border-radius: 14px; }
.efn-btn.block { width: 100%; }
.efn-ok { color: var(--efn-green); font-weight: 600; }
.efn-warn { color: var(--efn-red); font-weight: 600; }
.efn-entry-chip { margin-left: auto; font-weight: 800; font-size: .8rem; letter-spacing: .04em; background: rgba(255, 255, 255, .14); padding: .4rem .7rem; border-radius: 999px; white-space: nowrap; }
.efn-exam-card.proctored { border-left: 4px solid var(--efn-red); padding-left: .9rem; }
.efn-entries { color: var(--efn-ink); }
.efn-safeguards { display: flex; flex-wrap: wrap; gap: .35rem; }
.efn-safeguards span { font-size: .74rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; background: var(--efn-sky-2); color: var(--efn-blue); border: 1px solid var(--efn-line); }

/* lobby */
.efn-exam.efn-lobby-view, .efn-exam.efn-done-view { user-select: auto; }
.efn-lobby { overflow-y: auto; padding: 1.6rem clamp(1rem, 4vw, 3rem) 3rem; background:
  radial-gradient(1200px 400px at 10% -10%, rgba(30, 136, 229, .14), transparent 60%),
  radial-gradient(900px 300px at 110% 0%, rgba(229, 57, 53, .08), transparent 60%), var(--efn-bg); }
.efn-lobby-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr); gap: 1.4rem; align-items: start; }
.efn-lobby-intro h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 900; margin-bottom: .4rem; }
.efn-lobby-intro p { color: var(--efn-muted); line-height: 1.6; margin: 0 0 1rem; }
.efn-lobby-steps { display: grid; gap: .8rem; }
.efn-step { display: grid; grid-template-columns: 2.4rem 1fr; gap: .9rem; background: var(--efn-card); border: 1px solid var(--efn-line); border-radius: var(--efn-radius); padding: 1.1rem 1.2rem; box-shadow: var(--efn-shadow); transition: border-color .2s ease; }
.efn-step .num { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--efn-sky); color: var(--efn-blue); }
.efn-step.done { border-color: rgba(19, 138, 94, .45); }
.efn-step.done .num { background: var(--efn-green); color: #fff; }
.efn-step h3 { font-size: 1rem; margin-bottom: .45rem; }
.efn-rules { margin: 0 0 .7rem; padding-left: 1.2rem; display: grid; gap: .35rem; line-height: 1.5; color: var(--efn-text); font-size: .92rem; }
.efn-rules.small { font-size: .85rem; }
.efn-check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; color: var(--efn-ink); cursor: pointer; }
.efn-check input { width: 1.15rem; height: 1.15rem; accent-color: var(--efn-blue); margin-top: .1rem; }
.efn-meter { position: relative; height: 12px; border-radius: 99px; background: var(--efn-sky); overflow: hidden; margin: .2rem 0 .5rem; --v: 0; }
.efn-meter i { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 1%); background: linear-gradient(90deg, var(--efn-green), #f9a825 70%, var(--efn-red)); transition: width .08s linear; }
.efn-meter b { position: absolute; top: -2px; bottom: -2px; width: 2px; left: calc(var(--v) * 1%); background: var(--efn-ink); opacity: .55; }
.efn-phone-setup { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; align-items: start; }
.efn-phone-setup .qr { background: #fff; border-radius: 14px; padding: .4rem; border: 1px solid var(--efn-line); min-height: 200px; display: grid; place-items: center; }
.efn-phone-setup .qr img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.efn-lobby-side { position: sticky; top: 0; display: grid; gap: 1rem; }
.efn-preview { position: relative; aspect-ratio: 4 / 3; border-radius: var(--efn-radius); overflow: hidden; background: linear-gradient(160deg, #0b1b33, #12305e); box-shadow: var(--efn-shadow); display: grid; place-items: center; }
.efn-preview.none { display: none; }
.efn-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.efn-preview p { color: #9fb2cc; font-size: .9rem; padding: 1rem; text-align: center; position: relative; }
.efn-rec { position: absolute; top: .55rem; left: .6rem; font-size: .68rem; font-weight: 900; letter-spacing: .08em; color: #fff; background: rgba(229, 57, 53, .92); padding: .2rem .5rem; border-radius: 6px; z-index: 2; }
.efn-ready ul { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .35rem; font-weight: 600; color: var(--efn-muted); }
.efn-ready li.ok { color: var(--efn-green); }

/* the paper */
.efn-exam.efn-paper-view { grid-template-rows: auto 1fr auto; }
.efn-exam-top .title { min-width: 0; }
.efn-exam-top .title h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.efn-paper-view .efn-timer { margin-left: 0; }
.efn-status { display: flex; gap: .3rem; }
.efn-status span { font-size: .72rem; font-weight: 800; padding: .3rem .5rem; border-radius: 8px; background: rgba(19, 138, 94, .9); color: #fff; white-space: nowrap; }
.efn-status span.bad { background: var(--efn-red); animation: efn-blink 1s steps(2) infinite; }
.efn-status.watched [data-s="net"] { background: #f9a825; color: #0b1b33; }
.efn-exam-body { position: relative; }
.efn-watermark { position: fixed; inset: 0; pointer-events: none; z-index: 3; background-image: var(--wm); background-repeat: repeat; }
.efn-exam-body .inner { position: relative; z-index: 2; }
.efn-exam-body.veiled .inner { filter: blur(14px); }
.efn-paper-view .efn-exam-nav { position: static; }
.efn-paper-view .efn-q .prompt { white-space: normal; }
.efn-q .prompt .katex-display { margin: .8rem 0; overflow-x: auto; overflow-y: hidden; }
.efn-opt .letter { flex: 0 0 auto; width: 1.7rem; height: 1.7rem; border-radius: 8px; display: grid; place-items: center; font-weight: 900; font-size: .8rem; background: var(--efn-sky); color: var(--efn-blue); }
.efn-opt.on .letter { background: var(--efn-blue); color: #fff; }
.efn-opt input { position: absolute; opacity: 0; pointer-events: none; }
.efn-opt { position: relative; }
.efn-opt .text { line-height: 1.5; }
.efn-qimg { margin: 0 0 1rem; border-radius: 12px; overflow: hidden; border: 1px solid var(--efn-line); background: #fff; display: grid; place-items: center; min-height: 80px; }
.efn-qimg img { display: block; max-width: 100%; max-height: 60vh; object-fit: contain; pointer-events: none; }
code.tex { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--efn-sky-2); padding: .05rem .3rem; border-radius: 5px; }
.efn-pip { position: fixed; right: 1rem; bottom: 4.6rem; z-index: 20; width: 176px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); border: 2px solid #fff; background: #0b1b33; }
.efn-pip video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.efn-shield, .efn-message { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 1rem; background: rgba(7, 17, 31, .92); backdrop-filter: blur(18px); }
.efn-shield[hidden], .efn-message[hidden], .efn-blank[hidden], .efn-phone-panel[hidden], .efn-offline[hidden] { display: none; }
.efn-shield .panel, .efn-message .panel { max-width: 520px; text-align: center; background: var(--efn-card); border-radius: 22px; padding: 2rem 1.8rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.efn-shield .ico { font-size: 2.6rem; color: var(--efn-red); }
.efn-shield h2, .efn-message h2 { font-size: 1.4rem; margin: .3rem 0 .5rem; }
.efn-message .text { font-size: 1.05rem; line-height: 1.55; color: var(--efn-ink); }
.efn-message .acts { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.efn-blank { position: fixed; inset: 0; z-index: 60; background: #000; }
.efn-blank::after { content: "Screenshots are not allowed - this was recorded."; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.2rem; }
.efn-phone-panel { position: fixed; left: 1rem; bottom: 4.6rem; z-index: 30; width: 220px; background: var(--efn-card); border-radius: 16px; padding: .9rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); border: 2px solid var(--efn-red); text-align: center; }
.efn-phone-panel img { width: 168px; height: 168px; image-rendering: pixelated; }
.efn-offline { position: fixed; top: 4.2rem; left: 50%; transform: translateX(-50%); z-index: 30; background: var(--efn-amber); color: #fff; font-weight: 700; padding: .6rem 1rem; border-radius: 12px; max-width: calc(100vw - 2rem); }
.efn-done { max-width: 560px; margin: auto; text-align: center; padding: 2rem 1.2rem; display: grid; gap: .5rem; justify-items: center; }
.efn-done-view { display: grid; place-items: center; background: radial-gradient(800px 400px at 50% 0%, rgba(30, 136, 229, .16), transparent 70%), var(--efn-bg); }
.efn-done .seal { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem; color: #fff; background: linear-gradient(140deg, var(--efn-green), #1fb47a); box-shadow: 0 14px 34px rgba(19, 138, 94, .35); }
.efn-done h1 { font-size: 1.8rem; font-weight: 900; }
@media print { body.efn * { visibility: hidden !important; } body.efn::after { content: "EF NEXUS examinations cannot be printed."; visibility: visible; } }
@media (max-width: 900px) {
  .efn-lobby-grid { grid-template-columns: 1fr; }
  .efn-lobby-side { position: static; }
  .efn-phone-setup { grid-template-columns: 1fr; }
  .efn-status { display: none; }
}

/* phone camera page */
body.efn-phone { background: #07111f; color: #eaf2ff; min-height: 100dvh; }
.efn-phone-main { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.efn-phone-main header { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; }
.efn-phone-main header img { border-radius: 10px; background: #fff; padding: 2px; }
.efn-phone-main header strong { display: block; color: #fff; }
.efn-phone-main header small { color: #9fb2cc; }
.efn-phone-main header .efn-rec { position: static; margin-left: auto; animation: efn-blink 1.4s steps(2) infinite; }
.efn-phone-stage { position: relative; overflow: hidden; background: #000; }
.efn-phone-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.efn-phone-overlay { position: relative; z-index: 2; margin: 1rem; padding: 1.3rem; border-radius: 20px; background: rgba(13, 27, 47, .96); display: grid; gap: .6rem; }
.efn-phone-overlay[hidden] { display: none; }
.efn-phone-overlay h1 { color: #fff; font-size: 1.35rem; }
.efn-phone-overlay .who { color: #9fb2cc; margin: 0; }
.efn-phone-overlay .efn-rules { color: #d6e2f5; }
.efn-phone-main footer { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); font-size: .88rem; color: #9fb2cc; }
.efn-phone-main footer .ok { color: #7ee2b8; }
.efn-phone-main footer .bad { color: #ff8a80; }
span.tex:not([data-done]) { font-family: ui-monospace, Consolas, monospace; font-size: .9em; background: var(--efn-sky-2); padding: .05rem .3rem; border-radius: 5px; }
span.tex.display { display: block; text-align: center; margin: .6rem 0; overflow-x: auto; }
.efn-step .body, .efn-lobby-intro, .efn-ready { text-align: left; }
.efn-status.live [data-s="net"]::after { content: " · watched live"; }
.efn-talking { position: fixed; top: 4.4rem; left: 50%; transform: translateX(-50%); z-index: 35; background: var(--efn-blue); color: #fff; font-weight: 800; padding: .7rem 1.1rem; border-radius: 14px; box-shadow: 0 14px 34px rgba(13, 71, 161, .4); max-width: calc(100vw - 2rem); animation: efn-blink 1.6s steps(2) infinite; }
.efn-talking[hidden] { display: none; }

/* ---------------------------------------------------------------------------------------------------- Phase 54: the Desk
   Exam Control Room (tiles and the live sitting view), the question bank with mathematics, the exam builder, grading
   and People & officers. */
.nx-dialog.wide { width: min(1180px, calc(100vw - 2rem)); }
.nx-room { display: grid; gap: 1rem; }
.nx-room-head { display: grid; gap: .8rem; }
.nx-chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.nx-chip { display: grid; text-align: left; gap: .1rem; padding: .6rem .85rem; border-radius: 14px; border: 1.5px solid var(--efn-line); background: var(--efn-card); cursor: pointer; color: var(--efn-text); }
.nx-chip small { color: var(--efn-muted); font-size: .74rem; }
.nx-chip.on { border-color: var(--efn-blue); background: var(--efn-sky-2); box-shadow: 0 0 0 3px rgba(30, 136, 229, .15); }
.nx-live-dot { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--efn-green); display: inline-flex; align-items: center; gap: .4rem; }
.nx-live-dot::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--efn-green); animation: efn-blink 1.2s steps(2) infinite; }
.nx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; }
.nx-tile { display: grid; gap: .45rem; text-align: left; padding: .6rem; border-radius: 18px; border: 1.5px solid var(--efn-line); background: var(--efn-card); box-shadow: var(--efn-shadow); cursor: pointer; color: var(--efn-text); transition: transform .12s ease, box-shadow .12s ease; }
.nx-tile:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(13, 71, 161, .16); }
.nx-tile.risk-high { border-color: var(--efn-red); box-shadow: 0 0 0 3px rgba(229, 57, 53, .14), var(--efn-shadow); }
.nx-tile.risk-medium { border-color: #f9a825; }
.nx-tile .cams { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, #0b1b33, #12305e); }
.nx-tile .cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.nx-tile .phone { position: absolute; right: .4rem; bottom: .4rem; width: 38%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 2px solid #fff; background: #0b1b33; }
.nx-tile img.none, .nx-tile img:not([src]) { visibility: hidden; }
.nx-livebadge, .nx-talkbadge { position: absolute; top: .4rem; left: .4rem; background: var(--efn-red); color: #fff; font-size: .66rem; font-weight: 900; padding: .15rem .45rem; border-radius: 6px; letter-spacing: .08em; }
.nx-talkbadge { left: auto; right: .4rem; background: var(--efn-blue); }
.nx-tile .who { display: grid; }
.nx-tile .who small { color: var(--efn-muted); font-size: .74rem; }
.nx-tile .meta { display: flex; flex-wrap: wrap; gap: .25rem; }
.nx-tile .bar, .nx-tile .noise { height: 6px; border-radius: 99px; background: var(--efn-sky); overflow: hidden; --v: 0; }
.nx-tile .bar i, .nx-tile .noise i { display: block; height: 100%; width: calc(var(--v) * 1%); background: var(--efn-blue); }
.nx-tile .noise i { background: linear-gradient(90deg, var(--efn-green), #f9a825, var(--efn-red)); }
.nx-tile .flags { display: flex; flex-wrap: wrap; gap: .25rem; }
.nx-tile .flags em { font-style: normal; font-size: .7rem; font-weight: 800; color: var(--efn-red); background: var(--efn-red-soft); padding: .1rem .4rem; border-radius: 6px; }
.nx-tile .last { display: grid; color: var(--efn-muted); font-size: .74rem; }
.nx-sitting { padding: 1.2rem; display: grid; gap: 1rem; }
.nx-sitting header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.nx-sitting header h3 small { font-weight: 600; font-size: .85rem; }
.nx-sitting-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 1rem; }
.nx-feeds { display: grid; grid-template-columns: 1.6fr 1fr; gap: .7rem; align-content: start; }
.nx-feeds .feed { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #0b1b33, #12305e); }
.nx-feeds .feed video, .nx-feeds .feed img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nx-feeds .feed.main video, .nx-feeds .feed.main img { transform: scaleX(-1); }
.nx-feeds .feed video:not(.on) { display: none; }
.nx-feeds .feed img[hidden] { display: none; }
.nx-feeds figcaption { position: absolute; left: .5rem; bottom: .5rem; right: .5rem; display: flex; gap: .4rem; align-items: center; color: #fff; font-size: .78rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.nx-live-controls, .nx-feeds > p { grid-column: 1 / -1; }
.nx-live-controls { display: flex; flex-wrap: wrap; gap: .5rem; }
.nx-btn.speaking { animation: efn-blink 1s steps(2) infinite; }
.nx-sitting-side { display: grid; gap: .8rem; align-content: start; }
.nx-quick { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.nx-quick .nx-btn { text-align: left; font-weight: 600; font-size: .78rem; }
.nx-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; max-height: 320px; overflow-y: auto; }
.nx-timeline li { display: grid; padding: .45rem .6rem; border-left: 3px solid var(--efn-line); background: var(--efn-sky-2); border-radius: 8px; font-size: .84rem; }
.nx-timeline li small { color: var(--efn-muted); }
.nx-timeline li.sev-1 { border-left-color: #f9a825; }
.nx-timeline li.sev-2 { border-left-color: #ef6c00; }
.nx-timeline li.sev-3 { border-left-color: var(--efn-red); background: var(--efn-red-soft); }
.nx-evidence { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.nx-evidence figure { margin: 0; }
.nx-evidence img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--efn-sky); }
.nx-evidence figcaption { font-size: .72rem; color: var(--efn-muted); }
.nx-qr { display: flex; gap: .8rem; align-items: center; margin-top: .6rem; }
.nx-qr img { image-rendering: pixelated; border-radius: 10px; border: 1px solid var(--efn-line); }
.nx-qlist { display: grid; gap: .4rem; max-height: 640px; overflow-y: auto; }
.nx-qrow { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: start; padding: .7rem .8rem; border: 1px solid var(--efn-line); border-radius: 12px; cursor: pointer; }
.nx-qrow:hover { background: var(--efn-sky-2); }
.nx-qrow.retired { opacity: .55; }
.nx-qrow .body { display: grid; gap: .2rem; }
.nx-qrow .prompt { color: var(--efn-ink); line-height: 1.45; }
.nx-qrow .acts { display: flex; gap: .3rem; }
.nx-answer-key { font-size: .8rem; color: var(--efn-green); font-weight: 700; }
.nx-sets { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .3rem 0 .7rem; }
.nx-set { display: inline-flex; align-items: center; }
.nx-x { border: 0; background: transparent; color: var(--efn-muted); font-size: 1.1rem; cursor: pointer; padding: 0 .3rem; }
.nx-mathbar { display: flex; flex-wrap: wrap; gap: .25rem; }
.nx-mathbar button { border: 1px solid var(--efn-line); background: var(--efn-card); color: var(--efn-ink); border-radius: 7px; padding: .2rem .45rem; font-size: .8rem; cursor: pointer; font-family: "Cambria Math", "Times New Roman", serif; }
.nx-mathbar button:hover { border-color: var(--efn-blue-3); background: var(--efn-sky-2); }
.nx-preview { border: 1.5px dashed var(--efn-line); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .8rem; background: var(--efn-sky-2); }
.nx-preview .prompt { line-height: 1.55; color: var(--efn-ink); }
.nx-qimg { margin: .4rem 0; }
.nx-qimg img { max-width: 100%; max-height: 300px; border-radius: 10px; border: 1px solid var(--efn-line); background: #fff; }
.nx-optrow { display: flex; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.nx-optrow input[type=radio] { accent-color: var(--efn-green); width: 1.1rem; height: 1.1rem; }
.nx-optrow .letter { font-weight: 900; color: var(--efn-blue); width: 1.2rem; }
.nx-optrow input[data-opt] { flex: 1; }
.nx-fs { border: 1px solid var(--efn-line); border-radius: 14px; padding: .8rem 1rem; margin: 0 0 .8rem; }
.nx-fs legend { font-weight: 800; color: var(--efn-ink); padding: 0 .4rem; }
.nx-fs[disabled] { opacity: .6; }
.nx-pick { display: grid; gap: .3rem; max-height: 260px; overflow-y: auto; border: 1px solid var(--efn-line); border-radius: 12px; padding: .5rem; margin: .5rem 0; }
.nx-pick.small { max-height: 200px; }
.nx-pick label { display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: start; padding: .35rem .4rem; border-radius: 8px; cursor: pointer; }
.nx-pick label:hover { background: var(--efn-sky-2); }
.nx-pick label[hidden] { display: none; }
.nx-pick label span { display: grid; font-size: .86rem; }
.nx-pick small { color: var(--efn-muted); font-size: .74rem; }
.nx-switch { display: inline-flex; gap: .4rem; align-items: center; cursor: pointer; }
.nx-switch input { accent-color: var(--efn-red); width: 1.05rem; height: 1.05rem; }
#pBox.off { opacity: .4; pointer-events: none; }
.nx-person { display: inline-flex; gap: .5rem; align-items: center; padding: .35rem .6rem .35rem .35rem; border-radius: 999px; background: var(--efn-sky-2); border: 1px solid var(--efn-line); }
.nx-person .av { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--efn-blue); color: #fff; font-weight: 800; font-size: .72rem; }
.nx-person span { display: grid; font-size: .8rem; }
.nx-person small { color: var(--efn-muted); }
.nx-scroll.tall { max-height: 520px; overflow-y: auto; }
.nx-gq .prompt { line-height: 1.55; color: var(--efn-ink); margin: .3rem 0 .5rem; }
.nx-opts { margin: 0 0 .4rem; padding-left: 1.4rem; display: grid; gap: .2rem; }
.nx-opts li { padding: .25rem .4rem; border-radius: 6px; }
.nx-opts li.right { background: var(--efn-green-soft); color: var(--efn-green); font-weight: 700; }
.nx-opts li.chosen:not(.right) { background: var(--efn-red-soft); color: var(--efn-red); }
.nx-opts em { font-style: normal; font-size: .75rem; font-weight: 800; }
.nx-actions { white-space: nowrap; }
.nx-actions .nx-btn { margin: .1rem 0; }
.nx-warn-text { color: var(--efn-red); font-weight: 700; }
@media (max-width: 960px) { .nx-sitting-grid, .nx-feeds { grid-template-columns: 1fr; } .nx-actions { white-space: normal; } }
.efn-shield.embargo { background: rgba(58, 10, 12, .94); }
.efn-shield.embargo .panel { border-top: 6px solid var(--efn-red); max-width: 600px; }
.efn-shield.embargo .ico { font-size: 3rem; animation: efn-blink 1.4s steps(2) infinite; }
.efn-shield .efn-btn[hidden] { display: none; }

/* ---------------------------------------------------------------------------------------------------- Phase 54: simulation,
   embargo and integrity metrics. Simulations are violet everywhere so a rehearsal is never mistaken for an exam. */
:root, .nx { --efn-violet: #6a1b9a; --efn-violet-soft: #f3e5f5; }
.efn-sim, .nx-sim { display: inline-flex; align-items: center; font-size: .66rem; font-weight: 900; letter-spacing: .12em; color: #fff; background: linear-gradient(135deg, #6a1b9a, #8e24aa); padding: .18rem .5rem; border-radius: 6px; margin-right: .4rem; vertical-align: middle; }
.efn-exam-card.simulation { border-left: 4px solid var(--efn-violet); background: linear-gradient(90deg, var(--efn-violet-soft), transparent 40%); }
.efn-sim-ribbon { position: fixed; top: 3.8rem; left: 0; right: 0; z-index: 15; text-align: center; font-weight: 800; font-size: .78rem; letter-spacing: .06em; color: #fff; padding: .35rem 1rem; background: repeating-linear-gradient(135deg, #6a1b9a 0 18px, #7b1fa2 18px 36px); pointer-events: none; }
.efn-exam:has(.efn-sim-ribbon) .efn-exam-body, .efn-exam:has(.efn-sim-ribbon) .efn-lobby { padding-top: 3.4rem; }
.nx-chip.sim { border-color: var(--efn-violet); }
.nx-sim-row td { background: var(--efn-violet-soft); }
.nx-studio { border: 2px solid var(--efn-violet); background: linear-gradient(160deg, var(--efn-violet-soft), var(--efn-card) 45%); margin-bottom: 1rem; }
.nx-studio header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.nx-sitters { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .7rem; margin: .8rem 0; }
.nx-sitter { display: grid; gap: .25rem; padding: .8rem .9rem; border-radius: 14px; background: var(--efn-card); border: 1.5px solid var(--efn-line); }
.nx-sitter.efn { border-left: 5px solid var(--efn-blue); }
.nx-sitter.niit { border-left: 5px solid #c9a227; }
.nx-sitter small { color: var(--efn-muted); }
.nx-sitter .nx-btn { justify-self: start; margin-top: .3rem; }
.nx-acct { justify-self: start; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 6px; }
.nx-acct.efn { background: var(--efn-sky); color: var(--efn-blue); }
.nx-acct.niit { background: #fbf3d5; color: #8a6d00; }
.nx-cred { display: grid; gap: .35rem; padding: .8rem; border-radius: 12px; background: var(--efn-sky-2); border: 1px dashed var(--efn-line); font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.nx-tile.embargo { border-color: var(--efn-red); box-shadow: 0 0 0 4px rgba(229, 57, 53, .25), var(--efn-shadow); animation: nx-alarm 1.6s ease-in-out infinite; }
@keyframes nx-alarm { 50% { box-shadow: 0 0 0 7px rgba(229, 57, 53, .12), var(--efn-shadow); } }
.nx-embargo-banner { display: block; background: var(--efn-red); color: #fff; font-weight: 800; font-size: .74rem; padding: .35rem .55rem; border-radius: 8px; }
.nx-embargo-card { border: 2px solid var(--efn-red); background: var(--efn-red-soft); }
.nx-presence small { color: var(--efn-muted); font-size: .72rem; }
.nx-metrics h4 { margin: 0 0 .3rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--efn-muted); }
.nx-presence-bars { display: grid; gap: .3rem; margin-bottom: .3rem; }
.nx-pbar { display: grid; grid-template-columns: 8.5rem 1fr 3.2rem; gap: .5rem; align-items: center; font-size: .78rem; --v: 0; }
.nx-pbar i { height: 8px; border-radius: 99px; background: var(--efn-sky); position: relative; overflow: hidden; }
.nx-pbar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 1%); background: var(--efn-green); border-radius: 99px; }
.nx-pbar.warn i::after { background: #f9a825; }
.nx-pbar.bad i::after { background: var(--efn-red); }
.nx-pbar b { text-align: right; }
.nx-metric-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; margin-top: .5rem; }
.nx-metric-groups section { border: 1px solid var(--efn-line); border-radius: 12px; padding: .55rem .65rem; border-top: 4px solid var(--efn-green); }
.nx-metric-groups section.sev-1 { border-top-color: #f9a825; }
.nx-metric-groups section.sev-2 { border-top-color: #ef6c00; }
.nx-metric-groups section.sev-3 { border-top-color: var(--efn-red); }
.nx-metric-groups ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.nx-metric-groups li { display: flex; justify-content: space-between; gap: .4rem; font-size: .74rem; color: var(--efn-muted); }
.nx-metric-groups li.hit { color: var(--efn-ink); font-weight: 700; }
.nx-metric-groups li.hit.sev-3 b { color: var(--efn-red); }
.nx-metric-groups li.hit.sev-2 b { color: #ef6c00; }
.efn-status [data-s="face"].bad { background: var(--efn-red); }
/* NIIT portal: the test student's simulation page and the leadership exam card */
.efn-sim-page { display: grid; gap: 1rem; }
.efn-sim-hero { padding: 1.3rem 1.5rem; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #4a148c, #6a1b9a 55%, #0d47a1); }
.efn-sim-hero h2 { color: #fff; margin: .2rem 0; }
.hm-exams { border-top: 4px solid var(--efn-blue, #0d47a1); }
.hm-exams .hm-exam-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.hm-exams .hm-exam-kpis div { padding: .6rem .7rem; border-radius: 12px; background: rgba(13, 71, 161, .06); }
.hm-exams .hm-exam-kpis strong { display: block; font-size: 1.4rem; }
.hm-exams .hm-exam-kpis span { font-size: .74rem; opacity: .75; }
.hm-exams .hm-exam-kpis .alert strong { color: #e53935; }
.hm-exams ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .25rem; font-size: .88rem; }
