/* ==========================================================================
   Branch Compliance — clean editorial story.
   Five chapters, single column, no animations.
   Visual interest comes from typography + tone-colored callouts.
   ========================================================================== */

.fragment-branch-compliance {
  position: relative;
  padding: 0;
  background: transparent;
  overflow: visible;
  --bc-accent: #4ade80;
  --bc-text: #e2e8f0;
  --bc-text-soft: rgba(226, 232, 240, 0.88);
  --bc-text-mute: rgba(203, 213, 225, 0.7);
  --bc-line: rgba(148, 163, 184, 0.18);
  --bc-panel: rgba(11, 17, 33, 0.7);
}

.branch-compliance-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.6rem;
}

/* ---------- Intro ---------- */

.bc-intro {
  margin: 0 auto 2.4rem;
  text-align: center;
  padding-top: 1rem;
}

.bc-eyebrow {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bc-accent);
  margin: 0 0 0.9rem;
  font-weight: 600;
}

.bc-headline {
  font-size: clamp(1.85rem, 4.6vw, 2.9rem);
  line-height: 1.14;
  color: var(--bc-text);
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bc-headline-accent {
  display: inline-block;
  color: var(--bc-accent);
}

.bc-deck {
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.6;
  color: var(--bc-text-soft);
  margin: 0 auto;
  max-width: 58ch;
}

/* ---------- Story spacing ---------- */

.bc-story {
  display: grid;
  gap: clamp(2.4rem, 4vw, 3.4rem);
}

/* Soft divider between chapters (decorative gradient line) */
.bc-story > .story-chapter + .story-chapter {
  position: relative;
}
.bc-story > .story-chapter + .story-chapter::before {
  content: '';
  position: absolute;
  top: calc(-1 * clamp(1.4rem, 2.5vw, 2.2rem));
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(148, 163, 184, 0.22) 28%,
    rgba(148, 163, 184, 0.22) 72%,
    transparent 100%);
  pointer-events: none;
}

/* ---------- Chapter ---------- */

.story-chapter {
  position: relative;
}

.story-chapter.tone-focus,
.story-chapter.tone-exposure,
.story-chapter.tone-impact,
.story-chapter.tone-partner { --tone: var(--bc-accent); }

/* ---------- Chapter marker (tone dot + step counter) ---------- */

.chapter-marker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.85rem;
}

.chapter-marker-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tone, var(--bc-accent));
  box-shadow: 0 0 14px color-mix(in srgb, var(--tone, var(--bc-accent)) 70%, transparent);
}

.chapter-marker-step {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
  font-weight: 500;
}

.chapter-marker-step strong {
  color: var(--tone, var(--bc-accent));
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.3em;
}

/* ---------- Kicker + heading + body ---------- */

.smb-kicker {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--tone, var(--bc-accent));
  margin: 0 0 0.7rem;
  font-weight: 700;
}

.story-chapter h3 {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  color: var(--bc-text);
  margin: 0 0 1rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.005em;
}

.smb-body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--bc-text-soft);
  margin: 0 0 1rem;
}

.smb-body:last-child { margin-bottom: 0; }
.smb-body strong { color: var(--bc-text); font-weight: 700; }

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

.bc-stat {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 1.4rem 0 0;
  padding: 1.05rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(11, 17, 33, 0.9), rgba(15, 23, 42, 0.62));
  border: 1px solid rgba(74, 222, 128, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.bc-stat-figure {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 0.04em;
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  line-height: 1;
  color: var(--bc-accent);
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(74, 222, 128, 0.32);
}

.bc-stat-num { font-size: clamp(2.4rem, 5.6vw, 3.2rem); }
.bc-stat-unit { font-size: clamp(1.1rem, 2.8vw, 1.45rem); margin-left: 0.05em; }

.bc-stat-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--bc-text-soft);
}

.bc-stat-text strong { color: var(--bc-text); font-weight: 700; }

/* ---------- Tip box ---------- */

.bc-tip {
  margin-top: 1.4rem;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: rgba(11, 17, 33, 0.78);
  border: 1px solid rgba(74, 222, 128, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.bc-tip-label {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bc-accent);
  margin: 0 0 0.55rem;
  font-weight: 700;
}

.bc-tip p {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--bc-text-soft);
}

