/* Project 4 — editorial case-study system inspired by the reference site's
   rhythm, typography and contrast. All selectors are scoped to .ai-case. */
:root {
  --bb-ink: #101924;
  --bb-navy: #071725;
  --bb-blue: #1976f3;
  --bb-cyan: #2b82ff;
  --bb-blue-text: #0b63ce;
  --bb-blue-on-dark: #5fa2ff;
  --bb-paper: #f4f6f7;
  --bb-line: #d6dde2;
  --bb-muted: #65717b;
}

html { scroll-behavior: smooth; }
.ai-case {
  background: #fff;
  color: var(--bb-ink);
  font-family: "Roboto", Arial, sans-serif;
  overflow: visible;
  padding-top: 80px;
}
.ai-case * { box-sizing: border-box; }
.ai-case p { color: #52606b; }
.ai-case .container { max-width: 1180px; }

/* Hero */
.ai-case .bb-hero {
  position: relative;
  min-height: 690px;
  display: flex;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(3,12,21,.97) 0%, rgba(3,15,27,.91) 42%, rgba(4,20,36,.76) 72%, rgba(4,20,36,.62) 100%),
    url("../images/branch-banking/software-modernization-hero.png") center right / cover no-repeat;
  border-bottom: 4px solid var(--bb-cyan);
}
.ai-case .bb-hero-grid {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, #000, transparent 75%);
}
.ai-case .bb-hero-inner { position: relative; }
.ai-case .bb-hero h1 {
  color: #fff;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  margin: 24px 0 30px;
}
.ai-case .bb-hero h1 span { color: var(--bb-cyan); }
.ai-case .bb-hero-lead {
  max-width: 720px;
  color: #c2cbd2;
  font-size: 18px;
  line-height: 1.72;
  margin: 0;
}
.ai-case .bb-hero-facts {
  border-top: 1px solid rgba(255,255,255,.28);
  margin-left: 40px;
}
.ai-case .bb-hero-facts div {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.ai-case .bb-hero-facts span,
.ai-case .bb-hero-facts strong { display: block; }
.ai-case .bb-hero-facts span {
  color: var(--bb-cyan);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 5px;
}
.ai-case .bb-hero-facts strong {
  color: #fff;
  font-size: .84rem;
  line-height: 1.55;
  font-weight: 600;
}
.ai-case .bb-scroll-cue {
  display: inline-flex;
  gap: 16px;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-top: 50px;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,.35);
}
.ai-case .bb-scroll-cue:hover { color: var(--bb-cyan); border-color: var(--bb-cyan); }

