/* PixID site chrome: one header and one footer for every page.
   Source of truth: partials/site-header.html, partials/site-footer.html (applied by scripts/apply-site-chrome.js).
   Selectors are scoped to header.pxh / footer.pxf so legacy page CSS (global nav rules, article link colours) cannot restyle them. */

:root {
  --pxc-green: #0F7A52;
  --pxc-green-dark: #0B5E3E;
  --pxc-ink: #0F172A;
  --pxc-text: #334155;
  --pxc-muted: #64748B;
  --pxc-line: #E5E7EB;
  --pxc-soft: #F1F5F9;
  --pxc-max: 1200px;
  --pxc-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ---------- Header ---------- */
header.pxh {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(180%) blur(10px); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--pxc-line);
  font-family: var(--pxc-font);
  padding-top: env(safe-area-inset-top, 0);
  margin: 0;
}
header.pxh *, footer.pxf * { box-sizing: border-box; }
header.pxh .pxh__in {
  max-width: var(--pxc-max); margin: 0 auto; height: 64px;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 28px;
}
header.pxh .pxh__brand {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  color: var(--pxc-ink); text-decoration: none; font-size: 17px; font-weight: 700; letter-spacing: -0.015em; line-height: 1;
}
header.pxh .pxh__brand img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #1e3a5f; object-fit: cover; display: block; }
header.pxh .pxh__tld { color: var(--pxc-muted); font-weight: 500; }

header.pxh nav.pxh__nav {
  position: static; border: 0; padding: 0; margin: 0; background: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; flex: 1; min-width: 0;
}
header.pxh .pxh__links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
header.pxh .pxh__links li { margin: 0; padding: 0; list-style: none; }
header.pxh .pxh__links a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px;
  color: var(--pxc-text); font-size: 14.5px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
header.pxh .pxh__links a:hover { color: var(--pxc-ink); background: var(--pxc-soft); }
header.pxh .pxh__links a[aria-current="page"] { color: var(--pxc-ink); font-weight: 600; background: var(--pxc-soft); }

header.pxh .pxh__cta {
  margin-left: auto; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px;
  background: var(--pxc-green); color: #fff; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); transition: background-color .15s ease;
}
header.pxh .pxh__cta:hover, header.pxh .pxh__cta:focus-visible { background: var(--pxc-green-dark); color: #fff; }
header.pxh .pxh__cta, header.pxh .pxh__cta:visited { color: #fff; }
header.pxh .pxh__cta-short { display: none; }

header.pxh .pxh__menu {
  display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 0 0 auto; padding: 0;
  border: 1px solid var(--pxc-line); border-radius: 8px; background: #fff; cursor: pointer; color: var(--pxc-ink);
}
header.pxh .pxh__bars, header.pxh .pxh__bars::before, header.pxh .pxh__bars::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; position: relative; transition: transform .2s ease, opacity .2s ease;
}
header.pxh .pxh__bars::before, header.pxh .pxh__bars::after { content: ""; position: absolute; left: 0; }
header.pxh .pxh__bars::before { top: -6px; }
header.pxh .pxh__bars::after { top: 6px; }
header.pxh.is-open .pxh__bars { background: transparent; }
header.pxh.is-open .pxh__bars::before { transform: translateY(6px) rotate(45deg); }
header.pxh.is-open .pxh__bars::after { transform: translateY(-6px) rotate(-45deg); }

header.pxh a:focus-visible, header.pxh button:focus-visible, footer.pxf a:focus-visible {
  outline: 2px solid var(--pxc-green); outline-offset: 2px;
}

@media (max-width: 960px) {
  header.pxh .pxh__in { height: 56px; gap: 10px; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
  header.pxh .pxh__brand { font-size: 16px; }
  header.pxh .pxh__brand img { width: 32px; height: 32px; }
  header.pxh nav.pxh__nav { position: absolute; left: 0; right: 0; top: 100%; flex: none; }
  header.pxh .pxh__links {
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--pxc-line); box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    padding: 6px max(16px, env(safe-area-inset-left)) 12px;
  }
  header.pxh.is-open .pxh__links { display: flex; }
  header.pxh .pxh__links a { height: 48px; padding: 0 8px; font-size: 16px; border-radius: 6px; width: 100%; }
  header.pxh .pxh__links li + li { border-top: 1px solid var(--pxc-soft); }
  header.pxh .pxh__menu { display: inline-flex; }
  header.pxh .pxh__cta { margin-left: 0; height: 44px; padding: 0 16px; }
  header.pxh .pxh__cta-long { display: none; }
  header.pxh .pxh__cta-short { display: inline; }
}
@media (max-width: 360px) {
  header.pxh .pxh__tld { display: none; }
}

/* ---------- Footer ---------- */
footer.pxf {
  background: #F8FAFC; border-top: 1px solid var(--pxc-line); color: var(--pxc-text);
  font-family: var(--pxc-font); font-size: 14px; line-height: 1.6; margin: 64px 0 0; padding: 0;
}
footer.pxf .pxf__in {
  max-width: var(--pxc-max); margin: 0 auto; padding: 48px 24px 32px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px;
}
footer.pxf .pxf__logo { display: inline-flex; align-items: center; gap: 10px; color: var(--pxc-ink); font-weight: 700; font-size: 16px; text-decoration: none; }
footer.pxf .pxf__logo img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #1e3a5f; display: block; }
footer.pxf .pxf__tld { color: var(--pxc-muted); font-weight: 500; }
footer.pxf .pxf__brand p { margin: 12px 0 0; max-width: 340px; color: var(--pxc-muted); }
footer.pxf .pxf__h { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pxc-ink); }
footer.pxf ul { list-style: none; margin: 0; padding: 0; }
footer.pxf li { margin: 0 0 8px; padding: 0; list-style: none; }
footer.pxf a { color: var(--pxc-text); text-decoration: none; }
footer.pxf a:hover { color: var(--pxc-green); text-decoration: underline; }
footer.pxf .pxf__bottom {
  max-width: var(--pxc-max); margin: 0 auto; padding: 16px 24px 28px; border-top: 1px solid var(--pxc-line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--pxc-muted);
}
@media (max-width: 760px) {
  footer.pxf .pxf__in { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding: 36px 16px 24px; }
  footer.pxf .pxf__brand { grid-column: 1 / -1; }
  footer.pxf .pxf__bottom { padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0)); flex-direction: column; }
}

