/* ==========================================================================
   TraitPath v2 static-page chrome — shared by the long-tail content pages
   (legal, methodology, personality-science, famous-personalities, IFS
   resource sub-pages). Load LAST, after any legacy sheet the page keeps
   (styles.css / ifs-styles.css) — the navbar/footer blocks are hardened
   against those (same pattern proven on view-report + the blog).

   Page contract:
   - <body class="v2-page">
   - header.site-header > .nav-row > .brand + #menuBtn + nav#main-nav > ul
   - main content inside .page-wrap (typographic column) and/or .page-hero
   - footer.v2-foot (foot-grid / foot-bottom)
   - inline 3-liner binds #menuBtn -> #main-nav.open
   ========================================================================== */

body.v2-page {
  --bg: #0e1116;
  --bg-soft: #161b22;
  --card: #1b2129;
  --line: #2a3340;
  --ink: #eef2f7;
  --ink-soft: #aeb9c7;
  --ink-dim: #7d8896;
  --mint: #6ee7b7;
  --sky: #7cc4ff;
  --violet: #a5b4fc;
  --accent-ink: #06251b;
  background: radial-gradient(1000px 500px at 50% -10%, #17202b 0%, #0e1116 55%) no-repeat, #0e1116;
  color: var(--ink-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.v2-page a {
  color: var(--sky);
}

body.v2-page .urgency-banner {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Navbar (hardened against styles.css bare-<header> + #main-nav drawer rules)
   -------------------------------------------------------------------------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  background: rgba(14, 17, 22, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  height: 64px;
  padding: 0;
  width: 100%;
  opacity: 1;
  animation: none;
}

header.site-header .nav-row {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

header.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink) !important;
  text-decoration: none;
  white-space: nowrap;
  margin: 0;
}

header.site-header .brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  border-radius: 0;
}

header.site-header #main-nav {
  position: static;
  display: block;
  background: none;
  border: 0;
  width: auto;
  height: auto;
  padding: 0;
  box-shadow: none;
  transform: none;
  visibility: visible;
}

header.site-header #main-nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

header.site-header #main-nav ul li {
  margin: 0;
  padding: 0;
  border: 0;
}

header.site-header #main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  display: inline-block;
  padding: 0;
  background: none;
}

header.site-header #main-nav a:hover {
  color: var(--ink);
}

header.site-header #main-nav a::after {
  content: none;
}

header.site-header #main-nav .reports {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  color: var(--mint);
  font-weight: 600;
  background: var(--bg-soft);
}

header.site-header #menuBtn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 16px;
  cursor: pointer;
  min-height: 0;
}

@media (max-width: 900px) {
  header.site-header #menuBtn {
    display: block;
  }

  header.site-header #main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #10141a;
    border-bottom: 1px solid var(--line);
    padding: 10px 20px 16px;
  }

  header.site-header #main-nav.open {
    display: block;
  }

  header.site-header #main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  header.site-header #main-nav ul li {
    width: 100%;
  }

  header.site-header #main-nav a {
    display: block;
    padding: 9px 2px;
    font-size: 15.5px;
  }

  header.site-header #main-nav .reports {
    display: inline-block;
    margin-top: 6px;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer.v2-foot {
  border-top: 1px solid var(--line);
  background: #10141a;
  padding: 40px 0 28px;
  margin: 0;
  box-shadow: none;
}

footer.v2-foot .foot-grid {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

footer.v2-foot .foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  font-size: 16px;
  margin: 0;
}

footer.v2-foot .foot-brand img {
  width: 26px;
  height: 26px;
  display: block;
  border-radius: 0;
}

footer.v2-foot p {
  color: var(--ink-dim);
  font-size: 13.5px;
  margin: 10px 0 0;
}

footer.v2-foot h4 {
  color: var(--ink-soft);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

footer.v2-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

footer.v2-foot ul li {
  margin: 0 0 8px;
}

footer.v2-foot ul a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
}

footer.v2-foot ul a:hover {
  color: var(--ink);
}

footer.v2-foot .foot-bottom {
  max-width: 1160px;
  margin: 28px auto 0;
  padding: 18px 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--ink-dim);
  font-size: 13px;
}

