/* Sam Journal 1.0.3 — complete [sam_header] component. */
.smj-site-header, .smj-site-header * { box-sizing:border-box; }
.smj-site-header {
  position:relative; z-index:1000; width:100%; max-width:1120px!important;
  margin:0 auto!important; padding:0 24px!important; overflow:visible;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:18px; font-weight:600; line-height:1.4; letter-spacing:-.35px;
  color:#1d1d1f; text-align:left;
}
.smj-site-header [hidden] { display:none!important; }
.smj-site-header :is(p,div,nav) { margin-block:0; }
.smj-site-header p { padding:0; }
.smj-site-header p:empty { display:none; }
.smj-site-header .smj-site-header-row { position:relative; display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; min-width:0; padding:0; }
.smj-site-header .smj-site-brand { flex:0 0 auto; }
.smj-site-header a {
  display:inline-block; margin:0!important; padding:0!important; border:0;
  font:inherit!important; letter-spacing:inherit!important; text-transform:none!important;
  text-decoration:none!important; white-space:nowrap; background:transparent; box-shadow:none!important;
}
.smj-site-header a::before, .smj-site-header a::after { content:none!important; }
.smj-site-header .smj-site-name { color:#1d1d1f; }
.smj-site-header .smj-site-links { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; padding:0; }
.smj-site-header .smj-site-links a { color:#98989d; transition:color .2s; }
.smj-site-header .smj-site-links a:hover { color:#6e6e73; }
.smj-site-header .smj-site-toggle-wrap { margin-left:auto; flex:0 0 44px; }
.smj-site-header .smj-site-toggle {
  appearance:none; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; width:44px; height:44px; min-height:44px; margin:0; padding:0;
  border:0; border-radius:10px; box-shadow:none; background:transparent; color:#1d1d1f; cursor:pointer;
  touch-action:manipulation; -webkit-tap-highlight-color:transparent;
}
.smj-site-header .smj-site-toggle span { display:block; width:22px; height:2px; margin:0; padding:0; background:currentColor; border-radius:2px; transition:transform .2s; }
.smj-site-header .smj-site-toggle[aria-expanded="true"] span:first-child { transform:translateY(4px) rotate(45deg); }
.smj-site-header .smj-site-toggle[aria-expanded="true"] span:last-child { transform:translateY(-4px) rotate(-45deg); }
.smj-site-header :is(a,button):focus { outline:none; }
.smj-site-header :is(a,button):focus-visible { outline:2px solid #0071e3; outline-offset:4px; border-radius:5px; }
/* Only ancestors of this component lose the theme's duplicate width/padding.
   The component supplies a consistent 1120px frame and 24px side inset. */
.wp-site-blocks > header.wp-block-template-part:has(.smj-site-header),
.wp-site-blocks > header.wp-block-template-part :is(.wp-block-group,.wp-block-columns,.wp-block-column):has(.smj-site-header) {
  box-sizing:border-box; width:100%!important; max-width:none!important; min-width:0;
  margin-inline:0!important; padding-inline:0!important; overflow:visible;
}
@media (min-width:601px) {
  .smj-site-header .smj-site-toggle-wrap { display:none!important; }
}
@media (max-width:600px) {
  .smj-site-header .smj-site-header-row { min-height:44px; }
  /* Without JavaScript, links remain visible and usable under the name. */
  .smj-site-header .smj-site-links { flex-basis:100%; }
  .smj-site-header[data-smj-header-ready] .smj-site-header-row { flex-wrap:nowrap; gap:0; }
  .smj-site-header[data-smj-header-ready] .smj-site-links {
    position:absolute; top:calc(100% + 10px); right:0; z-index:1;
    display:flex; flex-direction:column; align-items:stretch; flex-wrap:nowrap; gap:0;
    width:min(260px,calc(100vw - 48px)); max-width:calc(100vw - 48px);
    padding:8px; border:1px solid #e8e8ec; border-radius:16px;
    background:#fff; box-shadow:0 12px 35px rgba(0,0,0,.1);
  }
  .smj-site-header .smj-site-links a { display:block; padding:12px 14px!important; border-radius:10px; }
  .smj-site-header .smj-site-links a:hover { background:#f5f5f7; }
}
@media (prefers-reduced-motion:reduce) {
  .smj-site-header * { transition:none!important; }
}
