/* Adoption breadth vs depth figures. This article-local stylesheet loads after resources.css.
   Element+class selectors keep these ahead of the .article-content p / ul / li rules. */

.bd-matrix,
.bd-plot,
.bd-profile {
  margin: 38px 0;
  padding: 36px 38px 34px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg-muted);
}

/* Figure 1 — four patterns */

.bd-matrix__grid {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

p.bd-matrix__axis {
  margin: 0 0 6px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.bd-matrix__row-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 0 18px 4px;
  border-right: 3px solid #cfd9e7;
}

.bd-matrix__row-label--deep { border-right-color: #b6dfc6; }
.bd-matrix__row-label--shallow { border-right-color: #e8c48a; }

p.bd-matrix__row-name {
  margin: 0;
  color: var(--color-text);
  font-size: 20px;
  font-weight: 600;
}

p.bd-matrix__row-def {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.bd-matrix__cell {
  padding: 22px 24px;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  background: #fff;
}

.bd-matrix__cell--good { border-color: #b6dfc6; background: #f0faf4; }
.bd-matrix__cell--warn { border-color: #e8c48a; background: #fff8e9; }

p.bd-matrix__use {
  display: none;
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5ebf4;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

p.bd-matrix__pattern {
  margin: 0 0 8px;
  color: var(--color-text);
  font-size: 18px;
  font-weight: 700;
}

p.bd-matrix__reading {
  margin: 0 0 12px;
  color: #243650;
  font-size: 16px;
  line-height: 1.5;
  text-wrap: pretty;
}

p.bd-matrix__inspect {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}

.bd-matrix__inspect b { color: #3c6ea8; }
.bd-matrix__inspect--good b { color: #17693f; }
.bd-matrix__inspect--warn b { color: #6b4e08; }

p.bd-matrix__note,
p.bd-plot__note {
  margin: 24px 0 0;
  color: #243650;
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* Figure 2 — four accounts plotted */

.bd-plot__frame {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
}

p.bd-plot__y {
  margin: 0;
  align-self: center;
  justify-self: end;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

p.bd-plot__x {
  margin: 8px 0 0;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.bd-plot__area {
  position: relative;
  height: 360px;
  border-radius: 12px;
}

.bd-plot__quadrants {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  overflow: hidden;
  border-radius: 12px;
}

.bd-plot__quadrants > div { background: #fff; }
.bd-plot__quadrants .is-good { background: #f0faf4; }
.bd-plot__quadrants .is-warn { background: #fff8e9; }

.bd-plot__point {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 0;
  height: 0;
  white-space: nowrap;
}

.bd-plot__point--flip {
  flex-direction: row-reverse;
}

.bd-plot__dot {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: -8px;
  border-radius: 50%;
  background: var(--color-primary);
}

.bd-plot__dot--good { background: #17693f; }
.bd-plot__dot--warn { background: #c07f1c; }
.bd-plot__dot--muted { background: #7a89a1; }

.bd-plot__tag {
  padding: 5px 11px;
  border: 1px solid #dfe7f2;
  border-radius: 999px;
  background: #fff;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(11, 23, 48, 0.06);
}

.bd-plot__key {
  display: grid;
  gap: 2px;
  margin-top: 26px;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  background: #dfe7f2;
  overflow: hidden;
}

.bd-plot__key-row {
  display: grid;
  grid-template-columns: 210px 180px minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  background: #fff;
}

.bd-plot__key-name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-size: 17px;
  font-weight: 600;
}

.bd-plot__key-name .bd-plot__dot {
  margin: 0;
  width: 12px;
  height: 12px;
}

.bd-plot__key-breadth {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 600;
}

.bd-plot__key-depth,
.bd-plot__key-read {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.45;
}

/* Figure 3 — Atlas Labs profile */

.bd-profile__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: start;
  gap: 32px;
}

.bd-profile__card {
  padding: 24px 26px 26px;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  background: #fff;
}

.bd-profile__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: 20px;
}

p.bd-profile__account {
  margin: 0;
  color: var(--color-text);
  font-size: 22px;
  font-weight: 600;
}

p.bd-profile__meta {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 15px;
}

.bd-profile__thead,
.bd-profile__area {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 16px;
}

.bd-profile__thead {
  padding-bottom: 10px;
  border-bottom: 1px solid #e5ebf4;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bd-profile__thead span:last-child { text-align: right; }

.bd-profile__areas {
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

.bd-profile__area--none { opacity: 0.85; }

.bd-profile__name {
  color: var(--color-text);
  font-size: 16px;
  font-weight: 600;
}

.bd-profile__area--none .bd-profile__name {
  color: var(--color-text-muted);
  font-weight: 400;
}

.bd-profile__meter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bd-profile__track {
  flex: 1 1 auto;
  height: 18px;
  border-radius: 999px;
  background: #eef3fa;
}

.bd-profile__track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--color-accent-green);
}

.bd-profile__track span.is-blue { background: #5a9fe0; }
.bd-profile__track--warn { background: #f6e6c8; }
.bd-profile__track--warn span { background: #e2a33a; }

.bd-profile__track--empty {
  border: 1px dashed #c3cfdd;
  background: transparent;
}

.bd-profile__meter b {
  flex: 0 0 auto;
  width: 46px;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 600;
}

.bd-profile__area--none .bd-profile__meter b { color: var(--color-text-muted); }

.bd-profile__depth {
  color: var(--color-text-muted);
  font-size: 15px;
  text-align: right;
}

.bd-profile__depth--deep { color: #17693f; font-weight: 600; }
.bd-profile__depth--warn { color: #6b4e08; font-weight: 600; }

.bd-profile__side {
  display: grid;
  gap: 12px;
}

.bd-profile__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bd-profile__stat {
  padding: 18px 20px;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  background: #fff;
}

.bd-profile__stat--warn { border-color: #e8c48a; background: #fff8e9; }

p.bd-profile__stat-label {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.bd-profile__stat--warn p.bd-profile__stat-label { color: #6b4e08; }

p.bd-profile__stat-value {
  margin: 6px 0 0;
  color: var(--color-text);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

p.bd-profile__stat-note {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 15px;
}

p.bd-profile__stat-note--warn { color: #6b4e08; font-weight: 600; }

.bd-profile__hidden {
  padding: 20px 22px;
  border-radius: 12px;
  background: var(--color-primary);
}

p.bd-profile__hidden-label {
  margin: 0 0 8px;
  color: #f2b3a5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

p.bd-profile__hidden-text {
  margin: 0;
  color: #cfe0f5;
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
}

@media (max-width: 1100px) {
  .bd-matrix__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .bd-matrix__grid > div:first-child,
  p.bd-matrix__axis {
    display: none;
  }

  p.bd-matrix__use {
    display: block;
  }

  .bd-matrix__row-label {
    grid-column: 1 / -1;
    padding: 4px 0 4px 14px;
    border-right: 0;
    border-left: 3px solid #cfd9e7;
  }

  .bd-matrix__row-label--deep { border-left-color: #b6dfc6; }
  .bd-matrix__row-label--shallow { border-left-color: #e8c48a; }

  .bd-plot__key-row {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 6px 16px;
  }

  .bd-plot__key-depth,
  .bd-plot__key-read {
    grid-column: 2;
  }

  .bd-profile__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .bd-matrix,
  .bd-plot,
  .bd-profile {
    padding: 24px 20px;
  }

  .bd-matrix__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bd-plot__frame {
    grid-template-columns: minmax(0, 1fr);
  }

  p.bd-plot__y { display: none; }

  .bd-plot__area { height: 300px; }

  .bd-plot__tag { font-size: 13px; padding: 4px 9px; }

  .bd-plot__key-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .bd-plot__key-depth,
  .bd-plot__key-read {
    grid-column: 1;
  }

  .bd-profile__thead { display: none; }

  .bd-profile__area {
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 6px 12px;
  }

  .bd-profile__depth {
    grid-column: 2;
    text-align: left;
  }

  .bd-profile__stats {
    grid-template-columns: minmax(0, 1fr);
  }
}
