[data-cw-header-source] { display: none !important; }

.cw-site-header {
  --cw-header-bg: var(--cw-color-surface, #fff);
  --cw-header-text: #2f3338;
  --cw-header-muted: #626b75;
  --cw-header-border: #e7e8eb;
  --cw-header-outline: #e1e3e7;
  --cw-header-accent: var(--cw-marketing-accent, #3264af);
  --cw-header-hover: #f3f4f6;
  position: relative;
  z-index: 40;
  isolation: isolate;
  color: var(--cw-header-text);
  background: var(--cw-header-bg);
  border-block-end: 1px solid var(--cw-header-border);
  font: 500 13px/1.4 Manrope, system-ui, sans-serif;
}

.cw-site-header[data-appearance="dark"] {
  --cw-header-bg: #1d1d1d;
  --cw-header-text: #f2f2f2;
  --cw-header-muted: #bdbdbd;
  --cw-header-border: #303030;
  --cw-header-outline: #393939;
  --cw-header-accent: var(--cw-marketing-accent, #9fc3ed);
  --cw-header-hover: #292929;
  color-scheme: dark;
}

.cw-site-header__row {
  box-sizing: border-box;
  width: min(1320px, calc(100% - 2 * clamp(16px, 3vw, 32px)));
  min-height: 84px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.cw-site-header a { color: inherit; text-decoration: none; }
@media (min-width: 901px) {
  .cw-site-header__row {
    width: calc(100% - 2 * clamp(32px, 2.5vw, 48px));
    max-width: 1320px;
  }
}
.cw-site-header button, .cw-site-header summary { font: inherit; }
.cw-site-header :is(a, button, summary):focus-visible { outline: 2px solid var(--cw-header-accent); outline-offset: 3px; }

.cw-site-header__brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; min-width: 0; }
.cw-site-header__brand img { display: block; width: 38px; height: 38px; object-fit: contain; flex: none; }
.cw-site-header__brand strong { display: block; font-size: 24px; line-height: 1.12; font-weight: 600; letter-spacing: -.035em; }
.cw-site-header__brand small { display: block; margin-top: 5px; color: var(--cw-header-muted); font-size: 8px; font-weight: 500; letter-spacing: .07em; }

.cw-site-header__nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); position: relative; justify-self: start; }
.cw-site-header__nav > details { margin: 0; padding: 0; border: 0; background: none; position: static; }
.cw-site-header__nav > a, .cw-site-header__nav summary { display: flex; align-items: center; min-height: 44px; gap: 7px; white-space: nowrap; cursor: pointer; }
.cw-site-header__nav summary { list-style: none; }
.cw-site-header__nav summary::-webkit-details-marker { display: none; }
.cw-site-header__nav summary svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cw-site-header__nav details[open] summary svg { transform: rotate(180deg); }
.cw-site-header__nav > a:hover, .cw-site-header__nav summary:hover, .cw-site-header__nav [data-current] > summary,
.cw-site-header__nav > a[aria-current="page"] { color: var(--cw-header-accent); }

.cw-site-header__panel {
  box-sizing: border-box;
  position: absolute;
  inset: calc(100% + 12px) auto auto 0;
  width: min(42rem, 56vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--cw-header-border);
  border-radius: 18px;
  background: var(--cw-header-bg);
  box-shadow: 0 14px 40px #00000012, 0 2px 8px #00000005;
}

.cw-site-header__panel a { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 44px; padding: 11px 12px; border-radius: 8px; }
.cw-site-header__panel a:is(:hover,[aria-current="page"]) { background: var(--cw-header-hover); }
.cw-site-header__panel a span { color: var(--cw-header-muted); font-size: .75rem; line-height: 1.45; }
.cw-site-header__tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.cw-site-header__access, .cw-site-header__icon {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  min-width: 44px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--cw-header-text);
  cursor: pointer;
}

.cw-site-header__icon { width: 44px; padding: 0; }
.cw-site-header__icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; }
.cw-site-header__access { gap: 10px; padding-inline: 17px; white-space: nowrap; border-color: var(--cw-header-outline); box-shadow: 0 1px 2px #00000003; }
.cw-site-header__access::after { content: '↗'; font-size: .78em; }
.cw-site-header__access:hover, .cw-site-header__icon:hover { background: var(--cw-header-hover); }
.cw-site-header__menu { display: none; }

@media (max-width: 1060px) {
  .cw-site-header__row { grid-template-columns: 1fr auto auto; min-height: 72px; padding-block: 10px; gap: 8px 12px; }
  .cw-site-header__menu { display: inline-flex; justify-self: end; }
  .cw-site-header__nav { display: none; grid-column: 1 / -1; grid-row: 2; width: 100%; align-items: stretch; gap: 3px; padding-block: 8px; border-block-start: 1px solid var(--cw-header-border); }
  .cw-site-header__menu[aria-expanded="true"] + .cw-site-header__nav { display: flex; flex-direction: column; }
  .cw-site-header__nav summary { justify-content: space-between; }
  .cw-site-header__panel { position: static; width: 100%; padding: 8px; margin-block-end: 5px; box-shadow: none; }
}

@media (max-width: 580px) {
  .cw-site-header__row { grid-template-columns: minmax(0,1fr) auto auto; gap: 4px; min-height: 76px; }
  .cw-site-header__brand { gap: 7px; }
  .cw-site-header__brand img { width: 31px; height: 31px; }
  .cw-site-header__brand strong { font-size: 17px; }
  .cw-site-header__brand small { font-size: 7px; }
  .cw-site-header__tools { grid-column: 2; grid-row: 1; gap: 0; }
  .cw-site-header__access { padding-inline: 10px; font-size: 11px; }
  .cw-site-header__access::after { display: none; }
  .cw-site-header__icon { font-size: 11px; }
  .cw-site-header__menu { grid-column: 3; grid-row: 1; }
  .cw-site-header__nav { grid-row: 2; }
  .cw-site-header__panel { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 365px) {
  .cw-site-header__row { grid-template-columns: minmax(0,1fr) auto; }
  .cw-site-header__tools { grid-column: 1 / -1; grid-row: 2; }
  .cw-site-header__menu { grid-column: 2; }
  .cw-site-header__nav { grid-row: 3; }
}

@media (prefers-reduced-motion: no-preference) {
  .cw-site-header a, .cw-site-header button, .cw-site-header summary { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
}
