/* The header shared by every page of www.poslio.jp (2026-11-23: the owner decided one header for
   all pages; a page differs only when it must, e.g. outsourcing.html keeps its own menu and button).
   Loaded after page.css or the page's inline styles; uses their tokens (--surface, --line, --ink,
   --ink-soft, --accent, --radius). The menu button is site-header.js. */

/* Links into the page stop below the sticky header (72px, 64px on a phone). */
html {
  scroll-padding-top: 88px;
}
/* header */
header.site {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in oklch, var(--surface) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* The header spans the whole window on a PC, the logo and the buttons 40px from its edges
   (2026-11-10, the owner's call: the side margins looked odd on a wide screen). */
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
  max-width: none;
  padding-inline: 40px;
}
header.site img {
  height: 30px;
  width: auto;
  display: block;
}
header.site nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
header.site nav a {
  text-decoration: none;
}
header.site nav a:hover {
  color: var(--accent);
}
/* The way in that is on screen (2026-11-13). */
header.site nav a[aria-current="true"] {
  color: var(--accent);
}
header.site .actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
header.site .btn {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
}
.signin {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}
.signin:hover {
  border-color: var(--ink-soft);
}
.menu-signin,
.menu-toggle {
  display: none;
}
.menu-toggle {
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
  position: relative;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-toggle span::before {
  top: -6px;
}
.menu-toggle span::after {
  top: 6px;
}
.menu-toggle[aria-expanded="true"] span {
  background: transparent;
}
.menu-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}
@media (max-width: 900px) {
  header.site .wrap {
    height: 64px;
    padding-inline: 24px;
  }
}

header.site .wrap > a:first-child {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
/* page.css colours every link with the accent and gives .wrap a top and bottom padding; the
   header keeps its own. */
header.site .wrap {
  padding-block: 0;
}
header.site nav a {
  color: inherit;
}
header.site .btn {
  color: #fff;
  background: var(--accent);
}
@media (max-width: 900px) {
  /* On a phone the menu opens under the header from the button at the right (2026-11-13). */
  header.site nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px 24px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px -16px oklch(0 0 0 / 0.25);
  }
  header.site nav.is-open {
    display: flex;
  }
  header.site nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid var(--line);
  }
  header.site nav a:last-child {
    border-bottom: 0;
  }
  /* The nav's auto margin pushed the button right; without the nav, the button does it. */
  header.site .actions {
    margin-left: auto;
  }
  .menu-toggle {
    display: inline-grid;
  }
}
@media (max-width: 520px) {
  .signin {
    display: none;
  }
  /* The header's sign-in button is gone at this width; the menu carries it instead. */
  header.site nav .menu-signin {
    display: flex;
  }
}
