:root {
    --bg: #020807;
    --panel: rgba(0, 24, 22, 0.76);
    --panel-strong: rgba(0, 42, 35, 0.9);
    --text: #eafff8;
    --muted: #9ccfc1;
    --jarvis: #00ffaa;
    --jarvis-2: #4cecff;
    --warning: #ffe066;
    --danger: #ff5577;
    --line: rgba(0, 255, 170, 0.24);
    --shadow: 0 0 30px rgba(0, 255, 170, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 20% 15%, rgba(0, 255, 170, 0.16), transparent 28rem),
        radial-gradient(circle at 85% 25%, rgba(0, 124, 255, 0.13), transparent 26rem),
        linear-gradient(135deg, #010302, #041411 55%, #020807);
    color: var(--text);
    overflow-x: hidden;
}

a { color: var(--jarvis); text-decoration: none; }
a:hover { text-decoration: underline; }

#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.48;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    border-bottom: 1px solid var(--line);
    background: rgba(0, 8, 7, 0.82);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    gap: 0.8rem;
    align-items: center;
    color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand small { display: block; color: var(--muted); margin-top: 0.15rem; }

.brand-orb {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #ffffff, #8dffe6 18%, #00ffaa 42%, rgba(0, 255, 170, 0.18) 70%);
    box-shadow: 0 0 18px rgba(0,255,170,.8), 0 0 42px rgba(0,255,170,.25);
}

.top-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.top-links a,
.menu-toggle {
    color: #cffff3;
    border: 1px solid rgba(0,255,170,.16);
    border-radius: 999px;
    padding: .45rem .7rem;
    background: rgba(0,30,24,.45);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-weight: 800;
}

.page-shell {
    width: min(1280px, calc(100% - 2rem));
    margin: 1.3rem auto 2rem;
}

.panel,
.hud-card,
.status-card,
.mini-panel,
.value-card,
.assist-grid article,
.launcher-card {
    position: relative;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(0,255,170,.07), transparent 38%), var(--panel);
    box-shadow: var(--shadow), inset 0 0 24px rgba(0,255,170,.045);
    overflow: hidden;
}

.panel::before,
.hud-card::before,
.status-card::before,
.mini-panel::before,
.value-card::before,
.assist-grid article::before,
.launcher-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(0,255,170,.06), transparent);
    transform: translateX(-100%);
    animation: sweep 7s linear infinite;
}

@keyframes sweep {
    0% { transform: translateX(-110%); }
    50% { transform: translateX(110%); }
    100% { transform: translateX(110%); }
}

.cover-stage {
    min-height: clamp(390px, 56vw, 710px);
    border-radius: 24px;
    padding: 0;
    margin-bottom: 1.2rem;
}

.cover-picture { position: absolute; inset: 0; z-index: 0; }
.cover-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.12) contrast(1.04);
}

.cover-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(0,8,7,.96), rgba(0,8,7,.26) 48%, rgba(0,8,7,.74)),
        linear-gradient(0deg, rgba(0,8,7,.92), transparent 52%, rgba(0,8,7,.25));
    pointer-events: none;
}

