/* BrainTrust Library — page-specific styles */

.memberbar { background: var(--navy-deep); color: var(--white); }
.memberbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--container); margin: 0 auto;
  padding: .85rem var(--gutter);
}
.memberbar-left { display: flex; align-items: center; gap: 1rem; font-size: .82rem; color: var(--steel-light); }
.memberbar-left strong { color: var(--white); font-weight: 500; }
.tier-pill {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .14em;
  text-transform: uppercase; padding: .3rem .6rem;
  border: 1px solid var(--steel-deep); border-radius: 2px; color: var(--steel-light);
}
.tier-pill.premium { border-color: var(--steel-light); color: var(--white); background: rgba(168,180,196,.1); }
.memberbar-right a { font-size: .82rem; color: var(--steel-light); transition: color .15s; }
.memberbar-right a:hover { color: var(--white); }

.lib-header { padding: 4.5rem 0 3rem; border-bottom: 1px solid var(--border-hairline); }
.lib-header h1 { font-size: 2.7rem; margin-bottom: 1rem; }
.lib-header p { max-width: 660px; font-size: 1.02rem; color: var(--text-secondary); }

.lib-section { padding: 3.25rem 0; scroll-margin-top: 130px; }
.lib-section.alt { background: var(--off-white); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: .4rem; border-bottom: 1px solid var(--border-hairline); padding-bottom: 1.1rem;
}
.section-head h2 { font-size: 1.5rem; }
.section-head .count { font-family: var(--mono); font-size: .82rem; color: var(--text-faint); letter-spacing: .08em; }
.section-sub { font-size: .9rem; color: var(--text-muted); margin: 1rem 0 2rem; max-width: 640px; }
.section-sub a { color: var(--navy); font-weight: 600; }

.doc-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--border-hairline);
  border: 1px solid var(--border-hairline); margin-top: 2rem;
}
.doc {
  background: var(--white); padding: 1.5rem 1.6rem;
  display: flex; flex-direction: column; min-height: 170px; position: relative;
}
.doc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.doc-cat { font-family: var(--mono); font-size: .82rem; letter-spacing: .13em; text-transform: uppercase; color: var(--steel); }
.doc-fmt {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; color: var(--text-faint);
  border: 1px solid var(--border); padding: .16rem .4rem; border-radius: 2px; white-space: nowrap;
}
.doc h3 { font-family: var(--serif); font-size: 1.1rem; margin-bottom: .45rem; line-height: 1.3; }
.doc p { font-size: .83rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
.doc-foot { margin-top: 1.1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.btn-dl {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--white); background: var(--navy); padding: .55rem 1rem;
  border-radius: 2px; transition: background .15s;
}
.btn-dl:hover { background: var(--navy-deep); }
.btn-dl svg { width: 12px; height: 12px; }

.link-more {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--steel-deep); border-bottom: 1px solid var(--border-dark); padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}
.link-more:hover { color: var(--navy); border-color: var(--navy); }

.doc.locked { background: var(--paper); }
.doc.locked h3, .doc.locked p { color: var(--text-faint); }
.doc.locked .doc-cat { color: var(--steel-light); }
.lock-badge { position: absolute; top: 1.5rem; right: 1.6rem; width: 14px; height: 14px; color: var(--steel-light); }
.doc.locked .doc-top { padding-right: 1.5rem; }
.btn-locked {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--steel-deep); background: transparent; border: 1px solid var(--border-dark);
  padding: .55rem 1rem; border-radius: 2px; transition: all .15s;
}
.btn-locked:hover { border-color: var(--navy); color: var(--navy); }
.btn-locked svg { width: 11px; height: 11px; }

/* ---- Tool cross-reference stub card ---- */
.doc-xref { min-height: 0; }
.doc-xref h3 { color: var(--text-secondary); }
.doc-xref p a { color: var(--navy); font-weight: 600; white-space: nowrap; }

