/* Insights article pages (app/templates/article.php): editorial hero, featured image, contents, reading column, author panel
 * and related articles. Related cards reuse insights.css. Light mode first; dark mode at the end. */

/* The site-wide `overflow-x: hidden` makes the body a scroll box, which stops the contents list from sticking. */
body:has(.ar) {
  overflow-x: clip;
}
.ar {
  --ar-ink: #1a1a1a;
  --ar-text: #34324a;
  --ar-muted: #5a5870;
  --ar-line: #e4e8ee;
  --ar-tint: #f4f6f8;
  --ar-link: #0a6aa8;
  --ar-header: calc(3rem + 2 * clamp(0.75rem, 2vw, 1.5rem)); /* height of the fixed header */
}
.ar p,
.ar li {
  color: var(--ar-text);
}

/* ------------------------------------------------------------------ hero */
.ar-hero {
  padding: clamp(7.5rem, 12vw, 10.25rem) 1rem clamp(2.5rem, 4vw, 3rem);
  background-color: var(--ar-tint);
  text-align: center;
}
/* The desktop header is taller: keep the breadcrumbs clear of it. */
@media only screen and (min-width: 64rem) {
  .ar-hero {
    padding-top: clamp(9.25rem, 12vw, 10.25rem);
  }
}
.ar-hero--image {
  padding-bottom: clamp(5rem, 10vw, 8rem); /* the photograph overlaps the foot of the hero */
}
.ar-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 56rem;
  margin: 0 auto;
}
.ar-hero .cs-breadcrumbs {
  margin-bottom: clamp(1.5rem, 2.5vw, 2rem);
}
.ar-hero .cs-breadcrumbs ol {
  justify-content: center;
}
.ar-hero .cs-breadcrumbs li,
.ar-hero .cs-breadcrumbs a {
  font-size: 0.8125rem;
}
.ar p.ar-pillar {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ar-link);
}
.ar-title {
  max-width: 26ch;
  margin: 0;
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.375rem);
  font-weight: 700;
  line-height: 1.14;
  color: var(--ar-ink);
  text-wrap: balance;
  overflow-wrap: break-word;
}
.ar p.ar-summary {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
  line-height: 1.6;
  color: var(--ar-muted);
  text-wrap: pretty;
}
.ar-byline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: clamp(1.75rem, 3vw, 2.25rem);
}
.ar-byline__who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}
.ar-byline__avatar,
.ar-author__avatar {
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
}
.ar-byline__avatar {
  width: 2.75rem;
  height: 2.75rem;
}
.ar-byline__who p {
  margin: 0;
  line-height: 1.4;
}
.ar-byline__name,
.ar-byline__role {
  display: block;
}
.ar-byline__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ar-ink);
}
.ar-byline__role {
  font-size: 0.8125rem;
}
.ar p.ar-byline__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  margin: 0;
  font-size: 0.875rem;
  color: var(--ar-muted);
}
.ar-byline__facts > * + *::before {
  content: "\00b7";
  margin-right: 0.75rem;
}
.ar-byline__who + .ar-byline__facts {
  position: relative;
}
@media only screen and (min-width: 40rem) {
  .ar-byline__who + .ar-byline__facts {
    padding-left: 1.75rem;
    border-left: 1px solid #cfd6de;
  }
}

/* ------------------------------------------------------------------ featured image */
.ar-figure {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: content-box;
}
.ar-hero--image + .ar-figure {
  margin-top: calc(-1 * clamp(3rem, 7vw, 5.5rem));
}
.ar-figure img {
  display: block;
  width: 100%;
  height: auto; /* with the width and height attributes this keeps the photograph's own shape before it loads */
  border-radius: clamp(0.75rem, 1.6vw, 1.25rem);
  background-color: #001f3f;
}