.cover-overlay {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: clamp(1.2rem, 5vw, 3.5rem);
    min-height: clamp(390px, 56vw, 710px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.cover-overlay h1 {
    margin: .1rem 0 .7rem;
    font-size: clamp(2.35rem, 6.2vw, 5.8rem);
    line-height: .94;
    letter-spacing: 0;
    text-shadow: 0 0 20px rgba(0,255,170,.38), 0 0 50px rgba(76,236,255,.18);
}

.cover-overlay p {
    color: #d9fff6;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.6;
}

.eyebrow {
    color: var(--jarvis);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
    font-weight: 900;
    margin: 0 0 .45rem;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.value-card {
    border-radius: 22px;
    padding: 1rem;
    min-height: 180px;
}

.value-card strong {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #001b14;
    background: linear-gradient(135deg, var(--jarvis), #8dffe6);
    box-shadow: 0 0 20px rgba(0,255,170,.38);
}

.value-card h2,
.launcher-card h3,
.assist-grid h3 {
    margin: .8rem 0 .35rem;
}

.value-card p,
.launcher-card p,
.assist-grid p {
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

.section-head { margin-bottom: 1rem; }
.section-head h2,
.core-copy h2,
.hud-card h2,
.status-card h2,
.favorite-panel h2 {
    margin: 0 0 .35rem;
    font-size: clamp(1.25rem, 2.3vw, 2rem);
}

.section-head p,
.core-copy p,
.hud-card p,
.status-card p,
.favorite-panel p,
.mini-panel p,
.mini-panel small {
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

.row-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.demo-panel,
.codex-panel,
.panel {
    padding: clamp(1rem, 3vw, 1.6rem);
    margin: 0 0 1.2rem;
    border-radius: 24px;
}

.launcher-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
}

.launcher-card {
    border-radius: 20px;
    padding: 1rem;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.launcher-card .icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(0,255,170,.12);
    border: 1px solid rgba(0,255,170,.24);
    font-size: 1.35rem;
}

.launcher-card .launcher-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: auto;
}

.jarvis-link-button,
.launcher-card a,
.launcher-card button,
.assist-grid button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border: 1px solid rgba(0,255,170,.38);
    color: #aaffec;
    border-radius: 999px;
    background: rgba(0,20,18,.86);
    padding: .55rem .75rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.launcher-card a:hover,
.jarvis-link-button:hover,
.launcher-card button:hover,
.assist-grid button:hover {
    border-color: rgba(0,255,170,.8);
    text-decoration: none;
}

.mission-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.field-label {
    display: block;
    margin: .75rem 0 .35rem;
    color: var(--jarvis);
    font-weight: 800;
}

.jarvis-select {
    width: 100%;
    padding: .8rem 1rem;
    border: 1px solid rgba(0,255,170,.34);
    border-radius: 16px;
    color: var(--text);
    background: rgba(0,8,7,.84);
    font-weight: 800;
}

.mission-detail {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(0,8,7,.62);
    border: 1px solid rgba(0,255,170,.16);
}

.mission-detail h3 { margin: 0 0 .45rem; font-size: 1.45rem; }
.mission-detail p { color: var(--muted); line-height: 1.55; }
.mission-detail ul { padding-left: 1.1rem; color: #d9fff6; line-height: 1.55; }
.mission-detail strong { color: var(--jarvis); }

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1rem;
}

.favorite-panel {
    align-self: start;
}

.cockpit-grid {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr) 300px;
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1.2rem;
}

.module-stack {
    display: grid;
    gap: 1rem;
}

.hud-card,
.status-card,
.mini-panel,
.audio-core {
    border-radius: 24px;
}

.hud-card {
    padding: 1rem;
    min-height: 166px;
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: .9rem;
    align-items: center;
}

.hud-icon {
    width: 66px;
    height: 66px;
    border: 1px solid rgba(0,255,170,.45);
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(0,255,170,.16), inset 0 0 18px rgba(0,255,170,.1);
    position: relative;
}

.radar-icon::before,
.flag-icon::before,
.voice-icon::before {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    border: 2px solid var(--jarvis);
    box-shadow: 0 0 14px rgba(0,255,170,.4);
}

.radar-icon::after {
    content: "";
    position: absolute;
    left: 31px;
    top: 8px;
    width: 2px;
    height: 50px;
    background: var(--jarvis);
    transform: rotate(-45deg);
    transform-origin: bottom;
    opacity: .8;
}

.flag-icon::after {
    content: "⚑";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--jarvis);
    font-size: 2rem;
}

.voice-icon::after {
    content: "◖)))";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--jarvis);
    font-size: 1.05rem;
    letter-spacing: 0;
}

.audio-core {
    min-height: 530px;
    padding: 1.3rem;
    display: grid;
    place-items: center;
    text-align: center;
}

.core-orb {
    position: relative;
    width: min(390px, 70vw);
    height: min(390px, 70vw);
    display: grid;
    place-items: center;
    margin-top: .4rem;
}

.core-ring,
.core-ball {
    position: absolute;
    border-radius: 50%;
}

.core-ring {
    border: 1px solid rgba(0,255,170,.4);
    box-shadow: inset 0 0 24px rgba(0,255,170,.09), 0 0 25px rgba(76,236,255,.09);
}

.ring-1 { inset: 0; animation: spin 16s linear infinite; }
.ring-2 { inset: 42px; border-style: dashed; animation: spinReverse 12s linear infinite; }
.ring-3 { inset: 86px; animation: spin 8s linear infinite; }

.core-ball {
    width: 132px;
    height: 132px;
    background:
        radial-gradient(circle at 36% 28%, #ffffff, #9dffe7 18%, #00ffaa 43%, #005f4b 72%, rgba(0,255,170,.12));
    box-shadow: 0 0 35px rgba(0,255,170,.9), 0 0 90px rgba(0,255,170,.34);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }

.wave-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 92px;
    margin-top: -2rem;
}

.wave-strip span,
.voice-bars span {
    width: 5px;
    border-radius: 999px;
    background: linear-gradient(#eafff8, var(--jarvis));
    box-shadow: 0 0 12px rgba(0,255,170,.5);
    animation: audioBars 1s ease-in-out infinite;
}

.wave-strip span:nth-child(1) { height: 22px; animation-delay: 0s; }
.wave-strip span:nth-child(2) { height: 42px; animation-delay: .05s; }
.wave-strip span:nth-child(3) { height: 72px; animation-delay: .1s; }
.wave-strip span:nth-child(4) { height: 48px; animation-delay: .15s; }
.wave-strip span:nth-child(5) { height: 86px; animation-delay: .2s; }
.wave-strip span:nth-child(6) { height: 36px; animation-delay: .25s; }
.wave-strip span:nth-child(7) { height: 68px; animation-delay: .3s; }
.wave-strip span:nth-child(8) { height: 92px; animation-delay: .35s; }
.wave-strip span:nth-child(9) { height: 68px; animation-delay: .4s; }
.wave-strip span:nth-child(10) { height: 36px; animation-delay: .45s; }
.wave-strip span:nth-child(11) { height: 86px; animation-delay: .5s; }
.wave-strip span:nth-child(12) { height: 48px; animation-delay: .55s; }
.wave-strip span:nth-child(13) { height: 72px; animation-delay: .6s; }
.wave-strip span:nth-child(14) { height: 42px; animation-delay: .65s; }
.wave-strip span:nth-child(15) { height: 22px; animation-delay: .7s; }

@keyframes audioBars {
    0%, 100% { transform: scaleY(.58); opacity: .65; }
    50% { transform: scaleY(1); opacity: 1; }
}

.mic-pad {
    width: 106px;
    height: 106px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(0,255,170,.35);
    border-radius: 50%;
    margin: -.8rem auto 1rem;
    background: rgba(0,32,26,.6);
    box-shadow: 0 0 24px rgba(0,255,170,.22), inset 0 0 28px rgba(0,255,170,.08);
}

.mic-symbol {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 12px rgba(0,255,170,.8));
}

.core-copy { max-width: 760px; }

.status-card { padding: 1rem; }

.status-ring {
    width: 88px;
    height: 88px;
    border: 1px solid rgba(0,255,170,.35);
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 0 28px rgba(0,255,170,.16), inset 0 0 20px rgba(0,255,170,.1);
}

.status-ring span {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--jarvis);
    box-shadow: 0 0 30px rgba(0,255,170,.9);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(.86); opacity: .75; }
    50% { transform: scale(1); opacity: 1; }
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .45rem .8rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,255,170,.15);
}

