/* Insights article — registry design */

.article-back-wrap {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 26px 32px 0;
}

.article-back {
  color: var(--hp-muted2);
  font-weight: 500;
  font-size: 13px;
}

.article-back:hover {
  color: var(--hp-text);
}

.article-header {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 18px 32px 0;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--hp-accent-fg);
  background: var(--hp-accent-tint);
  border-radius: 4px;
  padding: 3px 8px;
  letter-spacing: 0.04em;
}

.article-meta {
  font-family: var(--hp-mono);
  font-size: 12px;
  color: var(--hp-muted2);
}

.article-header h1 {
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--hp-text);
}

.article-deck {
  margin: 0 0 22px;
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 21px);
  line-height: 1.5;
  color: var(--hp-muted);
}

.article-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.article-tag {
  font-size: 12px;
  color: var(--hp-muted);
  background: var(--hp-surface2);
  border-radius: 99px;
  padding: 4px 11px;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--hp-border);
  border-bottom: 1px solid var(--hp-border);
}

.article-avatar {
  width: 40px;
  height: 40px;
  border-radius: 99px;
  background: var(--hp-surface2);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--hp-muted);
  flex: none;
  font-size: 13px;
}

.article-byline__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-text);
}

.article-byline__sub {
  font-size: 12.5px;
  color: var(--hp-muted2);
}

.article-share {
  font-size: 13px;
  font-weight: 600;
  color: var(--hp-accent);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--hp-font);
  margin-left: auto;
}

.article-cover-wrap {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 24px 32px 0;
}

.article-cover {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--hp-border);
  overflow: hidden;
}

.article-main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  padding: 40px 32px 56px;
  justify-content: center;
}

.article-prose {
  max-width: 700px;
  width: 100%;
  justify-self: end;
  min-width: 0;
}

.article-prose h2 {
  font-family: var(--hp-font);
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 44px 0 14px;
  scroll-margin-top: 80px;
  color: var(--hp-text);
  font-weight: 700;
}

.article-prose h3 {
  font-family: var(--hp-font);
  font-size: 18px;
  margin: 28px 0 8px;
  color: var(--hp-text);
  font-weight: 600;
}

.article-prose p {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 19px;
  line-height: 1.62;
  color: var(--hp-near);
  margin: 0 0 18px;
}

.article-prose li {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 19px;
  line-height: 1.55;
  color: var(--hp-near);
  margin: 0 0 8px;
}

.article-prose ul,
.article-prose ol {
  margin: 0 0 18px 1.25em;
  padding: 0;
}

.article-prose strong {
  font-weight: 600;
  color: var(--hp-text);
}

.article-prose em {
  font-style: italic;
}

.article-prose a {
  color: var(--hp-link);
}

.article-prose code {
  font-family: var(--hp-mono);
  font-size: 15px;
  background: var(--hp-surface2);
  padding: 1px 6px;
  border-radius: 4px;
}

.article-prose pre {
  background: var(--hp-surface2);
  border: 1px solid var(--hp-border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 18px;
}

.article-prose pre code {
  background: none;
  padding: 0;
  font-size: 13.5px;
}

.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14.5px;
}

.article-prose th {
  text-align: left;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 2px solid var(--hp-text);
  font-family: var(--hp-font);
  color: var(--hp-text);
}

.article-prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hp-border);
  vertical-align: top;
  color: var(--hp-near);
  font-family: 'Newsreader', Georgia, serif;
}

.article-prose td:first-child {
  font-weight: 600;
  color: var(--hp-text);
  font-family: var(--hp-font);
}

.article-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--hp-border);
  margin: 1.5rem 0;
}

.article-pullquote {
  background: var(--hp-surface2);
  border-left: 3px solid var(--hp-accent);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 28px 0;
}

.article-pullquote__label {
  font-family: var(--hp-font);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--hp-text);
}

.article-pullquote__body {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--hp-near);
}

.article-author {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 0;
  border-top: 1px solid var(--hp-border);
}

.article-author__avatar {
  width: 48px;
  height: 48px;
  border-radius: 99px;
  background: var(--hp-surface2);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--hp-muted);
  flex: none;
}

.article-author__name {
  font-family: var(--hp-font);
  font-size: 15px;
  font-weight: 600;
  color: var(--hp-text);
}

.article-author__bio {
  font-family: var(--hp-font);
  font-size: 13.5px;
  color: var(--hp-muted2);
  line-height: 1.5;
  margin-top: 2px;
}

.article-feedback {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--hp-border);
  border-bottom: 1px solid var(--hp-border);
  font-family: var(--hp-font);
  flex-wrap: wrap;
}

.article-feedback__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-text);
}

.article-vote {
  font-size: 13.5px;
  font-weight: 600;
  border: 1.5px solid var(--hp-border2);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  background: var(--hp-card);
  color: var(--hp-muted);
  font-family: var(--hp-font);
}

.article-vote:hover {
  border-color: var(--hp-text);
}

.article-vote.is-up {
  color: #16a34a;
  border-color: #16a34a;
}

.article-vote.is-down {
  color: #dc2626;
  border-color: #dc2626;
}

.article-comments {
  margin-top: 28px;
}

.article-comments h3 {
  font-size: 16px;
  margin: 0 0 12px;
}

.article-comments input,
.article-comments textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--hp-font);
  font-size: 14px;
  border: 1px solid var(--hp-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--hp-card);
  color: var(--hp-text);
  margin-bottom: 8px;
}

.article-comments textarea {
  min-height: 100px;
  resize: vertical;
}

.article-toc {
  width: 240px;
}

.article-toc__sticky {
  position: sticky;
  top: 80px;
}

.article-toc__label {
  font-family: var(--hp-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hp-faint);
  margin-bottom: 12px;
}

.article-toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid var(--hp-border);
}

.article-toc__list a {
  font-size: 13px;
  color: var(--hp-muted2);
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
}

.article-toc__list a:hover {
  color: var(--hp-text);
  border-left-color: var(--hp-text);
}

.article-related {
  border-top: 1px solid var(--hp-border);
  background: var(--hp-surface);
}

.article-related__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 32px;
}

.article-related h2 {
  margin: 0 0 20px;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--hp-text);
}

.article-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.article-related-card {
  background: var(--hp-card);
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.article-related-card:hover {
  border-color: #b9bcc9;
  box-shadow: 0 2px 8px rgba(22, 24, 29, 0.06);
  color: inherit;
}

.article-related-card__date {
  font-family: var(--hp-mono);
  font-size: 11.5px;
  color: var(--hp-faint);
  margin-bottom: 8px;
}

.article-related-card__title {
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--hp-text);
}

.article-related-card__excerpt {
  font-size: 13px;
  color: var(--hp-muted2);
  line-height: 1.5;
}

@media (max-width: 960px) {
  .article-main {
    grid-template-columns: 1fr;
    padding: 32px 20px 48px;
  }

  .article-prose {
    justify-self: stretch;
    max-width: none;
  }

  .article-toc {
    display: none;
  }

  .article-related__grid {
    grid-template-columns: 1fr;
  }

  .article-header,
  .article-back-wrap,
  .article-cover-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
}
