@font-face { font-family:Manrope; src:url('/fonts/Manrope-Regular.woff2') format('woff2'); font-style:normal; font-weight:400; font-display:swap; }
@font-face { font-family:Manrope; src:url('/fonts/Manrope-Medium.woff2') format('woff2'); font-style:normal; font-weight:500; font-display:swap; }
@font-face { font-family:Manrope; src:url('/fonts/Manrope-SemiBold.woff2') format('woff2'); font-style:normal; font-weight:600; font-display:swap; }
:root{color-scheme:dark;--bg:#07111f;--sidebar:#091625;--panel:#0d1b2d;--raised:#13243a;--line:rgba(148,177,216,.18);--text:#f5f8fc;--muted:#c5d2df;--subtle:#a7b9cc;--blue:#2f8fe5;--cyan:#62e6f4;--green:#7ce3a1;font-family:Manrope,"Segoe UI",Arial,sans-serif}
html[data-theme=light]{color-scheme:light;--bg:#f1f5f9;--sidebar:#f8fbfd;--panel:#fff;--raised:#edf4fa;--line:#d5e0eb;--text:#14273a;--muted:#50677f;--subtle:#687f98;--blue:#1769bc;--cyan:#087f8d;--green:#08795b}
body .conversation:has(.messages:not([hidden])){padding-right:22px;padding-left:22px;scrollbar-gutter:stable both-edges}
body .messages{width:min(1140px,100%)}
body .chat-message{min-width:0;padding:0 0 24px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
body .chat-message.user{background:transparent}
body .chat-message.user>strong{text-align:right}
body .chat-message.user .message-body{width:fit-content;max-width:min(82%,860px);margin-left:auto;padding:14px 18px;border:1px solid var(--line);border-radius:18px;background:var(--raised)}
body .active-build-plan{box-sizing:border-box;width:calc(100% - 44px);max-width:1140px;margin-right:auto;margin-left:auto}
@media(max-width:650px){body .conversation:has(.messages:not([hidden])){padding-right:12px;padding-left:12px}body .chat-message.user .message-body{max-width:100%}body .active-build-plan{width:calc(100% - 24px)}}
[hidden]{display:none!important}*{box-sizing:border-box}body{margin:0;color:var(--text);background:var(--bg)}button,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}.button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 13px;border:1px solid var(--line);border-radius:8px;color:var(--text);background:transparent;font-size:14px;font-weight:650;white-space:nowrap}.button:hover,.support button:hover,.support a:hover{background:var(--raised)}.button.primary{border-color:var(--blue);background:var(--blue);color:white}.button.primary:hover{filter:brightness(1.13)}.eyebrow{margin:0 0 7px;color:var(--cyan);font-size:10px;font-weight:800;letter-spacing:.14em}.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 22px;border-bottom:1px solid var(--line);background:var(--panel)}.brand-side,.top-actions,.brand{display:flex;align-items:center}.brand-side{gap:12px}.brand{gap:9px;color:var(--text);text-decoration:none}.brand-mark{display:grid;place-items:center;width:29px;height:29px;border-radius:8px;background:linear-gradient(135deg,var(--cyan),var(--blue));color:white;font-weight:900}.brand strong{font-size:15px}.brand small{color:var(--muted);font-size:9px;font-weight:800;letter-spacing:.15em}.top-actions{gap:8px}.credit{display:inline-flex;align-items:center;height:36px;padding:0 13px;border:1px solid var(--line);border-radius:8px;color:var(--muted);font-size:11px}.menu-toggle{display:none;border:0;color:var(--text);background:transparent;font-size:20px}.workspace-shell{height:calc(100vh - 68px);display:grid;grid-template-columns:256px minmax(0,1fr)}.task-panel{min-height:0;display:flex;flex-direction:column;overflow:auto;border-right:1px solid var(--line);background:var(--sidebar)}.panel-heading{padding:24px 20px 12px}.panel-heading h2{margin:0;font-size:17px}.task-list{padding:4px 10px 18px}.task{width:100%;display:grid;grid-template-columns:32px 1fr;align-items:center;gap:10px;margin:3px 0;padding:10px;border:1px solid transparent;border-radius:9px;color:var(--muted);background:transparent;text-align:left}.task:hover{color:var(--text);background:var(--raised)}.task.active{border-color:rgba(47,143,229,.4);box-shadow:inset 3px 0 var(--blue);color:var(--text);background:rgba(47,143,229,.15)}.task-icon{display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--line);border-radius:7px;color:var(--cyan);background:var(--panel);font-size:17px}.task strong,.task small{display:block}.task strong{margin-bottom:3px;font-size:12px}.task small{color:var(--subtle);font-size:10px;line-height:1.3}.group-label{margin:20px 10px 7px;color:var(--subtle);font-size:10px;font-weight:800;letter-spacing:.13em}.support{margin-top:auto;padding:17px 15px 5px;border-top:1px solid var(--line)}.support .eyebrow{padding:0 7px}.support button,.support a{display:block;width:100%;min-height:36px;padding:0 7px;border:0;border-radius:7px;color:var(--muted);background:transparent;text-align:left;font-size:12px}.version{margin:0;padding:8px 22px 16px;color:var(--subtle);font-size:10px}.main-panel{min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto}.toolbar{min-height:98px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 28px;border-bottom:1px solid var(--line);background:var(--panel)}.toolbar h1{margin:0;font-size:24px;letter-spacing:-.03em}.project-name{display:block;margin-top:4px;color:var(--subtle);font-size:11px}.model-field{display:grid;gap:6px;width:220px;color:var(--muted);font-size:10px}.model-field select{height:37px;padding:0 10px;border:1px solid var(--line);border-radius:8px;color:var(--text);background:var(--raised);font-size:13px}.conversation{min-height:0;display:grid;place-items:center;overflow:auto;padding:36px;background-image:radial-gradient(circle at 50% 12%,rgba(47,143,229,.12),transparent 30rem),linear-gradient(rgba(148,177,216,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(148,177,216,.035) 1px,transparent 1px);background-size:auto,42px 42px,42px 42px}.welcome{width:min(660px,100%);text-align:center}.welcome h2{margin:0 0 12px;font-size:clamp(24px,3vw,35px);letter-spacing:-.04em}.welcome>p:last-of-type{margin:0 auto;color:var(--muted);font-size:14px;line-height:1.7}.examples{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;margin-top:25px}.examples button{padding:9px 12px;border:1px solid var(--line);border-radius:99px;color:var(--muted);background:var(--panel);font-size:11px}.examples button:hover{border-color:var(--blue);color:var(--text)}.composer-stack{padding:16px max(24px,calc((100% - 850px)/2));border-top:1px solid var(--line);background:var(--panel)}.source-row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:12px;padding:11px 14px;border:1px solid var(--line);border-radius:9px;background:var(--raised)}.source-row[hidden],.repair-field[hidden]{display:none}.source-row strong,.source-row small{display:block}.source-row strong{font-size:12px}.source-row small{margin-top:3px;color:var(--subtle);font-size:11px}.repair-field{margin-bottom:12px}.repair-field label{display:block;margin-bottom:7px;color:var(--muted);font-size:11px;font-weight:800}.repair-field textarea{width:100%;margin-bottom:8px}.repair-field .button{margin-right:7px}textarea{width:100%;padding:13px 15px;resize:vertical;border:1px solid var(--line);border-radius:9px;color:var(--text);background:var(--bg);font-size:13px;line-height:1.5}textarea::placeholder{color:var(--subtle)}.composer-footer{display:flex;justify-content:space-between;gap:12px;margin-top:10px}.composer-footer>div{display:flex;gap:8px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}dialog{width:min(410px,calc(100% - 32px));padding:23px;border:1px solid var(--line);border-radius:13px;color:var(--text);background:var(--panel);box-shadow:0 25px 70px rgba(0,0,0,.4)}dialog::backdrop{background:rgba(0,8,16,.67)}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:15px}.dialog-header h2{margin:0;font-size:18px}.dialog-header button{border:0;color:var(--muted);background:transparent;font-size:25px}dialog p{color:var(--muted);font-size:13px;line-height:1.6}dialog>.button{margin-left:auto}
@media(max-width:850px){.workspace-shell{grid-template-columns:210px minmax(0,1fr)}.top-actions .button:nth-child(2),.top-actions .button:nth-last-child(2){display:none}.composer-stack{padding:15px 20px}}
@media(max-width:650px){.topbar{height:60px;padding:0 13px}.menu-toggle{display:block}.brand small{display:none}.top-actions .button:not(:last-child),.credit{display:none}.workspace-shell{height:calc(100vh - 60px);display:block}.task-panel{position:fixed;z-index:3;top:60px;bottom:0;left:0;width:min(290px,84vw);box-shadow:20px 0 50px rgba(0,0,0,.35);transform:translateX(-110%);transition:transform .2s}.task-panel.open{transform:translateX(0)}.main-panel{height:100%}.toolbar{min-height:83px;padding:14px 18px}.toolbar h1{font-size:19px}.model-field{width:135px}.conversation{padding:25px 18px}.composer-stack{padding:12px}.source-row{align-items:flex-start;flex-direction:column}.composer-footer .button{min-height:34px;padding:0 9px}}


