/* The masthead: wordmark, mega-menus, and the phone drawer. */

/* masthead */
  .masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; flex-wrap: wrap; }
  .mark { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
  .masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; flex-wrap: wrap; }
  .masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; flex-wrap: wrap; }
  .mark { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; text-decoration: none; }
  .mark-glyph { width: 27px; height: 27px; flex: none; color: var(--ink); }
  .nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; font-size: 14.5px; }
  .nav a { text-decoration: none; color: var(--muted); }
  .nav a:hover { color: var(--ink); }
  .mark-text { display: grid; gap: 1px; line-height: 1.05; }
  .mark-text b { font-weight: 800; }
  .mark-text em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--muted); font-weight: 400; }
  /* a phone gets the menu as a drawer: four wrapped rows of chrome were eating the fold */
  .nav-toggle { display: none; width: 42px; height: 38px; border: 1px solid var(--line); border-radius: 5px; background: transparent; cursor: pointer; padding: 10px 11px; gap: 4px; flex-direction: column; justify-content: center; }
  .nav-toggle span { display: block; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .22s ease, opacity .22s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
  .nav-veil { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100dvh; background: rgba(0,0,0,.5); z-index: 60; }
  /* ---------- sticky header ---------- */
  header.masthead {
    position: sticky; top: 0; z-index: 80;
    max-width: none; width: 100%;
    padding-inline: max(24px, calc((100vw - 1140px) / 2));
    background: var(--ground);
    background: color-mix(in srgb, var(--ground) 92%, transparent);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
  }
  /* ---------- features menu ---------- */
  .menu-wrap { position: relative; }
  .menu-btn { font-family: var(--body); font-size: 14.5px; color: var(--muted); background: transparent; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 0; }
  .menu-btn:hover, .menu-btn[aria-expanded="true"] { color: var(--ink); }
  .menu-btn i { font-style: normal; font-size: 10px; transition: transform .18s ease; }
  .menu-btn[aria-expanded="true"] i { transform: rotate(180deg); }
  .menu-panel { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); width: min(940px, 94vw); background: var(--raised); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); padding: 20px; z-index: 60; display: none; }
  .menu-panel.open { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .85fr); gap: 20px; }
  .menu-col { display: grid; gap: 4px; align-content: start; }
  .menu-col > .label { margin-bottom: 6px; }
  .menu-item { display: grid; gap: 2px; padding: 8px 10px; border-radius: 3px; text-decoration: none; }
  .menu-item:hover { background: var(--surface); }
  .menu-item b { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
  .menu-item span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
  .menu-rail { border-left: 1px solid var(--line-soft); padding-left: 18px; }
  .menu-foot { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
  .menu-foot a { color: var(--accent); text-decoration: none; }
  .nav a.here { color: var(--ink); border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; }
  .nav-sep { width: 1px; height: 16px; background: var(--line); }
