.cs-header {
  --cs-header-accent: var(--os-accent, #26766b);
  --cs-header-surface: #fff;
  --cs-header-ink: #65716d;
  --cs-header-hover: #f0f4f2;
  position: relative;
  z-index: 45;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(360px, 680px) minmax(170px, 1fr);
  align-items: center;
  column-gap: 20px;
  height: 76px;
  min-height: 76px;
  flex: none;
  padding: 0 26px;
  background: var(--cs-header-surface);
  border-bottom: 1px solid var(--os-line, #e6ebe8);
  box-shadow: 0 1px 4px #1b302a05;
  color: var(--cs-header-ink);
}
.cs-header .cs-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 0;
  color: var(--os-text, #24332d);
  font: 700 20px/.95 'Space Grotesk', sans-serif;
  letter-spacing: -1px;
  text-decoration: none;
}
.cs-header .os-brand-mark { width: 29px; height: 36px; flex: none; }
.cs-header-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; height: 100%; min-width: 0; }
.cs-header-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 44px;
  min-height: 44px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cs-header-ink);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cs-header-tab::before { content: ''; position: absolute; inset: 10px 0; z-index: -1; border-radius: 9px; }
.cs-header-tab:hover::before, .cs-header-tab.is-open::before { background: var(--cs-header-hover); }
.cs-header-tab.is-active { color: var(--cs-header-accent); }
.cs-header-tab.is-active::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--cs-header-accent); }
.cs-header-tools { position: relative; min-width: 0; height: 100%; }
.cs-header-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 224px;
  max-width: calc(100vw - 24px);
  padding: 7px;
  border: 1px solid var(--os-line, #e3e9e5);
  border-radius: 13px;
  background: var(--cs-header-surface);
  box-shadow: 0 12px 36px #1b302a1c, 0 2px 6px #1b302a08;
}
.cs-header-dropdown a { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 10px 12px; border-radius: 7px; color: var(--os-text, #24332d); font-size: 13px; font-weight: 500; line-height: 1.4; text-decoration: none; }
.cs-header-dropdown a > svg { flex: none; color: var(--cs-header-ink); }
.cs-header-dropdown a:first-child { margin-bottom: 5px; color: var(--cs-header-accent); font-weight: 650; }
.cs-header-dropdown a:hover, .cs-header-dropdown a:focus-visible { background: var(--cs-header-hover); }
.cs-header-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.cs-header-clarity { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: none; min-height: 40px; padding: 0 11px; border: 0; border-radius: 9px; background: var(--cs-header-hover); color: var(--os-text, #24332d); font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.cs-header-clarity > svg { color: var(--cs-header-accent); }
.cs-header-clarity:hover { background: color-mix(in srgb, var(--cs-header-accent) 13%, var(--cs-header-surface)); }
.cs-header-controls > .os-icon, .cs-header-controls > .os-avatar { flex: none; width: 40px; height: 40px; }
.cs-header .cs-header-controls > .os-button.compact { flex: none; min-height: 40px; padding: 8px 12px; font-size: 12px; white-space: nowrap; }
.cs-header :focus-visible { outline: 2px solid var(--cs-header-accent); outline-offset: 3px; }
.cs-header-tab:focus-visible { outline-offset: -6px; border-radius: 9px; }
.cs-header-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
html[data-theme='dark'] .cs-header { --cs-header-surface: var(--os-panel, #18221e); --cs-header-ink: var(--os-muted, #aebdb5); --cs-header-hover: #ffffff0a; }
@media (max-width: 1120px) {
  .cs-header { grid-template-columns: 150px minmax(300px, 1fr) auto; column-gap: 16px; padding-right: 20px; padding-left: 20px; }
  .cs-header-nav { gap: 4px; }
  .cs-header .cs-header-brand { font-size: 18px; gap: 8px; }
  .cs-header-controls { gap: 7px; }
}
@media (max-width: 840px) {
  .cs-header { height: 120px; min-height: 120px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 64px 56px; gap: 0 12px; padding: 0 16px; }
  .cs-header-brand { grid-column: 1; grid-row: 1; }
  .cs-header-controls { grid-column: 2; grid-row: 1; }
  .cs-header-nav { grid-column: 1 / -1; grid-row: 2; gap: 4px; width: 100%; max-width: 680px; justify-self: center; }
  .cs-header-tab::before { inset: 4px 0 7px; }
  .cs-header-dropdown { top: calc(100% + 6px); }
}
@media (max-width: 480px) {
  .cs-header { padding-right: 10px; padding-left: 10px; column-gap: 7px; }
  .cs-header .cs-header-brand { font-size: 16px; gap: 6px; letter-spacing: -.8px; }
  .cs-header .os-brand-mark { width: 24px; height: 32px; gap: 3px; }
  .cs-header .os-brand-mark span { height: 7px; }
  .cs-header .os-brand-mark span:nth-child(2) { width: 20px; margin-left: 4px; }
  .cs-header .os-brand-mark span:nth-child(3) { width: 14px; margin-left: 8px; }
  .cs-header-controls { gap: 5px; }
  .cs-header-clarity { gap: 4px; padding: 0 7px; font-size: 11px; }
  .cs-header-clarity > svg { width: 17px; height: 17px; }
  .cs-header-controls > .os-icon, .cs-header-controls > .os-avatar { width: 34px; height: 38px; }
  .cs-header .cs-header-controls > .os-button.compact { min-height: 38px; padding: 6px 8px; gap: 4px; font-size: 11px; }
  .cs-header-nav { gap: 2px; }
  .cs-header-dropdown { left: 50%; transform: translateX(-60%); width: 218px; }
}

@media (max-width: 360px) {
  .cs-header-controls { gap: 3px; }
  .cs-header-clarity { padding: 0 5px; }
  .cs-header .cs-header-controls > .os-button.compact { padding-right: 6px; padding-left: 6px; font-size: 10px; }
}
@media (min-width: 1400px) {
  .os-chat-open .cs-header { grid-template-columns: 150px minmax(300px, 1fr) auto; column-gap: 16px; padding-right: 20px; padding-left: 20px; }
  .os-chat-open .cs-header-nav { gap: 4px; }
  .os-chat-open .cs-header .cs-header-brand { font-size: 18px; gap: 8px; }
  .os-chat-open .cs-header-controls { gap: 7px; }
}

.cs-header-search-host{flex:none;display:flex;justify-content:center;padding:10px 26px;border-bottom:1px solid var(--os-line);background:var(--os-panel)}
.cs-header-search-host .os-search{margin:0;width:min(620px,100%);max-width:100%;flex:0 1 620px}
@media(max-width:760px){.cs-header-search-host{padding:8px 12px}.cs-header-search-host .os-search{display:flex;width:100%;max-width:100%}}
