/* Shared discovery foundation. Keep page geometry, auth and saved-work state owned by their modules. */
@media screen {
 .top.site-header { grid-template-columns:240px auto minmax(0,1fr); grid-template-areas:"brand search nav"; gap:12px; }
 .site-header .brand { width:240px; }
 .site-header .brand-name { font-size:18px; }
 .site-header .brand-short { display:block; }
 .global-search-trigger { grid-area:search; display:flex; gap:12px; align-items:center; justify-content:space-between; padding:8px 12px; min-height:40px; border:1px solid var(--line,#cedde3); border-radius:8px; background:var(--panel,#fff); color:var(--muted,#526779); cursor:pointer; font:inherit; font-size:13px; }
 .global-search-trigger kbd { font:11px/1.5 system-ui,sans-serif; border:1px solid var(--line,#cedde3); padding:1px 4px; border-radius:4px; }
 .site-header .nav-workspace,.site-header .nav-help { display:inline-flex; align-items:center; gap:6px; padding:10px 9px; font-size:13px; line-height:20px; font-weight:650; white-space:nowrap; text-decoration:none; border-radius:8px; }
 .site-header .nav-workspace[data-current=true] { background:var(--brand-soft,#e7f2f2); color:var(--ink,#173744); }
 .site-header .nav-group-title { padding-inline:9px; }
 .site-header .nav-panel { max-height:min(650px,calc(100dvh - 100px)); overflow:auto; }
 .global-search-dialog { box-sizing:border-box; width:min(720px,calc(100vw - 32px)); max-height:calc(100dvh - 48px); padding:20px; border:1px solid var(--line,#cedde3); border-radius:14px; background:var(--panel,#fff); color:var(--ink,#173744); box-shadow:0 24px 90px #12313d44; overflow:auto; }
 .global-search-dialog::backdrop { background:#0b263b66; }
 .global-search-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
 .global-search-heading h2 { margin:0; font-size:22px; }
 .global-search-close { min-height:44px; padding:8px 12px; border:1px solid var(--line,#cedde3); background:transparent; color:inherit; border-radius:8px; cursor:pointer; }
 .global-search-label { display:block; margin:12px 0 6px; font-size:14px; }
 .global-search-input { box-sizing:border-box; width:100%; min-height:48px; padding:10px 12px; font:inherit; font-size:16px; border:1px solid var(--line,#cedde3); border-radius:8px; background:var(--panel,#fff); color:inherit; }
 .global-search-status,.global-search-note,.global-search-empty { font-size:13px; line-height:1.5; color:var(--muted,#526779); margin:10px 0; }
 .global-search-group h3 { font-size:12px; color:var(--muted,#526779); margin:14px 0 4px; text-transform:uppercase; letter-spacing:.04em; }
 .global-search-result { display:flex; flex-direction:column; gap:3px; min-height:44px; box-sizing:border-box; padding:10px 12px; border-radius:8px; text-decoration:none; color:inherit; overflow-wrap:anywhere; }
 .global-search-result:hover { background:var(--brand-soft,#e7f2f2); }
 .global-search-result strong { font-size:15px; }
 .global-search-result small { font-size:12px; color:var(--muted,#526779); }
 .global-search-note { border-top:1px solid var(--line,#cedde3); padding-top:12px; }
 :is(.global-search-trigger,.global-search-dialog a,.global-search-dialog button,.global-search-dialog input):focus-visible { outline:3px solid var(--brand,#125568); outline-offset:3px; }
}
@media screen and (min-width:901px) and (max-width:1180px) {
 .top.site-header { grid-template-columns:190px 44px minmax(0,1fr); gap:8px; padding-inline:12px; }
 .site-header .brand { width:190px; }
 .site-header .brand-name { display:flex; font-size:14px; }
 .global-search-trigger { width:44px; padding:8px 3px; justify-content:center; font-size:11px; }
 .global-search-trigger kbd { display:none; }
 .site-header .nav-group-title,.site-header .nav-workspace,.site-header .nav-help { padding-inline:6px; font-size:11px; gap:4px; }
 .site-header .nav-group-icon { display:none; }
}
@media screen and (max-width:900px) {
 .top.site-header { grid-template-columns:minmax(0,1fr) auto auto; grid-template-areas:"brand search toggle"; gap:8px; }
 .site-header .brand { width:auto; }
 .site-header .brand-name { font-size:16px; }
 .global-search-trigger { min-height:44px; padding:8px 10px; }
 .global-search-trigger kbd { display:none; }
 .site-header .nav-workspace,.site-header .nav-help { min-height:44px; font-size:14px; padding:12px; }
 .site-header .nav-panel { max-height:none; }
 .global-search-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); padding:16px; }
}
@media print { .global-search-dialog,.global-search-trigger { display:none!important; } }
/* Alerts mounts after the page shell and loads its own legacy grid rules. */
@media screen {
 .top.site-header.has-bell:has(.global-search-trigger) { grid-template-columns:240px auto minmax(0,1fr) 40px; grid-template-areas:"brand search nav bell"; }
}
@media screen and (min-width:901px) and (max-width:1180px) {
 .top.site-header.has-bell:has(.global-search-trigger) { grid-template-columns:190px 44px minmax(0,1fr) 40px; }
}
@media screen and (max-width:900px) {
 .top.site-header.has-bell:has(.global-search-trigger) { grid-template-columns:minmax(0,1fr) auto auto auto; grid-template-areas:"brand search bell toggle"; }
}
@media screen and (max-width:360px) {
 .site-header.has-bell .brand-name { display:flex; font-size:14px; }
}
/* Workspace is a dropdown at runtime; its static link keeps the same geometry. */
.site-header a.nav-workspace::after { content:'⌄'; font-size:15px; line-height:20px; }
/* One journey button definition for Home and every workspace module. */
@media screen {
 body.home-workspace #home-journey a.hj-step,
 body .workspace-shell.workspace-frame a.workspace-step {
  display:inline-flex; flex-direction:row; align-items:center; justify-content:center;
  box-sizing:border-box; min-height:36px; margin:0; padding:7px 12px!important;
  border:1px solid var(--line,#cddde5)!important; border-radius:6px!important;
  background:var(--panel,#fff); color:var(--ink,#19313d); font-size:13px!important;
  font-weight:650; line-height:20px; text-decoration:none; box-shadow:none;
 }
 body.home-workspace #home-journey a.hj-step strong { min-height:0; font:inherit; }
 body.home-workspace #home-journey a.hj-step:hover,
 body .workspace-shell.workspace-frame a.workspace-step:hover {
  background:var(--brand-soft,#e7f2f2)!important; color:var(--ink,#19313d)!important;
  border-color:var(--brand,#116779)!important;
 }
 body.home-workspace #home-journey a.hj-step[aria-current],
 body .workspace-shell.workspace-frame a.workspace-step[aria-current] {
  background:#116779!important; border-color:#116779!important; color:#fff!important;
 }
 body.home-workspace #home-journey a.hj-step:focus-visible,
 body .workspace-shell.workspace-frame a.workspace-step:focus-visible {
  outline:3px solid var(--brand,#116779); outline-offset:3px;
 }
 body .workspace-shell.workspace-frame .workspace-steps li+li::before { display:none; }
 body .workspace-shell.workspace-frame .workspace-steps { gap:6px; }
}
@media screen and (max-width:600px) {
 body.home-workspace #home-journey a.hj-step,
 body .workspace-shell.workspace-frame a.workspace-step {
  min-height:44px; width:100%; padding:6px 2px!important; font-size:11px!important;
 }
 body .workspace-shell.workspace-frame .workspace-steps { gap:4px; }
}


/* Keep the full identity readable beside mobile search, alerts and menu, on one compact row:
   the wordmark stays two lines, Search becomes a 44 px magnifier (its label stays for screen readers). */
@media screen and (max-width:480px) {
 .top.site-header,.top.site-header.has-bell:has(.global-search-trigger) { height:auto; min-height:0; grid-template-columns:minmax(0,1fr) auto auto; grid-template-areas:"brand search toggle"; row-gap:0; column-gap:6px; }
 .top.site-header.has-bell:has(.global-search-trigger) { grid-template-columns:minmax(0,1fr) auto auto auto; grid-template-areas:"brand search bell toggle"; }
 .site-header .brand,.site-header.has-bell .brand { width:auto; min-width:0; gap:8px; }
 .site-header .brand img { width:32px; height:32px; }
 .site-header .brand-name,.site-header.has-bell .brand-name { display:flex; font-size:15px; min-width:0; }
 .site-header .brand-short { font-size:10px; margin-top:2px; }
 .site-header .global-search-trigger { justify-self:end; width:44px; padding:8px 0; justify-content:center; font-size:0; background:var(--panel,#fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230f4c5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 50% 50%/18px; }
 .site-header .global-search-trigger > span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
}
@media screen and (max-width:480px) {
 :where([data-theme="dark"]) .site-header .global-search-trigger { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238bd1d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
}@media screen and (max-width:480px) and (prefers-color-scheme: dark) {
 :where(:not([data-theme])) .site-header .global-search-trigger { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238bd1d8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
}
@media screen and (max-width:360px) {
 .top.site-header,.top.site-header.has-bell:has(.global-search-trigger) { column-gap:4px; }
 .site-header .brand,.site-header.has-bell .brand { gap:6px; }
 .site-header .brand img { width:28px; height:28px; }
 .site-header .brand-name,.site-header.has-bell .brand-name { font-size:14px; }
 /* Signed in, the bell joins the row: Menu keeps its name for screen readers and shows its icon only. */
 .site-header.has-bell .menu-btn { width:44px; min-height:40px; padding:0; font-size:0; text-align:center; }
 .site-header.has-bell .menu-btn::before { font-size:16px; content:"☰"; }
 .menu-open .site-header.has-bell .menu-btn::before,.site-header.has-bell.menu-open .menu-btn::before { content:"✕"; }
}
/* Nov 20 2026: on laptop widths the menu ran over the search box. Between 1181 and 1680px the search shows as a
   compact button and menu icons hide, so the full menu fits; the menu never spills left over the search. */
@media screen and (min-width:901px) { .site-header .toplinks { justify-content:safe flex-end; } }
@media screen and (min-width:1181px) and (max-width:1680px) {
 .global-search-trigger { width:64px; padding:8px 6px; justify-content:center; font-size:12px; }
 .global-search-trigger kbd { display:none; }
 .site-header .nav-group-icon { display:none; }
 .site-header .nav-group-title,.site-header .nav-workspace,.site-header .nav-help { padding-inline:8px; }
}
@media screen and (min-width:1181px) and (max-width:1400px) {
 .top.site-header { grid-template-columns:190px auto minmax(0,1fr); gap:10px; padding-inline:16px; }
 .top.site-header.has-bell:has(.global-search-trigger) { grid-template-columns:190px auto minmax(0,1fr) 40px; }
 .site-header .brand { width:190px; }
 .site-header .brand-name { font-size:15px; }
 .site-header .nav-group-title,.site-header .nav-workspace,.site-header .nav-help { padding-inline:6px; font-size:12px; gap:4px; }
}
@media screen and (min-width:901px) and (max-width:1180px) {
 .top.site-header { grid-template-columns:168px 44px minmax(0,1fr); }
 .top.site-header.has-bell:has(.global-search-trigger) { grid-template-columns:168px 44px minmax(0,1fr) 40px; }
 .site-header .brand { width:168px; }
 .site-header .brand-name { font-size:13px; }
 .site-header .toplinks { gap:2px; }
 .site-header .nav-group-title,.site-header .nav-workspace,.site-header .nav-help { padding-inline:5px; }
}
/* Narrow desktops show the first word of "Products & Labels" and "Resources & tools"; the full name stays in the panel heading. */
@media screen and (min-width:901px) and (max-width:1180px) { .site-header .nav-label-tail { display:none; } }