/* ---------- Page body: one reading column, one breadcrumb, one type scale ----------
   Legacy page CSS (guide-desk.css) uses !important, so these rules do too, with higher specificity. */
:root { --pxc-read: 760px; }

body.guide-article-page, body.guide-hub-page, body.compliance-page, body.doc-page { background: #fff !important; }

/* Guides: the old card (guide-desk) and the Document Desk sheet become one plain centred column */
body.guide-article-page > main, body.guide-article-page > main#main-content { padding: 0 !important; background: transparent !important; }
body.guide-article-page > main > article,
body.guide-article-page > main > article.py-12,
body.guide-article-page main article.sheet-container,
body.guide-article-page .guide-desk-sheet,
html body.guide-article-page main > article.border,
html body.guide-article-page main article.sheet-container.border,
html body.guide-article-page > main#main-content > article {
  max-width: var(--pxc-read) !important; margin: 0 auto !important; width: 100%;
  background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  padding: 32px 24px 56px !important;
}
body.doc-page main > article, body.doc-page article { max-width: var(--pxc-read); }

/* Breadcrumbs: same size, colour and spacing everywhere (and never sticky: site.css styles every <nav>) */
nav.site-breadcrumb, nav.g-breadcrumb, nav.breadcrumb, .breadcrumb,
nav[aria-label="Breadcrumb"], nav[aria-label="Breadcrumbs"] {
  position: static !important; top: auto !important; z-index: auto !important;
  border: 0 !important; background: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  font-size: 13px !important; line-height: 1.4 !important; letter-spacing: 0 !important; text-transform: none !important; font-weight: 400 !important;
  color: var(--pxc-muted) !important; padding-top: 0 !important; padding-bottom: 0 !important; margin-top: 0 !important; margin-bottom: 20px !important; box-shadow: none !important;
}
nav.site-breadcrumb a, nav.g-breadcrumb a, .breadcrumb a, nav[aria-label="Breadcrumb"] a, nav[aria-label="Breadcrumbs"] a {
  color: var(--pxc-muted) !important; text-decoration: none !important; font-weight: 400 !important; font-size: 13px !important;
}
nav.site-breadcrumb a:hover, nav.g-breadcrumb a:hover, .breadcrumb a:hover, nav[aria-label="Breadcrumb"] a:hover, nav[aria-label="Breadcrumbs"] a:hover { color: var(--pxc-green) !important; }
nav.site-breadcrumb [aria-current], nav.g-breadcrumb [aria-current], .breadcrumb [aria-current], nav[aria-label="Breadcrumb"] [aria-current], nav[aria-label="Breadcrumbs"] [aria-current] {
  color: var(--pxc-ink) !important; font-weight: 500 !important; font-size: 13px !important;
}
body nav.site-breadcrumb, body.doc-page nav.site-breadcrumb { width: calc(100% - 48px) !important; max-width: var(--pxc-read) !important; margin: 24px auto 0 !important; padding: 0 !important; }

