/* ─── Reading progress bar ─── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--amber);
  z-index: 100;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ─── Article page layout ─── */

/* Wrapper */
.article-wrapper { background: var(--soft); min-height: calc(100vh - 53px); overflow-x: hidden; }
.article-container { max-width: 680px; margin: 0 auto; padding: 64px 24px 96px; }

/* ─── Meta row (tags + date) ─── */
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.article-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--amber);
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
}
.article-meta-date {
  color: #767676;
  font-weight: 500;
  font-size: 13px;
}

/* ─── Series badge ─── */
.article-series-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(184,107,16,0.06);
  border: 1px solid rgba(184,107,16,0.18);
  border-radius: 5px;
  padding: 5px 12px;
  margin-bottom: 32px;
}

/* ─── Title ─── */
.article-title {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  color: var(--black);
}

/* ─── Lead ─── */
.article-lead {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.7;
  color: #2a2a2a;
  margin: 0 0 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

/* ─── Body ─── */
.article-body {
  font-size: 18px;
  line-height: 1.7;
  color: #2a2a2a;
}
.article-body h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 48px 0 20px;
  color: var(--black);
}
.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
  color: var(--black);
}
.article-body p { margin: 0 0 28px; }
.article-body strong { font-weight: 700; color: var(--black); }
.article-body em { font-style: italic; }
.article-body a { color: var(--amber); }
.article-body a:hover { text-decoration: underline; }

/* ─── Blockquote / prompt ─── */
.article-body blockquote {
  margin: 0 0 28px;
  padding: 20px 24px;
  background: rgba(184,107,16,0.05);
  border-left: 3px solid var(--amber);
  border-radius: 0 6px 6px 0;
  font-size: 16px;
  line-height: 1.65;
  color: #444;
  font-style: italic;
}
.article-body blockquote.prompt {
  position: relative;
  padding-right: 80px;
  font-style: normal;
}

/* ─── Code block (monospace content inside prompt blockquote) ─── */
.article-body blockquote.prompt.code {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ─── Copy button ─── */
.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.copy-btn:hover, .copy-btn.copied { border-color: var(--amber); color: var(--amber); }

/* ─── Article note (aside) ─── */
.article-note {
  background: white;
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  padding: 18px 22px;
  margin: 0 0 28px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #444;
}
.article-note-label {
  display: block;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 8px;
  font-size: 14px;
}

/* ─── Takeaway ─── */
.takeaway {
  margin-top: 40px;
  padding: 24px 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.takeaway-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}
.takeaway p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--black);
  margin: 0;
}

/* ─── Table ─── */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}
.article-body table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--soft);
}
.article-body table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: #333;
  vertical-align: top;
  font-size: 14px;
}
.article-body table td:first-child { font-weight: 600; color: var(--black); }
.article-body table tr:last-child td { border-bottom: none; }

/* ─── Q&A / Útravaló ─── */
.article-qa {
  margin-top: 56px;
  padding: 30px 32px;
  background: rgba(184, 107, 16, 0.06);
  border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
  border-radius: 12px;
}
.article-qa > h2 {
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 22px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.article-qa .qa-items { margin: 0; }
.article-qa .qa-item { margin-bottom: 22px; }
.article-qa .qa-item:last-child { margin-bottom: 0; }
.article-qa .qa-item h3 {
  font-weight: 600;
  color: var(--black);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 6px;
}
.article-qa .qa-item p {
  margin: 0;
  padding: 0;
  color: #444;
  font-size: 15.5px;
  line-height: 1.65;
}

/* ─── Sources ─── */
.article-sources {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.article-sources h2 {
  font-size: 13px;
  font-weight: 600;
  color: #767676;
  margin-bottom: 14px;
}
.article-sources ol {
  font-size: 13.5px;
  line-height: 1.8;
  color: #767676;
  padding-left: 20px;
  margin: 0;
}
.article-sources li { margin-bottom: 4px; }
.article-sources a { color: var(--amber); }
.article-sources a:hover { text-decoration: underline; }

/* ─── Series nav ─── */
.article-series-nav {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.series-nav-prev,
.series-nav-next {
  font-size: 14px;
  font-weight: 500;
  color: var(--amber);
  text-decoration: none;
}
.series-nav-prev:hover,
.series-nav-next:hover { text-decoration: underline; }
.series-nav-next { margin-left: auto; text-align: right; }

/* ─── Related notes ─── */
.related-notes {
  margin-top: 56px;
  padding: 28px 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.related-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 16px;
}
.related-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.related-links a {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  line-height: 1.5;
}
.related-links a:hover { color: var(--amber); }

/* ─── Mobile ─── */
@media (max-width: 860px) {
  .article-container { padding: 40px 20px 72px; }
  .article-body { font-size: 17px; }
  .article-body h2 { font-size: 22px; }
}
