article {
  background-color: var(--bg-color-secondary);
  padding: var(--padding-medium);
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--cyan-accent);
  transition: background-color var(--transition-duration-slow) ease,
              border-color var(--transition-duration-slow) ease;
  margin-bottom: var(--margin-large);
}

article h1.text-gradient,
article h2.text-gradient,
article h3.text-gradient,
article h4.text-gradient {
  display: block;
}

article h1 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  margin-bottom: var(--margin-medium);
}

.article-authorship {
  margin: var(--margin-medium) 0 var(--margin-large) 0;
  display: flex;
  align-items: center;
  gap: var(--margin-medium);
}

.authorship-label {
  font-size: 0.85rem;
  color: var(--text-color-low-emphasis);
  white-space: nowrap;
  font-family: 'IBM Plex Serif', Georgia, serif;
}

.article-authorship .authorship-spark {
  flex: 1;
  max-width: 400px;
  margin-top: 0;
}

article h2 {
  margin-top: var(--margin-medium);
  margin-bottom: var(--margin-medium);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: var(--padding-small);
}

article h3 {
  margin-top: var(--margin-large);
  font-size: 1.3rem;
  color: var(--text-color);
}

article h4 {
  font-size: 1.1rem;
  margin-top: var(--margin-medium);
  margin-bottom: var(--margin-small);
}

article p {
  margin-bottom: var(--margin-medium);
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.7;
}

article div {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.6;
}

article ul,
article ol {
  padding-left: 1.5rem;
  margin-bottom: var(--margin-medium);
}

article li {
  margin-bottom: var(--margin-small);
}

article a[href^="#source-"] {
  display: inline-block;
  margin-left: 0.1em;
  text-decoration: none;
  font-size: 0.8em;
  vertical-align: super;
  line-height: 1;
  color: var(--link-color-solid);
}

article a[href^="#source-"]::after {
  bottom: -1px;
  height: 1px;
}

article a[href^="#source-"]:hover {
  color: var(--link-hover-color-solid);
}

article .post-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-color-low-emphasis);
  padding-bottom: var(--padding-medium);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--margin-large);
  margin-top: calc(-1 * var(--margin-small));
}

article .article-summary ul {
  font-weight: 600;
  list-style: none;
  padding-left: 0;
}

article table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 0;
  overflow: hidden;
  border: 2px solid var(--border-color);
  border-top: 3px solid var(--cyan-accent);
  margin: var(--margin-large) 0;
}

article th,
article td {
  padding: var(--padding-small) var(--padding-medium);
  text-align: left;
  border-bottom: 1px dotted var(--border-color);
  vertical-align: top;
  font-size: 0.9rem;
}

article th {
  background-color: var(--table-header-bg);
  font-weight: bold;
  color: var(--cyan-accent);
  border-bottom: 2px solid var(--border-color);
}

article tr:nth-child(even) td {
  background-color: var(--table-row-even-bg);
}

article tr:last-child td {
  border-bottom: none;
}

/* Why This Matters Callout */
.why-matters {
  margin: 2rem 0;
  padding: 1.5rem;
  border-left: 4px solid var(--link-color-solid);
  background: linear-gradient(
    135deg,
    var(--accent-gradient-current-faded, rgba(0, 204, 255, 0.05)) 0%,
    transparent 100%
  );
  border-radius: var(--border-radius-small);
}

.why-matters h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  color: var(--link-color-solid);
  font-weight: 600;
}

.why-matters p {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.why-matters p:last-child {
  margin-bottom: 0;
}

.why-matters a {
  color: var(--link-color-solid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.why-matters a:hover {
  color: var(--link-hover-color-solid);
  text-decoration-thickness: 2px;
}

/* Article Navigation */
.article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px dashed var(--border-color);
  gap: 1rem;
}

.article-nav a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-color-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.2s ease;
  max-width: 45%;
}

.article-nav a:hover {
  background: rgba(0, 255, 255, 0.05);
  border-color: var(--cyan-accent);
  color: var(--cyan-accent);
  transform: translateX(2px);
  border-style: dotted;
}

.article-nav a:first-child:hover {
  transform: translateX(-2px);
}

.article-nav a.nav-prev {
  margin-right: auto;
}

.article-nav a.nav-next {
  margin-left: auto;
  text-align: right;
}

/* Responsive article styles */
@media (min-width: 768px) {
  article {
    padding: var(--padding-large);
  }
  article h2 {
    font-size: 1.75rem;
  }
  article h3 {
    font-size: 1.5rem;
  }
  article h4 {
    font-size: 1.2rem;
  }
  article th,
  article td {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  .article-nav {
    flex-direction: column;
    gap: 0.75rem;
  }

  .article-nav a {
    max-width: 100%;
    width: 100%;
    justify-content: center;
  }

  .article-nav a.nav-prev,
  .article-nav a.nav-next {
    margin: 0;
    text-align: center;
  }
}