/* Match the TradingView workspace task panel layout and type scale. */
.workspace-shell { grid-template-columns: 248px minmax(0, 1fr); }
.panel-heading { padding: 20px 18px 17px; }
.panel-heading h2 { font-size: 15px; }
.task-list { padding: 0; }
.group-label { margin: 0; padding: 17px 20px 8px; border-bottom: 1px solid var(--line); font-size: 10px; }
.task { display: block; margin: 0; padding: 16px 20px; border-width: 0 0 1px; border-color: var(--line); border-radius: 0; color: var(--text); }
.task:hover { color: var(--text); background: rgba(47, 143, 229, .075); }
.task.active { border-color: var(--line); background: linear-gradient(90deg, rgba(47, 143, 229, .22), rgba(47, 143, 229, .08)); box-shadow: inset 5px 0 var(--blue); }
.task strong { margin-bottom: 3px; color: var(--text); font-size: 14px; font-weight: 700; }
.task small { color: var(--muted); font-size: 13px; line-height: 1.5; }
@media (max-width: 850px) and (min-width: 651px) { .workspace-shell { grid-template-columns: 210px minmax(0, 1fr); } }
@media (max-width: 650px) { .workspace-shell { display: block; } }
/* TradingView workspace header controls, using the MetaTrader colour palette. */
.topbar { height: 58px; padding: 0 18px; gap: 16px; }
.top-actions { gap: 12px; }
.top-actions .button { min-height: 36px; padding: 0 14px; border-radius: 4px; }
.top-actions .header-action { border-color: #454f60; text-decoration: none;}
.top-actions .header-action:hover:not(:disabled), .top-actions .header-action:focus-visible:not(:disabled) { border-color: var(--blue); background: rgba(47,143,229,.09); }
.top-actions .button:disabled { opacity: .45; cursor: not-allowed; }
.top-actions .topup-button { border-color: var(--blue); color: #fff; background: var(--blue); text-decoration:none}
.top-actions .topup-button:hover, .top-actions .topup-button:focus-visible { border-color: #48a2f0; background: #48a2f0; }
.balance-pill { min-height: 36px; padding: 0 12px; border-radius: 6px; color: var(--text); background: var(--panel); font-size: 14px; }
.balance-pill.healthy-credit { border-color: #0a9c82; color: #6fd6c4; background: rgba(8,153,129,.09); }
.balance-pill.low-credit { border-color: #d99b28; color: #ffd479; background: rgba(217,155,40,.12); }
.balance-pill.credit-warning { border-color: #e05260; color: #ff9ca5; background: rgba(224,82,96,.14); }
.workspace-shell { height: calc(100vh - 58px); }
.model-field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.model-field-label { color: #bfd0e3; }
.model-field select { border-color: rgba(148,177,216,.34); background: #172a43; }
html[data-theme=light] .model-field-label { color: #405a73; }
html[data-theme=light] .model-field select { border-color: #b6c7d8; background: #f4f8fb; }
.model-cost-badge { padding: 2px 5px; border: 1px solid rgba(62,207,142,.32); border-radius: 3px; color: #73d9aa; background: rgba(62,207,142,.08); font-size: 9px; font-weight: 600; letter-spacing: .04em; line-height: 1.1; }
html[data-theme=light] .model-cost-badge { border-color: #168365; color: #08664f; background: #e1f4ed; }
html[data-theme=light] .balance-pill.healthy-credit { border-color: #0b7f6c; color: #086957; background: #e6f6f2; }
html[data-theme=light] .balance-pill.low-credit { color: #7a4b00; background: #fff1cf; }
html[data-theme=light] .balance-pill.credit-warning { color: #9d1c2a; background: #ffe4e7; }
@media (max-width: 650px) {
  .topbar { height: 60px; padding: 0 13px; }
  .workspace-shell { height: calc(100vh - 60px); }
  .top-actions .button:not(:last-child), .top-actions .credit { display: none; }
  .response-code-actions .button { flex: 1 1 calc(50% - 4px); }
}
/* TradingView-style streamlined prompt composer. */
.main-panel { border-bottom: 1px solid var(--blue); }
.composer-stack { box-sizing: border-box; width: calc(100% - 44px); max-width: 1140px; margin: 14px auto 18px; padding: 12px; border: 1px solid #3d4a59; border-radius: 10px; background: var(--raised); }
.history-dialog{width:min(1280px,calc(100% - 28px));height:min(820px,calc(100vh - 28px));max-height:calc(100vh - 28px);padding:0;overflow:hidden}.history-dialog>.dialog-header{padding:18px 20px;border-bottom:1px solid var(--line)}.history-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;height:calc(100% - 78px);min-height:0}.history-editor{display:grid;grid-template-rows:auto auto minmax(0,1fr);min-width:0;min-height:0;border-right:1px solid var(--line)}.history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 14px;border-bottom:1px solid var(--line);background:var(--raised)}.history-toolbar>div{display:grid;gap:3px;min-width:0}.history-toolbar>div:last-child{display:flex;grid-auto-flow:column;gap:7px}.history-toolbar strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.history-toolbar span{color:var(--muted);font-size:10px}.history-prompt{max-height:145px;padding:12px 15px;overflow:auto;border-bottom:1px solid var(--line);background:rgba(47,143,229,.08)}.history-prompt strong{font-size:11px;color:var(--cyan)}.history-prompt p{margin:6px 0 0;color:var(--text);white-space:pre-wrap}.history-code{min-height:0;margin:0;padding:16px;overflow:auto;background:#050d18;font:12px/1.55 Consolas,"Courier New",monospace;white-space:pre}.history-sidebar{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;min-height:0;background:var(--panel)}.history-sidebar>header{padding:15px;border-bottom:1px solid var(--line)}.history-sidebar>header strong,.history-sidebar>header small{display:block}.history-sidebar>header small{margin-top:4px;color:var(--muted);font-size:10px}.history-message{min-height:18px;margin:0;padding:9px 12px;color:var(--muted);font-size:11px}.revision-list{min-height:0;padding:0 10px 10px;overflow:auto}.revision-item{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-bottom:8px;padding:11px;border:1px solid var(--line);border-radius:8px;background:var(--raised)}.revision-item.selected{border-color:var(--blue);box-shadow:inset 3px 0 var(--blue)}.revision-pinned-marker{position:absolute;top:7px;right:8px;color:var(--green);font-size:8px;font-weight:800;letter-spacing:.08em}.revision-details{min-width:0;border:0;color:var(--text);background:transparent;text-align:left}.revision-details strong,.revision-details span{display:block}.revision-details strong{font-size:13px}.revision-details span{margin-top:4px;color:var(--muted);font-size:10px}.revision-actions{display:flex;align-items:flex-end;flex-direction:column;gap:4px;padding-top:14px}.revision-action{padding:2px 0;border:0;color:var(--muted);background:transparent;font-size:10px}.revision-action:hover{color:var(--text)}.revision-action.danger{color:#ff9e9e}.revision-action:disabled{opacity:.45;cursor:default}.revision-controls{padding:11px;border-top:1px solid var(--line)}.revision-controls[hidden]{display:none}.revision-controls>button{padding:0;border:0;color:#ff9e9e;background:transparent;font-size:10px;text-decoration:underline}.revision-controls>div{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-top:10px}.revision-controls .button{min-height:30px;padding:0 9px;font-size:10px}.revision-controls span{color:var(--muted);font-size:10px}@media(max-width:820px){.history-layout{grid-template-columns:1fr;grid-template-rows:minmax(360px,1fr) 260px}.history-editor{border-right:0;border-bottom:1px solid var(--line)}.history-toolbar{align-items:stretch;flex-direction:column}}
.history-layout { padding-bottom: 14px; box-sizing: border-box; }
.history-dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
.history-layout { grid-template-columns: minmax(0,1fr) 340px; height: auto; min-height: 0; }
.history-toolbar { min-height: 58px; padding: 10px 14px; }
.history-toolbar-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.history-prompt { max-height: 150px; padding: 12px 16px; overscroll-behavior: contain; border-bottom-color: rgba(47,143,229,.42); background: rgba(47,143,229,.1); }
.history-prompt strong { display: block; margin-bottom: 7px; color: #79bfff; font-size: 10px; letter-spacing: .08em; }
.history-prompt p { margin: 0; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.history-code { padding: 20px; overscroll-behavior: contain; line-height: 1.65; scrollbar-color: var(--blue) #050d18; }
.history-sidebar { display: flex; flex-direction: column; min-width: 0; overflow-y: auto; scrollbar-color: var(--blue) transparent; }
.history-revision-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 16px 15px 12px; border-bottom: 1px solid var(--line); }
.history-revision-heading .eyebrow { margin: 0 0 4px; font-size: 9px; }
.history-revision-heading h3 { margin: 0; font-size: 14px; }
.history-revision-heading>span { color: var(--muted); font-size: 12px; }
.history-revision-help { margin: 0; padding: 14px 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.history-message { min-height: 0; padding: 9px 15px 0; line-height: 1.5; }
.revision-list { display: grid; flex: 0 0 auto; gap: 7px; padding: 12px; overflow: visible; }
.revision-item { display: grid; grid-template-columns: minmax(0,1fr); gap: 7px; margin: 0; padding: 0 0 8px; border-left: 3px solid var(--line); border-radius: 7px; transition: border-color .15s ease; }
.revision-item.selected { border-color: rgba(47,143,229,.75); box-shadow: none; }
.revision-item.pinned .revision-details { padding-right: 126px; }
.revision-pinned-marker { top: 9px; right: 9px; padding: 4px 7px; border-radius: 999px; color: #fff; background: var(--blue); font-size: 9px; line-height: 1; }
.revision-details { display: grid; gap: 5px; padding: 10px 11px; cursor: pointer; }
.revision-details strong { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.revision-details strong span { overflow: hidden; padding: 2px 6px; border-radius: 999px; color: var(--muted); background: #0c1724; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.revision-details small { color: var(--muted); font-size: 11px; }
.revision-actions { align-items: center; justify-content: flex-end; flex-direction: row; gap: 6px; padding: 0 8px; }
.revision-action { min-height: 32px; padding: 6px 9px; border: 1px solid #46566a; border-radius: 5px; background: #0c1724; font-size: 11px; font-weight: 700; }
.revision-action:hover:not(:disabled) { border-color: var(--blue); color: var(--text); }
.revision-controls { display: grid; gap: 10px; margin-top: auto; padding: 12px; }
.revision-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; }
.revision-pagination[hidden] { display: none; }
html[data-theme=light] .history-dialog { border-color: #aebfce; background: #fff; box-shadow: 0 24px 65px rgba(29, 50, 70, .22); }
html[data-theme=light] .history-dialog > .dialog-header { border-bottom-color: #c7d5e2; background: #f8fbfd; }
html[data-theme=light] .history-editor { border-right-color: #b9cad9; background: #fff; }
html[data-theme=light] .history-toolbar { border-bottom-color: #c7d5e2; background: #edf4fa; }
html[data-theme=light] .history-toolbar .button { border-color: #2ea5b1; color: #17424a; background: rgba(46, 165, 177, .08); }
html[data-theme=light] .history-toolbar .button:hover, html[data-theme=light] .history-toolbar .button:focus-visible { background: rgba(46, 165, 177, .17); }
html[data-theme=light] .history-prompt { border-bottom-color: #b7cde0; background: #e8f3fc; }
html[data-theme=light] .history-prompt strong { color: #1769bc; }
html[data-theme=light] .history-sidebar { background: #f6f9fc; }
html[data-theme=light] .history-revision-heading, html[data-theme=light] .history-revision-help { border-bottom-color: #c7d5e2; background: #fff; }
html[data-theme=light] .revision-item { border: 1px solid #c7d5e2; border-left: 3px solid #9fb5c8; background: #fff; box-shadow: 0 3px 10px rgba(38, 67, 91, .06); }
html[data-theme=light] .revision-item.selected { border-color: #2f8fe5; border-left-color: #2f8fe5; background: #eef6fd; }
html[data-theme=light] .revision-details strong span { color: #38546c; background: #dfeaf3; }
html[data-theme=light] .revision-action { border-color: #9fb2c5; color: #29465f; background: #fff; }
html[data-theme=light] .revision-action:hover:not(:disabled) { border-color: #2f8fe5; color: #155f9f; background: #e8f3fc; }
html[data-theme=light] .revision-action.danger { border-color: #c88c93; color: #9d3441; background: #fff7f8; }
html[data-theme=light] .revision-action:disabled { border-color: #c7d1db; color: #6c7d8d; background: #e7edf3; opacity: 1; }
@media(max-width:820px) {
  .history-layout { grid-template-columns: 1fr; grid-template-rows: minmax(420px,1fr) 280px; }
  .history-editor { border-right: 0; border-bottom: 1px solid var(--line); }
  html[data-theme=light] .history-editor { border-right: 0; border-bottom-color: #c7d5e2; }
  .history-toolbar { align-items: stretch; flex-direction: column; }
}
#composer { position: relative; }
#composer #promptInput { display: block; width: 100%; min-height: 92px; padding: 12px 90px 12px 13px; resize: none; border: 1px solid #484f5c; border-radius: 7px; outline: 0; color: var(--text); background: #0c1724; font: 14px/1.55 Manrope,"Segoe UI",Arial,sans-serif; transition: border-color .18s ease, box-shadow .18s ease; }
#composer #promptInput:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(47,143,229,.15); }
.character-count { position: absolute; z-index: 1; top: 9px; right: 11px; color: var(--subtle); font-size: 11px; pointer-events: none; }
.composer-footer { align-items: center; min-height: auto; margin-top: 0; padding: 10px 0 0; }
.composer-footer .button { min-height: 36px; border-radius: 5px; }
.clear-task-button { padding: 0 8px; border-color: #454f60; color: var(--muted); background: transparent; font-weight: 500; }
.clear-task-button:hover, .clear-task-button:focus-visible { border-color: var(--blue); color: var(--text); background: rgba(47,143,229,.08); }

.support a { text-decoration: none; }
.support button, .support a { display: grid; grid-template-columns: 24px 1fr; align-items: center; }
.support-icon { display: inline-grid; place-items: center; width: 24px; color: var(--cyan); font-size: 15px; }
.settings-symbol { font-size: 14px; }
.settings-dialog { width: min(560px, calc(100% - 32px)); border-color: #52657a; }
.settings-form { padding-top: 18px; }
.settings-group { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
.settings-group legend { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.settings-group > p, .settings-project-note { margin: 0; color: #c6d0dd; font-size: 13px; line-height: 1.55; }
.settings-choice { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 11px; align-items: start; padding: 14px; border: 1px solid #52657a; border-radius: 8px; background: var(--bg); cursor: pointer; }
.settings-choice:has(input:checked) { border-color: var(--blue); }
.settings-choice input { margin: 3px 0 0; accent-color: var(--blue); }
.settings-choice span, .settings-choice strong, .settings-choice small { display: block; }
.settings-choice strong { color: var(--text); font-size: 14px; }
.settings-choice small { margin-top: 4px; color: #b8c4d2; font-size: 12px; line-height: 1.5; }
.settings-recommended {
    display: inline-block;
    margin-left: 6px;
    color: #4db4d5;
    font-size: 10px;
    font-style: normal;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.settings-project-note { margin-top: 14px; }
.settings-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 28px; }
html[data-theme=light] .settings-group > p, html[data-theme=light] .settings-project-note, html[data-theme=light] .settings-choice small { color: #526273; }
html[data-theme=light] .settings-choice { background: #fff; }
.mql5-source-card { border-color: rgba(69, 214, 232, .32); background: #102238; box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
.mql5-source-actions { position: sticky; top: 0; z-index: 2; border-bottom-color: rgba(69, 214, 232, .22); background: #152b44; }
.mql5-source-card .mql5-source-actions button { border-color: #2ea5b1; background: rgba(46, 165, 177, .08); box-shadow: inset 0 0 0 1px rgba(46, 165, 177, .1); }
.mql5-source-card .mql5-source-actions button:hover, .mql5-source-card .mql5-source-actions button:focus-visible { border-color: #2ea5b1; background: rgba(46, 165, 177, .17); }
.response-code-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.response-code-actions .button { min-height: 36px; padding: 0 13px; font-size: 12px; }
.response-code-actions .button:not(.response-build-check):not(.verify-requirements) { border-color: #2ea5b1; background: rgba(46, 165, 177, .08); box-shadow: inset 0 0 0 1px rgba(46, 165, 177, .1); }
.response-code-actions .button:not(.response-build-check):not(.verify-requirements):hover, .response-code-actions .button:not(.response-build-check):not(.verify-requirements):focus-visible { border-color: #2ea5b1; background: rgba(46, 165, 177, .17); }
#buildCheckButton, .response-code-actions .response-build-check { color: var(--text); border-color: #2ea5b1; background: rgba(46,165,177,.12); }
#buildCheckButton:hover:not(:disabled), #buildCheckButton:focus-visible:not(:disabled), .response-code-actions .response-build-check:hover:not(:disabled), .response-code-actions .response-build-check:focus-visible:not(:disabled) { border-color: #62e6f4; background: rgba(46,165,177,.24); }
#buildCheckButton:focus-visible, .response-code-actions .response-build-check:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.response-build-result:empty { display: none; }
.response-code-actions .verify-requirements { color: #9aead5; border-color: rgba(63,176,145,.62); }
.response-code-actions .verify-requirements:hover, .response-code-actions .verify-requirements:focus-visible { border-color: #72d6b9; }
.requirements-validation-dialog { width: min(760px,calc(100% - 32px)); max-height: min(820px,calc(100vh - 32px)); padding: 0; overflow: auto; }
.requirements-validation-dialog .dialog-header { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.requirements-validation-dialog .dialog-header .eyebrow { margin-bottom: 5px; }
.requirements-validation-form { padding: 22px; }
.requirements-validation-form > p:first-child { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.requirements-validation-model { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.requirements-audit-working { min-height: 32px; display: flex; align-items: center; gap: 7px; color: var(--muted); }
.requirements-audit-working strong { margin-left: 6px; color: var(--text); font-size: 13px; font-weight: 600; }
.requirements-validation-message { border-left: 2px solid var(--blue); padding-left: 16px; }
.requirements-validation-note { margin-bottom: 14px; color: #9bb4ff; font-size: 12px; font-weight: 600; }
.requirements-validation-report > h2:first-child { margin: 0 0 24px; font-size: 21px; }
.requirements-validation-report h2 { margin: 26px 0 10px; color: var(--text); font-size: 17px; }
.requirements-validation-report h3 { margin: 22px 0 9px; color: var(--text); font-size: 15px; }
.requirements-validation-report p, .requirements-validation-report li { font-size: 14px; line-height: 1.65; }
.requirements-validation-report ul { margin: 8px 0 18px; padding-left: 24px; }
.requirements-match-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 26px 0 10px; }
.requirements-match-row h2, .requirements-match-row h3 { margin: 0; }
.requirements-match-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.requirements-match-badge.low { color: #ff8d98; border-color: #b84756; background: rgba(184,71,86,.14); }
.requirements-match-badge.medium { color: #ffc66d; border-color: #a97228; background: rgba(169,114,40,.14); }
.requirements-match-badge.high { color: #72d6b9; border-color: #32886f; background: rgba(50,136,111,.14); }
.requirements-validation-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.requirements-validation-actions .button:disabled { cursor: not-allowed; opacity: .48; filter: none; }
html:not([data-theme=light]) .mql5-source-card { border-color: #405973; }
.mql5-source-card pre { background: #182b40; }
html[data-theme=light] .mql5-source-card { border-color: #adc4d8; background: #fff; box-shadow: 0 8px 24px rgba(34, 67, 96, .1); }
html[data-theme=light] .mql5-source-actions { border-bottom-color: #c5d4e1; background: #edf4fa; }
html[data-theme=light] .mql5-source-card .mql5-source-actions button { background: rgba(46, 165, 177, .07); box-shadow: inset 0 0 0 1px rgba(46, 165, 177, .08); }
html[data-theme=light] .mql5-source-card .mql5-source-actions button:hover, html[data-theme=light] .mql5-source-card .mql5-source-actions button:focus-visible { background: rgba(46, 165, 177, .14); }
html[data-theme=light] .mql5-source-card pre { background: #f8fbfd; }
html[data-theme=light] .requirements-validation-note { color: #345aa0; }
html[data-theme=light] .response-code-actions .button:not(.response-build-check):not(.verify-requirements) { border-color: #94a3b8; color: #24364b; background: #fff; box-shadow: none; }
html[data-theme=light] .response-code-actions .button:not(.response-build-check):not(.verify-requirements):hover, html[data-theme=light] .response-code-actions .button:not(.response-build-check):not(.verify-requirements):focus-visible { border-color: #64748b; color: #17283d; background: #edf2f7; }
html[data-theme=light] #buildCheckButton, html[data-theme=light] .response-code-actions .response-build-check { border-color: #1769bc; color: #fff; background: #1769bc; }
html[data-theme=light] #buildCheckButton:hover:not(:disabled), html[data-theme=light] #buildCheckButton:focus-visible:not(:disabled), html[data-theme=light] .response-code-actions .response-build-check:hover:not(:disabled), html[data-theme=light] .response-code-actions .response-build-check:focus-visible:not(:disabled) { border-color: #12569c; color: #fff; background: #12569c; }
html[data-theme=light] .response-code-actions .verify-requirements { border-color: #94a3b8; color: #24364b; background: #fff; }
html[data-theme=light] .response-code-actions .verify-requirements:hover, html[data-theme=light] .response-code-actions .verify-requirements:focus-visible { border-color: #64748b; color: #17283d; background: #edf2f7; }
.send-button { min-width: 82px; }
.strategy-report-upload { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.strategy-report-upload[hidden] { display: none; }
#strategyReportFileButton { border-color: #2ea5b1; color: var(--text); background: rgba(46, 165, 177, .08); box-shadow: inset 0 0 0 1px rgba(46, 165, 177, .12); }
#strategyReportFileButton:hover:not(:disabled), #strategyReportFileButton:focus-visible:not(:disabled) { border-color: #2ea5b1; background: rgba(46, 165, 177, .17); }
html[data-theme=light] #strategyReportFileButton:not(:disabled) { border-color: #94a3b8; color: #24364b; background: #fff; box-shadow: none; }
html[data-theme=light] #strategyReportFileButton:hover:not(:disabled), html[data-theme=light] #strategyReportFileButton:focus-visible:not(:disabled) { border-color: #64748b; color: #17283d; background: #edf2f7; }
#strategyReportFileButton:disabled { border-color: var(--line); color: var(--muted); background: transparent; box-shadow: none; cursor: not-allowed; opacity: .65; }
.strategy-report-status { grid-column: 1 / -1; min-height: 0; margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.strategy-report-status:empty { display: none; }
.strategy-report-status.busy { color: #a9d9ff; }
.strategy-report-status.error { color: #ff9ba5; }
.strategy-report-status.success { color: #9aead5; }
.analysis-composer #promptInputLabel { position: static; display: block; width: auto; height: auto; margin: 0 0 8px; overflow: visible; clip: auto; color: var(--muted); font-size: 11px; font-weight: 650; white-space: normal; }
.analysis-composer #promptInputLabel::before { content: "OPTIONAL"; display: inline-block; margin-right: 8px; padding: 3px 6px; border-radius: 4px; color: #9db7ff; background: rgba(75,111,239,.18); font-size: 8px; letter-spacing: .04em; }
.strategy-analysis-message { padding-bottom: 0; }
.strategy-analysis-report { overflow: hidden; border: 1px solid #405065; border-radius: 10px; background: #111c2a; }
.strategy-analysis-report>header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: #17283b; }
.strategy-analysis-report>header span { display: block; margin-bottom: 5px; color: var(--cyan); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.strategy-analysis-report>header h2 { margin: 0; font-size: 21px; }
.strategy-analysis-report>header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.strategy-narrative-status { display: flex; align-items: center; gap: 9px; padding: 11px 20px; border-bottom: 1px solid rgba(47,143,229,.3); color: #cceaff; background: rgba(47,143,229,.1); font-size: 11px; font-weight: 650; }
.strategy-narrative-status.busy::before { content: ""; flex: 0 0 auto; width: 11px; height: 11px; border: 2px solid rgba(86,176,255,.25); border-top-color: #56b0ff; border-radius: 50%; animation: repair-spin .75s linear infinite; }
.strategy-narrative-status.success { border-bottom-color: rgba(63,207,168,.3); color: #cffff1; background: rgba(39,150,121,.12); }
.strategy-narrative-status.success::before { content: "✓"; color: #76e7c8; }
.strategy-narrative-status.error { border-bottom-color: rgba(255,99,113,.35); color: #ffd8dc; background: rgba(181,49,63,.13); }
.strategy-print-button { flex: 0 0 auto; }
.strategy-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; background: var(--line); }
.strategy-summary-grid>div { padding: 17px 18px; background: #122033; }
.strategy-summary-grid .label { color: var(--muted); font-size: 10px; }
.strategy-summary-grid .value { margin-top: 7px; color: var(--text); font-size: 18px; font-weight: 750; }
.strategy-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 20px; padding: 15px 20px; border-bottom: 1px solid var(--line); color: #c6d2df; font-size: 11px; }
.strategy-report-warnings { margin: 16px 20px 0; padding: 14px 16px; border: 1px solid rgba(255,190,79,.38); border-radius: 7px; background: rgba(178,116,22,.12); }
.strategy-report-warnings h3,.strategy-report-section h3 { margin: 0 0 10px; font-size: 13px; }
.strategy-report-warnings ul,.strategy-reconciliation ul { margin: 0; padding-left: 18px; color: #f0dfc2; font-size: 11px; line-height: 1.65; }
.strategy-report-section { margin: 20px; }
.strategy-equity-section svg { display: block; width: 100%; height: 170px; border: 1px solid var(--line); border-radius: 7px; color: #4fb9f6; background: #0a1420; }
.strategy-equity-section p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.strategy-breakdown-table { display: grid; grid-template-columns: minmax(130px,1fr) repeat(3,minmax(90px,.65fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.strategy-breakdown-table>div { padding: 9px 11px; border-bottom: 1px solid var(--line); color: #c8d3df; font-size: 11px; }
.strategy-breakdown-table>div.heading { color: var(--text); background: #192a3e; font-weight: 700; }
.strategy-reconciliation { margin: 0 20px 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 11px; }
.strategy-reconciliation summary { cursor: pointer; }
.strategy-reconciliation ul { margin-top: 8px; color: var(--muted); }
.strategy-report-note { margin: 0; padding: 13px 20px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 10px; }
html[data-theme=light] .strategy-analysis-report { border-color: #b9c7d5; background: #fff; }
html[data-theme=light] .strategy-analysis-report>header,html[data-theme=light] .strategy-summary-grid>div,html[data-theme=light] .strategy-breakdown-table>div.heading { background: #edf4fa; }
html[data-theme=light] .strategy-narrative-status { color: #174b73; background: #eaf5ff; }
html[data-theme=light] .strategy-narrative-status.success { color: #145841; background: #e8faf4; }
html[data-theme=light] .strategy-facts,html[data-theme=light] .strategy-breakdown-table>div { color: #34485c; }
html[data-theme=light] .strategy-equity-section svg { background: #f8fbfd; }
html[data-theme=light] .strategy-report-warnings { background: #fff7e6; border-color: #d8b86a; }
html[data-theme=light] .strategy-report-warnings ul { color: #714b0c; }
html[data-theme=light] .strategy-report-status.busy { color: #1e40af; }
html[data-theme=light] .strategy-report-status.success,html[data-theme=light] .strategy-narrative-status.success::before { color: #086649; }
html[data-theme=light] .strategy-report-status.error { color: #a62135; }
html[data-theme=light] .strategy-narrative-status.error { color: #a62135; background: #fff0f2; }
html[data-theme=light] .analysis-composer #promptInputLabel::before { color: #1e40af; background: #e6edff; }
@media(max-width:760px){.strategy-summary-grid{grid-template-columns:repeat(2,1fr)}.strategy-facts{grid-template-columns:1fr}.strategy-analysis-report>header{flex-direction:column}.strategy-breakdown-table{grid-template-columns:minmax(105px,1fr) repeat(3,minmax(70px,.65fr))}}
@media print { body * { visibility: hidden !important; } .strategy-analysis-report,.strategy-analysis-report * { visibility: visible !important; } .strategy-analysis-report { position: absolute; inset: 0; width: 100%; border: 0; color: #111; background: #fff; } .strategy-print-button,.strategy-narrative-status { display: none !important; } .strategy-analysis-report>header,.strategy-summary-grid>div,.strategy-breakdown-table>div.heading { background: #eef2f6 !important; color: #111 !important; } .strategy-facts,.strategy-breakdown-table>div,.strategy-report-note { color: #222 !important; } .strategy-equity-section svg { color: #187eb7; background: #fff; } }
.composer-stack.repair-composer { padding: 13px; border-color: #465568; background: #1a202b; }
.repair-composer .composer-tools, .repair-composer .source-attachments { display: none; }
.repair-composer .repair-field { margin: 0; }
.repair-source-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.repair-source-heading label { margin: 0; color: var(--text); font-size: 12px; font-weight: 650; }
.repair-step { display: inline-block; margin-right: 9px; padding: 4px 7px; border-radius: 4px; color: #9db7ff; background: rgba(75,111,239,.18); font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.repair-source-heading .button { min-height: 30px; margin: 0; padding: 0 11px; font-size: 11px; }
#uploadRepairSourceButton { border-color: #2ea5b1; color: var(--text); background: rgba(46, 165, 177, .08); box-shadow: inset 0 0 0 1px rgba(46, 165, 177, .12); }
#uploadRepairSourceButton:hover:not(:disabled), #uploadRepairSourceButton:focus-visible:not(:disabled) { border-color: #2ea5b1; background: rgba(46, 165, 177, .17); }
html[data-theme=light] #uploadRepairSourceButton { background: rgba(46, 165, 177, .07); box-shadow: inset 0 0 0 1px rgba(46, 165, 177, .1); }
html[data-theme=light] #uploadRepairSourceButton:hover:not(:disabled), html[data-theme=light] #uploadRepairSourceButton:focus-visible:not(:disabled) { background: rgba(46, 165, 177, .14); }
#uploadRepairSourceButton:disabled { border-color: var(--line); color: var(--muted); background: transparent; box-shadow: none; cursor: not-allowed; opacity: .65; }
.repair-field #repairSource { min-height: 280px; margin: 0; resize: vertical; border-color: #46505f; border-radius: 7px; background: #0c111b; font: 13px/1.55 Consolas,"Courier New",monospace; }
.repair-composer #composer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.repair-composer #promptInputLabel { position: static; display: block; width: auto; height: auto; margin: 0 0 9px; overflow: visible; clip: auto; color: var(--muted); font-size: 12px; font-weight: 650; white-space: normal; }
.repair-composer #promptInputLabel::before { content: "OPTIONAL"; display: inline-block; margin-right: 9px; padding: 4px 7px; border-radius: 4px; color: #9db7ff; background: rgba(75,111,239,.18); font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.repair-composer.repair-answer-required #promptInputLabel::before { content: "REQUIRED"; color: #241600; background: #ffc766; }
.repair-composer #composer #promptInput { min-height: 108px; padding-top: 12px; background: #0c111b; }
.repair-composer .send-button { min-width: 132px; }
.repair-status { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 13px; padding: 12px 14px; border: 1px solid rgba(47,143,229,.42); border-radius: 7px; color: #eaf5ff; background: rgba(47,143,229,.12); font-size: 13px; line-height: 1.5; }
.repair-status:empty { display: none; }
.repair-status.busy::before { content: ""; flex: 0 0 auto; width: 12px; height: 12px; margin-top: 3px; border: 2px solid rgba(86,176,255,.25); border-top-color: #56b0ff; border-radius: 50%; animation: repair-spin .75s linear infinite; }
.repair-status.error { border-color: rgba(255,99,113,.46); color: #ffdce0; background: rgba(181,49,63,.15); }
.repair-status.success { border-color: rgba(63,207,168,.42); color: #d9fff4; background: rgba(39,150,121,.14); }
.repair-status.action-required { display: grid; grid-template-columns: 22px minmax(0,1fr); column-gap: 10px; border-color: rgba(255,190,79,.58); color: #fff4dc; background: rgba(178,116,22,.16); }
.repair-status.action-required::before { content: "!"; display: grid; place-items: center; width: 20px; height: 20px; grid-row: 1 / span 2; border-radius: 50%; color: #101722; background: #ffc766; font-size: 12px; font-weight: 900; }
.repair-status.action-required strong, .repair-status.action-required span { display: block; }
.repair-status.action-required strong { font-size: 13px; }
.repair-status.action-required span { color: #f4e4c5; }
.repair-diagnostics { margin: -5px 0 13px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: rgba(8,15,24,.45); }
.repair-diagnostics summary { width: fit-content; color: #b9c7d8; font-size: 11px; font-weight: 650; cursor: pointer; }
.repair-diagnostics summary:hover { color: var(--text); }
.repair-diagnostics pre { max-height: 180px; margin: 10px 0 0; padding: 10px 12px; overflow: auto; border-radius: 5px; color: #cbd7e4; background: #090f18; font: 11px/1.55 Consolas,"Courier New",monospace; white-space: pre-wrap; }
.send-button.repair-working { box-shadow: 0 0 0 0 rgba(47,143,229,.45); animation: repair-button-pulse 1.4s ease-in-out infinite; }
@keyframes repair-spin { to { transform: rotate(360deg); } }
@keyframes repair-button-pulse { 50% { box-shadow: 0 0 0 6px rgba(47,143,229,0); filter: brightness(1.12); } }
@media (prefers-reduced-motion: reduce) { .repair-status.busy::before, .send-button.repair-working { animation: none; } }
html[data-theme=light] .composer-stack.repair-composer { border-color: #c9d2dc; background: #f5f7fa; }
html[data-theme=light] .repair-field #repairSource, html[data-theme=light] .repair-composer #composer #promptInput { border-color: #b9c4d0; background: #fff; }
html[data-theme=light] .repair-status { color: #153754; background: #eaf5ff; }
html[data-theme=light] .repair-status.action-required { color: #593600; background: #fff4dc; }
html[data-theme=light] .repair-status.action-required span { color: #704900; }
html[data-theme=light] .repair-diagnostics { background: #fff; }
html[data-theme=light] .repair-diagnostics summary { color: #47596c; }
html[data-theme=light] .repair-diagnostics pre { color: #24374a; background: #edf2f7; }
@media (max-width:650px) { .repair-source-heading { align-items: flex-start; } .repair-field #repairSource { min-height: 220px; } }
.feedback-dialog { width: min(590px, calc(100% - 32px)); padding: 0; }
.feedback-dialog .dialog-header { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.feedback-dialog .dialog-header .eyebrow { margin-bottom: 5px; }
.feedback-form { padding: 20px 22px 22px; }
.feedback-form > p:first-child { margin: 0 0 18px; }
.feedback-field { display: grid; gap: 8px; margin-top: 16px; }
.feedback-field > span { color: var(--text); font-size: 13px; font-weight: 650; }
.feedback-field select, .feedback-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--bg); font: 13px/1.55 Manrope,"Segoe UI",Arial,sans-serif; }
.feedback-field select { min-height: 42px; padding: 0 12px; }
.feedback-field textarea { min-height: 130px; padding: 11px 12px; resize: vertical; }
.feedback-field select:focus, .feedback-field textarea:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(47,143,229,.15); }
.feedback-diagnostics { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 12px; line-height: 1.55; cursor: pointer; }
.feedback-diagnostics input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blue); }
.feedback-status { min-height: 20px; margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.feedback-status.error { color: #ff8d98; }
.feedback-status.success { color: #9aead5; }
.feedback-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.conversion-permission-dialog { width: min(560px, calc(100% - 32px)); padding: 0; }
.conversion-permission-dialog .dialog-header { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.conversion-permission-dialog form { padding: 4px 22px 22px; }
.conversion-permission-choice { display: flex; align-items: flex-start; gap: 11px; margin-top: 17px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--raised); font-size: 13px; line-height: 1.5; cursor: pointer; }
.conversion-permission-choice input { flex: 0 0 auto; width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--blue); }
html[data-theme=light] .composer-stack { border-color: #c9d2dc; background: #f5f7fa; }
html[data-theme=light] #composer #promptInput { border-color: #b7c3cf; background: #fff; }
#composer #promptInput { max-height: 50vh; overflow-y: auto; resize: vertical; }
html[data-theme=light] .clear-task-button { border-color: #aebbc9; }
@media (max-width: 650px) { .composer-stack { width: calc(100% - 24px); margin-bottom: 12px; padding: 10px; } }

/* Light workspace polish: clearer hierarchy without changing the dark theme. */
html[data-theme=light] {
  --bg: #edf3f8;
  --sidebar: #f8fafc;
  --raised: #f2f6fa;
  --line: #c7d5e2;
  --muted: #425d77;
  --subtle: #59738c;
}
html[data-theme=light] .topbar,
html[data-theme=light] .toolbar {
  box-shadow: 0 1px 0 rgba(20, 39, 58, .035);
}
html[data-theme=light] .task:hover {
  background: #edf4fa;
}
html[data-theme=light] .task.active {
  background: linear-gradient(90deg, #dcecf9, #eef6fc);
  box-shadow: inset 5px 0 #1769bc;
}
html[data-theme=light] .task.active strong {
  color: #0f4778;
}
html[data-theme=light] .conversation {
  background-color: #edf3f8;
  background-image: radial-gradient(circle at 50% 18%, rgba(23, 105, 188, .035), transparent 30rem), linear-gradient(rgba(55, 92, 128, .028) 1px, transparent 1px), linear-gradient(90deg, rgba(55, 92, 128, .028) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}
html[data-theme=light] .welcome {
  padding: 28px 32px 32px;
  border: 1px solid rgba(183, 202, 219, .72);
  border-radius: 18px;
  background: rgba(255, 255, 255, .52);
  box-shadow: 0 18px 50px rgba(38, 75, 108, .065);
}
html[data-theme=light] .welcome h2 {
  color: #102d49;
}
html[data-theme=light] .examples button {
  border-color: #bfd0df;
  color: #3e5d79;
  box-shadow: 0 2px 5px rgba(31, 67, 99, .04);
}
html[data-theme=light] .examples button:hover {
  border-color: #1769bc;
  color: #0f4778;
  background: #f7fbff;
}
html[data-theme=light] .composer-stack {
  border-color: #afc2d3;
  background: #f8fafc;
  box-shadow: 0 8px 24px rgba(31, 67, 99, .075);
}
html[data-theme=light] #composer #promptInput {
  border-color: #aebfd0;
}
html[data-theme=light] #composer #promptInput::placeholder {
  color: #617b94;
}
html[data-theme=light] .model-field select {
  border-color: #aebfd0;
  background: #f8fafc;
}
html[data-theme=light] .top-actions .header-action {
  border-color: #8095a8;
}
html[data-theme=light] .top-actions .button:disabled {
  color: #74879a;
  background: #f5f7f9;
  opacity: .68;
}
@media (max-width: 650px) {
  html[data-theme=light] .welcome { padding: 22px 18px 24px; }
}

@media print {
  body.requirements-print-mode * { visibility: hidden !important; }
  body.requirements-print-mode .chat-message.print-target,
  body.requirements-print-mode .chat-message.print-target * { visibility: visible !important; }
  body.requirements-print-mode .chat-message.print-target { position: absolute; inset: 0 auto auto 0; width: 100%; max-width: none; padding: 24px; border: 0; color: #111; background: #fff; }
  body.requirements-print-mode .chat-message.print-target * { color: #111 !important; }
  body.requirements-print-mode .requirements-validation-actions { display: none !important; }
  body.requirements-print-mode .requirements-validation-note { color: #345; }
}
.messages{width:min(850px,100%);margin:auto;display:grid;gap:20px;align-content:start}.conversation:has(.messages:not([hidden])){display:block}.chat-message{min-width:0;padding:18px 20px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.chat-message.user{background:var(--raised)}.chat-message>strong{display:block;margin-bottom:10px;color:var(--cyan);font-size:12px}.chat-message.error{border-color:#b65151}.message-body{font-size:14px;line-height:1.65;overflow-wrap:anywhere}.chat-message.user .message-body{white-space:pre-wrap}.message-body p{margin:0 0 11px}.message-body p:last-child{margin-bottom:0}.message-body h2,.message-body h3{margin:24px 0 10px;color:var(--text);line-height:1.3}.message-body h2:first-child,.message-body h3:first-child{margin-top:0}.message-body h2{font-size:18px}.message-body h3{padding-left:10px;border-left:3px solid var(--blue);font-size:15px}.message-body ul{margin:8px 0 18px;padding-left:23px}.message-body li{padding-left:2px}.message-body li+li{margin-top:7px}.message-body .inline-code{padding:2px 5px;border:1px solid var(--line);border-radius:4px;color:var(--text);background:var(--raised);font:12px/1.4 Consolas,"Courier New",monospace}.response-prose{margin:0 0 11px}.mql5-source-card{margin:14px 0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--bg)}.mql5-source-actions{display:flex;align-items:center;gap:8px;padding:9px 12px;border-bottom:1px solid var(--line)}.mql5-source-actions span{margin-right:auto;color:var(--muted);font-size:11px;font-weight:700}.mql5-source-actions button{padding:5px 9px;border:1px solid var(--line);border-radius:6px;color:var(--text);background:var(--raised);font-size:11px}.mql5-source-card pre{margin:0;padding:15px;overflow:auto;max-height:600px;font-size:12px;line-height:1.5;white-space:pre}.mql5-source-card code{font-family:Consolas,"Courier New",monospace}.syntax-comment{color:#789b83}.syntax-string{color:#d4b879}.syntax-number{color:#bba7ee}.syntax-keyword{color:#8bb8f8}.syntax-api{color:#80c8ca}
.rag-debug{margin-top:14px;padding-top:10px;border-top:1px dashed var(--line);color:#9db7d5;font-size:10px;line-height:1.5}.rag-debug-row+.rag-debug-row{margin-top:3px}
.rag-debug-row.rejected {
    color: #f58e8a
}
.automatic-build-check{display:grid;grid-template-columns:auto 1fr auto;align-items:start;gap:10px;margin-top:16px;padding:13px;border:1px solid var(--line);border-radius:8px;background:var(--raised)}.automatic-build-check>span{padding:3px 6px;border-radius:4px;color:#b9c9dc;background:rgba(125,151,181,.16);font-size:9px;font-weight:800;letter-spacing:.05em}.automatic-build-check strong{display:block;font-size:13px}.automatic-build-check p{margin:4px 0 0;color:var(--muted);font-size:11px}.automatic-build-check.checking{border-color:rgba(47,143,229,.5)}.automatic-build-check.passed,.automatic-build-check.repaired{border-color:rgba(63,176,145,.58)}.automatic-build-check.passed>span,.automatic-build-check.repaired>span{color:#9aead5;background:rgba(63,176,145,.14)}.automatic-build-check.failed{border-color:rgba(210,139,46,.7)}.automatic-build-check.failed>span{color:#ffc66d;background:rgba(210,139,46,.14)}.automatic-build-check.unavailable{border-color:#596273}.automatic-build-fix{align-self:center;white-space:nowrap}
html[data-theme=light] .automatic-build-check>span { color: #38536b; background: #dfe8f0; }
html[data-theme=light] .automatic-build-check.checking>span { color: #155f9f; background: #dcecf9; }
html[data-theme=light] .automatic-build-check.passed>span, html[data-theme=light] .automatic-build-check.repaired>span { color: #086348; background: #d7eee5; }
html[data-theme=light] .automatic-build-check.failed>span { color: #805000; background: #f8e6c5; }
html[data-theme=light] .automatic-build-check.unavailable>span { color: #4f5f6f; background: #e1e6eb; }
.message-body .task-redirect-button { border-color: var(--cyan); color: var(--text); background: rgba(98, 230, 244, .08); box-shadow: inset 0 0 0 1px rgba(98, 230, 244, .12); }
.message-body .task-redirect-button:hover, .message-body .task-redirect-button:focus-visible { border-color: var(--cyan); background: rgba(98, 230, 244, .17); }
html[data-theme=light] .message-body .task-redirect-button { background: rgba(8, 127, 141, .07); box-shadow: inset 0 0 0 1px rgba(8, 127, 141, .1); }
html[data-theme=light] .message-body .task-redirect-button:hover, html[data-theme=light] .message-body .task-redirect-button:focus-visible { background: rgba(8, 127, 141, .14); }
.projects-dialog{width:min(680px,calc(100% - 32px))}.projects-status{min-height:21px;margin:12px 0}.projects-list{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;max-height:min(60vh,520px);overflow:auto}.project-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px;border:1px solid var(--line);border-radius:9px;background:var(--raised)}.project-item.active{border-color:var(--blue)}.project-summary{min-width:0;flex:1}.project-summary strong,.project-summary small{display:block}.project-summary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.project-summary small{margin-top:4px;color:var(--subtle);font-size:10px}.project-actions{display:flex;gap:7px;flex-shrink:0}.project-actions .button.danger{color:#ff9e9e}.projects-empty{padding:25px;border:1px dashed var(--line);border-radius:9px;color:var(--muted);text-align:center}
.projects-dialog .dialog-header { margin-bottom: 14px; }
html:not([data-theme=light]) .projects-dialog { --line: #4a637e; }
html:not([data-theme=light]) .projects-dialog .project-item:not(.active):hover, html:not([data-theme=light]) .projects-dialog .project-item:not(.active):focus-within { border-color: #7193b5; }
.projects-status:empty { display: none; }
.projects-status:not(:empty) { min-height: 0; margin: 0 0 12px; }
.project-actions .button.danger { border-color: #b84d59; color: #ff7f8b; background: rgba(184, 77, 89, .08); }
.project-actions .button.project-rename:hover, .project-actions .button.project-rename:focus-visible { border-color: #2f8fe5; color: #9fd2ff; background: rgba(47, 143, 229, .16); }
.project-actions .button.danger:hover, .project-actions .button.danger:focus-visible { border-color: #ef6c79; color: #ff9ca5; background: rgba(184, 77, 89, .16); }
.projects-bulk-actions { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.projects-bulk-actions[hidden] { display: none; }
.projects-bulk-actions button { padding: 0; border: 0; color: #ff7f8b; background: transparent; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.projects-bulk-actions button:hover, .projects-bulk-actions button:focus-visible { color: #ffadb5; }
html[data-theme=light] .project-actions .button.danger { border-color: #bd5b67; color: #a92737; background: #fff7f8; }
html[data-theme=light] .project-actions .button.project-rename:hover, html[data-theme=light] .project-actions .button.project-rename:focus-visible { border-color: #1769bc; color: #104f87; background: #e3f1fc; }
html[data-theme=light] .project-actions .button.danger:hover, html[data-theme=light] .project-actions .button.danger:focus-visible { border-color: #a92737; color: #861c29; background: #fde8eb; }
html[data-theme=light] .projects-bulk-actions button { color: #a92737; }
html[data-theme=light] .projects-bulk-actions button:hover, html[data-theme=light] .projects-bulk-actions button:focus-visible { color: #7f1623; }
.delete-all-projects-dialog { width: min(500px,calc(100% - 32px)); padding: 0; }
.delete-all-projects-dialog .dialog-header { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.delete-all-projects-dialog form { padding: 20px 22px 22px; }
.delete-all-projects-dialog form > p:first-child { margin: 0; }
.delete-all-projects-dialog .feedback-field input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--bg); font: 13px/1.55 Manrope,"Segoe UI",Arial,sans-serif; }
.delete-all-projects-dialog .feedback-field input:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(47,143,229,.15); }
.delete-all-projects-dialog .button.danger { border-color: #b84d59; color: #fff; background: #a93644; }
.delete-all-projects-dialog .button.danger:hover:not(:disabled) { background: #bd4352; }
.delete-all-projects-dialog .button.danger:disabled { cursor: not-allowed; opacity: .45; }
.prompt-builder-dialog{width:min(720px,calc(100% - 28px));max-height:calc(100vh - 32px);overflow:hidden;padding:0}.prompt-builder-dialog .dialog-header{padding:21px 23px;border-bottom:1px solid var(--line)}.prompt-builder-reason{margin:0;padding:18px 23px 0;color:var(--muted);font-size:14px}.prompt-builder-body{display:grid;gap:13px;max-height:52vh;overflow:auto;padding:18px 23px}.prompt-review-summary,.prompt-builder-field,.build-plan-assumptions,.build-plan-step{padding:14px;border:1px solid var(--line);border-radius:9px;background:var(--raised)}.prompt-review-summary strong{font-size:15px}.prompt-review-summary p{margin:7px 0 0}.prompt-builder-field{position:relative;display:grid;gap:7px;overflow:hidden}.prompt-builder-field>span{font-size:14px;font-weight:750}.prompt-builder-field small{color:var(--muted);line-height:1.5}.prompt-builder-field textarea{min-height:72px}.prompt-builder-field.invalid{border-color:#ff6978}.prompt-builder-field.loading::after{position:absolute;inset:0;content:"";pointer-events:none;background:linear-gradient(105deg,transparent 25%,rgba(98,230,244,.11) 42%,rgba(47,143,229,.16) 50%,transparent 68%);transform:translateX(-100%);animation:prompt-builder-shimmer 1.35s ease-in-out infinite}.prompt-builder-field.loading textarea{opacity:.62}.prompt-builder-suggestion{justify-self:end;border-color:rgba(138,168,255,.65);color:#8aa8ff;background:rgba(138,168,255,.09)}.prompt-builder-suggestion:hover:not(:disabled){border-color:#8aa8ff;color:#8aa8ff;background:rgba(138,168,255,.16)}.prompt-builder-suggestion:disabled{cursor:wait;opacity:1}.prompt-builder-suggestion.loading::before{width:14px;height:14px;margin-right:8px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;content:"";animation:prompt-builder-spin .7s linear infinite}.prompt-builder-status{min-height:20px;margin:0;padding:13px 23px;color:var(--muted);border-top:1px solid var(--line)}.prompt-builder-status:empty{display:none}.prompt-builder-status.error{color:#ff8d98}.prompt-builder-status.loading{color:#8aa8ff}.prompt-builder-status.success{color:#9aead5}.prompt-builder-actions{display:flex;flex-wrap:wrap;gap:9px;padding:16px 23px 21px;border-top:1px solid var(--line)}.prompt-builder-loading{display:flex;align-items:center;gap:16px;min-height:124px;padding:28px;border:1px solid var(--line);border-radius:10px;color:var(--muted);background:var(--raised)}.prompt-builder-loading-indicator{position:relative;flex:0 0 auto;width:42px;height:42px;border:3px solid rgba(47,143,229,.2);border-top-color:var(--blue);border-radius:50%;animation:prompt-builder-spin .8s linear infinite}.prompt-builder-loading-indicator::after{position:absolute;inset:8px;border-radius:50%;content:"";background:var(--blue);opacity:.18;animation:prompt-builder-pulse 1.2s ease-in-out infinite}.prompt-builder-loading-copy{display:grid;gap:5px}.prompt-builder-loading-copy strong{color:var(--text);font-size:14px}.prompt-builder-loading-copy small{color:var(--muted);font-size:13px;line-height:1.5}@keyframes prompt-builder-spin{to{transform:rotate(360deg)}}@keyframes prompt-builder-pulse{50%{opacity:.5;transform:scale(.72)}}@keyframes prompt-builder-shimmer{to{transform:translateX(100%)}}@media(prefers-reduced-motion:reduce){.prompt-builder-loading-indicator,.prompt-builder-loading-indicator::after,.prompt-builder-suggestion.loading::before,.prompt-builder-field.loading::after{animation:none}}.build-plan-assumptions h3,.build-plan-step h3{margin:0 0 8px}.build-plan-assumptions ul{margin:0;padding-left:20px}.build-plan-step pre{margin:0;white-space:pre-wrap;color:var(--muted);font:12px/1.5 Manrope,sans-serif}.active-build-plan{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 max(24px,calc((100% - 850px)/2)) 10px;padding:11px 13px;border:1px solid rgba(47,143,229,.55);border-radius:9px;background:rgba(47,143,229,.1)}.active-build-plan[hidden]{display:none}.active-build-plan-copy{display:grid;gap:3px}.active-build-plan-copy strong{font-size:13px}.active-build-plan-copy small{color:var(--muted);font-size:11px}.active-build-plan-controls{display:flex;gap:7px}.active-build-plan-controls button{min-height:32px}.build-plan-exit{border:1px solid var(--line);color:var(--text);background:var(--panel)}.build-plan-exit:hover{border-color:var(--blue);background:var(--raised)}

.prompt-builder-dialog .prompt-builder-body{font-size:14px;line-height:1.6}
.prompt-builder-dialog .prompt-review-summary p,.prompt-builder-dialog .prompt-builder-field small,.prompt-builder-dialog .prompt-builder-field textarea,.prompt-builder-dialog .prompt-builder-status{font-size:14px;line-height:1.6}
.prompt-builder-dialog .build-plan-assumptions h3,.prompt-builder-dialog .build-plan-step h3{font-size:15px;line-height:1.4;font-weight:750}
.prompt-builder-dialog .build-plan-step pre{font:inherit}
.prompt-builder-dialog .build-plan-assumptions li+li{margin-top:6px}
html:not([data-theme=light]) .prompt-builder-field textarea{border-color:#496078}
html:not([data-theme=light]) .prompt-builder-field textarea:focus{border-color:var(--blue)}
html[data-theme=light] .prompt-builder-dialog{border-color:#b8c9d9;box-shadow:0 24px 70px rgba(20,45,70,.24)}
html[data-theme=light] .prompt-builder-field,html[data-theme=light] .prompt-builder-loading{border-color:#bfd0df;background:#f7fafc}
html[data-theme=light] .prompt-builder-field textarea{border-color:#b8cadb;background:#fff}
html[data-theme=light] .prompt-builder-suggestion{border-color:#1769bc;color:#125a9f;background:#eaf3fb}
html[data-theme=light] .prompt-builder-suggestion:hover:not(:disabled){color:#0f4778;background:#dcecf9}
html[data-theme=light] .prompt-builder-status.loading{color:#125a9f;background:#edf5fc}
html[data-theme=light] .prompt-builder-status.success{color:#086649;background:#eaf7f2}

.project-actions .button.project-open { border-color: var(--blue); background: var(--blue); color: #fff; }
.project-actions .button.project-open:hover, .project-actions .button.project-open:focus-visible { background: var(--blue); color: #fff; filter: brightness(1.13); }
@media (max-width: 650px) {
  .projects-dialog .project-item { flex-direction: column; align-items: stretch; }
  .projects-dialog .project-summary strong { white-space: normal; overflow-wrap: anywhere; }
  .projects-dialog .project-actions { flex-wrap: wrap; }
}
.prompt-builder-help {
    justify-self: start;
    color: #9fc5ff;
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.prompt-builder-help:hover { color: #c5ddff; }
.prompt-builder-help:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }
html[data-theme="light"] .prompt-builder-help { color: #125a9f; }
html[data-theme="light"] .prompt-builder-help:hover { color: #0f4778; }

.project-size-warning { box-sizing: border-box; width: calc(100% - 44px); max-width: 1140px; margin: 0 auto 12px; padding: 12px 16px; border: 1px solid #a87925; border-radius: 10px; background: #312819; color: #f6d795; font-size: 0.9rem; line-height: 1.5; }
@media (max-width: 650px) { .project-size-warning { width: calc(100% - 24px); } }
.project-size-warning[hidden] { display: none; }
html[data-theme="light"] .project-size-warning { background: #fff7e6; color: #714b0c; border-color: #d8b86a; }
.large-source-help { text-decoration: underline; }

#strategyExportHelp { display: inline-block; margin-top: 12px; }

html[data-theme=light] .analysis-composer .button:not(.primary):not(.cancel),html[data-theme=light] .strategy-print-button { border-color: #94a3b8; color: #24364b; background: #fff; box-shadow: none; }
html[data-theme=light] .analysis-composer .button:not(.primary):not(.cancel):hover,html[data-theme=light] .analysis-composer .button:not(.primary):not(.cancel):focus-visible,html[data-theme=light] .strategy-print-button:hover,html[data-theme=light] .strategy-print-button:focus-visible { border-color: #64748b; color: #17283d; background: #edf2f7; }
html[data-theme=light] .analysis-composer .send-button.primary:not(.cancel) { border-color: #1769bc; color: #fff; background: #1769bc; }
html[data-theme=light] .analysis-composer .send-button.primary:not(.cancel):hover,html[data-theme=light] .analysis-composer .send-button.primary:not(.cancel):focus-visible { border-color: #12569c; color: #fff; background: #12569c; filter: none; }
/* Keep modal edges distinct from the dark workspace and backdrop. */
html:not([data-theme=light]) dialog { border-color: #52657a; }

/* Keep credit eligibility information in the workspace, outside the balance pill. */
.introductory-credit-notice { display: flex; align-items: center; gap: 14px; margin: 16px 28px; padding: 16px 18px; border: 1px solid rgba(47,143,229,.45); border-radius: 10px; color: #dcecff; background: #102842; }
.introductory-credit-notice[hidden] { display: none; }
.introductory-credit-icon { display: grid; place-items: center; flex: 0 0 24px; height: 24px; border: 1px solid #78baff; border-radius: 50%; color: #a9d4ff; font-weight: 800; }
.introductory-credit-notice strong { display: block; font-size: 14px; }
.introductory-credit-notice p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; }
.introductory-credit-notice .button { flex: 0 0 auto; border-color: #78baff; color: #fff; background: #196db8; text-decoration: none; }
.introductory-credit-notice .button:hover { background: #237fcf; }
.introductory-credit-notice .button:focus-visible { outline: 2px solid #78baff; outline-offset: 3px; }
html[data-theme=light] .introductory-credit-notice { border-color: #91bfe8; color: #173d64; background: #eaf4ff; }
html[data-theme=light] .introductory-credit-icon { border-color: #286ca8; color: #1c5b91; }
@media (max-width: 850px) { .introductory-credit-notice { flex-wrap: wrap; margin: 14px 20px; } .introductory-credit-notice > div { flex: 1 1 220px; } }
