/* =========================================
   Article Detail Page (Note-like Prose Style)
   Scope: .generated-article-page .article-container
   ========================================= */

/* --- Container & Layout --- */
.generated-article-page .article-container {
  padding-top: 100px;
  /* Clear fixed header (~70px) + buffer */
  padding-bottom: var(--space-4xl);
  max-width: 760px;
  /* Enhanced readability width (was 800px) */
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.generated-article-page .article-header {
  margin-bottom: var(--space-xl);
  text-align: left;
}

.generated-article-page .article-header h1 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--space-md);
  color: var(--text-color-primary);
  letter-spacing: 0.05em;
}

.generated-article-page .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  color: var(--text-color-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-lg);
}

/* --- Article Body Prose --- */
.generated-article-page .article-body {
  font-size: 17px;
  /* Base size 16-18px */
  line-height: 1.9;
  /* Ease of reading 1.8-2.0 */
  color: var(--text-color-primary);
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  letter-spacing: 0.03em;
  word-break: break-all;
}

/* --- Headings --- */
.generated-article-page .article-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 3.5rem;
  /* Clear separation */
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color-light);
  line-height: 1.4;
  scroll-margin-top: 100px;
  /* Fixed header offset */
}

.generated-article-page .article-body h3 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  scroll-margin-top: 100px;
  /* Fixed header offset */
}

/* --- Paragraphs --- */
.generated-article-page .article-body p {
  margin-bottom: 1.8rem;
  /* Distinct paragraphs */
}

/* --- Lists --- */
.generated-article-page .article-body ul,
.generated-article-page .article-body ol {
  margin-bottom: 1.8rem;
  padding-left: 1.5rem;
}

.generated-article-page .article-body li {
  margin-bottom: 0.5rem;
}

.generated-article-page .article-body li::marker {
  color: var(--primary-color);
}

/* --- Blockquotes --- */
.generated-article-page .article-body blockquote {
  border-left: 4px solid var(--primary-color);
  background-color: #f7f9fa;
  /* Light background */
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  color: #4a5568;
  /* Muted text */
  border-radius: 4px;
}

.generated-article-page .article-body blockquote p:last-child {
  margin-bottom: 0;
}

/* --- Links --- */
.generated-article-page .article-body a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: all 0.2s ease;
}

.generated-article-page .article-body a:hover {
  color: var(--primary-color-dark);
  text-decoration-thickness: 2px;
}

/* --- Images --- */
.generated-article-page .article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  /* Soft shadow */
  display: block;
}

/* --- Code & Pre --- */
.generated-article-page .article-body code {
  background-color: #f1f3f5;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  font-size: 0.9em;
  color: #cc0000;
}

.generated-article-page .article-body pre {
  background-color: #2d3748;
  color: #f7fafc;
  padding: 1.2rem;
  border-radius: 8px;
  margin: 2rem 0;
  overflow-x: auto;
  line-height: 1.5;
}

.generated-article-page .article-body pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.95em;
}

/* --- Tables --- */
.generated-article-page .article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.generated-article-page .article-body th,
.generated-article-page .article-body td {
  padding: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.generated-article-page .article-body th {
  background-color: #f7fafc;
  font-weight: 700;
  color: #4a5568;
}

/* Responsive Table Wrapper (if needed via JS or markdown wrap) */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 2rem;
}

/* --- Separators --- */
.generated-article-page .article-body hr {
  border: 0;
  height: 1px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
  margin: 3rem 0;
}

/* --- CTA Block --- */
.generated-article-page .article-cta-block {
  margin-top: 4rem;
  padding: 2.5rem;
  background-color: var(--background-color-light);
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border-color);
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
  .generated-article-page .article-container {
    padding-top: 100px;
    /* Clear fixed header (~70px) + extra space */
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .generated-article-page .article-header h1 {
    font-size: 24px;
  }

  .generated-article-page .article-body {
    font-size: 16px;
    line-height: 1.8;
  }

  .generated-article-page .article-body h2 {
    font-size: 22px;
    margin-top: 2.5rem;
  }

  .generated-article-page .article-body h3 {
    font-size: 19px;
  }
}