/* ============================================================
   EOL Risk Tracker — Blog Styles
   ============================================================ */

/* ── Blog index header ────────────────────────────────────── */
.blog-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 40px 0 28px;
}

.blog-title {
  font-size: 36px;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.blog-subtitle {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 440px;
}

.blog-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
/* ── Featured post ────────────────────────────────────────── */
.featured-post {
  display: grid;
  grid-template-columns: 1fr 420px;
  min-height: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 8px;
}

.featured-post:hover {
  border-color: var(--faint);
  box-shadow: var(--shadow);
}

.featured-visual {
  background: linear-gradient(135deg, #0d1f3c 0%, #1a0a2a 60%, #0d1220 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.featured-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 300px 200px at 40% 60%,
    rgba(99,102,241,0.2) 0%, transparent 60%);
}

.featured-visual-inner {
  position: relative;
  z-index: 1;
}

.featured-content {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.featured-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.featured-title {
  font-size: 24px;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.featured-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}

.featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* ── Featured image ───────────────────────────────────────── */
.post-featured-image {
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.post-featured-image img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}
/* ── Byline ───────────────────────────────────────────────── */
.post-byline {
  display: flex;
  align-items: center;
  gap: 9px;
}

.byline-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.byline-name {
  font-size: 13px;
  font-weight: 500;
}

.byline-date {
  font-size: 11.5px;
  color: var(--faint);
}

.post-read-more {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-read-more svg {
  transition: transform 0.15s;
}

.featured-post:hover .post-read-more svg,
.post-card:hover .post-read-more svg {
  transform: translateX(3px);
}

/* ── Post grid ────────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 60px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-card-visual {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.post-visual-guide    { background: linear-gradient(135deg, #0d1a3c, #1a1040); }
.post-visual-digest   { background: linear-gradient(135deg, #1a1200, #201800); }
.post-visual-advisory { background: linear-gradient(135deg, #1a0808, #200d0d); }
.post-visual-vendor   { background: linear-gradient(135deg, #081a10, #0d2014); }
.post-visual-general  { background: linear-gradient(135deg, #0d1220, #111827); }

.post-visual-inner {
  position: relative;
  z-index: 1;
}

.post-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-tags {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.post-card-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.post-card-excerpt {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 14px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

/* ── Post detail layout ───────────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  padding: 28px 0 80px;
  align-items: start;
}

.post-title {
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin-bottom: 18px;
}

.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.post-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* ── Key Takeaways box ────────────────────────────────────── */
.key-takeaways {
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
}

.key-takeaways-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--mono);
  color: var(--accent);
  margin-bottom: 12px;
}

.key-takeaways-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.key-takeaways-list li {
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
  opacity: 0.9;
}

.key-takeaways-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}
/* ── Product callout ──────────────────────────────────────── */
.product-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.product-callout-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}

.product-callout-info {
  flex: 1;
  min-width: 180px;
}

/* ── Prose (post body) ────────────────────────────────────── */
.prose {
  color: var(--text);
  margin-bottom: 32px;
}

.prose h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  margin: 36px 0 14px;
  letter-spacing: -0.2px;
}

.prose h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 10px;
}

.prose p {
  font-size: 15.5px;
  line-height: 1.75;
  margin-bottom: 18px;
  opacity: 0.92;
}

.prose ul,
.prose ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

.prose li {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.prose a {
  color: var(--accent);
  border-bottom: 1px solid rgba(99,102,241,0.3);
  transition: border-color 0.15s;
}

.prose a:hover {
  border-color: var(--accent);
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 24px 0;
  padding: 12px 20px;
  background: rgba(99,102,241,0.06);
  border-radius: 0 8px 8px 0;
}

.prose blockquote p {
  margin-bottom: 0;
  font-style: italic;
  color: var(--muted);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

/* Markdown tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.prose table th {
  padding: 9px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.prose table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--muted);
  font-size: 13.5px;
}

.prose table tr:last-child td {
  border-bottom: none;
}

.prose table tr:hover td {
  background: var(--bg-hover);
}
/* ── Admonition / Callout boxes ───────────────────────────── */
/*
  Generated by the 'admonition' markdown extension.
  Syntax in .md files:
    !!! note "Title"
        Content here.

  Types: note, tip, info, warning, danger, success
*/

.prose .admonition {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 22px 0;
  border: 1px solid;
  font-size: 14px;
  line-height: 1.6;
}

.prose .admonition p {
  font-size: 14px;
  margin-bottom: 0;
  opacity: 1;
}

.prose .admonition-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--mono);
  margin-bottom: 6px;
  display: block;
}

