/* AI native: wizard icon, highlighted nav link, and the arcade "work day" scene.
   Loaded after light-theme.css, which forces dark text on .pr-main *, so colours here use !important. */

.wiz { display: block; flex: none; width: 22px; height: auto; image-rendering: pixelated; }
.wiz__sp { animation: wizTwinkle 1.4s steps(1) infinite; }
@keyframes wizTwinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes wizBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

/* Nav highlight */
.pr-nav .pr-nav-link--magic {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px 5px 9px;
    font-weight: 700;
    color: #1a1a1a !important;
    background: #ffe27a;
    border: 1.5px solid #1a1a1a;
    border-radius: 999px;
    box-shadow: 2px 2px 0 #1a1a1a;
    animation: magicPulse 2.8s ease-in-out infinite;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pr-nav .pr-nav-link--magic span { color: #1a1a1a !important; }
.pr-nav .pr-nav-link--magic::after { content: none !important; }
.pr-nav .pr-nav-link--magic:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #1a1a1a; }
.pr-nav .pr-nav-link--magic .wiz { animation: wizBob 2.2s ease-in-out infinite; }
@keyframes magicPulse {
    0%, 100% { box-shadow: 2px 2px 0 #1a1a1a, 0 0 0 0 rgba(109, 40, 217, 0.35); }
    50% { box-shadow: 2px 2px 0 #1a1a1a, 0 0 0 7px rgba(109, 40, 217, 0); }
}

/* Header: never wrap, and tighten between the hamburger breakpoint (768) and 1000 so five items fit */
.pr-logo, .pr-nav-link { white-space: nowrap; }
@media (min-width: 769px) and (max-width: 1000px) {
    .pr-header-inner { padding-right: 20px; padding-left: 20px; }
    .pr-nav { gap: 14px; }
    .pr-nav-link { font-size: 0.82rem; }
    .pr-nav .pr-nav-link--magic { gap: 5px; padding: 4px 10px 4px 7px; }
    .pr-nav .pr-nav-link--magic .wiz { width: 18px; }
    .pr-nav .pr-nav-cta { padding: 6px 12px; }
}

@media (max-width: 768px) { .pr-nav.open { background: #f5f3f0 !important; } }

/* Scene */
.ain { max-width: 1100px; margin: 8px auto 32px; padding: 0 24px; }
.ain, .ain * { color: inherit !important; }
.ain { color: #e9e3ff !important; }
.ain__stage {
    position: relative;
    overflow: hidden;
    background: radial-gradient(120% 80% at 50% 0%, #241a52 0%, #120e2b 55%, #0a0716 100%);
    border: 3px solid #1a1a1a;
    border-radius: 18px;
    box-shadow: 8px 8px 0 #1a1a1a;
}
.ain__hud { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 14px 20px; border-bottom: 2px solid #2d2560; }
.ain__who { display: flex; align-items: center; gap: 12px; }
.ain__who .wiz { width: 40px; animation: wizBob 2.2s ease-in-out infinite; }
.ain.is-run .ain__who .wiz { animation: ainCast 0.35s steps(2) infinite; }
@keyframes ainCast { 0% { transform: translate(0, 0); } 50% { transform: translate(1px, -2px); } 100% { transform: translate(-1px, 0); } }
.ain .ain__title {
    margin: 0;
    font: 800 clamp(15px, 2.2vw, 21px) / 1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffe27a !important;
    background: none;
}
.ain .ain__stats { margin: 0; font: 600 12px / 2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: #a79ee0 !important; }
.ain .ain__stats b { color: #fff !important; }
.ain .ain__stats i { margin: 0 4px; font-style: normal; }
.ain .ain__state { padding: 3px 8px; color: #0a0716 !important; background: #a79ee0; }
.ain.is-run .ain__state { background: #ffe27a; animation: ainBlink 0.8s steps(1) infinite; }
.ain.is-done .ain__state { background: #4ade80; }
.ain__room { position: relative; padding: 26px 22px 0; cursor: pointer; }
.ain.is-run .ain__room, .ain.is-done .ain__room { cursor: default; }
.ain .ain__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
.ain__screens { display: flex; align-items: flex-end; gap: 18px; }
.ain__mon { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; min-width: 0; }
.ain__mon--main { flex: 1.75 1 0; }
.ain__bezel { width: 100%; padding: 7px; background: #1d1840; border: 2px solid #3a3170; border-radius: 10px; box-shadow: 0 0 0 1px #0b0818, 0 0 28px rgba(124, 108, 255, 0.25); }
.ain__screen { position: relative; display: flex; flex-direction: column; height: 308px; overflow: hidden; background: #0a0716; border-radius: 5px; opacity: 0.5; filter: saturate(0.7); transition: opacity 0.5s ease, filter 0.5s ease; }
.ain__mon--main .ain__screen { height: 344px; }
.ain__room:hover .ain__screen { opacity: 0.72; }
.ain.is-run .ain__screen, .ain.is-done .ain__screen { opacity: 1; filter: none; }
.ain__screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px); }
.ain__stand { position: relative; width: 20%; height: 16px; background: #2a2354; border-right: 2px solid #3a3170; border-left: 2px solid #3a3170; }
.ain__stand::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 230%; height: 6px; background: #3a3170; border-radius: 3px 3px 0 0; transform: translateX(-50%); }
.ain__desk { height: 14px; margin: 0 -22px; background: linear-gradient(#2a2354, #1a1538); border-top: 3px solid #3a3170; }
.ain .ain__bar { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; font: 700 11px / 1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: #8d84b8 !important; background: #151030; border-bottom: 1px solid #2d2560; }
.ain__dots { width: 6px; height: 6px; margin-right: 14px; background: #ff5f57; border-radius: 50%; box-shadow: 10px 0 0 #febc2e, 20px 0 0 #28c840; }
.ain__bar > span:first-child { display: flex; align-items: center; }

/* Monitor 1: terminal */
.ain .ain__term { flex: 1; margin: 0; padding: 12px; overflow: hidden; font: 12.5px / 1.65 ui-monospace, SFMono-Regular, Menlo, monospace; color: #d6ccff !important; white-space: pre-wrap; word-break: break-word; background: none; border: 0; }
.ain .t-head { color: #ff9f66 !important; font-weight: 700; }
.ain .t-prompt { color: #4ade80 !important; }
.ain .t-dim { color: #8d84b8 !important; }
.ain .t-ok { color: #4ade80 !important; font-weight: 700; }
.ain__cur { display: inline-block; width: 7px; height: 13px; background: #d6ccff; vertical-align: -2px; animation: ainBlink 1s steps(1) infinite; }
@keyframes ainBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Monitor 2: agent map */
.ain__map { display: flex; flex: 1; flex-direction: column; align-items: center; padding: 14px 12px 10px; }
.ain .ain__hub { position: relative; margin-bottom: 24px; padding: 6px 16px; font: 800 11px / 1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: #d6ccff !important; background: #1b1545; border: 2px solid #7c6cff; transition: box-shadow 0.3s ease, background 0.3s ease; }
.ain__hub::after { content: ""; position: absolute; top: 100%; left: 50%; width: 2px; height: 12px; background: #3a3170; }
.ain .ain__hub.is-on { color: #0a0716 !important; background: #ffe27a; box-shadow: 0 0 18px rgba(255, 226, 122, 0.6); }
.ain__lanes { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.ain__lanes::before { content: ""; position: absolute; top: -12px; right: 16.6%; left: 16.6%; height: 2px; background: #3a3170; }
.ain__lane { position: relative; }
.ain__lane::before { content: ""; position: absolute; top: -12px; left: 50%; width: 2px; height: 12px; background: #3a3170; }
.ain .ain__lane-head { margin: 0 0 8px; padding: 4px 2px; font: 800 10px / 1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.1em; text-align: center; text-transform: uppercase; border: 2px solid; }
.ain .ain__lane--research .ain__lane-head { color: #38bdf8 !important; }
.ain .ain__lane--create .ain__lane-head { color: #f472b6 !important; }
.ain .ain__lane--check .ain__lane-head { color: #4ade80 !important; }
.ain__cards { position: relative; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ain__cards::before { content: ""; position: absolute; top: -8px; bottom: 0; left: 50%; width: 2px; background: #2d2560; }
.ain__lane.is-live .ain__cards::before { background: repeating-linear-gradient(#ffe27a 0 6px, transparent 6px 12px); animation: ainFlow 0.7s linear infinite; }
@keyframes ainFlow { to { background-position: 0 12px; } }
.ain .ain__card { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; min-height: 30px; margin: 0; padding: 4px 6px; font: 600 10.5px / 1.15 ui-monospace, SFMono-Regular, Menlo, monospace; color: #8d84b8 !important; background: #171238; border: 1.5px solid #2f2763; border-radius: 4px; transition: border-color 0.2s ease, color 0.2s ease; }
.ain__ico { flex: none; width: 8px; height: 8px; margin: 0; background: #3a3170; }
.ain .ain__card.is-work { color: #fff !important; border-color: #ffe27a; box-shadow: 0 0 12px rgba(255, 226, 122, 0.5); animation: ainWork 0.5s steps(2) infinite; }
.ain__card.is-work .ain__ico { background: #ffe27a; }
.ain .ain__card.is-done { color: #d9ffe8 !important; border-color: #4ade80; }
.ain__card.is-done .ain__ico { background: #4ade80; }
@keyframes ainWork { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }

/* Monitor 3: to do */
.ain__todo { display: flex; flex: 1; flex-direction: column; gap: 10px; margin: 0; padding: 14px 12px 8px; list-style: none; }
.ain .ain__todo li { display: flex; align-items: flex-start; gap: 9px; margin: 0; font: 600 12px / 1.35 ui-monospace, SFMono-Regular, Menlo, monospace; color: #d6ccff !important; opacity: 0; transform: translateX(10px); transition: opacity 0.35s ease, transform 0.35s ease; }
.ain__todo li.is-in { opacity: 1; transform: none; }
.ain__box { display: grid; flex: none; place-items: center; width: 15px; height: 15px; margin-top: 1px; font-size: 11px; line-height: 1; border: 2px solid #7c6cff; border-radius: 3px; }
.ain .ain__todo li.is-done .ain__box { background: #4ade80; border-color: #4ade80; color: #0a0716 !important; animation: ainPop 0.4s ease; }
.ain__todo li.is-done .ain__box::after { content: "\2713"; }
.ain .ain__todo li.is-done .ain__txt { color: #7f78a8 !important; text-decoration: line-through; }
.ain:not(.is-run):not(.is-done) .ain__todo::before { content: "no tasks yet"; font: 600 12px / 1.35 ui-monospace, SFMono-Regular, Menlo, monospace; color: #5d5589; }
.ain__xp { height: 10px; margin: 0 12px 10px; overflow: hidden; border: 2px solid #3a3170; border-radius: 5px; }
.ain__xp-fill { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #ffe27a, #4ade80); transition: width 0.5s steps(6); }
.ain .ain__banner { margin: 0 12px 12px; padding: 6px; font: 800 12px / 1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.1em; text-align: center; text-transform: uppercase; color: #0a0716 !important; background: #ffe27a; border: 2px solid #1a1a1a; opacity: 0; transform: scale(0.8); }
.ain .ain__banner.is-show { opacity: 1; transform: none; animation: ainPop 0.5s ease; }
@keyframes ainPop { 0% { transform: scale(0.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* Start button */
.ain .ain__start {
    position: absolute;
    top: 57%;
    left: 50%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 26px 12px;
    font: 800 clamp(14px, 2vw, 19px) / 1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a1a1a !important;
    cursor: pointer;
    background: #ffe27a;
    border: 3px solid #1a1a1a;
    border-radius: 10px;
    box-shadow: 5px 5px 0 #000;
    transform: translate(-50%, -50%);
    animation: ainBob 1.4s ease-in-out infinite;
}
.ain .ain__start span, .ain .ain__start small { color: #1a1a1a !important; }
.ain .ain__start small { font: 600 11px / 1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.04em; text-transform: none; }
.ain__start::before { content: ""; position: absolute; inset: -9px; border: 3px solid #ffe27a; border-radius: 14px; animation: ainRing 1.6s ease-out infinite; }
.ain__arrow { position: absolute; bottom: 100%; left: 50%; width: 0; height: 0; margin-bottom: 14px; border-top: 14px solid #ffe27a; border-right: 10px solid transparent; border-left: 10px solid transparent; transform: translateX(-50%); animation: ainArrow 0.9s ease-in-out infinite; }
.ain__start:focus-visible { outline: 3px solid #fff; outline-offset: 6px; }
.ain.is-run .ain__start, .ain.is-done .ain__start { display: none; }
@keyframes ainBob { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.05); } }
@keyframes ainRing { 0% { opacity: 0.9; transform: scale(0.96); } 100% { opacity: 0; transform: scale(1.18); } }
@keyframes ainArrow { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* Footer strip */
.ain__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 20px; background: #0a0716; border-top: 2px solid #2d2560; }
.ain .ain__cap { flex: 1 1 280px; margin: 0; font: 13px / 1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: #a79ee0 !important; }
.ain__actions { display: flex; flex-wrap: wrap; gap: 10px; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.ain.is-done .ain__actions { opacity: 1; pointer-events: auto; }
.ain .ain__again, .ain .ain__link { padding: 9px 14px; font: 800 12px / 1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; cursor: pointer; border-radius: 6px; }
.ain .ain__again { color: #d6ccff !important; background: none; border: 2px solid #7c6cff; }
.ain .ain__link { color: #1a1a1a !important; background: #ffe27a; border: 2px solid #1a1a1a; }

@media (max-width: 800px) {
    .ain { padding: 0 14px; }
    .ain__room { padding: 18px 14px 0; }
    .ain__screens { flex-direction: column; align-items: stretch; gap: 16px; }
    .ain__mon--main { order: -1; flex: none; }
    .ain__mon--side { flex: none; }
    .ain__screen, .ain__mon--main .ain__screen { height: auto; min-height: 230px; }
    .ain__mon--main .ain__screen { min-height: 330px; }
    .ain__stand, .ain__desk { display: none; }
    .ain__room { padding-bottom: 16px; }
    .ain .ain__start { top: 160px; }
    .ain__map { padding: 12px 8px 10px; }
    .ain__lanes { gap: 5px; }
    .ain .ain__card { padding: 3px 4px; font-size: 9.5px; overflow-wrap: anywhere; }
    .ain__ico { display: none; }
    .ain .ain__lane-head { font-size: 9px; letter-spacing: 0.04em; }
}
/* Level map under the scene: replaces the hand drawn sketch */
.ain-lv { margin-top: 28px; }
.lv__track { display: flex; align-items: stretch; justify-content: center; gap: 0; margin: 0; padding: 30px 22px 18px; list-style: none; }
.ain .lv__node { position: relative; display: flex; flex: 1 1 0; flex-direction: column; align-items: center; min-width: 0; margin: 0; padding: 18px 12px 16px; text-align: center; background: #171238; border: 2px solid #3a3170; border-radius: 10px; box-shadow: 0 0 0 1px #0b0818, 0 0 24px rgba(124, 108, 255, 0.18); }
.lv__ico { display: block; width: 56px; height: auto; margin-bottom: 14px; image-rendering: pixelated; animation: wizBob 2.2s ease-in-out infinite; }
.lv__node--agents .lv__ico { animation-delay: 0.3s; }
.lv__node--gate .lv__ico { animation-delay: 0.6s; }
.lv__node--ship .lv__ico { animation-delay: 0.9s; }
.ain .lv__name { display: block; margin: 0 0 6px; font: 800 14px / 1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: #ffe27a !important; }
.ain .lv__sub { display: block; font: 600 12px / 1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: #a79ee0 !important; }
.ain .lv__node--gate { border-color: #4ade80; }
.ain .lv__node--ship { border-color: #ffe27a; }
.lv__arrow { position: relative; flex: 0 0 44px; align-self: center; height: 4px; margin: 0; background: repeating-linear-gradient(90deg, #ffe27a 0 8px, transparent 8px 14px); animation: lvFlow 0.7s linear infinite; }
.lv__arrow::after { content: ""; position: absolute; top: -6px; right: -4px; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 10px solid #ffe27a; }
@keyframes lvFlow { to { background-position: 14px 0; } }
.ain .lv__foot { margin: 0; padding: 14px 20px 20px; font: 700 13px / 1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; text-align: center; text-transform: uppercase; color: #a79ee0 !important; }

/* Briefing text: arcade panel */
.ain-brief { max-width: 1100px; margin: 28px auto 0; padding: 0 24px; }
.ain-brief .pr-page-content { padding: 26px 30px 12px; background: radial-gradient(120% 90% at 50% 0%, #241a52 0%, #120e2b 60%, #0a0716 100%); border: 3px solid #1a1a1a; border-radius: 18px; box-shadow: 8px 8px 0 #1a1a1a; }
.ain-brief .gh-content { column-count: 3; column-gap: 36px; }
.ain-brief .gh-content h1 { display: none; }
.ain-brief .gh-content h2 { break-after: avoid; display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; font: 800 clamp(14px, 2vw, 18px) / 1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em; text-transform: uppercase; color: #ffe27a !important; }
.ain-brief .gh-content h2:first-child, .ain-brief .gh-content h1 + h2 { margin-top: 0; }
.ain-brief .gh-content h2::before { content: ""; flex: none; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid #4ade80; }
.ain-brief .gh-content p { break-inside: avoid; margin: 0 0 14px; font-size: 16px; line-height: 1.7; color: #d6ccff !important; }
.ain-brief .gh-content a { color: #ffe27a !important; }
.ain-brief .gh-content strong { color: #fff !important; }

/* Select a level: the three build cards */
.cs3-page.ain-select { box-sizing: border-box; max-width: calc(1100px - 48px); margin: 28px auto 0; padding: 22px 24px 28px; background: radial-gradient(120% 90% at 50% 0%, #241a52 0%, #120e2b 60%, #0a0716 100%); border: 3px solid #1a1a1a; border-radius: 18px; box-shadow: 8px 8px 0 #1a1a1a; }
.ain-select .cs2-work__header { margin-bottom: 18px; }
.ain-select .cs2-work__heading { font: 800 clamp(14px, 2vw, 18px) / 1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em; text-transform: uppercase; color: #ffe27a !important; }
.ain-select .cs2-work__heading::before { content: "\25B6  "; color: #4ade80 !important; }
.ain-links { max-width: 1100px; }
.ain-links a { padding: 9px 14px; font: 800 12px / 1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; color: #d6ccff !important; background: #120e2b; border: 2px solid #7c6cff; border-radius: 6px; transition: background 0.15s ease, color 0.15s ease; }
.ain-links a:hover { color: #1a1a1a !important; background: #ffe27a; border-color: #1a1a1a; }

@media (max-width: 800px) {
    .lv__track { flex-direction: column; padding: 20px 14px 10px; }
    .lv__arrow { flex: 0 0 34px; width: 4px; height: 34px; background: repeating-linear-gradient(180deg, #ffe27a 0 8px, transparent 8px 14px); animation: lvFlowV 0.7s linear infinite; }
    .lv__arrow::after { top: auto; right: auto; bottom: -6px; left: -6px; border-top: 10px solid #ffe27a; border-right: 8px solid transparent; border-bottom: 0; border-left: 8px solid transparent; }
    .ain-brief { padding: 0 14px; }
    .ain-brief .gh-content { column-count: 1; }
    .ain-brief .pr-page-content { padding: 20px 18px 8px; }
    .cs3-page.ain-select { margin-right: 14px; margin-left: 14px; padding: 18px 14px 20px; }
}
@keyframes lvFlowV { to { background-position: 0 14px; } }

@media (prefers-reduced-motion: reduce) {
    .ain *, .ain *::before, .ain *::after, .pr-nav .pr-nav-link--magic, .pr-nav .pr-nav-link--magic .wiz { animation: none !important; transition: none !important; }
}
