:root {
  --background: 20 10% 8%;
  --foreground: 40 20% 90%;
  --primary: 38 70% 50%;
  --secondary: 20 8% 18%;
  --gold: 38 70% 50%;
  --gold-light: 40 60% 65%;
  --radius: .375rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  line-height: 1.8;
  font-size: 1rem;
}

a { color: hsl(var(--gold)); text-decoration: none; }
a:hover { text-decoration: underline; opacity: .85; }

/* ── Header ── */
.site-header {
  background-color: hsl(20 10% 5% / .97);
  border-bottom: 1px solid hsl(var(--gold) / .2);
  padding: .9rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}
.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: 'Noto Serif JP', 'Georgia', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: hsl(var(--gold));
  letter-spacing: .08em;
}
.site-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.site-nav a {
  font-size: .875rem;
  color: hsl(var(--foreground) / .75);
  transition: color .2s;
}
.site-nav a:hover { color: hsl(var(--gold)); text-decoration: none; }

/* ── Main layout ── */
.page-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: .78rem;
  color: hsl(var(--foreground) / .45);
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
}
.breadcrumb a { color: hsl(var(--foreground) / .55); }
.breadcrumb a:hover { color: hsl(var(--gold)); text-decoration: none; }

/* ── Article header ── */
.article-date {
  font-size: .8rem;
  color: hsl(var(--gold) / .75);
  margin-bottom: .55rem;
}
.article-title {
  font-family: 'Noto Serif JP', 'Georgia', serif;
  font-size: clamp(1.35rem, 4vw, 1.95rem);
  font-weight: 700;
  line-height: 1.55;
  color: hsl(var(--foreground));
  margin-bottom: 1.1rem;
}
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 2.25rem;
}
.tag {
  font-size: .72rem;
  padding: .18rem .65rem;
  border-radius: 999px;
  background-color: hsl(var(--gold) / .12);
  color: hsl(var(--gold));
  border: 1px solid hsl(var(--gold) / .3);
}

/* ── Footer ── */
.site-footer {
  background-color: hsl(20 10% 4%);
  border-top: 1px solid hsl(var(--gold) / .15);
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: .82rem;
  color: hsl(var(--foreground) / .45);
}
.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 1rem;
}
.footer-nav a { color: hsl(var(--foreground) / .6); font-size: .82rem; }
.footer-nav a:hover { color: hsl(var(--gold)); text-decoration: none; }
.footer-copy { margin-top: .6rem; }

/* ── CTA box ── */
.cta-box {
  margin-top: 3rem;
  padding: 1.75rem;
  border: 1px solid hsl(var(--gold) / .4);
  border-radius: var(--radius);
  background-color: hsl(var(--secondary) / .55);
  text-align: center;
}
.cta-box h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem;
  color: hsl(var(--gold));
  margin-bottom: .7rem;
}
.cta-box p { font-size: .9rem; color: hsl(var(--foreground) / .8); }

/* .blog-content a が gold になるため .cta-btn は高い特異度で上書き */
.cta-btn,
.blog-content .cta-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: .7rem 2rem;
  background-color: hsl(var(--gold));
  color: hsl(20 10% 8%);
  font-weight: 700;
  border-radius: var(--radius);
  font-size: .95rem;
  transition: background-color .2s;
  text-decoration: none;
}
.cta-btn:hover,
.blog-content .cta-btn:hover {
  background-color: hsl(var(--gold-light));
  color: hsl(20 10% 8%);
  text-decoration: none;
}

/* ── Scan table: メインCSSの th{width:33%} を上書き ── */
.article-scan-table th {
  width: auto;
  white-space: nowrap;
}
.article-scan-table td {
  min-width: 80px;
  word-break: normal;
  overflow-wrap: normal;
}
/* .blog-content table の border-collapse:separate を上書き */
.blog-content .article-scan-table {
  border-collapse: collapse;
}

/* ── Blog back link ── */
.back-link { margin-top: 2.5rem; font-size: .875rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .site-nav { gap: .75rem; }
  .site-nav a { font-size: .78rem; }
  .site-logo { font-size: 1.1rem; }
}