/* Shared section language */
.ai-case .bb-section { padding: 64px 0; }
.ai-case .bb-divider {
  width: 42px;
  height: 2px;
  margin: 0 0 18px;
  border: 0;
  background: var(--bb-blue);
}
.ai-case .bb-kicker {
  color: var(--bb-blue);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.ai-case .bb-section-title {
  max-width: 850px;
  color: var(--bb-ink);
  font-size: 36px !important;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  margin: 12px 0 20px;
}
.ai-case .bb-intro {
  max-width: 820px;
  color: #4f5e69;
  font-size: 18px;
  line-height: 1.72;
}
.ai-case .bb-subtitle {
  color: var(--bb-ink);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 20px 0 8px;
}
.ai-case .bb-section-copy {
  max-width: 840px;
  font-size: .94rem;
  line-height: 1.75;
  margin-bottom: 24px;
}
.ai-case section:nth-of-type(2) { background: #fff; }
.ai-case #challenge {
  background: var(--bb-navy);
  color: #fff;
}
.ai-case #challenge .bb-divider { background: var(--bb-cyan); }
.ai-case #challenge .bb-section-title,
.ai-case #challenge .bb-card h3 { color: #fff; }
.ai-case #challenge .bb-intro,
.ai-case #challenge .bb-card p { color: #aebbc5; }
.ai-case #challenge .bb-card {
  background: transparent;
  border-color: rgba(255,255,255,.2);
}
.ai-case section:nth-of-type(4) { background: var(--bb-paper); }
.ai-case section:nth-of-type(5) { background: #fff; }
.ai-case #unused-dark-section { background: var(--bb-navy); color: #fff; }
.ai-case #unused-dark-section .bb-divider { background: var(--bb-cyan); }
.ai-case #unused-dark-section .bb-section-title,
.ai-case #unused-dark-section h3,
.ai-case #unused-dark-section strong { color: #fff; }
.ai-case #unused-dark-section .bb-intro,
.ai-case #unused-dark-section p { color: #aebbc5; }
.ai-case section:nth-of-type(7) { background: var(--bb-paper); }
.ai-case section:nth-of-type(8) { background: #fff; }
.ai-case #unused-impact-section {
  color: #fff;
  background: linear-gradient(135deg, #1976f3 0%, #0868df 100%);
}
.ai-case #unused-impact-section .bb-divider { background: #fff; }
.ai-case #unused-impact-section .bb-kicker,
.ai-case #unused-impact-section .bb-section-title,
.ai-case #unused-impact-section .bb-subtitle,
.ai-case #unused-impact-section h3,
.ai-case #unused-impact-section strong { color: #fff; }
.ai-case #unused-impact-section .bb-intro,
.ai-case #unused-impact-section p,
.ai-case #unused-impact-section span { color: #d7ebf7; }
/* Cards and information blocks */
.ai-case .bb-card {
  height: 100%;
  padding: 28px;
  margin-bottom: 22px;
  border: 1px solid var(--bb-line);
  border-top: 3px solid var(--bb-blue);
  background: #fff;
  transition: transform .25s ease, box-shadow .25s ease;
}
.ai-case .bb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(16,25,36,.08);
}
.ai-case .bb-card h3 {
  color: var(--bb-ink);
  font-size: 1.03rem;
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 0 0 12px;
}
.ai-case .bb-card p { font-size: .9rem; line-height: 1.72; margin: 0; }
.ai-case .bb-finding {
  position: relative;
  padding: 32px;
  margin: 26px 0;
  border: 1px solid #cadce7;
  background: #edf7fc;
}
.ai-case .bb-finding:before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--bb-blue);
}
.ai-case .bb-finding h3 {
  color: var(--bb-ink);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.ai-case .bb-finding p { font-size: .92rem; line-height: 1.7; }

/* Research gallery */
.ai-case .bb-research-card,
.ai-case .bb-hifi-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid #d9e0e4;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16,25,36,.05);
  transition: transform .25s ease, box-shadow .25s ease;
}
.ai-case .bb-research-card:hover,
.ai-case .bb-hifi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(16,25,36,.12);
}
.ai-case .bb-research-card img {
  display: block;
  width: 100%;
  height: 205px;
  object-fit: contain;
  background: #eef2f4;
  border-bottom: 1px solid #e1e6e9;
}
.ai-case .bb-research-card.compact img { height: 165px; }
.ai-case .bb-research-copy { padding: 17px 18px 20px; }
.ai-case .bb-research-copy strong {
  display: block;
  color: var(--bb-ink);
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: 7px;
}
.ai-case .bb-research-copy span {
  display: block;
  color: #68757e;
  font-size: .76rem;
  line-height: 1.6;
}
.ai-case .bb-metric {
  height: 100%;
  padding: 25px 16px;
  border: 0;
  border-bottom: 3px solid var(--bb-blue);
  background: #fff;
  text-align: left;
}
.ai-case .bb-metric strong {
  display: block;
  color: var(--bb-blue);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.05em;
}
.ai-case .bb-metric span {
  color: #67737c;
  font-size: .73rem;
  line-height: 1.5;
}
.ai-case .bb-note {
  padding: 22px 25px;
  border-left: 4px solid var(--bb-blue);
  background: #e8f3f9;
  color: #40515e;
  font-size: .9rem;
  line-height: 1.7;
}