/* ------------------------------------------------------------------ contents and reading column */
.ar-layout {
  max-width: 47rem; /* about 750px */
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) 1rem 0;
  box-sizing: content-box;
}
.ar-toc {
  margin: 0 0 2.5rem;
}
.ar-toc__panel {
  border: 1px solid var(--ar-line);
  border-radius: 0.75rem;
  background-color: var(--ar-tint);
}
.ar-toc__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.125rem;
  list-style: none;
  cursor: pointer;
}
.ar-toc__summary::-webkit-details-marker {
  display: none;
}
.ar-toc__summary span {
  font-family: var(--headerFont);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ar-ink);
}
.ar-toc__summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border: solid var(--ar-link);
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s;
}
.ar-toc__panel[open] .ar-toc__summary::after {
  transform: translateY(2px) rotate(225deg);
}
.ar-toc__list {
  margin: 0;
  padding: 0 1.125rem 0.75rem;
  list-style: none;
}
.ar-toc__list li {
  margin: 0;
}
.ar-toc__list a {
  display: block;
  padding: 0.55rem 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ar-muted);
  text-decoration: none;
}
.ar-toc__list a:hover {
  color: var(--ar-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.ar-toc__list a[aria-current] {
  font-weight: 600;
  color: var(--ar-ink);
}

.ar-body {
  min-width: 0;
  overflow-wrap: break-word;
}
.ar-body > :first-child {
  margin-top: 0;
}
.ar-body p,
.ar-body li {
  font-size: 1.0625rem;
  line-height: 1.75;
}
.ar-body p {
  margin: 0 0 1.5rem;
}
.ar-body h2,
.ar-body h3,
.ar-body h4,
.ar-body h5,
.ar-body h6 {
  color: var(--ar-ink);
  font-weight: 700;
  text-wrap: balance;
  scroll-margin-top: calc(var(--ar-header) + 1rem);
}
.ar-body h2 {
  margin: 3.5rem 0 1.25rem;
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2rem);
  line-height: 1.25;
}
.ar-body h2::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-bottom: 1rem;
  background-color: var(--secondary);
}
.ar-body h3 {
  margin: 2.5rem 0 1rem;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  line-height: 1.3;
}
.ar-body h4,
.ar-body h5,
.ar-body h6 {
  margin: 2rem 0 0.75rem;
  font-size: 1.125rem;
  line-height: 1.35;
}
.ar-body h2:focus:not(:focus-visible),
.ar-body h3:focus:not(:focus-visible) {
  outline: none;
}
.ar-body ul,
.ar-body ol {
  margin: 0 0 1.75rem;
  padding-left: 1.5rem;
}
.ar-body ul {
  list-style: disc;
}
.ar-body ol {
  list-style: decimal;
}
.ar-body li {
  margin: 0 0 0.5rem;
  padding-left: 0.375rem;
}
.ar-body li::marker {
  color: var(--ar-link);
}
.ar-body li > ul,
.ar-body li > ol {
  margin: 0.5rem 0 0;
}
.ar-body li p {
  margin-bottom: 0.5rem;
}
.ar-body a {
  font-size: inherit;
  line-height: inherit;
  color: var(--ar-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.ar-body a:hover {
  text-decoration-thickness: 2px;
}
.ar-body strong {
  font-weight: 700;
  color: var(--ar-ink);
}
.ar-body em {
  font-style: italic;
}
.ar-body blockquote {
  margin: 2.25rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 3px solid var(--secondary);
}
.ar-body blockquote p {
  font-size: 1.25rem;
  line-height: 1.65;
  color: var(--ar-ink);
}
.ar-body blockquote > :last-child {
  margin-bottom: 0;
}
.ar-body hr {
  width: 4rem;
  margin: 3rem auto;
  border: 0;
  border-top: 1px solid var(--ar-line);
}
/* An image, with an optional caption written in italics on the line directly below it. */
.ar-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.5rem auto 0;
  border-radius: 0.75rem;
}
.ar-body img + em {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-style: normal;
  line-height: 1.5;
  text-align: center;
  color: var(--ar-muted);
}
.ar-table {
  margin: 2rem 0;
  overflow-x: auto;
}
.ar-table table {
  width: 100%;
  border-collapse: collapse;
}
.ar-body th,
.ar-body td {
  min-width: 7rem;
  padding: 0.8125rem 0.875rem;
  border-bottom: 1px solid var(--ar-line);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
  color: var(--ar-text);
}
.ar-body th {
  border-bottom: 2px solid var(--secondary);
  background-color: var(--ar-tint);
  font-weight: 600;
  color: var(--ar-ink);
}
.ar-body code {
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background-color: var(--ar-tint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--ar-ink);
}
.ar-body pre {
  margin: 2rem 0;
  padding: 1.25rem;
  overflow-x: auto;
  border-radius: 0.75rem;
  background-color: #0b1b28;
}
.ar-body pre code {
  padding: 0;
  background: none;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #e8eef4;
  overflow-wrap: normal;
}

/* ------------------------------------------------------------------ author */
.ar-after {
  max-width: 47rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 3.5rem) 1rem 0;
  box-sizing: content-box;
}
.ar-author {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 2.25rem;
  border-radius: 1rem;
  background-color: var(--ar-tint);
}
.ar-author__avatar {
  flex: 0 0 auto;
  width: 6.5rem;
  height: 6.5rem;
}
.ar-author p {
  margin: 0;
}
.ar-author p.ar-author__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ar-muted);
}
.ar-author p.ar-author__name {
  margin-top: 0.25rem;
  font-family: var(--headerFont);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ar-ink);
}
.ar-author p.ar-author__role {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ar-link);
}
.ar-author p.ar-author__bio {
  margin-top: 0.75rem;
  font-size: 1rem;
  line-height: 1.65;
}
@media only screen and (max-width: 29.999rem) {
  .ar-author {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
  }
  .ar-author__avatar {
    width: 5.5rem;
    height: 5.5rem;
  }
}

.ar-mark.ar-byline__avatar {
  width: 3rem;
  height: 3rem;
}

