/* BRAIN — Member onboarding page. Loaded only by page-member-onboarding.hbs.
   Route 5B v2: Archivo / IBM Plex Mono, ink #111112, paper #FBF9F7, jade #14C79A,
   slate #33343A, mist #7C8B93. Hard corners, hairline rules, no shadows or glow. */

/* Plain hero: same type and spacing as other pages, without the aura layers. */
.onb-hero {
  position: relative;
}
.onb-hero .s119 {
  width: 100%;
}
.onb-hero .s391 {
  margin-bottom: 0;
}

.onb {
  padding-top: 56px;
  padding-bottom: 96px;
}
.onb-wrap {
  max-width: 1320px;
  margin: 0 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.onb-wrap--gate {
  display: block;
  width: 100%;
  max-width: 760px; /* same width as the page.hbs lock message */
  margin: 0 auto;
}
.onb-gate {
  margin-top: 0;
}
.onb-gate h2.s344 {
  margin-top: 0;
  font-family: inherit;
}

/* Contents list */
.onb-toc {
  position: sticky;
  top: 88px; /* clears the sticky site header */
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  border-top: 1px solid #111112;
  padding-top: 14px;
}
.onb-toc__title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6c726f;
  margin: 0 0 10px;
  scroll-margin-top: 96px;
}

.onb-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

.onb-toc__list a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  min-height: 32px;

  font-size: 10px;
  text-transform: uppercase;
  line-height: 1.4;
  color: #33343a;

  text-decoration: none !important;
  border: none !important;
  border-bottom: 1px solid #f0ede9 !important;
  background-image: none !important;
  box-shadow: none !important;

  position: relative;
  overflow: clip;

  transition: color 0.3s ease;
}

/* Animated underline */
.onb-toc__list a::after {
  content: "" !important;
  display: block !important;

  position: absolute !important;
  top: auto !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;

  width: auto !important;
  height: 1px !important;

  border: 0 !important;
  border-radius: 0 !important;
  background: #0e9e7b !important;

  transform: scaleX(0) !important;
  transform-origin: right center !important;
  transition: transform 0.3s ease !important;

  pointer-events: none;
}

/* Hover state */
.onb-toc__list a:hover {
  color: #0e9e7b;
}

.onb-toc__list a:hover::after {
  transform: scaleX(1) !important;
  transform-origin: left center !important;
}

/* Active heading */
.onb-toc__list a.is-active {
  color: #0e9e7b !important;
}

/* Keep active underline visible */
.onb-toc__list a.is-active::after {
  transform: scaleX(1) !important;
  transform-origin: left center !important;
}

/* Disable global before animation */
.onb-toc__list a::before {
  content: none !important;
  display: none !important;
}

/* Offset heading position for sticky headers */
h1[id],
h2[id],
h3[id] {
  scroll-margin-top: 96px;
}

.onb-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #6c726f;
  flex-shrink: 0;
}

/* Article */
.onb-article {
  min-width: 0;
  max-width: 44em;
}
.onb-section + .onb-section {
  margin-top: 56px;
}
.onb-h2 {
  font-family: Archivo, sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #111112;
  margin: 0 0 20px;
  padding-top: 22px;
  border-top: 1px solid #e3e0dc;
  scroll-margin-top: 88px; /* anchors land below the sticky header */
}
.onb-h2 .onb-num {
  display: block;
  margin-bottom: 12px;
}
.onb-section p {
  font-size: 17px;
  line-height: 1.7;
  color: #33343a;
  margin: 0 0 16px;
  max-width: 40em;
  text-wrap: pretty;
}

.onb-section a {
  color: #111112;
  text-decoration: underline;
  text-decoration-color: #111112;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  background-image: none !important;
  transition: none !important;
}

.onb-section a:hover,
.onb-section a:focus {
  text-decoration: underline !important;
  background-image: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  color: #14c79a;
}

/* Disable global underline animations */
.onb-section a::before,
.onb-section a::after {
  content: none !important;
  display: none !important;
  animation: none !important;
  transition: none !important;
}

.onb-foot__link {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid #000;
  border-radius: 0;
  background-color: transparent;
  color: #111112;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: all 0.2s ease;
}

.onb-foot__link:hover {
  background-color: #14c79a;
  border-color: #14c79a;
  color: #000;
  text-decoration: none;
}

/* Worksheet: readable, printable text — not a form. */
.onb-worksheet {
  list-style: none;
  counter-reset: onb-prompt;
  margin: 24px 0 8px;
  padding: 0;
  border: 1px solid #111112;
  background: #fff;
  max-width: 40em;
}
.onb-worksheet li {
  counter-increment: onb-prompt;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 8px;
  padding: 18px 22px;
  border-bottom: 1px solid #e3e0dc;
  font-size: 16px;
  line-height: 1.65;
  color: #33343a;
}
.onb-worksheet li:last-child {
  border-bottom: 0;
}
.onb-worksheet li::before {
  content: counter(onb-prompt, decimal-leading-zero);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #6c726f;
  padding-top: 4px;
  grid-row: span 2;
}
.onb-worksheet strong {
  display: block;
  color: #111112;
  font-weight: 600;
}

/* Section 8: format for the member's band. Label carries the meaning, not colour. */
.onb-route {
  border-left: 3px solid #14c79a;
  padding: 2px 0 2px 20px;
  margin: 0 0 20px;
}
.onb-route__label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6c726f !important;
  margin: 0 0 10px !important;
}

