/* Editorial treatment for Equilens long-form notes.
   Scoped to .article-page so the shared site system remains unchanged. */

.article-page .note-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(4.5rem, 8vw, 6.5rem);
  overflow: visible;
  background:
    linear-gradient(180deg, var(--color-white) 0%, var(--color-primary-a08) 100%);
  border-bottom: 1px solid var(--border-light);
}

.article-page .note-hero .hero-content {
  max-width: 66rem;
  padding: var(--space-8) var(--space-8);
}

.article-page .note-hero .eyebrow {
  margin: 0 0 var(--space-6);
  color: var(--color-primary-text);
  letter-spacing: var(--tracking-widest);
}

.article-page .note-hero .hero-headline {
  max-width: 22ch;
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.article-page .note-hero .lead {
  max-width: 58ch;
  margin-top: var(--space-6);
  margin-bottom: 0;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.55;
}

.article-page .note-shell {
  padding: 0 0 clamp(3.5rem, 7vw, 5.5rem);
  background: var(--bg-subtle);
}

.article-page .article-prose {
  position: relative;
  z-index: 2;
  width: calc(100% - var(--space-12));
  max-width: 56rem;
  margin-top: calc(-1 * var(--space-8));
  padding: clamp(3rem, 6vw, 4.75rem) clamp(2.5rem, 6vw, 5rem);
  border-color: var(--border-default);
  box-shadow: 0 24px 60px -44px rgba(15, 23, 42, 0.38);
}

.article-page .article-intro,
.article-page .article-step,
.article-page .article-output,
.article-page .article-offer,
.article-page .article-sources {
  width: 100%;
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

.article-page .article-prose p {
  max-width: none;
  margin-top: 0;
  margin-bottom: var(--space-5);
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.78;
}

.article-page .article-intro {
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--border-default);
}

.article-page .article-intro .article-opening {
  margin-bottom: var(--space-6);
  padding-left: var(--space-5);
  border-left: 3px solid var(--color-primary);
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: 1.5;
  letter-spacing: var(--tracking-tight);
}

.article-page .article-intro > :last-child,
.article-page .article-step > :last-child,
.article-page .article-output > :last-child,
.article-page .article-offer > :last-child,
.article-page .article-sources > :last-child {
  margin-bottom: 0;
}

.article-page .article-step {
  padding-top: var(--space-10);
}

.article-page .article-step + .article-step {
  margin-top: var(--space-10);
  border-top: 1px solid var(--border-light);
}

.article-page .article-step h2 {
  display: grid;
  grid-template-columns: var(--space-12) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  max-width: none;
  margin: 0 0 var(--space-6);
  color: var(--text-primary);
  font-size: 1.625rem;
  line-height: 1.2;
}

.article-page .article-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-12);
  height: var(--space-12);
  border: 1px solid var(--color-primary-a15);
  border-radius: var(--radius-md);
  background: var(--color-primary-a08);
  color: var(--color-primary-text);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-normal);
}

.article-page .article-step ul,
.article-page .article-output ul {
  max-width: none;
  margin: var(--space-5) 0 var(--space-6);
  padding: 0;
  list-style: none;
}

.article-page .article-step li,
.article-page .article-output li {
  position: relative;
  margin-bottom: var(--space-2);
  padding-left: var(--space-6);
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.article-page .article-step li::before,
.article-page .article-output li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: var(--space-1);
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
}

.article-page .article-output {
  margin-top: var(--space-12);
  padding: var(--space-8);
  border: 1px solid var(--color-primary-a15);
  border-radius: var(--radius-lg);
  background: var(--color-primary-a08);
}

.article-page .article-output h2 {
  max-width: none;
  margin: 0 0 var(--space-5);
  color: var(--text-primary);
  font-size: var(--text-2xl);
  line-height: 1.25;
}

.article-page .article-output p,
.article-page .article-output li {
  color: var(--text-primary);
}

.article-page .article-offer {
  margin-top: var(--space-10);
  padding: var(--space-6);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--color-white);
}

.article-page .article-offer .note {
  margin: 0;
  padding: 0;
  border-top: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.article-page .article-offer .cta-row {
  max-width: none;
  margin: var(--space-6) 0 0;
  gap: var(--space-3);
}

.article-page .article-sources {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-default);
}

.article-page .article-sources h2 {
  max-width: none;
  margin: 0 0 var(--space-5);
  font-size: var(--text-xl);
  line-height: 1.3;
}

.article-page .article-sources ul {
  max-width: none;
  margin: 0;
  padding-left: var(--space-5);
}

.article-page .article-sources li {
  margin-bottom: var(--space-3);
  padding-left: var(--space-1);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .article-page .note-hero {
    padding: var(--space-6) 0 var(--space-16);
  }

  .article-page .note-hero .hero-content {
    padding: var(--space-6) var(--space-4);
  }

  .article-page .note-hero .eyebrow {
    margin-bottom: var(--space-5);
    font-size: var(--text-xs);
  }

  .article-page .note-hero .hero-headline {
    max-width: 18ch;
    font-size: 2.125rem;
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  .article-page .note-hero .lead {
    max-width: 31ch;
    margin-top: var(--space-4);
    font-size: 1.0625rem;
    line-height: 1.5;
  }

  .article-page .article-prose {
    width: calc(100% - var(--space-4));
    margin-top: calc(-1 * var(--space-6));
    padding: var(--space-8) var(--space-5) var(--space-10);
    border-radius: var(--radius-md);
  }

  .article-page .article-prose p,
  .article-page .article-step li,
  .article-page .article-output li {
    font-size: var(--text-base);
    line-height: 1.72;
  }

  .article-page .article-intro {
    padding-bottom: var(--space-8);
  }

  .article-page .article-intro .article-opening {
    padding-left: var(--space-4);
    font-size: var(--text-lg);
  }

  .article-page .article-step {
    padding-top: var(--space-8);
  }

  .article-page .article-step + .article-step {
    margin-top: var(--space-8);
  }

  .article-page .article-step h2 {
    grid-template-columns: var(--space-10) minmax(0, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    font-size: var(--text-2xl);
  }

  .article-page .article-step-number {
    width: var(--space-10);
    height: var(--space-10);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
  }

  .article-page .article-step ul,
  .article-page .article-output ul {
    margin: var(--space-4) 0 var(--space-5);
  }

  .article-page .article-output {
    margin-top: var(--space-10);
    padding: var(--space-5);
    border-radius: var(--radius-md);
  }

  .article-page .article-output h2 {
    font-size: var(--text-xl);
  }

  .article-page .article-offer {
    margin-top: var(--space-8);
    padding: var(--space-5);
    border-radius: var(--radius-md);
  }

  .article-page .article-offer .cta-row {
    align-items: stretch;
  }

  .article-page .article-offer .btn {
    width: 100%;
  }

  .article-page .article-sources {
    margin-top: var(--space-10);
    padding-top: var(--space-6);
  }
}

@media print {
  .article-page .note-hero,
  .article-page .note-shell,
  .article-page .article-output {
    background: var(--color-white) !important;
  }

  .article-page .article-prose {
    width: 100%;
    margin-top: 0;
    box-shadow: none;
  }

  .article-page .article-step,
  .article-page .article-output,
  .article-page .article-offer {
    break-inside: avoid;
  }
}
