/**
 * Solar Waypoint Research — Editorial Data System
 * Version: 1.1.0
 * Scope: Research hub + spoke articles only
 *
 * Usage:
 * Wrap article content in .swr-article. All component classes use the
 * swr- prefix so this file can be loaded site-wide without restyling
 * standard Solar Waypoint content.
 */

/* =========================================================
   1. DESIGN TOKENS + ARTICLE BASE
   ========================================================= */

.swr-article {
  --swr-orange: #ff7518;
  --swr-orange-deep: #a94700;
  --swr-orange-soft: #fff0e5;
  --swr-petrol: #17383f;
  --swr-petrol-dark: #0d272d;
  --swr-teal: #18a6a6;
  --swr-teal-deep: #0b6f70;
  --swr-teal-soft: #e7f6f5;
  --swr-yellow: #f5c84c;
  --swr-yellow-soft: #fff7d8;
  --swr-blue: #4e78c4;
  --swr-blue-soft: #edf3ff;
  --swr-cream: #faf7f2;
  --swr-mist: #eef3f4;
  --swr-paper: #ffffff;
  --swr-ink: #202427;
  --swr-muted: #5f6a6e;
  --swr-rule: #ccd4d6;
  --swr-rule-dark: #8f9b9f;
  --swr-shadow: 0 14px 34px rgba(13, 39, 45, 0.10);
  --swr-content: 760px;
  --swr-wide: 1120px;
  --swr-gap: clamp(1.25rem, 2.5vw, 2.25rem);
  --swr-section-gap: clamp(3.75rem, 8vw, 7rem);
  --swr-sticky-offset: 0px;

  color: var(--swr-ink);
  font: inherit;
  line-height: 1.68;
  accent-color: var(--swr-orange-deep);
}

.swr-article *,
.swr-article *::before,
.swr-article *::after {
  box-sizing: border-box;
}

.swr-article :where(p, ul, ol, blockquote, figure, table) {
  margin-top: 0;
}

.swr-article p {
  margin-bottom: 1.35em;
}

