/* =========================
   Theme Tokens
   ========================= */
:root{
  --bg: #0B0C10;        /* deep navy/near-black */
  --panel: #14161B;     /* card bg */
  --text: #F8F5E7;      /* cream */
  --muted: #BFBBAE;     /* soft cream-gray */
  --accent: #C9A86A;    /* gold */
  --accent-ink:#0B0C10; /* dark text on gold */
  --border: #2C2C34;    /* dark gray */
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 150ms ease;

  /* semantic accents for vaccine UI */
  --good: #2fbf71;
  --bad:  #e07a5f;
  --info: #5aa0e6;
}

/* =========================
   Base
   ========================= */
*{ box-sizing: border-box }
html,body{
  margin:0; padding:0;
  background:var(--bg); color:var(--text);
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  line-height:1.6; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
a:hover{ opacity:.95; }
a:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }

.container{ max-width:1100px; margin:0 auto; padding:0 20px; }
.container.narrow{ max-width:800px; }
.flex{ display:flex; gap:16px; }
.between{ justify-content:space-between; }
.center-v{ align-items:center; }
.wrap{ flex-wrap:wrap; }

/* =========================
   Overflow Prevention & Word Breaking
   ========================= */
body {
  overflow-x: hidden;
  width: 100%;
}

/* Ensure containers don't exceed viewport */
.container,
.container.narrow {
  max-width: 100%;
  overflow-x: hidden;
}

/* Post content word breaking */
#post-content,
.post-content {
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Force long text and URLs to break */
#post-content p,
#post-content li,
#post-content dd,
#post-content dt {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Bibliography and reference links - critical for long URLs */
#post-content ol li,
#post-content ul li {
  word-break: break-word;
  overflow-wrap: anywhere;
}

#post-content a {
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Glossary definitions */
#post-content dl {
  max-width: 100%;
  overflow-x: hidden;
}

#post-content dd {
  margin-left: 1rem;
}

/* Bibliography specific */
#post-content ol {
  padding-left: 1.5rem;
  max-width: 100%;
}

/* Prevent code blocks from causing overflow */
pre, code {
  overflow-x: auto;
  max-width: 100%;
  word-break: break-all;
}