.status-grid span { color: var(--muted); }
.status-grid strong { color: var(--jarvis); }

.mini-panel {
    padding: 1rem;
    min-height: 150px;
}

.voice-bars {
    display: flex;
    gap: 10px;
    align-items: end;
    height: 62px;
    margin: .7rem 0;
}

.voice-bars span:nth-child(1) { height: 28px; }
.voice-bars span:nth-child(2) { height: 48px; animation-delay: .1s; }
.voice-bars span:nth-child(3) { height: 36px; animation-delay: .2s; }
.voice-bars span:nth-child(4) { height: 58px; animation-delay: .3s; }
.voice-bars span:nth-child(5) { height: 24px; animation-delay: .4s; }

.jarvis-audio-panel {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
    margin-top: 1.15rem;
}

.jarvis-audio-button,
.action-grid button,
#jarvisSpeechToggle {
    border: 1px solid rgba(0,255,170,.45);
    background: rgba(0,20,18,.86);
    color: #aaffec;
    border-radius: 999px;
    padding: .72rem 1rem;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0,255,170,.18), inset 0 0 12px rgba(0,255,170,.08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.jarvis-audio-button.compact {
    padding: .58rem .8rem;
    font-size: .92rem;
}

.jarvis-audio-button:hover,
.action-grid button:hover,
#jarvisSpeechToggle:hover {
    transform: translateY(-1px);
    border-color: rgba(0,255,170,.85);
    box-shadow: 0 0 18px rgba(0,255,170,.35), inset 0 0 14px rgba(0,255,170,.12);
}

.jarvis-audio-button.is-active,
#jarvisSpeechToggle.is-active {
    color: #001b14;
    background: linear-gradient(135deg, #00ffaa, #8dffe6);
    border-color: rgba(170,255,235,.95);
    box-shadow: 0 0 20px rgba(0,255,170,.55), 0 0 40px rgba(0,255,170,.18);
}

.jarvis-audio-button.ghost { background: rgba(0,40,34,.35); }

.status-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
}

.status-item {
    border: 1px solid rgba(0,255,170,.18);
    border-radius: 16px;
    padding: .85rem;
    background: rgba(0,8,7,.62);
}

.status-item strong {
    display: block;
    margin-bottom: .25rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    padding: .25rem .55rem;
    font-size: .82rem;
    font-weight: 900;
}

.status-pill.ok {
    background: rgba(0,255,170,.15);
    color: var(--jarvis);
}

.status-pill.fail {
    background: rgba(255,85,119,.13);
    color: var(--danger);
}

.assist-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
}

