/* AGRI GX TERMINAL v11: three-goal guided cockpit. Legacy hook: .cockpit-guide-main */
:root {
  --cockpit-sidebar: 292px;
  --cockpit-guide: 178px;
  --cockpit-ink: #122a20;
  --cockpit-green: #174c38;
  --cockpit-green-dark: #0d3426;
  --cockpit-lime: #d9fa7b;
  --cockpit-line: #d8e4d9;
  --cockpit-soft: #f1f6ef;
  --cockpit-muted: #5f756a;
  --cockpit-warn: #9e641c;
}

body.cockpit-mode { --sidebar: var(--cockpit-sidebar); overflow: hidden; background: #f7faf6; color: var(--cockpit-ink); }
body.cockpit-mode .app-shell { height: 100dvh; overflow: hidden; }
body.cockpit-mode .sidebar { width: var(--cockpit-sidebar); }
body.cockpit-mode .sidebar-scroll { padding-bottom: 16px; }
body.cockpit-mode .workspace {
  height: calc(100dvh - var(--topbar) - 4px);
  display: flex;
  flex-direction: column;
  max-width: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 30px;
  scrollbar-gutter: stable;
}
body.cockpit-mode .context-bar { display: none !important; }
body.cockpit-mode .persona-menu,
body.cockpit-mode .sidebar-more,
body.cockpit-mode .sidebar-learning,
body.cockpit-mode .right-help-menu { display: none !important; }
body.cockpit-mode #onboardingDialog[open] { z-index: 180; }
body.cockpit-mode #journeyStamps { display: none !important; }
body.cockpit-mode .journey-leaf-pop { display: none !important; }
body.cockpit-mode #toast { right: 20px; bottom: calc(var(--cockpit-footer-offset, 0px) + var(--cockpit-guide) + 12px); left: auto; display: block; max-width: min(430px, calc(100vw - var(--cockpit-sidebar) - 44px)); }

/* Keep the legal footer as the final item in the scrolling document.  The
   fixed guide needs breathing room before the footer, never after it. */
body.cockpit-mode .module-view:not([hidden]) {
  flex: 1 0 auto;
  padding-bottom: calc(var(--cockpit-guide) + 40px);
}
body.cockpit-mode .public-site-footer {
  flex: 0 0 auto;
  margin-top: auto;
}

/* Left process menu */
.cockpit-process { display: block; width: 100%; min-width: 0; padding: 5px 9px 18px; }
.cockpit-process > header { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 7px 12px; border-bottom: 1px solid #2a4b3c; }
.cockpit-process > header span { color: #9eb2a8; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.cockpit-process > header b { color: #fff; font-size: 14px; }
.cockpit-process > header small { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--cockpit-lime); font-size: 11px; font-weight: 900; }
.cockpit-process-group { margin-top: 9px; border: 1px solid transparent; border-radius: 10px; }
.cockpit-process-group[open] { background: rgba(255,255,255,.035); border-color: rgba(216,255,114,.13); }
.cockpit-process-group summary { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 6px; color: #9bb0a4; cursor: pointer; list-style: none; font-size: 10px; font-weight: 900; letter-spacing: .06em; }
.cockpit-process-group summary::-webkit-details-marker { display: none; }
.cockpit-process-group summary i { color: var(--cockpit-lime); font-style: normal; font-size: 15px; }
.cockpit-process-group[open] summary i { transform: rotate(45deg); }
.cockpit-process-group > div { display: grid; gap: 2px; padding: 0 4px 5px; }
.cockpit-step { width: 100%; min-height: 40px; display: grid; grid-template-columns: 29px 1fr 20px; align-items: center; gap: 8px; padding: 5px 6px; color: #c2d2c9; background: transparent; border: 0; border-radius: 8px; text-align: left; cursor: pointer; }
.cockpit-step:hover, .cockpit-step:focus-visible { color: #fff; background: #1a4735; outline: 3px solid rgba(217,250,123,.3); outline-offset: 1px; }
.cockpit-step.is-current { color: #102d22; background: var(--cockpit-lime); }
.cockpit-step.is-done:not(.is-current) { color: #e3efe5; }
.cockpit-step-no { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid currentColor; border-radius: 8px; font-size: 10px; font-weight: 950; }
.cockpit-step b { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-step-status { color: currentColor; font-size: 14px; font-style: normal; text-align: center; }
.cockpit-process-learn { margin-top: 13px; padding-top: 11px; border-top: 1px solid #2a4b3c; }
.cockpit-process-learn p { margin: 0 7px 6px; color: #869d91; font-size: 10px; font-weight: 900; }
.cockpit-optional-link { color: #dbeae0; text-decoration: none; }

/* Shared condition strip */
.cockpit-conditions { position: sticky; z-index: 4; top: 0; display: flex; align-items: center; gap: 16px; margin: 0 -30px; padding: 12px 30px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--cockpit-line); box-shadow: 0 4px 18px rgba(25,61,42,.05); backdrop-filter: blur(13px); }
.cockpit-conditions-title { min-width: 144px; display: grid; gap: 2px; }
.cockpit-conditions-title span { font-size: 13px; font-weight: 950; }
.cockpit-conditions-title small { color: var(--cockpit-muted); font-size: 10px; }
.cockpit-condition-chips { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.cockpit-condition-chips > span { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 9px; color: #3e5b4d; background: var(--cockpit-soft); border: 1px solid #dce7dc; border-radius: 999px; font-size: 11px; }
.cockpit-condition-chips b { color: #6d8177; font-size: 10px; }
.cockpit-condition-chips small { color: #748a7d; }
.cockpit-condition-goal { color: var(--cockpit-green) !important; background: #eef8cf !important; border-color: #d7ec9a !important; }
.cockpit-unset { color: #9a6b2a; font-weight: 800; }
.cockpit-condition-edit { flex: 0 0 auto; min-height: 34px; padding: 6px 12px; color: var(--cockpit-green); background: #fff; border: 1px solid #a9c3ad; border-radius: 9px; font-size: 11px; font-weight: 900; cursor: pointer; }
.cockpit-condition-edit:hover, .cockpit-condition-edit:focus-visible { outline: 3px solid rgba(217,250,123,.65); }

/* Home and guided condition form */
body.cockpit-mode .module-view { padding-top: 20px; }
body.cockpit-mode .cockpit-legacy-overview { display: none !important; }
body.cockpit-mode .module-view[data-view-panel="guide"] > :not(#cockpitGuidePage) { display: none !important; }
.cockpit-home { min-height: min(670px, calc(100dvh - var(--topbar) - var(--cockpit-guide) - 112px)); display: grid; align-content: center; gap: 20px; }
.cockpit-home-hero { max-width: 820px; }
.cockpit-kicker { display: block; color: #5a796b; font-size: 10px; font-weight: 950; letter-spacing: .13em; }
.cockpit-home-hero h1, .cockpit-wizard-head h1 { margin: 8px 0 8px; color: var(--cockpit-ink); font-size: clamp(32px, 4vw, 58px); line-height: 1.05; letter-spacing: -.045em; }
.cockpit-home-hero p, .cockpit-wizard-head p { max-width: 650px; margin: 0; color: var(--cockpit-muted); font-size: 15px; line-height: 1.65; }
.cockpit-home-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; padding: 13px 15px; color: #3c5f4b; background: #eef7e7; border-left: 4px solid #a6ca76; border-radius: 9px; font-size: 12px; }
.cockpit-home-note b { color: var(--cockpit-green); }
.cockpit-goal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.cockpit-goal-card { min-height: 205px; display: grid; grid-template-rows: auto 1fr auto; gap: 16px; padding: 20px; color: var(--cockpit-ink); background: #fff; border: 1px solid var(--cockpit-line); border-radius: 17px; box-shadow: 0 10px 30px rgba(22,66,43,.07); text-align: left; cursor: pointer; }
.cockpit-goal-card:hover, .cockpit-goal-card:focus-visible { border-color: #76a174; outline: 4px solid rgba(217,250,123,.5); transform: translateY(-2px); }
.cockpit-goal-icon { display: grid; width: 48px; height: 48px; place-items: center; background: #edf6e8; border-radius: 14px; font-size: 25px; }
.cockpit-goal-card > span:nth-child(2) { display: grid; align-content: start; gap: 6px; }
.cockpit-goal-card b { font-size: 18px; line-height: 1.4; }
.cockpit-goal-card small { color: var(--cockpit-muted); font-size: 12px; line-height: 1.55; }
.cockpit-goal-card strong { color: var(--cockpit-green); font-size: 12px; }
.cockpit-home-footer { display: flex; justify-content: space-between; gap: 14px; align-items: center; color: #61786c; font-size: 12px; }
.cockpit-home-footer button, .cockpit-secondary-link, .cockpit-back-link { padding: 0; color: var(--cockpit-green); background: transparent; border: 0; font-weight: 900; cursor: pointer; }
.cockpit-home-footer button:hover, .cockpit-secondary-link:hover, .cockpit-back-link:hover { text-decoration: underline; }
.cockpit-wizard-head { display: grid; gap: 4px; margin-bottom: 16px; }
.cockpit-back-link { justify-self: start; margin-bottom: 12px; font-size: 12px; }
.cockpit-condition-form { max-width: 930px; padding: 22px; background: #fff; border: 1px solid var(--cockpit-line); border-radius: 16px; box-shadow: 0 12px 34px rgba(22,66,43,.06); }
.cockpit-question { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.cockpit-question-no { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; color: #123b2b; background: var(--cockpit-lime); border-radius: 50%; font-size: 13px; font-weight: 950; }
.cockpit-question h2 { margin: 1px 0 3px; font-size: 20px; }
.cockpit-question p { margin: 0; color: var(--cockpit-muted); font-size: 12px; line-height: 1.6; }
.cockpit-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cockpit-form-grid label { display: grid; gap: 6px; color: #2c4b3b; font-size: 12px; font-weight: 850; }
.cockpit-form-grid select, .cockpit-form-grid input { min-height: 44px; padding: 8px 10px; color: var(--cockpit-ink); background: #fbfdfb; border: 1px solid #b9cbbb; border-radius: 9px; font: inherit; }
.cockpit-form-grid select:focus-visible, .cockpit-form-grid input:focus-visible { outline: 3px solid rgba(217,250,123,.8); border-color: #5c9369; }
.cockpit-form-grid small { color: var(--cockpit-muted); font-size: 11px; font-weight: 500; line-height: 1.45; }
.cockpit-form-error { min-height: 20px; margin: 10px 0 0; color: #a43e2d; font-size: 12px; font-weight: 800; }
.cockpit-form-actions { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 8px; }
.cockpit-wizard-help { display: flex; gap: 9px; max-width: 930px; margin-top: 12px; padding: 12px 14px; color: #4f6b5c; background: #edf5eb; border-radius: 10px; font-size: 11px; line-height: 1.5; }
.cockpit-wizard-help b { color: var(--cockpit-green); white-space: nowrap; }

/* Guided result panels */
.cockpit-focus-panel { max-width: 1080px; }
.cockpit-focus-card { display: grid; gap: 16px; padding: 6px 0 20px; }
.cockpit-focus-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 22px; color: #fff; background: linear-gradient(120deg, #103d2d, #236347); border-radius: 16px; }
.cockpit-focus-head h1 { margin: 6px 0 5px; font-size: clamp(26px, 3vw, 40px); line-height: 1.1; }
.cockpit-focus-head p { margin: 0; color: #d2e4d6; font-size: 12px; line-height: 1.55; }
.cockpit-match-pill, .cockpit-reference-badge { flex: 0 0 auto; padding: 7px 10px; color: #183927; background: var(--cockpit-lime); border-radius: 999px; font-size: 11px; font-weight: 950; }
.cockpit-context-proof { display: grid; gap: 4px; padding: 13px 15px; background: #eef7e9; border: 1px solid #d5e6d3; border-radius: 10px; }
.cockpit-context-proof span { color: #6c8476; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.cockpit-context-proof b { color: var(--cockpit-green); font-size: 14px; }
.cockpit-context-proof small { color: #5e786b; font-size: 11px; }
.cockpit-candidate-list, .cockpit-support-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cockpit-candidate, .cockpit-support-card { display: grid; align-content: start; gap: 9px; min-width: 0; padding: 16px; background: #fff; border: 1px solid var(--cockpit-line); border-radius: 13px; box-shadow: 0 7px 22px rgba(22,66,43,.05); }
.cockpit-candidate[role="button"], .cockpit-support-card[role="button"] { cursor: pointer; }
.cockpit-candidate[aria-pressed="true"], .cockpit-support-card[aria-pressed="true"] { border-color: var(--cockpit-green); box-shadow: 0 0 0 3px rgba(20,111,73,.15), 0 9px 24px rgba(22,66,43,.08); }
.cockpit-candidate[role="button"]:focus-visible, .cockpit-support-card[role="button"]:focus-visible { outline: 3px solid #f0a52b; outline-offset: 3px; }
.cockpit-candidate-meta, .cockpit-support-card > div:first-child { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.cockpit-candidate-meta small, .cockpit-support-card > div:first-child small { color: #71857a; font-size: 10px; }
.cockpit-fit-direct, .cockpit-fit-similar, .cockpit-fit-unknown, .cockpit-fit-closed { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 950; }
.cockpit-fit-direct { color: #226044; background: #e3f5d8; }
.cockpit-fit-similar { color: #7c571e; background: #fff1c9; }
.cockpit-fit-unknown { color: #5e6770; background: #edf0f1; }
.cockpit-fit-closed { color: #8d3d31; background: #fae4df; }
.cockpit-candidate h2, .cockpit-support-card h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.cockpit-candidate p, .cockpit-support-card p { min-height: 52px; margin: 0; color: #557064; font-size: 12px; line-height: 1.55; }
.cockpit-candidate-source { color: #6f8478; font-size: 10px; }
.cockpit-candidate a, .cockpit-support-card a { color: var(--cockpit-green); font-size: 11px; font-weight: 900; text-decoration: none; }
.cockpit-candidate a:hover, .cockpit-support-card a:hover { text-decoration: underline; }
.cockpit-support-card dl { display: grid; gap: 6px; margin: 0; }
.cockpit-support-card dl div { display: grid; grid-template-columns: 76px 1fr; gap: 6px; padding-top: 6px; border-top: 1px solid #edf1ed; }
.cockpit-support-card dt { color: #71857a; font-size: 10px; }
.cockpit-support-card dd { margin: 0; color: #385748; font-size: 11px; line-height: 1.4; }
.cockpit-provenance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cockpit-provenance span { display: grid; gap: 4px; padding: 11px 12px; color: #4c6a5b; background: #f2f6f1; border: 1px solid #dfe9df; border-radius: 10px; font-size: 11px; line-height: 1.45; }
.cockpit-provenance b { color: var(--cockpit-green); font-size: 10px; }
.cockpit-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cockpit-kpi-grid article { display: grid; gap: 5px; padding: 17px; background: #fff; border: 1px solid var(--cockpit-line); border-radius: 13px; }
.cockpit-kpi-grid span { color: #597366; font-size: 11px; font-weight: 800; }
.cockpit-kpi-grid strong { color: var(--cockpit-green); font-size: clamp(22px, 3vw, 31px); letter-spacing: -.03em; }
.cockpit-kpi-grid small { color: #788b80; font-size: 10px; line-height: 1.4; }
.cockpit-details { padding: 12px 14px; background: #f8fbf7; border: 1px solid #dfe9df; border-radius: 11px; }
.cockpit-details summary { color: var(--cockpit-green); cursor: pointer; font-size: 12px; font-weight: 900; }
.cockpit-environment-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
.cockpit-environment-grid span { display: grid; gap: 4px; padding: 9px; color: #5b7466; background: #fff; border: 1px solid #e2ebe2; border-radius: 8px; font-size: 10px; }
.cockpit-environment-grid b { color: var(--cockpit-green); font-size: 12px; }
.cockpit-details p { margin: 10px 0 0; color: #71857a; font-size: 11px; }
.cockpit-next-card { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 15px 16px; background: #edf7d9; border: 1px solid #d8e99d; border-radius: 12px; }
.cockpit-next-card > div { display: grid; gap: 4px; }
.cockpit-next-card span { color: #6f853e; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.cockpit-next-card b { color: #254c32; font-size: 14px; }
.cockpit-next-card small { color: #607652; font-size: 11px; }
.cockpit-guard { display: grid; justify-items: start; gap: 10px; max-width: 620px; margin: 35px auto; padding: 35px; text-align: center; background: #fff; border: 1px solid var(--cockpit-line); border-radius: 16px; box-shadow: 0 14px 38px rgba(22,66,43,.07); }
.cockpit-guard > * { justify-self: center; }
.cockpit-guard-icon { display: grid; width: 60px; height: 60px; place-items: center; background: #edf6e8; border-radius: 18px; font-size: 29px; }
.cockpit-guard h1 { margin: 0; font-size: 25px; }
.cockpit-guard p { margin: 0; color: var(--cockpit-muted); font-size: 13px; line-height: 1.6; }
.cockpit-conflict { border-color: #e8c58d; background: #fffaf0; }
.cockpit-conflict .cockpit-guard-icon { color: #6d4614; background: #ffedc9; }
.cockpit-conflict ul { width: 100%; margin: 0; padding: 10px 12px 10px 30px; color: #6d4c25; background: #fff5df; border: 1px solid #eed6a8; border-radius: 9px; font-size: 12px; line-height: 1.6; }
.cockpit-empty-state { grid-column: 1 / -1; padding: 24px; text-align: center; background: #f7faf6; border: 1px dashed #b9cbbb; border-radius: 12px; }
.cockpit-empty-state b { color: var(--cockpit-green); }
.cockpit-empty-state p { margin: 7px 0 0; color: var(--cockpit-muted); font-size: 12px; }

/* Route controls and the one-card completion handoff */
.cockpit-route-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0 2px; border-top: 1px solid var(--cockpit-line); }
.cockpit-route-nav > span { flex: 1 1 auto; color: #71857a; font-size: 11px; font-weight: 800; text-align: center; }
.cockpit-nav-secondary, .cockpit-nav-reset { min-height: 34px; padding: 7px 11px; color: var(--cockpit-green); background: #fff; border: 1px solid #b9cbbb; border-radius: 8px; font-size: 11px; font-weight: 900; cursor: pointer; }
.cockpit-nav-secondary:hover, .cockpit-nav-secondary:focus-visible, .cockpit-nav-reset:hover, .cockpit-nav-reset:focus-visible { outline: 3px solid rgba(217,250,123,.65); }
.cockpit-nav-secondary:disabled { color: #a4b1a8; background: #f4f7f3; border-color: #dfe7df; cursor: not-allowed; outline: 0; }
.cockpit-nav-reset { color: #7d4d34; border-color: #e0c9b6; }
.cockpit-completion { display: grid; gap: 12px; padding: 18px; background: #fffdf5; border: 1px solid #e8dcae; border-radius: 14px; box-shadow: 0 7px 22px rgba(90,74,30,.06); }
.cockpit-completion-head { display: grid; gap: 3px; }
.cockpit-completion-head span { color: #7d6b36; font-size: 10px; font-weight: 950; letter-spacing: .08em; }
.cockpit-completion-head h2 { margin: 0; color: #4c3d1f; font-size: 21px; }
.cockpit-completion dl { display: grid; gap: 7px; margin: 0; }
.cockpit-completion dl div { display: grid; grid-template-columns: 118px 1fr; gap: 10px; padding-top: 7px; border-top: 1px solid #efe7c8; }
.cockpit-completion dt { color: #7d6b36; font-size: 11px; font-weight: 900; }
.cockpit-completion dd { margin: 0; color: #5b4b2a; font-size: 12px; line-height: 1.5; }
.cockpit-completion-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Keep the complete existing workbench behind an explicit detail action. */
body.cockpit-mode .module-view[data-view-panel="technology"] > :not(#cockpitFocusPanel),
body.cockpit-mode .module-view[data-view-panel="funding"] > :not(#cockpitFocusPanel),
body.cockpit-mode .module-view[data-view-panel="model"] > :not(#cockpitFocusPanel) { display: none !important; }
body.cockpit-mode .module-view[data-view-panel="technology"].cockpit-details-open > *,
body.cockpit-mode .module-view[data-view-panel="funding"].cockpit-details-open > *,
body.cockpit-mode .module-view[data-view-panel="model"].cockpit-details-open > * { display: revert !important; }
body.cockpit-mode .module-view[data-view-panel="technology"].cockpit-details-open > #cockpitFocusPanel,
body.cockpit-mode .module-view[data-view-panel="funding"].cockpit-details-open > #cockpitFocusPanel,
body.cockpit-mode .module-view[data-view-panel="model"].cockpit-details-open > #cockpitFocusPanel { display: none !important; }

/* Full guide page */
.cockpit-guide-page { max-width: 860px; margin: 25px auto; padding: 30px; background: #fff; border: 1px solid var(--cockpit-line); border-radius: 16px; box-shadow: 0 12px 34px rgba(22,66,43,.06); }
.cockpit-guide-page h1 { margin: 8px 0; font-size: clamp(28px, 4vw, 44px); }
.cockpit-guide-page > p { max-width: 680px; color: var(--cockpit-muted); line-height: 1.7; }
.cockpit-guide-page ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0; margin: 25px 0; list-style: none; counter-reset: guide; }
.cockpit-guide-page li { display: grid; gap: 5px; padding: 15px; background: var(--cockpit-soft); border-radius: 11px; counter-increment: guide; }
.cockpit-guide-page li::before { content: counter(guide); display: grid; width: 25px; height: 25px; place-items: center; color: #173b2a; background: var(--cockpit-lime); border-radius: 50%; font-size: 11px; font-weight: 950; }
.cockpit-guide-page li b { font-size: 14px; }
.cockpit-guide-page li span { color: var(--cockpit-muted); font-size: 11px; line-height: 1.5; }
.cockpit-guide-page-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Professional route guardrails and six-role handoff */
.player-reference-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 0 0 16px; padding: 15px 17px; color: #4c3d1f; background: #fff8df; border: 1px solid #ead79a; border-left: 5px solid #c9972f; border-radius: 12px; }
.player-reference-banner > span { display: grid; width: 38px; height: 38px; place-items: center; color: #fff; background: #9b6a12; border-radius: 50%; font-weight: 950; }
.player-reference-banner b, .player-reference-banner small { display: block; }
.player-reference-banner b { font-size: 14px; }
.player-reference-banner p { margin: 3px 0 0; color: #6d5b31; font-size: 12px; line-height: 1.55; }
.player-reference-banner small { color: #765c20; font-size: 11px; font-weight: 900; white-space: nowrap; }
.player-reference-banner.has-user-input { color: #19442f; background: #eff8e8; border-color: #c7dfb3; border-left-color: #5d9a55; }
.player-reference-banner.has-user-input > span { background: #347346; }
.player-reference-banner.has-user-input p, .player-reference-banner.has-user-input small { color: #426b4c; }
.player-route-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding: 14px; background: #f1f6ef; border: 1px solid #d7e3d6; border-radius: 12px; }
.player-route-actions > span { display: grid; gap: 2px; }
.player-route-actions > span b { font-size: 13px; }
.player-route-actions > span small { color: #61776b; font-size: 11px; }
.player-route-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.player-route-strip { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0 10px; padding: 9px 12px; color: #496457; background: #f4f8f2; border: 1px solid #d8e4d9; border-radius: 11px; font-size: 11px; font-weight: 900; }
.player-route-strip button { min-height: 34px; padding: 6px 10px; color: #174c38; background: #fff; border: 1px solid #cbdccb; border-radius: 8px; font: inherit; cursor: pointer; }
.player-route-strip button:hover, .player-route-strip button:focus-visible { outline: 3px solid rgba(113,153,64,.25); outline-offset: 1px; }
.candidate-reason { margin: 9px 0; padding: 8px 9px; color: #50695c; background: #f3f7f1; border-radius: 8px; font-size: 10px; line-height: 1.5; }
.candidate-reason strong { display: block; color: #234b37; font-size: 9px; letter-spacing: .05em; }
.cockpit-role-required-state { display: grid; max-width: 760px; min-height: 330px; align-content: center; justify-items: start; gap: 10px; margin: 36px auto; padding: 34px; background: #fff; border: 1px solid #d5e1d6; border-radius: 18px; box-shadow: 0 18px 48px rgba(14,52,38,.08); }
.cockpit-role-required-state > span { display: grid; width: 46px; height: 46px; place-items: center; color: #153c2c; background: var(--cockpit-lime); border-radius: 50%; font-size: 20px; font-weight: 950; }
.cockpit-role-required-state h1, .cockpit-role-required-state p { margin: 0; }
.cockpit-role-required-state p { max-width: 630px; color: #587064; line-height: 1.7; }
.cockpit-role-required-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.regional-handoff-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-top: 18px; padding: 18px; color: #eff9f1; background: linear-gradient(120deg, #0d3426, #18513b); border-radius: 14px; }
.regional-handoff-card p { margin: 0 0 4px; color: #b7ccbf; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.regional-handoff-card h2 { margin: 0; color: #fff; font-size: 18px; }
.regional-handoff-card span { display: block; margin-top: 6px; color: #c8dbce; font-size: 12px; line-height: 1.55; }
.regional-handoff-card button { color: #102d22; background: var(--cockpit-lime); border: 0; }
.project-role-board { margin-top: 16px; padding: 18px; background: #fff; border: 1px solid #d6e2d7; border-radius: 15px; }
.project-role-board > header { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 12px; }
.project-role-board > header p, .project-role-board > header h2 { margin: 0; }
.project-role-board > header p { color: #60766a; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.project-role-board > header h2 { margin-top: 3px; font-size: 18px; }
.project-role-consensus { color: #70521e; font-size: 11px; font-weight: 900; }
.project-role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.project-role-grid article { min-width: 0; padding: 12px; background: #f4f7f2; border: 1px solid #dbe4da; border-radius: 10px; }
.project-role-grid article.is-ready { background: #eef8e8; border-color: #bcd9ad; }
.project-role-grid article > span { display: flex; justify-content: space-between; gap: 8px; color: #64786d; font-size: 10px; }
.project-role-grid article b, .project-role-grid article small { display: block; }
.project-role-grid article b { margin-top: 5px; font-size: 12px; }
.project-role-grid article p { margin: 5px 0; color: #53675c; font-size: 11px; line-height: 1.45; }
.project-role-grid article small { color: #6c7e74; font-size: 10px; }

/* Lower explanation window */
.cockpit-guide-dock { position: fixed; z-index: 95; right: 0; bottom: var(--cockpit-footer-offset, 0px); left: var(--cockpit-sidebar); height: var(--cockpit-guide); color: var(--cockpit-ink); background: rgba(255,255,255,.98); border-top: 1px solid #cbd9cc; box-shadow: 0 -14px 42px rgba(12,45,33,.12); backdrop-filter: blur(16px); transition: bottom .12s linear; }
.cockpit-guide-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 24px 7px; }
.cockpit-first-action { flex: 0 0 auto; padding: 7px 11px; color: #174c38; background: #eef8cf; border: 1px solid #cfe693; border-radius: 8px; font-size: 11px; font-weight: 900; cursor: pointer; }
.cockpit-first-action:hover, .cockpit-first-action:focus-visible { outline: 3px solid rgba(217,250,123,.65); }
.cockpit-guide-bar > div { display: grid; gap: 2px; }
.cockpit-guide-label { color: #6b8275; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.cockpit-guide-bar b { font-size: 15px; }
.cockpit-guide-expand { display: none; min-height: 32px; padding: 6px 11px; color: var(--cockpit-green); background: #eef6e9; border: 1px solid #cfe0ce; border-radius: 8px; font-size: 11px; font-weight: 900; }
.cockpit-guide-body { display: grid; grid-template-columns: 280px 1fr; gap: 16px; padding: 0 24px 14px; }
.cockpit-guide-tabs { display: flex; flex-wrap: wrap; align-content: start; gap: 5px; }
.cockpit-guide-tabs button { min-height: 30px; padding: 5px 9px; color: #496557; background: #edf3eb; border: 1px solid #d6e1d7; border-radius: 999px; font-size: 10px; font-weight: 850; cursor: pointer; }
.cockpit-guide-tabs button[aria-selected="true"] { color: #143b2a; background: var(--cockpit-lime); border-color: var(--cockpit-lime); }
.cockpit-guide-copy { min-width: 0; padding: 10px 13px; background: #f4f8f2; border-radius: 10px; }
.cockpit-guide-copy b { display: block; margin-bottom: 4px; font-size: 12px; }
.cockpit-guide-copy p { margin: 0; color: #4d6759; font-size: 11px; line-height: 1.55; }
.cockpit-guide-copy div:last-child { margin-top: 5px; color: var(--cockpit-green); font-size: 10px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mobile drawer and bottom guide */
.cockpit-mobile-toggle { display: none; }
@media (max-width: 1100px) and (min-width: 801px) {
  :root { --cockpit-sidebar: 250px; --cockpit-guide: 172px; }
  body.cockpit-mode .workspace { padding-inline: 20px; }
  .cockpit-conditions { margin-inline: -20px; padding-inline: 20px; }
  .cockpit-goal-grid, .cockpit-candidate-list, .cockpit-support-list { grid-template-columns: 1fr; }
  .cockpit-goal-card { min-height: 135px; }
  .cockpit-candidate-list, .cockpit-support-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  :root { --cockpit-sidebar: min(88vw, 340px); --cockpit-guide: 64px; }
  body.cockpit-mode { --sidebar: 0px; overflow: auto; padding-bottom: 0; }
  body.cockpit-mode .app-shell { height: auto; min-height: 100dvh; overflow: visible; }
  body.cockpit-mode .workspace { min-height: calc(100dvh - var(--topbar)); height: auto; margin-left: 0; overflow: visible; padding: 0 14px; }
  body.cockpit-mode .module-view:not([hidden]) { padding-bottom: 95px; }
  body.cockpit-mode .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 110; width: var(--cockpit-sidebar); height: 100dvh; display: flex; overflow: hidden; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(0,0,0,.3); }
  body.cockpit-mode.cockpit-menu-open .sidebar { transform: translateX(0); }
  body.cockpit-mode .sidebar-scroll { width: auto; height: auto; overflow-y: auto; }
  .cockpit-mobile-toggle { display: grid; min-width: 50px; min-height: 40px; place-items: center; padding: 5px 9px; color: #102c21; background: var(--cockpit-lime); border: 0; border-radius: 9px; font-size: 11px; font-weight: 950; }
  .topbar-actions { gap: 6px; }
  body.cockpit-mode .cockpit-conditions { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-inline: -14px; padding: 10px 14px; }
  .cockpit-conditions-title { min-width: 0; }
  .cockpit-condition-chips { grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .cockpit-condition-chips > span { white-space: nowrap; }
  .cockpit-condition-edit { grid-column: 2; grid-row: 1; }
  .cockpit-home { min-height: auto; padding: 30px 0; align-content: start; }
  .cockpit-home-hero h1, .cockpit-wizard-head h1 { font-size: 36px; }
  .cockpit-goal-grid, .cockpit-candidate-list, .cockpit-support-list, .cockpit-kpi-grid, .cockpit-provenance { grid-template-columns: 1fr; }
  .cockpit-goal-card { min-height: 142px; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 8px 12px; padding: 16px; }
  .cockpit-goal-icon { grid-row: 1 / 3; }
  .cockpit-goal-card strong { grid-column: 2; }
  .cockpit-home-footer { align-items: flex-start; flex-direction: column; }
  .cockpit-form-grid { grid-template-columns: 1fr; }
  .cockpit-focus-head { flex-direction: column; gap: 10px; padding: 18px; }
  .cockpit-next-card { align-items: flex-start; flex-direction: column; }
  .cockpit-environment-grid { grid-template-columns: 1fr 1fr; }
  .cockpit-guide-page { margin: 18px 0; padding: 22px; }
  .cockpit-guide-page ol { grid-template-columns: 1fr; }
  .cockpit-guide-dock { left: 0; height: var(--cockpit-guide); }
  .cockpit-guide-bar { min-height: 64px; padding: 9px 14px; }
  .cockpit-guide-expand { display: block; }
  .cockpit-guide-body { display: none; grid-template-columns: 1fr; gap: 10px; max-height: calc(48dvh - 64px); overflow-y: auto; padding: 0 14px 14px; }
  body.cockpit-guide-open .cockpit-guide-dock { height: min(48dvh, 390px); }
  body.cockpit-guide-open .cockpit-guide-body { display: grid; }
  .cockpit-guide-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .cockpit-guide-tabs button { white-space: nowrap; }
  body.cockpit-mode #toast { right: 10px; bottom: calc(var(--cockpit-footer-offset, 0px) + var(--cockpit-guide) + 10px); left: 10px; max-width: none; }
  .player-reference-banner { grid-template-columns: auto 1fr; }
  .player-reference-banner small { grid-column: 1 / -1; white-space: normal; }
  .player-route-strip { flex-wrap: wrap; }
  .player-route-strip span { order: -1; width: 100%; text-align: center; }
  .player-route-actions, .regional-handoff-card { align-items: stretch; grid-template-columns: 1fr; flex-direction: column; }
  .regional-handoff-card { display: grid; }
  .project-role-board > header { align-items: flex-start; flex-direction: column; }
  .project-role-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cockpit-goal-card, body.cockpit-mode .sidebar { transition: none; }
}