/* Tables if any */
table {
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

/* =========================
   Header / Navigation - Final Version
   ========================= */
.site-header{
  position:sticky; top:0; z-index:10;
  background:var(--bg);
  border-bottom:1px solid var(--border);
}

.header-inner {
  position: relative;
  overflow: visible;
}

.brand{ 
  display:flex; 
  align-items:center; 
  gap:12px; 
  padding:14px 0; 
  flex-shrink: 0;
}

.logo{ 
  width:66px; 
  height:66px; 
  border-radius:50%; 
  flex-shrink: 0;
}

.logo.small{ 
  width:42px; 
  height:42px; 
  vertical-align:middle; 
  margin-right:8px; 
  border-radius:50%; 
}

/* Brand Text Structure (2-Line Maximum) */
.brand-text{ 
  display:flex; 
  flex-direction:column; 
  justify-content:center; 
  line-height:1.2;
}

.brand-title {
  display:block; 
  font-weight:700; 
  letter-spacing:.5px; 
  font-size: 1rem;
}

.brand-title .line1,
.brand-title .line2 {
  display: inline;
}

.brand-subtitle{ 
  font-size:.85rem; 
  color:var(--muted); 
  margin-top: 2px;
}

.nav{ 
  display:flex; 
  gap:.25rem; 
  align-items:center; 
}

.nav a{
  display:inline-block;
  padding:.45rem .75rem;
  margin:0 .15rem;
  border-radius:var(--radius-sm);
  line-height:1.2;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  white-space:nowrap;
}

.nav a:hover{
  background:rgba(201,168,106,.12);
  text-decoration:none;
}

.nav a.active{
  background:var(--accent);
  color:var(--accent-ink);
  box-shadow:0 0 0 1px var(--accent) inset;
}

.nav-toggle{ 
  display:none; 
  border:1px solid var(--border); 
  background:var(--panel); 
  color:var(--text); 
  border-radius:var(--radius-sm); 
  padding:.45rem .6rem; 
  cursor: pointer;
  font-size: 1.2rem;
}

/* Desktop - keep brand title on single line */
@media (min-width: 901px) {
  .brand-title .line1::after {
    content: " ";
  }
}

/* Mobile Navigation */
@media (max-width:900px){
  .nav-toggle{ 
    display:block; 
  }
  
  .nav{ 
    display:none; 
    position:absolute; 
    top:100%; 
    right:0; 
    left:0; 
    background:var(--bg); 
    border-top:1px solid var(--border); 
    padding:10px 12px; 
    z-index:20; 
    flex-direction:column; 
    gap:.35rem; 
    box-shadow: var(--shadow);
  }
  
  .nav.open{ 
    display:flex; 
  }
  
  .nav a{ 
    padding:.6rem .7rem; 
    margin:0; 
    border-radius:var(--radius-sm); 
    width: 100%;
    text-align: center;
  }

  /* Mobile - force 2-line layout: "I Could" / "Be Wrong" */
  .brand-title {
    line-height: 1.1;
    font-size: 0.9rem;
  }
  
  .brand-title .line1 {
    display: block;
  }
  
  .brand-title .line2 {
    display: block;
  }
}

/* Tablet breakpoint */
@media (max-width:1100px){
  .site-header .container{ 
    gap:.5rem; 
  }
  
  .brand{ 
    padding:12px 0; 
  }
  
  .brand-title {
    font-size: 0.95rem;
  }
  
  .nav a{ 
    padding:.4rem .6rem; 
    margin:0 .1rem; 
    font-size: 0.9rem;
  }
}

/* Small mobile adjustments */
@media (max-width:600px){
  .brand{ 
    padding:10px 0; 
    gap: 8px;
  }
  
  .logo.small {
    width: 38px;
    height: 38px;
  }
  
  .brand-title {
    font-size: 0.85rem;
  }
  
  .brand-subtitle {
    font-size: 0.8rem;
  }
  
  .nav a{ 
    padding:.5rem; 
    font-size: 0.9rem;
  }
}

/* =========================
   Hero
   ========================= */
.hero{
  padding:2rem 0 1.5rem;
  border-bottom:1px solid var(--border);
  background:linear-gradient(180deg, rgba(12,13,18,.6) 0%, rgba(12,13,18,0) 100%);
}
.hero h1{ font-size:2.35rem; margin:.2em 0 .5rem; }
.lead{ font-size:1.1rem; color:#EDE9D8; max-width:60ch; margin:0 0 .75rem; }
.cta-row{ margin:.5rem 0 .5rem; display:flex; gap:.6rem; flex-wrap:wrap; }
.badges{ margin-top:.25rem; color:var(--muted); }

/* =========================
   Buttons
   ========================= */
.btn{
  display:inline-block;
  background:var(--accent);
  color:var(--accent-ink);
  padding:.65rem 1rem;
  border-radius:var(--radius-sm);
  border:1px solid var(--accent);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active{ transform:none; box-shadow:none; }
.btn.ghost{ background:transparent; color:var(--text); border-color:var(--border); }
.btn.large{ padding:.9rem 1.1rem; }
.btn.small { padding:.45rem .7rem; font-size:.9rem; }

/* =========================
   Cards / Grids
   ========================= */
.home-grid{
  display:grid; gap:20px;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  padding:36px 0;
}

@media (max-width:900px){ 
  .home-grid{ grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); } 
}

.grid{ 
  display:grid; 
  grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
  gap:1.5rem; 
}

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover{ transform:translateY(-2px); box-shadow:var(--shadow); border-color:#34363f; }

.episode,.post{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.episode:hover,.post:hover{ transform:translateY(-2px); box-shadow:var(--shadow); border-color:#34363f; }
.episode .meta,.post .meta{ font-size:.9rem; color:var(--muted); }

.more{ display:inline-block; margin-top:10px; }

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* =========================
   Media
   ========================= */
.thumb{
  width:100%; aspect-ratio:16/9;
  border-radius:var(--radius-sm);
  object-fit:cover; background:#0F1015;
  border:1px solid var(--border);
}
.thumb-link{ display:block; }
.thumb-link img{ display:block; border-radius:var(--radius-sm); transition: transform var(--transition), filter var(--transition); }
.thumb-link:hover img{ filter:brightness(1.03); transform: translateY(-1px); }

.play-row{ display:flex; gap:10px; align-items:center; margin-top:10px; }
audio{ width:100%; }

/* =========================
   Description clamp + toggle
   ========================= */
.description{
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden; position:relative;
}
.description.expanded{ -webkit-line-clamp:unset; }
.toggle-btn{
  background:none; border:none; color:var(--accent);
  cursor:pointer; padding:0; margin-top:4px; font-size:.9em; text-decoration:underline;
}

/* =========================
   Forms
   ========================= */
.stack{ display:flex; flex-direction:column; gap:10px; }

form label{ 
  display:block; 
  font-weight:600; 
  color:var(--text); 
  margin-bottom:.35rem; 
}

form input[type="text"],form input[type="email"],form input[type="tel"],form input[type="url"],form input[type="number"],form textarea,form select{
  width:100%; 
  padding:12px 14px; 
  border-radius:var(--radius-sm); 
  border:1px solid var(--border); 
  background:#0F1015; 
  color:var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

form input[type="text"]:hover,form input[type="email"]:hover,form input[type="tel"]:hover,form input[type="url"]:hover,form input[type="number"]:hover,form textarea:hover,form select:hover{ 
  border-color:#34363f; 
}

form input[type="text"]:focus,form input[type="email"]:focus,form input[type="tel"]:focus,form input[type="url"]:focus,form input[type="number"]:focus,form textarea:focus,form select:focus{
  outline:none; 
  border-color:var(--accent); 
  box-shadow:0 0 0 3px rgba(201,168,106,.25);
}

form ::placeholder{ color: rgba(248,245,231,.55); }
form textarea{ min-height:140px; resize:vertical; }
form input:disabled,form textarea:disabled,form select:disabled{ opacity:.6; cursor:not-allowed; }

form select{
  -webkit-appearance:none; appearance:none;
  background:#0F1015 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%23C9A86A'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 12px center/14px 14px;
  padding-right:2.25rem;
}

/* Consent checkbox layout */
form label.checkbox-consent { 
  display:flex; 
  align-items:center; 
  gap:.5rem; 
  font-size:.9rem; 
  color:var(--muted); 
  line-height:1.4; 
}
form label.checkbox-consent input[type="checkbox"] { 
  flex:0 0 auto; 
  margin:0; 
}

/* =========================
   Single Line Control Bar - Never Stack
   ========================= */
.control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: nowrap; /* Force single line */
}

.control-bar label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.control-bar select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 1.3rem 0.25rem 0.4rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-width: 90px;
  max-width: 130px;
  flex-shrink: 1;
  
  /* Custom dropdown arrow */
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='%23C9A86A'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 10px 10px;
}

.control-bar select:hover {
  border-color: #34363f;
}

.control-bar select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(201, 168, 106, 0.25);
}

/* Smaller screens - scale down but NEVER stack */
@media (max-width: 600px) {
  .control-bar {
    gap: 0.5rem;
  }
  
  .control-bar label {
    font-size: 0.75rem;
    gap: 0.3rem;
  }
  
  .control-bar select {
    font-size: 0.75rem;
    padding: 0.2rem 1.1rem 0.2rem 0.3rem;
    min-width: 70px;
    max-width: 110px;
  }
}

@media (max-width: 400px) {
  .control-bar {
    gap: 0.3rem;
  }
  
  .control-bar label {
    font-size: 0.7rem;
    gap: 0.25rem;
  }
  
  .control-bar select {
    font-size: 0.7rem;
    padding: 0.15rem 1rem 0.15rem 0.25rem;
    min-width: 60px;
    max-width: 90px;
  }
}

/* =========================
   Comments & misc UI
   ========================= */
#comments { margin-top:2rem; }
.comments-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:.75rem; }
.comments-head select{ background:#0F1015; color:var(--text); border:1px solid var(--border); border-radius:8px; padding:6px 28px 6px 10px; }
.cmt{ padding:12px; border-left:2px solid var(--border); }
.cmt + .cmt{ margin-top:8px; }
.cmt-meta{ font-size:.9rem; color:var(--muted); margin-bottom:6px; }
.cmt-body{ white-space: pre-wrap; margin-bottom:6px; }
.cmt-actions{ display:flex; align-items:center; gap:10px; }
.cmt-actions .vote{ background:transparent; border:1px solid var(--border); color:var(--text); padding:2px 6px; border-radius:6px; cursor:pointer; }
.cmt-actions .vote:hover{ background: rgba(201,168,106,.12); }
.cmt-actions .score{ min-width:1.5rem; text-align:center; display:inline-block; }
.reply-form{ margin:8px 0 6px; display:grid; gap:8px; }
.reply-form input, .reply-form textarea { background:#0F1015; border:1px solid var(--border); border-radius:8px; color:var(--text); padding:8px; }
[hidden]{ display:none !important; }

/* =========================
   Revision Schedule Component
   ========================= */
.revision-schedule {
  position: absolute;
  top: -0.5rem;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  font-size: 0.75rem;
  box-shadow: var(--shadow);
  z-index: 2;
}

.revision-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.revision-triangle {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 12px solid var(--accent);
  position: relative;
  display: inline-block;
  margin-right: 0.5rem;
}

.revision-number {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent-ink);
}

.revision-details {
  color: var(--muted);
  line-height: 1.3;
}

.revision-line {
  white-space: nowrap;
}

/* Article meta area positioning for revision schedule */
.article-meta {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.article-meta .muted {
  flex-shrink: 0;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .revision-schedule {
    position: static;
    margin: 0.5rem 0;
    align-self: flex-start;
  }
  
  .article-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .hero h1{ font-size:1.9rem; }
  .lead{ font-size:1rem; }
}

/* =========================
   Publication Meta (Author/Language)
   ========================= */
.publication-meta {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.publication-meta p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.publication-meta p:first-child {
  margin-top: 0;
}

.publication-meta p:last-child {
  margin-bottom: 0;
}

/* Spacing adjustment for images after meta */
.publication-meta + .thumb,
.publication-meta + img {
  margin-top: 1rem;
}

/* =========================
   Footer - Reduced Top Space Above Logo
   ========================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 0.5rem 0 0.5rem;
  margin-top: 3rem;
  background: var(--bg);
}

/* Centered Brand Banner - Minimal Top Space */
.footer-brand-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1rem;
  padding: 0.25rem 0 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.footer-brand-banner .brand-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.1;
}

.footer-brand-banner .brand-info strong {
  font-weight: 700;
  color: var(--text);
  font-size: 1.1rem;
  margin: 0;
}

.footer-brand-banner .brand-info span {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 1px 0;
}

.footer-brand-banner .tagline {
  font-size: 0.85rem;
  color: var(--accent);
  font-style: italic;
  margin: 2px 0 0 0;
}

/* 3 Column Layout: ALWAYS 3 columns */
.footer-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 0.75rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-column h4 {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.4rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-column a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.125rem 0;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-column a:hover {
  color: var(--accent);
}

/* Specific column alignments - ALWAYS maintained */
.footer-left {
  text-align: left;
}

.footer-center {
  text-align: center;
}

.footer-right {
  text-align: right;
}

/* Bottom copyright section */
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.copyright {
  color: var(--muted);
}

.footer-meta {
  color: var(--muted);
  font-style: italic;
}

/* Mobile adjustments - but KEEP 3 columns */
@media (max-width: 768px) {
  .footer-brand-banner {
    flex-direction: column;
    gap: 6px;
    padding: 0.15rem 0 0.5rem 0;
  }
  
  .footer-columns {
    gap: 1rem;
  }
  
  .footer-column h4 {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
  }
  
  .footer-column a {
    font-size: 0.8rem;
    padding: 0.1rem 0;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-columns {
    gap: 0.5rem;
  }
  
  .footer-brand-banner {
    margin-bottom: 0.75rem;
    padding: 0.1rem 0 0.4rem 0;
  }
  
  .footer-column h4 {
    font-size: 0.75rem;
  }
  
  .footer-column a {
    font-size: 0.75rem;
  }
}

/* =========================
   Stripe checkout
   ========================= */
.modal-overlay{ position:fixed; inset:0; background:rgba(11,12,16,.95); display:flex; align-items:center; justify-content:center; z-index:9999; animation:fadeIn .3s ease; }
.modal-content{ background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); padding:2rem; max-width:400px; width:90%; animation:slideUp .3s ease; }
.modal-content h3{ margin-top:0; color:var(--text); font-size:1.5rem; margin-bottom:1rem; }
.modal-content p{ color:var(--muted); margin-bottom:1.5rem; }
.modal-content input[type="email"]{ width:100%; padding:12px 14px; margin:1rem 0; background:#0F1015; border:1px solid var(--border); color:var(--text); border-radius:var(--radius-sm); font-size:1rem; transition:border-color var(--transition), box-shadow var(--transition); }
.modal-content input[type="email"]:hover{ border-color:#34363f; }
.modal-content input[type="email"]:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(201,168,106,.25); }
.modal-buttons{ display:flex; gap:1rem; margin-top:1.5rem; }
.modal-buttons button{ flex:1; padding:.75rem; border-radius:var(--radius-sm); cursor:pointer; font-size:1rem; transition:all var(--transition); }
.modal-buttons .btn-primary{ background:var(--accent); color:var(--accent-ink); border:1px solid var(--accent); }
.modal-buttons .btn-primary:hover{ transform:translateY(-1px); box-shadow:var(--shadow); }
.modal-buttons .btn-secondary{ background:transparent; color:var(--text); border:1px solid var(--border); }
.modal-buttons .btn-secondary:hover{ background:var(--panel); border-color:#34363f; }
.loading-overlay{ position:fixed; inset:0; background:rgba(11,12,16,.95); display:flex; align-items:center; justify-content:center; z-index:10000; }
.loading-spinner{ text-align:center; }
.spinner{ width:50px; height:50px; border:3px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:spin 1s linear infinite; margin:0 auto 1rem; }
.loading-spinner p{ color:var(--text); margin-top:1rem; font-size:1.1rem; }
.success-container{ max-width:600px; margin:4rem auto; padding:2rem; text-align:center; }
.success-icon{ width:80px; height:80px; margin:0 auto 2rem; background:var(--accent); border-radius:50%; display:flex; align-items:center; justify-content:center; animation:scaleIn .5s ease; }
.success-icon::after{ content:"✓"; color:var(--accent-ink); font-size:3rem; font-weight:bold; }
.order-details{ background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); padding:1.5rem; margin:2rem 0; text-align:left; }
.order-details h3{ color:var(--text); margin-bottom:1rem; }
.order-details .detail-row{ display:flex; justify-content:space-between; padding:.5rem 0; border-bottom:1px solid var(--border); }
.order-details .detail-row:last-child{ border-bottom:none; }
.detail-label{ color:var(--muted); }
.detail-value{ color:var(--text); font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace; font-size:.9rem; }
.info-box{ background:var(--panel); padding:1.5rem; border-radius:var(--radius); margin:2rem 0; border:1px solid var(--border); }
.info-box h3{ color:var(--accent); margin-bottom:.5rem; }
@keyframes fadeIn{ from{opacity:0} to{opacity:1} }
@keyframes slideUp{ from{ transform:translateY(20px); opacity:0 } to{ transform:translateY(0); opacity:1 } }
@keyframes spin{ to{ transform:rotate(360deg) } }
@keyframes scaleIn{ from{ transform:scale(0); opacity:0 } to{ transform:scale(1); opacity:1 } }
@media (max-width:768px){ .modal-content{ width:95%; padding:1.5rem } .modal-buttons{ flex-direction:column } .modal-buttons button{ width:100% } }

/* =========================================================
   VACCINES PAGE – LOOK & FEEL + ANIMATION
   ========================================================= */

/* Outer sections (Level 1) */
.accordion{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 14px 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.acc-header{
  width: 100%;
  text-align: left;
  background: linear-gradient(180deg, rgba(201,168,106,.12) 0%, rgba(201,168,106,0) 100%);
  color: var(--text);
  border: 0;
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.acc-header .chev{ display:inline-block; transition: transform var(--transition); }
.acc-panel{ overflow:hidden; max-height:0; transition:max-height 300ms ease; } /* JS drives the rest */
.acc-desc{ color:var(--muted); margin:0 0 .75rem; }

/* Vaccine list grid */
.vax-list{ display:grid; gap:14px; }

/* Vaccine card (Level 2) */
.vcard{ background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.vcard > summary{ list-style:none; cursor:pointer; padding:12px 14px; border-bottom:1px solid var(--border); }
.vcard > summary::-webkit-details-marker{ display:none; }
.vhead{ display:flex; justify-content:space-between; align-items:baseline; }
.vtitle{ font-weight:700; }
.vtype{ color:var(--muted); font-size:.95rem; }
.vbody{ padding:14px; overflow:hidden; max-height:0; transition:max-height 300ms ease; }

/* Timeline placeholder */
.vtimeline{
  text-align:center;
  background:#0F1015;
  border:1px solid var(--border);
  border-radius: var(--radius-sm);
  padding:16px; margin:8px 0 16px;
}

/* Two-column key/value grid — stays two columns on mobile */
.vgrid{ display:grid; grid-template-columns:1fr 1fr; gap:16px 24px; margin-bottom:12px; }
.vgrid .kv{ margin:0; }
.vgrid .kv strong{ display:block; color:var(--accent); font-size:.88rem; margin-bottom:4px; }
.vgrid .kv span{ color:var(--text); }

/* Inner segments (Level 3) */
.seg{ margin:10px 0; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.seg > summary{ list-style:none; cursor:pointer; padding:12px 14px; font-weight:600; display:flex; align-items:center; gap:.5rem; background:#0F1015; border-bottom:1px solid var(--border); }
.seg > summary::-webkit-details-marker{ display:none; }
.seg .seg-title{ flex:1 1 auto; }
/* Colored titles only (no tinted backgrounds) */
.seg-good > summary .seg-title{ color:var(--good); }
.seg-warn > summary .seg-title{ color:var(--bad); }
.seg-neutral > summary .seg-title{ color:var(--text); }
/* Animated inner panel for segments */
.seg .seg-panel{ padding:12px 14px; overflow:hidden; max-height:0; transition:max-height 300ms ease; background:#0e1016; border-top:1px solid var(--border); }

/* Bullet list "pills" (dark only) */
.bullet{ padding:10px 14px; margin:0; }
.bullet li{ margin:.4rem 0; line-height:1.5; }
.bullet.dark li{
  list-style:none;
  margin:.5rem 0;
  padding:.65rem .85rem;
  background:#12141a;
  border:1px solid var(--border);
  border-radius:10px;
}

/* Simple chips */
.chip{ display:inline-block; background:var(--accent); color:var(--accent-ink);
  border:1px solid var(--accent); border-radius:999px; font-size:.78rem; padding:.1rem .5rem; vertical-align:middle; margin-left:.35rem; }

/* References list */
.refs{ color:var(--muted); font-size:.93rem; padding-left:1.2rem; }
.mono{ font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace; font-size:.92rem; line-height:1.45; }

/* Force two columns for specs even on small screens */
@media (max-width:720px){
  .vgrid{ grid-template-columns:1fr 1fr; }
}

/* =========================
   Small refinements
   ========================= */
h1,h2,h3,h4{ line-height:1.25; }
hr.sep{ border:0; border-top:1px solid var(--border); }
a:hover:not(.btn):not(.thumb-link){ text-decoration:underline; text-underline-offset:2px; }
code,kbd,pre{ font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace; }
pre{ background:#101218; border:1px solid var(--border); padding:12px; border-radius:var(--radius-sm); overflow:auto; }
.muted{ color:var(--muted); }

/* =========================
   Restored Working Control Bar (Matches Episodes Page)
   ========================= */
.control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.control-bar label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}

.control-bar select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 1.8rem 0.4rem 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-width: 120px;
  
  /* Custom dropdown arrow */
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23C9A86A'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 12px 12px;
}

.control-bar select:hover {
  border-color: #34363f;
}

.control-bar select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.25);
}

/* Mobile responsive - scale down but stay inline */
@media (max-width: 600px) {
  .control-bar {
    gap: 0.5rem;
  }
  
  .control-bar label {
    font-size: 0.8rem;
    gap: 0.3rem;
  }
  
  .control-bar select {
    font-size: 0.8rem;
    padding: 0.3rem 1.5rem 0.3rem 0.5rem;
    min-width: 100px;
  }
}

/* Remove the broken inline-controls CSS */
.inline-controls {
  display: none;
}

/* =========================
   Missing Card Styles - Add to /assets/css/styles.css
   ========================= */

/* Extend card styling to include debateables and products */
.episode, .post, .debateable, .product {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.episode:hover, .post:hover, .debateable:hover, .product:hover { 
  transform: translateY(-2px); 
  box-shadow: var(--shadow); 
  border-color: #34363f; 
}

/* Ensure meta styling is consistent across all card types */
.episode .meta, .post .meta, .debateable .meta, .product .meta { 
  font-size: .9rem; 
  color: var(--muted); 
}
/* =========================
   Brand Text - Simple Format (No Collapsing)
   ========================= */
.brand{ 
  display:flex; 
  align-items:center; 
  gap:12px; 
  padding:14px 0; 
  flex-shrink: 0;
}

.logo{ 
  width:66px; 
  height:66px; 
  border-radius:50%; 
  flex-shrink: 0;
}

.logo.small{ 
  width:42px; 
  height:42px; 
  vertical-align:middle; 
  margin-right:8px; 
  border-radius:50%; 
}

.brand-text{ 
  display:flex; 
  flex-direction:column; 
  justify-content:center; 
  line-height:1.2;
}

.brand-text strong{ 
  display:block; 
  font-weight:700; 
  letter-spacing:.5px; 
  font-size: 1rem;
  white-space: nowrap; /* Keep "I Could Be Wrong" on one line */
}

.brand-text span{ 
  font-size:.85rem; 
  color:var(--muted); 
  margin-top: 2px;
}

/* Mobile adjustments - but keep logo text simple */
@media (max-width:900px){
  .brand{ 
    padding:12px 0; 
  }
  
  .brand-text strong {
    font-size: 0.95rem;
  }
}

@media (max-width:600px){
  .brand{ 
    padding:10px 0; 
    gap: 8px;
  }
  
  .logo.small {
    width: 38px;
    height: 38px;
  }
  
  .brand-text strong {
    font-size: 0.9rem;
  }
  
  .brand-text span {
    font-size: 0.8rem;
  }
}
/* =========================
   Revision System Styles
   ========================= */

/* Author and Data & Language line */
.author-data {
  font-size: 0.9em;
  color: var(--muted);
  margin: 0.25rem 0 0.75rem 0;
  font-style: italic;
}

/* Revision log container */
.revision-log {
  margin: 0.5rem 0 1.5rem 0;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  background: rgba(201, 168, 106, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Individual revision entries */
.revision-entry {
  margin: 0.5rem 0;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Delta triangle symbol */
.delta {
  color: var(--accent);
  font-weight: bold;
  margin-right: 0.25rem;
  font-size: 1em;
}

/* Revision links */
.revision-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dotted var(--accent);
  transition: all 0.2s ease;
}

.revision-link:hover {
  color: var(--text);
  border-bottom-style: solid;
}

/* Revision badge in card listings */
.revision-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7em;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-weight: 600;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Version indicator (shown when viewing older versions) */
.version-indicator {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.version-indicator .delta {
  color: var(--muted);
  transform: rotate(180deg);
  display: inline-block;
}

.version-indicator a {
  color: var(--accent);
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 500;
}

.version-indicator a:hover {
  text-decoration: underline;
}

/* Mobile responsiveness */
@media (max-width: 900px) {
  .revision-log {
    padding-left: 0.75rem;
    margin-left: -0.25rem;
  }
  
  .revision-badge {
    font-size: 0.65em;
    padding: 0.1em 0.3em;
  }
  
  .author-data {
    font-size: 0.85em;
  }
}

/* For debateables - static revision log (no links) */
.debateable .revision-log .revision-link {
  color: var(--muted);
  border: none;
  cursor: default;
  pointer-events: none;
}

/* Content versioning helpers */
.version-target {
  transition: opacity 0.2s ease;
}

.version-target.switching {
  opacity: 0.6;
}

/* Enhanced card styling for posts with revisions */
.post:has(.revision-badge) {
  border-left: 2px solid var(--accent);
}

.post:has(.revision-badge) .author-data {
  color: var(--accent);
  opacity: 0.8;
}

/* Updated Author and Data & Language styling */
.author-data {
  font-size: 0.9em;
  color: var(--accent); /* Changed to gold color */
  margin: 0.1rem 0 0.75rem 0; /* Reduced top margin to close the gap */
  font-style: italic;
  opacity: 0.9; /* Slightly muted gold */
}

/* For blog post pages - make sure published date has less bottom margin */
.container.narrow .muted:first-of-type {
  margin-bottom: 0.2rem; /* Reduced bottom margin on published date */
}

/* Enhanced card styling for posts with revisions remains the same */
.post:has(.revision-badge) {
  border-left: 2px solid var(--accent);
}

.post:has(.revision-badge) .author-data {
  color: var(--accent);
  opacity: 0.8;
}

/* Construction Banner Styles */
.construction-banner {
  background: linear-gradient(90deg, var(--accent), #D4AF37);
  color: var(--bg);
  padding: 0.5rem 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.banner-content {
  white-space: nowrap;
  animation: scroll-banner 25s linear infinite;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.banner-text {
  display: inline-block;
  animation: marquee 25s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(100vw);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Pause animation on hover */
.construction-banner:hover .banner-text {
  animation-play-state: paused;
}

/* Mobile adjustments */
@media (max-width: 900px) {
  .construction-banner {
    padding: 0.4rem 0;
  }
  
  .banner-content {
    font-size: 0.8rem;
  }
  
  .banner-text {
    animation-duration: 12s;
  }
}

/* Admin pages - reduced height */
.admin-layout .construction-banner {
  padding: 0.3rem 0;
  font-size: 0.8rem;
}