/* note */
.prose .admonition.note {
  background: rgba(99,102,241,0.07);
  border-color: rgba(99,102,241,0.3);
}
.prose .admonition.note .admonition-title {
  color: var(--accent);
}

/* tip / pro tip */
.prose .admonition.tip {
  background: rgba(34,197,94,0.07);
  border-color: rgba(34,197,94,0.3);
}
.prose .admonition.tip .admonition-title {
  color: var(--safe);
}

/* info / key takeaway */
.prose .admonition.info {
  background: rgba(99,102,241,0.07);
  border-color: rgba(99,102,241,0.25);
}
.prose .admonition.info .admonition-title {
  color: var(--accent);
}

/* warning */
.prose .admonition.warning {
  background: rgba(234,179,8,0.07);
  border-color: rgba(234,179,8,0.3);
}
.prose .admonition.warning .admonition-title {
  color: var(--warn);
}

/* danger / critical */
.prose .admonition.danger {
  background: rgba(239,68,68,0.07);
  border-color: rgba(239,68,68,0.3);
}
.prose .admonition.danger .admonition-title {
  color: var(--danger);
}

/* success */
.prose .admonition.success {
  background: rgba(34,197,94,0.07);
  border-color: rgba(34,197,94,0.3);
}
.prose .admonition.success .admonition-title {
  color: var(--safe);
}

/* ── Code blocks (pygments monokai) ──────────────────────── */
.prose pre {
  margin: 20px 0;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  border: 1px solid var(--border);
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ── Post end tags ────────────────────────────────────────── */
.post-end-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.end-tag {
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.15s;
}

.end-tag:hover {
  border-color: var(--faint);
  color: var(--text);
}

/* ── Post sidebar ─────────────────────────────────────────── */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Sticky on desktop */
@media (min-width: 901px) {
  .post-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 16px);
    max-height: calc(100vh - var(--nav-height) - 32px);
    overflow-y: auto;
    scrollbar-width: none;
  }

  .post-sidebar::-webkit-scrollbar {
    display: none;
  }
}

/* Stacked on tablet and mobile */
@media (max-width: 900px) {
  .post-sidebar {
    display: flex;
    position: static;
    max-height: none;
    overflow-y: visible;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 24px;
  }
}

.related-post-row {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.15s;
}

.related-post-row:last-child {
  border-bottom: none;
}

.related-post-row:hover .related-post-title {
  color: var(--accent);
}

.related-post-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 5px;
  transition: color 0.15s;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .post-grid         { grid-template-columns: repeat(2, 1fr); }
  .featured-post     { grid-template-columns: 1fr; }
  .featured-visual   { height: 160px; }
  .blog-header       { flex-direction: column; align-items: flex-start; }

  .post-layout {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  .post-grid           { grid-template-columns: 1fr; }
  .blog-header-actions { display: none; }
}

/* ── Blog index layout ────────────────────────────────────── */
.blog-index-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  padding-bottom: 80px;
}

/* ── Byline avatar image ──────────────────────────────────── */
.byline-avatar-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ── Author profile (author detail page) ─────────────────── */
.author-profile-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.author-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--border);
}

.author-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-profile-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.author-profile-bio {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 14px;
  max-width: 540px;
}

.author-social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.author-social-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.15s;
}

.author-social-link:hover {
  color: var(--text);
  border-color: var(--faint);
}

/* ── Author box (end of post) ─────────────────────────────── */
.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 32px;
}

.author-box-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--border);
}

.author-box-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-box-info {
  flex: 1;
}

.author-box-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.author-box-label {
  font-size: 11px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--mono);
  margin-bottom: 2px;
}

.author-box-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.15s;
}

.author-box-name:hover {
  color: var(--accent);
}

.author-box-bio {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.author-box-social {
  display: flex;
  gap: 6px;
}

.author-social-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: all 0.15s;
}

.author-social-icon:hover {
  color: var(--text);
  border-color: var(--faint);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-index-layout {
    grid-template-columns: 1fr;
  }

  .post-grid         { grid-template-columns: repeat(2, 1fr); }
  .featured-post     { grid-template-columns: 1fr; }
  .featured-visual   { height: 160px; }
  .blog-header       { flex-direction: column; align-items: flex-start; }
  .post-layout       { grid-template-columns: 1fr; }

  .author-profile-box {
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .post-grid           { grid-template-columns: 1fr; }
  .blog-header-actions { display: none; }

  .author-box {
    flex-direction: column;
    gap: 12px;
  }

  .author-box-header {
    flex-direction: column;
  }
}