/* Knowledge article detail v2: editorial pass.
 * Editorial hero, drop cap, refined body typography, reading progress.
 * Layered AFTER knowledge-article-listing.css. */

/* ---------- Reading progress bar ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  z-index: 200;
  pointer-events: none;
}
.reading-progress::before {
  content: '';
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--coral, #FF8A73), #f57862);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .reading-progress::before {
    animation: read-progress linear;
    animation-timeline: scroll(root);
  }
}
@keyframes read-progress {
  to { transform: scaleX(1); }
}

/* ---------- Editorial article header ---------- */
.article-header {
  text-align: left;
  margin-bottom: 2.5rem;
}
.article-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral, #FF8A73);
  margin-bottom: 1.1rem;
}
.article-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.article-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--charcoal, #2B2B2B);
  margin-bottom: 1.25rem;
  font-variation-settings: "opsz" 96;
  max-width: 22ch;
}
.article-lede {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.55;
  color: #5a5a5a;
  max-width: 56ch;
  margin: 0 0 2rem;
}

.article-image {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 2rem !important;
  border-radius: 18px !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: 0 24px 60px -28px rgba(43, 43, 43, 0.28) !important;
}

/* Refined meta line: one row, separated dots */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(43, 43, 43, 0.08);
  border-bottom: 1px solid rgba(43, 43, 43, 0.08);
}
.article-meta p {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 0.85rem;
}
.article-meta p + p::before {
  content: '·';
  margin: 0 0.75rem;
  color: #ccc;
}
.article-meta strong {
  font-weight: 500;
  color: #5a5a5a;
  margin-right: 0.35rem;
}
.article-meta time {
  color: var(--charcoal, #2B2B2B);
  font-weight: 500;
}
.article-meta .reading-time {
  color: var(--coral, #FF8A73);
  font-weight: 600;
}

/* Share buttons: editorial ghost style, left-aligned */
.article-header .share-buttons {
  justify-content: flex-start;
  margin: 0 0 1rem;
  gap: 0.6rem;
}
.article-header .share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid rgba(43, 43, 43, 0.14);
  background: #fff;
  color: var(--charcoal, #2B2B2B);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  transform: none !important;
}
.article-header .share-btn:hover {
  background: var(--charcoal, #2B2B2B);
  border-color: var(--charcoal, #2B2B2B);
  color: #fff;
}
.article-header .share-btn.share-native {
  background: var(--coral, #FF8A73);
  border-color: var(--coral, #FF8A73);
  color: #fff;
  display: none;
}
.article-header .share-btn.share-native:hover {
  background: #f57862;
  border-color: #f57862;
}

@media (max-width: 768px) {
  .article-header h1 {
    font-size: clamp(1.85rem, 7vw, 2.5rem);
    max-width: none;
  }
  .article-lede { font-size: 1.05rem; }
  .article-meta { font-size: 0.78rem; gap: 0.4rem; }
  .article-meta p + p::before { margin: 0 0.4rem; }
}

/* ---------- Body typography ---------- */
.article-content {
  padding: 2.25rem 2.5rem !important;
  background: #fff;
  border-radius: 18px !important;
  border: 1px solid rgba(43, 43, 43, 0.06) !important;
  box-shadow: 0 4px 24px -8px rgba(43, 43, 43, 0.06) !important;
}

/* Drop cap on first paragraph */
.article-content > p:first-of-type::first-letter {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 4.5rem;
  line-height: 0.85;
  float: left;
  margin: 0.45rem 0.7rem -0.05rem 0;
  color: var(--coral, #FF8A73);
}

/* Headings refined */
.article-content h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 3rem 0 1.1rem;
  font-variation-settings: "opsz" 36;
}
.article-content h2:first-child {
  margin-top: 0;
}
.article-content h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.75rem;
  letter-spacing: -0.005em;
}

/* Body text */
.article-content p {
  font-size: 1.075rem;
  line-height: 1.78;
  color: #2f2f2f;
  margin-bottom: 1.25rem;
  max-width: 68ch;
}

/* Lists */
.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}
.article-content li {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #2f2f2f;
  margin-bottom: 0.55rem;
  max-width: 65ch;
}
.article-content ul > li::marker {
  color: var(--coral, #FF8A73);
}
.article-content ol > li::marker {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  color: var(--coral, #FF8A73);
}

/* Editorial blockquote (skip rule for callout divs that misuse blockquote-like padding) */
.article-content blockquote {
  border-left: 3px solid var(--coral, #FF8A73) !important;
  background: none !important;
  border-radius: 0 !important;
  padding: 0.25rem 0 0.25rem 1.6rem !important;
  margin: 2rem 0 !important;
  font-family: 'Fraunces', serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: 1.35rem !important;
  line-height: 1.55 !important;
  color: var(--charcoal, #2B2B2B) !important;
  max-width: 60ch !important;
}
.article-content blockquote p {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  font-style: inherit;
  margin: 0 0 0.5rem;
}
.article-content blockquote p:last-child { margin-bottom: 0; }

/* Inline links: subtle underline, coral on hover */
.article-content a {
  color: var(--charcoal, #2B2B2B);
  text-decoration: underline;
  text-decoration-color: rgba(255, 138, 115, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: text-decoration-color 0.2s, color 0.2s;
}
.article-content a:hover {
  color: var(--coral, #FF8A73);
  text-decoration-color: var(--coral, #FF8A73);
}

/* Snippet zone refinement */
.snippet-zone {
  background: var(--cream, #FFF8F0) !important;
  border: 0 !important;
  border-left: 3px solid var(--sage, #B4C7A8) !important;
  border-radius: 0 14px 14px 0 !important;
  padding: 1.1rem 1.5rem !important;
  margin-bottom: 2rem !important;
}
.snippet-zone p {
  font-size: 1.05rem !important;
  line-height: 1.65 !important;
  font-weight: 500 !important;
}

/* Tables: refined */
.article-content table {
  border-radius: 10px !important;
  border: 1px solid rgba(43, 43, 43, 0.08) !important;
  font-size: 0.95rem !important;
}
.article-content th {
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  background: var(--soft-gray, #F5F2EE) !important;
  border-color: rgba(43, 43, 43, 0.06) !important;
}
.article-content td {
  border-color: rgba(43, 43, 43, 0.06) !important;
}

@media (max-width: 768px) {
  .article-content {
    padding: 1.5rem !important;
  }
  .article-content > p:first-of-type::first-letter {
    font-size: 3.5rem;
    margin-right: 0.5rem;
  }
  .article-content p,
  .article-content li {
    font-size: 1rem;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reading-progress::before {
    animation: none !important;
    transform: scaleX(0);
  }
}
