/* Scoped styles for /research. Loaded only on those pages. */

.research-page .page-hero {
  padding-bottom: 2.75rem;
}

.research-page .study-section {
  padding-top: 0.25rem;
  padding-bottom: 4.5rem;
}

/* ============================================================
   STUDY PAGE: HERO
   ============================================================ */
.research-study .page-hero {
  padding-bottom: 4rem;
}

.research-study .page-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  max-width: 18em;
  line-height: 1.16;
}

.research-study .page-hero-sub {
  max-width: 42rem;
}

.study-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.study-hero-actions .btn svg {
  width: 17px;
  height: 17px;
}

.study-byline {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.study-byline li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.study-byline svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Headline numbers strip reuses .metrics-strip from styles.css */
.study-metrics .metric-item {
  padding: 1rem 2rem;
}

.study-metrics .metric-label {
  max-width: 190px;
}

/* ============================================================
   STUDY PAGE: LAYOUT AND CONTENTS
   ============================================================ */
.research-study .study-section {
  padding-top: 5rem;
  padding-bottom: 2rem;
}

.study-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 4.5rem;
  align-items: start;
}

.study-main {
  max-width: 780px;
  min-width: 0;
}

.study-toc {
  position: sticky;
  top: 96px;
  font-size: 0.88rem;
}

.study-toc-title {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.study-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border);
}

.study-toc ol ol {
  border-left: 0;
  margin: 0.2rem 0 0.35rem;
}

.study-toc li {
  margin: 0;
}

.study-toc a {
  display: block;
  padding: 0.38rem 0 0.38rem 1rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  line-height: 1.4;
}

.study-toc ol ol a {
  padding-left: 1.85rem;
  font-size: 0.83rem;
}

.study-toc a:hover {
  color: var(--ink);
}

.study-toc a.is-active {
  color: var(--ink);
  font-weight: 500;
}

.study-toc > ol > li > a.is-active {
  border-left-color: var(--accent);
}

.study-toc-download {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.5rem;
  padding: 0.5rem 0.95rem !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px;
  color: var(--ink) !important;
  font-size: 0.82rem;
  font-weight: 500;
}

.study-toc-download:hover {
  border-color: var(--border-h) !important;
  background: var(--bg-2);
}

.study-toc-download svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

/* ============================================================
   STUDY PAGE: BLOCKS
   ============================================================ */
.study-block {
  scroll-margin-top: 90px;
}

.study-block + .study-block {
  margin-top: 6rem;
  padding-top: 5rem;
  border-top: 1px solid var(--border);
}

.study-block > h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin: 0 0 0.85rem;
}

.study-block-intro {
  font-size: 1.05rem;
  margin: 0 0 1rem;
}

/* --- Theme groups --- */
.study-group {
  scroll-margin-top: 90px;
  margin-top: 3.5rem;
}

.study-group-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.study-group-icon,
.study-takeaway-icon,
.study-use-icon,
.study-fact-icon,
.study-note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
}

.study-group-head h3 {
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 0.15rem;
}