.assist-grid article {
    border-radius: 20px;
    padding: 1rem;
}

.assist-grid button {
    margin-top: .8rem;
}

.codex-panel pre {
    margin: 0;
    padding: 1rem;
    border-radius: 18px;
    overflow-x: auto;
    border: 1px solid rgba(0,255,170,.18);
    background: rgba(0,8,7,.8);
    color: #d9fff5;
}

.log-output {
    min-height: 160px;
    max-height: 260px;
    overflow: auto;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(0,8,7,.8);
    border: 1px solid rgba(0,255,170,.18);
    font-family: Consolas, Monaco, monospace;
    color: #cffff3;
}

.log-line {
    padding: .35rem 0;
    border-bottom: 1px solid rgba(0,255,170,.08);
}

.log-line strong { color: var(--jarvis); }

.site-footer {
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: .95rem;
}

@media (max-width: 1120px) {
    .value-grid,
    .launcher-grid,
    .assist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mission-layout,
    .cockpit-grid {
        grid-template-columns: 1fr;
    }

    .module-stack,
    .right-stack {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .audio-core { order: -1; }
}

@media (max-width: 860px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .menu-toggle { display: inline-flex; }

    .top-links {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .top-links.is-open { display: flex; }

    .top-links a { width: 100%; }

    .module-stack,
    .right-stack,
    .value-grid,
    .launcher-grid,
    .assist-grid,
    .status-results {
        grid-template-columns: 1fr;
    }

    .row-head {
        flex-direction: column;
    }

    .site-footer {
        flex-direction: column;
    }

    .cover-stage,
    .cover-overlay {
        min-height: 560px;
    }

    .cover-stage::after {
        background: linear-gradient(0deg, rgba(0,8,7,.96), rgba(0,8,7,.2) 62%, rgba(0,8,7,.46));
    }

    .cover-overlay {
        justify-content: flex-end;
        max-width: none;
    }
}

@media (max-width: 520px) {
    .page-shell {
        width: min(100% - 1rem, 1280px);
        margin-top: .75rem;
    }

    .cover-stage,
    .panel,
    .hud-card,
    .status-card,
    .mini-panel,
    .value-card,
    .assist-grid article,
    .launcher-card {
        border-radius: 18px;
    }

    .jarvis-audio-button,
    .launcher-card a,
    .launcher-card button,
    .assist-grid button,
    .jarvis-link-button {
        width: 100%;
        text-align: center;
    }

    .hud-card { grid-template-columns: 62px 1fr; }
    .hud-icon { width: 56px; height: 56px; }
    .audio-core { min-height: 460px; }
}


/* Chatbot */
.chatbot-panel {
    border-color: rgba(0, 255, 170, 0.42);
    background:
        linear-gradient(135deg, rgba(0,255,170,.1), transparent 32%),
        linear-gradient(180deg, rgba(0, 18, 20, .9), rgba(0, 8, 7, .76));
}
.chatbot-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
    max-width: 560px;
}
.chat-messages {
    display: grid; gap: 0.75rem; min-height: 260px; max-height: 520px; overflow: auto;
    padding: 1rem; border: 1px solid rgba(0,255,170,.2); border-radius: 18px;
    background: rgba(0,8,7,.72);
    scrollbar-color: rgba(0,255,170,.36) rgba(0,8,7,.7);
}
.chat-message { display: grid; gap: 0.35rem; max-width: 860px; padding: 0.85rem 1rem; border-radius: 16px; border: 1px solid rgba(0,255,170,.16); background: rgba(0, 28, 24, 0.72); }
.chat-message.user { justify-self: end; background: rgba(0, 84, 68, 0.58); border-color: rgba(76,236,255,.25); }
.chat-message.bot { justify-self: start; }
.chat-message .meta { color: var(--jarvis); font-weight: 900; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0; }
.chat-message p { margin: 0; line-height: 1.55; color: #dffcf4; }
.chat-message .answer-links { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.45rem; }
.chat-message .answer-links a, .chat-message .answer-links button {
    display: inline-flex; border: 1px solid rgba(0,255,170,.28); border-radius: 999px; padding: 0.42rem 0.62rem;
    background: rgba(0, 20, 18, 0.86); color: #aaffec; font-weight: 800; cursor: pointer; text-decoration: none;
}
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.65rem; margin-top: 0.8rem; align-items: center; }
.chat-form input { width: 100%; min-height: 52px; padding: 0.9rem 1rem; border: 1px solid rgba(0,255,170,.34); border-radius: 16px; color: var(--text); background: rgba(0,8,7,.84); font-weight: 800; outline: none; }
.chat-form input:focus { border-color: rgba(0,255,170,.85); box-shadow: 0 0 18px rgba(0,255,170,.16); }
.question-chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.8rem; }
.question-chips button { border: 1px solid rgba(0,255,170,.22); border-radius: 999px; padding: 0.5rem 0.7rem; color: #cffff3; background: rgba(0,30,24,.45); cursor: pointer; font-weight: 800; }
.question-chips button:hover { border-color: rgba(0,255,170,.65); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
@media (max-width: 620px) { .chat-form { grid-template-columns: 1fr; } .chatbot-tools { width: 100%; justify-content: stretch; } .chatbot-tools button { width: 100%; } }


/* Story knowledge cards */
.story-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
}
.story-grid article {
    position: relative;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(0,255,170,.07), transparent 38%), var(--panel);
    box-shadow: var(--shadow), inset 0 0 24px rgba(0,255,170,.045);
    overflow: hidden;
    border-radius: 20px;
    padding: 1rem;
}
.story-grid h3 { margin: .2rem 0 .45rem; }
.story-grid p { color: var(--muted); line-height: 1.5; }
.story-grid button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,255,170,.38);
    color: #aaffec;
    border-radius: 999px;
    background: rgba(0,20,18,.86);
    padding: .55rem .75rem;
    font-weight: 800;
    cursor: pointer;
}
@media (max-width: 1120px) {
    .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .story-grid { grid-template-columns: 1fr; }
}