/* ---------- Question list ---------- */

.bc-questions {
  list-style: none;
  margin: 1rem 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.bc-questions li {
  position: relative;
  padding: 0.7rem 0.95rem 0.7rem 2.4rem;
  border-radius: 10px;
  background: rgba(11, 17, 33, 0.55);
  border: 1px solid var(--bc-line);
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--bc-text-soft);
}

.bc-questions li::before {
  content: "?";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.78rem;
  color: #0a1020;
  background: var(--tone, var(--bc-accent));
  font-weight: 700;
}

.bc-questions strong { color: var(--bc-text); }

/* ---------- Feature pills ---------- */

.bc-pills {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bc-pills li {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.77rem;
  letter-spacing: 0.04em;
  color: var(--bc-text);
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.36);
}

/* ---------- Three pillars (Check / Watch / Defend) — single column ---------- */

.bc-pillars {
  list-style: none;
  margin: 1.3rem 0 1.4rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.bc-pillar {
  --pillar-color: var(--bc-accent);
  position: relative;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-left: 3px solid var(--pillar-color);
}

.bc-pillar-check,
.bc-pillar-watch,
.bc-pillar-defend { --pillar-color: var(--bc-accent); }

.bc-pillar-name {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--pillar-color);
  letter-spacing: 0.005em;
}

.bc-pillar-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--bc-text-soft);
}

/* ---------- Punchline ---------- */

.bc-punchline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin: 1.2rem 0 1.4rem;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: clamp(0.94rem, 1.6vw, 1.05rem);
  letter-spacing: 0.04em;
  color: var(--bc-text-soft);
}

.bc-punchline > span { position: relative; padding-right: 0.85rem; }
.bc-punchline > span:not(:last-child)::after {
  content: '·';
  position: absolute;
  right: 0;
  color: rgba(148, 163, 184, 0.6);
}

.bc-punchline-strong {
  color: var(--bc-accent);
  font-weight: 700;
  text-shadow: 0 0 16px rgba(74, 222, 128, 0.3);
}

/* ---------- Action buttons ---------- */

.smb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.smb-actions .btn {
  padding: 0.78rem 1.25rem;
  font-size: 0.95rem;
}

.smb-actions .btn-wide {
  flex: 1 1 auto;
  min-width: 220px;
  text-align: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */


@media (max-width: 480px) {
  .branch-compliance-inner { padding: 0 1.15rem; }
  .bc-intro { margin-bottom: 2.2rem; padding-top: 0.4rem; }
  .smb-actions { flex-direction: column; align-items: stretch; }
  .smb-actions .btn-wide { min-width: 0; }
  .bc-stat { flex-direction: column; align-items: flex-start; gap: 0.4rem; padding: 0.95rem 1.05rem; }
  .bc-tip { padding: 0.95rem 1.05rem; }
}

/* ==========================================================================
   Forced-colors / Windows high contrast
   ========================================================================== */

@media (forced-colors: active) {
  .bc-stat,
  .bc-tip,
  .bc-questions li,
  .bc-pills li { border-color: CanvasText; background: Canvas; }
}

/* ==========================================================================
   Third-party warning modal
   ========================================================================== */

.third-party-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.third-party-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.third-party-modal-content {
  position: relative;
  z-index: 1;
  background: rgba(10, 16, 30, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  max-width: 460px;
  width: 92%;
  padding: 1.8rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.third-party-modal-content p {
  color: var(--bc-text-soft);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 1.4rem;
}

.third-party-modal-footer {
  display: flex;
  gap: 0.9rem;
  justify-content: flex-end;
}

.third-party-modal-footer .btn {
  padding: 0.7rem 1.3rem;
  font-size: 0.92rem;
}

.third-party-modal-footer .btn:first-child {
  flex: 1;
  text-align: center;
}

@media (max-width: 480px) {
  .third-party-modal-content { max-width: calc(100% - 2rem); }
  .third-party-modal-footer { flex-direction: column; }
  .third-party-modal-footer .btn { width: 100%; }
  .third-party-modal-footer .btn:first-child { flex: none; }
}
