:root{color-scheme:dark;--bg:#08142c;--surface:#102344;--surface2:#172e55;--line:#304b77;--muted:#aabdd8;--pink:#ff5ba8;--white:#f5f8ff}*{box-sizing:border-box}body{background:var(--bg);color:var(--white);font:15px system-ui,-apple-system,sans-serif;margin:0}button,input,select,textarea{font:inherit}button{border:0;border-radius:10px;padding:12px 17px;background:var(--pink);color:#190e21;font-weight:800;cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}button.secondary,.quiet{background:#234370;color:white}button.quiet{padding:8px}.shell{max-width:1050px;padding:16px 20px 70px;margin:auto}.top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:10px 0 24px}.brand{display:flex;gap:12px;align-items:center}.logo{display:grid;place-items:center;width:48px;height:48px;background:linear-gradient(135deg,#203e75,#f04b9c);border-radius:14px;font-size:26px;font-weight:900}h1{font-size:23px;line-height:1.15;margin:0}h1 em{font-style:normal;color:var(--pink)}small,.subtle{color:var(--muted);font-size:12px}h2{font-size:25px;margin:.2em 0}h3{font-size:19px;margin:0 0 18px}p{line-height:1.55;color:#c2cfe2}a{color:#8fbfff}section.panel,.panel{background:var(--surface);border:1px solid var(--line);padding:22px;border-radius:16px;margin:16px 0}.hero{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:16px 4px}.eyebrow{color:var(--pink);letter-spacing:1.5px;font-size:12px;font-weight:750}.stats{display:flex;flex-wrap:wrap;gap:8px;min-width:250px}.stat{background:var(--surface2);padding:14px;border-radius:14px;flex:1;min-width:90px;text-align:center}.stat strong{display:block;font-size:22px}.stat span{font-size:12px;color:var(--muted)}.tabs{display:flex;gap:7px;overflow:auto;padding:6px 0}.tabs button{background:var(--surface2);color:white;white-space:nowrap;font-weight:500}.tabs button.selected{background:var(--pink);color:#160d1c;font-weight:800}label{display:block;color:#e0e8f6;font-weight:650;margin:15px 0 6px}input:not([type=file]),select,textarea{width:100%;color:white;border:1px solid #45658d;border-radius:10px;background:#091c3b;padding:11px;outline-color:var(--pink)}textarea{resize:vertical;min-height:100px}.upload,.recorder{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:15px 0}.filebutton{margin:0;padding:12px 15px;background:#234370;border-radius:10px;cursor:pointer}.notice:not(:empty){border-left:3px solid var(--pink);background:#172e55;border-radius:5px;padding:12px 16px;margin:10px 0}.entry{padding:14px 0;border-bottom:1px solid var(--line)}.entry header{display:flex;gap:10px;align-items:center;justify-content:space-between}.entry h4{margin:0 0 5px;font-size:15px}.entry p{margin:5px 0}.tag{background:var(--surface2);padding:4px 8px;font-size:11px;border-radius:7px;white-space:nowrap}.entry small{display:block}footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:15px;margin-top:32px;color:var(--muted);font-size:12px}.muted{color:var(--muted)}audio{width:100%}@media(max-width:640px){.shell{padding:12px 13px 55px}.hero{display:block}h2{font-size:21px}.panel{padding:15px!important}.stats{min-width:0}.brand small{font-size:11px}}
/* Severino Voice: mobile-first, high-contrast conversation */
.voice-chat{display:flex;flex-direction:column;gap:12px;max-height:min(54vh,480px);min-height:190px;overflow-y:auto;padding:14px;background:#07182f;border:1px solid #304b77;border-radius:16px;scroll-behavior:smooth}
.voice-bubble{max-width:91%;padding:12px 15px;border-radius:15px;white-space:pre-wrap;line-height:1.48;overflow-wrap:anywhere}
.voice-bubble.assistant{align-self:flex-start;background:#183762;color:#fff;border-bottom-left-radius:4px}
.voice-bubble.user{align-self:flex-end;background:#f45aa6;color:#170e20;border-bottom-right-radius:4px}
.voice-form{margin-top:16px}.voice-form label{margin-top:0}
.voice-form textarea{min-height:75px}
.voice-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.voice-actions button{flex:1;min-width:118px}
#voice-state{padding-top:12px;min-height:26px}
@media(max-width:640px){.voice-actions button{font-size:14px;padding:13px 9px}.voice-chat{max-height:45vh;padding:10px}.voice-bubble{max-width:96%}}

/* Jerry preview refinement */
body{background:radial-gradient(ellipse at 80% 0%,#172a4a 0%,#08142c 52%,#050d1c 100%)}.panel{border-radius:20px}.voice-chat{border-radius:18px}.voice-bubble{border-radius:16px}button{border-radius:12px}

/* Jerry LP Voice Stage — independent browser speech UI */
.jerry-header{display:flex;justify-content:space-between;align-items:start;gap:12px}
.jerry-header h3{margin:0;font-size:26px;letter-spacing:.02em}
.jerry-eyebrow{font-size:10px;letter-spacing:.16em;font-weight:800;color:#79eaf8;margin:0 0 6px}
.jerry-online-dot{display:inline-block;width:9px;height:9px;margin-left:5px;border-radius:100%;background:#75ead7;box-shadow:0 0 12px #75ead7}
.jerry-back{display:none;white-space:nowrap}
.jerry-audio-stage{position:relative;min-height:318px;max-height:430px;width:100%;overflow:hidden;isolation:isolate;border-radius:22px;background:radial-gradient(ellipse at center,#123b62 0,#0a1b36 42%,#07152b 76%);margin:14px auto 16px;transition:min-height .28s ease}
.jerry-wave{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.jerry-visual{position:absolute;width:225px;height:225px;left:50%;top:43%;transform:translate(-50%,-50%);filter:drop-shadow(0 0 24px rgba(34,185,234,.3));transition:transform .2s}
.jerry-robot{width:100%;height:100%;position:absolute;inset:0;filter:drop-shadow(0 0 10px rgba(50,218,249,.2))}
.jerry-brand-disc{position:absolute;top:51%;left:50%;transform:translate(-50%,-50%);border-radius:50%;width:93px;height:93px;display:grid;place-items:center;background:radial-gradient(circle at 35% 20%,#153f67,#07182f 75%);border:2px solid #c5fbff;box-shadow:0 0 20px rgba(69,223,250,.25)}
.jerry-brand-disc img{width:88%;height:88%;object-fit:contain}
.jerry-aura{position:absolute;border-radius:50%;inset:-14px;border:1px solid rgba(74,221,249,.3);animation:jerry-aura 3s ease-in-out infinite}
.jerry-aura-two{inset:-30px;border-color:rgba(255,91,168,.22);animation-delay:1s}
.jerry-audio-label{position:absolute;bottom:13px;left:0;right:0;display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;padding:0 16px;font-size:14px}
.jerry-audio-label strong{font-size:16px;color:#e7fbff}
#voice-interim{color:#a8bfdc;min-height:18px;max-width:85%;overflow-wrap:anywhere}
.jerry-audio-stage[data-mode="listening"] .jerry-visual{transform:translate(-50%,-50%) scale(1.06)}
.jerry-audio-stage[data-mode="speaking"] .jerry-brand-disc{box-shadow:0 0 34px rgba(255,91,168,.55);border-color:#ff88c4}
.jerry-audio-stage[data-mode="thinking"] .jerry-visual{animation:jerry-thinking 2s ease-in-out infinite}
.jerry-dialogue-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:13px 0 8px}
.jerry-dialogue-heading strong{font-size:15px}
.jerry-dialogue-heading button{padding:7px 12px;font-size:12px}
.jerry-voice-settings{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px;border:1px solid #294a6e;border-radius:15px;background:#0a1d39}
.jerry-voice-settings>label{font-size:12px;color:#c2dbf1;margin:0}
.jerry-voice-settings select{width:100%;margin-top:5px;min-height:42px;border-radius:9px;background:#132e52;color:#f5f8ff;border:1px solid #385c7e}
.jerry-voice-sliders{display:grid;grid-column:1/-1;grid-template-columns:1fr 1fr;gap:12px}
.jerry-voice-sliders label{margin:0;font-size:12px}
.jerry-voice-sliders output{color:#6be8f9}
.jerry-voice-sliders input{width:100%;accent-color:#ff5ba8;margin:9px 0 0}
#voice-preview{grid-column:1/-1;font-size:13px}
.jerry-voice-help{grid-column:1/-1;font-size:11px;margin:0}
#voice-state{padding-top:9px;min-height:22px}
#voice.jerry-is-live .jerry-back{display:inline-block}
#voice.jerry-is-live .jerry-audio-stage{min-height:min(60vh,530px);max-height:none}
#voice.jerry-is-live .jerry-visual{top:46%;transform:translate(-50%,-50%) scale(1.2)}
#voice.jerry-is-live .jerry-voice-settings,#voice.jerry-is-live .jerry-dialogue-heading,#voice.jerry-is-live .voice-chat,#voice.jerry-is-live .voice-form>label,#voice.jerry-is-live #voice-input,#voice.jerry-is-live #voice-send{display:none}
#voice.jerry-is-live .voice-form{margin-top:0}
#voice.jerry-is-live .voice-actions{flex-wrap:nowrap}
#voice.jerry-is-live #voice-mic,#voice.jerry-is-live #voice-stop{min-width:0}
@keyframes jerry-aura{0%,100%{transform:scale(.99);opacity:.42}50%{transform:scale(1.045);opacity:.84}}
@keyframes jerry-thinking{0%,100%{filter:brightness(1)}50%{filter:brightness(1.4)}}
@media(max-width:560px){.jerry-voice-settings{grid-template-columns:1fr}.jerry-voice-sliders{grid-template-columns:1fr 1fr}.jerry-audio-stage{min-height:340px}.jerry-visual{width:210px;height:210px}.jerry-header h3{font-size:24px}#voice.jerry-is-live .jerry-audio-stage{min-height:55vh}}
@media(prefers-reduced-motion:reduce){.jerry-aura,.jerry-audio-stage[data-mode="thinking"] .jerry-visual{animation:none}.jerry-visual,.jerry-audio-stage{transition:none}}

/* Jerry standalone: integration panels remain unavailable until authorized. */
main .hero, main nav.tabs, main #submit, main #inbox, main #projects {display:none!important}
#voice {margin-top:8px}
#voice-state {min-height:1.5em}
@media (prefers-reduced-motion:reduce){.jerry-aura,.jerry-aura-two{animation:none!important}}


/* JERRY V2 LAYER */
/* Jerry V2 - isolated UI trial. No production changes. */
body{background:radial-gradient(ellipse at 60% 0%,#142d51,#050b1c 65%) fixed}
.shell{max-width:750px}
.hero,.tabs,footer{display:none}
#main{max-width:650px;margin-inline:auto}
#voice{background:transparent;border:0;padding:0;margin:0;box-shadow:none}
#voice .jerry-header{align-items:center;margin:6px 0}
#voice .jerry-header h3{font-size:1.4rem}
#voice .jerry-eyebrow{font-size:.7rem;color:#7debf8}
#voice .jerry-audio-stage{border:1px solid #1a436b;background:radial-gradient(ellipse at 50% 35%,#173b60,#08162e 65%,#050a1b);box-shadow:inset 0 0 60px #07254b,0 20px 60px #0006;margin:10px auto 16px;min-height:min(53vh,500px)}
#voice .jerry-dialogue-heading{margin:16px 0 10px}
#voice .voice-chat{max-height:160px;min-height:90px;background:#091931b0;border:1px solid #263f60}
#voice .voice-form textarea{min-height:48px;max-height:90px}
#voice .voice-form>label{font-size:.82rem}
#voice .voice-actions button{min-width:0}
#voice #voice-mic{background:linear-gradient(110deg,#41dcef,#668ffc);color:#041429;font-weight:800}
#voice #voice-stop{background:#2e3353}
#voice .jerry-voice-settings{display:none}
.jerry-menu-toggle{background:#182b4b;color:#f8fbff;min-width:46px;font-size:23px;padding:8px 11px;border:1px solid #41607d}
.jerry-menu-backdrop{position:fixed;inset:0;background:#0009;z-index:99;display:none}
.jerry-menu-backdrop.open{display:block}
.jerry-menu{position:fixed;top:0;right:0;bottom:0;width:min(90vw,380px);overflow-y:auto;background:linear-gradient(180deg,#122c4e,#07142b);box-shadow:-20px 0 55px #000b;border-left:1px solid #395477;padding:22px;z-index:100;transform:translateX(103%);transition:transform .24s ease}
.jerry-menu.open{transform:translateX(0)}
.jerry-menu-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.jerry-menu h3{font-size:1.25rem;margin:0}
.jerry-menu h4{margin:24px 0 8px;color:#89d9fa}
.jerry-menu nav{display:grid;gap:8px}
.jerry-menu nav button,.jerry-menu nav a{display:block;text-align:left;background:#193758;color:#f3f8ff;border:1px solid #31557b;border-radius:12px;padding:13px;text-decoration:none;font-weight:600}
.jerry-menu nav button:focus-visible,.jerry-menu nav a:focus-visible,.jerry-menu-toggle:focus-visible{outline:3px solid #80eafc}
.jerry-menu nav .jerry-unavailable{opacity:.6}
.jerry-menu .jerry-voice-settings{display:grid!important}
.jerry-menu .jerry-menu-info{color:#acbfd8;font-size:12px}
#main:has(#voice:not([hidden])) #submit,#main:has(#voice:not([hidden])) #inbox,#main:has(#voice:not([hidden])) #projects{display:none}
@media(max-width:640px){.shell{padding:12px 14px}.top{margin:0 0 12px}.brand h1{font-size:18px}#voice .jerry-audio-stage{min-height:50vh}#voice .jerry-audio-label{bottom:18px}#voice .jerry-dialogue-heading{margin-top:12px}}
@media(prefers-reduced-motion:reduce){.jerry-menu{transition:none}}

.shell:has(#main[hidden]) .jerry-menu-toggle{display:none}


/* JERRY V3 LAYER */

/* Jerry V3 – staged-only experience with an avatar derived from the approved mockup. */
:root{--j-blue:#1678ff;--j-turquoise:#74dcff;--j-nav:#091326}
body{background:radial-gradient(ellipse at 50% 0%,#142d4e 0%,#081426 45%,#040915 100%) fixed}
.shell{max-width:760px;padding-top:max(12px,env(safe-area-inset-top))}
.top{align-items:center;border-bottom:1px solid #1a3251;padding:5px 0 13px;gap:12px}
.top .brand{display:flex;align-items:center;gap:11px}
.top .brand .logo{display:grid;place-items:center;border-radius:14px;background:linear-gradient(135deg,#1baff9,#1765e8);color:white;font-weight:900;font-size:19px;width:43px;height:43px;min-width:43px;box-shadow:0 5px 25px #1d74fb45}
.top .brand h1{letter-spacing:-.02em;margin:0;color:#f5f9ff;font-size:22px}
.top .brand h1 em{font-style:normal;color:#68d6ff}
.top .brand small{font-size:11px;color:#a2c2dd}
.jerry-menu-toggle{margin-left:auto;border:1px solid #345675;border-radius:12px;font-size:26px;line-height:1;padding:9px 13px;background:#132942}
#voice .jerry-header{align-items:start;margin:10px 2px 8px}
#voice .jerry-eyebrow{color:#73bdff;font-size:9px;letter-spacing:.13em}
#voice .jerry-header h3{font-size:21px}
#voice .jerry-header .subtle{font-size:12px;line-height:1.5;max-width:520px}
#voice .jerry-audio-stage{margin:4px auto 0;min-height:425px;max-height:none;height:min(54vh,470px);border:1px solid #24446b;background:radial-gradient(ellipse at 48% 42%,#224878 0%,#0c223e 48%,#060f22 90%);border-radius:27px 27px 10px 10px;isolation:isolate}
#voice .jerry-audio-stage::before{content:"";position:absolute;z-index:0;width:70%;height:74%;left:15%;top:5%;border-radius:100%;background:#2e90f226;filter:blur(44px);pointer-events:none}
#voice .jerry-visual{width:100%;height:100%;top:0;left:0;transform:none;filter:none}
#voice .jerry-portrait{position:absolute;display:block;z-index:2;width:min(91%,370px);height:min(94%,440px);max-height:100%;left:50%;top:50%;object-fit:contain;transform:translate(-50%,-50%);border-radius:30px;mask-image:linear-gradient(to bottom,black 2%,black 84%,transparent 100%);filter:drop-shadow(0 15px 20px #0207118c);transition:transform .5s ease,filter .5s ease;pointer-events:none}
#voice .jerry-robot{width:min(70%,280px);height:min(70%,280px);left:50%;top:48%;transform:translate(-50%,-50%)}
#voice .jerry-audio-stage.avatar-ready .jerry-robot,
#voice .jerry-audio-stage.avatar-ready .jerry-brand-disc{display:none}
#voice .jerry-audio-stage.avatar-ready .jerry-aura{opacity:.15}
#voice .jerry-audio-stage .jerry-wave{z-index:3;opacity:.20}
#voice .jerry-audio-label{z-index:4;bottom:0;background:linear-gradient(transparent,#071124ee 54%);padding:24px 16px 13px}
#voice .jerry-audio-label strong{letter-spacing:.02em;color:#eaf8ff}
#voice #voice-interim{color:#d8e5f4;font-size:12px}
#voice .jerry-intro{padding:15px 8px 9px;text-align:center}
#voice .jerry-intro h2{font-size:clamp(22px,5.4vw,30px);line-height:1.18;letter-spacing:-.03em;margin:0 0 6px}
#voice .jerry-intro p{margin:0;color:#a5bad8;font-size:13px}
#voice .jerry-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:13px 0 16px}
#voice .jerry-shortcuts button{background:linear-gradient(145deg,#142a48,#0d1c32);border:1px solid #355478;color:#ebf4ff;border-radius:17px;min-width:0;min-height:95px;padding:10px 6px;font-size:12px;font-weight:650;line-height:1.25;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
#voice .jerry-shortcuts button:active{transform:translateY(1px)}
#voice .jerry-shortcuts .symbol{font-size:22px;color:#78d9ff;line-height:1}
#voice .voice-actions{display:grid;grid-template-columns:1fr minmax(135px,1.6fr) 1fr;gap:12px;max-width:430px;margin:0 auto}
#voice .voice-actions button{min-width:0!important;margin:0;border:1px solid #2d4d76;border-radius:22px;min-height:54px;background:#142942;color:#dae8fa;padding:11px 8px}
#voice #voice-mic{border:2px solid #7bc7ff;border-radius:24px;background:linear-gradient(110deg,#0575ff,#0f5ce4);box-shadow:0 5px 29px #0074ff5e;color:#fff;font-weight:800}
#voice #voice-stop{background:#2b1b32;border:1px solid #733c5a;color:#ffd4e5}
#voice #voice-input{background:#0e223b;border:1px solid #34567c;border-radius:14px;color:white}
#voice .voice-chat{max-height:215px;min-height:70px;border-radius:17px}
#voice #voice-state{font-size:12px;text-align:center;color:#9bb4d5;padding-bottom:14px}
#voice .jerry-dialogue-heading{margin-top:20px}
#voice.jerry-is-live .jerry-shortcuts,#voice.jerry-is-live .jerry-intro{display:none}
#voice.jerry-is-live .jerry-audio-stage{height:min(66vh,600px);max-height:none}
#voice.jerry-is-live .jerry-visual{top:0;transform:none}
#voice.jerry-is-live .jerry-audio-stage.avatar-ready .jerry-portrait{transform:translate(-50%,-50%) scale(1.055)}
#voice .jerry-audio-stage[data-mode="listening"].avatar-ready .jerry-portrait{filter:drop-shadow(0 0 22px #268eff66) brightness(1.05)}
#voice .jerry-audio-stage[data-mode="thinking"].avatar-ready .jerry-portrait{animation:jerry-soft-think 2.7s ease-in-out infinite}
#voice .jerry-audio-stage[data-mode="speaking"].avatar-ready .jerry-portrait{animation:jerry-soft-speak 1.7s ease-in-out infinite}
@keyframes jerry-soft-think{0%,100%{filter:brightness(1);transform:translate(-50%,-50%)}50%{filter:brightness(1.07);transform:translate(-50%,-50%) translateY(-5px)}}
@keyframes jerry-soft-speak{0%,100%{filter:brightness(1);transform:translate(-50%,-50%)}50%{filter:brightness(1.1);transform:translate(-50%,-50%) scale(1.018)}}
.jerry-menu[aria-hidden="true"]{visibility:hidden}
.jerry-menu[aria-hidden="false"]{visibility:visible}
.jerry-menu{z-index:102}
.jerry-menu-backdrop{z-index:101}
button:focus-visible,a:focus-visible,textarea:focus-visible{outline:3px solid #91dfff;outline-offset:2px}
@media(max-width:600px){.shell{padding:8px 12px 12px}.top .brand small{font-size:10px}#voice .jerry-audio-stage{min-height:320px;height:45vh}#voice .jerry-portrait{width:min(88%,325px)}#voice .jerry-shortcuts{gap:6px}#voice .jerry-shortcuts button{font-size:11px;padding:8px 4px;min-height:88px;border-radius:14px}#voice .voice-actions{gap:7px;grid-template-columns:1fr 1.35fr 1fr}#voice .voice-actions button{font-size:12px}#voice.jerry-is-live .jerry-audio-stage{height:57vh}}
@media(prefers-reduced-motion:reduce){#voice .jerry-audio-stage.avatar-ready .jerry-portrait{animation:none!important;transition:none!important}}
