/* Peregrine Leadership site layout. Every color, font and size is a token from styles.css. */
:root { --rail-h: 64px; --wrap: 1180px; }
html { scroll-padding-top: calc(var(--rail-h) + 16px); }
body { padding-top: var(--rail-h); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--space-6); }

/* The rail */
.rail { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--rail-h);
  background: rgba(239,238,237,.92); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--color-border); }
.rail-in { height: 100%; display: flex; align-items: center; gap: var(--space-5); }
.rail-logo { display: inline-flex; line-height: 0; flex: 0 0 auto; }
.rail-title { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-sm); color: var(--color-text);
  text-decoration: none; white-space: nowrap; }
.rail-nav { display: flex; align-items: center; gap: var(--space-5); margin-left: auto; flex: 0 1 auto; min-width: 0;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.rail-nav::-webkit-scrollbar { display: none; }
.rail-nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); padding-right: 40px; }
.rail-group { display: flex; flex-direction: column; gap: 2px; padding-left: var(--space-3); border-left: 1px solid var(--color-border); }
.rail-stage { font-family: var(--font-heading); font-size: 12px; font-weight: 600; letter-spacing: var(--ls-wider);
  text-transform: uppercase; color: var(--color-text-subtle); white-space: nowrap; line-height: 1; }
.rail-stage.is-current { color: var(--color-secondary); }
.rail-stops { display: flex; gap: var(--space-4); }
.rail-nav a { font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 500; color: var(--color-text);
  text-decoration: none; white-space: nowrap; padding: 2px 0 3px; border-bottom: 2px solid transparent; line-height: 1.2; }
.rail-nav a .n { color: var(--color-text-subtle); font-weight: 600; margin-right: 5px; font-size: var(--text-xs); }
.rail-nav a[aria-current="true"] { border-bottom-color: var(--pl-blue); }
.rail-nav a[aria-current="true"] .n { color: var(--pl-blue); }
.rail-cta { margin-left: auto; flex: 0 0 auto; }
.rail-title { flex: 0 0 auto; }
.rail-nav + .rail-cta { margin-left: 0; }
.rail-menu { display: none; }

