/* Team Habits owns charts; shell, masthead, section typography and controls are shared. */
body[data-site-route="team-habits"] { overflow-x: clip; overflow-y: visible; overflow-anchor: none; }
#team-habits::before { display: none; }
#team-habits [hidden] { display: none !important; }
#team-habits .team-habits-guide-body { margin-top: 7px; padding: 14px 17px; border: 1px solid var(--line-subtle); border-radius: 12px; background: color-mix(in oklch, var(--bg-surface-1) 50%, transparent); color: var(--text-secondary); font-size: var(--type-secondary); line-height: 1.65; }
#team-habits .team-habits-guide-body p { margin: 0 0 9px; }
#team-habits .team-habits-guide-body p:last-child { margin-bottom: 0; }
#team-habits .tool-section-heading > div > :is(span, strong, small) { display: block; }
#team-habits .tool-section-heading small { margin-top: 5px; color: var(--text-muted); font-size: var(--type-secondary); line-height: 1.5; }
#team-habits .team-habits-query { margin-top: 12px; }
#team-habits .team-habits-query-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 15px; }
#team-habits .team-habits-query-meta strong { color: var(--text-primary); font-size: 13px; font-weight: 650; }
#team-habits .team-habits-query-meta small { color: var(--text-muted); font-size: 10px; }
#team-habits .team-habits-controls { display: grid; grid-template-columns: minmax(135px, 1fr) minmax(145px, 1fr) minmax(245px, 1.6fr); align-items: end; gap: 16px; margin-top: 8px; padding-bottom: 7px; border-bottom: 1px solid var(--line-subtle); }
#team-habits .team-habits-controls fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
#team-habits .team-habits-controls legend,
#team-habits .team-habits-controls label > span,
#team-habits .team-habits-overview-head label > span { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: var(--type-control); font-weight: 600; }
#team-habits .team-habits-controls label { display: block; min-width: 0; }
#team-habits .team-habits-map-field { grid-column: 1 / -1; display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 13px; min-height: 0; }
#team-habits .team-habits-map-field legend { float: left; width: 92px; margin: 0; color: var(--text-muted); font: 700 var(--type-section-index)/1.3 var(--font-tool-index); letter-spacing: .11em; }
#team-habits .team-habits-map-field .resource-map-choices { grid-column: 2; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
#team-habits .team-habits-map-field .resource-map-choices::-webkit-scrollbar { display: none; }
#team-habits .team-habits-distance-field .tool-direct-choices { gap: 5px; }
#team-habits .team-habits-distance-field .tool-direct-choices button { min-width: 0; padding-right: 9px; padding-left: 9px; }
#team-habits .team-habits-controls select,
#team-habits .team-habits-overview-head input { width: 100%; min-width: 0; min-height: var(--selection-control-height); padding: 0 10px; border: 0; border-bottom: 1px solid var(--line-default); border-radius: 0; background: transparent; color: var(--text-primary); font: 500 var(--type-control)/1.3 var(--font-tool-sans); }
#team-habits .team-habits-controls .observatory-select-trigger { width: 100%; min-width: 0; }
#team-habits .team-habits-r2-note { margin: 7px 0 0; color: var(--text-muted); font-size: 10px; line-height: 1.4; }
#team-habits .team-habits-overview-head input:focus { outline: 0; border-bottom-color: var(--color-brand-active); }

#team-habits .team-habits-observation-context { position: sticky; z-index: 45; top: var(--tool-global-header-height, 71px); display: grid; gap: 8px; margin: 8px 0 15px; padding: 9px 13px; border: 1px solid var(--line-default); border-left: 2px solid var(--color-brand-active); border-radius: 7px; background: color-mix(in oklch, var(--bg-deep) 94%, transparent); box-shadow: 0 12px 28px rgba(2, 12, 15, .20); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); overflow-anchor: none; }
#team-habits .team-habits-dock-context { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 2px 13px; }
#team-habits .team-habits-dock-context > span { color: var(--color-brand-highlight); font: 700 10px/1.3 var(--font-tool-index); letter-spacing: .12em; }
#team-habits .team-habits-dock-context > strong { color: var(--text-primary); font-size: 15px; font-weight: 620; line-height: 1.4; }
#team-habits .team-habits-dock-context > small { min-width: 0; color: var(--text-secondary); font-size: 11px; overflow-wrap: anywhere; white-space: normal; }
#team-habits .team-habits-dock-context p { grid-column: 1 / -1; min-width: 0; margin: 0; color: var(--text-muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
#team-habits #teamHabitsDockAnchor { overflow-anchor: none; }
#team-habits #teamHabitsState { margin: 18px 0; }

