/* Strategy chat layout contract: canvas, gutters, and composer are defined together. */
.strategy-chat-screen {
  --chat-gutter: clamp(24px, 3vw, 40px);
  --chat-max-width: 880px;
  --chat-composer-clearance: 28px;
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  width: min(100%, var(--chat-max-width));
  max-width: var(--chat-max-width);
  min-height: calc(100dvh - 120px);
  margin: 0 auto;
  padding: 0;
}
.strategy-chat-screen .chat-screen-header { min-width:0; padding:8px 0 18px; }
.strategy-chat-screen .chat-screen-header > div { min-width:0; }
.chat-menu-shell{position:relative;margin-left:auto}.chat-options-toggle{width:40px;height:40px;min-height:40px;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--soft-bg);letter-spacing:2px}.chat-options-menu{position:absolute;z-index:40;top:48px;right:0;display:grid;min-width:224px;padding:8px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:0 18px 48px rgba(0,0,0,.2)}.chat-options-menu button{display:grid;grid-template-columns:22px 1fr;align-items:center;gap:11px;min-height:42px;padding:8px 10px;border:0;border-radius:10px;color:var(--text);font-size:13px;font-weight:650;text-align:left;background:transparent}.chat-options-menu button .ui-icon{width:17px;height:17px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;fill:none}.chat-options-menu button:hover{background:var(--soft-bg)}.chat-options-menu .danger{margin-top:5px;padding-top:12px;border-top:1px solid var(--line);color:#d85a5a}.chat-search-hit{outline:3px solid var(--accent);outline-offset:3px}
.strategy-chat-screen .chat-screen-header h2 { display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.25; }
.strategy-chat-screen .strategy-chat-messages { min-width:0;padding:28px 0;padding-bottom:var(--chat-composer-clearance); }
.strategy-chat-body { display:grid;grid-template-columns:minmax(0,1fr);min-height:0; }.strategy-chat-flow { min-width:0; }
.strategy-prompt-timeline { align-self:start; }
.strategy-plan-panel { margin:18px 0 2px; }.strategy-plan-inline { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:var(--soft-bg); }.strategy-plan-inline strong { font-size:13px; }.strategy-plan-inline p { margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.4; }.strategy-plan-inline button { flex:0 0 auto; }.strategy-plan-details { padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--soft-bg); }.strategy-plan-details > summary { display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;font-weight:750;list-style:none; }.strategy-plan-details > summary::-webkit-details-marker { display:none; }.strategy-plan-stage { display:grid;gap:9px;margin-top:14px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface); }.strategy-plan-stage strong { font-size:13px;line-height:1.45; }.strategy-plan-summary { display:grid;gap:12px;margin:16px 0; }.strategy-plan-summary div { display:grid;gap:3px; }.strategy-plan-summary dt { color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.07em; }.strategy-plan-summary dd { margin:0;font-size:13px;line-height:1.45; }.strategy-plan-details details { margin:14px 0; }.strategy-plan-details pre { max-height:280px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px; }
.prompt-timeline-heading { display:flex;align-items:center;justify-content:space-between;margin:0 0 10px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em; }.prompt-timeline-heading span { color:var(--ink);font-weight:700; }.prompt-timeline-item { padding:8px 0;border-top:1px solid var(--line); }.prompt-timeline-jump { display:flex;width:100%;gap:8px;padding:2px 0 7px;border:0;color:var(--ink);text-align:left;background:transparent; }.prompt-timeline-jump b { flex:0 0 auto;color:var(--accent); }.prompt-timeline-jump span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.prompt-timeline-actions,.chat-bubble-actions { display:flex;flex-wrap:wrap;gap:5px; }.prompt-timeline-actions button,.chat-bubble-actions button,.response-variant-selector button { min-height:26px;padding:3px 6px;border:1px solid var(--line);border-radius:7px;color:var(--muted);font-size:11px;background:var(--surface); }.prompt-timeline-empty { color:var(--muted);font-size:12px;line-height:1.45; }.chat-storage-status { color:var(--muted);font-size:11px;font-weight:500;text-transform:none;letter-spacing:0; }.chat-bubble { position:relative; }.chat-bubble-actions { margin-top:10px; }.assistant .chat-bubble-actions { justify-content:flex-end; }.response-variant-selector { display:inline-flex;align-items:center;gap:4px;color:var(--muted);font-size:11px; }.response-variant-selector button { min-width:26px;padding:2px 5px;font-size:16px;line-height:1; }
.strategy-chat-screen .strategy-chat-composer { width:100%;margin:0; }
@media (max-width:1180px) and (min-width:821px) { .strategy-chat-active .shell { width:100%;max-width:none;padding-right:var(--chat-gutter);padding-left:var(--chat-gutter); }.strategy-chat-screen { width:100%;max-width:none;margin:0; } }
/* Prompt history is an on-demand drawer. It never takes a chat grid column. */
@media (min-width:821px) { .strategy-prompt-timeline:not([hidden]) { position:fixed;z-index:100;top:84px;right:24px;bottom:24px;width:min(360px,calc(100vw - 48px));overflow:auto;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow); }.strategy-prompt-timeline:not([hidden]) .prompt-timeline-heading { position:sticky;top:-18px;z-index:1;padding:0 0 14px;background:var(--surface); }.strategy-prompt-timeline:not([hidden]) [data-timeline-close] { width:34px;height:34px;min-height:34px;padding:0;border:1px solid var(--line);border-radius:999px;font-size:22px; } }
@media (max-width:820px) { .strategy-chat-active .shell { width:100%;max-width:none;padding-right:16px;padding-bottom:150px;padding-left:16px; }.strategy-chat-screen { --chat-composer-clearance:152px;display:grid;width:100%;max-width:none;min-height:calc(100dvh - 24px);margin:0;padding:0; }.strategy-chat-screen .strategy-chat-messages { overflow:visible;padding-top:22px;padding-bottom:var(--chat-composer-clearance); }.strategy-prompt-timeline:not([hidden]) { position:fixed;z-index:100;inset:0;display:block;width:auto;max-height:none;overflow-y:auto;overflow-x:hidden;padding:calc(20px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));border:0;border-radius:0;background:var(--bg);box-shadow:none; }.strategy-prompt-timeline:not([hidden]) .prompt-timeline-heading { position:sticky;top:0;z-index:1;display:flex;padding:0 0 16px;background:var(--bg); }.strategy-prompt-timeline:not([hidden]) [data-timeline-close] { width:42px;height:42px;min-height:42px;padding:0;border:1px solid var(--line);border-radius:999px;font-size:26px; }.strategy-prompt-timeline:not([hidden]) .prompt-timeline-item { display:block;padding:0;border-top:1px solid var(--line); }.strategy-prompt-timeline:not([hidden]) .prompt-timeline-jump { display:flex;width:100%;min-height:58px;align-items:center;gap:12px;padding:12px 0;text-align:left; }.strategy-prompt-timeline:not([hidden]) .prompt-timeline-jump span { white-space:normal;overflow:visible;text-overflow:clip; }.strategy-chat-screen .strategy-chat-composer { position:fixed;z-index:30;right:16px;bottom:max(12px,env(safe-area-inset-bottom));left:16px;width:auto; } }
@media (max-width:820px) { .strategy-plan-inline { align-items:flex-start;flex-direction:column;gap:10px; }.strategy-plan-inline button { width:100%; } }

