/* Quiet, explicit selection states; the lime accent stays on primary actions. */
.choice input:checked+span,.deal-stages .stage-choice input:checked+span,
.deal-stages .stage-rail.has-pending-stage .stage-choice.saved>span{
 background:var(--ink);border-color:var(--ink);color:#fff;
}
.choice input:checked+span small,.choice input:checked+span .icon,
.deal-stages .stage-choice input:checked+span .icon,.deal-stages .stage-choice input:checked+span small{color:#e5e5e5}
.choice:hover>span,.deal-stages .stage-choice:hover>span{background:#f1f1f1;border-color:#9e9e9e}
.choice:has(input:checked):hover>span,.deal-stages .stage-choice:has(input:checked):hover>span{background:#3b3b3b;color:white;border-color:#3b3b3b}
.deal-stages .stage-rail.has-pending-stage .stage-choice input:checked+span{background:#fff8e8;border-color:#94702a;color:#604717;border-style:dashed}
.deal-stages .stage-rail.has-pending-stage .stage-choice input:checked+span .icon{color:#604717}
.deal-stages .stage-choice.failure input:checked+span{background:#87372f;border-color:#87372f;color:white}
.next-step .panel-head{background:var(--surface)}
.stage-preview{color:var(--ink)}
.dashboard-charts{overflow:hidden}
.dashboard-charts h3{font-size:16px;font-weight:650;margin:0 0 6px}
.dashboard-charts p{font-size:13px;line-height:1.55;color:var(--muted);margin:5px 0 0}
.dashboard-charts .panel-head{align-items:start}
.chart-trend{padding:24px 26px 20px}
.chart-section-heading{margin-bottom:20px}
.chart-timeline{width:100%;max-width:1040px;margin:0 auto}
.chart-timeline svg{display:block;width:100%;height:auto;min-height:170px;max-height:290px;overflow:visible}
.chart-column{fill:#777777}
.chart-gridline{stroke:var(--line);stroke-width:1}
.chart-axis{fill:var(--muted);font-size:12px;font-family:inherit}
.chart-count{fill:var(--ink);font-size:13px;font-weight:650;font-family:inherit}
.chart-data{margin-top:8px;font-size:13px;max-width:650px}
.chart-data summary{cursor:pointer;padding:10px 0;color:var(--muted);width:fit-content}
.chart-data table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.chart-data td,.chart-data th{text-align:left;padding:9px 0;border-bottom:1px solid var(--line)}
.chart-data td:last-child,.chart-data th:last-child{text-align:right}
.chart-comparison{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line)}
.chart-comparison>section{padding:24px 26px;min-width:0}
.chart-comparison>section+section{border-left:1px solid var(--line)}
.chart-bars{list-style:none;padding:0;margin:24px 0 0;display:grid;gap:18px;max-height:420px;overflow:auto}
.chart-bar-label{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:8px;font-size:13px}
.chart-bar-label>span{overflow-wrap:anywhere;min-width:0}
.chart-bar-label strong{display:flex;align-items:baseline;gap:10px;white-space:nowrap;font-size:15px;font-variant-numeric:tabular-nums}
.chart-bar-label small{font-size:12px;font-weight:400;color:var(--muted);min-width:42px;text-align:right}
.chart-track{height:8px;background:#eeeeee;border-radius:4px;overflow:hidden}
.chart-track>span{display:block;height:100%;background:#777777;border-radius:4px}
.chart-stages .chart-track>span{background:#5c5c5c}
.dashboard-charts .chart-empty{padding:18px 0;max-width:42ch}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:720px){
 .chart-trend,.chart-comparison>section{padding:20px 16px}
 .chart-comparison{grid-template-columns:1fr}
 .chart-comparison>section+section{border-left:0;border-top:1px solid var(--line)}
 .chart-timeline svg{min-height:150px}
 .chart-timeline{overflow:auto}
 .chart-axis{font-size:14px}
 .chart-count{font-size:15px}
 .chart-data summary{min-height:44px;display:flex;align-items:center;padding:6px 0}
 .chart-bars{max-height:none;gap:18px}
}

.source-connection-status{font-size:13px;padding:7px 11px;font-weight:650}.source-address{display:block;max-width:460px;margin-top:12px;font-size:12px;color:var(--muted)}.source-address input{width:100%;margin-top:5px;font-size:14px}.stage-drag{cursor:grab;touch-action:none}.stage-order{display:flex;gap:4px}.stage-order .btn{font-size:12px;padding:6px 8px;min-height:32px}.pipeline-edit-row.is-dragging{opacity:.55;outline:2px solid #7f7f7f}.promo-form{margin-top:24px;border-top:1px solid var(--line);padding-top:20px}.install-copy{line-height:1.6}.install-mark{width:64px;height:64px;border-radius:17px;margin-bottom:16px}@media(max-width:640px){.pipeline-edit-row{grid-template-columns:40px 1fr}.stage-order{grid-column:1/-1}.pipeline-edit-row .field{grid-column:2}.source-connection-status{font-size:12px}.source-actions{flex-wrap:wrap}}

.pipeline-edit-row{grid-template-columns:40px minmax(0,1fr) auto}.pipeline-edit-row .stage-order{grid-column:1/-1;grid-row:2;justify-content:flex-start}.pipeline-edit-row .field{grid-column:2;grid-row:1}.pipeline-edit-row>.btn:not(.stage-drag){grid-column:3;grid-row:1}.pipeline-edit-row[data-terminal=true] .field,.pipeline-edit-row.is-removed .field{grid-column:1/3}.pipeline-edit-row[data-terminal=true] .stage-order{display:none}@media(max-width:640px){.pipeline-edit-row{grid-template-columns:40px minmax(0,1fr)}.pipeline-edit-row>.btn:not(.stage-drag){grid-row:3;grid-column:1/-1}.pipeline-edit-row .field{grid-column:2}}

.chart-track svg{display:block;width:100%;height:6px}.chart-track rect{fill:var(--ink)}

[data-whole-card]{cursor:pointer}[data-whole-card]:hover{background:#f7f7f7}[data-whole-card]:focus-visible{outline:2px solid var(--focus);outline-offset:-3px}.conversation-head{overflow-wrap:anywhere}

.app-update{display:flex;align-items:center;justify-content:space-between;padding:12px 20px;gap:12px;background:var(--accent);font-size:13px}.app-update .btn{flex:none}

/* A distinct conversation surface, with the reply field always easy to find. */
.chat-panel{border-color:#cecece}
.chat-panel-head{background:var(--ink);color:#fff;padding:18px 22px}
.chat-panel-head h2{display:flex;align-items:center;gap:12px;flex:1 1 auto}
.chat-title-icon{width:36px;height:36px;display:grid;place-items:center;background:var(--accent);color:var(--ink);border-radius:10px;flex:none}
.chat-title-icon .icon{width:20px;height:20px}
.chat-auto{font-size:12px;color:#e5e5e5;white-space:nowrap}
.chat-panel .conversation-head{font-size:13px;font-weight:600;color:var(--ink);background:#fff;padding:14px 22px}
.chat-panel .messages{background:#f5f5f5;min-height:240px;max-height:clamp(260px,52dvh,640px);padding:22px;gap:16px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b5b5b5 #f5f5f5}
.chat-panel .message{padding:14px 16px;background:#fff;border:1px solid #e4e4e4;max-width:min(88%,620px);border-radius:14px 14px 14px 4px}
.chat-panel .message.out{background:var(--ink);color:#fff;border-color:var(--ink);border-radius:14px 14px 4px 14px}
.chat-panel .message p{font-size:14px;line-height:1.6}
.chat-panel .message small{color:var(--muted);font-size:11px}
.chat-panel .message.out small{color:#e5e5e5}
.chat-panel .composer{background:#fff;padding:22px;gap:14px;border-top:1px solid #d6d6d6}
.chat-panel .composer textarea{background:#fafafa;border-color:#b5b5b5;min-height:108px}
.chat-panel .composer textarea:focus{border-color:var(--ink);background:#fff}
.chat-panel .composer .actions{gap:12px}
.source-connection-status.won{background:var(--ink);color:#fff}
@media(max-width:720px){
 .chat-panel-head{padding:16px;gap:8px}
 .chat-panel-head h2{font-size:18px;gap:10px}
 .chat-auto{font-size:11px}
 .chat-panel .conversation-head,.chat-panel .messages,.chat-panel .composer{padding:16px}
 .chat-panel .messages{min-height:200px;gap:12px}
 .chat-panel .message{padding:12px 14px;max-width:92%}
 .chat-panel .message p{font-size:15px}
 .chat-panel .composer textarea{min-height:112px}
}
