/* The About and Resources menus in the site header, plus the lantern beside the wordmark.
   Shared by both headers: .site-header (pages styled by styles.css) and .mc-header (Claude Design pages).
   Sizes are in px because some design pages change the root font size.
   Behavior lives in js/header-menus.js. */

/* The lantern from the cover (images/lantern-white.png), beside the wordmark. */
.wordmark,
.mc-wordmark { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap; }
/* The phone Menu button keeps its label and icon on one line. */
.nav-toggle,
.mc-nav-toggle { white-space: nowrap; flex-shrink: 0; }
.nav-mark { width: 11px; height: 30px; flex: none; }

/* A menu: a button in the header that opens a panel of links. */
.nav-menu { position: relative; display: flex; align-items: center; }
.site-nav .nav-menu-button,
.mc-nav .nav-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.82);
  background: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
/* Pages styled by styles.css set their links to 0.9rem and the body line height, so the buttons do too. */
.site-nav .nav-menu-button { font-size: 0.9rem; line-height: 1.6; }
.nav-menu-button::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.nav-menu-button[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }
.site-nav .nav-menu-button:hover,
.mc-nav .nav-menu-button:hover,
.nav-menu-button[aria-expanded="true"] { color: #fff; }
/* The menu holding the page you're on. */
.nav-menu:has([aria-current="page"]) > .nav-menu-button { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.nav-menu-button:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 2px; }

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 18px);
  left: -20px;
  z-index: 60;
  min-width: 220px;
  padding: 14px 8px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 48, 73, 0.22);
}
.nav-menu-panel[hidden] { display: none; }
.nav-menu-wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 480px; left: -160px; }
.nav-menu-wide[hidden] { display: none; }
.nav-menu-title { display: none; }
.nav-menu-heading {
  margin: 0 0 6px;
  padding: 0 12px;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5A6B78;
}
.site-nav .nav-menu-panel a,
.mc-nav .nav-menu-panel a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  color: #003049;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav .nav-menu-panel a:hover,
.mc-nav .nav-menu-panel a:hover { background: #EEF4F5; color: #003049; }
.site-nav .nav-menu-panel a[aria-current="page"],
.mc-nav .nav-menu-panel a[aria-current="page"] { background: #DFEDEE; color: #003049; text-decoration: none; }
.site-nav .nav-menu-panel a:focus-visible,
.mc-nav .nav-menu-panel a:focus-visible { outline: 2px solid #B92D28; outline-offset: 0; }

/* Reader links without the code: greyed, with a lock, and they go to the code box. */
.site-nav .nav-menu-panel a.is-locked,
.mc-nav .nav-menu-panel a.is-locked { color: #5A6B78; }
.nav-reader-link.is-locked::before {
  content: "";
  flex: none;
  width: 12px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 13'%3E%3Crect x='1' y='5.5' width='10' height='7' rx='1.5'/%3E%3Cpath d='M3.5 5.5V4a2.5 2.5 0 0 1 5 0v1.5' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 13'%3E%3Crect x='1' y='5.5' width='10' height='7' rx='1.5'/%3E%3Cpath d='M3.5 5.5V4a2.5 2.5 0 0 1 5 0v1.5' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.site-nav .nav-menu-panel a.nav-reader-action,
.mc-nav .nav-menu-panel a.nav-reader-action { margin-top: 6px; font-weight: 700; color: #0E6E6E; }

/* Phones and small tablets: inside the Menu, each menu is a titled section that's always open. */
@media (max-width: 980px) {
  .site-nav .nav-menu-button,
  .mc-nav .nav-menu-button { display: none; }
  .nav-menu { display: block; padding: 8px 0 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
  .nav-menu-panel,
  .nav-menu-panel[hidden],
  .nav-menu-wide,
  .nav-menu-wide[hidden] {
    display: block;
    position: static;
    width: auto;
    min-width: 0;
    padding: 0;
    background: none;
    box-shadow: none;
  }
  .nav-menu-title {
    display: block;
    margin: 4px 0;
    font-family: "Montserrat", system-ui, sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7FB8BE;
  }
  .nav-menu-group + .nav-menu-group { margin-top: 10px; }
  .nav-menu-heading { padding: 0 4px; color: rgba(255, 255, 255, 0.6); }
  .site-nav .nav-menu-panel a,
  .mc-nav .nav-menu-panel a { padding: 10px 4px; font-size: 16px; color: rgba(255, 255, 255, 0.88); }
  .site-nav .nav-menu-panel a:hover,
  .mc-nav .nav-menu-panel a:hover { background: none; color: #fff; }
  .site-nav .nav-menu-panel a[aria-current="page"],
  .mc-nav .nav-menu-panel a[aria-current="page"] { background: none; color: #fff; text-decoration: underline; text-underline-offset: 6px; }
  .site-nav .nav-menu-panel a.is-locked,
  .mc-nav .nav-menu-panel a.is-locked { color: rgba(255, 255, 255, 0.6); }
  .site-nav .nav-menu-panel a.nav-reader-action,
  .mc-nav .nav-menu-panel a.nav-reader-action { color: #7FB8BE; }
  .site-nav .nav-menu-panel a:focus-visible,
  .mc-nav .nav-menu-panel a:focus-visible { outline-color: #fff; }
}
/* The phone menu gets long with both sections open, so it scrolls. */
@media (max-width: 980px) {
  .site-header.is-menu-open .site-nav,
  .mc-header.is-menu-open .mc-nav { max-height: calc(100vh - 64px); overflow-y: auto; }
}

/* Computers: a soft pill behind the header item you point at or tab to, so each one reads as clickable.
   The items get a little padding for the pill, and the gap between them shrinks by the same amount. */
@media (min-width: 981px) {
  .site-nav,
  .mc-nav { gap: 6px; }
  .site-nav > a.nav-link,
  .mc-nav > a:not(.mc-nav-buy):not(.mc-nav-cta),
  .site-nav .nav-menu-button,
  .mc-nav .nav-menu-button {
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.15s ease;
  }
  .site-nav > a.nav-link:hover,
  .mc-nav > a:not(.mc-nav-buy):not(.mc-nav-cta):hover,
  .site-nav .nav-menu-button:hover,
  .mc-nav .nav-menu-button:hover,
  .site-nav > a.nav-link:focus-visible,
  .mc-nav > a:not(.mc-nav-buy):not(.mc-nav-cta):focus-visible,
  .nav-menu-button:focus-visible,
  .nav-menu-button[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }
  .site-nav .nav-buy,
  .mc-nav .mc-nav-buy { margin-left: 10px; }
  .nav-menu-button:focus-visible { outline-offset: 2px; }
  /* The open menu lines up under its button's text. */
  .nav-menu-panel { top: calc(100% + 10px); left: -8px; }
  .nav-menu-wide { left: -148px; }
}
