/* Styles for newsroom pages. Every selector starts with .nr- so nothing here reaches the
   site's own header, nav or footer, and the site's styles do not need to change.
   Each site sets its own faces and colours as --nr-* custom properties (render/themes.ts);
   every value has a fallback, so a page without them inherits the site's own. */

.nr-main {
  box-sizing: border-box;
  width: 100%;
  max-width: 45rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 5rem;
  color: var(--nr-ink, inherit);
  font-family: var(--nr-body, inherit);
}

.nr-main *,
.nr-main *::before,
.nr-main *::after {
  box-sizing: border-box;
}

.nr-main a {
  color: var(--nr-link, inherit);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.nr-main a:hover {
  text-decoration-thickness: 2px;
}

.nr-main a:focus-visible {
  outline: 2px solid var(--nr-accent, currentColor);
  outline-offset: 2px;
  border-radius: 2px;
}

/* The trail, the section label and the date */

.nr-main .nr-crumbs {
  margin: 0 0 1.5rem;
  font-family: var(--nr-ui, inherit);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--nr-muted, inherit);
}

.nr-main .nr-crumbs a {
  color: inherit;
  text-decoration: none;
}

.nr-main .nr-crumbs a:hover {
  text-decoration: underline;
}

.nr-main .nr-kicker {
  margin: 0 0 0.6rem;
  font-family: var(--nr-ui, inherit);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nr-accent, inherit);
}

.nr-main .nr-meta {
  margin: 0 0 2rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--nr-rule, rgba(127, 127, 127, 0.35));
  border-bottom: 1px solid var(--nr-rule, rgba(127, 127, 127, 0.35));
  font-family: var(--nr-ui, inherit);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--nr-muted, inherit);
}

/* The headline and the dek */

.nr-main .nr-nowrap {
  white-space: nowrap;
}

.nr-main .nr-article {
  display: block;
  margin: 0;
  padding: 0;
}

.nr-main .nr-headline {
  margin: 0 0 1rem;
  font-family: var(--nr-display, inherit);
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--nr-ink, inherit);
  overflow-wrap: break-word;
  text-wrap: balance;
}

.nr-main .nr-dek {
  margin: 0 0 1.5rem;
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.3rem);
  line-height: 1.5;
  color: var(--nr-muted, inherit);
}

/* The story */

.nr-main .nr-body {
  font-size: 1.125rem;
  line-height: 1.7;
}

.nr-main .nr-p {
  margin: 0 0 1.25rem;
}

.nr-main .nr-subhead {
  margin: 2.25rem 0 0.75rem;
  font-family: var(--nr-display, inherit);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--nr-ink, inherit);
}

.nr-main .nr-list {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}

.nr-main .nr-list li {
  margin: 0 0 0.4rem;
  padding-left: 0.2rem;
}

.nr-main .nr-list li::marker {
  color: var(--nr-accent, currentColor);
}

/* A ranked list: each line carries its own rank, in figures of equal width, with room for three digits */

.nr-main .nr-list--ranked {
  padding-left: 2.6rem;
  font-variant-numeric: tabular-nums;
}

.nr-main .nr-block {
  margin: 2rem 0;
  padding: 1.1rem 1.25rem 1.2rem;
  border-left: 3px solid var(--nr-accent, currentColor);
  border-radius: 0 6px 6px 0;
  background: var(--nr-tint, rgba(127, 127, 127, 0.08));
}

.nr-main .nr-block-label {
  margin: 0 0 0.6rem;
  font-family: var(--nr-ui, inherit);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nr-accent, inherit);
}

.nr-main .nr-block .nr-p,
.nr-main .nr-block .nr-list {
  font-size: 1.0625rem;
}

.nr-main .nr-block .nr-p:last-child,
.nr-main .nr-block .nr-list:last-child {
  margin-bottom: 0;
}

/* Figures under a story: a table, bars or a line. Thin and quiet: no box, no card, no shadow; hairlines from --nr-rule,
   the numbers in the body ink, the caption and the source in the interface face. */

.nr-main .nr-figures {
  margin: 2.25rem 0 0;
}

.nr-main .nr-figure {
  margin: 0 0 2rem;
  padding: 0;
}

.nr-main .nr-figure:last-child {
  margin-bottom: 0;
}

.nr-main .nr-figure-caption {
  margin: 0 0 0.6rem;
  font-family: var(--nr-ui, inherit);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--nr-muted, inherit);
}

.nr-main .nr-figure-source {
  margin: 0.6rem 0 0;
  font-family: var(--nr-ui, inherit);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--nr-muted, inherit);
}

/* A table: only the wrap scrolls sideways, never the page */

.nr-main .nr-table-wrap {
  margin: 0 -0.5rem;
  max-width: calc(100% + 1rem);
  overflow-x: auto;
}

.nr-main .nr-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 1rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: var(--nr-ink, inherit);
}

.nr-main .nr-table th,
.nr-main .nr-table td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border: 0;
  border-bottom: 1px solid var(--nr-rule, rgba(127, 127, 127, 0.35));
  text-align: left;
  vertical-align: top;
}

