/* ============================================================
   r10.wtf — article.css
   Reading view styles
   ============================================================ */

[hidden] { display: none !important; }

.article-page .bg-scan { animation-duration: 24s; }

.article-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Loading / Error */
.article-loading,
.article-error {
  padding: 40px 0;
  font-size: 14px;
}
.article-error:not([hidden]) { display: flex; flex-direction: column; gap: 16px; }

/* ── Article Header ── */
.article-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-date {
  font-size: 12px;
}

.article-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.article-tag {
  font-size: 10px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 2px;
}

.article-title {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 500;
  color: var(--me);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 0 0 20px color-mix(in oklab, var(--me) 25%, transparent);
  margin-bottom: 16px;
}

.article-excerpt {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 0;
}

.article-cover-wrap {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.article-cover {
  width: 100%;
  height: auto;
  display: block;
  max-height: 500px;
  object-fit: cover;
}

/* ── Article Body ── */
.article-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

/* Typography */
.article-body h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--me);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.article-body h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin: 28px 0 12px;
}

.article-body h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  margin: 20px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body a {
  color: var(--me);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--me) 40%, transparent);
  transition: border-color 0.15s;
}
.article-body a:hover { border-color: var(--me); }

.article-body strong { color: var(--ink); font-weight: 500; }
.article-body em     { color: var(--ink-2); font-style: italic; }

/* Code */
.article-body code {
  font-family: var(--font);
  font-size: 13px;
  background: var(--bg-2);
  color: var(--gold);
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.article-body pre {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
  position: relative;
}
.article-body pre::before {
  content: '$ ';
  color: var(--muted);
}
.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  font-size: 13px;
}

/* Blockquote */
.article-body blockquote {
  border-left: 3px solid var(--me);
  margin: 24px 0;
  padding: 12px 20px;
  background: color-mix(in oklab, var(--me) 5%, transparent);
  color: var(--ink-2);
  font-style: italic;
}

/* Lists */
.article-body ul,
.article-body ol {
  margin: 0 0 20px 24px;
}
.article-body li { margin-bottom: 6px; }
.article-body li::marker { color: var(--me); }

/* Images — no border */
.article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 2px;
}

/* Carousel (injected by Quill custom block) */
.article-body .carousel {
  position: relative;
  margin: 32px 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform 0.35s ease;
}
.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}
.carousel-slide img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  margin: 0;
  border: none;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border: 1px solid var(--line);
  color: var(--me);
  font-family: var(--font);
  font-size: 18px;
  cursor: pointer;
  padding: 8px 14px;
  transition: background 0.15s;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.carousel-btn:hover { background: var(--me); color: var(--bg); }
.carousel-btn--prev { left: 8px; }
.carousel-btn--next { right: 8px; }
.carousel-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--ink-2);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  padding: 2px 8px;
  border-radius: 2px;
  backdrop-filter: blur(4px);
}

/* ── Neutralize WP inline color classes ── */
.article-body mark,
.article-body [class*="has-inline-color"],
.article-body [class*="has-primary-color"],
.article-body [class*="has-contrast-color"],
.article-body [class*="has-text-color"] {
  background-color: transparent !important;
  color: inherit !important;
}

/* WP paragraph classes — strip layout alignment */
.article-body [class*="has-text-align-center"] { text-align: center; }

/* Download link */
.article-body .article-download,
.article-body a[download] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  border: 1px solid color-mix(in oklab, var(--gold) 40%, transparent);
  padding: 6px 14px;
  font-size: 13px;
  text-decoration: none;
  margin: 12px 0;
  transition: background 0.15s, color 0.15s;
}
.article-body a[download]:hover { background: var(--gold); color: var(--bg); }

/* Audio player */
.article-body audio {
  width: 100%;
  margin: 12px 0;
  filter: invert(1) hue-rotate(200deg) brightness(0.85);
  border-radius: 2px;
}

/* iframes (YouTube etc.) */
.article-body iframe {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 24px auto;
  border: none;
  aspect-ratio: 16/9;
  height: auto;
}

/* Content fade-in */
#article-content {
  animation: article-fadein 0.3s ease both;
}
@keyframes article-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* HR */
.article-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 13px;
}
.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
}
.article-body th {
  background: var(--bg-2);
  color: var(--ink-2);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.article-body tr:hover td { background: color-mix(in oklab, var(--me) 5%, transparent); }

/* ── Article Footer ── */
.article-footer {
  margin-top: 60px;
  padding-top: 24px;
}

.article-footer-rule { margin-bottom: 20px; }

.article-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.article-back {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px dashed var(--line);
  transition: color 0.15s;
}
.article-back:hover { color: var(--me); }

.article-footer-sig { font-size: 13px; }

/* Nav home link */
.nav-home {
  text-decoration: none;
  color: inherit;
}

/* ── Mobile ── */
@container brroot (max-width: 720px) {
  .article-main { padding: 24px 14px 60px; }
  .article-title { font-size: 22px; }
  .article-body  { font-size: 14px; }
  .article-body pre { padding: 14px; }
}

/* ── EditorJS block rendering ── */
.img-block { margin: 24px 0; overflow: hidden; }
.img-block img { max-width: 100%; display: block; border: none !important; }
.img-block figcaption { font-size: 11px; color: var(--muted); margin-top: 6px; font-style: italic; text-align: center; }

.img-block.img-center { text-align: center; }
.img-block.img-center img { margin: 0 auto; }
.img-block.img-full img { width: 100%; }
.img-block.img-left { float: left; max-width: 45%; margin: 0 24px 16px 0; }
.img-block.img-right { float: right; max-width: 45%; margin: 0 0 16px 24px; }

.embed-wrap { position: relative; padding-top: 56.25%; margin: 24px 0; }
.embed-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