/* Buttons and links */
.nb { white-space: nowrap; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.btn { display: inline-block; font-family: var(--font-heading); font-weight: 600; font-size: var(--text-sm);
  padding: 12px 20px; border: 1px solid var(--pl-blue); border-radius: 0; text-decoration: none; line-height: 1.1;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.btn-primary { background: var(--pl-blue-button); border-color: var(--pl-blue-button); color: var(--pl-white); }
.btn-primary:hover { background: var(--pl-blue-700); border-color: var(--pl-blue-700); color: var(--pl-white); }
.btn-secondary { background: transparent; color: var(--pl-ink); border-color: var(--pl-ink); }
.btn-secondary:hover { background: var(--pl-ink); color: var(--pl-paper); }
.more { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-sm); }

/* Sections */
.sec { padding: var(--space-10) 0; }
.sec:nth-of-type(even) { background: var(--color-bg-alt); }
.sec h2 { max-width: 24ch; }
.hero { padding: var(--space-10) 0 var(--space-9); }
.hero h1 { max-width: 18ch; font-size: var(--text-5xl); }
.hero p { max-width: 56ch; }
.hero h1 + p { font-size: var(--text-xl); font-family: var(--font-heading); font-weight: 500; color: var(--color-text); max-width: 30ch; }
.lead { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 52ch; }
.theme { font-style: italic; color: var(--color-text-muted); max-width: 60ch; border-left: 3px solid var(--pl-blue);
  padding-left: var(--space-4); }
.sec ul { padding-left: 1.2em; max-width: 62ch; }
.sec li { margin-bottom: var(--space-2); }
.track-sec .n { color: var(--pl-taupe); margin-right: 6px; }   /* the brand blue is 2.4 on the recessed paper at this size */
.offers-line { font-family: var(--font-heading); font-size: var(--text-sm); color: var(--pl-taupe); }

/* Offer cards and facts */
.offer { background: var(--color-surface); border: 1px solid var(--color-border); border-top: 3px solid var(--pl-blue);
  border-radius: 0; padding: var(--space-6); margin: var(--space-5) 0; max-width: 72ch; }
.offer h3 { font-size: var(--text-xl); }
.offer h4 { font-size: var(--text-base); font-weight: 500; color: var(--color-text-muted); margin: var(--space-5) 0 var(--space-2); }
.offer h3 + h4 { font-size: var(--text-lg); font-weight: 500; color: var(--color-text); margin-top: 0; }
.facts { border-collapse: collapse; width: 100%; max-width: 56ch; margin-top: var(--space-4);
  font-size: var(--text-sm); }
.facts th { text-align: left; font-family: var(--font-heading); font-weight: 600; width: 10em; padding: 8px 12px 8px 0;
  border-top: 1px solid var(--color-border); vertical-align: top; }
.facts td { padding: 8px 0; border-top: 1px solid var(--color-border); }

/* The chooser cards sit three up on wide screens */
#where-are-you-right-now .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 var(--space-5); }
#where-are-you-right-now .wrap > h2, #where-are-you-right-now .wrap > p, #where-are-you-right-now .wrap > .pl-eyebrow { grid-column: 1 / -1; }
#where-are-you-right-now .offer { margin: var(--space-3) 0; }

/* The dates block and the quiz strip */
.dates { margin: var(--space-5) 0; padding: var(--space-5) var(--space-6); background: var(--color-surface); border: 1px solid var(--color-border); max-width: 72ch; }
.dates ul { margin: 0; }
.quiz-sec { background: var(--pl-taupe); color: var(--pl-paper); }
.quiz-sec h2, .quiz-sec p { color: var(--pl-paper); }
.quiz-sec .btn-secondary { color: var(--pl-paper); border-color: var(--pl-paper); }
.quiz-sec .btn-secondary:hover { background: var(--pl-paper); color: var(--pl-ink); }
.sec:nth-of-type(even).quiz-sec { background: var(--pl-taupe); }

/* The quiz pages: the quiz lane's block, unchanged, in a narrow column */
.quiz-page .wrap { max-width: 44rem; }
.quiz-page { background: var(--pl-paper); }

/* Who leads it */
.who { display: grid; grid-template-columns: 120px 1fr; gap: var(--space-5); align-items: start; max-width: 72ch; }
.who-photo { width: 120px; height: 120px; background: var(--pl-taupe); display: flex; align-items: center; justify-content: center; }
.who-photo img { width: 64px; height: 64px; }
.badges { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.badge { font-family: var(--font-heading); font-size: var(--text-2xs); font-weight: 600; letter-spacing: var(--ls-wider);
  text-transform: uppercase; color: var(--pl-blue-700); background: var(--pl-blue-050); padding: 4px 8px; }

/* Footer */
.foot { background: var(--pl-ink-surface); color: var(--pl-paper); padding: var(--space-9) 0; margin-top: var(--space-10); }
.foot a { color: var(--pl-paper); }
.foot-name { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-lg); margin-bottom: var(--space-1); }
.foot-tag { color: #B7ADA6; }
.foot-links, .foot-contact { font-size: var(--text-sm); }
.foot-small { font-size: var(--text-xs); color: #B7ADA6; margin-top: var(--space-5); }
/* Mike's four certification marks (2026-11-02): a modest row above the contact line, CEPA wide so a touch shorter, wrapping on a phone */
.foot-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin: var(--space-6) 0; }   /* 20px: all four fit one line at 390 inside the 32px gutters */
.foot-marks img { display: block; height: 44px; width: auto; }
.foot-marks .foot-mark-cepa { height: 40px; }

/* Mike's blanks, visible only in a dev build */
body.dev mark.todo { background: var(--pl-warning-bg); color: var(--pl-warning); outline: 1px dashed var(--pl-warning); padding: 0 3px; }

/* v0 variations: the stamp, the expander, the compare page */
.v-stamp { position: fixed; left: 12px; bottom: 12px; z-index: 60; font-family: var(--font-heading); font-size: 12px; font-weight: 600;
  letter-spacing: .04em; color: var(--pl-paper); background: var(--pl-ink); padding: 8px 12px; text-decoration: none; border: 1px solid var(--pl-ink); }
.v-stamp:hover { background: var(--pl-blue); border-color: var(--pl-blue); color: var(--pl-white); }
.more-x { margin: var(--space-2) 0 var(--space-4); }
.more-x summary { cursor: pointer; font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 600; color: var(--color-link); list-style: none; }
.more-x summary::before { content: "+ "; }
.more-x[open] summary::before { content: "– "; }
.v-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.v-card { background: var(--color-surface); border: 1px solid var(--color-border); border-top: 3px solid var(--pl-blue); padding: var(--space-5); }
.v-card h2 { font-size: var(--text-xl); margin-top: var(--space-4); }
.v-thumb { display: block; border: 1px solid var(--color-border); overflow: hidden; height: 360px; background: var(--color-bg-alt); }
.v-thumb img, .v-thumb video { width: 100%; height: auto; display: block; }
.v-thumb-empty { display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); color: var(--color-text-subtle); }
.v-axes { list-style: none; padding: 0; margin: 0 0 var(--space-4); font-size: var(--text-sm); }
.v-axes li { padding: 6px 0; border-top: 1px solid var(--color-border); }
.v-bend { color: var(--pl-warning); }
.topnav .rail-group { border-left: 0; padding-left: 0; }

/* The quizzes as the front door (every variant features them; the quizzes themselves never change) */
.quiz-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); margin: var(--space-5) 0; }
.quiz-card { display: flex; flex-direction: column; gap: 6px; padding: var(--space-5); background: var(--color-surface); border: 1px solid var(--color-border);
  border-top: 3px solid var(--pl-blue); text-decoration: none; color: var(--color-text); }