.nr-main .nr-table th:first-child,
.nr-main .nr-table td:first-child {
  padding-left: 0.5rem;
}

.nr-main .nr-table th:last-child,
.nr-main .nr-table td:last-child {
  padding-right: 0.5rem;
}

.nr-main .nr-table th {
  font-family: var(--nr-ui, inherit);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--nr-muted, inherit);
  border-bottom-color: var(--nr-ink, rgba(127, 127, 127, 0.6));
}

.nr-main .nr-table .nr-num {
  text-align: right;
  white-space: nowrap;
}

/* A long column label wraps so the figures under it stay on a phone's screen; the figures themselves never wrap */

.nr-main .nr-table th.nr-num {
  white-space: normal;
}

/* On a phone a table of four columns needs every pixel: the cells are set one step smaller */

@media (max-width: 480px) {
  .nr-main .nr-table {
    font-size: 0.9375rem;
  }
}

.nr-main .nr-table .nr-row-home td {
  font-weight: 600;
  color: var(--nr-accent, inherit);
  background: var(--nr-tint, rgba(127, 127, 127, 0.08));
}

/* Bars: a label, a track and the value in one row */

.nr-main .nr-bars {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nr-main .nr-bar {
  display: grid;
  grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) 4rem;
  align-items: center;
  column-gap: 0.75rem;
  margin: 0 -0.5rem;
  padding: 0.4rem 0.5rem;
  line-height: 1.3;
  color: var(--nr-ink, inherit);
}

.nr-main .nr-bar--home {
  color: var(--nr-accent, inherit);
  background: var(--nr-tint, rgba(127, 127, 127, 0.08));
}

.nr-main .nr-bar-label {
  min-width: 0;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.nr-main .nr-bar-value {
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.nr-main .nr-bar-track {
  display: block;
  width: 100%;
  height: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  background: var(--nr-rule, rgba(127, 127, 127, 0.35));
  color: var(--nr-ink, currentColor);
}

.nr-main .nr-bar-track::-webkit-progress-bar {
  border-radius: 0;
  background: var(--nr-rule, rgba(127, 127, 127, 0.35));
}

.nr-main .nr-bar-track::-webkit-progress-value {
  border-radius: 0;
  background: var(--nr-ink, currentColor);
}

.nr-main .nr-bar-track::-moz-progress-bar {
  border-radius: 0;
  background: var(--nr-ink, currentColor);
}

.nr-main .nr-bar--home .nr-bar-track::-webkit-progress-value {
  background: var(--nr-accent, currentColor);
}

.nr-main .nr-bar--home .nr-bar-track::-moz-progress-bar {
  background: var(--nr-accent, currentColor);
}

/* A line: one stroke of 2px, a hairline baseline, labels at 12 drawing units or more */

.nr-main .nr-line {
  display: block;
  width: 100%;
  max-width: 30rem;
  height: auto;
  overflow: visible;
  color: var(--nr-ink, inherit);
  font-family: var(--nr-ui, inherit);
}

.nr-main .nr-line-base {
  stroke: var(--nr-rule, rgba(127, 127, 127, 0.5));
  stroke-width: 1;
}

.nr-main .nr-line-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nr-main .nr-line-dot {
  fill: currentColor;
}

.nr-main .nr-line-label {
  font-size: 12px;
  fill: var(--nr-muted, currentColor);
}

.nr-main .nr-line-value {
  font-size: 14px;
  font-weight: 600;
  fill: currentColor;
}

/* Sources and the automation label */

.nr-main .nr-article-footer {
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--nr-rule, rgba(127, 127, 127, 0.4));
  font-family: var(--nr-ui, inherit);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--nr-muted, inherit);
}

.nr-main .nr-article-footer h2 {
  margin: 0 0 0.5rem;
  font-family: var(--nr-ui, inherit);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nr-ink, inherit);
}

.nr-main .nr-article-footer ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.nr-main .nr-article-footer li {
  margin: 0 0 0.25rem;
}

.nr-main .nr-label {
  margin: 0;
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--nr-muted, inherit);
}

/* More reports under a post */

.nr-main .nr-related {
  margin: 3rem 0 0;
  padding-top: 1.25rem;
  border-top: 3px solid var(--nr-ink, currentColor);
}

.nr-main .nr-related-heading {
  margin: 0 0 1rem;
  font-family: var(--nr-display, inherit);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--nr-ink, inherit);
}

.nr-main .nr-related-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nr-main .nr-related-item {
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--nr-rule, rgba(127, 127, 127, 0.3));
}

.nr-main .nr-related-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.nr-main .nr-related-item .nr-kicker {
  margin-bottom: 0.35rem;
}

.nr-main .nr-related-item a {
  font-family: var(--nr-display, inherit);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--nr-ink, inherit);
  text-decoration: none;
}

.nr-main .nr-related-item a:hover {
  color: var(--nr-link, inherit);
  text-decoration: underline;
}

.nr-main .nr-more {
  margin: 1.5rem 0 0;
  font-family: var(--nr-ui, inherit);
  font-size: 0.9375rem;
  font-weight: 600;
}

.nr-main .nr-related .nr-more {
  margin-top: 1rem;
}

/* The report index */

