/* Shared navigation stays independent of each page's content width and styles. */
.site-header .language-switcher {
  display: inline-flex;
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.site-header .language-switcher button {
  min-width: 32px;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #6e6e73;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
}
.site-header .language-switcher button:hover { color: #1d1d1f; }
html { scrollbar-gutter: stable; }
.messages .notice.signup-bonus {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 10px 8px 18px;
  border-color: #e5e5e7;
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 14px;
  line-height: 1.5;
}
.signup-bonus > span { flex: 1; min-width: 0; }
.notification-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6e6e73;
  font-size: 24px;
  line-height: 1;
}
.notification-close:hover { background: #e8e8eb; color: #1d1d1f; }
.test-reset-card { max-width: 760px; margin-bottom: 30px; }
.test-reset-card > .body-small { margin-top: 16px; }
.test-reset-card > form { margin-top: 24px; }
.test-reset-card .card-links { flex-wrap: wrap; }
.test-reset-card dd { overflow-wrap: anywhere; }
@media (max-width: 650px) { .test-reset-card > form .button { width: 100%; } }
.demo-banner {
  padding: 9px 16px;
  background: #f5f5f7;
  color: #6e6e73;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0;
}
.demo-banner .live-dot { width: 5px; height: 5px; background: #1d1d1f; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  width: min(1120px, calc(100% - 48px));
  min-height: 80px;
  margin: 0 auto;
  padding: 0;
  border-bottom: 1px solid #e5e5ea;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-right: auto;
  color: #1d1d1f;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.055em;
  text-decoration: none;
  white-space: nowrap;
}
.site-header .brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #1d1d1f;
  color: #fff;
}
.site-header .brand-mark .icon { width: 19px; height: 19px; stroke-width: 1.7; }
.site-header .brand-dot { color: #1d1d1f; }
.site-header .main-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 24px;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
}
.site-header .main-nav > a {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  padding: 10px 0;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.site-header .main-nav > a:hover,
.site-header .main-nav > a[aria-current="page"] { color: #1d1d1f; }
.site-header .main-nav > a[aria-current="page"]::after {
  right: 0;
  bottom: 0;
  width: auto;
  height: 2px;
  background: #1d1d1f;
}
.site-header .header-actions { display: flex; align-items: center; flex: none; gap: 16px; margin: 0; }
.site-header .credit-pill {
  min-height: 44px;
  padding: 8px 12px;
  gap: 6px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  color: #1d1d1f;
}
.site-header .credit-pill strong { font-size: 14px; font-weight: 600; }
.site-header .account-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.site-header .account-link:hover,
.site-header .account-menu.is-current > .account-link { color: #1d1d1f; }
.site-header .account-menu { position: relative; flex: none; }
.site-header .account-link { cursor: pointer; list-style: none; }
.site-header .account-link::-webkit-details-marker { display: none; }
.site-header .account-link::marker { content: ""; }
.site-header .account-link .icon { flex: none; width: 14px; height: 14px; }
.site-header .account-menu[open] > .account-link { background: #f5f5f7; color: #1d1d1f; }
.site-header .account-menu[open] > .account-link .icon { transform: rotate(180deg); }
.site-header .account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 190px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border: 1px solid #e5e5ea;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 12px 32px #1d1d1f1f;
}
.site-header .account-menu-panel > a,
.site-header .account-menu-panel button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #1d1d1f;
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
}
.site-header .account-menu-panel > a:hover,
.site-header .account-menu-panel > a[aria-current="page"],
.site-header .account-menu-panel button:hover { background: #f5f5f7; color: #1d1d1f; }
.site-header .account-menu-panel form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid #e5e5ea; }
.site-header .account-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 12px;
}
.site-header .sign-in { display: inline-flex; align-items: center; min-height: 44px; color: #6e6e73; font-size: 13px; text-decoration: none; }
.site-header .button {
  min-height: 44px;
  padding: 9px 16px;
  gap: 10px;
  border: 1px solid #1d1d1f;
  border-radius: 99px;
  background: #1d1d1f;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
}
.site-header .button:hover { background: #3a3a3c; color: #fff; }
.site-header .button .icon { width: 15px; height: 15px; }
.site-header .admin-menu { margin: 0; }

@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding: 12px 0 0; }
  .site-header .brand { font-size: 18px; gap: 8px; }
  .site-header .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
  .site-header .main-nav { order: 3; flex: 0 0 100%; min-height: 52px; margin-top: 10px; border-top: 1px solid #e5e5ea; gap: 24px; }
  .site-header .header-actions { gap: 10px; }
  .site-header .account-avatar { display: none; }
  .site-header .credit-pill { padding: 8px 10px; }
  .site-header .credit-pill strong { font-size: 13px; }
  .site-header .account-link { gap: 6px; }
  .site-header .main-nav > .admin-menu { margin-left: auto; }
}
@media (max-width: 650px) {
  .site-header { width: calc(100% - 32px); }
  .site-header .main-nav { gap: 20px; }
  .site-header .button { padding: 9px 12px; font-size: 12px; }
  .site-header .button .icon { display: none; }
  .site-header .sign-in { font-size: 12px; }
}
@media (max-width: 370px) {
  .site-header .brand { font-size: 17px; }
  .site-header .brand-mark { display: none; }
  .site-header .header-actions { gap: 8px; }
  .site-header .account-link { gap: 4px; padding: 0 2px; }
  .site-header .credit-pill { padding: 8px; }
}

/* A compact guest header leaves the first phone screen for the upload. */
.site-header .main-nav > a { justify-content: center; min-width: 44px; }
.site-header .admin-menu > summary { color: #6e6e73; }
.site-header .admin-menu > summary:hover,
.site-header .admin-menu[open] > summary,
.site-header .admin-menu .admin-menu-links > a:hover,
.site-header .admin-menu .admin-menu-links > a[aria-current="page"] { background: #f5f5f7; color: #1d1d1f; }
.site-header a:focus-visible,
.site-header button:focus-visible,
.site-header summary:focus-visible { outline: 3px solid #86868b; outline-offset: 3px; }
@media (max-width: 900px) {
  .site-header:not(:has(.account-menu)) { flex-wrap: nowrap; column-gap: 12px; min-height: 72px; padding: 12px 0; }
  .site-header:not(:has(.account-menu)) .main-nav { order: 0; flex: none; min-height: 44px; margin: 0; border: 0; }
  /* The brand is the home link on a small screen. */
  .site-header:not(:has(.account-menu)) .main-nav > a[href="/"] { display: none; }
}
@media (max-width: 520px) {
  .site-header .brand { gap: 7px; font-size: 17px; }
  .site-header .brand-mark { width: 27px; height: 27px; }
  .site-header .brand-mark .icon { width: 18px; height: 18px; }
  .site-header .main-nav { gap: 12px; }
  .site-header .main-nav > a { font-size: 12px; }
  .site-header .header-actions { gap: 8px; }
  .site-header .account-link { font-size: 12px; }
  .site-header .admin-menu > summary { padding-inline: 6px; }
  .site-header .credit-pill { position: relative; }
  /* Preserve the credit label for screen readers while the balance stays visible. */
  .site-header .credit-pill > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
}
@media (max-width: 370px) {
  .site-header,.site-header:not(:has(.account-menu)) { column-gap: 8px; }
  .site-header .brand { font-size: 16px; }
  .site-header .brand-mark { display: grid; }
  .site-header .header-actions { gap: 6px; }
}

/* Keep account and language actions beside the brand on phones. */
@media (max-width: 650px) {
  .site-header,
  .site-header:not(:has(.account-menu)) {
    flex-wrap: wrap;
    gap: 0 8px;
    padding: 10px 0 0;
  }
  .site-header .brand { order: 0; margin-inline-end: auto; }
  .site-header .header-actions { order: 1; gap: 4px; }
  .site-header .main-nav,
  .site-header:not(:has(.account-menu)) .main-nav {
    order: 2;
    flex: 0 0 100%;
    min-height: 48px;
    margin: 6px 0 0;
    border: 0;
  }
  .site-header .language-switcher { margin: 0; }
}
