[hidden] {
  display: none !important;
}

html[data-auth-state='pending'] .site-header-controls,
html[data-auth-state='pending'] [data-auth-cta],
html[data-auth-state='pending'] [data-trial-cta]:not([data-pricing-card]),
html[data-auth-state='pending'] [data-trial-capture] {
  visibility: hidden;
}

html[data-auth-state='pending'] [data-pricing-card] {
  pointer-events: none;
}

/* 'likely-authenticated' and the pre-fetch 'signed-out' are set before first paint by an inline
   <head> script that checks for the __Host-pr_csrf cookie (set/cleared in lockstep with the
   session cookie). It is only a hint: /api/billing/status later confirms 'authenticated' or
   corrects to 'signed-out', after which the hidden attributes it renders take over. */
html[data-auth-state='likely-authenticated'] [data-header-login] {
  display: none !important;
}

html[data-auth-state='likely-authenticated'] .site-header-account[data-header-account][hidden] {
  display: inline-flex !important;
}

html[data-auth-state='likely-authenticated'] .site-header-menu [data-header-account][hidden] {
  display: block !important;
}

html[data-auth-state='likely-authenticated'] [data-header-action] {
  display: none !important;
}

html[data-auth-state='likely-authenticated'] [data-auth-cta],
html[data-auth-state='likely-authenticated'] [data-trial-cta]:not([data-pricing-card]),
html[data-auth-state='likely-authenticated'] [data-trial-capture] {
  visibility: hidden;
}

html[data-auth-state='likely-authenticated'] [data-pricing-card] {
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  width: 100%;
  padding: 14px clamp(18px, 5vw, 48px);
  border-bottom: 1px solid transparent;
  background: rgba(242, 240, 233, 0.92);
  backdrop-filter: blur(12px);
}

.site-header[data-scrolled] {
  border-bottom-color: rgba(221, 217, 204, 0.78);
}

.site-header-inner {
  display: flex;
  width: min(100%, 1120px);
  min-height: 42px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-header-brand {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  align-items: center;
  color: #16150f;
  font: 700 21px/1 "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.site-header-brand:hover,
.site-header-brand:focus-visible {
  color: #16150f;
}

.site-header-brand-icon {
  display: none;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.site-header[data-scrolled] .site-header-brand-text {
  display: none;
}

.site-header[data-scrolled] .site-header-brand-icon {
  display: block;
}

.site-header-controls,
.site-header-desktop {
  display: flex;
  min-width: 0;
  align-items: center;
}

.site-header-controls {
  justify-content: flex-end;
  gap: 10px;
}

.site-header-desktop {
  gap: 18px;
}

.site-header-contact {
  display: inline-flex;
  min-height: 42px;
  padding: 10px 15px;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9c5b8;
  border-radius: 999px;
  color: #16150f;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-header-contact:hover,
.site-header-contact:focus-visible {
  border-color: #a8a496;
  background: rgba(255, 255, 255, 0.55);
  color: #16150f;
}

.site-header-language {
  display: inline-flex;
  height: 42px;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid #c9c5b8;
  border-radius: 21px;
}

.site-header-language button {
  height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: #5c594e;
  font: 500 12px "Instrument Sans", sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.site-header-language button.is-active {
  background: #ddd9cc;
  color: #16150f;
}

.site-header-account,
.site-header-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-header-account {
  min-width: 112px;
  padding: 10px 15px;
  border: 1px solid #c9c5b8;
  color: #16150f;
}

.site-header-account:hover,
.site-header-account:focus-visible {
  border-color: #a8a496;
  background: rgba(255, 255, 255, 0.55);
  color: #16150f;
}

.site-header-action {
  min-width: 112px;
  padding: 11px 18px;
  background: #16150f;
  color: #fff;
}

.site-header-action:hover,
.site-header-action:focus-visible {
  background: #303025;
  color: #fff;
}

.site-header-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9c5b8;
  border-radius: 50%;
  background: transparent;
  color: #16150f;
  cursor: pointer;
}

.site-header-menu-toggle svg {
  width: 20px;
  height: 20px;
}

.site-header-menu {
  position: absolute;
  top: calc(100% - 5px);
  right: clamp(18px, 5vw, 48px);
  width: min(300px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid #ddd9cc;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(22, 21, 15, 0.16);
}

.site-header-menu > a {
  display: block;
  padding: 13px 12px;
  border-radius: 11px;
  color: #16150f;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.site-header-menu > a:hover,
.site-header-menu > a:focus-visible {
  background: #f2f0e9;
  color: #16150f;
}

.site-header-language-menu {
  margin-top: 8px;
  padding: 14px 12px 8px;
  border-top: 1px solid #e6e3d8;
}

.site-header-language-menu p {
  margin: 0 0 8px;
  color: #6f6b5e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-header-language-menu button {
  display: flex;
  width: 100%;
  padding: 9px 0;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  color: #16150f;
  font: 500 15px "Instrument Sans", sans-serif;
  text-align: left;
  cursor: pointer;
}

.site-auth-notice {
  width: min(calc(100% - 40px), 760px);
  margin: 14px auto 0;
  padding: 13px 16px;
  border: 1px solid #dd8b7d;
  border-radius: 13px;
  background: #fff1ee;
  color: #712417;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .site-header {
    padding-block: 11px;
  }

  .site-header-inner {
    gap: 7px;
  }

  .site-header-desktop {
    display: none;
  }

  .site-header-controls {
    gap: 7px;
  }

  .site-header-menu-toggle {
    display: inline-flex;
    flex: 0 0 42px;
  }

  .site-header-action {
    min-width: 0;
    min-height: 40px;
    padding: 10px 13px;
    font-size: 13px;
  }
}

@media (max-width: 390px) {
  .site-header-brand {
    font-size: 18px;
  }

  .site-header-action {
    padding-inline: 11px;
    font-size: 12.5px;
  }
}
