/* One product shell across Knowledge, Work, Administration and Account. The header is the stable
   Product anchor: it consumes Product tokens only, never Workspace theme tokens. */
.product-header { position: relative; flex: 0 0 auto; min-height: var(--knowledge-topbar-height, 56px); background: var(--oiq-header-bg); color: var(--oiq-header-ink); font: var(--oiq-text-base)/1.4 var(--oiq-font-sans); z-index: 50; }
.product-header *, .product-header *::before, .product-header *::after { box-sizing: border-box; }
.product-header .product-header-row, .app-shell .product-header .product-header-row { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--oiq-space-3); min-height: var(--knowledge-topbar-height, 56px); height: var(--knowledge-topbar-height, 56px); padding: 0 var(--oiq-space-4); }
.product-header .brand, .app-shell .product-header .brand { flex: 0 0 auto; height: auto; gap: 0; margin: 0; padding: 0; border: 0; text-decoration: none; font-size: 19px; line-height: 1; }
.product-header .brand-mark { flex: 0 0 28px; width: 28px; height: 28px; }
.product-header .brand-wordmark { white-space: nowrap; }
.product-domains { display: flex; flex: 0 0 auto; align-self: stretch; align-items: center; gap: var(--oiq-space-1); }
.product-domains a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--oiq-target); padding: var(--oiq-space-2) 10px; border: 0; border-radius: var(--oiq-radius-sm); color: var(--oiq-header-ink-muted); background: transparent; font-size: var(--oiq-text-base); font-weight: 600; text-decoration: none; white-space: nowrap; }
.product-domains a[aria-current="page"] { color: var(--oiq-header-ink); background: var(--oiq-header-hover); box-shadow: inset 0 -2px var(--oiq-header-accent); }
.product-domains a:hover { background: var(--oiq-header-hover); color: var(--oiq-header-ink); }
.product-header .header-spacer { flex: 1 1 0; min-width: 0; }
.product-header .leading-header-controls, .product-header .session-actions { flex: 0 0 auto; }
.product-header .session-actions { margin: 0; flex-wrap: nowrap; }
.product-header .product-area { color: var(--oiq-header-ink-muted); font-size: var(--oiq-text-md); }
.product-header .top-header-controls { flex: 0 1 auto; min-width: 0; }
.product-header .projection-wrap { flex: 0 1 180px; min-width: var(--oiq-target); }
.product-header .projection-trigger { max-width: 100%; }

/* Common Human utility entry (OIQ-044): availability is not operation authority. */
.product-header .management-entry { display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px; border: 1px solid var(--oiq-header-ink-muted); border-radius: var(--oiq-radius-md); color: inherit; font-size: var(--oiq-text-sm); font-weight: 750; text-decoration: none; white-space: nowrap; }
.product-header .management-entry:hover, .product-header .management-entry[aria-current="page"] { background: var(--oiq-header-hover); }

/* Account and guidance disclosures open light panels on the dark header. */
.product-header .user-menu-trigger { width: 38px; height: 38px; margin: 0; padding: 0; color: var(--oiq-header-ink); background: var(--oiq-header-control); border: 1px solid var(--oiq-header-accent); }
.product-header .user-menu[open] .user-menu-trigger { color: var(--oiq-header-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--oiq-header-accent) 28%, transparent); }
.product-header .guidance-menu { position: relative; flex: 0 0 auto; }
.product-header .guidance-menu > summary { display: flex; align-items: center; justify-content: center; min-height: var(--oiq-target); padding: var(--oiq-space-2) 10px; border-radius: var(--oiq-radius-sm); cursor: pointer; color: var(--oiq-header-ink-muted); font-weight: 600; list-style: none; }
.product-header .guidance-menu > summary::-webkit-details-marker { display: none; }
.product-header .guidance-menu[open] > summary, .product-header .guidance-menu > summary:hover { background: var(--oiq-header-hover); }
.product-header .guidance-icon { display: none; }
.product-header :is(.user-menu-panel, .guidance-menu-panel) { padding: 6px; border: 1px solid var(--oiq-border); border-radius: var(--oiq-radius-lg); background: var(--oiq-surface); color: var(--oiq-ink-secondary); box-shadow: var(--oiq-shadow-popover); }
.product-header .guidance-menu-panel { position: absolute; top: calc(100% + 6px); right: 0; width: 260px; max-width: calc(100vw - 24px); z-index: 80; }
.product-header .user-menu-panel { width: 240px; max-width: calc(100vw - 24px); min-width: 0; line-height: 1.4; }
.product-header .user-menu-label { overflow-wrap: anywhere; color: var(--oiq-ink-muted); border-bottom-color: var(--oiq-border); }
.product-header .guidance-menu-panel a, .product-header .user-menu-panel .admin-link, .product-header .user-menu-panel .logout-button { display: flex; align-items: center; min-height: var(--oiq-target); margin: 0; padding: var(--oiq-space-2) 10px; border-radius: var(--oiq-radius-md); color: var(--oiq-ink-secondary); font: inherit; font-weight: 600; text-decoration: none; }
.product-header .guidance-menu-panel a:hover, .product-header .user-menu-panel .admin-link:hover, .product-header .user-menu-panel .logout-button:hover { background: var(--oiq-accent-wash); color: var(--oiq-ink); }
.product-header :is(a, button, summary):focus-visible { outline: var(--oiq-header-focus-ring); outline-offset: var(--oiq-focus-offset); }
.product-header :is(.user-menu-panel, .guidance-menu-panel, .projection-popover) :is(a, button, summary, input, select):focus-visible { outline: var(--oiq-focus-ring); outline-offset: var(--oiq-focus-offset); }