.strategy-intake { margin-top:14px;padding:16px;border:1px solid color-mix(in srgb,var(--accent) 34%,var(--line));border-radius:18px;background:color-mix(in srgb,var(--accent) 5%,var(--surface));box-shadow:0 10px 30px rgba(0,0,0,.05); }.strategy-intake h3 { margin:5px 0 0;font-size:19px;line-height:1.3; }.strategy-intake p { line-height:1.5; }.strategy-intake-heading { display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px; }.strategy-intake-heading .badge { color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--surface)); }.strategy-intake-count { flex:0 0 auto;padding:6px 9px;border-radius:999px;color:var(--muted);background:var(--soft-bg);font-size:11px;font-weight:750; }.strategy-intake-brief { display:grid;gap:10px; }.strategy-intake-brief > div { padding:13px;border:1px solid var(--line);border-radius:13px;background:var(--surface); }.strategy-intake-brief > div > small,.strategy-intake-current > small { display:block;margin-bottom:7px;color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em; }.strategy-intake-brief .chat-rich-text ul { margin-bottom:0; }.strategy-intake-note,.strategy-intake-help { margin:13px 0;color:var(--muted);font-size:13px; }.strategy-intake-actions { display:flex;flex-wrap:wrap;gap:8px;margin-top:14px; }.strategy-intake-actions button,.strategy-intake-source > button { min-height:38px;padding:8px 13px;border:1px solid var(--line);border-radius:999px;color:var(--text);background:var(--surface);font-size:12px;font-weight:750; }.strategy-intake-actions button.primary { border-color:var(--accent);color:#fff;background:var(--accent); }.strategy-intake-actions button:disabled { opacity:.4;cursor:not-allowed; }.strategy-intake-progress { display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px;padding-top:7px; }.strategy-intake-progress span { width:7px;height:7px;border-radius:50%;background:var(--line); }.strategy-intake-progress span.complete { background:color-mix(in srgb,var(--accent) 55%,var(--line)); }.strategy-intake-progress span.active { width:9px;height:9px;background:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent); }.strategy-intake-current { margin:12px 0;padding:11px;border-radius:12px;background:var(--surface); }.strategy-intake-current > div { display:flex;flex-wrap:wrap;gap:6px; }.strategy-intake-current span { max-width:100%;overflow:hidden;padding:5px 8px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap; }.strategy-intake-options { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }.strategy-intake-option { display:grid;gap:4px;min-height:54px;padding:11px 12px;border:1px solid var(--line);border-radius:13px;color:var(--text);text-align:left;background:var(--surface); }.strategy-intake-option span { font-size:13px;font-weight:780; }.strategy-intake-option small { color:var(--muted);font-size:11px;line-height:1.35; }.strategy-intake-option.selected { border-color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,var(--surface));box-shadow:inset 0 0 0 1px var(--accent); }.strategy-intake-option.selected span::before { content:'✓ ';color:var(--accent); }.strategy-intake-other { display:grid;gap:7px;margin-top:10px;color:var(--muted);font-size:11px;font-weight:750; }.strategy-intake-other input { width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;color:var(--text);background:var(--surface); }.strategy-intake-review-list { display:grid;gap:7px; }.strategy-intake-review-list button { display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:54px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;color:var(--text);text-align:left;background:var(--surface); }.strategy-intake-review-list button span { display:grid;gap:3px; }.strategy-intake-review-list small { color:var(--muted);font-size:10px; }.strategy-intake-review-list strong { font-size:13px; }.strategy-intake-review-list em { color:var(--accent);font-size:11px;font-style:normal;font-weight:750; }.strategy-intake-safety { display:grid;gap:3px;margin-top:12px;padding:11px 12px;border-radius:12px;color:var(--muted);background:var(--soft-bg);font-size:11px; }.strategy-intake-safety strong { color:var(--text);font-size:12px; }.strategy-intake-source { margin-top:10px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface); }.strategy-intake-source > button { display:block;margin:12px auto 0; }.strategy-intake.completed { border-color:color-mix(in srgb,#4da66d 45%,var(--line)); }.strategy-intake.completed h3 { margin-bottom:8px; }.strategy-intake.completed > button { min-height:36px;padding:7px 11px;border:1px solid var(--line);border-radius:999px;color:var(--text);background:var(--surface);font-size:12px;font-weight:750; }
.strategy-intake-evidence { display:flex;align-items:center;gap:7px;margin:-4px 0 12px;padding:9px 11px;border:1px solid color-mix(in srgb,#4da66d 35%,var(--line));border-radius:12px;background:color-mix(in srgb,#4da66d 7%,var(--surface));font-size:11px; }.strategy-intake-evidence span { color:#4da66d;font-weight:800;text-transform:uppercase;letter-spacing:.05em; }.strategy-intake-evidence b { color:var(--text); }.strategy-intake-evidence small { min-width:0;overflow:hidden;color:var(--muted);text-overflow:ellipsis;white-space:nowrap; }.strategy-intake-spinner { width:20px;height:20px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:strategy-intake-spin .8s linear infinite; }.strategy-intake.context-error { border-color:color-mix(in srgb,#c55757 45%,var(--line)); } @keyframes strategy-intake-spin { to { transform:rotate(360deg); } }
.strategy-chat-collections{display:grid;gap:22px;margin-top:2px}.chat-collection{display:grid;gap:8px}.chat-collection .list-heading{margin-bottom:0}.chat-collection .list-heading h2{font-size:18px}.chat-collection .list-heading p{font-size:12px}
@media (max-width:820px) { .strategy-intake { padding:13px;border-radius:16px; }.strategy-intake-heading { align-items:flex-start;flex-direction:column;gap:8px; }.strategy-intake-count { align-self:flex-start; }.strategy-intake-progress { justify-content:flex-start; }.strategy-intake-options { grid-template-columns:1fr; }.strategy-intake-option { min-height:50px; }.strategy-intake-actions { display:grid;grid-template-columns:1fr 1fr; }.strategy-intake-actions .primary { grid-column:1 / -1;grid-row:1;width:100%; }.strategy-intake-actions button { width:100%; }.strategy-intake.review .strategy-intake-actions .primary { grid-row:auto; }.strategy-intake-brief > div { padding:11px; } }