.swr-article a {
  color: var(--swr-petrol);
  font-weight: 650;
  text-decoration-color: var(--swr-orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.swr-article a:hover {
  color: var(--swr-orange-deep);
}

.swr-article a:focus-visible,
.swr-article button:focus-visible {
  outline: 3px solid var(--swr-yellow);
  outline-offset: 3px;
}

.swr-article :where(h2, h3, h4) {
  color: var(--swr-petrol-dark);
  line-height: 1.12;
  text-wrap: balance;
}

.swr-article h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  letter-spacing: -0.025em;
}

.swr-article h3 {
  margin: 2.25rem 0 0.75rem;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
}

.swr-article h4 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.swr-article hr {
  border: 0;
  border-top: 1px solid var(--swr-rule);
  margin: 3rem 0;
}

/*
 * Research page canvas.
 *
 * Astra is switched to its native full-width/no-sidebar layout in PHP. These
 * scoped rules are a defensive layer for theme updates and make the article
 * shell portable to other conventional WordPress themes without allowing a
 * sidebar or theme content max-width to shift the Research coordinate system.
 */
.swr-research-page #primary,
.swr-research-page .content-area,
.swr-research-page .site-main,
.swr-research-page .entry-content {
  width: 100%;
  max-width: none;
}

.swr-research-page #primary,
.swr-research-page .content-area {
  float: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.swr-research-page #secondary,
.swr-research-page #left-sidebar,
.swr-research-page #right-sidebar {
  display: none !important;
}

.swr-research-page .site-content > .ast-container {
  display: block;
  width: 100%;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.swr-research-page .entry-content {
  margin-top: 0;
}

.swr-research-page .entry-content > .swr-article {
  width: 100%;
  max-width: none !important;
}

/*
 * Astra 4 can render the single-post title through either an entry header or a
 * banner path. PHP filters disable both; these selectors are a Research-only
 * visual fallback so a theme update cannot expose a duplicate H1.
 */
.swr-research-page .entry-header,
.swr-research-page .ast-single-entry-banner,
.swr-research-page .post-navigation {
  display: none;
}

/*
 * Research width system.
 *
 * Gutenberg's Constrained Group layout adds its own max-width and horizontal
 * margin rules to child blocks. The Research article therefore owns a single
 * centered 1120px shell and constrains prose to 760px inside it instead of
 * using viewport-based translateX breakouts. This keeps the layout stable in
 * Astra, in the block editor, and in future conventional themes.
 */
.swr-article .swr-reading {
  width: min(var(--swr-wide), calc(100% - 2rem));
  max-width: var(--swr-wide) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.swr-article .swr-wide {
  width: 100%;
  max-width: var(--swr-wide) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  transform: none !important;
}

/* The masthead and each numbered section need the full shell so their nested
 * data components can reach the wide width without escaping a 760px parent. */
.swr-article .swr-masthead,
.swr-article .swr-section {
  width: 100%;
  max-width: var(--swr-wide) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Ordinary top-level reading content remains deliberately narrow. */
.swr-article .swr-reading > :where(p, ul, ol, blockquote, h2, h3, h4):not(.swr-wide) {
  width: 100%;
  max-width: var(--swr-content) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Numbered sections use a wide shell, but their prose and standard callouts
 * stay on the reading measure. Elements explicitly marked swr-wide can use
 * the complete 1120px shell. */
.swr-article .swr-section > :where(
  p,
  ul,
  ol,
  blockquote,
  h3,
  h4,
  .swr-section-head,
  .swr-section-takeaway,
  .swr-callout,
  .swr-finding,
  .swr-bottom-line
):not(.swr-wide) {
  width: 100%;
  max-width: var(--swr-content) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Core's constrained-layout horizontal auto margins would otherwise override
 * the editorial masthead alignment. */
.swr-article .swr-masthead > * {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* =========================================================
   2. RESEARCH MASTHEAD / ARTICLE HERO
   ========================================================= */

.swr-masthead {
  position: relative;
  isolation: isolate;
  margin: 0 0 clamp(2.25rem, 6vw, 4.75rem);
  padding: clamp(1.75rem, 5vw, 4.5rem) 0 clamp(1.75rem, 4vw, 3.25rem);
  border-top: 8px solid var(--swr-orange);
  border-bottom: 1px solid var(--swr-rule-dark);
}

.swr-masthead::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: min(31vw, 320px);
  height: clamp(18px, 3vw, 34px);
  background: linear-gradient(90deg, var(--swr-teal) 0 56%, var(--swr-yellow) 56% 100%);
}

.swr-kicker {
  margin: 0 0 1rem;
  color: var(--swr-orange-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.swr-masthead h1,
.swr-title {
  max-width: 1000px;
  margin: 0;
  color: var(--swr-petrol-dark);
  font-size: clamp(2.7rem, 7.4vw, 6.2rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.94;
  text-wrap: balance;
}

.swr-dek {
  max-width: 780px;
  margin: clamp(1.25rem, 2.5vw, 2rem) 0 0;
  color: #354044;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.swr-byline {
  margin: 1.35rem 0 0;
  color: var(--swr-muted);
  font-size: 0.94rem;
}

.swr-byline strong {
  color: var(--swr-ink);
}

.swr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
  margin: 1.55rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--swr-rule);
  color: var(--swr-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.swr-meta span {
  position: relative;
}

.swr-meta span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 1.15rem;
  border-radius: 50%;
  background: var(--swr-orange);
  vertical-align: middle;
}

/* =========================================================
   3. FAST-ANSWER / KEY FINDINGS
   ========================================================= */

.swr-key-findings {
  position: relative;
  overflow: hidden;
  margin: clamp(2rem, 5vw, 4rem) 0;
  padding: clamp(1.6rem, 4vw, 3.2rem);
  background: var(--swr-petrol);
  color: var(--swr-paper);
  box-shadow: var(--swr-shadow);
}

.swr-key-findings::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 100%;
  background: var(--swr-orange);
}

.swr-key-findings::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 220px;
  height: 220px;
  border: 38px solid rgba(24, 166, 166, 0.22);
  transform: rotate(12deg);
}

.swr-key-findings > * {
  position: relative;
  z-index: 1;
}

.swr-key-findings .swr-label,
.swr-key-findings > h2:first-child {
  margin: 0 0 0.85rem;
  color: var(--swr-yellow);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.swr-key-findings .swr-summary {
  max-width: 820px;
  margin: 0 0 1.35rem;
  color: #ffffff;
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  font-weight: 700;
  line-height: 1.38;
}

.swr-key-findings ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.swr-key-findings li {
  position: relative;
  margin: 0;
  padding: 0.2rem 0 0.2rem 1.35rem;
  color: #edf5f5;
  line-height: 1.48;
}

.swr-key-findings li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--swr-orange);
  transform: rotate(45deg);
}

/* A simpler answer-first panel for narrower articles. */
.swr-bottom-line {
  margin: 2rem 0 3rem;
  padding: 1.4rem 1.5rem 1.45rem;
  border-top: 5px solid var(--swr-orange);
  border-bottom: 1px solid var(--swr-rule-dark);
  background: var(--swr-cream);
}

.swr-bottom-line .swr-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--swr-orange-deep);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.swr-bottom-line > :last-child {
  margin-bottom: 0;
}

/* =========================================================
   4. OVERSIZED STATS + DATA STRIPS
   ========================================================= */

.swr-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(2rem, 5vw, 4rem) 0;
  border-top: 2px solid var(--swr-petrol-dark);
  border-bottom: 2px solid var(--swr-petrol-dark);
}

.swr-stat {
  min-width: 0;
  padding: clamp(1.2rem, 2.5vw, 2rem) clamp(0.85rem, 2vw, 1.5rem);
}

.swr-stat + .swr-stat {
  border-left: 1px solid var(--swr-rule);
}

.swr-stat-value {
  display: block;
  color: var(--swr-petrol-dark);
  font-size: clamp(2rem, 5vw, 4.1rem);
  font-weight: 850;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.swr-stat.is-orange .swr-stat-value { color: var(--swr-orange-deep); }
.swr-stat.is-teal .swr-stat-value { color: var(--swr-teal-deep); }
.swr-stat.is-blue .swr-stat-value { color: #365ea7; }

.swr-stat-label {
  display: block;
  margin-top: 0.65rem;
  color: var(--swr-muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.swr-hero-stat {
  position: relative;
  margin: clamp(2.5rem, 6vw, 5rem) 0;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 5vw, 4rem);
  border-top: 1px solid var(--swr-rule-dark);
  border-bottom: 1px solid var(--swr-rule-dark);
  background: linear-gradient(90deg, var(--swr-orange-soft), var(--swr-paper) 68%);
}

.swr-hero-stat .swr-stat-value {
  color: var(--swr-orange-deep);
  font-size: clamp(4rem, 12vw, 8.5rem);
  line-height: 0.84;
}

.swr-hero-stat .swr-stat-label {
  max-width: 600px;
  margin-top: 1rem;
  color: var(--swr-ink);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

/* =========================================================
   5. LONG-ARTICLE NAVIGATION
   ========================================================= */

.swr-jumpbar {
  position: sticky;
  z-index: 20;
  top: var(--swr-sticky-offset);
  display: flex;
  gap: 0;
  overflow-x: auto;
  margin: 0 0 3rem;
  border-top: 1px solid var(--swr-rule-dark);
  border-bottom: 1px solid var(--swr-rule-dark);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 7px 18px rgba(13, 39, 45, 0.07);
  scrollbar-width: thin;
  backdrop-filter: blur(10px);
}

.swr-jumpbar a {
  flex: 0 0 auto;
  padding: 0.82rem 1rem;
  border-right: 1px solid var(--swr-rule);
  color: var(--swr-petrol-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.swr-jumpbar a:hover,
.swr-jumpbar a:focus-visible {
  background: var(--swr-orange);
  color: var(--swr-petrol-dark);
}

/* =========================================================
   6. NUMBERED SECTIONS + SECTION TAKEAWAYS
   ========================================================= */

.swr-section {
  margin-block: var(--swr-section-gap);
  scroll-margin-top: calc(var(--swr-sticky-offset) + 80px);
}

.swr-section-head {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: clamp(0.75rem, 2vw, 1.6rem);
  align-items: end;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--swr-petrol-dark);
}

.swr-section-number {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  color: var(--swr-orange);
  font-size: clamp(3.25rem, 8vw, 6.6rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.72;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.swr-section-head h2 {
  margin: 0;
}

.swr-section-kicker {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--swr-teal-deep);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.swr-section-takeaway {
  margin: 0 0 2rem;
  padding: 1rem 1.2rem 1.05rem;
  border-left: 6px solid var(--swr-teal);
  background: linear-gradient(90deg, var(--swr-teal-soft), rgba(231, 246, 245, 0.24));
  color: #24373a;
  font-size: 1.05rem;
  font-weight: 680;
  line-height: 1.5;
}

.swr-section-takeaway > :last-child {
  margin-bottom: 0;
}

/* =========================================================
   7. PROPRIETARY FINDINGS + EXPLAINER CALLOUTS
   ========================================================= */

.swr-finding {
  position: relative;
  margin: clamp(2.25rem, 5vw, 4rem) 0;
  padding: clamp(1.45rem, 3.5vw, 2.5rem);
  border-top: 7px solid var(--swr-orange);
  background: var(--swr-petrol-dark);
  color: #f7fbfb;
}

.swr-finding .swr-label {
  display: inline-block;
  margin: 0 0 0.8rem;
  color: var(--swr-yellow);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.swr-finding h3,
.swr-finding h4 {
  margin-top: 0;
  color: #ffffff;
}

.swr-finding p:last-child {
  margin-bottom: 0;
}

.swr-finding strong {
  color: #ffffff;
}

.swr-finding .swr-stat-value {
  margin-bottom: 0.75rem;
  color: var(--swr-orange);
}

.swr-callout {
  margin: 2rem 0;
  padding: 1.2rem 1.35rem 1.3rem;
  border-left: 5px solid var(--swr-rule-dark);
  background: var(--swr-mist);
}

.swr-callout > :last-child {
  margin-bottom: 0;
}

.swr-callout .swr-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--swr-petrol-dark);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.swr-callout.is-why {
  border-left-color: var(--swr-yellow);
  background: var(--swr-yellow-soft);
}

.swr-callout.is-data {
  border-left-color: var(--swr-teal);
  background: var(--swr-teal-soft);
}

.swr-callout.is-context {
  border-left-color: var(--swr-orange);
  background: var(--swr-orange-soft);
}

.swr-callout.is-caution {
  border-left-color: var(--swr-blue);
  background: var(--swr-blue-soft);
}

/* =========================================================
   8. BOLD DATA BAND / VISUAL RESET
   ========================================================= */

.swr-data-band {
  position: relative;
  margin: clamp(3rem, 7vw, 6rem) 0;
  padding: clamp(1.8rem, 4.5vw, 3.75rem);
  background: var(--swr-orange);
  color: var(--swr-petrol-dark);
}

.swr-data-band::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 22%;
  height: 16px;
  background: var(--swr-teal);
}

.swr-data-band .swr-label {
  margin-bottom: 0.7rem;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.swr-data-band h2,
.swr-data-band h3 {
  max-width: 850px;
  color: var(--swr-petrol-dark);
}

.swr-data-band p {
  max-width: 780px;
  font-weight: 620;
}

.swr-data-band > :last-child {
  margin-bottom: 0;
}

.swr-data-band.is-teal {
  background: var(--swr-teal);
  color: var(--swr-petrol-dark);
}

.swr-data-band.is-teal::before {
  background: var(--swr-yellow);
}

.swr-data-band.is-dark {
  background: var(--swr-petrol);
  color: #ffffff;
}

.swr-data-band.is-dark h2,
.swr-data-band.is-dark h3 {
  color: #ffffff;
}

.swr-data-band.is-dark::before {
  background: var(--swr-orange);
}

/* =========================================================
   9. TABLES
   ========================================================= */

.swr-table-wrap {
  width: 100%;
  margin: clamp(1.75rem, 4vw, 3rem) 0;
  overflow-x: auto;
  border-top: 4px solid var(--swr-petrol-dark);
  border-bottom: 1px solid var(--swr-rule-dark);
  background: var(--swr-paper);
  -webkit-overflow-scrolling: touch;
}

.swr-table-wrap table,
.swr-table {
  width: 100%;
  min-width: 680px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  color: var(--swr-ink);
  font-size: 0.92rem;
  line-height: 1.35;
}

.swr-table-wrap caption,
.swr-table caption {
  padding: 0.9rem 0;
  color: var(--swr-petrol-dark);
  font-weight: 800;
  text-align: left;
}

.swr-table-wrap th,
.swr-table-wrap td,
.swr-table th,
.swr-table td {
  padding: 0.85rem 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--swr-rule);
  text-align: left;
  vertical-align: top;
}

.swr-table-wrap thead th,
.swr-table thead th {
  background: var(--swr-petrol);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.swr-table-wrap tbody tr:nth-child(even),
.swr-table tbody tr:nth-child(even) {
  background: var(--swr-cream);
}

.swr-table-wrap tbody tr:hover,
.swr-table tbody tr:hover {
  background: var(--swr-yellow-soft);
}

.swr-table-wrap .is-highlight,
.swr-table .is-highlight {
  background: var(--swr-orange-soft);
  font-weight: 800;
}

.swr-table-wrap .is-number,
.swr-table .is-number {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.swr-table-source {
  margin: -2.25rem 0 2.5rem;
  color: var(--swr-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

/* =========================================================
   10. CHART / GRAPH SHELLS
   ========================================================= */

.swr-chart {
  margin: clamp(2.25rem, 5vw, 4rem) 0;
  padding: 0;
  border-top: 4px solid var(--swr-petrol-dark);
  border-bottom: 1px solid var(--swr-rule-dark);
  background: var(--swr-paper);
}

.swr-chart-head {
  padding: 1rem 0 0.9rem;
}

.swr-chart-title {
  margin: 0;
  color: var(--swr-petrol-dark);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 800;
  line-height: 1.22;
}

.swr-chart-subtitle {
  margin: 0.35rem 0 0;
  color: var(--swr-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.swr-chart-canvas,
.swr-chart img,
.swr-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Visible placeholder used while drafting before a chart is inserted. */
.swr-chart-placeholder {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 2rem;
  border-top: 1px solid var(--swr-rule);
  border-bottom: 1px solid var(--swr-rule);
  background:
    repeating-linear-gradient(
      -45deg,
      var(--swr-mist),
      var(--swr-mist) 12px,
      #f8fafb 12px,
      #f8fafb 24px
    );
  color: var(--swr-muted);
  font-weight: 750;
  text-align: center;
}

.swr-chart-source {
  margin: 0;
  padding: 0.75rem 0 0;
  color: var(--swr-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.swr-chart-takeaway {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 5px solid var(--swr-orange);
  background: var(--swr-orange-soft);
  color: var(--swr-ink);
  font-size: 0.94rem;
  line-height: 1.45;
}

.swr-chart-takeaway strong {
  color: var(--swr-orange-deep);
}

/* Simple legend styles if charts are built with inline SVG/HTML. */
.swr-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0.8rem 0;
  padding: 0;
  list-style: none;
  color: var(--swr-muted);
  font-size: 0.78rem;
}

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

.swr-legend-swatch {
  width: 0.9rem;
  height: 0.9rem;
  background: var(--swr-orange);
}

.swr-legend-swatch.is-teal { background: var(--swr-teal); }
.swr-legend-swatch.is-blue { background: var(--swr-blue); }
.swr-legend-swatch.is-yellow { background: var(--swr-yellow); }
.swr-legend-swatch.is-petrol { background: var(--swr-petrol); }

/* =========================================================
   11. QUOTES / EXPERT INTERPRETATION
   ========================================================= */

.swr-pullquote {
  margin: clamp(2.5rem, 6vw, 5rem) 0;
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(1.25rem, 3vw, 2rem) clamp(1.3rem, 4vw, 3rem);
  border-left: 10px solid var(--swr-orange);
  color: var(--swr-petrol-dark);
  font-size: clamp(1.45rem, 3.4vw, 2.35rem);
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.28;
}

.swr-pullquote p {
  margin-bottom: 0.7rem;
}

.swr-pullquote cite {
  color: var(--swr-muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* =========================================================
   12. METHODOLOGY, SOURCES, UPDATE HISTORY
   ========================================================= */

.swr-methodology,
.swr-sources,
.swr-update-log {
  margin: clamp(3rem, 7vw, 6rem) 0;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 5px solid var(--swr-petrol);
  background: var(--swr-cream);
}

.swr-methodology h2,
.swr-sources h2,
.swr-update-log h2 {
  margin-top: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.swr-methodology .swr-label,
.swr-sources .swr-label,
.swr-update-log .swr-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--swr-orange-deep);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.swr-methodology details {
  margin-top: 1rem;
  border-top: 1px solid var(--swr-rule-dark);
  border-bottom: 1px solid var(--swr-rule-dark);
}

.swr-methodology summary {
  cursor: pointer;
  padding: 0.9rem 0;
  color: var(--swr-petrol-dark);
  font-weight: 800;
}

.swr-methodology details[open] {
  padding-bottom: 1.1rem;
}

.swr-methodology details > :last-child {
  margin-bottom: 0;
}

.swr-source-list {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.swr-source-list li {
  margin-bottom: 0.65rem;
}

.swr-source-list li::marker {
  color: var(--swr-orange-deep);
  font-weight: 800;
}

.swr-update-log dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.65rem 1.2rem;
  margin: 1rem 0 0;
}

.swr-update-log dt {
  color: var(--swr-petrol-dark);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.swr-update-log dd {
  margin: 0;
  color: var(--swr-muted);
}

/* =========================================================
   13. RELATED RESEARCH / HUB-SPOKE NAVIGATION
   ========================================================= */

.swr-related {
  margin: clamp(3rem, 7vw, 6rem) 0 0;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--swr-petrol);
  color: #ffffff;
}

.swr-related .swr-label {
  color: var(--swr-yellow);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.swr-related h2 {
  margin-top: 0.4rem;
  color: #ffffff;
}

.swr-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.4rem;
  background: rgba(255, 255, 255, 0.22);
}

.swr-related a {
  display: block;
  min-height: 100%;
  padding: 1.15rem 1.2rem;
  background: var(--swr-petrol-dark);
  color: #ffffff;
  font-weight: 760;
  line-height: 1.35;
  text-decoration: none;
}

.swr-related a:hover,
.swr-related a:focus-visible {
  background: var(--swr-orange);
  color: var(--swr-petrol-dark);
}

.swr-related a small {
  display: block;
  margin-bottom: 0.25rem;
  color: #b8d2d4;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.swr-related a:hover small,
.swr-related a:focus-visible small {
  color: var(--swr-petrol-dark);
}

/* =========================================================
   14. BUTTONS / DOWNLOADS / CITATION ACTIONS
   ========================================================= */

.swr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.5rem 0;
}

.swr-button,
.swr-article a.swr-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border: 2px solid var(--swr-petrol-dark);
  background: var(--swr-petrol-dark);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}

.swr-button:hover,
.swr-article a.swr-button:hover {
  border-color: var(--swr-orange);
  background: var(--swr-orange);
  color: var(--swr-petrol-dark);
}

.swr-button.is-secondary,
.swr-article a.swr-button.is-secondary {
  background: transparent;
  color: var(--swr-petrol-dark);
}

.swr-button.is-secondary:hover,
.swr-article a.swr-button.is-secondary:hover {
  background: var(--swr-yellow);
  border-color: var(--swr-petrol-dark);
}

/* =========================================================
   15. UTILITY CLASSES
   ========================================================= */

.swr-accent-orange { color: var(--swr-orange-deep) !important; }
.swr-accent-teal { color: var(--swr-teal-deep) !important; }
.swr-accent-petrol { color: var(--swr-petrol-dark) !important; }
.swr-bg-cream { background: var(--swr-cream) !important; }
.swr-bg-mist { background: var(--swr-mist) !important; }
.swr-no-margin { margin: 0 !important; }
.swr-tabular { font-variant-numeric: tabular-nums; }

.swr-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* =========================================================
   16. RESPONSIVE BEHAVIOR
   ========================================================= */

@media (max-width: 900px) {
  .swr-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swr-stat:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--swr-rule);
  }

  .swr-stat:nth-child(4) {
    border-top: 1px solid var(--swr-rule);
  }

  .swr-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .swr-article {
    --swr-section-gap: 3.7rem;
  }

  .swr-masthead {
    border-top-width: 6px;
  }

  .swr-masthead::after {
    width: 38vw;
    height: 18px;
  }

  .swr-masthead h1,
  .swr-title {
    font-size: clamp(2.5rem, 12vw, 4.2rem);
    line-height: 0.98;
  }

  .swr-key-findings {
    padding: 1.5rem 1.25rem 1.6rem 1.55rem;
  }

  .swr-key-findings ul {
    grid-template-columns: 1fr;
  }

  .swr-section-number {
    font-size: 3.5rem;
  }

  .swr-data-band {
    padding-inline: 1.25rem;
  }

  .swr-update-log dl {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .swr-update-log dd {
    margin-bottom: 0.8rem;
  }
}

@media (max-width: 480px) {
  .swr-meta span:not(:last-child)::after {
    display: none;
  }

  .swr-meta {
    display: grid;
    gap: 0.45rem;
  }

  .swr-stat-grid {
    grid-template-columns: 1fr;
  }

  .swr-stat + .swr-stat,
  .swr-stat:nth-child(3),
  .swr-stat:nth-child(4) {
    border-top: 1px solid var(--swr-rule);
    border-left: 0;
  }

  .swr-stat {
    display: grid;
    grid-template-columns: minmax(110px, 0.65fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
  }

  .swr-stat-label {
    margin-top: 0;
  }

  .swr-section-head {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .swr-section-number {
    font-size: 3rem;
  }

  .swr-jumpbar a {
    padding-inline: 0.85rem;
  }
}

/* =========================================================
   17. ACCESSIBILITY / MOTION / PRINT
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .swr-article *,
  .swr-article *::before,
  .swr-article *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .swr-article {
    --swr-ink: #000000;
    --swr-petrol: #ffffff;
    --swr-petrol-dark: #000000;
    --swr-cream: #ffffff;
    --swr-mist: #ffffff;
    color: #000000;
  }

  .swr-jumpbar,
  .swr-actions,
  .swr-button {
    display: none !important;
  }

  .swr-key-findings,
  .swr-finding,
  .swr-related,
  .swr-data-band {
    border: 1px solid #000000;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none;
  }

  .swr-key-findings *,
  .swr-finding *,
  .swr-related *,
  .swr-data-band * {
    color: #000000 !important;
  }

  .swr-section,
  .swr-chart,
  .swr-table-wrap,
  .swr-finding,
  .swr-callout {
    break-inside: avoid;
  }

  .swr-article a {
    color: #000000;
    text-decoration: underline;
  }
}
