.articles-index-shell,
.article-shell {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: 0 0% 99%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --border: 240 5.9% 90%;
  --ring: 240 10% 3.9%;
}

.article-document {
  margin: 0;
  background: hsl(0 0% 99%);
}

.article-document *,
.articles-index-shell *,
.article-shell * {
  box-sizing: border-box;
}

.article-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.articles-index-shell,
.article-shell {
  min-height: 100vh;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  font-family: var(--font-sans);
}

.article-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  height: 3px;
  background: hsl(var(--border) / 0.45);
}

.article-progress span {
  display: block;
  width: var(--article-reading-progress, 0%);
  height: 100%;
  background: var(--article-accent, hsl(var(--primary)));
}

.article-site-header {
  border-bottom: 1px solid hsl(var(--border) / 0.7);
  background: hsl(var(--background) / 0.92);
}

.article-site-header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 2rem));
  min-height: 64px;
  margin: 0 auto;
}

.article-brand,
.article-site-header nav,
.article-site-header nav a,
.article-header-cta {
  display: inline-flex;
  align-items: center;
}

.article-brand {
  gap: 0.6rem;
  color: hsl(var(--foreground));
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.article-site-header nav {
  gap: 0.35rem;
}

.article-site-header nav a {
  min-height: 36px;
  padding: 0 0.75rem;
  border-radius: 6px;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
}

.article-site-header nav a:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}

.article-site-header nav .article-header-cta {
  gap: 0.35rem;
  margin-left: 0.25rem;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
}

.article-site-header nav .article-header-cta:hover {
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary) / 0.88);
}

.article-brand:focus-visible,
.article-site-header nav a:focus-visible,
.articles-filter button:focus-visible,
.articles-preview a:focus-visible,
.article-body a:focus-visible,
.article-sources summary:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 3px;
}

.article-kicker {
  margin: 0;
  color: var(--article-accent, hsl(var(--muted-foreground)));
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.articles-index-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 3.5rem;
  align-items: center;
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0 3.25rem;
}

.articles-index-hero h1 {
  max-width: 650px;
  margin: 0.65rem 0 0.9rem;
  font-size: 3rem;
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: 0;
}

.articles-index-hero > div > p:last-of-type {
  max-width: 58ch;
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 1.05rem;
  line-height: 1.65;
}

.articles-index-hero > img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border: 1px solid hsl(var(--border) / 0.7);
  border-radius: 8px;
  background: hsl(var(--muted));
}

.articles-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 1.5rem;
  padding: 0.25rem;
  border: 1px solid hsl(var(--border) / 0.75);
  border-radius: 8px;
  background: hsl(var(--muted) / 0.55);
}

.articles-filter button,
.article-filter-chip {
  min-height: 34px;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 5px;
  color: hsl(var(--muted-foreground));
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 550;
  letter-spacing: 0;
}

.article-filter-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
}

.articles-filter button[aria-pressed='true'] {
  color: hsl(var(--foreground));
  background: hsl(var(--card));
  box-shadow: 0 1px 2px hsl(var(--foreground) / 0.08);
}

.articles-list {
  display: grid;
  gap: 0.75rem;
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 5rem;
}

.articles-preview a {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  gap: 0.3rem 1.25rem;
  min-height: 142px;
  padding: 0.85rem;
  border: 1px solid hsl(var(--border) / 0.75);
  border-radius: 8px;
  color: hsl(var(--foreground));
  background: hsl(var(--card) / 0.7);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.articles-preview a:hover {
  border-color: hsl(var(--foreground) / 0.24);
  background: hsl(var(--card));
}

.articles-preview img {
  grid-row: 1 / 4;
  display: block;
  width: 180px;
  height: 114px;
  align-self: center;
  object-fit: cover;
  border-radius: 6px;
  background: hsl(var(--muted));
}

.articles-preview span {
  align-self: end;
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
  font-weight: 600;
}

.articles-preview h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0;
}

.articles-preview p {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
  line-height: 1.5;
}

.article-hero {
  width: min(820px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 2.75rem;
}

.article-breadcrumb {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 2.25rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.82rem;
}

.article-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.article-breadcrumb a:hover {
  color: hsl(var(--foreground));
}

.article-hero h1 {
  max-width: 760px;
  margin: 0.6rem 0 1rem;
  font-size: 2.75rem;
  font-weight: 670;
  line-height: 1.08;
  letter-spacing: 0;
}

.article-standfirst {
  max-width: 65ch;
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 1.08rem;
  line-height: 1.65;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1.15rem 0 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
}

.article-meta div {
  display: contents;
}

.article-meta dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.article-meta dd {
  margin: 0;
}

.article-meta dd + dd::before {
  content: '·';
  margin-right: 1rem;
}

.article-byline {
  margin: 0.45rem 0 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
}

.article-byline a {
  color: hsl(var(--foreground));
  font-weight: 600;
  text-underline-offset: 3px;
}

.article-hero figure {
  margin: 1.75rem 0 0;
}

.article-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 520;
  object-fit: cover;
  border: 1px solid hsl(var(--border) / 0.75);
  border-radius: 8px;
  background: hsl(var(--muted));
}

