/* WarBrief Single Post v1 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800&family=Geist+Mono:wght@500&display=swap');

.wb-single-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #bb0112, #ff1a2e);
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* Hero */
.wb-single-hero {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1a1a1a 55%, #3d0009 100%);
  border-bottom: 3px solid #bb0112;
  padding: 48px 0 56px;
  overflow: hidden;
}

.wb-single-hero--has-image {
  background-size: cover;
  background-position: center;
  min-height: clamp(320px, 52vh, 520px);
  display: flex;
  align-items: flex-end;
  padding: 0 0 48px;
}

.wb-single-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.55) 0%, rgba(15,23,42,0.88) 65%, rgba(15,23,42,0.96) 100%);
  pointer-events: none;
}

.wb-single-hero-inner {
  position: relative;
  z-index: 1;
}

.wb-single-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  font: 500 11px/1 "Geist Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wb-single-breadcrumbs li {
  display: flex;
  align-items: center;
}

.wb-single-breadcrumbs li + li::before {
  content: "/";
  margin: 0 10px;
  color: rgba(255,255,255,0.35);
}

.wb-single-breadcrumbs a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
}

.wb-single-breadcrumbs a:hover {
  color: #bb0112;
}

.wb-single-breadcrumbs span {
  color: rgba(255,255,255,0.9);
}

.wb-single-cat {
  display: inline-block;
  background: #bb0112;
  color: #fff;
  font: 700 10px/1 Inter, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  text-decoration: none;
  margin-bottom: 16px;
}

.wb-single-cat:hover {
  background: #fff;
  color: #bb0112;
}

.wb-single-title {
  margin: 0 0 20px;
  max-width: 900px;
  color: #fff;
  font: 800 clamp(1.75rem, 4.5vw, 3rem)/1.12 Inter, sans-serif;
  letter-spacing: -0.03em;
}

.wb-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font: 500 12px/1 "Geist Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.wb-single-meta-sep {
  margin: 0 8px;
  color: rgba(255,255,255,0.25);
}

/* Main layout */
.wb-single-main {
  padding: 40px 0 80px;
  background: #f4f5f7;
}

.wb-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
}

.wb-single-article {
  background: #fff;
  border: 2px solid #191c1e;
  box-shadow: 6px 6px 0 #191c1e;
  padding: 36px 40px 40px;
  min-width: 0;
}

.wb-single-deck {
  margin: 0 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e1e2e5;
  font: 400 clamp(1.05rem, 2vw, 1.25rem)/1.65 Georgia, serif;
  color: #4c4546;
}

.wb-single-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid #191c1e;
}

.wb-single-back {
  font: 700 11px/1 Inter, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #191c1e;
  text-decoration: none;
  transition: color 0.15s;
}

.wb-single-back:hover {
  color: #bb0112;
}

.wb-single-share {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wb-single-share > span {
  font: 600 10px/1 Inter, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7e7576;
  margin-right: 4px;
}

.wb-single-share a,
.wb-single-copy {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #f4f5f7;
  border: 2px solid #191c1e;
  color: #191c1e;
  font: 700 11px/1 Inter, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.wb-single-share a:hover,
.wb-single-copy:hover {
  background: #bb0112;
  border-color: #bb0112;
  color: #fff;
}

/* Prose */
.wb-single-prose {
  font: 400 1.0625rem/1.8 Georgia, "Times New Roman", serif;
  color: #2a2526;
}

.wb-single-prose > *:first-child {
  margin-top: 0;
}

.wb-single-prose h2 {
  margin: 2.5rem 0 1rem;
  padding-left: 16px;
  border-left: 4px solid #bb0112;
  font: 800 clamp(1.25rem, 2.5vw, 1.65rem)/1.25 Inter, sans-serif;
  letter-spacing: -0.02em;
  color: #191c1e;
}

.wb-single-prose h3 {
  margin: 2rem 0 0.75rem;
  font: 700 1.15rem/1.35 Inter, sans-serif;
  color: #191c1e;
}

.wb-single-prose p {
  margin: 0 0 1.35rem;
}

.wb-single-prose a {
  color: #bb0112;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wb-single-prose a:hover {
  color: #191c1e;
}

.wb-single-prose ul,
.wb-single-prose ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}

.wb-single-prose li {
  margin-bottom: 0.5rem;
}

.wb-single-prose blockquote {
  margin: 2rem 0;
  padding: 24px 28px;
  background: #191c1e;
  border-left: 4px solid #bb0112;
  color: rgba(255,255,255,0.9);
  font-style: italic;
}

.wb-single-prose blockquote p:last-child {
  margin-bottom: 0;
}

.wb-single-prose img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border: 2px solid #191c1e;
  box-shadow: 4px 4px 0 #191c1e;
}

.wb-single-prose figure {
  margin: 2rem 0;
}

.wb-single-prose figcaption {
  margin-top: 8px;
  font: 500 12px/1.4 "Geist Mono", monospace;
  color: #7e7576;
}