footer.v2-foot .foot-bottom a {
  color: var(--ink-dim);
  text-decoration: none;
  margin-left: 16px;
}

footer.v2-foot .foot-bottom a:hover {
  color: var(--ink);
}

@media (max-width: 860px) {
  footer.v2-foot .foot-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Page hero + typographic column
   -------------------------------------------------------------------------- */
body.v2-page .page-hero {
  position: relative;
  text-align: center;
  padding: 64px 20px 48px;
  border-bottom: 1px solid var(--line);
}

body.v2-page .page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(55% 80% at 50% 0%, rgba(110, 231, 183, 0.07), transparent 65%);
  pointer-events: none;
}

body.v2-page .page-hero .eyebrow {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
  background: var(--bg-soft);
}

body.v2-page .page-hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(27px, 4.8vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 12px;
}

body.v2-page .page-hero .lead {
  position: relative;
  z-index: 1;
  color: var(--ink-soft);
  font-size: 16.5px;
  max-width: 640px;
  margin: 0 auto;
}

body.v2-page .page-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

body.v2-page .page-wrap--wide {
  max-width: 1160px;
}

body.v2-page .page-wrap section {
  padding: 0;
  margin: 0 0 34px;
}

body.v2-page .page-wrap h1 {
  color: var(--ink);
  font-size: clamp(26px, 4.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 16px;
}

body.v2-page .page-wrap hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}

body.v2-page .page-wrap h2 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: left;
  margin: 0 0 12px;
}

body.v2-page .page-wrap h2::after {
  content: none;
}

body.v2-page .page-wrap h3 {
  color: var(--ink);
  font-size: 18.5px;
  font-weight: 700;
  margin: 24px 0 8px;
}

body.v2-page .page-wrap p {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0 0 14px;
}

body.v2-page .page-wrap ul,
body.v2-page .page-wrap ol {
  margin: 0 0 16px;
  padding-left: 24px;
  list-style: disc;
  color: var(--ink-soft);
}

body.v2-page .page-wrap ol {
  list-style: decimal;
}

body.v2-page .page-wrap li {
  margin-bottom: 8px;
  font-size: 16px;
}

body.v2-page .page-wrap strong {
  color: var(--ink);
}

body.v2-page .page-wrap blockquote {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--mint);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 16px;
}

body.v2-page .page-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 14.5px;
  border: 1px solid var(--line);
}

body.v2-page .page-wrap th {
  background: var(--card);
  color: var(--ink);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

body.v2-page .page-wrap td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

body.v2-page .page-wrap img {
  border-radius: 12px;
  border: 1px solid var(--line);
}

body.v2-page .page-wrap .updated {
  color: var(--ink-dim);
  font-size: 13px;
  margin-bottom: 26px;
}

/* Generic cards + FAQ details */
body.v2-page .cards-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 22px;
}

body.v2-page .cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 22px;
}

body.v2-page .v2-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}

body.v2-page .v2-card h3 {
  color: var(--mint);
  font-size: 16px;
  margin: 0 0 8px;
}

body.v2-page .v2-card p {
  font-size: 14.5px;
  margin: 0;
}

body.v2-page .page-wrap details {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 0;
}

body.v2-page .page-wrap summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}

body.v2-page .page-wrap summary::-webkit-details-marker {
  display: none;
}

body.v2-page .page-wrap details p {
  padding: 0 18px 16px;
  margin: 0;
  font-size: 14.5px;
}

body.v2-page .cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(100deg, var(--mint), var(--sky));
  color: var(--accent-ink) !important;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 30px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.v2-page .cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(110, 231, 183, 0.22);
}

body.v2-page .ghost {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  color: var(--ink-soft) !important;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

body.v2-page .ghost:hover {
  border-color: #3a4a5e;
  color: var(--ink) !important;
}

@media (max-width: 760px) {
  body.v2-page .cards-2,
  body.v2-page .cards-3 {
    grid-template-columns: 1fr;
  }

  body.v2-page .page-wrap {
    padding: 30px 16px 52px;
  }
}
