.behaviour-hub{padding:26px;margin:18px 0 24px;min-width:0;color:var(--ink)}
.behaviour-hub[hidden],.behaviour-hub [hidden]{display:none!important}
.behaviour-heading h2{font:700 23px 'Manrope',sans-serif;margin:8px 0;letter-spacing:-.7px}
.behaviour-heading p,.behaviour-card-heading p{color:var(--muted);line-height:1.6;margin:6px 0 0;font-size:14px}
.behaviour-tabs{display:flex;gap:6px;padding:5px;border:1px solid var(--line);background:var(--soft);border-radius:12px;margin:22px 0;flex-wrap:wrap}
.behaviour-tabs button{border:0;background:transparent;border-radius:8px;padding:11px 14px;color:var(--muted);font-size:14px;font-weight:600;flex:1;transition:background .15s,color .15s}
.behaviour-tabs button[aria-selected=true]{background:var(--surface);color:var(--accent-ink,var(--green-dark));box-shadow:0 2px 8px #00000008}
.behaviour-tabs button:hover{color:var(--ink);background:var(--accent-soft,var(--green-pale))}
.behaviour-hub button:focus-visible,.behaviour-hub input:focus-visible,.behaviour-hub select:focus-visible,.behaviour-fields summary:focus-visible{outline:2px solid var(--accent,var(--green));outline-offset:3px}
.behaviour-filters,.behaviour-inline-filters{display:flex;flex-wrap:wrap;align-items:end;gap:12px}
.behaviour-hub label,.behaviour-fields-inner>label{display:flex;flex-direction:column;gap:7px;font-weight:600;font-size:13px;color:var(--ink);min-width:0}
.behaviour-hub input:not([type=range]),.behaviour-hub select{width:100%;min-width:0;max-width:100%;border:1px solid var(--line);border-radius:9px;padding:10px 12px;background:var(--field,var(--soft));color:var(--ink);font-size:14px;min-height:42px;color-scheme:light}
body.dark .behaviour-hub input,body.dark .behaviour-hub select{color-scheme:dark}
.behaviour-filters label{flex:1;min-width:130px}.behaviour-filters label:nth-child(3){flex:1.5}.behaviour-filters .button{min-height:42px}
.behaviour-note{font-size:13px!important;line-height:1.7;color:var(--muted);margin:14px 0;overflow-wrap:anywhere}
.behaviour-error{font-size:14px;line-height:1.65;padding:12px 15px;background:var(--red-pale);border-radius:10px;color:var(--ink);border-left:3px solid var(--red)}
.behaviour-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.behaviour-stat{background:var(--soft);border:1px solid var(--line);border-radius:13px;padding:18px;min-width:0;display:flex;flex-direction:column;gap:10px}
.behaviour-stat>span{font-size:13px;font-weight:600;color:var(--muted);line-height:1.5}
.behaviour-stat>strong{font:700 clamp(20px,2vw,27px) 'Manrope',sans-serif;letter-spacing:-.6px;overflow-wrap:anywhere;line-height:1.4;color:var(--ink)}
.behaviour-stat>small{font-size:12px;color:var(--muted);line-height:1.6}
.behaviour-method{padding:14px 16px;background:var(--soft);border:1px solid var(--line);border-radius:11px;margin:16px 0}
.behaviour-method summary{cursor:pointer;font-size:14px;font-weight:600;line-height:1.6;color:var(--ink)}
.behaviour-method p{font-size:13px;line-height:1.8;color:var(--muted);max-width:1000px;margin:14px 0 0}
.behaviour-method>label{max-width:250px;margin-top:14px}
.behaviour-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}
.behaviour-card{padding:22px;border:1px solid var(--line);border-radius:14px;min-width:0;margin:18px 0;background:var(--surface)}
.behaviour-columns>.behaviour-card{margin:0}
.behaviour-card h3{font:700 18px 'Manrope',sans-serif;letter-spacing:-.3px;line-height:1.5;margin:0}
.behaviour-card h4{font-size:14px;margin:22px 0 12px}
.behaviour-card-heading{display:flex;justify-content:space-between;align-items:start;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.behaviour-card-heading>label{max-width:210px}.behaviour-inline-filters label{max-width:210px}
.behaviour-empty{padding:24px 8px;color:var(--muted);font-size:14px;line-height:1.8}
.mistake-total{display:flex;flex-direction:column;gap:6px;margin-bottom:20px}.mistake-total strong{font:700 28px 'Manrope',sans-serif}.mistake-total span{font-size:13px;color:var(--muted)}
.mistake-row{display:block;text-align:left;width:100%;background:transparent;border:0;border-top:1px solid var(--line);padding:15px 0;color:var(--ink)}
.mistake-row>span:first-child{display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:14px}.mistake-row b{font-weight:600}.mistake-row small{display:block;font-size:12px;color:var(--muted);line-height:1.6}
.mistake-track{display:block;height:7px;background:var(--soft);border-radius:8px;overflow:hidden;margin:12px 0 8px}.mistake-track i{display:block;height:100%;background:var(--red);border-radius:8px;transition:width .2s ease}
.behaviour-group{width:100%;display:flex;align-items:center;justify-content:space-between;gap:14px;text-align:left;border:0;border-top:1px solid var(--line);background:transparent;padding:14px 4px;color:var(--ink);font-size:13px;line-height:1.6}
.behaviour-group>span:last-child{text-align:right}.behaviour-group small{display:block;color:var(--muted);font-size:12px;line-height:1.7}.behaviour-group:hover,.mistake-row:hover{background:var(--soft)}
.behaviour-table-scroll{overflow:auto;max-width:100%;-webkit-overflow-scrolling:touch}
.red-zone-table{width:100%;min-width:510px;border-collapse:separate;border-spacing:5px;table-layout:fixed}
.red-zone-table caption{text-align:left;font-size:13px;color:var(--muted);padding:7px 4px 12px}.red-zone-table th{font-size:12px;font-weight:600;background:transparent;color:var(--muted);padding:6px;border:0;text-align:center;letter-spacing:0}.red-zone-table th:first-child{width:90px}.red-zone-table td{padding:0;border:0}
.red-zone-cell{border:1px solid var(--line);border-radius:9px;padding:12px 5px;width:100%;display:flex;flex-direction:column;gap:6px;align-items:center;color:var(--ink);background:var(--soft);font-size:15px;min-height:68px}
.red-zone-cell small{font-size:12px;color:var(--muted)}.red-zone-cell.negative{background:var(--red-pale);border-color:var(--red)}.red-zone-cell.positive{background:var(--accent-soft,var(--green-pale));border-color:var(--accent,var(--green))}.red-zone-cell.sparse{border-style:dashed}.red-zone-cell.empty{opacity:.55;cursor:default}
.red-zone-alert{display:flex;flex-direction:column;gap:8px;text-align:left;line-height:1.6;padding:15px;border:1px solid var(--line);border-left:3px solid var(--red);border-radius:10px;background:var(--soft);color:var(--ink);width:100%;margin:12px 0;font-size:14px}.red-zone-alert small{color:var(--muted);font-size:12px}
.behaviour-trade-chips{display:flex;flex-wrap:wrap;gap:8px;max-height:330px;overflow:auto}.behaviour-trade-chips .button{font-size:12px;white-space:normal;text-align:left;line-height:1.6}
.behaviour-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.behaviour-form>.behaviour-method{margin:0}.behaviour-method .behaviour-form{margin-top:18px}
.projection-graph{border:1px solid var(--line);border-radius:13px;padding:18px;background:var(--soft);min-width:0;margin-top:18px;transition:opacity .15s}
:is(#projection-results,#comparison-results)[aria-busy=true] .projection-graph{opacity:.65}
.projection-readout{display:flex;flex-wrap:wrap;gap:8px 18px;min-height:60px;padding:4px 8px;font-size:13px;line-height:1.7;color:var(--ink)}.projection-readout>strong{color:var(--accent-ink,var(--green-dark))}
:is(#projection-svg,#comparison-svg){display:block;width:100%;height:auto;overflow:visible;touch-action:pan-y}:is(#projection-svg,#comparison-svg) text{fill:var(--muted);font-size:12px}
.projection-grid{stroke:var(--line);stroke-width:1}.projection-outer{fill:var(--accent,var(--green));opacity:.13}.projection-inner{fill:var(--accent,var(--green));opacity:.25}.projection-median{fill:none;stroke:var(--accent,var(--green));stroke-width:2.5}.projection-expected{fill:none;stroke:var(--ink);stroke-width:1.7;stroke-dasharray:6 4}.projection-cursor{stroke:var(--muted);stroke-width:1;stroke-dasharray:3 4}
.projection-slider-label{font-size:12px!important;padding:0 8px}.projection-slider-label input{width:100%;accent-color:var(--accent,var(--green));min-height:28px}
.projection-legend{display:flex;flex-wrap:wrap;gap:12px 20px;font-size:12px;color:var(--muted);padding:12px 8px 0;line-height:1.6}.projection-legend span{display:flex;gap:7px;align-items:center}.projection-legend i{display:inline-block;width:18px;height:8px;border-radius:2px;background:var(--accent,var(--green))}.projection-legend .cone-wide{opacity:.2}.projection-legend .cone-inner{opacity:.5}.projection-legend .median-line{height:3px}.projection-legend .expected-line{height:0;background:none;border-top:2px dashed var(--ink);border-radius:0}
.behaviour-fields{border:1px solid var(--line);border-radius:10px;padding:14px;background:var(--soft);margin:0;color:var(--ink)}.behaviour-fields summary{cursor:pointer;font-size:14px;font-weight:600}.behaviour-fields summary span{color:var(--muted);font-size:12px;font-weight:400;margin-left:8px}.behaviour-fields-inner{padding-top:16px;display:grid;gap:16px}.mistake-field{padding:0;border:0;min-width:0}.mistake-field legend{font-size:14px;font-weight:600;margin:0 0 10px}.mistake-field>label{display:flex;flex-direction:column;gap:7px;font-size:13px;margin-top:14px}.mistake-field input[name=customMistake]{padding:10px 12px;border-radius:8px;border:1px solid var(--line);background:var(--field,var(--surface));color:var(--ink);width:100%}
@media(max-width:1000px){.behaviour-hub{padding:20px}.behaviour-columns{grid-template-columns:1fr}.behaviour-stats,.behaviour-form{grid-template-columns:repeat(2,minmax(0,1fr))}.behaviour-card{padding:18px}}
@media(max-width:540px){.behaviour-hub{padding:16px;margin-top:14px}.behaviour-heading h2{font-size:21px}.behaviour-tabs{gap:4px}.behaviour-tabs button{padding:11px 8px;font-size:13px}.behaviour-filters{gap:10px}.behaviour-filters label:nth-child(3){flex-basis:100%}.behaviour-filters .button{width:100%}.behaviour-stat{padding:14px 12px}.behaviour-stat>strong{font-size:20px}.behaviour-card{padding:15px}.behaviour-inline-filters{width:100%}.behaviour-inline-filters label{flex:1;max-width:none}.behaviour-form{gap:14px 10px}.behaviour-form label{font-size:12px}.behaviour-hub input:not([type=range]),.behaviour-hub select{padding:10px 8px;font-size:16px}.projection-graph{padding:12px 6px}.projection-readout{display:grid;gap:4px;font-size:12px;min-height:115px}:is(#projection-svg,#comparison-svg) text{font-size:26px}.projection-legend{font-size:11px;gap:9px 12px}.behaviour-method{padding:12px}.behaviour-method .behaviour-form{grid-template-columns:1fr}.red-zone-table{min-width:450px}.behaviour-group{gap:10px}.behaviour-tabs{margin:18px 0}}
@media(prefers-reduced-motion:reduce){.behaviour-hub *, .behaviour-fields *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

#mistake-choices{max-height:190px;overflow:auto;padding:3px;margin:-3px;scrollbar-width:thin}

.comparison-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:22px 0 16px}.comparison-controls label{display:grid;grid-template-columns:1fr auto;gap:12px;font-size:14px;color:var(--ink)}.comparison-controls output{font:600 14px 'DM Mono',monospace;color:var(--accent-ink,var(--green-dark))}.comparison-controls input{grid-column:1/-1;width:100%;min-height:32px;accent-color:var(--accent,var(--green));cursor:pointer}.comparison-expected{fill:none;stroke:var(--accent,var(--green));stroke-width:3}.comparison-median{fill:none;stroke:var(--accent,var(--green));stroke-width:1.8;stroke-dasharray:3 4;opacity:.75}.projection-legend .comparison-median-key{height:0;background:none;border-top:2px dotted var(--accent,var(--green));border-radius:0}
@media(max-width:640px){.comparison-controls{grid-template-columns:1fr;gap:16px}.comparison-card .behaviour-card-heading .button{width:100%}}

#comparison-stats{grid-template-columns:repeat(4,minmax(0,1fr))}#comparison-stats .behaviour-stat{padding:16px 14px}#comparison-stats .behaviour-stat>strong{font-size:clamp(19px,1.8vw,24px)}
@media(max-width:1100px){#comparison-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