#team-habits .team-habits-overview { scroll-margin-top: 170px; }
#team-habits .team-habits-overview-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 0 6px; }
#team-habits .team-habits-overview-head label { flex: 0 0 min(230px, 35%); }
#team-habits .team-habits-benchmark { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 34px; margin: 8px 0 6px; padding: 8px 13px; border: 1px solid var(--line-subtle); border-radius: 8px; background: color-mix(in oklch, var(--bg-surface-1) 55%, transparent); }
#team-habits .team-habits-benchmark > div { display: grid; gap: 4px; }
#team-habits .team-habits-benchmark > div > span { color: var(--text-secondary); font-size: 11px; }
#team-habits .team-habits-benchmark strong { color: var(--text-primary); font-size: clamp(19px, 2vw, 25px); font-weight: 650; font-variant-numeric: tabular-nums; }
#team-habits .team-habits-benchmark > small { flex: 1 1 220px; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
#team-habits .team-habits-axis { display: flex; justify-content: flex-end; gap: 12px; margin: 6px 0 5px; color: var(--text-secondary); font-size: 12px; }
#team-habits .team-habits-axis span { color: var(--color-brand-highlight); }
#team-habits .team-habits-plot { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line-subtle); border-radius: 9px; background: color-mix(in oklch, var(--bg-surface-1) 30%, var(--bg-deep)); scrollbar-color: var(--line-default) transparent; }
#team-habits .th-landscape-board { min-width: 720px; padding: 18px 24px 22px 16px; }
#team-habits .th-landscape-ruler,
#team-habits .th-landscape-lane { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
#team-habits .th-landscape-ruler { align-items: end; padding-bottom: 11px; border-bottom: 1px solid var(--line-default); }
#team-habits .th-landscape-ruler > span { color: var(--text-muted); font-size: 10px; }
#team-habits .th-landscape-ruler > div { position: relative; height: 18px; }
#team-habits .th-landscape-ruler > div > span { position: absolute; top: 0; color: var(--text-secondary); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateX(-50%); }
#team-habits .th-landscape-lane { align-items: stretch; border-bottom: 1px solid var(--line-subtle); }
#team-habits .th-landscape-lane:last-child { border-bottom: 0; }
#team-habits .th-landscape-region { display: flex; flex-direction: column; justify-content: center; gap: 5px; color: var(--text-primary); }
#team-habits .th-landscape-region strong { font: 700 13px var(--font-tool-index); }
#team-habits .th-landscape-region small { color: var(--text-muted); font-size: 10px; }
#team-habits .th-landscape-track { position: relative; min-height: 145px; }
#team-habits .th-landscape-gridline,
#team-habits .th-landscape-band,
#team-habits .th-landscape-typical { position: absolute; top: 0; bottom: 0; pointer-events: none; }
#team-habits .th-landscape-gridline { width: 1px; background: color-mix(in oklch, var(--line-subtle) 70%, transparent); }
#team-habits .th-landscape-band { background: rgba(159, 169, 172, .12); }
#team-habits .th-landscape-typical { z-index: 1; width: 2px; background: rgba(178, 191, 193, .66); }
#team-habits .th-landscape-point { position: absolute; z-index: 3; display: block; width: 16px; height: 16px; padding: 0; border: 2px solid var(--bg-deep); border-radius: 50%; background: var(--th-team-color); box-shadow: 0 0 0 1px var(--th-team-color); cursor: pointer; transform: translate(-50%, -50%); transition: opacity .18s, transform .18s, box-shadow .18s; }
#team-habits .th-landscape-point:hover,
#team-habits .th-landscape-point:focus-visible { z-index: 8; transform: translate(-50%, -50%) scale(1.35); box-shadow: 0 0 0 3px var(--th-team-color); outline: 0; }
#team-habits .th-landscape-point.is-pinned { z-index: 6; width: 20px; height: 20px; box-shadow: 0 0 0 2px var(--th-team-color); }
#team-habits .th-landscape-point.is-low-sample { border: 2px solid #92a5aa; background: var(--bg-deep); opacity: .72; }
#team-habits .th-landscape-point.is-pinned.is-low-sample { border-color: var(--th-team-color); }
#team-habits .th-landscape-point.is-match { z-index: 7; background: var(--color-brand-highlight); box-shadow: 0 0 0 4px color-mix(in oklch, var(--color-brand-highlight) 35%, transparent); }
#team-habits .th-landscape-point.is-dimmed { opacity: .20; }
#team-habits .th-landscape-point.is-top-five { width: 23px; height: 23px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#team-habits .th-landscape-point.is-top-five::before { content: ""; position: absolute; inset: 4px; border: 1px solid #f0d3a0; background: #d5ad71; box-shadow: 0 0 0 1px rgba(213, 173, 113, .35); transform: rotate(45deg); }
#team-habits .th-landscape-point.is-top-five.is-pinned::before { box-shadow: 0 0 0 3px var(--th-team-color); }
#team-habits .th-landscape-point.is-top-five.is-low-sample { opacity: .8; }
#team-habits .th-landscape-point.is-top-five.is-low-sample::before { background: var(--bg-deep); }
#team-habits .th-landscape-point.is-top-five:hover,
#team-habits .th-landscape-point.is-top-five:focus-visible { box-shadow: none; }
#team-habits .th-landscape-point.is-top-five.is-dimmed { opacity: .20; }
#team-habits .th-landscape-point-label { position: absolute; bottom: 21px; left: 50%; display: none; padding: 4px 6px; border-radius: 3px; background: var(--bg-surface-1); color: var(--text-primary); font: 600 10px var(--font-tool-sans); white-space: nowrap; pointer-events: none; transform: translateX(-50%); }
#team-habits .th-landscape-point:is(.is-pinned, .is-match, :hover, :focus-visible) .th-landscape-point-label { display: block; }
#team-habits .team-habits-plot-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 17px; margin: 10px 0 0; color: var(--text-muted); font-size: 10px; }
#team-habits .th-foot-diamond { display: inline-block; flex: none; width: 10px; height: 10px; margin: 0 -10px 0 2px; border: 1px solid #f0d3a0; background: #d5ad71; transform: rotate(45deg); }
#team-habits .th-foot-dot { display: inline-block; width: 8px; height: 8px; margin-right: -12px; border-radius: 50%; background: #a9bac0; }
#team-habits .th-foot-dot.is-quiet { border: 1px solid #92a5aa; background: transparent; }
#team-habits .th-foot-band { display: inline-block; width: 17px; height: 9px; margin-right: -12px; background: rgba(159, 169, 172, .3); }
#team-habits .team-habits-results-source { margin: 10px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.55; }
#team-habits .th-departure-row { display: grid; grid-template-columns: minmax(150px, 185px) minmax(0, 1fr) minmax(110px, 148px); align-items: center; gap: 16px; width: 100%; min-height: 57px; padding: 7px 7px 7px 0; border: 0; border-bottom: 1px solid var(--line-subtle); background: transparent; color: var(--text-primary); font: inherit; text-align: left; }
#team-habits .th-row-name { display: grid; min-width: 0; gap: 3px; }
#team-habits .th-row-name strong { overflow: hidden; font-size: 13px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
#team-habits .th-row-name small { color: var(--text-muted); font-size: 10px; }
#team-habits .th-row-track { position: relative; display: block; min-width: 0; height: 32px; }
#team-habits .th-row-track::before { content: ""; position: absolute; top: 15px; right: 0; left: 0; height: 1px; background: var(--line-subtle); }
#team-habits .th-reference-band { position: absolute; z-index: 1; top: 5px; bottom: 4px; background: rgba(145, 158, 162, .17); }
#team-habits .th-reference-line { position: absolute; z-index: 2; top: 2px; bottom: 1px; width: 1px; background: #a5afb1; }
#team-habits .th-team-dot,
#team-habits .th-colored-dot { position: absolute; z-index: 4; top: 9px; width: 12px; height: 12px; border: 2px solid var(--bg-deep); border-radius: 50%; background: var(--th-team-color, #8db8c3); transform: translateX(-50%); box-shadow: 0 0 0 1px var(--th-team-color, #8db8c3); }
#team-habits .th-raw-dot { position: absolute; z-index: 3; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: #91a6a9; transform: translateX(-50%); }
#team-habits .th-row-value { display: grid; gap: 2px; min-width: 0; }
#team-habits .th-row-value strong { color: var(--text-primary); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
#team-habits .th-row-value small { overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
#team-habits .is-raw .th-row-value strong { color: var(--text-secondary); font-weight: 500; }