.nr-main.nr-index {
  max-width: 64rem;
}

.nr-main.nr-index > .nr-headline {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--nr-ink, currentColor);
}

.nr-main .nr-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 2.5rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.nr-main .nr-item {
  margin: 0;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--nr-rule, rgba(127, 127, 127, 0.3));
}

.nr-main .nr-item:first-child {
  padding-top: 0.5rem;
}

.nr-main .nr-item-headline {
  margin: 0 0 0.5rem;
  font-family: var(--nr-display, inherit);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}

.nr-main .nr-item-headline a {
  color: var(--nr-ink, inherit);
  text-decoration: none;
}

.nr-main .nr-item-headline a:hover {
  color: var(--nr-link, inherit);
  text-decoration: underline;
}

.nr-main .nr-item:first-child .nr-item-headline {
  font-size: clamp(1.625rem, 1.2rem + 1.7vw, 2.375rem);
  line-height: 1.15;
}

.nr-main .nr-item .nr-dek {
  margin: 0 0 0.6rem;
  font-size: 1.0625rem;
}

.nr-main .nr-item:first-child .nr-dek {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
}

.nr-main .nr-item .nr-meta {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 0.8125rem;
}

.nr-main .nr-empty {
  margin: 1rem 0 2rem;
  font-size: 1.125rem;
  color: var(--nr-muted, inherit);
}

.nr-main .nr-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 1.5rem 0 0;
  font-family: var(--nr-ui, inherit);
  font-weight: 600;
}

.nr-main .nr-pager a {
  display: inline-block;
  padding: 0.6rem 1rem;
  border: 1px solid var(--nr-rule, rgba(127, 127, 127, 0.5));
  border-radius: 6px;
  text-decoration: none;
}

.nr-main .nr-pager a:hover {
  border-color: var(--nr-link, currentColor);
}

.nr-main .nr-pager .nr-older {
  margin-left: auto;
}

/* The site's own chrome, kept inside a phone's width */

.nr-page nav,
.nr-page nav ul {
  flex-wrap: wrap;
}

.nr-page nav a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.nr-page > footer:last-of-type {
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.nr-page > footer:last-of-type * {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (min-width: 48rem) {
  .nr-main {
    padding: 2.75rem 2rem 6rem;
  }
}

@media (min-width: 60rem) {
  .nr-main .nr-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nr-main .nr-item:first-child {
    grid-column: 1 / -1;
    padding-bottom: 2rem;
  }
}

/* Links inside labels, the trail's own page and the label's link to How we report */

.nr-main .nr-kicker a {
  color: inherit;
  text-decoration: none;
}

.nr-main .nr-kicker a:hover {
  text-decoration: underline;
}

.nr-main .nr-crumbs [aria-current="page"] {
  color: var(--nr-ink, inherit);
}

.nr-main .nr-label a {
  font-style: normal;
  white-space: nowrap;
}

/* The section menu: one row that scrolls sideways on a phone */

.nr-main .nr-sections {
  display: flex;
  flex-wrap: nowrap;
  gap: 0 1.5rem;
  margin: 0 0 1.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--nr-rule, rgba(127, 127, 127, 0.3));
  font-family: var(--nr-ui, inherit);
  font-size: 0.875rem;
  font-weight: 600;
}

.nr-main .nr-sections::-webkit-scrollbar {
  display: none;
}

.nr-main .nr-sections a {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 2.75rem;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--nr-muted, inherit);
  text-decoration: none;
}

.nr-main .nr-sections a:hover {
  color: var(--nr-ink, inherit);
}

.nr-main .nr-sections a[aria-current="page"] {
  border-bottom-color: var(--nr-accent, currentColor);
  color: var(--nr-ink, inherit);
}

/* A section page's introduction, and a section with nothing in it yet */

.nr-main .nr-intro {
  max-width: 38rem;
  margin: -0.5rem 0 2rem;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--nr-muted, inherit);
}

.nr-main .nr-empty {
  color: var(--nr-muted, inherit);
}

/* The links about the reports, at the foot of every newsroom page */

.nr-main .nr-site-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 3rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--nr-rule, rgba(127, 127, 127, 0.3));
  font-family: var(--nr-ui, inherit);
  font-size: 0.8125rem;
}

.nr-main .nr-site-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--nr-muted, inherit);
  text-decoration: none;
}

.nr-main .nr-site-links a:hover {
  color: var(--nr-ink, inherit);
  text-decoration: underline;
}

/* The pages about the reports: About these reports, How we report, Corrections */

.nr-main.nr-info .nr-body p {
  margin: 0 0 1.1rem;
}

.nr-main.nr-info .nr-body h2 {
  margin: 2.25rem 0 0.6rem;
  font-family: var(--nr-display, inherit);
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--nr-ink, inherit);
}

.nr-main.nr-info .nr-body ul {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
}

.nr-main.nr-info .nr-body li {
  margin: 0 0 0.5rem;
}

/* One rule above the links about the reports, not two, when they follow a list or a pager */

.nr-main .nr-items + .nr-site-links,
.nr-main .nr-pager + .nr-site-links {
  border-top: 0;
  margin-top: 1rem;
}