/* Headings */
body:not(.homepage) main h1, body.doc-page article h1, body.us-photo-page h1, body.guide-article-page h1 {
  font-size: 34px !important; line-height: 1.18 !important; font-weight: 700 !important; letter-spacing: -0.02em !important; color: var(--pxc-ink) !important;
}
body.guide-article-page section.hairline-divider > h2,
body.guide-article-page .prose h2, body.doc-page article h2 {
  font-size: 23px !important; line-height: 1.3 !important; font-weight: 700 !important; letter-spacing: -0.01em !important; color: var(--pxc-ink) !important;
}

/* Reading text */
body.guide-article-page .prose p, body.guide-article-page .prose li,
body.guide-article-page section.hairline-divider p, body.guide-article-page section.hairline-divider li,
body.doc-page article p, body.doc-page article li, body.us-photo-page .wrap p {
  font-size: 17px !important; line-height: 1.65 !important; color: var(--pxc-text) !important;
}

@media (max-width: 640px) {
  body.guide-article-page > main > article,
  body.guide-article-page > main > article.py-12,
  body.guide-article-page main article.sheet-container,
  body.guide-article-page .guide-desk-sheet,
  html body.guide-article-page > main#main-content > article { padding: 20px 16px 48px !important; }
  body nav.site-breadcrumb, body.doc-page nav.site-breadcrumb { width: calc(100% - 32px) !important; }
  body:not(.homepage) main h1, body.doc-page article h1, body.us-photo-page h1, body.guide-article-page h1 { font-size: 27px !important; }
  body.guide-article-page section.hairline-divider > h2, body.guide-article-page .prose h2, body.doc-page article h2 { font-size: 20px !important; }
  body.guide-article-page .prose p, body.guide-article-page .prose li,
  body.guide-article-page section.hairline-divider p, body.guide-article-page section.hairline-divider li,
  body.doc-page article p, body.doc-page article li, body.us-photo-page .wrap p { font-size: 16px !important; }
}

/* Server-rendered "How we verify" page: Tailwind preflight strips its headings and list numbers */
body.compliance-page main { max-width: var(--pxc-read) !important; margin: 0 auto !important; padding: 32px 24px 56px !important; }
body.compliance-page main h2 { font-size: 23px !important; font-weight: 700 !important; color: var(--pxc-ink) !important; margin: 40px 0 12px !important; line-height: 1.3 !important; }
body.compliance-page main p, body.compliance-page main li { font-size: 17px !important; line-height: 1.65 !important; color: var(--pxc-text) !important; }
body.compliance-page main > ol, body.compliance-page main > ul { list-style: decimal !important; padding-left: 1.4em !important; margin: 0 0 16px !important; }
body.compliance-page main > ul { list-style: disc !important; }
body.compliance-page main > ol li, body.compliance-page main > ul li { margin: 0 0 8px !important; }
body.compliance-page main table { font-size: 14.5px !important; width: 100%; }
@media (max-width: 760px) { body.compliance-page main table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } body.compliance-page main { padding: 20px 16px 48px !important; } body.compliance-page nav.g-breadcrumb { width: calc(100% - 32px) !important; } }
body.compliance-page nav.g-breadcrumb { max-width: calc(var(--pxc-read) - 48px) !important; width: calc(100% - 48px) !important; margin: 24px auto 0 !important; padding: 0 !important; }

/* Mobile: nothing in the content may push the page sideways */
@media (max-width: 760px) {
  main table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  main a, main code, main li, main p, main td { overflow-wrap: anywhere; }
  main pre, main code { white-space: pre-wrap; }
  main img, main svg, main video, main iframe { max-width: 100%; height: auto; }
}
