/*
 * Recommendation DNA v3 — authoritative public component stylesheet.
 * Introduced in Audiobook Box 2.47.91.
 *
 * This file intentionally uses the unique .ra-dna3 namespace so historical
 * .ra42-dna-* selectors cannot alter the current component.  Do not append
 * version-specific DNA overrides to style.css; maintain this file instead.
 */

.ra42-shell .ra49-hero > .ra-dna3 {
  grid-area: dna;
  width: 100%;
  max-width: none;
  min-width: 0;
  align-self: start;
}

.ra-dna3,
.ra-dna3 * {
  box-sizing: border-box;
}

.ra-dna3 {
  container-type: inline-size;
  position: relative;
  overflow: hidden;
  padding: 20px 22px 18px;
  border: 1px solid rgba(126, 111, 184, 0.15);
  border-radius: 23px;
  background:
    radial-gradient(circle at 8% 6%, rgba(126, 91, 237, 0.07), transparent 27%),
    radial-gradient(circle at 90% 8%, rgba(87, 192, 255, 0.11), transparent 23%),
    linear-gradient(180deg, rgba(255,255,255,0.985), rgba(250,249,255,0.98));
  box-shadow: 0 18px 45px rgba(91, 76, 157, 0.065);
  color: #10183c;
  font-family: Inter, "Avenir Next", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.ra-dna3__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 15px;
}

.ra-dna3__header h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin: 0;
  color: #10183d;
  font-size: clamp(17px, 2.8cqw, 21px);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.ra-dna3__header h2 > .ra42-icon {
  width: 20px;
  height: 20px;
  color: #6841dd;
  stroke-width: 2;
}

.ra-dna3__info {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid #c9cde0;
  border-radius: 50%;
  color: #7b829f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.ra-dna3__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid #caecd9;
  border-radius: 999px;
  background: linear-gradient(180deg, #edfbf3 0%, #e2f8ec 100%);
  color: #0d6b45;
  font-size: clamp(10px, 1.6cqw, 12px);
  line-height: 1;
  font-weight: 820;
  white-space: nowrap;
}

.ra-dna3__badge > span,
.ra-dna3__badge .ra42-icon {
  width: 15px;
  height: 15px;
}

.ra-dna3__badge--evidence-profile {
  border-color: #dfd2fa;
  background: linear-gradient(180deg, #f4efff, #eee6ff);
  color: #6632ca;
}

/* Scored hero follows the approved 1220:254 reference proportion. */
.ra-dna3__hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1220 / 254;
  min-height: 0;
  margin: 0 0 12px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(176, 190, 229, 0.44);
  border-radius: 18px;
  background: #edf5ff;
}

.ra-dna3__hero-art,
.ra-dna3__unscored-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  object-position: center center;
}

.ra-dna3__hero-art {
  filter: saturate(1.13) contrast(1.025);
}

.ra-dna3__hero-title {
  position: absolute;
  z-index: 3;
  left: 3.3%;
  top: 22%;
  width: 38%;
  margin: 0;
}

.ra-dna3__hero-title h3 {
  max-width: 15ch;
  margin: 0;
  color: #08123c;
  font-size: clamp(16px, 3.0cqw, 26px);
  line-height: 1.03;
  font-weight: 860;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255,255,255,0.32);
}

/* Exact visible center of the clean raster ring. */
.ra-dna3__score {
  position: absolute;
  z-index: 4;
  left: 75.98%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 15.95%;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.65cqw 1cqw;
  text-align: center;
  color: #3210b6;
}

.ra-dna3__score strong {
  margin: 0;
  color: #3512be;
  font-size: clamp(24px, 5.1cqw, 43px);
  line-height: 0.87;
  font-weight: 840;
  letter-spacing: -0.055em;
}

.ra-dna3__score > span {
  margin-top: 0.42cqw;
  color: #251e72;
  font-size: clamp(9px, 1.55cqw, 14px);
  line-height: 1;
  font-weight: 650;
}

.ra-dna3__score i {
  display: block;
  width: 76%;
  height: 1px;
  margin: 0.78cqw 0 0.62cqw;
  background: #d7dced;
}

.ra-dna3__score small {
  display: block;
  max-width: 11ch;
  color: #252e63;
  font-size: clamp(7.5px, 1.05cqw, 10px);
  line-height: 1.12;
  font-weight: 580;
}

.ra-dna3__hero--unscored {
  aspect-ratio: auto;
  background: transparent;
}

.ra-dna3__hero--unscored .ra-dna3__unscored-art {
  position: static;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.ra-dna3__rows {
  display: grid;
  gap: 0;
  margin-top: 2px;
}

.ra-dna3__row {
  display: grid;
  grid-template-columns: minmax(178px, 1.13fr) minmax(155px, 1.48fr) 42px minmax(90px, 0.70fr);
  gap: 10px;
  align-items: center;
  min-height: 51px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(218, 222, 239, 0.78);
}

.ra-dna3__row:last-child {
  border-bottom: 0;
}

.ra-dna3__label {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.ra-dna3__icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--dna-a);
  background: transparent;
}

.ra-dna3__icon .ra42-icon {
  width: 23px;
  height: 23px;
  stroke-width: 2;
}

.ra-dna3__label-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ra-dna3__label-copy strong {
  display: block;
  color: #10183e;
  font-size: clamp(12px, 1.95cqw, 14px);
  line-height: 1.05;
  font-weight: 830;
  letter-spacing: -0.015em;
}

.ra-dna3__label-copy small {
  display: block;
  color: #607099;
  font-size: clamp(9px, 1.45cqw, 11px);
  line-height: 1.12;
  font-weight: 500;
}

