#ems-profiles{background:#070b10;padding:70px max(20px,5vw);color:#edf3f8;scroll-margin-top:95px}#ems-profiles *{box-sizing:border-box}.ep-top,.ep-actions{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.ep-kicker{font:11px monospace;letter-spacing:2px;color:#53d6ed}.ep-top h2{font-size:clamp(28px,4vw,48px);margin:8px 0 20px}.ep-button{padding:11px 18px;background:#11222d;color:#82e2f0;border:1px solid #365563;cursor:pointer;font:inherit}.ep-button:disabled{opacity:.5;cursor:wait}.ep-button.gold{background:#362709;color:#ffbd46;border-color:#6a501d}.ep-message{padding:16px;border:1px solid #594522;color:#ffd38a;margin:18px 0;white-space:pre-wrap}.ep-search,.ep-field input,.ep-field textarea{width:100%;padding:12px;border:1px solid #354454;background:#101821;color:#fff;font:inherit}.ep-search{max-width:450px;margin:18px 0}.ep-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:14px}.ep-card,.ep-panel{border:1px solid #2a3948;background:#080d13;padding:20px;margin:14px 0}.ep-card h3{font-size:24px;margin:12px 0}.ep-muted{color:#94a7b7;font-size:13px}.ep-photo{width:100%;height:210px;object-fit:cover;background:#111b26}.ep-letter{display:flex;align-items:center;justify-content:center;font-size:90px;font-weight:800;color:#3d5770;background:linear-gradient(145deg,#171512,#080d13);height:210px}.ep-hero{display:grid;grid-template-columns:190px 1fr;gap:28px;min-height:245px}.ep-hero .ep-photo,.ep-hero .ep-letter{height:100%;min-height:210px}.ep-hero h2{font-size:clamp(28px,5vw,52px);margin:10px 0}.ep-rank{color:#ffb834;font-weight:bold}.ep-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.ep-stat{border:1px solid #293746;padding:18px}.ep-stat strong{display:block;color:#53d6ed;font-size:28px;margin-top:8px}.ep-stat:first-child strong{color:#ffb834}.ep-duty{border-color:#66501c;background:#100f0b}.ep-duty progress{width:100%;height:12px;accent-color:#ffb834;margin:16px 0}.ep-badges{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.ep-badge{font:12px monospace;padding:7px 10px;border:1px solid #28505e;color:#9cd4e2}.ep-bio{white-space:pre-wrap;line-height:1.9;overflow-wrap:anywhere}.ep-links{display:flex;gap:12px;flex-wrap:wrap}.ep-links a{color:#65daed;text-decoration:underline}.ep-field{display:grid;gap:9px;margin:18px 0}.ep-field textarea{min-height:160px;resize:vertical}.ep-compare{display:grid;grid-template-columns:1fr 1fr;gap:16px}.ep-compare .ep-photo{max-width:220px}.ep-history{padding:12px;border-bottom:1px solid #263746}.ep-panel h3{margin-top:0}.ep-error{color:#ffacac}#ems-profiles [hidden]{display:none!important}@media(max-width:650px){.ep-hero{grid-template-columns:1fr}.ep-hero .ep-photo,.ep-hero .ep-letter{height:230px}.ep-stats{grid-template-columns:1fr 1fr}.ep-compare{grid-template-columns:1fr}.ep-top{align-items:flex-start}#ems-profiles{padding:40px 16px}}@media(prefers-reduced-motion:reduce){#ems-profiles{scroll-behavior:auto}}
/* V2: consistent card alignment and bilingual management forms. */
.ep-grid{grid-template-columns:repeat(auto-fill,minmax(245px,1fr))}.ep-card{display:flex;flex-direction:column}.ep-card h3{overflow-wrap:anywhere;line-height:1.4}.ep-card .ep-button{margin-top:auto;align-self:flex-start}.ep-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}.ep-field input[type=checkbox]{width:20px;height:20px;justify-self:start}.ep-panel{overflow-wrap:anywhere}.ep-history time{display:inline-block;margin-inline:8px}.ep-field input[type=file]{white-space:normal}@media(max-width:650px){.ep-form-grid{grid-template-columns:1fr}}
/* Compact clickable directory, based on the supplied reference. */
#ems-profiles .ep-filter-bar{border:1px solid #293847;background:linear-gradient(110deg,#080d14,#1a2432);margin:22px 0 16px}.ep-filter-bar .ep-search{display:block;width:100%;max-width:none;margin:0;border:0;border-bottom:1px solid #1d2a37;border-radius:0;background:#070c12;padding:17px 18px;font-size:14px}.ep-filter-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));max-width:850px}.ep-filter-box{display:grid;gap:7px;padding:12px 14px;background:#080e15;border-inline-end:1px solid #24323f;min-width:0}.ep-filter-box>span{font:10px monospace;letter-spacing:1.5px;color:#8da3bb;text-transform:uppercase}.ep-filter-box select{width:100%;min-width:0;background:#080e15;color:#e3edf6;border:0;font-family:inherit;font-size:13px;cursor:pointer;accent-color:#4bd9ed}.ep-filter-box select:focus-visible,.ep-filter-bar .ep-search:focus-visible{outline:2px solid #53d6ed;outline-offset:-2px}.ep-directory-meta{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;margin:14px 0 20px}.ep-compact-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.ep-person-card{margin:0;padding:16px;min-height:150px;text-decoration:none;color:#e7eef7;border:1px solid #23313e;background:linear-gradient(145deg,#080d13,#05090e);transition:border-color .15s,background .15s;cursor:pointer;text-align:start}.ep-person-card:hover{border-color:#4ba6bb;background:#0b1720}.ep-person-card:focus-visible{outline:2px solid #65e3f5;outline-offset:3px}.ep-card-meta{display:flex;align-items:center;gap:9px;min-height:18px}.ep-callsign{font:bold 11px monospace;color:#ffc044;letter-spacing:1px}.ep-agency-chip{font:10px monospace;letter-spacing:1px;color:#57d9f2;border:1px solid #205166;padding:1px 5px}.ep-medical-mark{margin-inline-start:auto;color:#526574;font-size:14px}.ep-person-card h3{font-size:16px;margin:9px 0 8px;font-weight:750;color:#e4eaf2;line-height:1.4}.ep-person-card .ep-card-rank{font:10px/1.7 monospace;letter-spacing:1px;color:#91adc7;text-transform:uppercase;margin:0 0 9px}.ep-card-foot{display:flex;flex-wrap:wrap;gap:5px;align-items:center;border-top:1px solid #17232e;padding-top:10px;margin-top:auto}.ep-card-points{color:#ffb52d;font-size:21px;font-weight:800;line-height:1.1;margin-inline-end:4px}.ep-unit-chip{font-size:9px;padding:2px 5px;color:#d1b76e;border:1px solid #554724}.ep-cert-chip{font-size:9px;color:#8ca4b6;border:1px solid #243744;padding:2px 4px}#ems-profiles[dir=rtl] .ep-card-rank,#ems-profiles[dir=rtl] .ep-filter-box>span{letter-spacing:0;font-family:inherit}.ep-grid[aria-busy=true]{opacity:.6}@media(max-width:1250px){.ep-compact-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:1000px){.ep-compact-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:760px){.ep-compact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ep-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:480px){.ep-compact-grid{grid-template-columns:1fr}.ep-filter-row{grid-template-columns:repeat(2,minmax(0,1fr))}.ep-person-card{min-height:140px}}@media(prefers-reduced-motion:reduce){.ep-person-card{transition:none}}
/* V3: profile header and long-form service record. */
#ems-profiles.ep-profile-page{max-width:1320px;margin:auto;padding-top:36px}.ep-profile-page .ep-hero{grid-template-columns:minmax(190px,26%) minmax(0,1fr);gap:0;padding:0;min-height:320px}.ep-portrait{position:relative;background:radial-gradient(ellipse at center,#28251b,#080c12 65%);min-height:320px}.ep-portrait .ep-photo,.ep-portrait .ep-letter{height:100%;min-height:320px;max-height:440px;object-fit:cover}.ep-portrait-agency{position:absolute;top:12px;inset-inline-start:12px;font:10px monospace;color:#66d9ef;border:1px solid #285363;background:#071018;padding:3px 7px;letter-spacing:1px}.ep-hero-info{padding:34px 28px}.ep-hero-info h2{font-family:Rajdhani,Cairo,sans-serif;font-size:clamp(32px,4.8vw,66px);font-weight:800;line-height:1.05;margin:12px 0}.ep-hero-info>.ep-kicker{color:#ffb631}.ep-rank{text-transform:uppercase;letter-spacing:1.5px;font-size:13px}.ep-admin-rank{font-size:12px;color:#c2d2df}.ep-profile-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;border-top:1px solid #273746;padding-top:18px;margin:24px 0 14px}.ep-profile-meta small{display:block;color:#809bb6;font:10px monospace;letter-spacing:1px;margin-bottom:8px}.ep-profile-meta strong{display:block;font-size:12px;color:#e0eaf3;overflow-wrap:anywhere}.ep-hero-info .ep-links{margin-top:16px}.ep-hero-info .ep-links a{display:inline-block;border:1px solid #2d4352;padding:7px 14px;font:12px monospace;letter-spacing:1px;text-decoration:none;color:#dce9f2}.ep-score-strip{display:grid;grid-template-columns:1fr 1fr;border:1px solid #293746;margin:14px 0}.ep-score-strip .ep-stat{border:0;padding:14px 18px}.ep-score-strip .ep-stat strong{font:800 38px/1 Rajdhani,Cairo,sans-serif}.ep-score-strip .ep-stat:nth-child(2) strong{color:#e6eef8}.ep-hours-panel{border:1px solid #293746;margin:14px 0}.ep-hours-panel>.ep-kicker{padding:10px 14px;border-bottom:1px solid #25313e}.ep-hours-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.ep-hours-grid .ep-stat{border:0;border-inline-end:1px solid #25313e;padding:12px 16px}.ep-hours-grid .ep-stat strong{font:700 27px Rajdhani,Cairo,sans-serif;color:#dbe4ef;margin:0 0 5px}.ep-hours-grid .ep-stat:first-child strong{color:#4ed3eb}.ep-hours-grid .ep-stat .ep-muted{font-size:11px}.ep-duty-number{font:700 25px Rajdhani,Cairo,sans-serif}.ep-next-rank{font:800 27px Rajdhani,Cairo,sans-serif;text-transform:uppercase;margin:12px 0}.ep-duty .ep-kicker{color:#f4b735}.ep-profile-page .ep-duty{padding:20px;margin:18px 0}.ep-profile-page .ep-duty progress{height:10px}.ep-profile-page .ep-badge{border-radius:0;font-size:11px}.oh-profile-nav{color:#bfe5f0!important;font-weight:700;text-decoration:none;white-space:nowrap}.oh-profile-nav:hover{color:#fff!important;text-decoration:underline}#ep-bind select{background:#101821;border:1px solid #354454;color:#fff;padding:12px;width:100%;min-width:0}#ems-profiles[dir=rtl] .ep-profile-meta small{font-family:inherit;letter-spacing:0}@media(max-width:700px){.ep-profile-page .ep-hero{grid-template-columns:1fr}.ep-portrait{min-height:240px}.ep-portrait .ep-photo,.ep-portrait .ep-letter{height:280px;min-height:240px}.ep-hero-info{padding:22px 18px}.ep-profile-meta{grid-template-columns:1fr 1fr;gap:15px}.ep-hours-grid{grid-template-columns:1fr}.ep-hours-grid .ep-stat{border-bottom:1px solid #25313e}.ep-profile-page .ep-hero h2{font-size:38px}}
.oh-profile-nav{display:inline-block;max-width:190px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}