/* Chatbot answer speech toggle */
#autoReadToggleBtn {
    border-color: rgba(0, 255, 170, 0.6);
}

#autoReadToggleBtn:not(.is-active) {
    color: #ffccd6;
    border-color: rgba(255, 85, 119, 0.45);
    background: rgba(45, 4, 14, 0.58);
}


/* Personality FAQ CSV */
.personality-faq-panel {
    border-color: rgba(0, 255, 170, 0.32);
}

.faq-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    margin: 1rem 0;
}

.faq-stats article {
    border: 1px solid rgba(0,255,170,.2);
    border-radius: 18px;
    background: rgba(0, 8, 7, .62);
    padding: 1rem;
}

.faq-stats strong {
    display: block;
    color: var(--jarvis);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1;
}

.faq-stats span {
    color: var(--muted);
}

.faq-categories {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .8rem 0 1.2rem;
}

.faq-categories span {
    border: 1px solid rgba(0,255,170,.2);
    border-radius: 999px;
    padding: .38rem .62rem;
    color: #cffff3;
    background: rgba(0,30,24,.45);
    font-weight: 800;
    font-size: .88rem;
}

.personality-faq-panel h3 {
    margin: 1rem 0 .6rem;
}

@media (max-width: 860px) {
    .faq-stats {
        grid-template-columns: 1fr;
    }
}


/* Final legal pages */
.legal-shell {
    max-width: 980px;
}

.legal-hero h1 {
    margin: 0.2rem 0 0.6rem;
    font-size: clamp(2.2rem, 7vw, 5rem);
    line-height: 0.95;
    letter-spacing: 0;
    text-shadow: 0 0 20px rgba(0, 255, 170, 0.28);
}

.legal-content {
    line-height: 1.72;
}

.legal-content h2 {
    margin: 1.3rem 0 0.45rem;
    color: var(--jarvis);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
}

.legal-content p,
.legal-content li {
    color: #d9fff6;
}

.legal-content ul {
    padding-left: 1.2rem;
}

.legal-content code {
    color: #001b14;
    background: linear-gradient(135deg, #00ffaa, #8dffe6);
    border-radius: 8px;
    padding: 0.1rem 0.32rem;
    font-weight: 800;
}

.legal-note {
    margin-top: 1.4rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(0, 255, 170, 0.22);
    border-radius: 16px;
    background: rgba(0, 8, 7, 0.62);
    color: var(--muted) !important;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.footer-links a {
    color: var(--jarvis);
}

@media (max-width: 720px) {
    .footer-links {
        justify-content: flex-start;
    }
}


/* Soest Core */
.soest-core-panel {
    border-color: rgba(0, 255, 170, 0.34);
}

.soest-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
}

.soest-grid article {
    position: relative;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(0,255,170,.08), transparent 38%), var(--panel);
    box-shadow: var(--shadow), inset 0 0 24px rgba(0,255,170,.045);
    overflow: hidden;
    border-radius: 20px;
    padding: 1rem;
}

.soest-grid span {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(0,255,170,.24);
    background: rgba(0,255,170,.12);
    font-size: 1.5rem;
}

.soest-grid h3 {
    margin: .8rem 0 .45rem;
}

.soest-grid p {
    color: var(--muted);
    line-height: 1.5;
}

.soest-grid button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,255,170,.38);
    color: #aaffec;
    border-radius: 999px;
    background: rgba(0,20,18,.86);
    padding: .55rem .75rem;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 1120px) {
    .soest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .soest-grid {
        grid-template-columns: 1fr;
    }
}


