/* blog.css — shared styles for Trad Tune Explorer blog pages
   Built to match the look/feel of stats pages (dark, glassy panels, green accent).
   Inspired by site styles in stats.css + stats-song-galaxy.css. */

/* ===== Theme tokens ===== */
:root{
  --bg:#0b0f14;
  --panel:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.12);
  --text:#e5e7eb;
  --muted:#94a3b8;
  --accent:#60a5fa;
  --good:#2dff00;
  --warn:#fbbf24;
  --danger:#fb7185;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --radius-lg:18px;
  --radius-md:14px;
}

/* ===== Reset-ish ===== */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(96,165,250,.12), transparent 60%),
    radial-gradient(1200px 800px at 90% 10%, rgba(34,197,94,.10), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(234,179,8,.08), transparent 60%),
    var(--bg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height:1.55;
}

/* ===== Layout ===== */
.page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.header{
  padding:16px 18px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.leftHead{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 280px;
}

.navBtns{
  display:flex;
  gap:10px;
  align-items:center;
}

/* homeBtn + statsBtn (shared with stats pages) */
a.homeBtn, a.statsBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;height:40px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.08);
  color:var(--good);
  text-decoration:none;
  transition:all .15s ease;
}
a.homeBtn:hover, a.statsBtn:hover{
  background:rgba(96,165,250,.22);
  border-color:rgba(96,165,250,.55);
  transform:translateY(-2px);
}
.homeBtn svg, .statsBtn svg{
  width:18px;
  height:18px;
  display:block;
}

.pageTitle{
  margin:0;
  font-size:20px;
  letter-spacing:.2px;
}
.sub{
  margin-top:6px;
  color:var(--muted);
  font-size:12px;
  max-width: 980px;
}

.rightHead{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.badge{
  font-size:11px;
  color:rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
  border-radius:999px;
  padding:6px 10px;
  user-select:none;
}

/* ===== Main container ===== */
.main{
  width:min(1040px, calc(100vw - 36px));
  margin:0 auto 18px;
  flex:1;
}

.panel{
  border-radius:var(--radius-lg);
  border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
  overflow:hidden;
}

.panelInner{
  padding:22px 22px;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  color:var(--muted);
  font-size:12px;
  margin-bottom:10px;
}
.breadcrumbs a{
  color:var(--muted);
  text-decoration:none;
  border-bottom:1px dashed rgba(148,163,184,.35);
}
.breadcrumbs a:hover{
  color:var(--text);
  border-bottom-color:rgba(229,231,235,.65);
}
.breadcrumbs .sep{
  opacity:.6;
}

/* ===== Article typography ===== */
article h1{
  margin:0 0 6px 0;
  font-size:30px;
  line-height:1.15;
  letter-spacing:.2px;
}
.metaRow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
}
.metaRow .dot{ opacity:.55; }

article h2{
  margin:26px 0 10px;
  font-size:20px;
  line-height:1.25;
}
article h3{
  margin:18px 0 10px;
  font-size:16px;
  line-height:1.25;
  color:rgba(229,231,235,.95);
}
article p{ margin:10px 0; }
article ul, article ol{ margin:10px 0 10px 22px; }
article li{ margin:6px 0; }
article a{
  color:var(--accent);
  text-decoration:none;
  border-bottom:1px solid rgba(96,165,250,.35);
}
article a:hover{
  color:#9ac7ff;
  border-bottom-color:rgba(154,199,255,.7);
}

hr{
  border:0;
  border-top:1px solid rgba(255,255,255,.10);
  margin:22px 0;
}

/* ===== TOC ===== */
.toc{
  margin:16px 0 12px;
  padding:14px 14px;
  border-radius:var(--radius-md);
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
}
.toc strong{ display:block; font-size:12px; color:rgba(255,255,255,.86); margin-bottom:6px; }
.toc a{ border-bottom:0; }
.toc ul{ margin:6px 0 0 18px; }

/* ===== Figures / image placeholders ===== */
figure{
  margin:16px 0;
  border-radius:var(--radius-lg);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
}
.figurePlaceholder{
  aspect-ratio: 16 / 9;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  color:rgba(229,231,235,.85);
  background:
    radial-gradient(900px 500px at 20% 20%, rgba(45,255,0,.10), transparent 60%),
    radial-gradient(900px 500px at 80% 50%, rgba(96,165,250,.10), transparent 60%),
    rgba(0,0,0,.22);
  text-align:center;
}
figcaption{
  padding:10px 12px;
  font-size:12px;
  color:var(--muted);
}

/* ===== Callouts ===== */
.callout{
  margin:14px 0;
  padding:12px 14px;
  border-radius:var(--radius-md);
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
}
.callout strong{
  display:block;
  margin-bottom:6px;
  font-size:12px;
  color:rgba(255,255,255,.86);
}
.callout.tip{ border-color: rgba(45,255,0,.22); }
.callout.tip strong{ color: rgba(45,255,0,.92); }
.callout.note{ border-color: rgba(96,165,250,.25); }
.callout.note strong{ color: rgba(96,165,250,.95); }
.callout.warn{ border-color: rgba(251,191,36,.28); }
.callout.warn strong{ color: rgba(251,191,36,.95); }

/* ===== Code blocks ===== */
pre, code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
code{
  font-size: .95em;
  padding: 2px 6px;
  border-radius: 10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}
pre{
  padding:12px 14px;
  overflow:auto;
  border-radius: var(--radius-md);
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
pre code{
  padding:0;
  border:0;
  background: transparent;
}

/* ===== FAQ ===== */
.faq details{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  border-radius: var(--radius-md);
  padding:10px 12px;
  margin:10px 0;
}
.faq summary{
  cursor:pointer;
  color:rgba(229,231,235,.92);
  font-weight:600;
}
.faq summary::-webkit-details-marker{ display:none; }
.faq p{ color:var(--muted); margin:10px 0 0; }

/* ===== Footer ===== */
.footer{
  width:min(1040px, calc(100vw - 36px));
  margin:0 auto 22px;
  color:var(--muted);
  font-size:12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.footer a{ color:var(--muted); border-bottom:1px dashed rgba(148,163,184,.35); }
.footer a:hover{ color:var(--text); border-bottom-color:rgba(229,231,235,.65); }

/* ===== Small screens ===== */
@media (max-width: 720px){
  .panelInner{ padding:16px 16px; }
  article h1{ font-size:24px; }
  .main{ width: calc(100vw - 22px); }
  .footer{ width: calc(100vw - 22px); }
}
figure > img{ display:block; width:100%; height:auto; }
.cardImage{
  aspect-ratio: 16 / 9;
  overflow:hidden;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.cardImage img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .3s ease;
}

.card:hover .cardImage img{
  transform:scale(1.04);
}

.cardBody{
  padding:16px 16px 14px;
}