/* V4: use the site's live dark/light palette and compact profile dimensions. */
#ems-profiles{background:var(--bg);color:var(--oh-copy);font-family:inherit}
#ems-profiles.ep-profile-page{max-width:1060px;padding:24px 24px 48px}
#ems-profiles .ep-panel,#ems-profiles .ep-person-card,#ems-profiles .ep-score-strip,#ems-profiles .ep-hours-panel,#ems-profiles .ep-filter-bar{background:var(--oh-surface);border-color:var(--oh-border);color:var(--oh-copy)}
#ems-profiles .ep-person-card:hover{background:var(--oh-surface-2);border-color:var(--cyan)}
#ems-profiles .ep-muted,#ems-profiles .ep-filter-box>span,#ems-profiles .ep-profile-meta small,#ems-profiles .ep-card-rank,#ems-profiles .ep-admin-rank{color:var(--oh-copy-muted)}
#ems-profiles h2,#ems-profiles h3,#ems-profiles .ep-profile-meta strong,#ems-profiles .ep-duty-number{color:var(--oh-copy);text-align:start;direction:inherit;letter-spacing:normal}
#ems-profiles .ep-kicker,#ems-profiles .ep-agency-chip,#ems-profiles .ep-badge{color:var(--cyan)}
#ems-profiles .ep-rank,#ems-profiles .ep-callsign,#ems-profiles .ep-card-points,#ems-profiles .ep-score-strip strong{color:var(--red)}
#ems-profiles .ep-button,#ems-profiles .ep-hero-info .ep-links a{background:var(--oh-surface-2);color:var(--oh-copy);border-color:var(--oh-border)}
#ems-profiles .ep-button:hover,#ems-profiles .ep-links a:hover{border-color:var(--cyan)}
#ems-profiles input,#ems-profiles textarea,#ems-profiles select,#ems-profiles .ep-filter-box{background:var(--oh-field);color:var(--oh-copy);border-color:var(--oh-border)}
#ems-profiles .ep-badge,#ems-profiles .ep-card-foot,#ems-profiles .ep-profile-meta,#ems-profiles .ep-hours-panel>.ep-kicker,#ems-profiles .ep-stat,#ems-profiles .ep-unit-chip,#ems-profiles .ep-cert-chip{border-color:var(--oh-border)}
#ems-profiles .ep-unit-chip,#ems-profiles .ep-cert-chip{color:var(--oh-copy-muted)}
#ems-profiles .ep-portrait,#ems-profiles .ep-letter{background:var(--oh-field);color:var(--oh-copy-muted)}
#ems-profiles.ep-profile-page .ep-hero{grid-template-columns:160px minmax(0,1fr);min-height:220px}
#ems-profiles .ep-portrait{min-height:220px}
#ems-profiles .ep-portrait .ep-photo,#ems-profiles .ep-portrait .ep-letter{min-height:220px;max-height:300px;height:100%;width:100%;object-fit:cover}
#ems-profiles .ep-hero-info{padding:18px 20px}
#ems-profiles .ep-hero-info h2{font-size:clamp(26px,3vw,40px);margin:8px 0;line-height:1.12}
#ems-profiles .ep-profile-meta{gap:12px;margin:14px 0 8px;padding-top:12px}
#ems-profiles .ep-profile-meta small{font-size:9px;margin-bottom:5px}
#ems-profiles .ep-badges,#ems-profiles .ep-hero-info .ep-links{margin-top:10px;gap:6px}
#ems-profiles .ep-badge{padding:4px 7px}
#ems-profiles .ep-panel{padding:14px;margin:10px 0}
#ems-profiles.ep-profile-page .ep-hero{padding:0}
#ems-profiles .ep-score-strip{grid-template-columns:1fr}
#ems-profiles .ep-hours-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
#ems-profiles .ep-score-strip .ep-stat,#ems-profiles .ep-hours-grid .ep-stat{padding:10px 14px}
#ems-profiles .ep-stat strong{font-size:26px;color:var(--cyan)}
#ems-profiles .ep-score-strip strong{color:var(--red)}
#ems-profiles .ep-duty{border-inline-start:3px solid var(--red)}
#ems-profiles .ep-duty-number,#ems-profiles .ep-next-rank{font-size:22px;margin:8px 0}
#ems-profiles .ep-duty progress{accent-color:var(--red);margin:8px 0}
.nav-actions .oh-profile-nav{display:inline-flex;align-items:center;justify-content:center;max-width:180px;min-height:40px;padding:10px 14px;line-height:1.3;border:1px solid var(--oh-border);background:var(--oh-surface);color:var(--oh-copy)!important;text-decoration:none;font-size:12px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-actions .oh-profile-nav:hover{border-color:var(--cyan);text-decoration:none}
.nav-actions .oh-profile-nav:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
@media(max-width:650px){#ems-profiles.ep-profile-page{padding:20px 14px 36px}#ems-profiles.ep-profile-page .ep-hero{grid-template-columns:100px minmax(0,1fr)}#ems-profiles .ep-hero-info{padding:14px 12px}#ems-profiles .ep-profile-meta{grid-template-columns:1fr 1fr}#ems-profiles .ep-hero-info h2{font-size:28px}.nav-actions .oh-profile-nav{max-width:120px;padding:8px;font-size:10px}}
@media(max-width:380px){#ems-profiles.ep-profile-page .ep-hero{grid-template-columns:1fr}#ems-profiles .ep-portrait .ep-photo,#ems-profiles .ep-portrait .ep-letter{height:180px;min-height:180px}#ems-profiles .ep-portrait{min-height:180px}}
/* V6: meaningful progress colors, restrained motion and EMS field guide. */
#ems-profiles .ep-duty{--ep-state:var(--cyan)}
#ems-profiles .ep-duty[data-progress=low]{--ep-state:#f15a6e}
#ems-profiles .ep-duty[data-progress=part]{--ep-state:#efb345}
#ems-profiles .ep-duty[data-progress=complete]{--ep-state:#39cd89}
#ems-profiles .ep-duty[data-progress]{border:1px solid color-mix(in srgb,var(--ep-state) 42%,var(--oh-border));background:linear-gradient(115deg,color-mix(in srgb,var(--ep-state) 6%,var(--oh-surface)),var(--oh-surface));box-shadow:inset 0 1px color-mix(in srgb,var(--ep-state) 15%,transparent)}
#ems-profiles .ep-meter-summary{display:flex;justify-content:space-between;gap:12px;align-items:center}
#ems-profiles .ep-meter-status,#ems-profiles .ep-meter-caption{color:var(--ep-state);font-size:12px;font-weight:700}
#ems-profiles progress.ep-meter{display:block;width:100%;height:8px;appearance:none;border:0;border-radius:0;overflow:hidden;background:var(--oh-field);accent-color:var(--ep-state);margin:12px 0}
#ems-profiles .ep-meter::-webkit-progress-bar{background:var(--oh-field)}
#ems-profiles .ep-meter::-webkit-progress-value{background:linear-gradient(90deg,color-mix(in srgb,var(--ep-state) 55%,var(--oh-field)),var(--ep-state));box-shadow:0 0 14px var(--ep-state);animation:ep-fill .8s cubic-bezier(.2,.8,.2,1) both;transform-origin:left}
#ems-profiles[dir=rtl] .ep-meter::-webkit-progress-value{transform-origin:right}
#ems-profiles .ep-meter::-moz-progress-bar{background:var(--ep-state);box-shadow:0 0 14px var(--ep-state)}
#ems-profiles .ep-person-card{position:relative;overflow:hidden;transition:transform .2s ease,border-color .2s,box-shadow .2s;background:var(--oh-surface);animation:ep-enter .4s ease both}
#ems-profiles .ep-person-card:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(110deg,transparent 30%,#a7f1ff0c 45%,transparent 60%);transform:translateX(-120%);transition:transform .6s}
@media(hover:hover){#ems-profiles .ep-person-card:hover{transform:translateY(-5px);box-shadow:0 12px 30px #0003,0 0 18px #4bd6f413}#ems-profiles .ep-person-card:hover:after{transform:translateX(120%)}}
#ems-profiles .ep-person-card:nth-child(3n+2){animation-delay:40ms}
#ems-profiles .ep-person-card:nth-child(3n){animation-delay:80ms}
.ep-profile-page .ep-panel,.ep-profile-page .ep-hours-panel,.ep-profile-page .ep-score-strip{animation:ep-enter .45s ease both}
.ep-profile-page .ep-hero-info{animation:ep-enter .55s ease both}
.ep-profile-pager{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:24px 0}
.ep-pager-card{display:grid;gap:7px;border:1px solid var(--oh-border);padding:18px;background:var(--oh-surface);color:var(--oh-copy);transition:border-color .2s,transform .2s}
.ep-pager-card:last-child{text-align:end}.ep-pager-card:hover{border-color:var(--cyan);transform:translateY(-2px)}
.eg-guide{max-width:1280px;margin:auto;padding:38px 24px 70px;color:var(--oh-copy);scroll-margin-top:95px}
.eg-guide[hidden],.eg-guide [hidden]{display:none!important}
.eg-guide>.ep-button{display:inline-block;margin:0 8px 20px 0;background:var(--oh-surface);color:var(--oh-copy);border-color:var(--oh-border)}
.eg-eyebrow{font:700 11px monospace;letter-spacing:2px;color:var(--cyan);margin:16px 0}
.eg-title{font-family:Rajdhani,Cairo,sans-serif;font-size:clamp(32px,5vw,64px);line-height:1.1;margin:14px 0;color:var(--oh-copy)}
.eg-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:30px 0}
.eg-card{display:flex;flex-direction:column;padding:24px;border:1px solid var(--oh-border);background:var(--oh-surface);color:var(--oh-copy);min-height:220px;transition:transform .2s,border-color .2s,box-shadow .2s;animation:ep-enter .45s both}
.eg-card h2{font:700 25px/1.3 Rajdhani,Cairo,sans-serif;letter-spacing:0;direction:inherit;text-align:start;margin:12px 0}
.eg-card p{font-size:13px;line-height:1.9;color:var(--oh-copy-muted)}
.eg-read{font-size:11px;letter-spacing:1px;color:var(--cyan);margin-top:auto;padding-top:18px}
.eg-card:hover,.eg-card:focus-visible{border-color:var(--cyan);transform:translateY(-4px);box-shadow:0 12px 24px #0002}
.eg-table-wrap{overflow:auto;border:1px solid var(--oh-border);margin:24px 0}
.eg-table{width:100%;border-collapse:collapse;text-align:start;background:var(--oh-surface)}
.eg-table th,.eg-table td{padding:16px;border-bottom:1px solid var(--oh-border);text-align:start;font-size:13px}
.eg-table thead{background:var(--oh-surface-2);color:var(--cyan)}.eg-table .eg-points{font:700 20px Rajdhani,sans-serif;color:var(--cyan)}
.eg-subtitle{font:700 28px/1.3 Rajdhani,Cairo,sans-serif;direction:inherit;text-align:start;letter-spacing:0;margin:32px 0 16px}
.eg-code-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.eg-code{padding:18px;border:1px solid var(--oh-border);background:var(--oh-surface)}
.eg-code-number{font:700 13px monospace;color:var(--cyan)}.eg-code p{font-size:13px;line-height:1.7}
.eg-code[data-code=RED]{border-inline-start:3px solid #ed526b}.eg-code[data-code=BLUE]{border-inline-start:3px solid #55a9ff}.eg-code[data-code=YELLOW]{border-inline-start:3px solid #e7b94d}.eg-code[data-code=WHITE]{border-inline-start:3px solid #adc5d8}
.eg-source{margin:24px 0}.eg-source summary{cursor:pointer}.eg-source-img{display:block;width:100%;max-width:960px;margin:16px auto}
.eg-uniform-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px}
.eg-uniform-card{background:var(--oh-surface);border:1px solid var(--oh-border);padding:12px;align-self:start}
.eg-uniform-card h3{font:700 23px Rajdhani,Cairo,sans-serif;margin:8px 0 12px}
.eg-uniform-crop{position:relative;overflow:hidden;width:100%;direction:ltr;background:var(--oh-field)}
.eg-uniform-crop img{position:absolute;max-width:none;height:auto}
.eg-uniform-card button{margin:12px 0 0;width:100%;background:var(--oh-surface-2);color:var(--oh-copy);border-color:var(--oh-border)}
.eg-uniform-numbers{margin-top:12px}
.eg-uniform-custom{width:100%;aspect-ratio:4/3;object-fit:cover}
.eg-edit{padding:22px;margin:20px 0;border:1px solid var(--cyan);background:var(--oh-surface)}
.eg-edit label{display:grid;gap:7px;margin:12px 0;font-size:13px}
.eg-edit input,.eg-edit select{padding:10px;width:100%;background:var(--oh-field);color:var(--oh-copy);border:1px solid var(--oh-border);font:inherit}
.eg-part-row{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:8px;align-items:end}
.eg-edit button{background:var(--oh-surface-2);color:var(--oh-copy);margin:8px 4px;padding:10px;border:1px solid var(--oh-border)}
.eg-guide :focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
@keyframes ep-enter{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes ep-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media(max-width:800px){.eg-cards,.eg-code-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.eg-cards,.eg-code-grid{grid-template-columns:1fr}.eg-guide{padding:24px 16px}.eg-part-row{grid-template-columns:1fr 1fr}.ep-profile-pager{gap:8px}.ep-pager-card{padding:12px}}
@media(prefers-reduced-motion:reduce){#ems-profiles *,#ems-profiles *:after,.eg-guide *{animation:none!important;transition:none!important;scroll-behavior:auto!important}.ep-person-card:hover,.eg-card:hover,.ep-pager-card:hover{transform:none!important}}
html[data-oh-theme=light] #ems-profiles .ep-duty[data-progress=low]{--ep-state:#bd2644}
html[data-oh-theme=light] #ems-profiles .ep-duty[data-progress=part]{--ep-state:#8c6200}
html[data-oh-theme=light] #ems-profiles .ep-duty[data-progress=complete]{--ep-state:#167447}
.eg-rules-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start;margin:24px 0}
.eg-rule-group{background:var(--oh-surface);border:1px solid var(--oh-border);margin:12px 0;padding:16px;max-width:100%;overflow:hidden}
.eg-rule-group summary{font-size:17px;font-weight:700;color:var(--oh-copy);cursor:pointer;padding:8px 0 16px;border-bottom:1px solid var(--oh-border)}
.eg-rule-group[data-grade="1"],.eg-rule-group[data-grade="2"]{border-top:2px solid var(--cyan)}
.eg-rule-group[data-grade="3"],.eg-rule-group[data-grade="4"]{border-top:2px solid #c69a4d}
.eg-rule-group[data-grade="5"],.eg-rule-group[data-grade="6"]{border-top:2px solid var(--red)}
.eg-rule-crop{position:relative;overflow:hidden;direction:ltr;width:100%;max-width:800px;margin:18px auto 0}
.eg-rule-crop img{position:absolute;max-width:none;height:auto;image-rendering:auto}
@media(max-width:650px){.eg-rules-grid{grid-template-columns:1fr}}
/* V7: searchable Ministry rules and the supplied penalty matrix. */
.eg-rules-notes{margin:24px 0;padding:20px 24px;background:var(--oh-surface);border:1px solid var(--oh-border);border-inline-start:3px solid var(--cyan)}
.eg-rules-notes .eg-subtitle{margin-top:0}
.eg-rules-notes ol{padding-inline-start:22px;margin:0}
.eg-rules-notes li{font-size:14px;line-height:1.9;padding:7px 0;color:var(--oh-copy-muted)}
.eg-rules-filters{display:grid;grid-template-columns:2fr 1fr;gap:16px;margin:28px 0 12px}
.eg-rules-filters label{display:grid;gap:9px;font-size:12px;color:var(--oh-copy-muted)}
.eg-rules-filters input,.eg-rules-filters select{width:100%;padding:14px;background:var(--oh-field);border:1px solid var(--oh-border);color:var(--oh-copy);font:inherit}
.eg-penalties{min-width:700px}
.eg-penalties th,.eg-penalties td{white-space:nowrap;padding:13px;font-size:13px}
.eg-penalties tbody tr:hover{background:var(--oh-surface-2)}
.eg-clause{display:grid;grid-template-columns:52px minmax(0,1fr);gap:12px;align-items:start;border-bottom:1px solid var(--oh-border);padding:14px 0}
.eg-clause:last-child{border-bottom:0}
.eg-clause-id{font:700 12px/1.8 monospace;text-align:center;background:var(--oh-field);color:var(--cyan);padding:4px 6px;border:1px solid var(--oh-border)}
.eg-clause p{margin:0;line-height:1.95;font-size:13px;color:var(--oh-copy)}
.eg-unused p{color:var(--oh-copy-muted);font-size:12px}
.eg-clause[data-clause="4-13"] .eg-clause-id{border-color:var(--red)}
.eg-rule-group[data-grade="0"]{border-top:3px solid var(--red);grid-column:1/-1}
.eg-ban-note{padding:12px;border-inline-start:2px solid var(--red);background:var(--oh-surface-2);font-weight:700;font-size:13px;color:var(--oh-copy)}
.eg-source>.ep-button:not(summary){display:inline-block;margin:12px 8px;background:var(--oh-surface);color:var(--oh-copy);border-color:var(--oh-border)}
@media(max-width:600px){.eg-rules-filters{grid-template-columns:1fr}.eg-clause{grid-template-columns:45px minmax(0,1fr)}.eg-rules-notes{padding:16px}}
/* V8: a standalone guide below personnel, forms and expandable radio examples. */
#ems-guide{border-top:1px solid var(--oh-border);padding-top:48px;margin-top:32px}
.eg-protocol summary{cursor:pointer;display:grid;gap:9px;list-style:none}
.eg-protocol summary::-webkit-details-marker{display:none}
.eg-protocol summary>span{font-size:13px;line-height:1.8}
.eg-protocol[open]{border-color:var(--cyan);background:var(--oh-surface-2)}
.eg-protocol-example{padding-top:16px;margin-top:16px;border-top:1px solid var(--oh-border);line-height:1.9;white-space:pre-wrap}
.eg-edit textarea{min-height:140px;width:100%;resize:vertical;padding:12px;border:1px solid var(--oh-border);background:var(--oh-field);color:var(--oh-copy);font:inherit}
.eg-edit input,.eg-edit textarea{box-sizing:border-box}
.eg-request-history .eg-code{margin:12px 0}
.eg-guide .eg-uniform-numbers .eg-table{table-layout:fixed}
.eg-guide .eg-uniform-numbers .eg-table td{overflow-wrap:anywhere}
.eg-part-row{grid-template-columns:2fr 1fr 1fr 2fr auto}
.eg-uniform-card .eg-table td,.eg-uniform-card .eg-table th{padding:8px 5px;font-size:11px}
.eg-uniform-card .eg-table td:first-child,.eg-uniform-card .eg-table th:first-child{width:38%}
.eg-uniform-card .eg-table td:last-child,.eg-uniform-card .eg-table th:last-child{width:26%}
.eg-uniform-card .eg-table td:nth-child(2),.eg-uniform-card .eg-table td:nth-child(3){direction:ltr;text-align:center}

@media(max-width:650px){.eg-part-row{grid-template-columns:1fr 1fr}.eg-part-row label:first-child,.eg-part-row label:nth-child(4){grid-column:1/-1}}
/* V9: editable guide and response fleet */
.ef-count{display:inline-flex;align-items:center;white-space:nowrap;border:1px solid var(--oh-border);padding:9px 12px;font:700 10px monospace;letter-spacing:1px;color:var(--cyan);background:var(--oh-surface)}
.ef-section{padding-top:70px;padding-bottom:70px}.ef-stage{display:grid;grid-template-columns:1.2fr 1fr;border:1px solid var(--oh-border);background:var(--oh-surface);overflow:hidden}.ef-portrait{aspect-ratio:1;background-image:url('/ems-fleet.png');background-size:300% 200%;background-repeat:no-repeat}.ef-info{padding:clamp(22px,4vw,60px);display:flex;flex-direction:column;justify-content:center;border-inline-start:1px solid var(--oh-border)}.ef-info h3{font-size:clamp(28px,4vw,54px);line-height:1.1;margin:12px 0 32px}.ef-category{color:var(--cyan);letter-spacing:2px;font-size:11px}.ef-ranks{border-block:1px solid var(--oh-border);padding:24px 0;line-height:2;font-weight:700}.ef-signature{margin-top:32px;color:var(--cyan);font:10px monospace;letter-spacing:2px}.ef-choices{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:14px}.ef-choice{padding:0;background:var(--oh-surface);border:1px solid var(--oh-border);color:var(--oh-copy);cursor:pointer;transition:transform .2s,border-color .2s}.ef-choice span{display:block;padding:13px 5px;font-weight:700}.ef-choice .ef-portrait{aspect-ratio:1.45}.ef-choice:hover{transform:translateY(-4px);border-color:var(--cyan)}.ef-choice.is-active{border-color:var(--cyan);box-shadow:inset 0 -3px var(--cyan)}.ef-choice:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}.eg-editor-group{padding:18px;margin:16px 0;border:1px solid var(--oh-border);background:var(--oh-surface)}.eg-editor-group summary{cursor:pointer}.eg-editor-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin:18px 0;padding:18px;border:1px solid var(--oh-border)}.eg-editor-row label{display:grid;gap:8px;font-size:12px}.eg-editor-row input,.eg-editor-row textarea{width:100%;box-sizing:border-box;color:var(--oh-copy);background:var(--oh-field);border:1px solid var(--oh-border);padding:12px;font:inherit}.eg-editor-row textarea{min-height:90px;resize:vertical}.eg-editor-row input[type=checkbox]{width:20px;height:20px}.eg-editor-row .ep-actions{grid-column:1/-1}.eg-management>button{margin:12px 0}.ef-section[hidden]{display:none!important}@media(max-width:650px){.ef-stage{grid-template-columns:1fr}.ef-info{border-inline-start:0;border-top:1px solid var(--oh-border)}.ef-choices{grid-template-columns:repeat(3,1fr)}.eg-editor-row{grid-template-columns:1fr}.ef-count{font-size:9px;padding:7px}}@media(prefers-reduced-motion:reduce){.ef-choice{transition:none}.ef-choice:hover{transform:none}}
/* V10: compact navigation, editable fleet */
header.nav.el-compact{display:grid!important;grid-template-columns:auto 1fr;gap:8px 20px;padding:10px 24px!important;align-items:center}header.el-compact .brand{font-size:18px!important}header.el-compact .brandicon{width:36px!important;height:36px!important}header.el-compact .brandicon img{width:36px;height:36px}header.el-compact .brand small{font-size:6px!important;letter-spacing:2px!important}header.el-compact .nav-actions{justify-self:end;display:flex;gap:7px!important;align-items:center}header.el-compact nav{grid-column:1/-1;grid-row:2;display:flex;justify-content:center;gap:clamp(10px,2vw,28px)!important;border-top:1px solid var(--oh-border);padding-top:8px;flex-wrap:wrap}header.el-compact nav a{font-size:9px!important;letter-spacing:1px!important;padding:4px 0!important}header.el-compact .oh-nav-extras{gap:6px!important}header.el-compact .oh-recruit-chip{font-size:8px!important;padding:7px!important}header.el-compact .ef-count{font-size:9px;padding:7px}.el-account{position:relative;color:var(--oh-copy)}.el-account>summary{cursor:pointer;list-style:none;font-size:11px;font-weight:700;border:1px solid var(--oh-border);background:var(--oh-surface);padding:10px 15px}.el-account>summary:after{content:' ▾';color:var(--cyan)}.el-account-panel{position:absolute;z-index:1001;inset-inline-end:0;top:calc(100% + 8px);width:230px;padding:12px;background:var(--oh-surface,#0b1923);border:1px solid var(--oh-border);box-shadow:0 14px 35px #0008;display:grid;gap:8px}.el-account-panel .outline,.el-account-panel #identity a{display:block;width:100%;box-sizing:border-box;text-align:start;font-size:11px!important;padding:12px!important}.el-account-panel .hidden{display:none!important}.ef-custom{width:100%;height:100%;object-fit:contain}.ef-status{color:var(--cyan);margin-bottom:15px;letter-spacing:2px}.ef-portrait{overflow:hidden;position:relative}.ef-portrait>.eg-eyebrow{position:absolute;inset:40% 10%;text-align:center}.ef-editor{margin-top:25px}.eg-editor-row select{color:var(--oh-copy);background:var(--oh-field);border:1px solid var(--oh-border);padding:12px;width:100%}header.el-compact .mobile{display:none!important}@media(max-width:650px){header.nav.el-compact{padding:8px 12px!important;gap:8px!important}header.el-compact .brand{font-size:14px!important}header.el-compact .brand small{display:none}header.el-compact .oh-recruit-chip{display:none!important}header.el-compact .brandicon{display:none!important}header.el-compact nav{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:8px}header.el-compact nav a{flex-shrink:0}header.el-compact .nav-actions{gap:4px!important}header.el-compact .ef-count{padding:6px;font-size:8px}.el-account>summary{font-size:10px;padding:8px}.el-account-panel{position:fixed;top:65px;inset-inline-end:12px}}
#site>section[id]{scroll-margin-top:120px}@media(max-width:480px){header.nav.el-compact{grid-template-columns:1fr!important}header.el-compact .brand{grid-column:1;grid-row:1}header.el-compact .nav-actions{grid-column:1;grid-row:2;justify-self:start;max-width:100%;flex-wrap:wrap}header.el-compact nav{grid-row:3}#site>section[id]{scroll-margin-top:160px}.el-account-panel{top:95px}}
header.nav.el-compact{height:auto!important;min-height:80px;overflow:visible}header.el-compact nav{position:static!important;inset:auto!important;flex-direction:row!important;background:transparent!important;padding-inline:0!important;padding-bottom:4px!important}header.el-compact .nav-actions{flex:none!important}
/* V11: single-row top bar, certificate badges and fleet motion */
header.nav.el-compact{grid-template-columns:auto minmax(0,1fr) auto!important;gap:10px!important;min-height:64px!important;padding:9px 16px!important}header.el-compact nav{grid-column:2!important;grid-row:1!important;border-top:0!important;padding:0!important;gap:clamp(7px,.8vw,16px)!important;flex-wrap:nowrap!important;overflow-x:auto;justify-content:center;min-width:0;scrollbar-width:thin}header.el-compact nav a{white-space:nowrap;font-size:8px!important;letter-spacing:.6px!important}header.el-compact .nav-actions{grid-column:3!important;grid-row:1!important;flex-wrap:nowrap!important}header.el-compact .brand{grid-column:1!important;grid-row:1!important;font-size:16px!important}header.el-compact .brandicon{width:32px!important;height:32px!important}header.el-compact .brandicon img{width:32px;height:32px}header.el-compact .brand small{font-size:5px!important}header.el-compact .oh-recruit-chip{font-size:7px!important}header.el-compact .ef-count{font-size:8px!important}header.el-compact .oh-lang-switch button{padding:6px!important}.el-account>summary{padding:8px 10px;font-size:10px}@media(max-width:1350px){header.el-compact .brand small,header.el-compact .oh-recruit-chip{display:none!important}header.el-compact nav{justify-content:flex-start}header.el-compact .brandicon{display:none!important}}@media(max-width:750px){header.el-compact .brand{font-size:12px!important}header.el-compact .ef-count{display:none}header.el-compact .oh-nav-extras{gap:2px!important}header.el-compact .oh-theme-toggle{width:24px!important;min-width:24px!important;padding:2px!important}header.nav.el-compact{padding:8px!important;gap:6px!important}.el-account>summary{font-size:9px;padding:6px}.el-account-panel{top:58px}#site>section[id]{scroll-margin-top:85px}}
.ep-badge[data-badge-key]{display:inline-flex;flex-direction:column;align-items:center;gap:8px;min-width:84px;cursor:pointer;color:var(--oh-copy);background:var(--oh-surface);transition:transform .2s,border-color .2s,box-shadow .2s;padding:12px}.ep-badge[data-badge-key]:hover,.eb-card:hover{transform:translateY(-4px);border-color:var(--cyan);box-shadow:0 8px 25px #30d7e51a}.ep-badge:focus-visible,.eb-card:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}.eb-chip-art{width:48px!important;height:48px!important;object-fit:contain}.eb-image{width:120px;height:120px;object-fit:contain;display:block;margin:12px auto}.eb-placeholder{display:grid;place-items:center;color:var(--cyan);font-size:26px;width:70px;height:70px;margin:10px auto;border:1px solid var(--oh-border);border-radius:16px}.eb-dialog{color:var(--oh-copy);background:var(--oh-surface,#0b1923);border:1px solid var(--oh-border);width:min(650px,calc(100vw - 30px));max-height:85vh;padding:26px;box-shadow:0 25px 100px #000a;animation:eb-enter .25s ease-out}.eb-dialog::backdrop{background:#020910bc;backdrop-filter:blur(6px)}.eb-dialog h2{font-size:25px;padding-top:14px}.eb-close{display:block;margin-inline-start:auto}.eb-description{white-space:pre-line;line-height:1.9}.eb-managers{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}.eb-managers a{font:11px monospace}.eb-transition{color:var(--cyan);padding:14px;border-block:1px solid var(--oh-border)}.eb-form{display:grid;gap:14px}.eb-form label{display:grid;gap:8px;font-size:12px}.eb-form input,.eb-form textarea{width:100%;box-sizing:border-box;color:var(--oh-copy);background:var(--oh-field);border:1px solid var(--oh-border);padding:10px}.eb-form textarea{min-height:140px;resize:vertical}.eb-form input[type=checkbox]{width:20px;height:20px}.eb-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin:25px 0}.eb-card{display:flex;flex-direction:column;align-items:center;gap:8px;padding:20px;background:var(--oh-surface);border:1px solid var(--oh-border);color:var(--oh-copy);cursor:pointer;transition:transform .2s,border-color .2s}.eb-card span{font-size:12px}.eb-card .eb-image{width:90px;height:90px}.ef-stage{isolation:isolate}.ef-drive-forward>.ef-portrait{animation:ef-arrive .6s cubic-bezier(.16,1,.3,1)}.ef-drive-back>.ef-portrait{animation:ef-return .6s cubic-bezier(.16,1,.3,1)}.ef-drive-forward>.ef-info,.ef-drive-back>.ef-info{animation:eb-enter .4s ease-out}.ef-stage:after{pointer-events:none}.eb-dialog button{cursor:pointer}@keyframes ef-arrive{from{transform:translateX(-70px) scale(.96);opacity:.15;filter:blur(3px)}to{transform:none;opacity:1;filter:none}}@keyframes ef-return{from{transform:translateX(70px) scale(.96);opacity:.15;filter:blur(3px)}to{transform:none;opacity:1;filter:none}}@keyframes eb-enter{from{transform:translateY(12px);opacity:0}to{transform:none;opacity:1}}@media(prefers-reduced-motion:reduce){.ef-stage>* , .eb-dialog{animation:none!important}.ep-badge[data-badge-key],.eb-card{transition:none}.ep-badge[data-badge-key]:hover,.eb-card:hover{transform:none}}
/* V12: prevent hero typography from compressing wing dialog headings. */
dialog.eb-dialog #eb-title{font-family:Cairo,Arial,sans-serif;font-size:clamp(20px,3vw,27px);font-weight:700;line-height:1.5;letter-spacing:normal;word-spacing:normal;direction:inherit;text-align:start;text-transform:none;white-space:normal;overflow-wrap:anywhere;word-break:normal;margin:14px 0 8px;padding:0;max-width:100%}
dialog.eb-dialog{box-sizing:border-box;overflow-y:auto;overflow-x:hidden;max-height:85dvh}dialog.eb-dialog .eb-description{overflow-wrap:anywhere}dialog.eb-dialog .eb-close{max-width:100%}
/* V14: optional lightweight scroll and pointer interactions. */
.ohm-reading{position:fixed;inset:0 0 auto;height:2px;background:linear-gradient(90deg,var(--red),var(--cyan));z-index:1000;transform:scaleX(0);transform-origin:left;pointer-events:none}.ohm-reveal{opacity:0;translate:0 14px;transition:opacity .5s ease var(--ohm-delay,0ms),translate .5s ease var(--ohm-delay,0ms)}.ohm-reveal.ohm-visible{opacity:1;translate:0 0}.ohm-card.ohm-hover{transform:perspective(850px) rotateX(var(--ohm-rx,0deg)) rotateY(var(--ohm-ry,0deg)) translateY(-3px);background-image:radial-gradient(circle at var(--ohm-x,50%) var(--ohm-y,50%),#4bdaf21a,transparent 65%);border-color:var(--cyan)}.ohm-card{transform-origin:center;transition-property:transform,border-color,box-shadow,opacity,translate;transition-duration:.25s,.25s,.25s,.5s,.5s}.ohm-off .ohm-card{opacity:1!important;translate:none!important;transform:none!important;transition:none!important}.ohm-off .ohm-reading{display:none}.ohm-paused .hero-glow{animation-play-state:paused!important}html:not(.ohm-off) .hero-glow{animation:ohm-beacon 9s ease-in-out infinite alternate;pointer-events:none}@keyframes ohm-beacon{from{opacity:.35;transform:translateX(-1.5%) scale(.98)}to{opacity:.7;transform:translateX(1.5%) scale(1.03)}}.ohm-off .hero-glow{animation:none!important}.ep-panel #ep-resolve{scroll-margin-top:90px}@media(prefers-reduced-motion:reduce){.ohm-reveal{opacity:1;translate:none;transition:none}.ohm-card.ohm-hover{transform:none}.ohm-reading{display:none}.hero-glow{animation:none!important}}

/* V14: readable registered count and a gently pulsing live indicator. */
header.el-compact .ef-count{font-size:10px!important;padding:9px 11px;gap:8px;min-height:34px;box-sizing:border-box}
.ef-count-dot{display:inline-block;flex:0 0 6px;width:6px;height:6px;border-radius:50%;background:currentColor;box-shadow:0 0 8px currentColor;animation:ohMedicLive 2s ease-in-out infinite}
@keyframes ohMedicLive{0%,100%{opacity:1}50%{opacity:.3;box-shadow:0 0 2px currentColor}}
html.oh-motion-off .ef-count-dot{animation:none}
@media(prefers-reduced-motion:reduce){.ef-count-dot{animation:none}}

/* V15: isolated detail pages and readable callsigns */
#site[data-detail="profile"]>:not(#ems-profiles),#site[data-detail="guide"]>:not(#ems-guide){display:none!important}
.ep-person-card .ep-callsign,.ep-profile-callsign{font-size:16px!important;font-weight:800;letter-spacing:1.2px!important;line-height:1.5}
.ep-profile-callsign{font-size:18px!important;margin-bottom:10px}

.oh-team-hover.is-visible{pointer-events:auto}.oh-team-member[href],.oh-hover-person[href]{color:inherit;text-decoration:none}.oh-team-member[href]:hover,.oh-hover-person[href]:hover{border-color:var(--cyan);background:#193b4d}.oh-team-member[href]:focus-visible,.oh-hover-person[href]:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
/* V18: larger portrait frame; preserve the complete uploaded image. */
#ems-profiles.ep-profile-page .ep-hero{grid-template-columns:240px minmax(0,1fr)}
#ems-profiles .ep-portrait{min-height:320px;display:flex;align-items:center;justify-content:center;padding:12px}
#ems-profiles .ep-portrait .ep-photo{display:block;width:100%;height:320px;min-height:0;max-height:none;object-fit:contain;object-position:center}
#ems-profiles .ep-portrait .ep-letter{width:100%;height:320px;min-height:0;max-height:none}
@media(max-width:650px){#ems-profiles.ep-profile-page .ep-hero{grid-template-columns:1fr}#ems-profiles .ep-portrait{min-height:280px}#ems-profiles .ep-portrait .ep-photo,#ems-profiles .ep-portrait .ep-letter{height:280px;max-width:320px}}

/* EMS profile and uniform photos: preserve the entire uploaded picture. */
#ems-profiles .ep-photo,
#ems-profiles .ep-portrait .ep-photo,
.ep-photo,
.eg-uniform-custom {
  object-fit: contain !important;
  object-position: center center !important;
  background-color: #0b1824 !important;
}

/* Profile image - fill frame without empty spaces */
.oh-profile img,
.oh-profile-photo img,
.oh-profile-avatar img,
.oh-personnel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center 25% !important;
}


/* Fix Personnel profile portrait */
#ems-profiles.ep-profile-page .ep-hero {
    align-items: stretch;
}

#ems-profiles.ep-profile-page .ep-portrait {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

#ems-profiles.ep-profile-page .ep-portrait img.ep-photo {
    position: absolute !important;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center 25% !important;
}

@media (max-width: 650px) {
    #ems-profiles.ep-profile-page .ep-portrait {
        min-height: 280px;
    }
}






/* EMS FLEET ORIGINAL IMAGE LAYOUT */
#ems-fleet .ef-stage {
    display: flex !important;
    align-items: flex-start !important;
}

#ems-fleet .ef-stage > .ef-portrait {
    flex: 0 0 54.545% !important;
    width: 54.545% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    align-self: flex-start !important;
    overflow: hidden !important;
    background: transparent !important;
}

#ems-fleet .ef-stage > .ef-portrait::before {
    content: none !important;
    display: none !important;
}

#ems-fleet .ef-stage > .ef-portrait > img.ef-custom {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
}

#ems-fleet .ef-stage > .ef-info {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: auto !important;
    align-self: flex-start !important;
}

@media (max-width:650px) {
    #ems-fleet .ef-stage {
        flex-direction: column !important;
    }

    #ems-fleet .ef-stage > .ef-portrait {
        flex: none !important;
        width: 100% !important;
    }

    #ems-fleet .ef-stage > .ef-info {
        width: 100% !important;
        box-sizing: border-box !important;
    }
}