/* Dialog realism and controls */
.dialog-note {
    border: 1px solid rgba(0,255,170,.22);
    border-radius: 16px;
    padding: .85rem 1rem;
    background: rgba(0, 8, 7, .56);
    color: #d9fff6;
    margin-bottom: .85rem;
    line-height: 1.5;
}

.dialog-note strong {
    color: var(--jarvis);
}

.chat-message {
    position: relative;
}

.chat-message.bot::before {
    content: "J";
    position: absolute;
    left: -0.55rem;
    top: -0.55rem;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(0,255,170,.55);
    border-radius: 50%;
    color: #001b14;
    background: linear-gradient(135deg, #00ffaa, #8dffe6);
    font-size: .8rem;
    font-weight: 900;
    box-shadow: 0 0 14px rgba(0,255,170,.42);
}

.chat-message.user::before {
    content: "Du";
    position: absolute;
    right: -0.55rem;
    top: -0.55rem;
    min-width: 30px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(76,236,255,.45);
    border-radius: 999px;
    color: #dffcff;
    background: rgba(0, 54, 64, .9);
    font-size: .72rem;
    font-weight: 900;
}

.controls-help-panel {
    border-color: rgba(0, 255, 170, 0.34);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
}

.controls-grid article {
    position: relative;
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(0,255,170,.08), transparent 38%), var(--panel);
    box-shadow: var(--shadow), inset 0 0 24px rgba(0,255,170,.045);
    overflow: hidden;
    border-radius: 20px;
    padding: 1rem;
}

.controls-grid span {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(0,255,170,.24);
    background: rgba(0,255,170,.12);
    font-size: 1.4rem;
}

.controls-grid h3 {
    margin: .8rem 0 .45rem;
}

.controls-grid p {
    color: var(--muted);
    line-height: 1.5;
}

.controls-grid button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,255,170,.38);
    color: #aaffec;
    border-radius: 999px;
    background: rgba(0,20,18,.86);
    padding: .55rem .75rem;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 1120px) {
    .controls-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }
}


/* Final additions */
.release-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-color: rgba(0,255,170,.38);
}

.release-notice.is-hidden {
    display: none;
}

.release-notice h2 {
    margin: .2rem 0 .45rem;
}

.release-notice p {
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

.release-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
    min-width: min(100%, 260px);
}

.danger-soft {
    border-color: rgba(255, 85, 119, .42) !important;
    color: #ffccd6 !important;
    background: rgba(45, 4, 14, .55) !important;
}

.chat-message.system-hint {
    border-color: rgba(255, 224, 102, .38);
    background: rgba(42, 34, 0, .38);
}

.chat-message.system-hint .meta {
    color: var(--warning);
}

@media (max-width: 860px) {
    .release-notice {
        flex-direction: column;
        align-items: stretch;
        padding: .85rem;
    }

    .release-actions {
        width: 100%;
        justify-content: stretch;
    }

    .release-actions > * {
        width: 100%;
    }
}


/* Planeten-Nerd */
.planet-nerd-panel {
    border-color: rgba(76, 236, 255, 0.34);
}

.planet-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
}

.planet-grid article {
    position: relative;
    border: 1px solid rgba(76,236,255,.24);
    background:
        radial-gradient(circle at 80% 15%, rgba(76,236,255,.12), transparent 36%),
        linear-gradient(135deg, rgba(0,255,170,.07), transparent 38%),
        var(--panel);
    box-shadow: var(--shadow), inset 0 0 24px rgba(76,236,255,.04);
    overflow: hidden;
    border-radius: 20px;
    padding: 1rem;
}

.planet-grid span {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(76,236,255,.28);
    background: rgba(76,236,255,.10);
    font-size: 1.5rem;
}

.planet-grid h3 {
    margin: .8rem 0 .45rem;
}

.planet-grid p {
    color: var(--muted);
    line-height: 1.5;
}

.planet-grid button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(76,236,255,.38);
    color: #dffcff;
    border-radius: 999px;
    background: rgba(0,20,24,.86);
    padding: .55rem .75rem;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 1120px) {
    .planet-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .planet-grid {
        grid-template-columns: 1fr;
    }
}


/* Planetendatenbank */
.planet-detail-bank {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(76,236,255,.18);
}

.planet-detail-bank h3 {
    margin: 0 0 .35rem;
    color: var(--jarvis-2);
}

.planet-detail-bank p {
    color: var(--muted);
    margin: 0 0 .8rem;
}

.planet-pill-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .6rem;
}

.planet-pill-grid button {
    border: 1px solid rgba(76,236,255,.34);
    border-radius: 999px;
    min-height: 42px;
    padding: .55rem .7rem;
    color: #dffcff;
    background: rgba(0, 20, 24, .86);
    font-weight: 900;
    cursor: pointer;
}

