/* Brand book — an internal reference page, hidden from navigation.
 *
 * Shares the playbook's layout language deliberately: the two pages are read as a
 * pair, and a merchant should not have to relearn the furniture. Scoped under
 * .bpn-doc, same as the playbook — only one of the two ever loads at a time. */

.bpn-doc {
  --doc-ink: #173824;
  --doc-ink-soft: #3d4c42;
  --doc-green: #214e34;
  --doc-sage: #dde7e0;
  --doc-cream: #f7f4ec;
  --doc-rule: #d7e0d9;
  --doc-warn: #7a1c22;
  --doc-head-offset: 120px;

  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 20px 96px;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--doc-ink);
  background: #fff;
}

.bpn-doc *,
.bpn-doc *::before,
.bpn-doc *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------- masthead */

.bpn-doc__masthead {
  padding: 36px 32px 32px;
  margin-bottom: 32px;
  color: var(--doc-cream);
  background: var(--doc-green);
  border-radius: 14px;
}

.bpn-doc__kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.bpn-doc__masthead h1 {
  margin: 0 0 14px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.14;
}

.bpn-doc__standfirst {
  max-width: 62ch;
  margin: 0;
  font-size: 16px;
  line-height: 1.62;
  opacity: 0.92;
}

.bpn-doc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 22px;
  padding-top: 18px;
  font-size: 12.5px;
  border-top: 1px solid rgba(247, 244, 236, 0.24);
  opacity: 0.85;
}

/* ------------------------------------------------------------------ layout */

.bpn-doc__body {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

@media (max-width: 900px) {
  .bpn-doc__body { display: block; }
}

/* --------------------------------------------------------------------- TOC */

.bpn-doc__nav {
  position: sticky;
  top: var(--doc-head-offset);
  max-height: calc(100vh - var(--doc-head-offset) - 24px);
  overflow-y: auto;
  padding-right: 8px;
  font-size: 13.5px;
}

@media (max-width: 900px) {
  .bpn-doc__nav {
    position: static;
    max-height: none;
    margin-bottom: 32px;
    padding: 18px 20px;
    background: var(--doc-cream);
    border-radius: 12px;
  }
}

.bpn-doc__nav h2 {
  margin: 0 0 12px;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--doc-ink-soft);
}

.bpn-doc__nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bpn-doc__nav li { margin: 0 0 2px; }

.bpn-doc__nav a {
  display: block;
  padding: 5px 10px;
  color: var(--doc-ink);
  text-decoration: none;
  border-radius: 6px;
  border-left: 2px solid transparent;
}

.bpn-doc__nav a:hover {
  background: var(--doc-sage);
  border-left-color: var(--doc-green);
}

.bpn-doc__nav .is-sub a {
  padding-left: 22px;
  font-size: 12.5px;
  color: var(--doc-ink-soft);
}

/* ------------------------------------------------------------------ prose */

.bpn-doc__main { min-width: 0; }

.bpn-doc section[id] { scroll-margin-top: var(--doc-head-offset); }

/* Scoped to __main on purpose: these are prose rules, and the sidebar has its
 * own h2 and list styling that they would otherwise outrank by source order. */

.bpn-doc__main h2 {
  margin: 56px 0 6px;
  padding-top: 26px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  border-top: 2px solid var(--doc-green);
}

.bpn-doc__main section:first-of-type h2 { margin-top: 0; }

.bpn-doc__main h3 {
  margin: 34px 0 10px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.bpn-doc__main h4 {
  margin: 22px 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--doc-ink-soft);
}

.bpn-doc__main p { margin: 0 0 14px; max-width: 74ch; }
.bpn-doc__main ul, .bpn-doc__main ol { margin: 0 0 16px; padding-left: 22px; max-width: 74ch; }
.bpn-doc__main li { margin-bottom: 7px; }

.bpn-doc a { color: var(--doc-green); }

.bpn-doc code {
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--doc-sage);
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.bpn-doc__lede {
  max-width: 74ch;
  margin: 0 0 22px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--doc-ink-soft);
}

/* ------------------------------------------------------------------ callout */

.bpn-doc__callout {
  margin: 0 0 20px;
  padding: 16px 20px;
  background: var(--doc-cream);
  border-left: 3px solid var(--doc-green);
  border-radius: 0 8px 8px 0;
}

.bpn-doc__callout > :last-child { margin-bottom: 0; }