.onb-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid #e3e0dc;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Tablet and mobile: contents list sits above the article. */
@media (max-width: 1024px) {
  .onb-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .onb-toc {
    position: static;
    max-height: none;
    overflow: visible;
  }
}
@media (max-width: 768px) {
  .onb {
    padding-top: 40px;
    padding-bottom: 72px;
  }
  .onb-h2 {
    font-size: 25px;
  }
  .onb-section p {
    font-size: 16px;
  }
  .onb-worksheet li {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 16px;
  }
}

/* Print: the member's own copy. Omits navigation; keeps the worksheet legible. */
@media print {
  .s2,
  .s1 > footer,
  .onb-subnav,
  .onb-toc,
  .onb-foot {
    display: none !important;
  }
  .s1,
  .onb-hero {
    background: #fff !important;
    color: #111112 !important;
    min-height: 0 !important;
  }
  .onb-hero .s119 {
    padding: 0 0 16px;
  }
  .onb-hero .s120,
  .onb-hero .s123 {
    color: #33343a !important;
    border-color: #ccc !important;
  }
  .onb-hero .s391 {
    font-size: 32px;
  }
  .onb,
  .onb-hero {
    padding: 0 !important;
  }
  .onb-wrap {
    display: block;
  }
  .onb-article {
    max-width: none;
  }
  .onb-section p,
  .onb-worksheet li {
    font-size: 11pt;
    color: #000;
  }
  .onb-h2 {
    font-size: 16pt;
    break-after: avoid;
  }
  .onb-worksheet,
  .onb-worksheet li,
  .onb-route {
    break-inside: avoid;
  }
}

/* =========================================================
   Onboarding diagrams (text-based figures, no images).
   They summarise the paragraphs beside them; the paragraphs
   stay in full. Hard corners, hairlines, ink and a small jade
   square echoing the BRAIN logo mark.
   ========================================================= */
.onb-section .onb-fig {
  margin: 32px 0 36px;
  max-width: 40em;
}
.onb-section .onb-fig p {
  margin: 0;
  max-width: none;
}
.onb-section .onb-fig__label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6c726f;
  line-height: 1.4;
  margin: 0 0 12px;
}
.onb-section .onb-fig__label::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  background: #14c79a;
  vertical-align: 1px;
}
.onb-section .onb-fig__cap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e3e0dc;
  font-size: 14px;
  line-height: 1.55;
  color: #33343a;
}

/* 1. The core path (section 1) */
.onb-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.onb-flow li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 132px;
  padding: 16px;
  background: #fff;
  border: 1px solid #111112;
}
.onb-flow li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -18px;
  transform: translateY(-50%);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: #7c8b93;
}
.onb-flow li:last-child {
  background: #111112;
  color: #fbf9f7;
}
.onb-flow__n {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #6c726f;
}
.onb-flow li:last-child .onb-flow__n {
  color: #14c79a;
}
.onb-flow__t {
  margin-top: auto;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* 2. Evidence | Judgement (section 5) */
.onb-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fff;
  border: 1px solid #111112;
}
.onb-split__col {
  padding: 20px 22px 18px;
}
.onb-split__col + .onb-split__col {
  border-left: 1px solid #111112;
}
.onb-section .onb-split__q {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: #111112;
  margin-bottom: 12px;
}
.onb-split__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.onb-split__list li {
  padding: 8px 0;
  border-top: 1px solid #f0ede9;
  font-size: 15px;
  line-height: 1.5;
  color: #33343a;
}

/* 3. Fictional example at a glance (section 6) */
.onb-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 2px solid #111112;
  border-bottom: 1px solid #e3e0dc;
}
.onb-steps__item {
  padding: 14px 16px 16px 0;
}
.onb-steps__item + .onb-steps__item {
  padding-left: 16px;
  border-left: 1px solid #e3e0dc;
}
.onb-steps dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111112;
  margin-bottom: 8px;
}
.onb-steps dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #33343a;
}

/* 4. Action or pause (section 10) */
.onb-section .onb-fork__q {
  background: #111112;
  color: #fbf9f7;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 22px;
}
.onb-fork {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fff;
  border: 1px solid #111112;
  border-top: 0;
}
.onb-fork__branch {
  padding: 18px 22px 20px;
}
.onb-fork__branch + .onb-fork__branch {
  border-left: 1px solid #111112;
}
.onb-section .onb-fork__t {
  font-size: 15px;
  line-height: 1.55;
  color: #33343a;
}

@media (max-width: 768px) {
  .onb-flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .onb-flow li {
    min-height: 0;
    flex-direction: row;
    align-items: baseline;
    gap: 14px;
  }
  .onb-flow li:not(:last-child)::after {
    content: "↓";
    top: auto;
    bottom: -19px;
    right: auto;
    left: 18px;
    transform: none;
  }
  .onb-flow__t {
    margin-top: 0;
  }
  .onb-split,
  .onb-fork,
  .onb-steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .onb-split__col + .onb-split__col,
  .onb-fork__branch + .onb-fork__branch {
    border-left: 0;
    border-top: 1px solid #111112;
  }
  .onb-steps__item,
  .onb-steps__item + .onb-steps__item {
    padding: 12px 0;
    border-left: 0;
  }
  .onb-steps__item + .onb-steps__item {
    border-top: 1px solid #e3e0dc;
  }
}

@media print {
  .onb-section .onb-fig {
    break-inside: avoid;
  }
  .onb-flow li:last-child,
  .onb-section .onb-fork__q {
    background: #fff !important;
    color: #111112 !important;
    border: 1px solid #111112;
  }
}