.team-habits-tooltip { position: fixed; z-index: 10040; width: 260px; padding: 13px 15px; border: 1px solid var(--line-default); border-radius: 9px; background: var(--bg-surface-1); box-shadow: 0 14px 35px rgba(2, 11, 14, .34); color: var(--text-primary); pointer-events: none; font-family: var(--font-tool-sans); }
.team-habits-tooltip[hidden] { display: none; }
.team-habits-tooltip > strong { display: block; margin-bottom: 3px; font-size: 15px; }
.team-habits-tooltip > small { display: block; margin-bottom: 12px; color: var(--text-muted); font-size: 11px; }
.team-habits-tooltip > div { display: flex; justify-content: space-between; gap: 10px; margin: 4px 0; font-size: 11px; }
.team-habits-tooltip > div span { color: var(--text-muted); }
.team-habits-tooltip > div b { font-weight: 600; }
.team-habits-tooltip p { margin: 11px 0 0; padding-top: 10px; border-top: 1px solid var(--line-subtle); color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
.team-habits-tooltip p span { color: var(--text-muted); }
.team-habits-tooltip .th-detail-tooltip { margin: 0; padding: 0; border: 0; line-height: 1.65; }
.team-habits-tooltip .th-tooltip-result { border-top-color: var(--line-default); }
.team-habits-tooltip .th-tooltip-result small { color: var(--text-muted); }

#team-habits .team-habits-tray { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 8px; border-top: 1px solid var(--line-subtle); }
#team-habits .team-habits-tray-selection { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 11px; min-width: 0; }
#team-habits .team-habits-tray-selection > span { flex: none; color: var(--text-muted); font: 700 10px var(--font-tool-index); letter-spacing: .11em; }
#team-habits .team-habits-tray small { flex-basis: 100%; color: var(--text-muted); font-size: 10px; }
#team-habits .team-habits-pins { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
#team-habits .team-habits-pins button { padding: 5px 8px; border: 1px solid var(--line-default); border-left: 3px solid var(--th-team-color); background: var(--state-hover-surface); color: var(--text-primary); font: 600 11px var(--font-tool-sans); cursor: pointer; }
#team-habits .team-habits-pins button span { margin-left: 6px; color: var(--text-muted); }
#team-habits .team-habits-tray .team-habits-tray-actions { display: flex; flex: none; align-items: center; gap: 8px; }
#team-habits #teamHabitsClear,
#team-habits #teamHabitsReturn { min-height: 34px; padding: 0 10px; border: 1px solid var(--line-default); border-radius: 4px; background: transparent; color: var(--text-secondary); font: 600 11px var(--font-tool-sans); cursor: pointer; }
#team-habits #teamHabitsClear:hover,
#team-habits #teamHabitsReturn:hover { color: var(--text-primary); border-color: var(--line-strong); }
#team-habits #teamHabitsOpenFocus { flex: none; min-height: 38px; padding: 0 15px; border: 1px solid var(--color-brand-highlight); border-radius: 5px; background: color-mix(in oklch, var(--color-brand-active) 25%, transparent); color: var(--text-primary); font: 600 12px var(--font-tool-sans); cursor: pointer; }
#team-habits #teamHabitsOpenFocus:hover { background: color-mix(in oklch, var(--color-brand-active) 40%, transparent); }
body[data-site-route="team-habits"] > #teamHabitsDock.is-compact { position: fixed; z-index: 70; top: var(--tool-global-header-height, 71px); display: grid; gap: 5px; max-height: calc(100dvh - var(--tool-global-header-height, 71px) - 8px); margin: 0; padding: 6px 11px; overflow-y: auto; border: 1px solid var(--line-default); border-left: 2px solid var(--color-brand-active); border-radius: 0 0 6px 6px; background: color-mix(in oklch, var(--bg-deep) 96%, transparent); box-shadow: 0 10px 22px rgba(2, 12, 15, .25); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--text-primary); font-family: var(--font-tool-sans); }
body[data-site-route="team-habits"] > #teamHabitsDock [hidden] { display: none !important; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 2px 13px; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context > span { color: var(--color-brand-highlight); font: 700 10px/1.3 var(--font-tool-index); letter-spacing: .12em; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context > strong { color: var(--text-primary); font-size: 13px; font-weight: 620; line-height: 1.3; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context > small { min-width: 0; color: var(--text-secondary); font-size: 11px; overflow-wrap: anywhere; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context p { grid-column: 1 / -1; margin: 0; color: var(--text-muted); font-size: 11px; line-height: 1.35; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-tray { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding-top: 4px; border-top: 1px solid var(--line-subtle); }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-tray-selection { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-tray-selection > span { flex: none; color: var(--text-muted); font: 700 10px var(--font-tool-index); letter-spacing: .11em; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-tray small { display: none; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-pins { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-pins::-webkit-scrollbar { display: none; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-pins button { flex: none; padding: 3px 5px; border: 1px solid var(--line-default); border-left: 2px solid var(--th-team-color); background: var(--state-hover-surface); color: var(--text-primary); font: 600 10px var(--font-tool-sans); white-space: nowrap; cursor: pointer; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-pins button span { margin-left: 5px; color: var(--text-muted); }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-tray-actions { display: flex; flex: none; gap: 4px; }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-tray-actions button { min-height: 27px; padding: 0 7px; border: 1px solid var(--line-default); border-radius: 4px; background: transparent; color: var(--text-secondary); font: 600 10px var(--font-tool-sans); white-space: nowrap; cursor: pointer; }
body[data-site-route="team-habits"] > #teamHabitsDock #teamHabitsOpenFocus { border-color: var(--color-brand-highlight); color: var(--text-primary); background: color-mix(in oklch, var(--color-brand-active) 25%, transparent); }
body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-tray-actions button:hover { color: var(--text-primary); border-color: var(--line-strong); }

#team-habits .team-habits-focus { scroll-margin-top: 195px; }
#team-habits .team-habits-focus-head { margin-top: 30px; }
#team-habits .team-habits-focus-summary { margin-top: 15px; overflow-x: auto; border-top: 1px solid var(--line-default); border-bottom: 1px solid var(--line-default); }
#team-habits .th-summary-table { min-width: 970px; background: var(--bg-deep); }
#team-habits .th-summary-head,
#team-habits .th-summary-row { display: grid; grid-template-columns: minmax(160px, 1.25fr) repeat(5, minmax(125px, 1fr)); align-items: center; gap: 14px; padding: 9px 11px; }
#team-habits .th-summary-head { color: var(--text-muted); font: 700 10px var(--font-tool-index); letter-spacing: .04em; }
#team-habits .th-summary-row { min-height: 53px; border-top: 1px solid var(--line-subtle); color: var(--text-secondary); font-size: 11px; line-height: 1.35; }
#team-habits .th-summary-head > :first-child,
#team-habits .th-summary-row > :first-child { position: sticky; z-index: 2; left: 0; background: var(--bg-deep); }
#team-habits .th-summary-team { display: grid; gap: 4px; min-width: 0; }
#team-habits .th-summary-team-name { color: var(--text-primary); font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
#team-habits .th-summary-team small { color: var(--text-muted); font-size: 10px; }
#team-habits .th-summary-row > span { min-width: 0; }
#team-habits .th-team-key { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--text-primary); font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
#team-habits .th-team-key i { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--th-team-color); }
#team-habits .team-habits-focus-panel { margin-top: 34px; padding-top: 17px; border-top: 1px solid var(--line-default); }
#team-habits .team-habits-focus-panel > .tool-section-heading { margin-bottom: 17px; }
#team-habits .th-panel-benchmark { margin: 0 0 13px; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
#team-habits .th-panel-note { margin: 10px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
#team-habits .th-mini-axis { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 5px 175px; color: var(--text-muted); font-size: 11px; }
#team-habits .th-mini-rows,
#team-habits .th-exposure-rows { border-top: 1px solid var(--line-subtle); }
#team-habits .th-mini-rows .th-departure-row { grid-template-columns: minmax(120px, 155px) minmax(0, 1fr) minmax(105px, 180px); }

#team-habits .th-rotation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
#team-habits .th-rotation-stage { min-width: 0; padding: 13px 12px; border: 1px solid var(--line-subtle); background: color-mix(in oklch, var(--bg-surface-1) 24%, transparent); }
#team-habits .th-stage-heading { display: grid; gap: 5px; color: var(--text-secondary); font-size: 11px; }
#team-habits .th-stage-heading strong { color: var(--text-primary); font-size: 15px; }
#team-habits .th-rotation-stage > p { min-height: 32px; margin: 8px 0; color: var(--text-muted); font-size: 10px; line-height: 1.45; }
#team-habits .th-stage-team { display: grid; grid-template-columns: minmax(65px, 1fr) auto; align-items: center; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--line-subtle); }
#team-habits .th-stage-team > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#team-habits .th-stage-team .th-team-key { font-size: 11px; }
#team-habits .th-stage-team strong { color: var(--text-primary); font-size: 11px; font-weight: 600; text-align: right; }
#team-habits .th-stage-team > small { grid-column: 1 / -1; grid-row: 3; color: var(--text-muted); font-size: 10px; }
#team-habits .th-stage-track { position: relative; height: 23px; }
#team-habits .th-stage-team .th-stage-track { grid-column: 1 / -1; grid-row: 2; }
#team-habits .th-stage-track::before { content: ""; position: absolute; top: 11px; right: 0; left: 0; height: 1px; background: var(--line-default); }
#team-habits .th-stage-track .th-reference-band { top: 3px; bottom: 2px; }
#team-habits .th-stage-track .th-reference-line { top: 1px; bottom: 1px; }
#team-habits .th-stage-track .th-colored-dot { top: 6px; }
#team-habits .th-stage-track .th-raw-dot { top: 9px; }
#team-habits .th-zero-line { position: absolute; z-index: 2; top: 2px; bottom: 2px; border-left: 1px dashed var(--text-muted); opacity: .5; }

#team-habits .th-position-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 13px; color: var(--text-secondary); font-size: 11px; }
#team-habits .th-position-legend > span { display: inline-flex; align-items: center; gap: 6px; }
#team-habits .th-position-legend i { display: block; width: 13px; height: 8px; }
#team-habits .is-position-0 { background: #91b3b4; }
#team-habits .is-position-1 { background: #a8b5a1; }
#team-habits .is-position-2 { background: #bca991; }
#team-habits .th-position-rows { border-top: 1px solid var(--line-subtle); }
#team-habits .th-position-row { display: grid; grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) minmax(160px, 260px); align-items: center; gap: 14px; min-height: 47px; border-bottom: 1px solid var(--line-subtle); }
#team-habits .th-position-row.is-reference { color: var(--text-secondary); font-size: 11px; }
#team-habits .th-position-row small { color: var(--text-muted); font-size: 10px; line-height: 1.45; }
#team-habits .th-position-bar { display: flex; width: 100%; height: 16px; overflow: hidden; background: var(--bg-surface-1); }
#team-habits .th-position-bar i { display: block; height: 100%; }
#team-habits .th-position-row.is-low-sample { padding: 10px 0; }
#team-habits .th-position-raw { display: grid; gap: 6px; }
#team-habits .th-position-raw > div { display: grid; grid-template-columns: 95px minmax(0, 1fr); align-items: center; gap: 7px; }
#team-habits .th-position-raw small { color: var(--text-muted); font-size: 10px; }
#team-habits .th-position-raw .th-position-bar { height: 9px; }
#team-habits .th-empty-bar { color: var(--text-muted); font-size: 11px; }

#team-habits .th-scatter-layout { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 10px; max-width: 720px; }
#team-habits .th-scatter-y { display: flex; flex-direction: column; justify-content: space-between; color: var(--text-secondary); font-size: 11px; }
#team-habits .th-scatter-y small { color: var(--text-muted); font-size: 10px; }
#team-habits .th-scatter-plot { position: relative; height: 315px; border: 1px solid var(--line-default); background: repeating-linear-gradient(to right, transparent 0, transparent calc(25% - 1px), var(--line-subtle) 25%), repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), var(--line-subtle) 25%); }
#team-habits .th-scatter-quadrant { position: absolute; z-index: 1; max-width: 42%; color: var(--text-muted); font-size: 10px; pointer-events: none; }
#team-habits .th-scatter-quadrant.is-top-left { top: 12px; left: 12px; }
#team-habits .th-scatter-quadrant.is-top-right { top: 12px; right: 12px; text-align: right; }
#team-habits .th-scatter-quadrant.is-bottom-left { bottom: 12px; left: 12px; }
#team-habits .th-scatter-quadrant.is-bottom-right { right: 12px; bottom: 12px; text-align: right; }
#team-habits .th-scatter-band { position: absolute; background: rgba(151, 159, 164, .12); }
#team-habits .th-scatter-x-line,
#team-habits .th-scatter-y-line { position: absolute; background: #a3adb0; }
#team-habits .th-scatter-x-line { top: 0; bottom: 0; width: 1px; }
#team-habits .th-scatter-y-line { right: 0; left: 0; height: 1px; }
#team-habits .th-scatter-dot { position: absolute; z-index: 3; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--bg-deep); border-radius: 50%; background: var(--th-team-color); color: var(--bg-deep); font: 700 10px var(--font-tool-index); cursor: help; transform: translate(-50%, -50%); }
#team-habits .th-scatter-dot:focus-visible { outline: 2px solid var(--state-focus-ring); outline-offset: 2px; }
#team-habits .th-scatter-dot.is-raw { width: 9px; height: 9px; border-width: 1px; opacity: .82; }
#team-habits .th-scatter-axis { display: flex; justify-content: space-between; max-width: 720px; margin: 7px 0 0 115px; color: var(--text-muted); font-size: 11px; }
#team-habits .th-scatter-values { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 17px; }
#team-habits .th-scatter-values > div { display: flex; flex-direction: column; gap: 3px; color: var(--text-secondary); font-size: 11px; }
#team-habits .th-scatter-values .th-team-key { font-size: 11px; }

#team-habits .th-exposure-row { display: grid; grid-template-columns: minmax(120px, 155px) minmax(0, 1fr) minmax(105px, 180px); align-items: center; gap: 16px; min-height: 50px; border-bottom: 1px solid var(--line-subtle); }
#team-habits .th-exposure-row > span:last-child { display: grid; gap: 3px; color: var(--text-primary); font-size: 12px; font-weight: 600; }
#team-habits .th-exposure-row > span:last-child small { color: var(--text-muted); font-size: 10px; font-weight: 400; }
#team-habits .th-replay-team { display: grid; grid-template-columns: minmax(125px, 180px) minmax(130px, 190px) minmax(0, 1fr); gap: 12px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line-subtle); }
#team-habits .th-replay-team > span:nth-child(2) { color: var(--text-muted); font-size: 11px; }
#team-habits .th-replay-team > div { display: flex; flex-wrap: wrap; gap: 7px 16px; }
#team-habits .th-replay-team a { color: var(--color-brand-highlight); font-size: 11px; text-decoration: none; }
#team-habits .th-replay-team a:hover { text-decoration: underline; }
#team-habits .team-habits-method { margin: 32px 0 0; padding-top: 14px; border-top: 1px solid var(--line-subtle); }

body[data-site-route="toolbox"] #toolbox .toolbox-preview-stage,
body[data-site-route="toolbox"] #toolbox .toolbox-preview-inner { min-height: 640px; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits { margin: 26px 0 18px; padding-top: 18px; border-top: 1px solid var(--line-default); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-title strong { color: var(--text-primary); font-size: 13px; font-weight: 620; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-title small { color: var(--text-muted); font-size: 10px; white-space: nowrap; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-title small span { color: var(--color-brand-active); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-chart { margin: 17px 8px 0; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-ticks { position: relative; height: 19px; border-bottom: 1px solid var(--line-subtle); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-ticks span { position: absolute; bottom: 5px; color: var(--text-muted); font: 10px/1 var(--font-tool-index); font-variant-numeric: tabular-nums; transform: translateX(-50%); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-ticks span:first-child { transform: none; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-plot { position: relative; height: 184px; border-bottom: 1px solid var(--line-subtle); background: color-mix(in oklch, var(--bg-deep) 36%, transparent); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-plot > i { position: absolute; display: block; pointer-events: none; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-band { z-index: 0; inset-block: 0; background: rgba(159, 169, 172, .10); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-gridline { z-index: 1; top: 0; bottom: 0; width: 1px; background: color-mix(in oklch, var(--line-subtle) 70%, transparent); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-typical { z-index: 2; top: 0; bottom: 0; width: 1px; background: rgba(178, 191, 193, .62); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-point { z-index: 3; width: 11px; height: 11px; border: 1.5px solid #a9bac0; border-radius: 50%; background: var(--bg-deep); transform: translate(-50%, -50%); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-point.is-low-sample { opacity: .5; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-point.is-featured { z-index: 5; width: 14px; height: 14px; border: 2px solid var(--bg-deep); background: var(--color-brand-highlight); box-shadow: 0 0 0 2px var(--color-brand-highlight); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-point.is-top-five { z-index: 4; width: 12px; height: 12px; border: 1px solid #f0d3a0; border-radius: 0; background: #d5ad71; transform: translate(-50%, -50%) rotate(45deg); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 11px 8px 0; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 10px; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-legend i { display: inline-block; flex: none; width: 9px; height: 9px; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-legend .is-range { width: 15px; background: rgba(159, 169, 172, .35); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-legend .is-diamond { width: 8px; height: 8px; border: 1px solid #f0d3a0; background: #d5ad71; transform: rotate(45deg); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-legend .is-circle { border: 1px solid #a9bac0; border-radius: 50%; background: var(--bg-deep); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-feature { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; padding: 11px 0 0 12px; border-top: 1px solid var(--line-subtle); border-left: 2px solid var(--color-brand-highlight); }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-feature span { color: var(--text-muted); font: 700 10px/1.3 var(--font-tool-index); letter-spacing: .06em; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-feature strong { color: var(--text-primary); font-size: 19px; font-weight: 650; line-height: 1.25; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-feature small { color: var(--text-secondary); font-size: 11px; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-foot > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-foot strong { color: var(--text-primary); font-size: 12px; font-weight: 620; }
body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-foot small { max-width: none; }
@media (min-width: 761px) and (max-width: 900px) {
  body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-foot { align-items: stretch; flex-direction: column; }
  body[data-site-route="toolbox"] #toolbox .toolbox-preview-habits-foot a { align-self: flex-end; }
}

@media (max-width: 1280px) {
  #team-habits .team-habits-observation-context { top: calc(var(--tool-global-header-height, 71px) + 48px); }
  body[data-site-route="team-habits"] > #teamHabitsDock.is-compact { top: calc(var(--tool-global-header-height, 71px) + 48px); max-height: calc(100dvh - var(--tool-global-header-height, 71px) - 56px); }
  #team-habits .team-habits-overview { scroll-margin-top: 230px; }
  #team-habits .team-habits-focus { scroll-margin-top: 240px; }
}
@media (max-width: 1100px) {
  #team-habits .team-habits-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #team-habits .team-habits-dock-context { grid-template-columns: minmax(0, 1fr) auto; }
  #team-habits .team-habits-dock-context > span { grid-column: 1 / -1; }
  #team-habits .team-habits-dock-context p { grid-column: 1 / -1; }
  body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context { grid-template-columns: minmax(0, 1fr) auto; }
  body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context > span { grid-column: 1 / -1; }
  #team-habits .th-rotation-grid { grid-template-columns: 1fr; }
  #team-habits .th-stage-team { grid-template-columns: minmax(100px, 1fr) auto; }
}
@media (max-width: 720px) {
  #team-habits .team-habits-observation-context { top: 162px; gap: 6px; }
  #team-habits .team-habits-dock-context { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  #team-habits .team-habits-dock-context > span,
  #team-habits .team-habits-dock-context p { grid-column: 1; }
  body[data-site-route="team-habits"] > #teamHabitsDock.is-compact { top: 162px; max-height: calc(100dvh - 170px); padding: 5px 7px; }
  body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context > span,
  body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context p { grid-column: 1; }
  body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context > small,
  body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-dock-context p { font-size: 10px; }
  body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-tray { flex-wrap: wrap; gap: 4px; }
  body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-tray-selection { flex-basis: 100%; }
  body[data-site-route="team-habits"] > #teamHabitsDock .team-habits-tray-actions { margin-left: auto; }
  #team-habits .team-habits-pins { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  #team-habits .team-habits-pins::-webkit-scrollbar { display: none; }
  #team-habits .team-habits-pins button { flex: none; }
  #team-habits .team-habits-overview { scroll-margin-top: 290px; }
  #team-habits .team-habits-focus { scroll-margin-top: 290px; }
  #team-habits .team-habits-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 10px; }
  #team-habits .team-habits-map-field,
  #team-habits .team-habits-distance-field { grid-column: 1 / -1; }
  #team-habits .team-habits-query-meta small { display: none; }
  #team-habits .team-habits-overview-head { align-items: start; flex-direction: column; }
  #team-habits .team-habits-overview-head label { flex: auto; width: min(100%, 280px); }
  #team-habits .team-habits-axis { justify-content: center; gap: 6px; font-size: 10px; }
  #team-habits .team-habits-benchmark { gap: 14px 25px; }
  #team-habits .team-habits-benchmark > small { flex-basis: 100%; }
  #team-habits .th-departure-row { grid-template-columns: minmax(0, 1fr) 90px; gap: 6px 9px; }
  #team-habits .th-row-name { grid-column: 1; }
  #team-habits .th-row-track { grid-column: 1 / -1; grid-row: 2; }
  #team-habits .th-row-value { grid-column: 2; grid-row: 1; text-align: right; }
  #team-habits .team-habits-observation-context:not(.is-compact) .team-habits-tray { align-items: stretch; flex-direction: column; }
  #team-habits .team-habits-tray .team-habits-tray-actions { align-self: end; }
  #team-habits .th-mini-axis { margin-left: 0; }
  #team-habits .th-mini-rows .th-departure-row { grid-template-columns: minmax(0, 1fr) 90px; }
  #team-habits .th-position-row { grid-template-columns: minmax(0, 1fr) minmax(110px, 2fr); gap: 6px 10px; padding: 10px 0; }
  #team-habits .th-position-row small { grid-column: 2; }
  #team-habits .th-scatter-layout { grid-template-columns: 62px minmax(0, 1fr); }
  #team-habits .th-scatter-axis { margin-left: 72px; }
  #team-habits .th-scatter-plot { height: 260px; }
  #team-habits .th-exposure-row { grid-template-columns: minmax(0, 1fr) 90px; gap: 5px 10px; padding: 10px 0; }
  #team-habits .th-exposure-row .th-row-track { grid-column: 1 / -1; grid-row: 2; }
  #team-habits .th-replay-team { grid-template-columns: 1fr; gap: 6px; }
}
