:root{font-family:Inter,system-ui,-apple-system,sans-serif;color:#eaf2ff;background:#080f1d}*{box-sizing:border-box}body{margin:0;max-width:1180px;margin-inline:auto;padding:14px 14px 35px}header,.hero,.panel,.stats>div{background:linear-gradient(125deg,#15243a,#0d1829);border:1px solid #2a3a50;border-radius:18px}header{display:flex;justify-content:space-between;align-items:center;padding:15px 18px}header strong{font-size:19px}header small{display:block;color:#8aa1b8;font-size:10px;letter-spacing:1.5px;margin-top:5px}.status{color:#f3c776;font-size:11px;letter-spacing:1px}.status.live{color:#56dfb4}.hero{display:flex;align-items:center;justify-content:space-between;padding:20px;margin-top:13px;gap:10px}h1{font-size:25px;margin:5px 0}.price{font-size:34px;font-weight:750}.muted,.hint,footer{color:#9caec1}.muted{font-size:12px}button,select,input{font:inherit}button,select{border:1px solid #38526e;background:#1c3452;color:#e8f3ff;border-radius:11px;padding:10px 13px;cursor:pointer}button:active{transform:scale(.98)}#chatOpen,#chatForm button{background:#286de0;border-color:#3d8af5}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}.stats>div{padding:14px;min-width:0}.stats small{display:block;color:#92a8c0;font-size:11px}.stats b{display:block;margin-top:7px;overflow:hidden;text-overflow:ellipsis}main{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr);gap:12px}.panel{padding:14px;min-width:0}.panel:first-child{grid-column:1}.panel:nth-child(2){grid-column:2;grid-row:1 / span 2}.panel:nth-child(3){grid-column:1}.panelhead{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}.panelhead h2{font-size:15px;margin:0}.panelhead h2 small{font-size:10px;color:#93a8bd;display:block}.panelhead>div{display:flex;gap:6px}.panelhead button,.panelhead select{padding:7px 9px;font-size:12px}#chart{display:block;width:100%;height:330px;touch-action:none;cursor:grab}#chart:active{cursor:grabbing}.hint{font-size:11px;margin-bottom:0}.markets{max-height:535px;overflow:auto}.market{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid #25364b;border-radius:0;padding:12px 8px}.market.active{background:#203c61;border-radius:9px}.market span{font-size:12px;color:#a5bad0}.market b{font-size:13px}.analysis{line-height:1.7;white-space:pre-wrap}.analysis .buy{color:#55dcb1}.analysis .sell{color:#ff8787}.overlay{position:fixed;inset:0;background:#020812d9;z-index:5;display:flex;justify-content:center;align-items:center;padding:12px}.hidden{display:none}.chatbox{width:min(660px,100%);height:min(740px,90dvh);background:#101d30;border:1px solid #42607c;border-radius:20px;padding:15px;display:flex;flex-direction:column}.history{flex:1;overflow-y:auto;white-space:pre-wrap;line-height:1.6;font-size:14px}.msg{padding:11px 13px;border-radius:13px;margin:8px 0;background:#1a2c44}.msg.user{background:#204779}#chatForm{display:flex;gap:8px}#question{min-width:0;flex:1;background:#0b1524;border:1px solid #38516a;border-radius:11px;color:#fff;padding:12px}footer{text-align:center;font-size:11px;padding-top:20px}@media(max-width:750px){main{display:block}.panel{margin-bottom:12px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}#chart{height:290px}.hero{padding:14px}.price{font-size:27px}.panelhead{flex-wrap:wrap}}

.market-mode{display:flex;gap:8px;padding:10px 14px 2px;flex-wrap:wrap}.market-mode .mode{border:1px solid #34485f;border-radius:12px;background:#16263b;color:#b7cce1;padding:10px 16px;cursor:pointer;font-weight:700}.market-mode .mode.active{background:#2660a0;border-color:#62b6ff;color:#fff}.market-mode .mode:focus-visible{outline:2px solid #9cd4ff;outline-offset:2px}

#deepAnalysisPanel{grid-column:1;grid-row:auto}.panel:nth-child(3){grid-column:1;grid-row:auto}.panel:nth-child(4){grid-column:1}.deep-analysis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.analysis-stat{border:1px solid #2c425c;background:#101f32;border-radius:12px;padding:12px;min-width:0}.analysis-stat small{display:block;color:#92a8c0;font-size:11px;margin-bottom:5px}.analysis-stat strong{font-size:15px;overflow-wrap:anywhere}.analysis-stat.wide{grid-column:1/-1}.analysis-stat p{font-size:12px;color:#b7c9dd;line-height:1.55;margin:6px 0 0}.signal-buy{color:#66e5b8}.signal-sell{color:#ff9797}.signal-hold{color:#e8c77d}#analysisUpdated{margin-top:9px}#analyzeNow:disabled{opacity:.55;cursor:wait}@media(max-width:750px){#deepAnalysisPanel,.panel:nth-child(3),.panel:nth-child(4){grid-column:auto;grid-row:auto}}

.developer-credit{margin-top:9px;font-size:13px;opacity:.9}.developer-credit a{color:#69c3ff;text-decoration:none;font-weight:650}.developer-credit a:hover{text-decoration:underline}

.market-controls{display:flex;flex-wrap:wrap;gap:10px;padding:12px 3px 0}.market-controls label{display:flex;align-items:center;gap:9px;color:#a8bfd8;font-size:12px}.market-controls select{min-width:130px}.market-controls #pairSelect{min-width:160px}#tradePlanPanel{grid-column:1;grid-row:auto}.trade-long{color:#6ee4b8}.trade-short{color:#ff9999}@media(max-width:750px){#tradePlanPanel{grid-column:auto;grid-row:auto}}

/* Settings modal and author attribution */
.header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#settingsOpen{border:1px solid #425773;border-radius:10px;background:#192a42;color:#e6f2ff;padding:9px 12px;cursor:pointer}
.settingsbox{max-width:480px;width:min(94vw,480px)}
.settingscontent{display:grid;gap:22px;padding:16px 4px}
.settingsfield{display:grid;gap:10px;color:#d8e8f9;font-weight:600}
.settingsfield input{width:100%;accent-color:#5cb6ff}
.settingsabout{display:grid;justify-items:start;gap:8px;padding:18px;border:1px solid #304967;border-radius:16px;background:#12223a}
.settingsabout small{color:#9ab0c8;letter-spacing:.12em}
.settingsabout strong{font-size:21px;color:#f2f7ff}
.settingsabout a{color:#6bbcff;text-decoration:none}
.settingsabout a:hover{text-decoration:underline}

/* User-selected light theme. Default dark styles above remain unchanged. */
html[data-theme="light"]{color-scheme:light;background:#f3f6fb;color:#17283d}
html[data-theme="light"] body{color:#17283d}
html[data-theme="light"] header,html[data-theme="light"] .hero,html[data-theme="light"] .panel,html[data-theme="light"] .stats>div{background:#fff;border-color:#d4dfeb;box-shadow:0 4px 18px #1634500a}
html[data-theme="light"] .chatbox{background:#fff;border-color:#cbd8e7}
html[data-theme="light"] .settingsabout,html[data-theme="light"] .analysis-stat{background:#f4f8fe;border-color:#d4dfeb}
html[data-theme="light"] .settingsabout strong,html[data-theme="light"] .settingsfield{color:#17283d}
html[data-theme="light"] .muted,html[data-theme="light"] .hint,html[data-theme="light"] footer,html[data-theme="light"] .market span,html[data-theme="light"] .analysis-stat p,html[data-theme="light"] .analysis-stat small,html[data-theme="light"] .stats small,html[data-theme="light"] .market-controls label,html[data-theme="light"] header small{color:#50647d}
html[data-theme="light"] button,html[data-theme="light"] select,html[data-theme="light"] input{background:#eaf1fa;color:#17314e;border-color:#b9cde2}
html[data-theme="light"] #chatOpen,html[data-theme="light"] #chatForm button{background:#286de0;color:#fff}
html[data-theme="light"] #question{background:#fff;color:#17283d;border-color:#b9cde2}
html[data-theme="light"] .msg{background:#e8eff8;color:#17283d}
html[data-theme="light"] .msg.user{background:#d5e7ff}
html[data-theme="light"] .market{border-bottom-color:#d4dfeb;background:transparent}
html[data-theme="light"] .market.active{background:#dbeafe}
html[data-theme="light"] .market-mode .mode{background:#eaf1fa;color:#17314e;border-color:#b9cde2}
html[data-theme="light"] .market-mode .mode.active{background:#286de0;color:#fff}
html[data-theme="light"] #settingsOpen{background:#eaf1fa;color:#17314e;border-color:#b9cde2}
html[data-theme="light"] .status{color:#8b5e00}
html[data-theme="light"] .status.live{color:#067b55}
html[data-theme="light"] .overlay{background:#14243baa}
html[data-theme="light"] .signal-buy,html[data-theme="light"] .analysis .buy{color:#078257}
html[data-theme="light"] .signal-sell,html[data-theme="light"] .analysis .sell{color:#c53544}
html[data-theme="light"] .signal-hold{color:#956a00}
.settingsfield select{width:100%;min-height:42px}

/* One text-size setting controls all analysis cards and the technical summary. */
#deepAnalysis .analysis-stat small,#tradePlan .analysis-stat small{font-size:calc(var(--analysis-font-size,15px) * .78)}
#deepAnalysis .analysis-stat strong,#tradePlan .analysis-stat strong{font-size:var(--analysis-font-size,15px)}
#deepAnalysis .analysis-stat p,#tradePlan .analysis-stat p{font-size:calc(var(--analysis-font-size,15px) * .88)}

.chat-menu{margin:4px 0 12px}.chat-menu-heading{font-size:12px;color:#9cb5d0;margin:0 0 9px}.chat-questions{display:flex;flex-wrap:wrap;gap:7px}.chat-question{font-size:12px;padding:8px 10px;border-radius:999px;background:#1b3555;border:1px solid #395a7b;color:#eaf2ff}.chat-question:hover{background:#295184}html[data-theme="light"] .chat-question{background:#e8f0fc;color:#21364f;border-color:#bfd0e5}html[data-theme="light"] .chat-menu-heading{color:#5e738a}

.chat-only-hint{text-align:center;font-size:12px;color:#9cb5d0;margin:12px 0 0;padding:10px;border-top:1px solid #2a3a50}html[data-theme='light'] .chat-only-hint{color:#5e738a;border-color:#c7d5e4}