/* Decisions */
.ai-case .bb-decision-card {
  height: 100%;
  padding: 30px;
  border: 1px solid #dbe1e5;
  background: #fff;
}
.ai-case .bb-decision-label,
.ai-case .bb-hifi-tag {
  color: var(--bb-blue);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ai-case .bb-decision-card h3 {
  min-height: 54px;
  color: var(--bb-ink);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.3;
  margin: 12px 0 20px;
}
.ai-case .bb-decision-row { border-top: 1px solid #e0e5e8; }
.ai-case .bb-decision-row > div { padding-top: 17px; }
.ai-case .bb-decision-row strong {
  display: block;
  color: var(--bb-blue);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 5px;
}
.ai-case .bb-decision-row p { font-size: .86rem; line-height: 1.7; }
.ai-case .bb-decision-card-featured > h3 { min-height: 0; }
.ai-case .bb-decision-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  border-top: 1px solid #e0e5e8;
}
.ai-case .bb-decision-summary > div { padding-top: 18px; }
.ai-case .bb-decision-heading,
.ai-case .bb-iteration-card > strong,
.ai-case .bb-why-matters > strong {
  display: block;
  margin-bottom: 6px;
  color: var(--bb-blue-text);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
}
.ai-case .bb-search-flow { margin-top: 20px; border-top: 1px solid #e0e5e8; }
.ai-case .bb-decision-card-featured .bb-search-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}
.ai-case .bb-search-flow-item { padding: 15px 0 0; }
.ai-case .bb-search-flow-label {
  display: inline-block;
  color: #fff;
  background: var(--bb-blue);
  padding: 4px 8px;
  font-size: .63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.ai-case .bb-iteration-section {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid #dbe1e5;
}
.ai-case .bb-iteration-section > h3 {
  min-height: 0;
  margin: 10px 0 22px;
}
.ai-case .bb-iteration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.ai-case .bb-iteration-card {
  padding: 25px;
  border: 1px solid #d6e1e8;
  border-top: 3px solid var(--bb-blue-text);
  background: var(--bb-paper);
}
.ai-case .bb-iteration-number {
  margin-bottom: 10px;
  color: var(--bb-blue-text);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ai-case .bb-iteration-card h4 {
  margin: 0 0 22px;
  color: var(--bb-ink);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
}
.ai-case .bb-iteration-card p { margin-bottom: 18px; }
.ai-case .bb-iteration-card p:last-child { margin-bottom: 0; }
.ai-case .bb-why-matters {
  margin-top: 22px;
  padding: 22px 24px;
  border-left: 4px solid var(--bb-blue-text);
  background: #e8f3f9;
}
.ai-case .bb-why-matters p { margin: 0; }
.ai-case .bb-impact-strip {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: none;
  padding: 22px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  color: #fff;
  background: var(--bb-navy);
}
.ai-case .bb-impact-strip strong {
  color: var(--bb-cyan);
  white-space: nowrap;
}
.ai-case .bb-impact-values {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 10px;
  min-width: max-content;
}
.ai-case .bb-impact-values span {
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.25);
  color: #d8e2e9;
  font-size: .72rem;
  white-space: nowrap;
}

/* Prototype and screens */
.ai-case .bb-flow-step {
  min-height: 145px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.2);
  border-top: 3px solid var(--bb-cyan);
  background: rgba(255,255,255,.04);
}
.ai-case .bb-flow-step b {
  display: block;
  color: var(--bb-cyan);
  font-size: .7rem;
  letter-spacing: .12em;
  margin-bottom: 14px;
}
.ai-case .bb-flow-step strong { display: block; font-size: .9rem; margin-bottom: 7px; }
.ai-case .bb-flow-step p { font-size: .75rem; line-height: 1.55; margin: 0; }
.ai-case .bb-hifi-card { background: #fff; border: 0; }
.ai-case .bb-hifi-card img {
  display: block;
  width: 100%;
  height: 205px;
  object-fit: contain;
  background: #eef2f4;
}
.ai-case .bb-hifi-copy { min-height: 84px; padding: 16px 18px; }
.ai-case .bb-hifi-copy h3 {
  color: var(--bb-ink) !important;
  font-size: .9rem;
  font-weight: 700;
  margin: 5px 0 0;
}

/* Testing and impact */
.ai-case .bb-action {
  height: 100%;
  padding: 16px;
  border: 1px solid #c7dce8;
  background: #fff;
}
.ai-case .bb-action strong { display: block; color: var(--bb-ink); font-size: .8rem; }
.ai-case .bb-action span { color: #63727c; font-size: .72rem; line-height: 1.5; }
.ai-case .bb-image {
  overflow: hidden;
  margin-bottom: 25px;
  border: 1px solid var(--bb-line);
  background: #fff;
}
.ai-case .bb-image img { display: block; width: 100%; height: auto; }
.ai-case .bb-caption {
  padding: 12px 15px;
  border-top: 1px solid var(--bb-line);
  color: #69757f;
  font-size: .72rem;
}
.ai-case .bb-before-after { margin: 14px 0; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.3); border-bottom: 1px solid rgba(255,255,255,.3); }
.ai-case #unused-impact-section .bb-metric {
  min-height: 180px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,.28);
  border-bottom: 3px solid #fff;
  background: rgba(4,32,53,.18);
}
.ai-case #unused-impact-section .bb-metric strong {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.25rem);
}
.ai-case #unused-impact-section .bb-finding {
  border-color: rgba(255,255,255,.25);
  background: rgba(4,32,53,.18);
}
.ai-case #unused-impact-section .bb-finding:before { background: #fff; }
.ai-case #unused-impact-section .bb-note {
  border-color: #fff;
  color: #fff;
  background: rgba(4,32,53,.18);
}