.bpn-doc__callout--warn {
  background: #fdf3f3;
  border-left-color: var(--doc-warn);
}

.bpn-doc__callout h4 { margin-top: 0; color: inherit; }

/* ------------------------------------------------------------------- tables */

.bpn-doc__scroll {
  margin: 0 0 24px;
  overflow-x: auto;
  border: 1px solid var(--doc-rule);
  border-radius: 10px;
}

.bpn-doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.bpn-doc th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--doc-ink-soft);
  background: var(--doc-cream);
  border-bottom: 1px solid var(--doc-rule);
  white-space: nowrap;
}

.bpn-doc td {
  padding: 11px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--doc-rule);
}

.bpn-doc tr:last-child td { border-bottom: 0; }

.bpn-doc__grp td {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--doc-ink-soft);
  background: #fbfaf6;
}

.bpn-doc__fid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--doc-ink-soft);
  overflow-wrap: anywhere;
}

.bpn-doc__type { font-size: 12.5px; color: var(--doc-ink-soft); white-space: nowrap; }
.bpn-doc__dflt { font-size: 12.5px; color: var(--doc-ink-soft); overflow-wrap: anywhere; }
.bpn-doc__note { display: block; margin-top: 5px; font-size: 12.5px; color: var(--doc-ink-soft); }
.bpn-doc__note--warn { color: var(--doc-warn); }
.bpn-doc__opts { display: block; margin-top: 5px; font-size: 12.5px; color: var(--doc-ink-soft); }

/* ------------------------------------------------------------ section cards */

.bpn-doc__sec {
  margin: 0 0 20px;
  padding: 22px 24px;
  border: 1px solid var(--doc-rule);
  border-radius: 12px;
}

.bpn-doc__sec > h3 { margin-top: 0; }

.bpn-doc__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.bpn-doc__tag {
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--doc-sage);
  color: var(--doc-green);
}

.bpn-doc__tag--custom { background: var(--doc-green); color: var(--doc-cream); }
.bpn-doc__tag--unused { background: #eee; color: #666; }

.bpn-doc__where {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--doc-ink-soft);
}

.bpn-doc__blk {
  margin: 20px 0 0;
  padding: 16px 18px;
  background: #fbfaf6;
  border-radius: 8px;
}

.bpn-doc__blk h4 { margin-top: 0; }
.bpn-doc__blk .bpn-doc__scroll { margin-bottom: 0; background: #fff; }

/* --------------------------------------------------------------- swatches */

.bpn-doc__schemes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 0 0 24px;
}

.bpn-doc__scheme {
  overflow: hidden;
  border: 1px solid var(--doc-rule);
  border-radius: 10px;
}

.bpn-doc__scheme-demo { padding: 18px 16px; }

.bpn-doc__scheme-demo strong {
  display: block;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 15px;
  margin-bottom: 4px;
}

.bpn-doc__scheme-demo span { font-size: 12.5px; }

.bpn-doc__scheme-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
}

.bpn-doc__scheme-foot {
  padding: 10px 14px;
  font-size: 11.5px;
  color: var(--doc-ink-soft);
  background: #fff;
  border-top: 1px solid var(--doc-rule);
}

.bpn-doc__scheme-foot b { color: var(--doc-ink); }

.bpn-doc__chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }

.bpn-doc__chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 8px;
  font-size: 12.5px;
  border: 1px solid var(--doc-rule);
  border-radius: 999px;
}

.bpn-doc__chip i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(23, 56, 36, 0.18);
}

/* ------------------------------------------------------------------ filter */

.bpn-doc__filter {
  position: sticky;
  top: var(--doc-head-offset);
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 22px;
  padding: 12px 0;
  background: #fff;
}

/* The site header is fixed, retracts on scroll and is 69px or 101px tall
 * depending on whether the promo bar is pinned, so the sticky offset above
 * cannot match its underside exactly. This bleeds the bar's white background
 * upwards to cover whatever gap is left, instead of letting the page scroll
 * through it. Both site header (z-index 60) and promo bar (61) paint above it.
 *
 * It is gated on .is-stuck because an absolutely positioned bleed is not
 * clipped by the column: unconditionally, it painted a white notch over the
 * bottom of the masthead whenever the page sat at the top. */
.bpn-doc__sentinel { height: 1px; margin: 0; }

.bpn-doc__filter::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 220px;
  background: #fff;
  opacity: 0;
}

.bpn-doc__filter.is-stuck::before { opacity: 1; }

