/* A research report on the website (server/research-page.js), such as the AI Shopper Benchmark.
   The homepage's type and palette (styles.css): the brand violet marks the brand a finding is about,
   the second chart colour (src/brand-style.js SERIES[1]) the brand chosen instead. */
.study { --study-lead: var(--accent); --study-faded: var(--lavender); --study-other: #d9692a; --study-quiet: #cbc7d4; --study-text: #48454e; }

.study-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(8px, 2vw, 24px) 0 clamp(36px, 5vw, 60px); }
.study-hero h1 { margin-top: 14px; font: 580 clamp(38px, 5.2vw, 64px)/1.08 var(--heading); letter-spacing: -.045em; }
.study-lede { margin-top: 20px; max-width: 600px; color: var(--ink); font-size: clamp(18px, 1.9vw, 22px); line-height: 1.55; }
.study-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 28px; }
.study-meta { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }

.study-example { margin: 0; padding: clamp(20px, 2.5vw, 28px); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 18px 50px -30px rgba(40, 30, 80, .35); }
.study-example figcaption { display: grid; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.study-example figcaption strong { font: 560 22px/1.25 var(--heading); letter-spacing: -.02em; }
.study-example-row { padding-top: 16px; }
.study-example-row > p { margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.study-example-row + .study-example-row { margin-top: 4px; }
.study-example-caption { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }

.study-bar { display: grid; grid-template-columns: minmax(96px, .9fr) minmax(0, 1.6fr) auto; gap: 12px; align-items: center; min-height: 32px; font-size: 14px; }
.study-bar + .study-bar { margin-top: 6px; }
.study-bar-name { color: var(--ink); font-weight: 650; line-height: 1.3; }
.study-bar-name small, .study-bar-value small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.study-bar-track { height: 12px; border-radius: 99px; background: #efedf3; overflow: hidden; }
.study-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--study-quiet); }
.study-bar--lead .study-bar-fill { background: var(--study-lead); }
.study-bar--faded .study-bar-fill { background: var(--study-faded); }
.study-bar--other .study-bar-fill { background: var(--study-other); }
.study-bar-value { min-width: 64px; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

.study-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--line); }
.study-stats > div { padding: clamp(20px, 2.6vw, 30px) clamp(14px, 2vw, 26px); }
.study-stats > div + div { border-left: 1px solid var(--line); }
.study-stats dt { font: 580 clamp(32px, 3.6vw, 46px)/1 var(--heading); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.study-stats > div:last-child dt { color: var(--accent-dark); }
.study-stats dd { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.study-section { padding-block: clamp(48px, 6vw, 84px); scroll-margin-top: 24px; }
.study-section + .study-section { border-top: 1px solid var(--line); }
.study-section-head { max-width: 720px; }
.study-section-head h2 { margin-top: 12px; font: 580 clamp(29px, 3.4vw, 42px)/1.16 var(--heading); letter-spacing: -.035em; }
.study-section-head p:not(.resource-kicker) { margin-top: 16px; color: var(--study-text); font-size: 16px; line-height: 1.8; }
.study-note, .study-figure-note { max-width: 720px; margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.study-grid-figure { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 32px; align-items: center; margin-top: 30px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.study-squares { display: grid; grid-template-columns: repeat(10, 28px); gap: 6px; }
.study-square { display: inline-block; width: 28px; height: 28px; border-radius: 6px; background: var(--study-quiet); }
.study-square--different { background: var(--study-lead); }
.study-square--tie { background: repeating-linear-gradient(135deg, var(--study-faded) 0 4px, var(--lavender-soft) 4px 8px); }
.study-legend { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.study-legend li { display: flex; align-items: center; gap: 10px; color: var(--study-text); font-size: 15px; }
.study-legend .study-square { width: 16px; height: 16px; border-radius: 4px; flex: 0 0 16px; }
.study-legend strong { min-width: 1.6em; color: var(--ink); font: 600 20px/1 var(--heading); }
.study-grid-figure .study-figure-note { grid-column: 1 / -1; margin-top: 0; }

.study-chart-title { margin-top: 44px; font: 560 21px/1.3 var(--heading); letter-spacing: -.015em; }
.study-key { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.study-key li { display: inline-flex; align-items: center; gap: 8px; }
.study-key li::before { content: ''; width: 18px; height: 8px; border-radius: 99px; background: var(--study-lead); }
.study-key .study-key--faded::before { background: var(--study-faded); }
.study-key .study-key--other::before { background: var(--study-other); }
.study-scenarios { margin-top: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.study-scenario { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); gap: 10px 32px; align-items: center; padding: 20px 24px; }
.study-scenario + .study-scenario { border-top: 1px solid var(--line); }
.study-scenario h4 { font: 560 18px/1.3 var(--heading); letter-spacing: -.01em; }
.study-scenario .study-bar { grid-template-columns: minmax(120px, .8fr) minmax(0, 2.2fr) 72px; }

.study-losses { display: grid; gap: 22px; margin-top: 30px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.study-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.study-big strong { color: var(--accent-dark); font: 580 clamp(48px, 6vw, 72px)/1 var(--heading); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.study-big span { max-width: 460px; color: var(--ink); font-size: 18px; line-height: 1.5; }
.study-big small { display: block; color: var(--muted); font-size: 13px; }
.study-stack { display: flex; height: 22px; gap: 3px; }
.study-stack-part { display: block; height: 100%; background: var(--study-quiet); }
.study-stack-part:first-child { border-start-start-radius: 6px; border-end-start-radius: 6px; }
.study-stack-part:last-child { border-start-end-radius: 6px; border-end-end-radius: 6px; }
.study-stack-part--reach { background: var(--study-lead); }
.study-stack-part--buy { background: var(--study-faded); }
.study-stack-part--after { background: #a7a3b1; }
.study-stack-part--unclear { background: #e6e3ec; }
.study-loss-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; margin: 0; padding: 0; list-style: none; }
.study-loss-list li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: var(--study-text); font-size: 15px; }
.study-loss-list strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.study-swatch { width: 14px; height: 14px; border-radius: 4px; }

.study-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.study-card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.study-card-number { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--lavender-soft); color: var(--accent-dark); font-weight: 700; }
.study-card h3 { margin-top: 18px; font: 560 21px/1.25 var(--heading); letter-spacing: -.02em; }
.study-card p { margin-top: 10px; color: var(--study-text); font-size: 15px; line-height: 1.7; }
.study-card a, .study-report-link { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 18px; color: var(--accent-dark); font-weight: 650; text-decoration: none; }
.study-card a:hover, .study-report-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.study-method-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: clamp(24px, 5vw, 64px); margin-top: 24px; }
.study-method-body p { color: var(--study-text); font-size: 15px; line-height: 1.8; }
.study-method-body p + p { margin-top: 14px; }
.study-method-body aside { align-self: start; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.study-method-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.study-method-body caption { padding-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.study-method-body th, .study-method-body td { padding: 9px 0; border-top: 1px solid var(--line); text-align: left; font-weight: 500; }
.study-method-body td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.study-method-body aside p { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.study-report-link { padding-top: 12px; }

.study-closing { margin: 8px 0 clamp(36px, 5vw, 64px); padding: clamp(32px, 5vw, 56px); border-radius: 24px; background: var(--lavender-soft); text-align: center; }
.study-closing h2 { font: 580 clamp(29px, 3.6vw, 44px)/1.15 var(--heading); letter-spacing: -.035em; }
.study-closing p { max-width: 620px; margin: 14px auto 0; color: var(--study-text); font-size: 16px; line-height: 1.7; }
.study-closing .study-actions { justify-content: center; }

@media (max-width: 960px) {
  .study-hero, .study-method-body { grid-template-columns: minmax(0, 1fr); }
  .study-cards { grid-template-columns: minmax(0, 1fr); }
  .study-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .study-stats > div:nth-child(3) { border-left: 0; }
  .study-stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .study-grid-figure { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .study-squares { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .study-squares .study-square { width: auto; height: auto; aspect-ratio: 1; }
  .study-loss-list { grid-template-columns: minmax(0, 1fr); }
  .study-bar { grid-template-columns: minmax(84px, 1fr) minmax(0, 1.2fr) auto; gap: 10px; font-size: 13px; }
  .study-scenario { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .study-scenario .study-bar { grid-template-columns: minmax(84px, 1fr) minmax(0, 1.2fr) auto; }
  .study-actions .button { width: 100%; justify-content: space-between; }
}
