/* Updates list and post pages. Shared chrome lives in site.css. */

body { line-height: 1.6; }
.wrap, section, main { min-width: 0; }

.updates-hero { text-align: center; padding-bottom: 42px; }
.updates-hero-copy { padding: 12px 0 8px; }
.updates-hero h1 {
  font-size: 38px;
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 12px;
  color: #fff;
}
.updates-hero .hero-sub {
  font-size: 18px;
  opacity: 0.95;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.5;
}

section { padding: 48px 0; }
h2 { font-size: 28px; margin: 0 0 12px; text-align: left; }
.sub { color: var(--muted); margin: 0 0 28px; max-width: 640px; }

.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.roadmap-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}
.roadmap-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--primary-2);
}
.roadmap-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.roadmap-card:last-child { margin-bottom: 0; }
.roadmap-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06); }
html.js .roadmap-card.reveal.revealed:hover { transform: translateY(-2px); }
.roadmap-card h4 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.roadmap-card p { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge.shipped { background: var(--badge-shipped-bg); color: var(--badge-shipped-ink); }
.badge.in-progress { background: var(--badge-progress-bg); color: var(--badge-progress-ink); }
.badge.planned { background: var(--badge-planned-bg); color: var(--badge-planned-ink); }
.meta-tag { font-size: 12px; color: var(--muted); margin-left: 6px; font-weight: 500; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.posts-grid > * { min-width: 0; max-width: 100%; }
.posts-grid > .ad-slot { grid-column: 1 / -1; margin: 0; }

.ad-slot {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 28px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  text-align: center;
  overflow: hidden;
}
.ad-slot .ad-label {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.ad-slot .adsbygoogle,
.ad-slot .adsbygoogle iframe {
  box-sizing: border-box;
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden;
  border-radius: 8px;
}
.ad-slot .adsbygoogle {
  background: var(--bg);
  min-height: 250px;
  max-height: 280px;
}
.ad-slot .adsbygoogle[data-ad-status="filled"] {
  height: auto;
  max-height: none;
  min-height: 100px;
}
.ad-slot.is-unfilled,
.ad-slot:has(.adsbygoogle[data-ad-status="unfilled"]) {
  display: none;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(45, 64, 48, 0.12); }
html.js .post-card.reveal.revealed:hover { transform: translateY(-4px); }
:root[data-theme="dark"] .post-card:hover,
:root[data-theme="dark"] .roadmap-card:hover { box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35); }
.post-cover-wrap { aspect-ratio: 16/9; overflow: hidden; background: var(--line); position: relative; }
.post-cover-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.post-card:hover .post-cover-wrap img { transform: scale(1.03); }
.post-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tag-pill {
  background: var(--chip-bg);
  color: var(--chip-ink);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.post-card h3 { margin: 0 0 10px; font-size: 20px; color: var(--ink); line-height: 1.3; }
.post-card p { margin: 0 0 18px; font-size: 14.5px; color: var(--muted); flex: 1; line-height: 1.5; }
.read-more-link { color: var(--accent); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.read-more-link:hover { text-decoration: underline; }

.post-article { max-width: 760px; width: 100%; min-width: 0; margin: 0 auto; padding: 40px 20px 8px; box-sizing: border-box; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--accent); }
.post-header { margin-bottom: 32px; text-align: left; }
.post-header h1 { font-size: 36px; font-weight: 800; margin: 12px 0 16px; line-height: 1.2; color: var(--ink); }
.post-author-bar { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
}
:root[data-theme="dark"] .author-avatar { background: #2D4030; color: #F7FBF7; border: 1px solid var(--line); }
.post-main-cover { width: 100%; border-radius: 20px; overflow: hidden; margin-bottom: 32px; border: 1px solid var(--line); background: var(--surface); }
.post-main-cover img { width: 100%; height: auto; display: block; }
.post-body { font-size: 17px; line-height: 1.7; color: var(--ink); min-width: 0; max-width: 100%; }
.post-body p { margin: 0 0 20px; }
.post-body h2 { font-size: 24px; margin: 36px 0 16px; color: var(--primary-2); text-align: left; }
.post-body h3 { font-size: 20px; margin: 28px 0 12px; color: var(--primary-2); }
.post-body h4 { font-size: 17px; margin: 22px 0 10px; color: var(--ink); }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 24px; }
.post-body li { margin-bottom: 8px; }
.post-body a { color: var(--primary-2); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.post-body a:hover { color: var(--accent); }
.post-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: var(--quote-bg);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--ink);
}
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.post-body code {
  background: var(--code-bg);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.post-body pre {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 0 0 20px;
}
.post-body pre code { background: none; padding: 0; font-size: 14.5px; color: var(--ink); }
.post-body kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.9em;
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.table-scroll { overflow-x: auto; margin: 0 0 24px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 0; }
.post-body th, .post-body td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.post-body th { background: var(--chip-bg); color: var(--ink); font-weight: 700; }
.post-body tbody tr:nth-child(even) { background: rgba(141, 170, 145, 0.08); }
:root[data-theme="dark"] .post-body tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.04); }

.post-figure { margin: 28px 0; text-align: center; }
.post-figure img, .post-img-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  display: block;
  margin: 0 auto;
  background: var(--surface);
}
.post-figure figcaption { font-size: 14px; color: var(--muted); font-style: italic; margin-top: 8px; }
.post-img-wrap { margin: 28px 0; text-align: center; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 48px 0 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.post-nav-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  transition: border-color 0.2s ease;
}
.post-nav-card:hover { border-color: var(--primary); }
.post-nav-card.next { text-align: right; }
.post-nav-label { font-size: 12px; color: var(--muted); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.post-nav-title { font-size: 15px; font-weight: 600; color: var(--ink); }

.cta-box {
  background: var(--hero);
  color: #fff;
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  margin: 48px 0 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
.cta-box h3 { font-size: 26px; margin: 0 0 10px; color: #fff; }
.cta-box p { font-size: 16px; opacity: 0.92; max-width: 500px; margin: 0 auto 24px; }
.cta-buttons { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; }

@media (max-width: 800px) {
  .roadmap-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: minmax(0, 1fr); }
  .ad-slot .adsbygoogle:not([data-ad-status="filled"]) {
    min-height: 120px;
    max-height: 280px;
  }
  .post-header h1 { font-size: 28px; }
  .updates-hero h1 { font-size: 30px; }
  .post-nav { flex-direction: column; }
  .post-nav-card.next { text-align: left; }
}
