/*
 * Elevven11 Blog. Sits on top of /assets/style.css and /tools/assets/tools.css,
 * reusing their tokens, cards, chips and prose styles.
 */

.blog-page .b-head { padding-bottom: 0; }
.blog-page .b-head h1 { max-width: 760px; line-height: 1.15; }
.b-byline { color: var(--text-muted); font-size: 0.92rem; }
.blog-page .b-body { padding-top: 1.5rem; }

.b-prose { font-size: 1.06rem; line-height: 1.75; }
.b-prose h3 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; color: var(--text-primary); }
.b-prose > p:first-child { font-size: 1.15rem; color: var(--text-primary); }
.b-prose p + p { margin-top: 1rem; }
.b-prose ul, .b-prose ol { padding-left: 1.3rem; margin: 0.75rem 0 1rem; }
.b-prose ul { list-style: disc; }
.b-prose ol { list-style: decimal; }
.b-prose li::marker { color: var(--accent-gold); }
.b-prose em { color: var(--text-primary); }
.b-prose code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.9em;
  padding: 0.1rem 0.35rem; border-radius: 6px; background: var(--bg-tertiary); color: var(--text-primary);
}
.b-prose .b-code {
  margin: 1.25rem 0; padding: 1rem 1.25rem; overflow-x: auto; border-radius: var(--border-radius);
  background: var(--bg-secondary); border: var(--border-subtle); line-height: 1.55;
}
.b-prose .b-code code { padding: 0; background: none; font-size: 0.9rem; white-space: pre; }
.b-prose .b-code:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.b-prose blockquote {
  margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 3px solid var(--accent-gold);
  background: var(--bg-secondary); border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
.b-prose blockquote p { color: var(--text-primary); margin: 0; }

.b-table { overflow-x: auto; margin: 1.25rem 0; border: var(--border-subtle); border-radius: var(--border-radius); }
.b-table:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.b-table table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.b-table th, .b-table td { padding: 0.65rem 0.9rem; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.b-table th { color: var(--text-primary); background: var(--bg-secondary); font-weight: 700; white-space: nowrap; }
.b-table td { color: var(--text-secondary); }
.b-table tr:last-child td { border-bottom: 0; }

.b-share { max-width: 760px; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--hairline); }
.b-share-label { font-size: 1rem; margin-bottom: 0.75rem; }
.b-share-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.b-share-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: transparent; color: var(--text-secondary); border: 1px solid var(--hairline); cursor: pointer; font: inherit;
  transition: var(--transition-fast);
}
.b-share-btn svg { width: 20px; height: 20px; }
.b-share-btn:hover { color: var(--text-primary); border-color: var(--accent-gold); background: rgba(var(--accent-rgb), 0.1); }
.b-share-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.b-share-btn[hidden] { display: none; }
.b-share-status { min-height: 1.4em; margin-top: 0.5rem; font-size: 0.88rem; color: var(--accent-gold); }

/* ---- reader state ---- */
.b-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1100; pointer-events: none; }
.b-progress span { display: block; height: 100%; background: var(--accent-gold); transform: scaleX(0); transform-origin: left; }
.b-resume {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 1000;
  min-height: 44px; padding: 0.55rem 1.25rem; border-radius: 30px; cursor: pointer; font: inherit; font-size: 0.92rem; font-weight: 700;
  background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--accent-gold); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.b-resume:hover { background: var(--bg-tertiary); }
.b-resume:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.b-state { margin-left: 0.5rem; padding: 0.1rem 0.5rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); border: 1px solid var(--hairline); }
.b-state.is-done { color: var(--accent-gold); border-color: rgba(var(--accent-rgb), 0.4); }
.b-card.is-read h2, .b-card.is-read h3 { color: var(--text-secondary); }

@media (prefers-reduced-motion: no-preference) {
  .b-progress span { transition: transform 0.1s linear; }
}
@media print {
  .b-progress, .b-resume, .b-share { display: none !important; }
}

.b-card .t-cat { order: -1; }
.b-card .b-meta { font-size: 0.82rem; color: var(--text-muted); }

@media (max-width: 520px) {
  .b-prose { font-size: 1rem; }
  .b-prose > p:first-child { font-size: 1.08rem; }
}
