/* v189: shared header layout and navigation. Page visuals remain in style.css.
   Navigation breakpoint must match assets/js/site.js (900px). */
[hidden] { display: none !important; }
:root { --rr-header-space: 70px; }
html { scroll-padding-top: calc(var(--rr-header-space) + 10px); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 3000;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  transform: none;
}
@media (max-width: 900px) {
  /* v203: the sticky header owns its space in normal document flow.
     Keep body from becoming a separate scroll container; no synthetic spacer. */
  html {
    height: auto !important;
    overflow-x: clip !important;
    overflow-y: auto !important;
  }
  body {
    height: auto !important;
    max-height: none !important;
    padding-top: 0 !important;
    overflow: visible !important;
    transform: none !important;
  }
  .site-header {
    position: sticky;
    inset: 0 0 auto 0;
    flex-shrink: 0;
  }
  .site-header .header-mobile-actions { display: flex; }
  .site-header .menu-toggle { display: block; }
  .site-header .header-nav {
    display: none !important;
    position: absolute;
    top: 100% !important;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100vh - var(--rr-header-space));
    max-height: calc(100dvh - var(--rr-header-space));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 28px rgba(40,53,61,.08);
  }
  .menu-open .site-header .header-nav { display: flex !important; }
  .site-header .header-nav .header-cta-desktop,
  .site-header .header-nav a.header-desktop-letter { display: none !important; }
  .site-header .header-mobile-letter { display: inline-flex !important; }
  .site-header .header-nav a { justify-content: flex-start; }
  .site-header .header-nav a[href="faq.php"] { display: inline-flex !important; }
}
@media (min-width: 901px) {
  .site-header .header-mobile-actions { display: none; }
  .site-header .header-nav { display: flex !important; position: static; }
  /* v192: soften desktop text links by one font-weight step. */
  .site-header .header-nav a:not(.btn):not(.header-desktop-letter) {
    font-weight: 600 !important;
  }
}

/* v456: mobile member shortcut; authenticated markup only. */
.header-mobile-account{display:none;}
@media(max-width:900px){
 .site-header .header-mobile-account{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;border:1px solid #B9DFE8;border-radius:50%;background:#F1F8FA;color:#087B99;text-decoration:none;}
 .site-header .header-mobile-account:focus-visible{outline:2px solid #087B99;outline-offset:3px;}
 .site-header .header-mobile-account:hover{background:#E4F2F7;}
}
@media(max-width:390px){
 .site-header .header-member-actions{gap:6px!important;}
 .site-header .header-member-actions .header-cta-mobile{padding-left:10px!important;padding-right:10px!important;}
}

/* v457: start the daily reset sentence on a new line on phones. */
@media(max-width:600px){.daily-limit-reset{display:block;}}

/* v458: equal outer height and vertical alignment for mobile header shortcuts. */
@media(max-width:900px){
 .site-header .header-mobile-actions{align-items:center!important;}
 .site-header .header-mobile-account,.site-header .header-mobile-letter,.site-header .header-cta-mobile{height:36px!important;min-height:36px!important;box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding-top:0!important;padding-bottom:0!important;}
 .site-header .header-mobile-account,.site-header .header-mobile-letter{width:36px!important;flex:0 0 36px!important;}
}
