/* Accessibility and phone-layout fixes layered over the Claude Design export.
   Injected into every page by scripts/a11y.py. Rules outside the media query
   are invisible on desktop unless focused; everything else applies below 700px. */

/* Skip link: first focusable element, shown only while focused. */
.pp-skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 12px 18px;
  background: #FFFFFF;
  color: #00203F;
  font: 600 15px 'Public Sans', sans-serif;
  text-decoration: none;
  border: 2px solid #00203F;
  border-radius: 3px;
}
.pp-skip:focus {
  top: 16px;
}

/* "Services" toggle: a real button that looks exactly like the old label. */
.pp-services-btn {
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  cursor: pointer;
}

/* Phone menu button: hidden on desktop. */
.pp-menu-btn {
  display: none;
}

@media (max-width: 699px) {
  /* Header: one row with logo, menu button (and the CTA where it fits). */
  .pp-header > div {
    flex-wrap: nowrap !important;
    padding: 16px !important;
    gap: 12px !important;
  }
  .pp-header > div > a:first-child {
    margin-right: auto;
  }
  .pp-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 3px;
    color: #FFFFFF;
    font: 600 14px 'Public Sans', sans-serif;
    letter-spacing: 0.02em;
    cursor: pointer;
  }
  .pp-header-cta {
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    padding: 0 16px !important;
  }

  /* Menu panel: full-width dropdown under the header. */
  .pp-nav {
    display: none !important;
  }
  html[data-pp-menu="open"] .pp-nav {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0 !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px 16px 16px;
    background: #00203F;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .pp-nav > a,
  .pp-nav .pp-services-btn {
    display: flex !important;
    align-items: center;
    min-height: 44px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 16px !important;
  }
  .pp-nav > div {
    padding: 0 !important;
  }
  /* The Services submenu sits inline inside the phone menu. */
  .pp-nav > div > div {
    position: static !important;
    min-width: 0 !important;
    margin: 4px 0 8px;
    padding: 4px !important;
    box-shadow: none !important;
  }
  .pp-nav > div > div > a {
    display: flex !important;
    align-items: center;
    min-height: 44px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 15px !important;
  }

  /* Long words in big headings hyphenate instead of pushing the page wider. */
  #dc-root h1,
  #dc-root h2 {
    hyphens: auto;
    overflow-wrap: break-word;
  }

  /* Every multi-column row stacks into one column. */
  #dc-root [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Very narrow phones: the header CTA no longer fits beside the menu button;
   Contact stays in the menu and every page has its own consultation button. */
@media (max-width: 479px) {
  .pp-header-cta {
    display: none !important;
  }
}
