:root{--ink:#17243a;--muted:#6e7b8f;--line:#e4e9ee;--paper:#f5f7f6;--white:#fff;--mint:#1fb99a;--mint-soft:#dff6ef;--lime:#c9f36a;--navy:#10233f;--orange:#f5a947;--red:#df655f;--shadow:0 12px 35px rgba(21,37,58,.08)}
*{box-sizing:border-box}body{margin:0;font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:var(--ink);background:var(--paper)}button,input,select{font:inherit;color:inherit}.hidden{display:none!important}.topbar{height:76px;background:var(--white);border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 34px;gap:14px;position:sticky;top:0;z-index:20}.brand-mark{width:40px;height:40px;border-radius:12px;background:var(--navy);color:var(--lime);display:grid;place-items:center;font-weight:900}.product-name{font-weight:800}.product-name span{font-size:10px;padding:3px 6px;border-radius:8px;background:var(--mint-soft);color:#147d68}.product-subtitle{font-size:10px;letter-spacing:.12em;color:var(--muted);margin-top:2px}.topbar nav{display:flex;gap:26px;margin-left:55px;height:100%}.nav-item{background:none;border:0;padding:0 2px;color:var(--muted);cursor:pointer;position:relative}.nav-item.active{color:var(--ink);font-weight:700}.nav-item.active:after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--mint)}.topbar>.button{margin-left:auto}.button{border:0;border-radius:10px;padding:11px 17px;font-weight:700;cursor:pointer}.primary{background:var(--navy);color:#fff}.secondary{background:#fff;border:1px solid var(--line)}.text-button{border:0;background:none;color:#138c75;font-weight:700;cursor:pointer}.empty-state{min-height:calc(100vh - 76px);display:grid;grid-template-columns:1.05fr .95fr;align-items:center;max-width:1260px;margin:auto;padding:60px}.eyebrow,.section-kicker{font-size:11px;letter-spacing:.18em;color:#15826d;font-weight:800;margin:0 0 12px}.empty-copy h1{font-family:Georgia,"Noto Serif SC",serif;font-size:58px;line-height:1.08;margin:0 0 22px;letter-spacing:-.04em;max-width:620px}.lead{font-size:17px;line-height:1.8;color:var(--muted);max-width:620px}.drop-zone{margin:34px 0 16px;background:#fff;border:1.5px dashed #b7c2ca;border-radius:18px;padding:27px;display:grid;grid-template-columns:50px 1fr auto;align-items:center;gap:6px 16px;box-shadow:var(--shadow)}.drop-zone.drag{border-color:var(--mint);background:#f2fffb}.upload-icon{grid-row:1/3;width:48px;height:48px;border-radius:14px;background:var(--mint-soft);color:#16816d;font-size:26px;display:grid;place-items:center}.drop-zone span{font-size:12px;color:var(--muted)}.drop-zone .button{grid-column:3;grid-row:1/3}.empty-visual{height:520px;position:relative;background:radial-gradient(circle at 50% 50%,#dff6ef 0,transparent 64%)}.empty-visual:before{content:"";position:absolute;width:320px;height:320px;border:1px solid #bdd8d0;border-radius:50%;top:90px;left:90px}.empty-visual:after{content:"";position:absolute;width:210px;height:210px;border:1px dashed #9fc8bd;border-radius:50%;top:145px;left:145px}.signal-card{position:absolute;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:18px;z-index:2}.signal-card span{display:block;font-size:11px;color:var(--muted);margin-bottom:8px}.signal-card strong{font-size:19px}.signal-main{width:300px;top:125px;left:100px}.signal-row{margin-top:18px;display:grid;grid-template-columns:1fr auto auto;gap:12px;font-size:12px}.signal-row em{font-style:normal;color:var(--muted)}.signal-row i{font-style:normal;color:var(--mint)}.signal-row i.warn{color:var(--orange)}.signal-a{top:54px;right:25px}.signal-b{bottom:65px;left:45px}.dashboard{display:grid;grid-template-columns:224px 1fr;min-height:calc(100vh - 76px)}.sidebar{background:var(--navy);color:white;padding:28px 18px;min-height:100%;position:relative}.side-title{font-size:12px;color:#8fa0b5;letter-spacing:.08em;display:flex;justify-content:space-between;align-items:center;margin:0 8px 18px}.side-title button{background:#203651;border:0;color:white;border-radius:7px;width:26px;height:26px;cursor:pointer}.dataset-item{padding:13px 12px;border-radius:10px;margin-bottom:6px;cursor:pointer}.dataset-item:hover,.dataset-item.active{background:#203651}.dataset-item b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dataset-item span{display:block;color:#93a2b4;font-size:10px;margin-top:5px}.privacy-note{position:sticky;top:calc(100vh - 145px);margin:35px 8px 0;padding:14px;background:#172f4b;border-radius:10px;color:#8fa0b5;font-size:10px;line-height:1.5}.privacy-note b{color:var(--lime)}.workspace{padding:34px 38px 70px;min-width:0}.workspace-head{display:flex;justify-content:space-between;align-items:flex-end}.workspace-head h1,.guide h1{font-family:Georgia,"Noto Serif SC",serif;font-size:34px;margin:0 0 7px}.workspace-head>div>p:last-child,.guide-head>p:last-child{color:var(--muted);font-size:13px}.head-actions{display:flex;align-items:flex-end;gap:12px}.control-label{font-size:10px;color:var(--muted);display:flex;flex-direction:column;gap:5px}.control-label select,.filters select,.filters input{background:#fff;border:1px solid var(--line);border-radius:9px;padding:10px 12px}.period-pills{display:flex;gap:8px;margin:24px 0 18px;flex-wrap:wrap}.period-pill{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 11px;font-size:11px;cursor:pointer}.period-pill.active{background:var(--navy);border-color:var(--navy);color:#fff}.kpi-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}.kpi-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 16px;min-width:0}.kpi-card label{display:block;color:var(--muted);font-size:11px;margin-bottom:10px}.kpi-card strong{font-size:24px;letter-spacing:-.03em}.kpi-card small{display:block;color:var(--muted);font-size:10px;margin-top:8px}.delta.up{color:#159277}.delta.down{color:var(--red)}.insight-strip{margin:16px 0;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.insight{border-radius:12px;padding:14px 16px;background:#eaf1f4;font-size:12px;line-height:1.55}.insight b{display:block;margin-bottom:3px}.insight.opportunity{background:var(--mint-soft)}.insight.warning{background:#fff1dc}.two-col{display:grid;grid-template-columns:1.55fr 1fr;gap:16px}.panel{background:#fff;border:1px solid var(--line);border-radius:15px;padding:20px;margin-top:16px}.panel-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:15px}.panel h2{font-size:16px;margin:0}.section-kicker{font-size:9px;margin-bottom:6px}.legend,.map-legend{font-size:10px;color:var(--muted)}.dot{width:7px;height:7px;display:inline-block;border-radius:50%;margin:0 4px 0 10px}.dot.navy{background:var(--navy)}.dot.mint{background:var(--mint)}.chart{height:240px}.chart svg,.opportunity-map svg{width:100%;height:100%;overflow:visible}.axis{stroke:#dfe5e9;stroke-width:1}.axis-label{font-size:9px;fill:#8390a2}.trend-area{fill:url(#areaGradient)}.trend-line{fill:none;stroke:var(--navy);stroke-width:2.5}.rate-line{fill:none;stroke:var(--mint);stroke-width:2.5}.chart-point{fill:#fff;stroke-width:2}.funnel{display:flex;flex-direction:column;gap:13px;padding-top:5px}.funnel-row{display:grid;grid-template-columns:58px 1fr 62px;align-items:center;gap:10px;font-size:11px}.funnel-track{height:22px;background:#eef2f4;border-radius:5px;overflow:hidden;position:relative}.funnel-market,.funnel-selected{position:absolute;height:100%;left:0;top:0;border-radius:5px}.funnel-market{background:#cbd4dc}.funnel-selected{background:var(--mint)}.funnel-value{text-align:right;font-weight:700}.funnel-note{font-size:10px;color:var(--muted);line-height:1.5;margin-top:4px}.opportunity-map{height:330px;padding:4px 10px 5px 35px}.quadrant-label{font-size:10px;font-weight:700;fill:#778699}.bubble{fill:rgba(31,185,154,.55);stroke:#137b68;stroke-width:1}.bubble.fix{fill:rgba(245,169,71,.62);stroke:#c47a1f}.bubble.defend{fill:rgba(16,35,63,.55);stroke:#10233f}.bubble-label{font-size:8px;fill:#33445a}.table-tools{align-items:flex-end}.filters{display:flex;gap:8px}.filters input{width:190px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:11px}th{text-align:right;color:var(--muted);font-weight:600;padding:10px 8px;border-bottom:1px solid var(--line);white-space:nowrap}th:first-child,th:nth-child(2),td:first-child,td:nth-child(2){text-align:left}td{text-align:right;padding:12px 8px;border-bottom:1px solid #eef1f3;white-space:nowrap}td:first-child{max-width:240px;overflow:hidden;text-overflow:ellipsis;font-weight:650}.tag{padding:4px 7px;border-radius:999px;font-size:9px}.tag.defend{background:#e5e9ef;color:#20334d}.tag.growth{background:var(--mint-soft);color:#147d68}.tag.fix{background:#fff0d9;color:#a86415}.tag.watch{background:#eef1f3;color:#6f7d8d}.table-footer{display:flex;justify-content:space-between;padding-top:14px;color:var(--muted);font-size:11px}.guide{max-width:1180px;margin:auto;padding:60px 35px}.guide-head{margin-bottom:36px}.guide-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.guide-grid article{background:#fff;border:1px solid var(--line);border-radius:14px;padding:24px}.guide-grid article>b{color:var(--mint);font-size:12px}.guide-grid h3{font-size:16px;margin:12px 0 8px}.guide-grid p{margin:0;color:var(--muted);font-size:12px;line-height:1.7}.toast{position:fixed;right:24px;bottom:24px;background:var(--navy);color:white;padding:12px 16px;border-radius:10px;box-shadow:var(--shadow);font-size:12px;opacity:0;transform:translateY(10px);transition:.25s;z-index:50}.toast.show{opacity:1;transform:none}
@media(max-width:1100px){.kpi-grid{grid-template-columns:repeat(3,1fr)}.empty-state{padding:40px}.empty-visual{transform:scale(.85)}.two-col{grid-template-columns:1fr}.dashboard{grid-template-columns:190px 1fr}.workspace{padding:28px 22px}}
@media(max-width:760px){.topbar{padding:0 16px}.product-subtitle,.topbar nav{display:none}.empty-state{display:block;padding:45px 22px}.empty-copy h1{font-size:40px}.empty-visual{display:none}.drop-zone{grid-template-columns:50px 1fr}.drop-zone .button{grid-column:1/3;grid-row:3}.dashboard{display:block}.sidebar{min-height:auto}.privacy-note{display:none}.workspace{padding:24px 14px}.workspace-head{display:block}.head-actions{margin-top:18px}.kpi-grid,.insight-strip{grid-template-columns:repeat(2,1fr)}.guide-grid{grid-template-columns:1fr}.table-tools{display:block}.filters{margin-top:12px}.opportunity-map{height:260px}}

/* In-context, collapsible operating guide */
.usage-guide{background:#fff;border:1px solid var(--line);border-radius:14px;margin:0 0 16px;overflow:hidden}.usage-guide summary{display:flex;align-items:center;gap:12px;padding:14px 16px;cursor:pointer;list-style:none}.usage-guide summary::-webkit-details-marker{display:none}.guide-icon{width:28px;height:28px;border-radius:9px;background:var(--mint-soft);color:#13836e;display:grid;place-items:center;font-weight:900}.usage-guide summary>span:nth-child(2){display:flex;flex-direction:column;gap:3px;font-size:12px}.usage-guide summary small{font-size:10px;color:var(--muted);font-weight:400}.summary-arrow{margin-left:auto;color:var(--muted);font-size:17px;transition:.2s}.usage-guide[open] .summary-arrow{transform:rotate(180deg)}.usage-content{border-top:1px solid var(--line);padding:20px;display:grid;grid-template-columns:260px 1fr;gap:22px;background:#fbfcfc}.usage-intro h3{font-size:17px;margin:0 0 9px}.usage-intro p,.usage-actions p{font-size:11px;line-height:1.65;color:var(--muted);margin:0}.usage-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.usage-actions article{padding:12px;background:#fff;border:1px solid #e8edef;border-radius:10px}.usage-actions article b{font-size:11px;color:#203651}.usage-actions p{margin-top:5px}.usage-boundary{grid-column:1/-1;background:#eef5f3;border-left:3px solid var(--mint);padding:10px 12px;font-size:10px;line-height:1.55;color:#526274}

/* Opportunity map: separate the chart from readable ranked highlights */
.map-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:20px;align-items:stretch}.map-layout .opportunity-map{height:350px;padding:0;min-width:0}.map-highlights{border-left:1px solid var(--line);padding-left:18px;display:flex;flex-direction:column}.highlight-title{font-size:12px;font-weight:800;margin-bottom:8px}.highlight-title span{display:block;font-size:9px;font-weight:400;color:var(--muted);margin-top:3px}.highlight-item{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid #edf0f2}.highlight-rank{width:21px;height:21px;border-radius:7px;background:var(--mint-soft);color:#167e6a;display:grid;place-items:center;font-size:9px;font-weight:800}.highlight-query{min-width:0}.highlight-query b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px}.highlight-query span{font-size:9px;color:var(--muted)}.highlight-share{text-align:right;font-size:10px;font-weight:800}.highlight-share small{display:block;color:var(--muted);font-size:8px;font-weight:400}.highlight-note{font-size:9px;line-height:1.55;color:var(--muted);margin:auto 0 0;padding-top:12px}.baseline-band{fill:#f0f4f3}.bubble{transition:opacity .15s}.bubble:hover{opacity:1;stroke-width:2}.bubble-label{font-size:8px;fill:#33445a;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}

@media(max-width:1100px){.usage-content{grid-template-columns:1fr}.usage-actions{grid-template-columns:repeat(3,1fr)}.map-layout{grid-template-columns:1fr 220px}}
@media(max-width:760px){.usage-actions{grid-template-columns:1fr}.map-layout{grid-template-columns:1fr}.map-highlights{border-left:0;border-top:1px solid var(--line);padding:15px 0 0}.map-layout .opportunity-map{height:280px}.map-legend{display:none}}

/* Session record management */
.side-actions{display:flex;gap:5px}.modal-backdrop{position:fixed;inset:0;background:rgba(8,22,40,.54);backdrop-filter:blur(3px);display:grid;place-items:center;padding:24px;z-index:100}.record-modal{background:#fff;border-radius:18px;width:min(900px,96vw);max-height:min(760px,90vh);box-shadow:0 30px 80px rgba(4,18,35,.26);display:flex;flex-direction:column;overflow:hidden}.record-head{display:flex;justify-content:space-between;gap:18px;padding:24px 26px 18px;border-bottom:1px solid var(--line)}.record-head h2{font-size:20px;margin:0 0 6px}.record-head p{font-size:10px;color:var(--muted);margin:0}.icon-button{border:0;background:#f0f3f4;border-radius:9px;width:32px;height:32px;font-size:20px;cursor:pointer}.record-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:16px 26px;background:#f8faf9}.record-stat{background:#fff;border:1px solid var(--line);border-radius:10px;padding:11px 13px}.record-stat span{display:block;font-size:9px;color:var(--muted);margin-bottom:3px}.record-stat b{font-size:17px}.record-list{padding:0 26px;overflow:auto}.record-row{display:grid;grid-template-columns:minmax(160px,1.25fr) 80px 130px 80px 76px;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid #edf0f2;font-size:11px}.record-name{min-width:0}.record-name b,.record-name span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-name span{font-size:9px;color:var(--muted);margin-top:4px}.record-view,.record-period,.record-count{color:#526174}.record-delete{border:1px solid #f0d1ce;background:#fff7f6;color:#b54e47;border-radius:8px;padding:7px 9px;font-size:10px;cursor:pointer}.record-delete:hover,.danger-ghost:hover{background:#fde9e7}.record-footer{padding:17px 26px;display:flex;justify-content:space-between;border-top:1px solid var(--line)}.danger-ghost{border:1px solid #efceca;background:#fff;color:#b34e47}.empty-records{text-align:center;color:var(--muted);padding:45px 20px;font-size:12px}.dataset-remove{display:block;width:100%;border:0;background:transparent;color:#8fa0b5;text-align:left;font-size:9px;margin-top:6px;padding:0;cursor:pointer}.dataset-remove:hover{color:#ffaaa3}
@media(max-width:760px){.record-row{grid-template-columns:minmax(130px,1fr) 75px 68px}.record-view,.record-count{display:none}.record-period{font-size:9px}.record-summary{grid-template-columns:1fr 1fr}.record-summary .record-stat:last-child{grid-column:1/-1}.record-footer{gap:10px}.record-footer .button{flex:1}.head-actions{flex-wrap:wrap}}

.modal-open{overflow:hidden}.record-empty{text-align:center;color:var(--muted);padding:45px 20px;font-size:12px}.dataset-remove{max-height:0;opacity:0;overflow:hidden;margin-top:0;transition:max-height .15s,opacity .15s,margin .15s}.dataset-item:hover .dataset-remove,.dataset-item:focus-within .dataset-remove{max-height:20px;opacity:1;margin-top:6px}
@media(max-width:760px){.dataset-remove{max-height:20px;opacity:1;margin-top:6px}}

.drop-zone .upload-actions{grid-column:3;grid-row:1/3;display:flex;gap:8px;align-items:center}.drop-zone .upload-actions .button{grid-column:auto;grid-row:auto;white-space:nowrap}.drop-zone .upload-actions .secondary{background:#fff}
@media(max-width:760px){.drop-zone .upload-actions{grid-column:1/3;grid-row:3;margin-top:8px}.drop-zone .upload-actions .button{flex:1}}

/* Clean decision matrix replaces the crowded bubble plot */
.map-layout .opportunity-map{height:auto;padding:0}.decision-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.decision-card{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fcfdfd;min-height:190px}.decision-card-head{padding:12px 13px 9px;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #edf0f2}.decision-card-head b{display:block;font-size:12px}.decision-card-head p{font-size:9px;color:var(--muted);margin:3px 0 0}.decision-card-head span{font-size:10px;font-weight:800;border-radius:999px;padding:4px 7px;background:#eef1f3}.decision-card.growth .decision-card-head{background:#eaf8f4}.decision-card.fix .decision-card-head{background:#fff5e6}.decision-card.defend .decision-card-head{background:#edf1f6}.decision-card.watch .decision-card-head{background:#f5f6f7}.decision-query{display:grid;grid-template-columns:minmax(110px,1fr) 110px 58px;gap:10px;align-items:center;padding:9px 12px;border-bottom:1px solid #f0f2f3;cursor:pointer}

/* Persistent local records and backup controls */
.saved-actions{display:flex;align-items:center;gap:10px;margin-top:14px;padding:12px 14px;background:#eef8f5;border:1px solid #d2ebe4;border-radius:12px;font-size:11px}.saved-actions>span{margin-right:auto;color:#526274}.saved-actions b{color:#137d69;font-size:14px}.quality-summary{padding:0 26px 12px;background:#f8faf9}.quality-banner{display:flex;align-items:flex-start;gap:9px;padding:10px 12px;border-radius:9px;background:#fff6e8;color:#76511e;font-size:10px;line-height:1.5}.quality-banner.good{background:#eaf7f3;color:#226b5c}.quality-dot{width:8px;height:8px;border-radius:50%;background:var(--orange);margin-top:3px;flex:0 0 auto}.quality-banner.good .quality-dot{background:var(--mint)}.record-footer-actions{display:flex;gap:8px}.record-quality{display:inline-block;margin-left:6px;font-size:8px;color:#a26b1e;background:#fff2dc;border-radius:5px;padding:2px 5px}
@media(max-width:760px){.saved-actions{align-items:stretch;flex-wrap:wrap}.saved-actions>span{width:100%}.record-footer{flex-direction:column-reverse}.record-footer-actions{display:grid;grid-template-columns:1fr 1fr}.record-footer-actions .primary{grid-column:1/-1}.record-footer>.danger-ghost{width:100%}}

.decision-query:last-child{border-bottom:0}.decision-query:hover{background:#f5faf8}.decision-query-name{min-width:0}.decision-query-name b{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.decision-query-name span{font-size:8px;color:var(--muted)}.decision-bar{height:5px;background:#e8edef;border-radius:5px;overflow:hidden}.decision-bar i{display:block;height:100%;background:var(--mint);border-radius:5px}.decision-card.fix .decision-bar i{background:var(--orange)}.decision-card.defend .decision-bar i{background:var(--navy)}.decision-value{text-align:right;font-size:9px;font-weight:800}.decision-value small{display:block;color:var(--muted);font-size:7px;font-weight:400}.decision-empty{padding:24px 12px;text-align:center;color:var(--muted);font-size:10px}.threshold-item{padding:12px 0;border-bottom:1px solid #edf0f2}.threshold-item span{font-size:9px;color:var(--muted);display:block}.threshold-item b{font-size:16px;display:block;margin-top:3px}.threshold-item p{font-size:9px;line-height:1.5;color:var(--muted);margin:4px 0 0}
.sort-button{border:0;background:transparent;padding:0;color:inherit;font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}.sort-button:hover,.sort-button.active{color:#16836e}.sort-button i{font-style:normal;margin-left:3px}.table-wrap tbody tr{cursor:pointer}.table-wrap tbody tr:hover{background:#f5faf8}
.rule-settings{margin-top:12px;border:1px solid var(--line);border-radius:10px;background:#fafcfc}.rule-settings summary{display:flex;justify-content:space-between;padding:10px 11px;font-size:10px;font-weight:800;cursor:pointer;list-style:none}.rule-settings summary::-webkit-details-marker{display:none}.rule-settings[open] summary span{transform:rotate(180deg)}.rule-controls{border-top:1px solid var(--line);padding:10px;display:grid;gap:9px}.rule-controls label{display:grid;gap:4px;color:var(--muted);font-size:9px}.rule-controls input,.rule-controls select{width:100%;border:1px solid var(--line);border-radius:7px;background:#fff;padding:7px 8px;font-size:10px}.rule-buttons{display:flex;align-items:center;gap:6px}.rule-buttons .button{padding:7px 11px;font-size:9px}.rule-buttons .text-button{font-size:9px;padding:7px}.strategy-note{margin-top:12px;padding-top:11px;border-top:1px solid var(--line)}.strategy-note>b{font-size:10px}.strategy-note p{position:relative;margin:7px 0 0;padding-left:13px;color:#5e6d80;font-size:8px;line-height:1.5}.strategy-note i{position:absolute;left:0;top:3px;width:7px;height:7px;border-radius:2px;background:#9ba9b7}.strategy-note i.growth{background:var(--mint)}.strategy-note i.fix{background:var(--orange)}.strategy-note i.defend{background:var(--navy)}
.rule-help{margin:0;color:#526274;font-size:9px;line-height:1.55}.rule-presets{display:flex;flex-wrap:wrap;gap:5px}.rule-presets button{border:1px solid #dce4e7;border-radius:7px;background:#fff;padding:6px 8px;color:#526274;font-size:8px;cursor:pointer}.rule-presets button:first-child{border-color:#9edccc;background:#eaf8f4;color:#157764;font-weight:800}.rule-presets button:hover{border-color:var(--mint);color:#147d68}.rule-controls label small{display:flex;align-items:center;gap:3px;color:#7b8999;font-size:8px;line-height:1.4}.rule-controls label small i{width:7px;height:7px;border-radius:2px;background:#9ba9b7}.rule-controls label small i.growth{background:var(--mint)}.rule-controls label small i.fix{background:var(--orange)}.rule-controls label small i.defend{background:var(--navy)}.rule-flow{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.rule-flow>b{font-size:10px}.rule-flow ol{list-style:none;margin:9px 0 0;padding:0;display:grid;gap:6px}.rule-flow li{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:7px;align-items:center;padding:8px;border:1px solid #e6ebed;border-radius:8px;background:#fff}.rule-flow li>span{display:grid;place-items:center;width:20px;height:20px;border-radius:6px;background:#eef2f3;font-size:8px;font-weight:800}.rule-flow strong{display:block;font-size:9px}.rule-flow p{margin:2px 0 0;color:#788697;font-size:7px;line-height:1.4}.rule-flow em{font-style:normal;font-size:8px;font-weight:800;white-space:nowrap}.rule-flow li.fix{border-left:3px solid var(--orange)}.rule-flow li.defend{border-left:3px solid var(--navy)}.rule-flow li.growth{border-left:3px solid var(--mint)}.rule-flow li.watch{border-left:3px solid #9ba9b7}
.opportunity-panel .map-layout{display:block}.classification-layout{display:block}.strategy-manual{display:grid;grid-template-columns:1fr 1fr;gap:12px}.manual-card{border:1px solid var(--line);border-radius:12px;padding:15px 16px;background:#fbfcfc}.manual-card.growth{border-top:3px solid var(--mint)}.manual-card.fix{border-top:3px solid var(--orange)}.manual-card.defend{border-top:3px solid var(--navy)}.manual-card.watch{border-top:3px solid #9ba9b7}.manual-title{display:flex;align-items:center;gap:8px;margin-bottom:10px}.manual-title span{display:grid;place-items:center;width:23px;height:23px;border-radius:7px;background:#eef3f2;color:#607083;font-size:9px;font-weight:800}.manual-title b{font-size:12px}.manual-card p{margin:7px 0 0;color:#5c6c80;font-size:9px;line-height:1.65}.manual-card strong{display:inline-block;min-width:50px;color:#203651;font-size:9px}.rule-workbench{margin-top:18px;padding-top:18px;border-top:1px solid var(--line);display:grid;grid-template-columns:minmax(340px,.8fr) minmax(440px,1.2fr);column-gap:28px;align-items:start}.rule-workbench>.highlight-title,.rule-workbench>#mapHighlights,.rule-workbench>.rule-settings{grid-column:1}.rule-workbench>.rule-flow{grid-column:2;grid-row:1;margin:0;padding:0;border:0}.rule-workbench>.highlight-note{grid-column:2;grid-row:2;margin:14px 0 0}.classification-panel .threshold-item:first-child{padding-top:2px}.rule-workbench #mapHighlights{display:grid;grid-template-columns:1fr 1fr;column-gap:18px}.rule-workbench .threshold-item:nth-child(-n+2){border-top:0}
.opportunity-panel .map-layout{display:block}.classification-layout{display:block}.strategy-manual{display:grid;grid-template-columns:1fr 1fr;gap:12px}.manual-card{border:1px solid var(--line);border-radius:12px;padding:15px 16px;background:#fbfcfc}.manual-card.growth{border-top:3px solid var(--mint)}.manual-card.fix{border-top:3px solid var(--orange)}.manual-card.defend{border-top:3px solid var(--navy)}.manual-card.watch{border-top:3px solid #9ba9b7}.manual-title{display:flex;align-items:center;gap:8px;margin-bottom:10px}.manual-title span{display:grid;place-items:center;width:23px;height:23px;border-radius:7px;background:#eef3f2;color:#607083;font-size:9px;font-weight:800}.manual-title b{font-size:12px}.manual-card p{margin:7px 0 0;color:#5c6c80;font-size:9px;line-height:1.65}.manual-card strong{display:inline-block;min-width:50px;color:#203651;font-size:9px}.rule-workbench{margin-top:18px;padding-top:18px;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:16px 24px;align-items:start}.rule-workbench>.highlight-title{grid-column:1/-1;grid-row:1}.rule-workbench>#mapHighlights{grid-column:1/-1;grid-row:2}.rule-workbench>.rule-settings{grid-column:1;grid-row:3;margin:0}.rule-workbench>.rule-flow{grid-column:2;grid-row:3;margin:0;padding:0;border:0}.rule-workbench>.highlight-note{grid-column:1/-1;grid-row:4;margin:0}.rule-workbench #mapHighlights{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.rule-workbench .threshold-item{padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:#f8faf9}.rule-workbench .threshold-item b{font-size:15px}.rule-workbench .threshold-item p{margin-top:3px}.panel-purpose{min-height:34px;margin:-4px 0 10px;padding:8px 10px;border-radius:8px;background:#f5f8f7;color:#65758a;font-size:9px;line-height:1.55}.panel-purpose b{color:#263a53}
@media(max-width:1050px){.rule-workbench{grid-template-columns:1fr}.rule-workbench>.highlight-title,.rule-workbench>#mapHighlights,.rule-workbench>.rule-settings,.rule-workbench>.rule-flow,.rule-workbench>.highlight-note{grid-column:1;grid-row:auto}.rule-workbench #mapHighlights{grid-template-columns:1fr 1fr}.rule-workbench>.rule-flow{margin-top:2px;padding-top:15px;border-top:1px solid var(--line)}.rule-controls{grid-template-columns:repeat(3,1fr)}.rule-help,.rule-presets{grid-column:1/-1}.rule-buttons{grid-column:1/-1}}
@media(max-width:680px){.strategy-manual{grid-template-columns:1fr}.rule-controls{grid-template-columns:1fr}.rule-buttons{grid-column:auto}}
.query-modal{background:#fff;border-radius:18px;width:min(1320px,96vw);height:min(900px,94vh);box-shadow:0 30px 80px rgba(4,18,35,.26);display:flex;flex-direction:column;overflow:hidden}.query-modal>.record-head,.query-detail-controls,.query-detail-note{flex:0 0 auto}.query-detail-controls{display:flex;align-items:flex-start;gap:18px;padding:14px 26px;background:#f8faf9}.query-detail-controls label{font-size:9px;color:var(--muted);display:flex;flex-direction:column;gap:5px;flex:0 0 180px}.query-detail-controls select{background:#fff;border:1px solid var(--line);border-radius:8px;padding:8px 11px}.query-detail-summary{display:flex;flex-wrap:wrap;gap:12px 20px;font-size:10px;min-width:0}.query-detail-summary span{color:var(--muted)}.query-detail-summary b{display:block;color:var(--ink);font-size:13px;margin-top:3px}.query-trend-chart{height:220px;flex:0 0 220px;padding:12px 28px 0}.query-trend-chart svg{width:100%;height:100%}.query-period-table{min-height:170px;flex:1 1 260px;margin:8px 26px 0;overflow:auto;border:1px solid var(--line);border-radius:10px}.query-period-table table{min-width:1120px}.query-period-table thead{position:sticky;top:0;z-index:2;background:#f7f9f9}.query-period-table th,.query-period-table td{padding:10px 9px;white-space:nowrap}.detail-sort{border:0;background:transparent;padding:0;color:inherit;font:inherit;font-weight:700;cursor:pointer;white-space:nowrap}.detail-sort:hover,.detail-sort.active{color:#15836e}.detail-sort i{font-style:normal;margin-left:3px}.missing-period{color:#a2712c;font-style:italic}.query-detail-note{font-size:9px;color:var(--muted);padding:10px 26px 16px;line-height:1.55}
@media(max-height:760px){.query-trend-chart{height:170px;flex-basis:170px}.query-period-table{min-height:145px}.query-detail-controls{padding-top:10px;padding-bottom:10px}.query-modal>.record-head{padding-top:16px;padding-bottom:13px}}
@media(max-width:900px){.decision-grid{grid-template-columns:1fr}.map-layout{grid-template-columns:1fr}.map-highlights{border-left:0;border-top:1px solid var(--line);padding:15px 0 0}}
@media(max-width:760px){.decision-query{grid-template-columns:minmax(100px,1fr) 70px 52px}.query-detail-controls{align-items:flex-start;flex-direction:column}.query-detail-summary{flex-wrap:wrap}.query-trend-chart{height:200px;padding-left:14px;padding-right:14px}}

/* Unified strategy summaries and advanced table filters */
.insight-strip{grid-template-columns:repeat(4,1fr)}.insight-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:4px}.insight-head b{margin:0}.insight-export{border:0;background:rgba(255,255,255,.72);border-radius:7px;padding:4px 7px;color:#526274;font-size:9px;cursor:pointer}.insight-export:hover{background:#fff;color:#13836e}.insight.defend{background:#e8edf3}.insight.watch{background:#eef1f3}.filter-toggle{padding:9px 11px;font-size:10px}.advanced-filters{display:flex;align-items:flex-end;justify-content:flex-end;gap:9px;margin:-2px 0 14px;padding:12px;background:#f8faf9;border:1px solid var(--line);border-radius:11px}.advanced-filters label{display:flex;flex-direction:column;gap:4px;color:var(--muted);font-size:9px}.advanced-filters input,.advanced-filters select{width:145px;background:#fff;border:1px solid var(--line);border-radius:8px;padding:8px 9px;font-size:10px}.advanced-filters .text-button{padding:8px;white-space:nowrap}
@media(max-width:1100px){.insight-strip{grid-template-columns:repeat(2,1fr)}.advanced-filters{justify-content:flex-start;flex-wrap:wrap}}
@media(max-width:760px){.insight-strip{grid-template-columns:1fr}.filters{flex-wrap:wrap}.advanced-filters{align-items:stretch}.advanced-filters label{width:calc(50% - 5px)}.advanced-filters input,.advanced-filters select{width:100%}}

/* KPI metric definitions */
.kpi-card{position:relative}.metric-help{position:absolute;top:12px;right:12px;width:20px;height:20px;border:1px solid #d8e1e5;border-radius:50%;background:#f7faf9;color:#718092;font-size:10px;font-weight:800;display:grid;place-items:center;cursor:help;padding:0;z-index:4}.metric-help:hover,.metric-help:focus,.metric-help:focus-visible{background:var(--mint-soft);border-color:var(--mint);color:#147d68;outline:none}.metric-tooltip{position:absolute;top:26px;right:0;width:250px;padding:12px 13px;border-radius:10px;background:var(--navy);color:#fff;box-shadow:0 12px 32px rgba(7,24,44,.22);font-size:10px;font-weight:400;line-height:1.65;text-align:left;opacity:0;visibility:hidden;transform:translateY(-4px);transition:.16s;pointer-events:none}.metric-tooltip:before{content:"";position:absolute;right:6px;top:-5px;width:10px;height:10px;background:var(--navy);transform:rotate(45deg)}.metric-tooltip b{display:block;color:var(--lime);font-size:11px;margin-bottom:4px}.metric-help:hover .metric-tooltip,.metric-help:focus .metric-tooltip,.metric-help:focus-visible .metric-tooltip{opacity:1;visibility:visible;transform:none}.kpi-card:nth-child(-n+2) .metric-tooltip{left:0;right:auto}.kpi-card:nth-child(-n+2) .metric-tooltip:before{left:6px;right:auto}
@media(max-width:760px){.metric-tooltip{width:min(245px,78vw)}.kpi-card:nth-child(odd) .metric-tooltip{left:0;right:auto}.kpi-card:nth-child(odd) .metric-tooltip:before{left:6px;right:auto}.kpi-card:nth-child(even) .metric-tooltip{left:auto;right:0}.kpi-card:nth-child(even) .metric-tooltip:before{left:auto;right:6px}}

/* Table field definitions and pagination */
.table-export-actions{display:flex;align-items:center;gap:6px;margin-right:3px}.table-export-actions .button{padding:9px 11px;font-size:10px;white-space:nowrap}.table-export-actions .primary:disabled{background:#aab5c2;cursor:not-allowed}.selection-col{width:34px!important;min-width:34px;text-align:center!important;padding-left:8px!important;padding-right:8px!important}.selection-col input,.row-select{width:14px;height:14px;accent-color:var(--mint);cursor:pointer}.table-wrap table th:nth-child(3),.table-wrap table td:nth-child(3){text-align:left}
.field-title{display:inline-flex;align-items:center;justify-content:flex-end;gap:5px}.field-help{position:relative;width:15px;height:15px;border:1px solid #d3dde2;border-radius:50%;background:#f7faf9;color:#718092;display:inline-grid;place-items:center;font-size:8px;font-weight:800;cursor:help;outline:none;flex:0 0 auto}.field-help:hover,.field-help:focus{background:var(--mint-soft);border-color:var(--mint);color:#147d68}.field-tooltip{position:absolute;top:21px;left:0;width:235px;background:var(--navy);color:#fff;border-radius:9px;padding:10px 11px;text-align:left;white-space:normal;font-size:9px;font-weight:400;line-height:1.6;box-shadow:0 12px 30px rgba(7,24,44,.22);opacity:0;visibility:hidden;transform:translateY(-3px);transition:.15s;z-index:20;pointer-events:none}.field-tooltip:before{content:"";position:absolute;top:-4px;left:4px;width:8px;height:8px;background:var(--navy);transform:rotate(45deg)}.field-tooltip b{display:block;color:var(--lime);font-size:10px;margin-bottom:3px}.field-tooltip.align-right{left:auto;right:0}.field-tooltip.align-right:before{left:auto;right:4px}.field-help:hover .field-tooltip,.field-help:focus .field-tooltip{opacity:1;visibility:visible;transform:none}.table-footer{align-items:center;gap:15px}.pagination{display:flex;align-items:center;gap:5px}.pagination label{display:flex;align-items:center;gap:5px;color:var(--muted);white-space:nowrap}.pagination select{border:1px solid var(--line);background:#fff;border-radius:7px;padding:6px 24px 6px 8px;font-size:10px}.pagination button{min-width:28px;height:28px;border:1px solid var(--line);background:#fff;border-radius:7px;color:#536176;cursor:pointer;padding:0 6px;font-size:11px}.pagination button:hover:not(:disabled),.pagination .page-number.active{background:var(--navy);border-color:var(--navy);color:#fff}.pagination button:disabled{opacity:.35;cursor:not-allowed}.pagination #pageNumbers{display:flex;gap:4px}.page-ellipsis{padding:5px 2px;color:var(--muted)}
@media(max-width:760px){.table-export-actions{width:100%;order:3}.table-export-actions .button{flex:1}.table-footer{align-items:flex-start;flex-direction:column}.pagination{width:100%;flex-wrap:wrap}.pagination label{margin-right:auto}.pagination #pageNumbers{order:3;width:100%;overflow:auto;padding-top:3px}.field-tooltip{position:fixed;left:14px!important;right:14px!important;top:auto;width:auto;margin-top:20px}.field-tooltip:before{display:none}}

/* Collapsible dataset sidebar */
.dashboard,.sidebar,.workspace{transition:grid-template-columns .22s ease,width .22s ease,padding .22s ease}
.sidebar-toggle{font-size:19px;line-height:1}
@media(min-width:761px){
  .dashboard.sidebar-collapsed{grid-template-columns:52px minmax(0,1fr)}
  .dashboard.sidebar-collapsed .sidebar{padding:28px 8px}
  .dashboard.sidebar-collapsed .side-title{justify-content:center;margin-left:0;margin-right:0}
  .dashboard.sidebar-collapsed .side-title>span:first-child,
  .dashboard.sidebar-collapsed #manageRecordsSide,
  .dashboard.sidebar-collapsed #addFiles,
  .dashboard.sidebar-collapsed #datasetList,
  .dashboard.sidebar-collapsed .privacy-note{display:none}
  .dashboard.sidebar-collapsed .side-actions{justify-content:center}
}
@media(max-width:760px){.sidebar-toggle{display:none}}

/* Custom period selection */
.period-pills.editing{margin-bottom:8px;padding:10px;border:1px dashed #8fcfbe;border-radius:12px;background:#f3fbf8}.period-pills.editing .period-pill:not(.active){border-color:#cbd6da;background:#fff;color:#8a96a4}.period-hint{margin:0 0 16px;padding-left:4px;color:#327563;font-size:10px;line-height:1.5}