.planet-pill-grid button:hover {
    border-color: rgba(76,236,255,.78);
    box-shadow: 0 0 14px rgba(76,236,255,.16);
}

@media (max-width: 860px) {
    .planet-pill-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .planet-pill-grid {
        grid-template-columns: 1fr;
    }
}


/* Mikrofon / Spracheingabe */
.voice-input-status {
    margin-bottom: .75rem;
    border: 1px solid rgba(76,236,255,.32);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 255, 170, .1), rgba(0, 20, 24, .62));
    color: #dffcff;
    padding: .72rem .85rem;
    font-weight: 800;
    line-height: 1.42;
}

.voice-input-status.is-listening {
    border-color: rgba(0,255,170,.68);
    background: rgba(0, 48, 36, .62);
    box-shadow: 0 0 18px rgba(0,255,170,.14);
}

.voice-input-status.is-error {
    border-color: rgba(255, 85, 119, .5);
    background: rgba(45, 4, 14, .58);
    color: #ffccd6;
}

.mic-button {
    border-color: rgba(76,236,255,.42) !important;
}

.mic-button.is-listening {
    color: #001b14 !important;
    background: linear-gradient(135deg, #00ffaa, #8dffe6) !important;
    animation: jarvisMicPulse 1.1s ease-in-out infinite;
}

@keyframes jarvisMicPulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(0,255,170,0);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 0 24px rgba(0,255,170,.34);
        transform: translateY(-1px);
    }
}


/* Mikrofon direkt am Chat-Input */
.chat-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.chat-input-wrap input {
    padding-right: 3.35rem;
}

.voice-input-inline-button {
    position: absolute;
    right: 0.42rem;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 2.45rem;
    height: 2.45rem;
    border: 1px solid rgba(76,236,255,.42);
    border-radius: 50%;
    background: rgba(0, 20, 24, .86);
    color: #dffcff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 0 14px rgba(76,236,255,.08);
}

.voice-input-inline-button:hover {
    border-color: rgba(0,255,170,.72);
    box-shadow: 0 0 18px rgba(0,255,170,.18);
}

