/* Master header for every public page (home, gadget pages). One stylesheet
   so the static home page and the server-rendered pages cannot drift apart.
   Design: Trek XP header artifact — a solid green band, square buttons. */

.site-header {
  background: #2E6E4D;
  color: #fff;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.site-header .bar {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 0 auto;
  padding: 16px 36px;
}
.site-header .brand {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 20px;
  font-weight: 900;
  gap: 10px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-header .brand:hover { color: #fff; text-decoration: none; }
.site-header nav { align-items: center; display: flex; gap: 12px; }
.site-header .hbtn {
  border: 2px solid;
  border-radius: 0;
  cursor: pointer;
  font: 800 15px/1.2 'Nunito', system-ui, sans-serif;
  padding: 10px 20px;
  text-decoration: none;
  white-space: nowrap;
}
.site-header .hbtn:hover { text-decoration: none; }
.site-header .register { background: transparent; border-color: oklch(0.85 0.13 85); color: #fff; }
.site-header .register:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.site-header .login { background: #fff; border-color: #fff; color: #2E6E4D; }
.site-header .login:hover { background: oklch(0.92 0.05 150); border-color: oklch(0.92 0.05 150); color: #2E6E4D; }

@media (max-width: 760px) {
  .site-header .bar { gap: 12px; padding: 12px 16px; }
  .site-header nav { gap: 8px; }
  .site-header .hbtn { font-size: 14px; padding: 8px 14px; }
}

/* Hidden for a signed-in customer (site-header.js). */
.site-header .hbtn[hidden] { display: none; }

/* ---- account button and menu (site-header.js) ---- */
.site-header .acct { position: relative; }
.site-header .acct-btn { align-items: center; background: #fff; border-color: #fff; color: #2E6E4D; display: inline-flex;
  gap: 10px; padding: 6px 12px 6px 6px; }
.site-header .acct-btn:hover, .site-header .acct-btn[aria-expanded="true"] {
  background: oklch(0.92 0.05 150); border-color: oklch(0.92 0.05 150); }
.site-header .acct-pic { background: #e3f2e6; border: 1px solid oklch(0.84 0.03 150); display: block; flex: none;
  height: 30px; object-fit: cover; width: 30px; }
.site-header .acct-pic.big { height: 52px; width: 52px; }
.site-header .acct-name { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; }
.site-header .acct-caret { border-bottom: 2px solid currentColor; border-right: 2px solid currentColor; height: 7px;
  margin: -4px 2px 0 0; transform: rotate(45deg); transition: transform 0.15s; width: 7px; }
.site-header .acct-btn[aria-expanded="true"] .acct-caret { margin-top: 4px; transform: rotate(-135deg); }

.site-header .acct-menu { background: #fff; border: 1px solid oklch(0.84 0.03 150);
  box-shadow: 0 14px 34px oklch(0.25 0.05 155 / 0.22); color: #1d2a22; display: flex; flex-direction: column;
  min-width: 250px; padding: 8px; position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; }
.site-header .acct-menu[hidden] { display: none; }
.site-header .acct-head { align-items: center; border-bottom: 1px solid oklch(0.9 0.02 150); display: flex; gap: 12px;
  margin-bottom: 6px; padding: 6px 6px 12px; }
.site-header .acct-head div { display: flex; flex-direction: column; min-width: 0; }
.site-header .acct-head b { font-size: 16px; font-weight: 900; }
.site-header .acct-head span { color: oklch(0.45 0.04 155); font-size: 13px; font-weight: 700; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.site-header .acct-menu [role="menuitem"] { background: none; border: 0; color: #1d2a22; cursor: pointer; display: block;
  font: 800 15px 'Nunito', system-ui, sans-serif; padding: 10px 10px; text-align: left; text-decoration: none; width: 100%; }
.site-header .acct-menu [role="menuitem"]:hover, .site-header .acct-menu [role="menuitem"]:focus-visible {
  background: oklch(0.95 0.03 150); outline: none; }
.site-header .acct-menu .acct-out { border-top: 1px solid oklch(0.9 0.02 150); color: oklch(0.5 0.17 25); margin-top: 6px; }
.site-header .acct-menu .acct-primary { background: #2E6E4D; color: #fff; margin: 4px 0; text-align: center; }
.site-header .acct-menu .acct-primary:hover, .site-header .acct-menu .acct-primary:focus-visible { background: oklch(0.32 0.07 155); }
.site-header .acct-pitch { color: oklch(0.45 0.04 155); font-size: 13.5px; font-weight: 700; margin: 4px 6px 8px; }
@media (max-width: 760px) {
  .site-header .acct-btn { padding: 4px 8px 4px 4px; }
  .site-header .acct-pic { height: 26px; width: 26px; }
  .site-header .acct-name { max-width: 8ch; }
}
@media (max-width: 400px) {
  .site-header .acct-name { display: none; }  /* the picture is enough on the narrowest phones */
}
@media (prefers-reduced-motion: reduce) { .site-header .acct-caret { transition: none; } }