.quiz-card strong { font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 600; line-height: 1.2; }
.quiz-card .quiz-for { font-size: var(--text-xs); color: var(--color-text-subtle); font-family: var(--font-heading); }
.quiz-card:hover { border-color: var(--pl-blue); }

/* Phone */
@media (max-width: 760px) {
  .rail-in { gap: var(--space-3); }
  .rail-logo img { height: 24px; }
  .rail-title { display: none; }
  .rail-menu { display: inline-block; margin-left: auto; background: none; border: 1px solid var(--color-border);
    font-family: var(--font-heading); font-size: var(--text-xs); font-weight: 600; padding: 8px 10px; color: var(--color-text);
    max-width: 44vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-nav { display: none; position: absolute; top: var(--rail-h); left: 0; right: 0; flex-direction: column;
    align-items: stretch; gap: 0; background: var(--pl-paper); border-bottom: 1px solid var(--color-border); padding: var(--space-3) var(--space-5); }
  .rail-nav.open { display: flex; -webkit-mask-image: none; mask-image: none; padding-right: var(--space-5); }
  .rail-group { border-left: 0; padding: var(--space-3) 0 var(--space-2); }
  .rail-stops { flex-direction: column; gap: 0; }
  .rail-nav a { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
  .rail-nav a[aria-current="true"] { border-bottom-color: var(--pl-blue); }
  .rail-cta { margin-left: 0; padding: 10px 12px; }
  .hero h1 { font-size: var(--text-3xl); }
  #where-are-you-right-now .wrap { grid-template-columns: 1fr; }
  .who { grid-template-columns: 1fr; }
  .v-grid { grid-template-columns: 1fr; }
  .v-thumb { height: 220px; }
}