/* ------------------------------------------------------------------ continue reading */
.ar-related {
  padding: clamp(3.5rem, 7vw, 5rem) 1rem 0;
}
.ar-related__inner {
  max-width: 52rem;
  margin: 0 auto;
}
.ar-related__title {
  margin: 0 0 1.75rem;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  text-align: center;
}
.ar-cards {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ar-cards .in-title {
  font-size: 1.25rem;
}
.ar-cards--one {
  max-width: 25rem;
  margin: 0 auto;
}
@media only screen and (min-width: 40rem) {
  .ar-cards:not(.ar-cards--one) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* The signboard follows with no top padding of its own, so give it room here. */
.ar + #cta-1693,
.ar-related + #cta-1693 {
  padding-top: clamp(3.5rem, 7vw, 5rem);
}

/* ------------------------------------------------------------------ desktop hero: a wider, shallower introduction */
@media only screen and (min-width: 64rem) {
  .ar-hero__inner {
    max-width: 58rem;
  }
  .ar-hero .cs-breadcrumbs {
    margin-bottom: 1.25rem;
  }
  .ar-title {
    max-width: 56.25rem; /* 900px: balanced lines, wrapping as each title needs */
  }
  .ar p.ar-summary {
    max-width: 43.75rem;
  }
  .ar-byline {
    margin-top: 1.5rem;
  }
}
/* Phones: only the way back (Home / Insights), aligned with the article; the headline below already names the page. The full
 * trail stays in the structured data. */
@media only screen and (max-width: 39.999rem) {
  .ar-hero .cs-breadcrumbs ol {
    justify-content: flex-start;
    flex-wrap: nowrap;
  }
  .ar-hero .cs-breadcrumbs li:last-child {
    display: none;
  }
}

/* ------------------------------------------------------------------ desktop: contents beside the article */
@media only screen and (min-width: 64rem) {
  .ar {
    --ar-header: 6rem;
  }
  .ar-body p,
  .ar-body li {
    font-size: 1.125rem;
  }
  .ar-layout--toc {
    display: grid;
    grid-template-columns: 13rem minmax(0, 47rem);
    justify-content: center;
    column-gap: 2.5rem;
    max-width: 75rem;
    box-sizing: border-box;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }
  .ar-toc {
    position: sticky;
    top: calc(var(--ar-header) + 2rem);
    align-self: start;
    margin: 0;
  }
  .ar-toc__panel {
    border: 0;
    border-radius: 0;
    background: none;
  }
  .ar-toc__summary {
    min-height: 0;
    padding: 0 0 0.875rem;
    cursor: default;
  }
  .ar-toc__summary::after {
    content: none;
  }
  .ar-toc__list {
    position: relative;
    max-height: calc(100vh - var(--ar-header) - 7rem);
    overflow-y: auto;
    padding: 0;
    border-left: 1px solid var(--ar-line);
  }
  .ar-toc__list a {
    margin-left: -1px;
    padding: 0.5rem 0.25rem 0.5rem 1rem;
    border-left: 2px solid transparent;
    font-size: 0.875rem;
  }
  .ar-toc__list a:focus-visible {
    outline-offset: -3px;
  }
  .ar-toc__list a[aria-current] {
    border-left-color: var(--secondary);
  }
  /* The author panel sits under the reading column. */
  .ar-after--toc {
    display: grid;
    grid-template-columns: 13rem minmax(0, 47rem);
    justify-content: center;
    column-gap: 2.5rem;
    max-width: 75rem;
    box-sizing: border-box;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }
  .ar-after--toc .ar-author {
    grid-column: 2;
  }
}

/* ------------------------------------------------------------------ dark mode */
html.dark-mode .ar {
  --ar-ink: #fafbfc;
  --ar-text: #d3dce5;
  --ar-muted: #a9b8c7;
  --ar-line: #1d3547;
  --ar-tint: #0a1a27;
  --ar-link: #6cc8ff;
}
html.dark-mode .ar p,
html.dark-mode .ar li {
  color: var(--ar-text);
}
html.dark-mode .ar h1,
html.dark-mode .ar h2,
html.dark-mode .ar h3,
html.dark-mode .ar h4,
html.dark-mode .ar-body blockquote p,
html.dark-mode .ar p.ar-author__name {
  color: var(--ar-ink);
}
html.dark-mode .ar p.ar-pillar,
html.dark-mode .ar p.ar-author__role {
  color: var(--ar-link);
}
html.dark-mode .ar p.ar-summary,
html.dark-mode .ar p.ar-byline__facts,
html.dark-mode .ar p.ar-author__label {
  color: var(--ar-muted);
}
html.dark-mode .ar-hero .cs-breadcrumbs li,
html.dark-mode .ar-hero .cs-breadcrumbs a {
  color: var(--ar-muted);
}
@media only screen and (min-width: 40rem) {
  html.dark-mode .ar-byline__who + .ar-byline__facts {
    border-left-color: #2a4a60;
  }
}
html.dark-mode .ar-related__title {
  color: #fafbfc;
}
/* A fine ring keeps photographs distinct on the dark ground; the white mark needs none. */
html.dark-mode img.ar-byline__avatar,
html.dark-mode img.ar-author__avatar {
  box-shadow: 0 0 0 1px #2a4a60;
}

@media (prefers-reduced-motion: reduce) {
  .ar-toc__summary::after {
    transition: none;
  }
}
