/* Shared header: a floating slate ("solaitra") bar. Tokens fall back to brand values. */
.site-header { position: sticky; top: 12px; z-index: 50; margin: 12px 0 0; padding: 0 16px; }
.site-header .bar {
  --chalk: #E0E7FF;
  max-width: 1128px; margin: 0 auto; min-height: 60px; padding: 8px 8px 8px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--fg, #1E1B4B); color: #fff; border-radius: 16px;
  box-shadow: 0 10px 30px -12px rgba(30,27,75,.45), 0 2px 6px rgba(30,27,75,.12);
}

/* Brand: a slate with a chalk check */
.site-header .brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: #fff; text-decoration: none; font-size: 1.1rem; letter-spacing: -.01em; }
.site-header .brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--primary, #4F46E5); display: grid; place-items: center; flex: none; }
.site-header .brand-mark svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.site-header .brand-name b { font-weight: 800; }
.site-header .brand-name span { font-weight: 500; color: var(--chalk); }

/* Section links: chalk on slate, the current one gets a drawn chalk stroke */
.site-header .links ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-header .links a { position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; color: var(--chalk); text-decoration: none; font-weight: 500; white-space: nowrap; transition: color .2s ease, background-color .2s ease; }
.site-header .links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.site-header .links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 6px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'%3E%3Cpath d='M1 4.2C14 2.2 26 3.6 38 2.9S62 1.6 75 3.3 92 4.1 99 2.4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'%3E%3Cpath d='M1 4.2C14 2.2 26 3.6 38 2.9S62 1.6 75 3.3 92 4.1 99 2.4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0); transition: clip-path .45s cubic-bezier(.16,1,.3,1);
}
.site-header .links a[aria-current="true"] { color: #fff; }
.site-header .links a[aria-current="true"]::after { clip-path: inset(0 0 0 0); }

/* Actions */
.site-header .actions { display: flex; align-items: center; gap: 6px; }
.site-header .login, .site-header .back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .2s ease; }
.site-header .login:hover, .site-header .back:hover { background: rgba(255,255,255,.08); }
.site-header .login svg, .site-header .back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-header .cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 11px; background: #fff; color: var(--fg, #1E1B4B); font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color .2s ease, transform .15s ease; }
.site-header .cta:hover { background: var(--primary-soft, #EEF2FF); }
.site-header .cta:active { transform: translateY(1px); }
.site-header :focus-visible { outline: 3px solid #A5B4FC; outline-offset: 2px; }

/* Menu button + panel (narrow screens) */
.site-header button { font: inherit; }
.site-header .menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; place-items: center; }
.site-header .menu-btn:hover { background: rgba(255,255,255,.08); }
.site-header .menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.site-header .menu-btn .close, .site-header .menu-btn[aria-expanded="true"] .open { display: none; }
.site-header .menu-btn[aria-expanded="true"] .close { display: block; }
.site-header .panel { max-width: 1128px; margin: 8px auto 0; padding: 8px; border-radius: 16px; background: var(--fg, #1E1B4B); box-shadow: 0 20px 40px -16px rgba(30,27,75,.5); }
.site-header .panel[hidden] { display: none; }
.site-header .panel ul { list-style: none; margin: 0; padding: 0; }
.site-header .panel a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 10px; color: #fff; font-weight: 600; text-decoration: none; }
.site-header .panel a:hover, .site-header .panel a[aria-current="true"] { background: rgba(255,255,255,.1); }
.site-header .panel .panel-login { margin-top: 6px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 6px; }

@media (max-width: 68.75em) {
  .site-header .links { display: none; }
  .site-header .menu-btn { display: grid; }
}
@media (max-width: 37.5em) {
  .site-header .login { display: none; }
  .site-header .cta .long { display: none; }
  .site-header .cta { text-transform: capitalize; padding: 0 16px; }
  .site-header .back .long { display: none; }
  .site-header .back { text-transform: capitalize; }
}
@media (max-width: 21.875em) {
  .site-header .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .links a::after { transition: none; }
  .site-header .cta:active { transform: none; }
}
@media (max-width: 27.5em) {
  .site-header .back { width: 44px; padding: 0; justify-content: center; }
  .site-header .back .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site-header .back .label .long { display: inline; }
}