.wb-single-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.wb-single-prose th,
.wb-single-prose td {
  border: 1px solid #e1e2e5;
  padding: 10px 14px;
  text-align: left;
}

.wb-single-prose th {
  background: #191c1e;
  color: #fff;
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wb-single-prose hr {
  border: none;
  border-top: 2px solid #e1e2e5;
  margin: 2.5rem 0;
}

/* Related WarBrief Coverage block from interlinking */
.wb-single-prose h2:last-of-type + ul,
.wb-single-prose .wb-related-coverage,
.wb-single-prose p strong:first-child {
  /* generic interlink blocks */
}

.wb-single-prose h2:has(+ ul) {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e1e2e5;
  border-left: none;
  padding-left: 0;
}

/* Tags */
.wb-single-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid #e1e2e5;
}

.wb-single-tags > span {
  font: 700 10px/1 Inter, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7e7576;
}

.wb-single-tags a {
  font: 600 11px/1 Inter, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #191c1e;
  text-decoration: none;
  padding: 7px 12px;
  border: 2px solid #e1e2e5;
  transition: all 0.15s;
}

.wb-single-tags a:hover {
  background: #191c1e;
  border-color: #191c1e;
  color: #fff;
}

/* Author */
.wb-single-author {
  display: flex;
  gap: 18px;
  margin-top: 36px;
  padding: 24px;
  background: #f4f5f7;
  border: 2px solid #191c1e;
}

.wb-single-author-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #bb0112;
  color: #fff;
  font: 800 1.25rem/1 Inter, sans-serif;
}

.wb-single-author-label {
  margin: 0 0 4px;
  font: 600 10px/1 Inter, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bb0112;
}

.wb-single-author-name {
  margin: 0 0 6px;
  font: 700 1.05rem/1.3 Inter, sans-serif;
  color: #191c1e;
}

.wb-single-author-bio {
  margin: 0;
  font: 400 0.9rem/1.55 Georgia, serif;
  color: #4c4546;
}

/* Related */
.wb-single-related {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 3px solid #191c1e;
}

.wb-single-related-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.wb-single-related-head h2 {
  margin: 0;
  font: 800 clamp(1.1rem, 2vw, 1.4rem)/1 Inter, sans-serif;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #191c1e;
}

.wb-single-related-head a {
  font: 600 11px/1 Inter, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bb0112;
  text-decoration: none;
}

.wb-single-related-head a:hover {
  color: #191c1e;
}

.wb-single-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.wb-single-related-card {
  border: 2px solid #191c1e;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wb-single-related-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 #bb0112;
}

.wb-single-related-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e8eaed;
}

.wb-single-related-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.wb-single-related-card:hover .wb-single-related-media img {
  transform: scale(1.05);
}

.wb-single-related-body {
  padding: 14px 16px 16px;
}

.wb-single-related-body time {
  font: 500 10px/1 "Geist Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #bb0112;
}

.wb-single-related-body h3 {
  margin: 8px 0 0;
  font: 700 0.95rem/1.35 Inter, sans-serif;
}

.wb-single-related-body h3 a {
  color: #191c1e;
  text-decoration: none;
}

.wb-single-related-body h3 a:hover {
  color: #bb0112;
}

/* Sidebar + TOC */
.wb-single-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wb-single-toc-panel {
  position: sticky;
  top: 80px;
  background: #fff;
  border: 2px solid #191c1e;
  box-shadow: 4px 4px 0 #191c1e;
  padding: 20px 18px;
}

.wb-single-toc-panel h3 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #191c1e;
  font: 700 11px/1 Inter, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #191c1e;
}

.wb-single-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wb-single-toc-list li a {
  display: block;
  padding: 6px 0 6px 10px;
  border-left: 2px solid transparent;
  font: 500 13px/1.4 Inter, sans-serif;
  color: #4c4546;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.wb-single-toc-list li a:hover,
.wb-single-toc-list li a.is-active {
  color: #bb0112;
  border-left-color: #bb0112;
}

.wb-single-toc-panel.is-empty {
  display: none;
}

.wb-single-sidebar .sidebar-primary {
  position: sticky;
  top: calc(80px + var(--toc-height, 0px));
}

.wb-single-sidebar .sidebar-primary > div {
  margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 1100px) {
  .wb-single-layout {
    grid-template-columns: 1fr;
  }
  .wb-single-toc-panel {
    position: static;
  }
  .wb-single-sidebar .sidebar-primary {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .wb-single-sidebar .sidebar-primary > div {
    margin-bottom: 0;
  }
}

@media (max-width: 720px) {
  .wb-single-article {
    padding: 24px 20px 28px;
  }
  .wb-single-related-grid {
    grid-template-columns: 1fr;
  }
  .wb-single-author {
    flex-direction: column;
    align-items: flex-start;
  }
  .wb-single-sidebar .sidebar-primary {
    grid-template-columns: 1fr;
  }
}

body.admin-bar .wb-single-toc-panel { top: 112px; }
@media (max-width: 782px) {
  body.admin-bar .wb-single-toc-panel { top: 126px; }
}
