/* Scoped to the shield overlay; homepage colours and layout remain untouched. */
.entranceOverlay{--entrance-ready:1;position:fixed;inset:0;width:100%;height:100svh;max-width:none;max-height:none;margin:0;border:0;padding:24px;background:#0d0d0f;color:#e5e4df;box-sizing:border-box}
.entranceOverlay[open]{display:grid;place-items:center}
.entranceOverlay::backdrop{background:#0d0d0f}
html[data-entrance-open]{overflow:hidden;scroll-behavior:auto}
.entranceOverlay .emblem{position:relative;display:block;width:min(52vw,285px,max(105px,calc((100svh - 180px) * .792)));color:#e5e4df;cursor:pointer;-webkit-tap-highlight-color:transparent;clip-path:polygon(46.250% 0.165%, 39.375% 0.495%, 32.083% 1.155%, 22.083% 2.640%, 17.083% 3.630%, 9.583% 5.611%, 4.167% 7.426%, 0.208% 9.076%, 0.208% 50.825%, 0.417% 50.990%, 0.417% 52.640%, 0.625% 52.805%, 0.833% 55.116%, 1.042% 55.281%, 1.042% 55.941%, 1.250% 56.106%, 1.875% 59.241%, 2.292% 59.901%, 2.292% 60.396%, 2.708% 61.056%, 2.917% 62.046%, 3.542% 63.036%, 3.750% 64.026%, 4.375% 64.851%, 4.792% 66.007%, 7.500% 70.297%, 8.333% 71.122%, 9.583% 72.937%, 10.625% 73.927%, 10.833% 74.422%, 11.458% 74.917%, 11.875% 75.578%, 15.000% 78.713%, 18.125% 81.353%, 18.125% 81.518%, 19.167% 82.178%, 22.292% 84.818%, 30.625% 90.429%, 39.375% 95.215%, 49.583% 99.670%, 50.000% 99.670%, 54.583% 97.855%, 61.667% 94.554%, 66.875% 91.749%, 71.250% 89.109%, 77.917% 84.488%, 83.542% 79.868%, 86.667% 76.898%, 89.167% 74.257%, 89.375% 73.762%, 90.000% 73.267%, 90.208% 72.772%, 92.500% 69.967%, 93.750% 67.822%, 94.167% 67.492%, 94.167% 67.162%, 94.792% 66.337%, 94.792% 66.007%, 96.250% 63.531%, 96.667% 62.541%, 96.667% 62.046%, 97.292% 60.891%, 97.292% 60.396%, 97.708% 59.736%, 97.708% 59.241%, 98.125% 58.416%, 98.125% 57.756%, 98.333% 57.591%, 98.333% 56.931%, 98.542% 56.766%, 98.542% 56.106%, 98.750% 55.941%, 98.750% 54.950%, 98.958% 54.785%, 98.958% 53.795%, 99.167% 53.630%, 99.167% 52.475%, 99.375% 52.310%, 99.375% 50.330%, 99.583% 50.165%, 99.583% 9.241%, 99.167% 8.911%, 95.833% 7.591%, 90.000% 5.611%, 85.833% 4.455%, 78.958% 2.970%, 72.083% 1.815%, 66.875% 1.155%, 59.792% 0.495%, 52.708% 0.165%);transition:transform 220ms ease-out;animation:shield-breathe 2s ease-in-out 2}
.entranceOverlay .emblem img{display:block;width:100%;height:auto;transition:filter 220ms ease-out}
.entranceOverlay .emblem:is(:hover,:focus-visible){animation:none;transform:scale(1.035)}
.entranceOverlay .emblem:is(:hover,:focus-visible) img{filter:brightness(1.12)}
.entranceOverlay .emblem:active{transform:scale(.98)}
/* The visible keyboard focus indicator follows the rim, not the image box. */
.entranceOverlay .emblem:focus-visible{outline:none}
.entranceOverlay .shield-focus{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:0;color:var(--machaon-accent,#d7c7a0)}
.entranceOverlay .shield-focus path{fill:none;stroke:currentColor;stroke-width:10;stroke-linejoin:round}
.entranceOverlay .emblem:focus-visible .shield-focus{opacity:1}
@keyframes shield-breathe{50%{transform:scale(1.025)}}
.entranceOverlay[data-entrance-hidden] .emblem{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.entranceOverlay .emblem,.entranceOverlay .emblem img{animation:none;transition:none}.entranceOverlay .emblem:is(:hover,:focus-visible,:active){transform:none}}

/* Transparent cutout plus the button clip contain light within the shield. */
.entranceOverlay .shield-metal{position:absolute;inset:0;pointer-events:none;mask-image:url('/images/machaon-shield-entry.png');mask-mode:luminance;mask-size:100% 100%;mask-repeat:no-repeat;overflow:hidden}
.entranceOverlay .shield-metal::before{content:"";position:absolute;inset:-30%;background:linear-gradient(115deg,transparent 35%,rgba(192,173,126,.5) 43%,rgba(255,255,255,.95) 49%,rgba(255,255,255,.95) 50%,rgba(192,173,126,.6) 55%,transparent 63%);transform:translateX(-100%);animation:shield-shimmer 1100ms ease-out 350ms both}
.entranceOverlay .emblem:is(:hover,:focus-visible) .shield-metal{background:rgba(192,173,126,.22)}
.entranceOverlay .emblem:is(:hover,:focus-visible) .shield-metal::before{animation:shield-shimmer-hover 800ms ease-out both}
@keyframes shield-shimmer{to{transform:translateX(100%)}}
@keyframes shield-shimmer-hover{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
.entranceOverlay[data-entrance-hidden] .shield-metal,.entranceOverlay[data-entrance-hidden] .shield-metal::before{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.entranceOverlay .shield-metal,.entranceOverlay .shield-metal::before,.entranceOverlay .emblem:is(:hover,:focus-visible) .shield-metal::before{animation:none;transition:none}.entranceOverlay .shield-metal::before{content:none}.entranceOverlay .emblem:is(:hover,:focus-visible,:active) .shield-metal{transform:none}}
@media(forced-colors:active){.entranceOverlay .shield-metal{display:none}}

@media print{html[data-entrance-open]{overflow:visible}.entranceOverlay[open],.entranceOverlay::backdrop{display:none}}

/* The learning boundary sits beneath the existing shield, never inside it. */
.entranceOverlay .entranceContent{display:grid;justify-items:center;align-content:center;gap:clamp(8px,1.5svh,14px);width:min(100%,34rem);min-width:0}
.entranceOverlay .entranceScope{margin:0;max-width:32rem;color:#c7c6c1;font:400 clamp(11px,1.2vw,13px)/1.55 ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;text-align:center;text-wrap:balance}
.entranceOverlay .entranceScopeLink{display:inline-block;color:#d7c7a0;font:500 12px/1.5 ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:.075em;text-align:center;text-decoration:underline;text-decoration-color:rgba(215,199,160,.65);text-underline-offset:5px;padding:5px 3px}
.entranceOverlay .entranceScopeLink:is(:hover,:focus-visible){color:#f3e9ce;text-decoration-color:currentColor}
.entranceOverlay .entranceScopeLink:focus-visible{outline:2px solid #d7c7a0;outline-offset:4px}
@media(max-height:450px){.entranceOverlay{padding:12px}.entranceOverlay .entranceContent{gap:7px}.entranceOverlay .entranceScope{font-size:11px;line-height:1.4}}