.ai-case .bb-section-tabs {
  position: sticky;
  top: 80px;
  z-index: 40;
  overflow-x: auto;
  border-bottom: 1px solid #e1e6e9;
  background: rgba(255,255,255,.98);
  box-shadow: 0 7px 20px rgba(16,25,36,.07);
  scrollbar-width: none;
}
.ai-case .bb-section-tabs::-webkit-scrollbar { display: none; }
.ai-case .bb-section-tabs .container {
  display: flex;
  align-items: center;
  min-width: max-content;
  height: 54px;
}
.ai-case .bb-section-tabs a {
  position: relative;
  display: flex;
  align-items: center;
  height: 54px;
  padding: 0 14px;
  color: #343434 !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.ai-case .bb-section-tabs a:after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 3px;
  background: transparent;
}
.ai-case .bb-section-tabs a:hover,
.ai-case .bb-section-tabs a.active { color: var(--bb-blue-text) !important; }
.ai-case .bb-section-tabs a.active:after { background: #1976f3; }
.ai-case .bb-section { scroll-margin-top: 146px; }

/* A quiet light background keeps the evidence in the impact section readable. */
.ai-case #impact {
  color: #101924;
  background: #f4f6f7;
}
.ai-case #impact .bb-divider { background: #1976f3; }
.ai-case #impact .bb-kicker,
.ai-case #impact .bb-section-title,
.ai-case #impact .bb-subtitle,
.ai-case #impact h3,
.ai-case #impact strong { color: #101924; }
.ai-case #impact .bb-intro,
.ai-case #impact p,
.ai-case #impact span { color: #52606b; }
.ai-case #impact .bb-metric {
  border: 1px solid #d6dde2;
  border-bottom: 3px solid #1976f3;
  background: #fff;
}
.ai-case #impact .bb-metric strong {
  color: var(--bb-blue-text);
  font-size: 2rem;
}
.ai-case #impact .bb-finding {
  border-color: #cadce7;
  background: #edf7fc;
}
.ai-case #impact .bb-finding:before { background: #1976f3; }
.ai-case #impact .bb-note {
  border-color: #1976f3;
  color: #40515e;
  background: #e8f3f9;
}

/* Accessible blue text: retain the homepage blues for larger visual accents. */
.ai-case .bb-kicker,
.ai-case .bb-metric strong,
.ai-case .bb-decision-label,
.ai-case .bb-hifi-tag,
.ai-case .bb-decision-row strong,
.ai-case .bb-flow-step b {
  color: var(--bb-blue-text);
}
.ai-case #challenge .bb-kicker,
.ai-case #unused-dark-section .bb-kicker,
.ai-case #unused-dark-section .bb-flow-step b {
  color: var(--bb-blue-on-dark);
}
.ai-case .bb-hero .bb-kicker,
.ai-case .bb-hero-facts span { color: var(--bb-blue-on-dark); }
.ai-case .bb-search-flow-label { background: var(--bb-blue-text); }

/* The concise result closes the impact chapter without another card grid. */
.ai-case .bb-result-summary {
  display: block;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 34px 36px;
  border-left: 4px solid var(--bb-blue-text);
  background: #fff;
}
.ai-case .bb-result-summary .bb-subtitle { margin-top: 12px; }
.ai-case .bb-result-summary p { margin-bottom: 0; }

