/* Phase 40: in-product education and accessible contextual help. */
.workspace-body .help-link{width:100%;border:0;background:transparent;text-align:left;font:inherit;cursor:pointer}
.workspace-body .help-link:focus-visible,.workspace-help-trigger:focus-visible{outline:3px solid rgba(70,86,223,.55);outline-offset:2px}
.workspace-help-trigger{flex:0 0 35px}
.product-help-dialog{width:min(900px,calc(100vw - 36px));max-width:none;max-height:min(840px,calc(100dvh - 32px));padding:0;border:1px solid var(--line);border-radius:24px;background:var(--surface);color:var(--ink);box-shadow:0 24px 90px rgba(15,23,42,.28);overflow:hidden}
.product-help-dialog::backdrop{background:rgba(13,20,36,.58);backdrop-filter:blur(4px)}
.product-help-shell{display:flex;flex-direction:column;max-height:min(840px,calc(100dvh - 32px));min-height:0}
.product-help-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:24px 28px 20px;border-bottom:1px solid var(--line);background:linear-gradient(130deg,var(--surface),var(--surface-2))}
.product-help-brand{display:flex;align-items:flex-start;gap:14px;min-width:0}
.product-help-mark{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:12px;background:var(--brand-soft);color:var(--brand)}
.product-help-mark .icon{width:23px;height:23px}
.product-help-eyebrow,.product-help-step-label{display:block;font-size:11px;font-weight:600;letter-spacing:.13em;color:var(--brand)}
.product-help-header h2{margin:5px 0 5px;font-size:24px;line-height:1.16;letter-spacing:-.04em}
.product-help-header p{margin:0;max-width:530px;color:var(--muted);font-size:12px;line-height:1.6}
.product-help-close{flex:0 0 auto}
.product-help-context{display:flex;align-items:flex-start;gap:12px;padding:15px 28px;border-bottom:1px solid var(--line);background:var(--brand-soft)}
.product-help-context-icon{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:8px;background:var(--surface);color:var(--brand)}
.product-help-context-icon .icon{width:17px;height:17px}
.product-help-context>div{min-width:0}
.product-help-context strong{display:block;font-size:12px;line-height:1.45;color:var(--ink)}
.product-help-context p{margin:4px 0 0;font-size:11px;line-height:1.65;color:var(--ink-2)}
.product-help-layout{display:grid;grid-template-columns:228px minmax(0,1fr);min-height:0;overflow:hidden;flex:1}
.product-help-nav-wrap{min-width:0;min-height:0;overflow:hidden;border-right:1px solid var(--line);background:var(--surface-2)}
.product-help-nav{display:grid;align-content:start;gap:5px;height:100%;padding:18px 12px;border-right:0;background:transparent;overflow:auto}
.product-help-nav-hint{display:none}
.product-help-nav [role="tab"]{display:flex;align-items:center;gap:10px;width:100%;min-height:53px;padding:10px;border:1px solid transparent;border-radius:12px;text-align:left;color:var(--ink-2);background:transparent;cursor:pointer}
.product-help-nav [role="tab"]>span:first-child{display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:11px;font-weight:600;color:var(--muted)}
.product-help-nav [role="tab"] strong,.product-help-nav [role="tab"] small{display:block}
.product-help-nav [role="tab"] strong{font-size:11px;line-height:1.4;color:var(--ink)}
.product-help-nav [role="tab"] small{margin-top:2px;font-size:11px;line-height:1.4;color:var(--muted)}
.product-help-nav [role="tab"]:hover{background:var(--surface);border-color:var(--line)}
.product-help-nav [role="tab"][aria-selected="true"]{border-color:rgba(70,86,223,.24);background:var(--surface);box-shadow:var(--shadow-sm)}
.product-help-nav [role="tab"][aria-selected="true"]>span:first-child{border-color:var(--brand);background:var(--brand);color:#fff}
.product-help-nav [role="tab"]:focus-visible,.product-help-panel button:focus-visible,.product-help-panel a:focus-visible,.product-help-footer button:focus-visible{outline:3px solid rgba(70,86,223,.55);outline-offset:2px}
.product-help-panels{min-width:0;overflow:auto;padding:24px 28px 26px;overscroll-behavior:contain}
.product-help-panel[hidden]{display:none}
.product-help-panel h3{margin:8px 0 9px;font-size:20px;line-height:1.22;letter-spacing:-.035em}
.product-help-panel>p{margin:0 0 17px;color:var(--muted);font-size:12px;line-height:1.75}
.product-help-steps{display:grid;gap:0;margin:18px 0 0;padding:0;list-style:none}
.product-help-steps li{display:grid;grid-template-columns:29px minmax(0,1fr);gap:12px;padding:14px 0;border-top:1px solid var(--line)}
.product-help-steps li>span{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--brand-soft);color:var(--brand);font-size:11px;font-weight:600}
.product-help-steps strong{font-size:12px;line-height:1.5}
.product-help-steps p{margin:3px 0 5px;color:var(--muted);font-size:11px;line-height:1.65}
.product-help-steps button,.product-help-inline-link{display:inline-flex;align-items:center;gap:6px;margin-top:3px;padding:5px 0;border:0;background:transparent;color:var(--brand);font:inherit;font-size:11px;font-weight:600;cursor:pointer;text-decoration:none}
.product-help-steps button:hover,.product-help-inline-link:hover{text-decoration:underline}
.product-help-callout,.product-help-warning{margin-top:17px;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.product-help-callout strong,.product-help-warning strong{display:block;font-size:11px}
.product-help-callout p,.product-help-warning p{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.65}
.product-help-warning{border-color:#f0d6a7;background:var(--amber-soft);color:var(--ink)}
.product-help-warning p{color:var(--ink-2)}
.product-help-definition{padding:12px 0;border-top:1px solid var(--line)}
.product-help-definition strong{display:block;font-size:12px;line-height:1.45}
.product-help-definition p{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.7}
.product-help-panel>.btn{margin-top:13px}
.product-help-footer{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:13px 24px;border-top:1px solid var(--line);background:var(--surface)}
.product-help-footer>span{color:var(--muted);font-size:11px;line-height:1.5}
.overview-guide{display:grid;grid-template-columns:43px minmax(0,1fr) minmax(85px,120px);align-items:start;gap:16px;padding:18px 20px;margin:0 0 18px;border:1px solid #dce2ff;background:linear-gradient(115deg,var(--surface),var(--brand-soft));border-radius:16px;box-shadow:var(--shadow-sm)}
.overview-guide-icon{display:grid;place-items:center;width:42px;height:42px;border:1px solid rgba(70,86,223,.14);border-radius:12px;background:var(--surface);color:var(--brand)}
.overview-guide-icon .icon{width:21px;height:21px}
.overview-guide-copy{min-width:0}
.overview-guide-kicker{font-size:11px;font-weight:600;letter-spacing:.13em;color:var(--brand)}
.overview-guide-copy h2{margin:5px 0 4px;font-size:15px;line-height:1.35;letter-spacing:-.02em}
.overview-guide-copy p{margin:0;max-width:680px;font-size:11px;line-height:1.7;color:var(--muted)}
.overview-guide-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:12px}
.overview-guide-text-action{min-height:32px;padding:4px 3px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:11px;cursor:pointer}
.overview-guide-text-action:hover{color:var(--ink);text-decoration:underline}
.overview-guide-text-action:focus-visible{outline:3px solid rgba(70,86,223,.55);outline-offset:2px;border-radius:4px}
.overview-guide-progress{display:flex;align-items:center;justify-content:flex-end;gap:6px;padding-top:11px;color:var(--brand);font-size:11px;font-weight:600}
.overview-guide-progress-line{width:14px;height:2px;background:rgba(70,86,223,.25)}
.dark-mode .product-help-warning{background:#392c1b;border-color:#6c5025;color:#fff1ce}
.dark-mode .product-help-warning p{color:#ead9b5}
.dark-mode .overview-guide{border-color:#303967;background:linear-gradient(115deg,var(--surface),#202747)}
.dark-mode .product-help-nav [role="tab"]>span:first-child{color:var(--muted)}
.dark-mode .product-help-nav [role="tab"][aria-selected="true"]>span:first-child{color:#fff}
@media(max-width:760px){
  .product-help-dialog{display:flex;flex-direction:column;width:calc(100vw - 18px);height:calc(100dvh - 18px);max-height:calc(100dvh - 18px);border-radius:16px}
  .product-help-shell{width:100%;height:100%;max-height:none;min-height:0;flex:1 1 auto}
  .product-help-header{padding:17px 16px 15px;gap:10px}
  .product-help-mark{width:37px;height:37px;flex-basis:37px;border-radius:12px}
  .product-help-header h2{font-size:20px}
  .product-help-header p{font-size:11px}
  .product-help-context{padding:12px 15px}
  .product-help-layout{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden}
  .product-help-nav-wrap{position:relative;flex:0 0 auto;min-width:0;min-height:0;padding-bottom:17px;border-right:0;border-bottom:1px solid var(--line);overflow:hidden}
  .product-help-nav{display:flex;height:auto;flex:0 0 auto;gap:5px;padding:10px 12px;border:0;overflow-x:auto;overscroll-behavior-x:contain}
  .product-help-nav-hint{position:absolute;right:12px;bottom:0;display:block;padding:0 2px;color:var(--muted);font-size:11px;line-height:15px;pointer-events:none}
  .product-help-nav [role="tab"]{width:auto;min-width:128px;min-height:46px;flex:0 0 auto;padding:7px 9px;gap:7px}
  .product-help-nav [role="tab"]>span:first-child{width:23px;height:23px;flex-basis:23px}
  .product-help-nav [role="tab"] strong{font-size:11px}
  .product-help-nav [role="tab"] small{font-size:11px}
  .product-help-panels{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;padding:18px 17px 20px;overscroll-behavior:contain}
  .product-help-panel h3{font-size:18px}
  .product-help-footer{padding:10px 14px;gap:10px}
  .product-help-footer [data-close-help]{flex:0 0 auto;min-width:88px;white-space:nowrap}
  .product-help-footer>span{font-size:11px}
  .overview-guide{grid-template-columns:34px minmax(0,1fr);gap:10px;padding:14px;margin-bottom:13px}
  .overview-guide-icon{width:34px;height:34px;border-radius:8px}
  .overview-guide-icon .icon{width:18px;height:18px}
  .overview-guide-copy h2{font-size:13px}
  .overview-guide-copy p{font-size:11px}
  .overview-guide-progress{grid-column:2;justify-content:flex-start;padding-top:0}
}
@media(max-width:380px){
  .product-help-header h2{font-size:18px}
  .product-help-header p{font-size:11px}
  .product-help-nav [role="tab"]{min-width:118px}
  .product-help-footer{align-items:flex-start}
  .product-help-footer>span{max-width:180px}
  .overview-guide-actions{gap:7px}
  .overview-guide-actions .btn{font-size:11px;padding-inline:9px}
}
@media(prefers-reduced-motion:reduce){.overview-guide,.product-help-dialog{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

.welcome-help-link{display:inline-flex;align-items:center;gap:6px;margin-top:7px;padding:5px 0;border:0;background:transparent;color:var(--brand);font:inherit;font-size:11px;font-weight:600;cursor:pointer}
.welcome-help-link:hover{text-decoration:underline}
.welcome-help-link:focus-visible{outline:3px solid rgba(70,86,223,.55);outline-offset:2px;border-radius:4px}
/* Preserve the first actionable dashboard rows on short landscape screens. The persistent
   top-bar Help control remains available when the inline onboarding banner is hidden. */
@media(max-height:440px){
  .overview-guide{display:none!important}
}