.bpn-doc__filter input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--doc-ink);
  background: #fff;
  border: 1px solid var(--doc-rule);
  border-radius: 999px;
}

.bpn-doc__filter input:focus {
  outline: none;
  border-color: var(--doc-green);
  box-shadow: 0 0 0 3px rgba(33, 78, 52, 0.12);
}

.bpn-doc__count { font-size: 12.5px; color: var(--doc-ink-soft); white-space: nowrap; }

.bpn-doc [hidden] { display: none !important; }

/* ------------------------------------------------------------------- print */

@media print {
  .bpn-doc { padding: 0; font-size: 10pt; }
  .bpn-doc__nav,
  .bpn-doc__filter { display: none; }
  .bpn-doc__body { display: block; }
  .bpn-doc__masthead { color: #000; background: none; border-bottom: 2px solid #000; border-radius: 0; }
  .bpn-doc__sec { break-inside: avoid; }
  .bpn-doc h2 { break-after: avoid; }
}

/* ======================================================================
 * Brand-book additions
 * ==================================================================== */

/* ------------------------------------------------------------ status pills */

.bpn-status {
  display: inline-block;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 4px;
}

.bpn-status--yes    { color: #14532d; background: #d6ecdd; }
.bpn-status--maybe  { color: #7a4a10; background: #fbeed3; }
.bpn-status--narrow { color: #1e3a5f; background: #d9e6f5; }
.bpn-status--no     { color: #7a1c22; background: #f6dcde; }

/* Claim rows read far faster with the verdict carried on the row itself. */
.bpn-claim td:first-child { font-weight: 600; }
.bpn-claim--no td:first-child { color: var(--doc-warn); text-decoration: line-through; text-decoration-thickness: 1px; }

.bpn-doc__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 22px;
  padding: 14px 18px;
  font-size: 12.5px;
  background: var(--doc-cream);
  border-radius: 10px;
}

.bpn-doc__legend span { display: flex; align-items: center; gap: 8px; }

/* ----------------------------------------------------------------- logo */

.bpn-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 0 0 24px;
}

.bpn-logo {
  overflow: hidden;
  border: 1px solid var(--doc-rule);
  border-radius: 10px;
}

.bpn-logo__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 128px;
  padding: 26px 22px;
}

.bpn-logo__stage img { width: 100%; max-width: 170px; height: auto; }
.bpn-logo__stage--green { background: #214e34; }
.bpn-logo__stage--deep  { background: #173824; }
.bpn-logo__stage--cream { background: #f7f4ec; }
.bpn-logo__stage--white { background: #fff; border-bottom: 1px solid var(--doc-rule); }

/* The supplied mark is a single flat green fill (#004e30), so it stands on light
 * backgrounds untouched and has to be knocked out to white for the dark ones.
 * brightness(0) flattens it to black first, so invert(1) lands on pure white
 * whatever the source colour is. */
.bpn-logo__stage--green img,
.bpn-logo__stage--deep img { filter: brightness(0) invert(1); }

.bpn-logo__cap {
  padding: 11px 14px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--doc-ink-soft);
  background: #fff;
  border-top: 1px solid var(--doc-rule);
}

.bpn-logo__cap b { display: block; color: var(--doc-ink); }

/* ------------------------------------------------------------ typography */

.bpn-spec {
  margin: 0 0 14px;
  padding: 20px 22px;
  border: 1px solid var(--doc-rule);
  border-radius: 10px;
}

.bpn-spec__label {
  margin: 0 0 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--doc-ink-soft);
}

.bpn-spec__serif {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.12;
  color: var(--doc-ink);
}

.bpn-spec__sans {
  margin: 0;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--doc-ink);
}

.bpn-spec__alpha {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--doc-ink-soft);
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------- copy blocks */

.bpn-copyblock {
  margin: 0 0 14px;
  padding: 18px 20px;
  background: var(--doc-cream);
  border-radius: 10px;
}

.bpn-copyblock h4 { margin: 0 0 8px; }

.bpn-copyblock p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.bpn-copyblock p + p { margin-top: 8px; }

/* ------------------------------------------------------------- checklist */

.bpn-check { margin: 0 0 20px; padding: 0; list-style: none; max-width: 74ch; }

.bpn-check li {
  position: relative;
  margin: 0 0 9px;
  padding-left: 30px;
}

.bpn-check li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--doc-green);
  border-radius: 4px;
}