/* UI language control: Product chrome language only, never content language. */
.ui-locale-control { display: flex; flex-wrap: wrap; gap: var(--oiq-space-1); }
.ui-locale-control button { min-height: var(--oiq-target); padding: 6px 10px; border: 1px solid transparent; border-radius: var(--oiq-radius-md); background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.ui-locale-control button[aria-pressed="true"] { border-color: var(--oiq-border-strong); background: var(--oiq-accent-wash); color: var(--oiq-accent-strong); }
.ui-locale-control button:focus-visible { outline: var(--oiq-focus-ring); outline-offset: var(--oiq-focus-offset); }
.product-header .user-menu-locale { margin: var(--oiq-space-1) 0; padding: var(--oiq-space-1) 0; border-block: 1px solid var(--oiq-border); }
.product-header .user-menu-locale button { flex: 1 1 0; color: var(--oiq-ink-secondary); }
.product-header .user-menu-locale button[aria-pressed="true"] { color: var(--oiq-accent-strong); }
.login-locale { justify-content: center; margin-top: var(--oiq-space-3); color: var(--oiq-ink-muted); font-size: var(--oiq-text-md); }
.workspace-gallery-view .gallery-hero { display: block; padding: 28px max(16px, calc((100% - 1120px)/2)); }

/* Compact band: icon-first chrome, the same header information architecture. */
@media (max-width: 760px) {
  .product-header .product-header-row, .app-shell .product-header .product-header-row { gap: 6px; padding: 0 10px; }
  .product-header .brand-wordmark, .product-header .product-area, .product-header .top-header-controls:has(.admin-mode-badge) { display: none; }
  .product-header .brand-mark { margin: 0; }
  .product-header .projection-wrap { flex-basis: 100px; }
  .product-domains { gap: 2px; }
  .product-domains a { padding: var(--oiq-space-2); font-size: var(--oiq-text-md); }
  .product-header .user-menu-trigger { width: 40px; height: 40px; }
  .product-header .guidance-menu > summary { width: var(--oiq-target-compact); padding: 0; }
  .product-header .guidance-label { display: none; }
  .product-header .guidance-icon { display: inline; font-size: 17px; }
}

/* Phone band: every header entry stays in one row; Management keeps its accessible name. */
@media (max-width: 600px) {
  .product-header .product-header-row, .app-shell .product-header .product-header-row { gap: var(--oiq-space-1); padding: 0 var(--oiq-space-2); }
  .product-header .header-spacer { display: none; }
  .product-header .session-actions { margin-left: auto; gap: var(--oiq-space-1); }
  .product-domains a { padding: var(--oiq-space-2) 5px; font-size: var(--oiq-text-sm); }
  .product-header .projection-wrap { flex: 0 0 auto; }
  .product-header .projection-name, .product-header .management-entry-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .product-header .management-entry { width: var(--oiq-target-compact); height: var(--oiq-target-compact); padding: 0; }
  .product-header .management-entry::before { content: "\2699\FE0E"; font-size: 17px; font-weight: 400; line-height: 1; }
  .product-header .management-entry::before { content: "\2699\FE0E" / ""; }
  .product-header .user-menu-trigger { width: var(--oiq-target-compact); height: var(--oiq-target-compact); }
}

/* Narrow phones keep common Management keyboard-visible by wrapping instead of overflowing. */
@media (max-width: 360px) {
  .product-header .product-header-row, .app-shell .product-header .product-header-row { flex-wrap: wrap; height: auto; padding-block: 6px; }
  .product-header .session-actions { margin-left: auto; }
}

/* Guidance is ancillary to the compact Product and Workspace shells. */
.public-guidance-links { display: flex; flex-wrap: wrap; gap: var(--oiq-space-1) var(--oiq-space-4); padding-top: 10px; border-top: 1px solid var(--oiq-border); }
.public-guidance-links a, .workspace-authoring-links a { display: inline-flex; align-items: center; min-height: var(--oiq-target); color: var(--oiq-accent-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.public-guidance-links a:focus-visible, .workspace-authoring-links :is(a, summary):focus-visible { outline: var(--oiq-focus-ring); outline-offset: var(--oiq-focus-offset); }
.workspace-authoring-links { margin: 0 0 18px; padding: 10px 14px; border: 1px solid var(--oiq-border); border-radius: var(--oiq-radius-lg); background: var(--oiq-canvas); }
.workspace-authoring-links > summary { min-height: 24px; cursor: pointer; color: var(--oiq-accent-strong); font-weight: 700; }
.workspace-authoring-links p { margin: var(--oiq-space-3) 0 6px; max-width: 76ch; color: var(--oiq-ink-subtle); }
.workspace-authoring-links nav { display: flex; flex-wrap: wrap; gap: var(--oiq-space-1) 18px; }

/* Authoring & Integration guidance page. */
.authoring-app { min-height: 100dvh; background: var(--oiq-canvas); color: var(--oiq-ink); }
.authoring-main { box-sizing: border-box; width: min(1000px, calc(100% - 28px)); margin: var(--oiq-space-5) auto 60px; font: var(--oiq-text-body)/1.6 var(--oiq-font-sans); }
.authoring-main *, .authoring-main *::before, .authoring-main *::after { box-sizing: border-box; }
.authoring-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--oiq-space-3); margin-bottom: 18px; }
.authoring-heading h1 { margin: 0; font-size: clamp(24px, 4vw, 32px); }
.authoring-heading p { margin: var(--oiq-space-1) 0; color: var(--oiq-ink-subtle); }
.authoring-main a { color: var(--oiq-accent-strong); overflow-wrap: anywhere; text-underline-offset: 3px; }
.authoring-contexts, .authoring-actions { display: flex; flex-wrap: wrap; gap: var(--oiq-space-2) var(--oiq-space-4); margin: 14px 0; }
.authoring-contexts { padding: 6px; border: 1px solid var(--oiq-border); border-radius: var(--oiq-radius-lg); background: var(--oiq-surface-sunken); gap: 6px; }
.authoring-main button, .authoring-contexts a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--oiq-target); padding: var(--oiq-space-2) var(--oiq-space-3); border: 1px solid var(--oiq-border-strong); border-radius: var(--oiq-radius-md); background: var(--oiq-surface); color: var(--oiq-accent-strong); font: inherit; font-weight: 600; cursor: pointer; }
.authoring-contexts a { background: transparent; border-color: transparent; }
.authoring-contexts [aria-pressed="true"] { background: var(--oiq-accent); border-color: var(--oiq-accent); color: #fff; }
.authoring-main button:disabled { cursor: wait; opacity: .65; }
.authoring-actions a { display: inline-flex; align-items: center; min-height: var(--oiq-target); }
.authoring-main :is(a, button, summary, pre):focus-visible { outline: var(--oiq-focus-ring); outline-offset: var(--oiq-focus-offset); }
.authoring-card { padding: clamp(16px, 3vw, 28px); border: 1px solid var(--oiq-border); border-radius: var(--oiq-radius-lg); background: var(--oiq-surface); }
.authoring-card :is(h2, h3, h4) { line-height: 1.3; }
.authoring-card h2 { margin-top: var(--oiq-space-1); }
.authoring-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--oiq-space-3) 20px; }
.authoring-facts > div { min-width: 0; }
.authoring-card dt { color: var(--oiq-ink-subtle); font-size: var(--oiq-text-md); }
.authoring-card dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.authoring-detail { margin-top: 18px; padding-top: var(--oiq-space-3); border-top: 1px solid var(--oiq-border); }
.authoring-detail summary { cursor: pointer; min-height: var(--oiq-target); color: var(--oiq-accent-strong); font-weight: 600; overflow-wrap: anywhere; }
.authoring-card pre { max-width: 100%; overflow: auto; padding: var(--oiq-space-3); border-radius: var(--oiq-radius-md); background: var(--oiq-canvas); font: var(--oiq-text-md)/1.5 var(--oiq-font-mono); }
.authoring-admin-configuration { margin-top: var(--oiq-space-5); padding-top: var(--oiq-space-3); border-top: 1px solid var(--oiq-border); }
.authoring-error { padding: var(--oiq-space-3); border: 1px solid var(--oiq-danger-border); border-radius: var(--oiq-radius-md); background: var(--oiq-danger-wash); color: var(--oiq-danger-ink); }
@media (max-width: 600px) {
  .authoring-facts { grid-template-columns: minmax(0, 1fr); }
  .authoring-contexts > * { flex: 1 1 220px; }
  .workspace-authoring-links nav { display: grid; gap: 0; }
}
