/* ============================================
   post.css — Softer, nostalgic article styling
   ============================================ */

.post-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  position: relative;
  line-height: 1.85;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  margin-bottom: 40px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* ── POST HEADER ── */
.post-header {
  border-left: 2px solid var(--accent-dim);
  padding-left: 28px;
  margin-bottom: 56px;
  animation: fadeUp 0.4s ease both;
}

.post-heading {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  margin: 12px 0 18px;
  color: var(--text-primary);
}

.post-lead {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 580px;
}

.post-summary-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── TABLE OF CONTENTS ── */
.post-toc {
  border-left: 2px solid var(--border);
  padding-left: 18px;
  margin-bottom: 40px;
  max-width: 320px;
}

/* Title */
.post-toc-title {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-weight: 600;
}

/* List */
.post-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Items */
.post-toc-list li {
  margin-bottom: 6px;
}

/* Links */
.post-toc-list a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  position: relative;
}

/* subtle dash */
.post-toc-list a::before {
  content: '—';
  margin-right: 6px;
  color: var(--text-dim);
}

/* Hover */
.post-toc-list a:hover {
  color: var(--accent);
  transform: translateX(2px);
}

/* ── PATCH SECTIONS ── */
.patch-section {
  margin-bottom: 56px;
  animation: fadeUp 0.5s ease both;
}

.patch-section:nth-child(1) { animation-delay: 0.05s; }
.patch-section:nth-child(2) { animation-delay: 0.1s; }
.patch-section:nth-child(3) { animation-delay: 0.15s; }
.patch-section:nth-child(4) { animation-delay: 0.2s; }

.section-title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.section-icon {
  font-size: 16px;
  opacity: 0.8;
}

.buff-icon { color: var(--buff); }
.nerf-icon { color: var(--nerf); }
.fix-icon  { color: var(--fix); }

/* ── CHANGE ENTRY (REWORKED) ── */
.change-entry {
  background: transparent;
  border: none;
  border-left: 2px solid var(--border);
  padding: 20px 0 20px 20px;
  margin-bottom: 18px;
  position: relative;
  transition: all 0.2s ease;
}

.change-entry:hover {
  border-left-color: var(--accent-dim);
  background: rgba(120, 130, 150, 0.06);
}

.change-entry-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.character-name {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.change-type {
  font-family: var(--font-body);
  font-size: 10px;
  padding: 4px 10px;
  border: 1px solid;
  border-radius: 2px;
  font-weight: 500;
}

.change-type.buff { 
  color: var(--buff); 
  border-color: var(--buff-muted);  
  background: var(--buff-muted); 
}

.change-type.nerf { 
  color: var(--nerf); 
  border-color: var(--nerf-muted);  
  background: var(--nerf-muted); 
}

/* ── CHANGE LIST ── */
.change-list {
  list-style: none;
  padding: 0;
  margin-bottom: 14px;
}

.change-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 0 6px 16px;
  border-bottom: 1px solid rgba(120, 130, 150, 0.12);
  line-height: 1.7;
  position: relative;
}

.change-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

.change-list li:last-child {
  border-bottom: none;
}

code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(120, 130, 150, 0.12);
  color: var(--text-primary);
  padding: 2px 6px;
  border-radius: 2px;
}

em {
  color: var(--text-primary);
  font-style: italic;
  font-weight: 500;
}

.change-reason {
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  line-height: 1.7;
}

.change-entry.no-character .change-list li {
  padding-left: 20px;
}

/* ── DEV NOTES ── */
.developer-notes .section-title {
  color: var(--accent-dim);
}

.dev-note {
  background: rgba(120, 130, 150, 0.02);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--text-dim);
  padding: 28px;
  border-radius: 2px;
}

.dev-note p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.dev-note p:last-child {
  margin-bottom: 0;
}

/* ── TABLE STYLING (REWORKED) ── */
.post-main table {
  border-collapse: collapse;
  margin: 28px 0;
  width: auto; /* important fix */
  max-width: 100%;
}

/* HEADER */
.post-main th {
  background: rgba(120, 130, 150, 0.04);
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
  color: var(--text-primary); /* brighter */
  font-weight: 600;
}

/* CELLS */
.post-main td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary); /* 👈 key change */
  vertical-align: middle;
}

/* ROW HOVER */
.post-main tr:hover td {
  background: rgba(120, 130, 150, 0.06);
}

.post-main tr:nth-child(even) td {
  background: rgba(120, 130, 150, 0.03);
}

/* ── BODY TEXT ── */
.post-main div[data-contents-type="text"] {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

/* ── POST NAVIGATION ── */
.post-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  gap: 12px;
  flex-wrap: wrap;
}

.post-nav-link {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-nav-link:not(.disabled):hover {
  color: var(--accent);
}

.post-nav-link.home {
  color: var(--accent-dim);
}

.post-nav-link.home:hover {
  color: var(--accent);
}

.post-nav-link.disabled {
  opacity: 0.4;
  cursor: default;
}

/* ── BACK TO TOP ── */
.back-to-top-btn {
  position: fixed;
  bottom: 20px;
  right: max(32px, calc((100vw - 1000px) / 2 - 32px));
  width: 40px;
  height: 40px;
  background: rgba(24, 26, 32, 0.7);
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 1000;
  display: none;
}

.back-to-top-btn span {
  display: inline-block;
  transform: translate(8.5px, -2px);
}

.back-to-top-btn:hover {
  background: rgba(120, 130, 150, 0.08);
  border-color: var(--accent-dim);
}
