:root{--stock-bg:#07111f;--stock-panel:rgba(11,24,42,.64);--stock-line:rgba(255,255,255,.14);--stock-text:#eef7ff;--stock-muted:#9fb5ca;--stock-accent:#35d7ff;--stock-accent2:#7b61ff}
.maxaistock-shell{min-height:100vh;background:radial-gradient(circle at 15% 10%,rgba(53,215,255,.10),transparent 28rem),radial-gradient(circle at 85% 5%,rgba(123,97,255,.12),transparent 32rem),linear-gradient(180deg,#07111f 0%,#0a1422 58%,#07101c 100%);color:var(--stock-text)}
.stock-header{position:sticky;top:0;z-index:1030;background:rgba(6,14,25,.78);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.08)}
.stock-navbar{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.stock-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:#fff;min-width:0}.stock-logo{width:46px;height:46px;object-fit:contain;border-radius:12px}.stock-brand-title{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:9px 18px;border-radius:999px;font-weight:800;letter-spacing:.03em;color:#fff;background:#0b1626}.stock-brand-title::before{content:"";position:absolute;inset:-2px;border-radius:inherit;background:conic-gradient(from var(--brand-angle,0deg),#2ce6ff,#7f5cff,#ff4fd8,#2ce6ff);z-index:-2;animation:brandSpin 4.5s linear infinite}.stock-brand-title::after{content:"";position:absolute;inset:1px;border-radius:inherit;background:#0b1626;z-index:-1}@keyframes brandSpin{to{--brand-angle:360deg}}@property --brand-angle{syntax:"<angle>";initial-value:0deg;inherits:false}
.stock-nav-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.stock-nav-actions .nav-link{color:#eaf4ff}.stock-nav-actions .btn-primary{background:linear-gradient(135deg,#17bfe8,#6a62ff);border:0}.stock-language{min-width:132px;background-color:rgba(255,255,255,.08);border-color:rgba(255,255,255,.18);color:#fff}.stock-language option{color:#111;background:#fff}
.stock-main{padding-top:38px;padding-bottom:64px;max-width:1320px}.stock-home-hero{text-align:center;margin:18px auto 34px;max-width:880px}.stock-home-hero h1{font-size:clamp(2.1rem,5vw,4.4rem);font-weight:850;letter-spacing:-.04em;margin:.35rem 0 1rem;background:linear-gradient(90deg,#fff,#8cecff,#b7a8ff);-webkit-background-clip:text;background-clip:text;color:transparent}.stock-home-hero p{font-size:clamp(1rem,2vw,1.25rem);color:var(--stock-muted);max-width:760px;margin:auto}.stock-kicker{font-size:.78rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#6ce6ff}
.glass-launcher{position:relative;padding:clamp(18px,3vw,34px);border-radius:30px;background:linear-gradient(145deg,rgba(255,255,255,.11),rgba(255,255,255,.045));border:1px solid var(--stock-line);box-shadow:0 24px 70px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.12);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);overflow:hidden}.glass-launcher::before{content:"";position:absolute;inset:-35% auto auto -10%;width:360px;height:360px;border-radius:50%;background:rgba(53,215,255,.07);filter:blur(8px);pointer-events:none}.launcher-heading{position:relative;display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:24px}.launcher-heading h2{margin:.2rem 0 0;font-size:clamp(1.35rem,2.4vw,2rem);color:#fff}.launcher-heading.compact{margin-top:22px}.launcher-note{color:var(--stock-muted);font-size:.92rem}.launcher-divider{height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.18),transparent);margin:30px 0 10px}
.app-grid{position:relative;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:clamp(14px,2vw,24px)}.account-grid{grid-template-columns:repeat(4,minmax(0,1fr));max-width:760px}.app-form{display:contents}.app-tile{min-height:142px;padding:16px 10px 13px;border-radius:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:11px;text-align:center;text-decoration:none;color:#eaf5ff;background:linear-gradient(145deg,rgba(255,255,255,.10),rgba(255,255,255,.035));border:1px solid rgba(255,255,255,.11);box-shadow:0 12px 28px rgba(0,0,0,.2);transition:transform .2s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease}.app-tile:hover,.app-tile:focus-visible{transform:translateY(-5px) scale(1.015);color:#fff;border-color:rgba(85,222,255,.55);background:linear-gradient(145deg,rgba(70,213,255,.14),rgba(126,94,255,.09));box-shadow:0 18px 38px rgba(0,0,0,.28),0 0 0 1px rgba(80,220,255,.1)}.app-button{width:100%;font:inherit;cursor:pointer}.app-icon{width:68px;height:68px;border-radius:19px;display:grid;place-items:center;background:linear-gradient(145deg,rgba(38,213,255,.24),rgba(116,86,255,.27));border:1px solid rgba(255,255,255,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 10px 22px rgba(0,0,0,.2)}.app-icon svg{width:36px;height:36px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.app-tile>span:last-child{font-weight:700;line-height:1.25}
.stock-footer{border-top:1px solid rgba(255,255,255,.08);background:rgba(3,10,18,.7);color:var(--stock-muted)}.stock-footer-inner{min-height:74px;display:flex;gap:14px 20px;align-items:center;justify-content:center;flex-wrap:wrap;font-size:.9rem}.stock-footer a{color:#cfeeff;text-decoration:none}.stock-footer a:hover{text-decoration:underline}
/* Reassert template shell after imported stock CSS. */.stock-header .btn,.stock-header .nav-link{white-space:nowrap}.maxaistock-shell .container{width:min(100% - 28px,1320px);max-width:1320px}.maxaistock-shell main a:not(.app-tile){text-underline-offset:3px}
@media(max-width:1100px){.app-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.account-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.stock-navbar{align-items:flex-start;padding-top:12px;padding-bottom:12px}.stock-nav-actions{gap:8px}.stock-brand-title{padding:8px 12px}.stock-logo{width:40px;height:40px}.app-grid,.account-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.app-tile{min-height:126px;border-radius:21px}.app-icon{width:60px;height:60px}.launcher-heading{align-items:flex-start;flex-direction:column}.stock-main{padding-top:22px}}
@media(max-width:520px){.stock-navbar{flex-direction:column}.stock-nav-actions{width:100%;justify-content:flex-start}.stock-language{min-width:118px}.app-grid,.account-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.glass-launcher{border-radius:24px;padding:16px}.app-tile{min-height:118px;padding:12px 8px}.app-icon{width:56px;height:56px;border-radius:17px}.stock-footer-inner{justify-content:flex-start;padding:18px 0}}

/* Consistent header typography and high-contrast warm navigation links. */
.stock-header .stock-nav-actions :is(.stock-nav-link, .nav-link, .btn, .stock-language) {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}
.stock-header .stock-nav-link {
    display: inline-block;
    padding: .5rem .25rem;
    color: #e8bd72;
    text-decoration: none;
    white-space: nowrap;
}
.stock-header .stock-nav-link:hover,
.stock-header .stock-nav-link:focus-visible {
    color: #ffe1a6;
    text-decoration: underline;
    text-underline-offset: .25em;
}

/* Transparent account glass with high-contrast form text. */
.maxaistock-shell .auth-panel {
    color: #fff;
    background: linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
    border: 1px solid rgba(200,230,255,.32);
    box-shadow: 0 24px 64px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.12);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    color-scheme: dark;
}
.maxaistock-shell .auth-panel h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0,0,0,.45);
}
.maxaistock-shell .auth-panel label {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .4rem;
}
.maxaistock-shell .auth-panel .form-control {
    min-height: 46px;
    background: rgba(3,12,24,.38);
    border-color: rgba(200,230,255,.45);
    color: #fff;
    caret-color: #fff;
    font-size: 1rem;
    font-weight: 600;
}
.maxaistock-shell .auth-panel .form-control::placeholder { color: #c8d9e9; opacity: 1; }
.maxaistock-shell .auth-panel .form-control:focus {
    background: rgba(3,12,24,.55);
    border-color: #79e5ff;
    box-shadow: 0 0 0 3px rgba(53,215,255,.24);
}
.maxaistock-shell .auth-panel .form-control:autofill {
    -webkit-text-fill-color: #fff;
    box-shadow: inset 0 0 0 1000px #162638;
}
.maxaistock-shell .auth-panel input[type="checkbox"] { accent-color: #4164ed; width: 1rem; height: 1rem; vertical-align: -.1rem; }
.maxaistock-shell .auth-panel input[type="checkbox"]:focus-visible { outline: 2px solid #79e5ff; outline-offset: 3px; }
.maxaistock-shell .auth-panel .btn-primary { color: #fff; background: #3654d9; border-color: #7890ff; min-height: 46px; font-size: 1rem; font-weight: 800; }
.maxaistock-shell .auth-panel .btn-primary:hover { background: #2d47bc; }
.maxaistock-shell .auth-panel .btn-primary:focus-visible { outline: 3px solid #79e5ff; outline-offset: 3px; }
.maxaistock-shell .auth-panel .text-danger { color: #ffb4bd !important; font-weight: 700; }
.maxaistock-shell .auth-panel a:not(.btn) { color: #91e7ff; font-weight: 700; text-decoration: underline; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .maxaistock-shell .auth-panel { background: rgba(16,31,52,.92); }
}

/* Phase 4 navigation accessibility and account-state contract. */
.stock-account-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.stock-logout-form{margin:0}.stock-console-link,.stock-login-link{border-radius:.65rem;padding:.52rem .72rem}.stock-header a:focus-visible,.stock-header button:focus-visible,.stock-header select:focus-visible{outline:3px solid #6ce6ff;outline-offset:3px;box-shadow:none}.stock-brand:focus-visible{border-radius:16px}.stock-language:focus-visible{border-color:#6ce6ff}
@media(max-width:520px){.stock-account-actions{width:100%;justify-content:flex-start}.stock-account-actions .nav-link,.stock-account-actions .btn{min-height:42px;display:inline-flex;align-items:center}}
@media(prefers-reduced-motion:reduce){.stock-brand-title::before{animation:none}.app-tile{transition:none}}

/* Phase 5 homepage glass App Launcher contract. */
.stock-app-grid .app-tile{isolation:isolate;position:relative;overflow:hidden;min-width:0}
.stock-app-grid .app-tile::before{content:"";position:absolute;inset:0;background:linear-gradient(145deg,rgba(255,255,255,.08),transparent 52%);opacity:.8;pointer-events:none;z-index:-1}
.stock-app-grid .app-tile:nth-child(4n+1) .app-icon{background:linear-gradient(145deg,rgba(38,213,255,.30),rgba(31,120,255,.28))}
.stock-app-grid .app-tile:nth-child(4n+2) .app-icon{background:linear-gradient(145deg,rgba(143,92,255,.32),rgba(255,82,199,.22))}
.stock-app-grid .app-tile:nth-child(4n+3) .app-icon{background:linear-gradient(145deg,rgba(46,217,144,.30),rgba(29,171,255,.22))}
.stock-app-grid .app-tile:nth-child(4n) .app-icon{background:linear-gradient(145deg,rgba(255,174,51,.30),rgba(255,91,117,.22))}
.stock-app-grid .app-tile:active{transform:translateY(-1px) scale(.99)}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.glass-launcher{background:rgba(16,31,52,.96)}}
@media(hover:none){.app-tile:hover{transform:none}.app-tile:active{transform:scale(.985)}}
@media(prefers-reduced-motion:reduce){.stock-app-grid .app-tile{scroll-behavior:auto}.stock-app-grid .app-tile:hover,.stock-app-grid .app-tile:focus-visible,.stock-app-grid .app-tile:active{transform:none}}

/* Credit purchase surfaces use the same transparent glass and readable controls. */
.maxaistock-shell .credit-purchase .panel { background:linear-gradient(135deg,rgba(255,255,255,.075),rgba(255,255,255,.025));border-color:rgba(200,230,255,.32);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);color:#fff;box-shadow:0 24px 64px rgba(0,0,0,.25); }
.credit-purchase .payment-notice { color:#d6eaff; }
.credit-purchase h2,.credit-purchase label,.credit-purchase legend { color:#fff;font-weight:700; }
.credit-purchase legend { font-size:1rem; }
.credit-purchase .form-select { background-color:rgba(3,12,24,.6);color:#fff;border-color:#74899f;color-scheme:dark;min-height:46px; }
.credit-purchase .form-select option { background:#122236;color:#fff; }
.payment-methods { display:flex;flex-wrap:wrap;gap:14px; }
.payment-method { display:flex;align-items:center;gap:12px;padding:18px 24px;border:1px solid #74899f;border-radius:12px;cursor:pointer;flex:1;min-width:200px;background:rgba(3,12,24,.25); }
.payment-method:has(input:checked) { border-color:#79e5ff;background:rgba(53,215,255,.12);box-shadow:0 0 0 1px #79e5ff; }
.payment-method input { width:18px;height:18px;accent-color:#4164ed; }
.payment-method:focus-within,.credit-purchase .btn:focus-visible,.credit-purchase .form-select:focus-visible { outline:3px solid #79e5ff;outline-offset:3px; }
.credit-purchase .table { background:transparent;color:#fff;--bs-table-bg:transparent;--bs-table-color:#fff;--bs-table-border-color:rgba(200,230,255,.2); }
.credit-purchase .table th { background:rgba(200,230,255,.09);color:#fff; }
.credit-purchase .table td { color:#eef7ff; }
.credit-purchase .table a { color:#91e7ff;text-decoration:underline; }
.credit-purchase .text-danger { color:#ffb4bd!important; }
.credit-purchase .btn-primary { background:#3654d9;border-color:#7890ff;font-weight:800;color:#fff; }

.stock-tester-form{margin:0}.stock-tester-button{white-space:nowrap;border-color:rgba(108,230,255,.55);color:#dffaff}.stock-tester-button:hover{background:rgba(108,230,255,.12);border-color:#6ce6ff;color:#fff}
