/* The report stays live HTML. The shared stylesheet supplies the score bar widths. */
.hero-visual {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.hero-visual::before { content: none; }

.report-window {
  --frame-inset: clamp(20px, 2.5vw, 36px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  padding: 0 var(--frame-inset);
  color: white;
  background: var(--carbon);
  border: 0;
  border-radius: 32px;
  box-shadow: none;
}

.window-bar,
.preview-body { grid-column: 1 / -1; }

.window-bar,
.preview-footer,
.report-window .eyebrow,
.sample-tag,
.ranking-heading,
.rank-number,
.ranking strong {
  font-family: var(--mono);
  font-weight: 400;
}

.window-bar {
  gap: 13px;
  padding: 19px 0;
  background: transparent;
  border: 0;
  color: white;
  font-size: 11px;
  letter-spacing: .04em;
  line-height: 1.45;
}

.window-bar > .icon { color: white; width: 18px; height: 18px; }
.window-dots { gap: 4px; }
.window-dots i { width: 6px; height: 6px; background: #686868; }
.window-dots i:nth-child(2) { background: #a7a7a7; }
.window-dots i:last-child { background: white; }

.preview-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 0;
}

.preview-overview,
.preview-ranking {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(22px, 2.8vw, 42px);
  border-radius: 24px;
}

.preview-overview { background: white; color: var(--carbon); }
.preview-ranking { background: var(--cobalt); color: white; }

.preview-heading {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.preview-heading > div { flex: 1 1 180px; }

.hero .preview-heading .eyebrow {
  font-size: 11px;
  color: var(--secondary);
  line-height: 1.5;
  letter-spacing: .04em;
}

.preview-heading h2 {
  max-width: 12ch;
  margin: 18px 0 0;
  color: var(--carbon);
  font-size: clamp(31px, 3.5vw, 52px);
  line-height: 1.03;
  letter-spacing: -.035em;
  font-weight: 700;
}

.sample-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--gallery);
  color: var(--secondary);
  font-size: 10px;
  line-height: 1.4;
}

.preview-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: auto;
  padding: 30px 0 0;
  border: 0;
}

.preview-summary > div {
  min-width: 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.metric-label {
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.45;
}

.preview-summary strong {
  margin: 5px 0 9px;
  padding: 0;
  color: var(--carbon);
  font-size: clamp(40px, 4.5vw, 70px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.065em;
  line-height: 1.05;
  white-space: nowrap;
}

.preview-summary strong > span {
  margin-left: 4px;
  color: var(--secondary);
  font: 400 clamp(12px, 1.1vw, 16px)/1.3 var(--mono);
  letter-spacing: -.03em;
}

.metric-foot {
  align-items: flex-start;
  gap: 5px;
  color: var(--secondary);
  font-size: 11px;
  line-height: 1.45;
}
.metric-foot .icon { width: 15px; height: 15px; color: var(--cobalt); }

.ranking-heading {
  align-items: baseline;
  gap: 16px;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgb(255 255 255 / 35%);
  color: white;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .04em;
}

.ranking-heading > :last-child { text-align: right; }

.ranking {
  display: grid;
  flex: 1;
  align-content: space-between;
  gap: 4px;
}

.ranking li {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  grid-template-areas: "number brand score" ". chart chart";
  gap: 7px 9px;
  padding: 8px 10px 9px;
  color: white;
  border-radius: 8px;
}

.rank-number {
  grid-area: number;
  color: inherit;
  font-size: 11px;
}

.rank-brand {
  grid-area: brand;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
  white-space: normal;
}

.rank-brand small {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  padding: 2px 5px;
  color: var(--cobalt);
  background: white;
  border-radius: 3px;
  font: 400 9px/1.35 var(--mono);
}

.ranking strong {
  grid-area: score;
  color: inherit;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -.025em;
}

.bar-track {
  grid-area: chart;
  height: 4px;
  background: rgb(255 255 255 / 18%);
  border-radius: 2px;
}
.bar { border-radius: inherit; background: rgb(255 255 255 / 72%); }
.bar-you { background: white; }
.your-brand { background: rgb(255 255 255 / 14%); }

.evidence-note {
  gap: 12px;
  margin: 0;
  padding: 23px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.evidence-note .icon-box {
  width: 34px;
  height: 34px;
  border: 1px solid #575757;
  background: transparent;
  border-radius: 8px;
  color: white;
}
.evidence-note .icon-box .icon { width: 17px; height: 17px; }
.evidence-note strong { font-size: 14px; font-weight: 500; color: white; }
.evidence-note p { font-size: 12px; line-height: 1.5; color: #d4d4d4; }

.preview-footer {
  justify-content: flex-end;
  gap: 14px;
  padding: 12px 0;
  border: 0;
  color: #d4d4d4;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .035em;
}

.preview-footer a {
  flex: none;
  width: 44px;
  height: 44px;
  color: white;
  border: 1px solid #686868;
  border-radius: 10px;
}
.preview-footer a:hover { color: var(--carbon); background: white; }
.preview-footer a:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.preview-footer .icon { width: 18px; height: 18px; }

.report-caption {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.5;
}
.report-caption .icon { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .report-window { grid-template-columns: minmax(0, 1fr); }
  .evidence-note { padding: 18px 0; }
  .preview-footer {
    justify-content: space-between;
    border-top: 1px solid #454545;
    padding-block: 8px;
  }
}

@media (max-width: 760px) {
  .report-window { --frame-inset: 16px; border-radius: 20px; }
  .window-bar { font-size: 10px; padding-block: 16px; }
  .preview-body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .preview-overview, .preview-ranking { padding: 22px; border-radius: 16px; }
  .preview-summary { gap: 12px; padding-top: 24px; }
  .preview-heading h2 { max-width: none; font-size: clamp(30px, 6vw, 40px); }
  .preview-summary strong { font-size: clamp(34px, 8vw, 56px); }
  .ranking li { gap: 6px 9px; }
  .report-caption { font-size: 11px; }
}

@media (max-width: 410px) {
  .report-window { --frame-inset: 12px; }
  .preview-overview, .preview-ranking { padding: 18px 14px; }
  .preview-heading > div { flex-basis: 145px; }
  .ranking-heading { gap: 8px; font-size: 10px; }
  .preview-summary strong > span { margin-left: 2px; }
  .preview-footer { gap: 10px; font-size: 9px; }
}
/* The four plots share one scale. The vertical marker is the reference brand. */
.preview-ranking .ranking-heading { margin-bottom: 9px; }
.preview-ranking .ranking { align-content: stretch; gap: 3px; }
.preview-ranking .ranking li {
  --plot-ink: #fff;
  --plot-rail: rgb(255 255 255 / 20%);
  --plot-grid: rgb(255 255 255 / 38%);
  --plot-reference: #111;
  --row-inset: 10px;
  --rank-width: 22px;
  --rank-gap: 9px;
  grid-template-columns: var(--rank-width) minmax(0, 1fr) auto;
  grid-template-areas: "number brand score" ". chart chart" ". difference difference";
  gap: 3px var(--rank-gap);
  padding: 9px var(--row-inset);
  color: var(--plot-ink);
  outline-offset: -2px;
}
.ranking .your-brand { background: rgb(255 255 255 / 17%); }
.rank-plot { display: block; grid-area: chart; width: 100%; height: 16px; overflow: visible; }
.rank-plot path { fill: none; vector-effect: non-scaling-stroke; }
.plot-track { stroke: var(--plot-rail); stroke-width: 4; }
.plot-ticks { stroke: var(--plot-grid); stroke-width: 1; }
.plot-score { stroke: var(--plot-ink); stroke-width: 4; transform-box: view-box; transform-origin: left center; }
.plot-difference { stroke: var(--plot-ink); stroke-width: 1; stroke-dasharray: 2 2; opacity: .65; }
.plot-reference { stroke: var(--plot-reference); stroke-width: 2; }
.rank-delta {
  grid-area: difference;
  color: inherit;
  font: 400 11px/1.4 var(--mono);
  font-variant-numeric: tabular-nums;
}
.preview-ranking .ranking strong { font-variant-numeric: tabular-nums; font-size: clamp(17px, 1.5vw, 22px); }
.ranking-scale {
  display: flex;
  justify-content: space-between;
  margin: 5px 10px 0 41px;
  font: 400 10px/1.35 var(--mono);
}
#ranking-reference {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid rgb(255 255 255 / 35%);
  font-size: 12px;
  line-height: 1.45;
}
#ranking-reference i { display: inline-block; height: 12px; width: 3px; background: var(--carbon); box-shadow: 0 0 0 2px rgb(255 255 255 / 40%); }

.ranking li:focus-visible {
  outline: 2px solid var(--carbon);
  background: white;
  --plot-ink: var(--cobalt);
  --plot-rail: var(--line);
  --plot-grid: #bbb;
}
@media (hover: hover) and (pointer: fine) {
  .preview-ranking .ranking li:hover {
    background: white;
    --plot-ink: var(--cobalt);
    --plot-rail: var(--line);
    --plot-grid: #bbb;
  }
  .ranking li:hover .plot-difference { opacity: 1; stroke-width: 2; }
}
.ranking li:focus-visible .plot-difference { opacity: 1; stroke-width: 2; }
@media (prefers-reduced-motion: no-preference) {
  .preview-ranking .ranking li { transition: background-color 160ms ease, color 160ms ease; }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