.voice-input-inline-button.is-listening {
    color: #001b14;
    background: linear-gradient(135deg, #00ffaa, #8dffe6);
    border-color: rgba(0,255,170,.9);
    animation: jarvisMicPulse 1.1s ease-in-out infinite;
}

@media (max-width: 620px) {
    .chat-input-wrap {
        width: 100%;
    }
}


/* Mikrofon Fallback */
.voice-input-status.is-fallback {
    border-color: rgba(255, 224, 102, .42);
    background: rgba(42, 34, 0, .34);
    color: #fff1a6;
}

.voice-fallback-info {
    margin: -.25rem 0 .75rem;
    border: 1px solid rgba(255, 224, 102, .22);
    border-radius: 14px;
    background: rgba(42, 34, 0, .24);
    color: #fff6c9;
    padding: .62rem .75rem;
    font-size: .9rem;
    line-height: 1.45;
}

.voice-fallback-info strong {
    color: #ffe066;
}

.voice-fallback-info kbd {
    display: inline-grid;
    place-items: center;
    min-width: 1.65rem;
    padding: .1rem .35rem;
    border: 1px solid rgba(255, 224, 102, .32);
    border-radius: 6px;
    background: rgba(0, 8, 7, .68);
    color: #fff6c9;
    font-weight: 900;
}


/* Mikrofon Permission Fix */
.voice-input-status.is-listening {
    box-shadow: 0 0 22px rgba(0,255,170,.2);
}


/* Mikrofon v21 */
.chat-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.chat-input-wrap input {
    padding-right: 3.35rem;
}

.voice-input-inline-button {
    position: absolute;
    right: 0.42rem;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 2.45rem;
    height: 2.45rem;
    border: 1px solid rgba(76,236,255,.42);
    border-radius: 50%;
    background: rgba(0, 20, 24, .86);
    color: #dffcff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 0 14px rgba(76,236,255,.08);
    line-height: 1;
}

.voice-input-inline-button:hover {
    border-color: rgba(0,255,170,.72);
    box-shadow: 0 0 18px rgba(0,255,170,.18);
}

.voice-input-inline-button.is-listening {
    color: #001b14 !important;
    background: linear-gradient(135deg, #00ffaa, #8dffe6) !important;
    border-color: rgba(0,255,170,.9) !important;
    font-size: 1rem;
    font-weight: 900;
    animation: jarvisMicPulse 1.1s ease-in-out infinite;
}

.voice-input-status.is-fallback {
    border-color: rgba(255, 224, 102, .42);
    background: rgba(42, 34, 0, .34);
    color: #fff1a6;
}




/* Jarvis Cyber Core Brain · Sprach-Lichtstrahl + neuronale Effekte nur beim Sprechen */
.jarvis-brain-stage {
    --voice-energy: 0;
    position: absolute;
    z-index: 2;
    right: clamp(1rem, 4vw, 3rem);
    top: 50%;
    width: min(42%, 500px);
    max-width: 500px;
    aspect-ratio: 4 / 3;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    pointer-events: none;
    isolation: isolate;
    opacity: .96;
    mix-blend-mode: screen;
    overflow: visible;
}

.jarvis-brain-stage::before {
    content: "";
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(141,255,20, calc(.06 + var(--voice-energy) * .18)),
        rgba(0,255,170, calc(.02 + var(--voice-energy) * .10)) 36%,
        transparent 68%);
    filter: blur(18px);
    opacity: calc(.16 + var(--voice-energy) * .34);
    transform: scale(calc(.88 + var(--voice-energy) * .16));
    transition: transform .12s ease, opacity .12s ease;
    z-index: -1;
}

.jarvis-brain-stage::after {
    content: attr(data-state);
    position: absolute;
    left: 50%;
    bottom: 9%;
    transform: translateX(-50%);
    padding: .42rem .85rem;
    border: 1px solid rgba(151, 255, 54, .4);
    border-radius: 999px;
    background: rgba(2, 18, 18, .72);
    color: #dfff8a;
    font: 700 .68rem/1.1 ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 0 20px rgba(80, 255, 96, .14), inset 0 0 12px rgba(0, 255, 200, .08);
    opacity: .72;
    transition: opacity .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.jarvis-brain-stage svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
    opacity: .94;
    filter:
        drop-shadow(0 0 10px rgba(141,255,20,.24))
        drop-shadow(0 0 20px rgba(0,255,170,.10));
    transition: filter .14s ease, opacity .14s ease;
}

.jarvis-brain-stage.is-listening::before {
    background: radial-gradient(circle, rgba(0, 255, 220, .28), rgba(0, 170, 255, .1) 42%, transparent 70%);
    animation: jarvisListenRadar 1.25s ease-out infinite;
}

.jarvis-brain-stage.is-listening::after {
    color: #8cfff0;
    border-color: rgba(0, 255, 220, .72);
    opacity: 1;
}

.jarvis-brain-stage.is-thinking svg {
    animation: jarvisThinkingCore .78s ease-in-out infinite alternate;
}

.jarvis-brain-stage.is-thinking::after {
    color: #f3ff94;
    border-color: rgba(218, 255, 74, .75);
    opacity: 1;
}

.jarvis-brain-stage.is-speaking svg {
    opacity: 1;
    filter:
        drop-shadow(0 0 calc(12px + var(--voice-energy) * 8px) rgba(178,255,34,.5))
        drop-shadow(0 0 calc(24px + var(--voice-energy) * 18px) rgba(0,255,170,.18));
    animation: jarvisVoicePresence .48s ease-in-out infinite alternate;
}

.jarvis-brain-stage.is-speaking::after {
    opacity: 1;
    color: #f4ffd0;
    border-color: rgba(191, 255, 67, .9);
    transform: translateX(-50%) scale(1.04);
    box-shadow: 0 0 28px rgba(135, 255, 49, .3), inset 0 0 16px rgba(0, 255, 200, .12);
}

.jarvis-brain-stage.voice-burst svg {
    transform: scale(1.022);
}

body.jarvis-is-speaking .voice-bars span {
    animation-duration: .42s;
    box-shadow: 0 0 18px rgba(141,255,20,.68);
}

@keyframes jarvisListenRadar {
    0% { transform: scale(.82); opacity: .26; }
    70% { transform: scale(1.08); opacity: .7; }
    100% { transform: scale(1.16); opacity: 0; }
}

@keyframes jarvisThinkingCore {
    from { filter: drop-shadow(0 0 12px rgba(141,255,20,.3)) hue-rotate(0deg); }
    to { filter: drop-shadow(0 0 30px rgba(0,255,210,.42)) hue-rotate(22deg); }
}

@keyframes jarvisVoicePresence {
    from { transform: scale(1); }
    to { transform: scale(calc(1.018 + var(--voice-energy) * .018)); }
}

@media (max-width: 960px) {
    .jarvis-brain-stage {
        width: min(52%, 420px);
        right: clamp(.35rem, 2vw, 1rem);
        top: 38%;
        opacity: .54;
    }

    .cover-overlay {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .jarvis-brain-stage {
        width: min(86%, 420px);
        right: 50%;
        top: 27%;
        transform: translate(50%, -50%);
        opacity: .38;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jarvis-brain-stage,
    .jarvis-brain-stage::before,
    .jarvis-brain-stage svg {
        animation: none !important;
        transition: none !important;
    }
}