.study-group-head p {
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* --- Finding cards --- */
.study-finding {
  scroll-margin-top: 90px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.9rem 2rem 2rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.study-finding + .study-finding {
  margin-top: 1.25rem;
}

.study-finding:hover {
  border-color: var(--border-h);
  box-shadow: var(--shadow);
}

.study-finding:target {
  border-color: rgba(21, 128, 61, 0.45);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.study-finding-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.study-finding-num {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-dim);
  position: relative;
  top: -0.15rem;
}

.study-finding-title {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
}

.study-finding-body {
  font-size: 0.97rem;
  line-height: 1.7;
  margin: 0;
}

/* --- Charts --- */
.study-chart {
  margin: 1.5rem 0 0;
  padding: 1.35rem 1.4rem 1.45rem;
  background: var(--bg-2);
  border-radius: var(--radius);
}

.study-chart figcaption,
.study-chart-label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.study-chart-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.study-chart-group + .study-chart-group {
  margin-top: 1.35rem;
}

.study-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.study-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.study-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  display: inline-block;
}

.study-swatch--uk { background: #15803d; }
.study-swatch--us { background: #64748b; }

.study-bars {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.study-bar-row {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.study-bars--wide .study-bar-row {
  grid-template-columns: 11.5rem minmax(0, 1fr) auto;
}

.study-bar-label,
.study-bar-value {
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
}

.study-bar-value {
  font-variant-numeric: tabular-nums;
  min-width: 3.1rem;
  text-align: right;
}

.study-bar-track {
  height: 14px;
  background: rgba(15, 15, 20, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.study-bar-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.study-bar-fill--uk { background: #15803d; }
.study-bar-fill--us { background: #64748b; }
.study-bar-fill--ink { background: var(--ink); }
.study-bar-fill--muted { background: #94a3b8; }

/* --- Dot grid (finding 3) --- */
.study-chart--dots {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
}

.study-dots {
  display: grid;
  grid-template-columns: repeat(20, 10px);
  gap: 6px;
}

.study-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(15, 15, 20, 0.12);
}

.study-dots span.on {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.study-chart--dots .study-dots-caption {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

/* --- Stat tiles (findings 5 and 9) --- */
.study-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.study-tile {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.35rem 1.4rem;
  background: var(--bg-2);
  border-radius: var(--radius);
}

.study-tile-num {
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.study-tile-num small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

.study-tile-label {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.study-tile-meter {
  display: block;
  height: 6px;
  margin-top: auto;
  border-radius: 99px;
  margin-top: 0.85rem;
  background: rgba(15, 15, 20, 0.08);
  overflow: hidden;
}

.study-tile-meter span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
}

/* --- Embed toggle --- */
.study-embed {
  margin: 1.1rem 0 0;
  border-top: 1px dashed var(--border-h);
  padding-top: 0.35rem;
}

.study-embed summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.55rem;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  min-height: 44px;
  padding: 0.5rem 0;
  list-style: none;
}

.study-embed summary::-webkit-details-marker { display: none; }

.study-embed summary svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.study-embed-hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
}

.study-embed-hint::before {
  content: '·';
  margin-right: 0.55rem;
}

.study-embed summary:hover > span:first-of-type {
  color: var(--accent);
}

.study-embed summary:focus-visible,
.study-fields summary:focus-visible {
  outline: 2px solid rgba(21, 128, 61, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

.study-embed-panel {
  padding: 0.4rem 0 0.2rem;
}

.study-embed-code {
  display: block;
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 9.5rem;
}

.study-embed-code:focus {
  outline: none;
  border-color: rgba(21, 128, 61, 0.45);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.1);
}

.study-embed .btn,
.study-cite .btn {
  min-height: 44px;
}

.study-copy-status {
  color: var(--ink);
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
}

.study-copy-status:empty {
  display: none;
}

/* ============================================================
   STUDY PAGE: TAKEAWAYS
   ============================================================ */
.study-takeaways {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  counter-reset: takeaway;
}

.study-takeaway {
  position: relative;
  margin: 0;
  padding: 1.75rem 1.6rem 1.65rem;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  counter-increment: takeaway;
}

.study-takeaway:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.study-takeaway::after {
  content: '0' counter(takeaway);
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.study-takeaway-icon {
  background: var(--card);
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 15, 20, 0.05);
}

.study-takeaway h3 {
  font-size: 1.08rem;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 0.55rem;
}

.study-takeaway p {
  font-size: 0.93rem;
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   STUDY PAGE: METHOD
   ============================================================ */
.study-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0 1.25rem;
}

.study-fact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.25rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.study-fact-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.study-fact-icon svg {
  width: 18px;
  height: 18px;
}

.study-fact strong {
  color: var(--ink);
  font-weight: 500;
  font-size: 1.05rem;
}

.study-fact span:last-child {
  font-size: 0.83rem;
  line-height: 1.45;
  color: var(--muted);
}

.study-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.study-method-card {
  padding: 1.6rem 1.6rem 1.7rem;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
}

.study-method-card h3,
.study-note h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.study-method-card h3 svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.study-method-card p {
  font-size: 0.92rem;
  line-height: 1.7;
}

.study-method-card p + p {
  margin-top: 0.75rem;
}

.study-fields {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0 1.4rem;
}

.study-fields summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  cursor: pointer;
  list-style: none;
  min-height: 60px;
  padding: 1rem 2rem 1rem 0;
  position: relative;
  color: var(--ink);
  font-weight: 500;
}

.study-fields summary::-webkit-details-marker { display: none; }

.study-fields summary::after {
  content: '';
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--transition);
}

.study-fields[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.study-fields summary svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.study-fields-hint {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}

.study-fields-hint::before {
  content: '·';
  margin-right: 0.65rem;
}

.study-table-wrap {
  margin: 0 0 1.25rem;
}

.study-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.study-table th,
.study-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.study-table tr:last-child td {
  border-bottom: 0;
}

.study-table th {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.study-table td {
  color: var(--text);
  line-height: 1.55;
}

.study-table td:first-child {
  color: var(--ink);
  font-weight: 500;
  width: 34%;
}

.study-note {
  display: flex;
  gap: 1.1rem;
  margin-top: 1rem;
  padding: 1.5rem 1.6rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(234, 88, 12, 0.18);
  background: rgba(234, 88, 12, 0.05);
}

.study-note-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(234, 88, 12, 0.1);
  color: var(--orange);
}

.study-note h3 {
  margin-bottom: 0.4rem;
}

.study-note p {
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   STUDY PAGE: RELATED RESEARCH
   ============================================================ */
.study-related {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.study-related li {
  margin: 0;
}

.study-related li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.study-related-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  height: 100%;
  padding: 1.35rem 3rem 1.4rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  transition: all var(--transition);
}

.study-related-card:hover {
  border-color: var(--border-h);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.study-related-source {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.study-related-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.study-related-desc {
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--muted);
}

.study-related-arrow {
  position: absolute;
  top: 1.3rem;
  right: 1.2rem;
  color: var(--muted);
  transition: color var(--transition), transform var(--transition);
}

.study-related-arrow svg {
  width: 18px;
  height: 18px;
}

.study-related-card:hover .study-related-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ============================================================
   STUDY PAGE: USE THE DATA
   ============================================================ */
.study-use-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.study-use-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.9rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.study-use-icon {
  margin-bottom: 1.25rem;
}

.study-use-card h3 {
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.study-use-card > p {
  font-size: 0.93rem;
  margin: 0 0 1.5rem;
}

.study-use-card .btn {
  margin-top: auto;
}

.study-cite blockquote {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.study-cite blockquote p {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
  overflow-wrap: anywhere;
}

.study-use-note {
  margin: 1.25rem 0 0;
  font-size: 0.92rem;
}

/* ============================================================
   STUDY PAGE: AUTHOR BANNER
   ============================================================ */
.study-author-section {
  padding-top: 4rem;
}

.study-author {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  text-align: left;
  padding: 3.5rem;
}

.study-author-photo {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 3px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.study-author-copy {
  position: relative;
  z-index: 1;
}

.study-author-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.6rem;
}

.study-author h2 {
  font-size: clamp(1.75rem, 3vw, 2.3rem);
}

.cta-banner.study-author p {
  margin: 0 0 1.75rem;
  max-width: 600px;
}

.cta-banner--accent.study-author p a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.cta-banner--accent.study-author p a:hover {
  color: #ffffff;
}

.study-author .cta-banner-actions {
  justify-content: flex-start;
}


/* ============================================================
   STUDY PAGE: V3 ADDITIONS (findings polish, detail, method)
   ============================================================ */
.study-bar-fill--accent { background: var(--accent); }
.study-bar-fill--soft { background: rgba(21, 128, 61, 0.38); }

.study-tile-num small {
  font-size: 1.15rem;
  margin-left: 0.05rem;
}

.study-tiles--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.study-tiles--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.study-tiles--4 .study-tile-num {
  font-size: 2rem;
}

.study-finding-note {
  margin: 0.85rem 0 0;
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent);
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--text);
}

.study-group + .study-group {
  margin-top: 4rem;
}

/* Inline call to action under the takeaways */
.study-inline-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding: 1.6rem 1.75rem;
  border: 1px solid rgba(21, 128, 61, 0.22);
  border-radius: var(--radius-lg);
  background: var(--accent-dim);
}

.study-inline-cta h3 {
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 0 0.3rem;
}

.study-inline-cta p {
  font-size: 0.93rem;
  margin: 0;
}

.study-inline-cta .btn {
  flex-shrink: 0;
}

/* Sub-sections inside "In more detail" */
.study-subblock {
  scroll-margin-top: 90px;
  margin-top: 3.5rem;
}

.study-subblock + .study-subblock {
  margin-top: 4rem;
  padding-top: 3.5rem;
  border-top: 1px dashed var(--border-h);
}

.study-subblock > p {
  font-size: 0.97rem;
}

.study-subblock .study-tiles {
  margin: 1.5rem 0 0;
}

.study-subblock .study-tile-label {
  font-size: 0.85rem;
}

.study-callout {
  margin: 1.25rem 0 0;
  padding: 1rem 1.2rem;
  background: var(--bg-2);
  border-radius: var(--radius);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Comparison and number tables */
.study-table-card {
  margin: 1.25rem 0 0;
  padding: 0.35rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.study-table--compare td:first-child,
.study-table--numbers td:first-child {
  width: auto;
}

.study-table--compare th:nth-child(2),
.study-table--compare th:nth-child(3),
.study-table--compare td:nth-child(2),
.study-table--compare td:nth-child(3),
.study-table--numbers th:not(:first-child),
.study-table--numbers td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.study-table--compare td:nth-child(2) { color: #15803d; font-weight: 500; }
.study-table--compare td:nth-child(3) { color: #475569; font-weight: 500; }

.study-table--compare th:last-child,
.study-table--compare td:last-child {
  text-align: right;
  padding-right: 0;
  padding-left: 1.25rem;
}

.study-table--compare td,
.study-table--compare th {
  vertical-align: middle;
}

.study-diff {
  display: inline-block;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.study-diff--uk { background: rgba(21, 128, 61, 0.1); color: #15803d; }
.study-diff--us { background: rgba(100, 116, 139, 0.14); color: #334155; }
.study-diff--level { background: rgba(15, 15, 20, 0.05); color: var(--muted); }

/* Accordions (method and detail) */
.study-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.study-accordion .study-fields {
  margin-top: 0;
}

.study-subblock .study-fields {
  margin-top: 1.25rem;
}

.study-fields[open] {
  border-color: var(--border-h);
}

.study-fields-body {
  padding: 0.25rem 0 1.4rem;
  border-top: 1px solid var(--border);
}

.study-fields-body > p {
  font-size: 0.93rem;
  line-height: 1.7;
  margin: 1rem 0 0;
}

.study-fields-body .study-table-wrap {
  margin: 1rem 0 0;
}

.study-sources {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  border-top: 1px solid var(--border);
}

.study-sources li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  margin: 0;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.study-source-name {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}

.study-source-note {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.83rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
}

.study-source-count {
  flex-shrink: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.study-steps {
  margin: 0.75rem 0 0;
  padding-left: 1.3rem;
}

.study-steps li {
  font-size: 0.93rem;
  margin-bottom: 0.35rem;
}

.study-note ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.study-note li {
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.study-note li:last-child {
  margin-bottom: 0;
}

.study-method-grid + .study-fields,
.study-facts + .study-accordion {
  margin-top: 1.25rem;
}

.study-related-title-h {
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--ink);
  margin: 4rem 0 0;
}

.study-related {
  scroll-margin-top: 90px;
}

.study-related-title-h + .study-related {
  margin-top: 1.25rem;
}

.study-cite .study-snippet {
  margin-top: 1.25rem;
}

@media (max-width: 680px) {
  .study-tiles--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .study-tiles--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .study-tiles--4 .study-tile {
    padding: 1.1rem 1rem;
  }

  .study-tiles--4 .study-tile-num {
    font-size: 1.7rem;
  }

  .study-inline-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.4rem 1.2rem;
  }

  .study-inline-cta .btn {
    width: 100%;
  }

  .study-table-card {
    padding: 0.25rem 1rem;
  }

  .study-table--compare tr {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1rem;
  }

  .study-table--compare td:first-child,
  .study-table--compare td:last-child {
    grid-column: 1 / -1;
  }

  .study-table--compare td:nth-child(2),
  .study-table--compare td:nth-child(3),
  .study-table--compare td:last-child {
    text-align: left !important;
    padding-left: 0 !important;
  }

  .study-table--compare td:nth-child(2)::before { content: 'UK '; color: var(--muted); font-weight: 400; }
  .study-table--compare td:nth-child(3)::before { content: 'US '; color: var(--muted); font-weight: 400; }

  .study-table--numbers td:not(:first-child) {
    text-align: left;
  }

  .study-sources li {
    gap: 1rem;
  }
}

@media (min-width: 681px) and (max-width: 900px) {
  .study-tiles--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
   RESEARCH INDEX
   ============================================================ */
.research-list {
  max-width: 40rem;
}

.research-card h2 {
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}

.research-card-date {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .study-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 3rem;
  }

  .study-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .study-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .study-toc {
    display: none;
  }

  .study-main {
    max-width: none;
  }

  .study-metrics .metric-divider {
    display: none;
  }

  .study-metrics .metrics-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 0;
  }

  .study-metrics .metric-item {
    min-width: 0;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 680px) {
  .research-study .page-hero {
    padding-bottom: 3rem;
  }

  .research-study .study-section {
    padding-top: 3.5rem;
  }

  .study-hero-actions .btn {
    flex: 1 1 100%;
  }

  .study-byline {
    flex-direction: column;
    gap: 0.5rem;
  }

  .study-metrics .metric-num {
    font-size: 2.2rem;
  }

  .study-block + .study-block {
    margin-top: 4rem;
    padding-top: 3.5rem;
  }

  .study-group {
    margin-top: 2.75rem;
  }

  .study-finding {
    padding: 1.4rem 1.2rem 1.4rem;
  }

  .study-finding-head {
    flex-direction: column;
    gap: 0.6rem;
  }

  .study-finding-num {
    top: 0;
  }

  .study-embed-hint,
  .study-fields-hint {
    flex-basis: 100%;
  }

  .study-embed-hint::before,
  .study-fields-hint::before {
    content: none;
  }

  .study-chart {
    padding: 1.1rem 1rem 1.2rem;
  }

  .study-bars--wide .study-bar-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0.35rem;
  }

  .study-bars--wide .study-bar-label {
    grid-column: 1 / -1;
  }

  .study-chart--dots {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .study-dots {
    grid-template-columns: repeat(10, 10px);
  }

  .study-tiles,
  .study-takeaways,
  .study-method-grid,
  .study-related,
  .study-use-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .study-takeaway:last-child:nth-child(odd),
  .study-related li:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .study-facts {
    gap: 0.75rem;
  }

  .study-fact {
    padding: 1rem;
  }

  .study-note {
    flex-direction: column;
    padding: 1.3rem 1.2rem;
  }

  .study-fields {
    padding: 0 1rem;
  }

  .study-author {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2.5rem 1.6rem;
  }

  .study-author .cta-banner-actions .btn {
    white-space: normal;
    text-align: center;
  }

  .study-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .study-table,
  .study-table tbody,
  .study-table tr,
  .study-table td {
    display: block;
    width: 100%;
  }

  .study-table tr {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .study-table tr:last-child {
    border-bottom: 0;
  }

  .study-table td {
    border: 0;
    padding: 0;
  }

  .study-table td:first-child {
    width: auto;
    margin-bottom: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .study-finding,
  .study-related-card,
  .study-related-arrow {
    transition: none;
  }

  .study-related-card:hover {
    transform: none;
  }
}

.study-snippet {
  width: 100%;
  margin-top: 1.25rem;
}

.study-snippet summary > span:first-of-type {
  font-weight: 500;
}


.study-embed-code--short {
  min-height: 4.75rem;
}
