/* Public page chrome uses its own tokens so the page families share one header. */
.public-header {
  --header-bg: #fafaff;
  --header-text: #172136;
  --header-muted: #4e5c74;
  --header-border: #e0e3ef;
  --header-active: #eceeff;
  --header-accent: #4f46e5;
  --header-accent-hover: #4239cf;
  --header-focus: #5146f0;
  position: relative;
  z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  color: var(--header-text);
  font: 500 14px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.public-header *, .public-header *::before, .public-header *::after { box-sizing: border-box; }
.public-header-bar {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.public-header .public-header-bar :is(a, summary, button) {
  color: var(--header-text);
  font: inherit;
  text-decoration: none;
}
.public-header .public-header-bar :is(a, summary, button):focus-visible {
  outline: 2px solid var(--header-focus);
  outline-offset: 2px;
}
.public-header .public-header-brand {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  min-inline-size: 0;
  min-block-size: 44px;
  gap: 8px;
  font-size: 17px;
  font-weight: 750;
}
.public-header-brand img { display: block; width: 32px; height: 32px; object-fit: contain; flex: none; }
.public-header-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-header .public-navigation, .public-header-desktop-actions { display: none; }
.public-header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.public-header .public-header-actions .public-header-download {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--header-accent);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}
.public-header .public-header-actions .public-header-download:hover { background: var(--header-accent-hover); }
.public-header details { margin: 0; }
.public-header summary { cursor: pointer; list-style: none; }
.public-header summary::-webkit-details-marker { display: none; }
.public-header :is(.public-header-language, .public-navigation-group) > summary::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 0 3px 8px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.public-navigation-mobile > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-inline-size: 44px;
  min-block-size: 44px;
  padding-inline: 10px;
  border: 1px solid var(--header-border);
  border-radius: 12px;
  white-space: nowrap;
}
.public-navigation-mobile[open] > summary { background: var(--header-active); }
.public-menu-icon { width: 14px; height: 11px; border-block: 1.5px solid currentColor; position: relative; }
.public-menu-icon::after { content: ""; position: absolute; width: 100%; top: 50%; border-top: 1.5px solid currentColor; transform: translateY(-50%); }
.public-navigation-panel, .public-navigation-desktop .public-navigation-group > ul, .public-header-desktop-actions .public-header-language > ul {
  position: absolute;
  background: var(--header-bg);
  border: 1px solid var(--header-border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .15);
}
.public-navigation-panel {
  inset: 100% max(16px, calc((100% - 1120px) / 2)) auto auto;
  width: min(320px, calc(100% - 32px));
  max-height: min(75vh, calc(100dvh - 80px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px;
}
.public-header ul { list-style: none; margin: 0; padding: 0; }
.public-navigation-panel :is(a, summary, button), .public-header-desktop-actions .public-header-language li a {
  display: flex;
  align-items: center;
  width: 100%;
  min-block-size: 44px;
  padding: 9px 10px;
  border-radius: 8px;
}
.public-navigation-panel button, .public-header-desktop-actions button {
  border: 0;
  background: none;
  text-align: start;
  cursor: pointer;
}
.public-navigation-panel :is(.public-navigation-group, .public-header-language) > ul { padding-inline-start: 12px; }
.public-navigation-caption { display: block; padding: 8px 10px 2px; color: var(--header-muted); font-size: 13px; font-weight: 700; }
.public-header :is(.public-navigation, .public-navigation-panel, .public-header-desktop-actions) :is(a, summary, button):hover,
.public-header :is(.public-navigation, .public-navigation-panel, .public-header-desktop-actions) a[aria-current="page"] {
  background: var(--header-active);
}
@media (max-width: 379px) {
  .public-header-bar { width: calc(100% - 24px); gap: 6px; }
  .public-header .public-header-brand { gap: 6px; font-size: 15px; }
  .public-header-brand img { width: 28px; height: 28px; }
  .public-header .public-header-actions .public-header-download { padding-inline: 9px; font-size: 13px; }
  .public-header .public-navigation-mobile > summary { padding-inline: 8px; font-size: 13px; }
}
@media (min-width: 1100px) {
  .public-header-bar { min-height: 72px; gap: 14px; }
  .public-header .public-header-brand { font-size: 19px; }
  .public-header .public-navigation { display: block; margin-inline-start: auto; }
  .public-navigation-desktop, .public-header-desktop-actions { display: flex; align-items: center; gap: 3px; }
  .public-navigation-compact { display: none; }
  .public-header-actions { margin-inline-start: 0; }
  .public-header :is(.public-navigation-group, .public-header-language) { position: relative; }
  .public-navigation-desktop .public-navigation-group > ul, .public-header-desktop-actions .public-header-language > ul {
    min-inline-size: 168px;
    top: 100%;
    padding: 5px;
  }
  .public-header-desktop-actions .public-header-language > ul { inset-inline-end: 0; }
  .public-navigation-desktop a, .public-navigation-desktop summary,
  .public-header-desktop-actions > :is(a, form), .public-header-desktop-actions summary {
    display: block;
    padding: 12px 8px;
    border-radius: 8px;
    white-space: nowrap;
  }
  .public-header-desktop-actions form { padding: 0; }
  .public-header-desktop-actions button { padding: 12px 8px; border-radius: 8px; }
  .public-header .public-header-actions .public-header-download { padding-inline: 15px; }
}
@media (prefers-color-scheme: dark) {
  .public-header {
    --header-bg: #151925;
    --header-text: #f1f3fa;
    --header-muted: #afb9ce;
    --header-border: #30384a;
    --header-active: #2a334b;
    --header-accent: #5450db;
    --header-accent-hover: #4945c1;
    --header-focus: #a9a8ff;
  }
}