/* EMS FLEET AUTO HEIGHT V9 */
@media (min-width: 651px) {
    #ems-fleet .ef-stage {
        display: grid !important;
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) !important;
        align-items: start !important;
        grid-template-rows: auto !important;
    }

    #ems-fleet .ef-stage > .ef-portrait {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: auto !important;
        min-height: 0 !important;
        align-self: start !important;
        overflow: hidden !important;
    }

    #ems-fleet .ef-stage > .ef-portrait > img.ef-custom {
        position: static !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain !important;
    }

    #ems-fleet .ef-stage > .ef-info {
        height: auto !important;
        min-height: 0 !important;
        align-self: start !important;
        padding: 18px 30px !important;
    }

    #ems-fleet .ef-stage .ef-info h3 {
        margin: 8px 0 12px !important;
    }

    #ems-fleet .ef-stage .ef-ranks {
        padding: 10px 0 !important;
    }

    #ems-fleet .ef-stage .ef-signature {
        margin-top: 12px !important;
    }
}

/* EMS_FLEET_LIGHTBOX_V1 */
#ems-fleet .ef-zoomable {
  cursor: zoom-in;
}
.ef-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.92);
  box-sizing: border-box;
}
.ef-lightbox-image {
  display: block;
  max-width: 95vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}
.ef-lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: white;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}
.ef-lightbox-close:hover {
  background: rgba(255,255,255,.3);
}
@media(max-width:600px) {
  .ef-lightbox { padding: 12px; }
  .ef-lightbox-image { max-width: 100%; max-height: 85vh; }
}