.ra-dna3__track {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #edf0f7, #e5e9f2);
  box-shadow: inset 0 1px 2px rgba(83,95,145,0.10);
}

.ra-dna3__track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--dna-a), var(--dna-b));
}

.ra-dna3__percent {
  display: block;
  color: #172254;
  font-size: clamp(11px, 1.7cqw, 13px);
  line-height: 1;
  font-weight: 760;
  text-align: right;
  white-space: nowrap;
}

.ra-dna3__level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 31px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: clamp(10px, 1.55cqw, 12px);
  line-height: 1;
  font-weight: 820;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 4px 12px rgba(68,67,121,0.05);
}

.ra-dna3__level-glyph {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 14px;
  flex: 0 0 15px;
}

.ra-dna3__level-glyph::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 3px;
  height: 6px;
  border-radius: 3px 3px 1px 1px;
  background: currentColor;
  box-shadow: 6px -4px 0 currentColor, 12px -8px 0 currentColor;
}

.ra-dna3__level--strong,
.ra-dna3__level--established {
  color: #087a45;
  border-color: #c7edd8;
  background: linear-gradient(180deg, #e5f9ee, #d6f4e3);
}

.ra-dna3__level--high,
.ra-dna3__level--very-high {
  color: #087968;
  border-color: #bfe9e5;
  background: linear-gradient(180deg, #dff8f6, #cdf1ef);
}

.ra-dna3__level--low,
.ra-dna3__level--limited {
  color: #dc7a00;
  border-color: #f7df9a;
  background: linear-gradient(180deg, #fff8df, #ffefba);
}

.ra-dna3__level--moderate,
.ra-dna3__level--medium {
  color: #5634d5;
  border-color: #d9cdf8;
  background: linear-gradient(180deg, #eee9ff, #e4dcff);
}

.ra-dna3__level--simple,
.ra-dna3__level--light {
  color: #6c28cf;
  border-color: #e0cffb;
  background: linear-gradient(180deg, #f4eaff, #eadcff);
}

.ra-dna3__footer {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid #e3e7f4;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(248,250,255,0.98), rgba(245,247,253,0.98));
}

.ra-dna3__footer-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: #edf0f8;
  color: #7380a7;
}

.ra-dna3__footer-icon .ra42-icon {
  width: 16px;
  height: 16px;
}

.ra-dna3__footer-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ra-dna3__footer-copy strong {
  color: #45557e;
  font-size: clamp(10px, 1.55cqw, 12px);
  line-height: 1.35;
  font-weight: 620;
}

.ra-dna3__footer-copy small {
  color: #687494;
  font-size: clamp(8.5px, 1.3cqw, 10px);
  line-height: 1.35;
  font-weight: 500;
}

/* The DNA card receives roughly ten percent more desktop width than the older layout. */
@media (min-width: 1181px) {
  .ra42-shell .ra49-hero {
    grid-template-columns: minmax(0, 1.18fr) minmax(650px, 1.08fr) !important;
    gap: 20px !important;
  }
  .ra42-shell .ra49-hero .ra49-identity {
    grid-template-columns: minmax(198px, 228px) minmax(0,1fr) !important;
    column-gap: 20px !important;
  }
  .ra42-shell .ra49-hero .ra42-cover {
    max-width: 228px !important;
  }
}

@media (max-width: 1180px) {
  .ra42-shell .ra49-hero {
    grid-template-columns: 1fr !important;
    grid-template-areas: "identity" "dna" !important;
    gap: 18px !important;
  }
  .ra42-shell .ra49-hero > .ra-dna3 {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 760px) {
  .ra-dna3 {
    padding: 17px;
    border-radius: 19px;
  }
  .ra-dna3__header {
    gap: 10px;
    margin-bottom: 12px;
  }
  .ra-dna3__header h2 {
    font-size: 16px;
  }
  .ra-dna3__badge {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 10px;
  }
  .ra-dna3__hero {
    border-radius: 15px;
  }
  .ra-dna3__hero-title h3 {
    font-size: 16px;
  }
  .ra-dna3__score strong {
    font-size: 28px;
  }
  .ra-dna3__score > span {
    font-size: 9px;
  }
  .ra-dna3__score small {
    font-size: 7px;
  }
  .ra-dna3__row {
    grid-template-columns: minmax(150px, 1.14fr) minmax(120px, 1.35fr) 38px minmax(84px, 0.72fr);
    gap: 8px;
    min-height: 48px;
  }
}

@media (max-width: 560px) {
  .ra-dna3 {
    padding: 14px;
  }
  .ra-dna3__header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .ra-dna3__header h2 {
    font-size: 15px;
  }
  .ra-dna3__badge {
    font-size: 9px;
  }
  .ra-dna3__hero-title {
    left: 3.2%;
    top: 20%;
    width: 39%;
  }
  .ra-dna3__hero-title h3 {
    max-width: 12.5ch;
    font-size: 13.5px;
  }
  .ra-dna3__score {
    width: 15.8%;
  }
  .ra-dna3__score strong {
    font-size: 23px;
  }
  .ra-dna3__score > span {
    font-size: 8px;
  }
  .ra-dna3__score small {
    font-size: 6.2px;
  }
  .ra-dna3__row {
    grid-template-columns: minmax(0,1fr) 38px minmax(82px,.70fr);
    grid-template-areas:
      "label percent level"
      "bar bar bar";
    gap: 6px 9px;
    padding: 7px 0;
  }
  .ra-dna3__label { grid-area: label; }
  .ra-dna3__track { grid-area: bar; }
  .ra-dna3__percent { grid-area: percent; }
  .ra-dna3__level { grid-area: level; }
}