/* ---- Compact rows: general-compliance shelf ---- */
.doc-list {
  display: flex; flex-direction: column;
  gap: 1px; background: var(--border-hairline);
  border: 1px solid var(--border-hairline); margin-top: 2rem;
}
.doc-row { background: var(--white); padding: 1.05rem 1.6rem; display: flex; align-items: center; gap: 1.5rem; }
.doc-row-main { flex: 1; min-width: 0; }
.doc-row-head { display: flex; align-items: baseline; gap: .4rem .9rem; flex-wrap: wrap; }
.doc-row-head h3 { font-family: var(--serif); font-size: 1.02rem; line-height: 1.3; margin: 0; }
.doc-row-main p {
  font-size: .8rem; color: var(--text-muted); line-height: 1.45; margin: .35rem 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.doc-row-action { flex-shrink: 0; }
.doc-row.locked { background: var(--paper); }
.doc-row.locked h3, .doc-row.locked p { color: var(--text-faint); }
.doc-row.locked .doc-cat { color: var(--steel-light); }

.upsell { background: var(--navy-deep); color: var(--white); padding: 3rem 0; }
.upsell-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
}
.upsell-text .eyebrow { color: var(--steel-light); }
.upsell-text h2 { color: var(--white); font-size: 1.7rem; margin-bottom: .6rem; }
.upsell-text p { color: var(--steel-light); font-size: .95rem; max-width: 540px; }
.upsell-cta {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--navy-deep); background: var(--white); padding: .95rem 1.6rem;
  border-radius: 2px; white-space: nowrap; transition: transform .15s;
}
.upsell-cta:hover { transform: translateY(-1px); }
.upsell-price { font-family: var(--serif); font-size: 2.4rem; color: var(--white); margin-top: 1rem; line-height: 1.1; }
.upsell-price small {
  display: block; font-family: var(--mono); font-size: .8rem; color: var(--steel-light);
  letter-spacing: .08em; text-transform: uppercase; margin-top: .35rem;
}

/* ---- Program path (How to work the program) ---- */
.lib-path { border-bottom: 1px solid var(--border-hairline); background: var(--paper); padding: 2.8rem 0 2.4rem; }
.path-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem; margin-bottom: 1.7rem;
}
.path-head h2 { font-size: 1.45rem; }
.path-head .count { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.ready {
  margin: 0 0 1.7rem; border: 1px solid var(--border-hairline); border-left: 3px solid var(--navy);
  background: var(--white); padding: 1.15rem 1.4rem;
}
.ready .k {
  font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--steel); display: block; margin-bottom: .45rem;
}
.ready p { font-size: .92rem; color: var(--text-secondary); line-height: 1.65; max-width: 78ch; margin: 0; }
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border-hairline); border: 1px solid var(--border-hairline);
}
.step { background: var(--white); padding: 1.45rem 1.5rem 1.55rem; display: flex; flex-direction: column; }
.step .n { font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--steel); }
.step h3 { font-family: var(--serif); font-size: 1.08rem; line-height: 1.3; margin: .55rem 0 .8rem; }
.step ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; flex: 1; margin: 0; padding: 0; }
.step li { font-size: .83rem; color: var(--text-muted); line-height: 1.5; padding-left: 1.05rem; position: relative; }
.step li::before { content: ""; position: absolute; left: 0; top: .52em; width: .45rem; height: 2px; background: var(--navy); }
.step li b { font-weight: 600; color: var(--text-primary); }
.step li a { color: var(--navy); font-weight: 500; border-bottom: 1px solid var(--border-dark); }
.path-foot { margin: 1.3rem 0 0; font-size: .88rem; color: var(--text-secondary); }
.path-foot a { color: var(--navy); font-weight: 600; }

/* ---- Sticky filter bar ---- */
.lib-sticky {
  background: var(--off-white); border-bottom: 1px solid var(--border-hairline);
  position: sticky; top: 74px; z-index: 40;
}
.lib-sticky-inner {
  display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1.8rem;
  max-width: var(--container); margin: 0 auto;
  padding: .7rem var(--gutter);
}
.lib-sticky input {
  flex: 1 1 240px; max-width: 420px;
  padding: .55rem .9rem; border: 1px solid #c9d2dc; border-radius: 7px;
  font-size: .92rem; font-family: inherit; background: var(--white);
}
.lib-sticky-links { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem 1.4rem; }
.lib-sticky-links a {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--steel-deep); transition: color .15s;
}
.lib-sticky-links a:hover { color: var(--navy); }

/* ---- The four interactive tools ---- */
.lib-tools { background: var(--navy); color: var(--white); padding: 3rem 0 3.25rem; scroll-margin-top: 130px; }
.tools-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem;
}
.tools-head h2 { color: var(--white); font-size: 1.45rem; }
.tools-head .count { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--steel-light); }
.tools-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: rgba(255,255,255,.25); border: 1px solid rgba(255,255,255,.25);
}
.tool-card { background: var(--navy); padding: 1.6rem 1.7rem; display: flex; flex-direction: column; scroll-margin-top: 130px; }
.tool-card h3 { font-family: var(--serif); color: var(--white); font-size: 1.3rem; margin: 10px 0 6px; }
.tool-card p { margin: 0 0 1.25rem; opacity: .92; font-size: .93rem; color: var(--white); line-height: 1.55; flex: 1; }
.tool-card .band-cta { align-self: flex-start; }
.band-badge {
  display: inline-block; background: var(--white); color: var(--navy);
  font-size: 12.5px; font-weight: 700; letter-spacing: .5px; padding: 2px 8px; border-radius: 4px;
  align-self: flex-start;
}
.band-cta {
  background: var(--white); color: var(--navy); font-weight: 700;
  padding: 12px 24px; border-radius: 7px; text-decoration: none; white-space: nowrap;
}