.article-reading-grid {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 5rem;
}

.article-body {
  min-width: 0;
  font-size: 1.06rem;
  line-height: 1.75;
}

.article-body > p {
  margin: 0 0 1.25rem;
}

.article-heading {
  scroll-margin-top: 2rem;
  margin: 2.6rem 0 1rem;
  font-size: 1.6rem;
  font-weight: 660;
  line-height: 1.25;
  letter-spacing: 0;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.4rem;
  padding-left: 1.35rem;
}

.article-body li {
  margin: 0.4rem 0;
  padding-left: 0.2rem;
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--article-accent, hsl(var(--primary)));
  color: hsl(var(--foreground));
  font-size: 1.15rem;
  font-weight: 570;
  line-height: 1.55;
}

.article-citation {
  color: var(--article-accent, hsl(var(--foreground)));
  font-size: 0.88em;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-fibly {
  margin: 2.75rem 0;
  padding: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--article-accent) 30%, hsl(var(--border)));
  border-radius: 8px;
  background: color-mix(in srgb, var(--article-accent) 5%, hsl(var(--card)));
}

.article-fibly > div {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--article-accent);
}

.article-fibly h3 {
  margin: 0;
  color: hsl(var(--foreground));
  font-size: 1rem;
  font-weight: 660;
}

.article-fibly p {
  margin: 0.75rem 0 1rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.94rem;
  line-height: 1.65;
}

.article-fibly > a {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  min-height: 38px;
  padding: 0 0.85rem;
  border-radius: 6px;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.article-sources {
  margin-top: 3.25rem;
  padding: 1rem 0;
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
}

.article-sources summary {
  cursor: pointer;
  color: hsl(var(--foreground));
  font-size: 0.88rem;
  font-weight: 620;
}

.article-sources ol {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.article-sources li {
  margin: 0.65rem 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
  line-height: 1.5;
}

.article-sources a {
  color: inherit;
  text-underline-offset: 3px;
}

.article-source-authors,
.article-source-publisher {
  display: block;
}

.article-related {
  margin-top: 2.75rem;
}

.article-related h2 {
  margin: 0 0 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.article-related > div {
  display: grid;
  gap: 0.5rem;
}

.article-related a {
  padding: 0.8rem 0;
  border-bottom: 1px solid hsl(var(--border) / 0.7);
  color: hsl(var(--foreground));
  font-size: 0.9rem;
  font-weight: 580;
  text-decoration: none;
}

.article-related a:hover {
  color: var(--article-accent, hsl(var(--foreground)));
}

@media (max-width: 760px) {
  .articles-index-hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 3rem 0 2.25rem;
  }

  .articles-index-hero h1 {
    font-size: 2.35rem;
  }

  .articles-index-hero > img {
    max-width: 420px;
  }

  .articles-filter {
    display: flex;
    width: 100%;
  }

  .articles-filter button {
    flex: 1 1 auto;
  }

  .articles-preview a {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 116px;
    gap: 0.25rem 0.85rem;
  }

  .articles-preview img {
    width: 112px;
    height: 84px;
  }

  .articles-preview p {
    display: none;
  }

  .article-hero {
    padding-top: 1.75rem;
  }

  .article-breadcrumb {
    margin-bottom: 1.75rem;
  }

  .article-hero h1 {
    font-size: 2.2rem;
  }

  .article-hero img {
    aspect-ratio: 1200 / 630;
  }

  .article-body {
    font-size: 1rem;
    line-height: 1.72;
  }
}

@media (max-width: 480px) {
  .article-site-header > div {
    width: min(100% - 1.25rem, 1120px);
  }

  .article-site-header nav > a:first-child {
    display: none;
  }

  .articles-index-hero,
  .articles-list,
  .article-hero,
  .article-reading-grid {
    width: calc(100% - 1.5rem);
  }

  .articles-preview a {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 102px;
    padding: 0.65rem;
  }

  .articles-preview img {
    width: 88px;
    height: 72px;
  }

  .articles-preview h2 {
    font-size: 1rem;
  }

  .article-hero h1 {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-shell *,
  .article-shell *::before,
  .article-shell *::after,
  .articles-index-shell *,
  .articles-index-shell *::before,
  .articles-index-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