/* Repeated content types use one consistent typographic hierarchy. */
.ai-case .bb-card h3,
.ai-case .bb-finding h3,
.ai-case .bb-decision-card h3,
.ai-case .bb-hifi-copy h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.015em;
}
.ai-case .bb-kicker,
.ai-case .bb-decision-label,
.ai-case .bb-hifi-tag,
.ai-case .bb-decision-row strong,
.ai-case .bb-flow-step b {
  font-size: .7rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ai-case .bb-research-copy strong,
.ai-case .bb-flow-step strong,
.ai-case .bb-action strong {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.45;
}
.ai-case .bb-research-copy span,
.ai-case .bb-metric span,
.ai-case .bb-action span,
.ai-case .bb-caption {
  font-size: .75rem;
  line-height: 1.6;
}

/* Consistent paragraph typography across the case study. */
.ai-case p {
  color: #343434 !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  line-height: 1.7 !important;
}

/* Preserve accessible contrast wherever paragraphs sit on dark surfaces. */
.ai-case .bb-hero p,
.ai-case #challenge p,
.ai-case #unused-dark-section p {
  color: #c4ced6 !important;
}

.ai-case .row > [class*="col-"] { min-width: 0; }
@media (max-width: 991.98px) {
  .ai-case .bb-hero { min-height: 640px; }
  .ai-case .bb-hero-inner { padding-bottom: 55px; }
  .ai-case .bb-hero-facts { margin: 38px 0 0; }
  .ai-case .bb-scroll-cue { margin-top: 34px; }
  .ai-case .bb-section { padding: 48px 0; }
  .ai-case .bb-flow-step { margin-bottom: 18px; }
}
@media (max-width: 767.98px) {
  .ai-case .bb-hero {
    min-height: auto;
    background:
      linear-gradient(rgba(3,12,21,.94), rgba(4,20,36,.86)),
      url("../images/branch-banking/software-modernization-hero.png") center / cover;
  }
  .ai-case .bb-hero-inner { padding-bottom: 52px; }
  .ai-case .bb-hero h1 { font-size: 34px; line-height: 1.1; }
  .ai-case .bb-hero-lead { font-size: .98rem; line-height: 1.7; }
  .ai-case .bb-section { padding: 32px 0; }
  .ai-case .bb-section-title { font-size: 30px !important; }
  .ai-case .bb-section-tabs { top: 80px; }
  .ai-case .bb-intro { font-size: .96rem; }
  .ai-case .bb-card,
  .ai-case .bb-decision-card,
  .ai-case .bb-finding { padding: 22px; }
  .ai-case .bb-decision-card h3 { min-height: 0; }
  .ai-case .bb-decision-summary,
  .ai-case .bb-decision-card-featured .bb-search-flow,
  .ai-case .bb-iteration-grid { grid-template-columns: 1fr; gap: 18px; }
  .ai-case .bb-research-card img { height: 220px; }
  .ai-case .bb-hifi-card img { height: auto; max-height: 280px; }
  .ai-case .bb-impact-strip { align-items: center; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ai-case .bb-card,
  .ai-case .bb-research-card,
  .ai-case .bb-hifi-card { transition: none; }
}

/* AI-specific components from the supplied page. */
.ai-case .bb-journey { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ai-case .bb-journey-item { position: relative; border-top: 3px solid #0079c1; background: #f7fafc; padding: 15px; min-height: 142px; }
.ai-case .bb-journey-item span { color: #0079c1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ai-case .bb-journey-item h3 { margin: 6px 0; font-size: 1rem; font-weight: 700; }
.ai-case .bb-journey-item p { margin: 0; color: #666; font-size: .84rem; line-height: 1.55; }
.ai-case .bb-table-wrap { overflow-x: auto; border: 1px solid #e2e2e2; }
.ai-case .bb-table { width: 100%; border-collapse: collapse; margin: 0; min-width: 700px; }
.ai-case .bb-table th,
.ai-case .bb-table td { padding: 12px 14px; border-bottom: 1px solid #e7e7e7; text-align: left; vertical-align: top; font-size: .84rem; line-height: 1.55; }
.ai-case .bb-table th { background: #f7f7f7; color: #343434; font-weight: 700; }
.ai-case .bb-table tr:last-child td { border-bottom: 0; }
.ai-case .bb-tag { display: inline-block; color: #006ba6; background: #eef7fc; border: 1px solid #cde6f5; padding: 3px 8px; font-size: 11px; font-weight: 700; margin: 0 5px 5px 0; }
.ai-case .bb-before-after { border-top: 1px solid #e3e3e3; border-bottom: 1px solid #e3e3e3; padding: 12px 0; margin: 12px 0; }
.ai-case .row > [class*="col-"] { min-width: 0; }

@media (max-width: 991.98px) {
  .ai-case .bb-journey { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767.98px) {
  .ai-case h1 { font-size: 34px !important; }
  .ai-case .bb-section-title { font-size: 30px !important; }
  .ai-case .bb-decision-row,
  .ai-case .bb-journey { grid-template-columns: 1fr; }
  .ai-case .bb-image,
  .ai-case .bb-hifi-card { margin-bottom: 1rem; height: auto; }
  .ai-case .bb-flow-step { min-height: 0; }
}

/* Layout fixes scoped to Project 5. Global navigation remains in style.css. */
.ai-case { padding-top: var(--header-space, 80px); }
.ai-case .bb-section-tabs { top: var(--header-height, 80px); }
.ai-case .bb-section[id] { scroll-margin-top: var(--anchor-offset, 165px); }
.ai-case .bb-hero { min-height: 560px; padding: 56px 0; }
.ai-case .bb-hero h1 span { color: #71b0ff; }
.ai-case .bb-hero-inner { padding-bottom: 0; }
.ai-case .bb-section-title { overflow-wrap: break-word; }
.ai-case .bb-card, .ai-case .bb-decision-card { height: auto; min-height: 0; margin-bottom: 24px; }
.ai-case .bb-metric { margin-bottom: 24px; overflow-wrap: anywhere; }
.ai-case .bb-metric strong { font-size: 28px; }
.ai-case .bb-hifi-card { height: auto; margin-bottom: 28px; }
.ai-case .bb-hifi-card img { width: 100%; height: auto; max-height: 420px; object-fit: contain; background: #eef2f4; }
.ai-case .bb-research-card { height: 100%; margin: 0; }
.ai-case .bb-journey > *, .ai-case .bb-decision-row > * { min-width: 0; }
.ai-case .ai-enlarge { display: block; cursor: zoom-in; }
.ai-case .ai-enlarge:focus-visible { outline: 3px solid #0b63ce; outline-offset: 3px; }
.ai-case #impact { background: #f4f6f7; color: #101924; }
.ai-case #impact p { color: #343434 !important; }
.ai-image-dialog { width: min(96vw, 1600px); max-width: 96vw; max-height: 94vh; border: 0; border-radius: 8px; padding: 16px; background: white; }
.ai-image-dialog::backdrop { background: rgba(0,0,0,.8); }
.ai-image-dialog img { display: block; width: 100%; height: auto; }
.ai-image-dialog button { display: block; margin: 0 0 12px auto; padding: 10px 18px; background: #0b63ce; color: white; border: 0; border-radius: 4px; cursor: pointer; }

/* One spacing owner per row prevents card and column margins from stacking. */
.ai-case .bb-section > .container > :last-child { margin-bottom: 0; }
.ai-case .bb-section .row { row-gap: 24px; }
.ai-case .bb-section .row + .row { margin-top: 24px !important; }
.ai-case .bb-section .row > [class*="col-"].mb-4 { margin-bottom: 0 !important; }
.ai-case .bb-section .row > [class*="col-"] > .bb-card,
.ai-case .bb-section .row > [class*="col-"] > .bb-decision-card,
.ai-case .bb-section .row > [class*="col-"] > .bb-metric,
.ai-case .bb-section .row > [class*="col-"] > .bb-hifi-card,
.ai-case .bb-section .row > [class*="col-"] > .bb-flow-step {
  margin-top: 0;
  margin-bottom: 0;
}
.ai-case .bb-card,
.ai-case .bb-decision-card,
.ai-case .bb-finding { padding: 24px; }
.ai-case .bb-card > :last-child,
.ai-case .bb-decision-card > :last-child,
.ai-case .bb-finding > :last-child,
.ai-case .bb-research-copy > :last-child,
.ai-case .bb-hifi-copy > :last-child { margin-bottom: 0; }
.ai-case .bb-section .bb-subtitle.mt-5 { margin-top: 32px !important; }
.ai-case .bb-section .bb-subtitle { margin-bottom: 16px; }
@media (max-width: 767.98px) {
  .ai-case .bb-section .row { row-gap: 20px; }
  .ai-case .bb-card,
  .ai-case .bb-decision-card,
  .ai-case .bb-finding { padding: 20px; }
  .ai-case .bb-section .bb-subtitle.mt-5 { margin-top: 28px !important; }
}