/* ---- General-compliance shelf divider ---- */
.lib-divider { background: var(--navy-bg); border-top: 2px solid var(--navy); padding: 2rem 0 1.8rem; scroll-margin-top: 130px; }
.lib-divider h2 { font-size: 1.35rem; margin: .35rem 0 .5rem; }
.lib-divider p { font-size: .9rem; color: var(--text-muted); max-width: 70ch; margin: 0; }

/* ---- Category jump strip (catalog head) ---- */
.cat-strip { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem 1.3rem; margin-top: 1.3rem; }
.cat-strip .g {
  font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--text-faint);
  border-right: 1px solid var(--border-dark); padding-right: 1.1rem;
}
.cat-strip a {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--steel-deep); transition: color .15s;
}
.cat-strip a:hover { color: var(--navy); }

/* ---- Section step chips / start-here ---- */
.section-head .hgroup { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.stepchip {
  font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--steel); border: 1px solid var(--border-dark);
  border-radius: 2px; padding: .2rem .5rem;
}
.starthere {
  font-family: var(--mono); font-size: .66rem; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: #9a6b15; background: #fdf4e0; border: 1px solid #eedbaa;
  border-radius: 2px; padding: .2rem .5rem; white-space: nowrap;
}
.doc-first { outline: 2px solid var(--navy); outline-offset: -2px; }

/* ---- Membership pillars strip (below program path) ---- */
.pillars { background: var(--navy-bg); border-top: 1px solid var(--border-hairline); border-bottom: 1px solid var(--border-hairline); padding: .95rem 0; }
.pillars-inner { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem 1.4rem; }
.pillars .k {
  font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--steel);
  border-right: 1px solid var(--border-dark); padding-right: 1.2rem; white-space: nowrap;
}
.pillars .v { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; }
.pillars .v b {
  font-weight: 600; font-size: .82rem; color: var(--text-secondary);
  white-space: nowrap; line-height: 1.4;
}

/* ---- "On this page" table of contents ---- */
.lib-toc { background: var(--off-white); border-bottom: 1px solid var(--border-hairline); }
.lib-toc-inner {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .75rem 2rem;
  max-width: var(--container); margin: 0 auto; padding: 1.05rem var(--gutter);
}
.toc-jump {
  flex-basis: 100%;
  font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-faint);
}
.toc-group { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem 1.1rem; }
.toc-group .g {
  font-family: var(--mono); font-size: .66rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--steel);
  border-right: 1px solid var(--border-dark); padding-right: 1rem; white-space: nowrap;
}
.toc-group a {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .04em;
  color: var(--steel-deep); transition: color .15s; white-space: nowrap;
}
.toc-group a:hover { color: var(--navy); }

/* ---- Featured interactive-tool cards (IRP / Scan / IR Assistant / VDD) ---- */
/* Rounded navy tiles in the braintrust-page idiom, replacing the unstyled
   white-on-white bands. .lib-featured wraps a .container that carries the card. */
.lib-featured { padding: 1.4rem 0; }
.lib-featured + .lib-featured { padding-top: 0; }
.lib-featured .container {
  background: var(--navy-deep);
  border-radius: 10px;
  padding: 1.9rem 2.1rem;
  color: var(--white);
}
.lib-featured .container h2 { color: var(--white); font-family: var(--serif); }
.lib-featured .band-badge { margin-bottom: .2rem; }

/* Vendor DD featured tile (injected inside the Vendor & Third-Party section) */
.vdd-featured {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px; background: var(--navy-deep); border-radius: 10px;
  padding: 1.9rem 2.1rem; margin: 1.75rem 0 1rem;
}
.vdd-featured-text { flex: 1; min-width: 280px; }
.vdd-featured h3 { color: var(--white); font-family: var(--serif); font-size: 1.4rem; margin: 8px 0 6px; }
.vdd-featured p { color: var(--white); opacity: .92; font-size: .95rem; line-height: 1.55; margin: 0; max-width: 660px; }

@media (max-width: 640px) {
  .lib-featured .container, .vdd-featured { padding: 1.5rem 1.4rem; }
}

@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .doc-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .lib-header h1 { font-size: 2.1rem; }
  .upsell-inner { flex-direction: column; align-items: flex-start; }
  .lib-sticky { position: static; }
  .steps { grid-template-columns: 1fr; }
  .doc-row { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .doc-row-main p { -webkit-line-clamp: 3; }
}
