/*
Theme Name: Jitsumuai
Theme URI: https://jitsumuai.com
Author: 非IT職のAI仕事術
Description: AI活用メディア専用テーマ。元のAstroデザインを忠実に再現。
Version: 2.0.0
License: Private
Text Domain: jitsumuai
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;700&display=swap');

/* ─── Design Tokens ─── */
:root {
  --color-bg:           #f8fafc;
  --color-surface:      #ffffff;
  --color-border:       #e2e8f0;
  --color-border-hover: #cbd5e1;
  --color-text:         #0f172a;
  --color-text-sub:     #475569;
  --color-text-muted:   #94a3b8;
  --color-accent:       #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-bg:    #eff6ff;
  --color-accent-border:#bfdbfe;
  --shadow-card:        0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
  --shadow-card-hover:  0 8px 24px rgba(37,99,235,.10),0 2px 8px rgba(0,0,0,.06);
  --radius:             0.75rem;
  --transition:         200ms cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── Scroll Animation ─── */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
[data-animate].is-visible { opacity: 1; transform: translateY(0); }
[data-animate-delay="1"] { transition-delay: 0.1s; }
[data-animate-delay="2"] { transition-delay: 0.2s; }
[data-animate-delay="3"] { transition-delay: 0.3s; }
[data-animate-delay="4"] { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
  [data-animate] { opacity: 1; transform: none; transition: none; }
}
@media (scripting: none) {
  [data-animate] { opacity: 1 !important; transform: none !important; }
}

/* ─── Layout ─── */
.site-wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .site-wrap { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .site-wrap { padding: 0 2rem; } }

/* ─── Header ─── */
#site-header {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,232,240,0.8);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow var(--transition);
}
#site-header.scrolled { box-shadow: 0 4px 6px -1px rgba(0,0,0,.07),0 2px 4px -2px rgba(0,0,0,.07); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .header-inner { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .header-inner { padding: 0 2rem; } }

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.logo-icon {
  width: 2rem; height: 2rem;
  border-radius: 0.5rem;
  background: #2563eb;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.75rem; font-weight: 700;
  flex-shrink: 0;
  transition: background var(--transition);
}
.header-logo:hover .logo-icon { background: #1d4ed8; }
.logo-text-main {
  font-weight: 700; font-size: 0.875rem;
  color: #0f172a; letter-spacing: -0.01em;
  transition: color var(--transition);
}
.header-logo:hover .logo-text-main { color: #2563eb; }
.logo-text-sub {
  display: none;
  font-size: 0.75rem;
  color: #94a3b8;
}
@media (min-width: 640px) { .logo-text-sub { display: block; } }

.header-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
@media (min-width: 768px) { .header-nav { display: flex; } }
.header-nav a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem; font-weight: 500;
  color: #475569;
  border-radius: 0.5rem;
  transition: all var(--transition);
}
.header-nav a:hover, .header-nav a.current { background: #eff6ff; color: #1d4ed8; }

.menu-btn {
  display: flex;
  padding: 0.5rem;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition);
}
.menu-btn:hover { color: #334155; background: #f1f5f9; }
@media (min-width: 768px) { .menu-btn { display: none; } }

/* モバイルメニュー */
#mobile-menu {
  display: none;
  border-top: 1px solid #f1f5f9;
  background: white;
}
#mobile-menu.is-open { display: block; }
/* .hidden クラスで非表示 → hidden削除で表示（JSが切り替え） */
#mobile-menu:not(.hidden) { display: block; }
#mobile-menu nav {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
#mobile-menu a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem; font-weight: 500;
  color: #334155;
  border-radius: 0.5rem;
  transition: all var(--transition);
}
#mobile-menu a:hover { color: #2563eb; background: #eff6ff; }

/* ─── Hero ─── */
#hero {
  position: relative;
  background: linear-gradient(to bottom right, #0f172a, #0c2550, #0f172a);
  color: white;
  overflow: hidden;
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
}
.hero-glow-1 {
  position: absolute; top: 25%; left: 33%;
  width: 24rem; height: 24rem;
  border-radius: 50%;
  background: rgba(37,99,235,0.2);
  filter: blur(64px);
}
.hero-glow-2 {
  position: absolute; bottom: 25%; right: 25%;
  width: 16rem; height: 16rem;
  border-radius: 50%;
  background: rgba(124,58,237,0.15);
  filter: blur(64px);
}
.hero-content {
  position: relative;
  max-width: 72rem; margin: 0 auto;
  padding: 5rem 1rem;
}
@media (min-width: 640px) { .hero-content { padding: 7rem 1.5rem; } }
@media (min-width: 1024px) { .hero-content { padding: 7rem 2rem; } }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59,130,246,0.2);
  border: 1px solid rgba(96,165,250,0.3);
  color: #93c5fd;
  font-size: 0.75rem; font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}
.hero-badge-dot {
  width: 0.375rem; height: 0.375rem;
  border-radius: 50%;
  background: #60a5fa;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

.hero-h1 {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: clamp(1.875rem, 5vw, 3rem);
  line-height: 1.25;
  color: white;
  margin-bottom: 1.5rem;
}
.hero-lead {
  color: #cbd5e1;
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 32rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}
.btn-primary-hero {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #2563eb; color: white;
  font-weight: 600; font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary-hero:hover {
  background: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37,99,235,0.25);
}
.btn-secondary-hero {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-weight: 500; font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all var(--transition);
  text-decoration: none;
  backdrop-filter: blur(4px);
}
.btn-secondary-hero:hover { background: rgba(255,255,255,0.2); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 3.5rem;
}
.hero-stat-num { font-size: 1.5rem; font-weight: 700; color: white; }
.hero-stat-label { font-size: 0.75rem; color: #94a3b8; margin-top: 0.125rem; }

/* ─── Section commons ─── */
.section-eyebrow {
  font-size: 0.75rem; font-weight: 600;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  color: #0f172a;
}

/* ─── Category Grid ─── */
.category-section { padding: 3.5rem 0; }
.category-section-header { text-align: center; margin-bottom: 2.5rem; }
.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .cat-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }

.cat-card {
  display: block;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 2px solid;
  transition: all 0.3s ease;
  text-decoration: none;
}
.cat-card:hover { transform: translateY(-4px); }
.cat-card-blue    { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.cat-card-violet  { background: #f5f3ff; border-color: #ddd6fe; color: #7c3aed; }
.cat-card-orange  { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.cat-card-emerald { background: #ecfdf5; border-color: #a7f3d0; color: #059669; }
.cat-card-blue:hover    { border-color: #3b82f6; }
.cat-card-violet:hover  { border-color: #8b5cf6; }
.cat-card-orange:hover  { border-color: #f97316; }
.cat-card-emerald:hover { border-color: #10b981; }
.cat-card-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.cat-card-title { font-weight: 700; color: #0f172a; font-size: 0.875rem; margin-bottom: 0.375rem; line-height: 1.4; }
.cat-card-desc  { font-size: 0.75rem; color: #64748b; line-height: 1.6; }

/* ─── Article Cards ─── */
.articles-section { padding-bottom: 4rem; }
.articles-section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 2rem;
}
.view-all-link {
  display: flex; align-items: center; gap: 0.25rem;
  font-size: 0.875rem; font-weight: 500;
  color: #2563eb;
  text-decoration: none;
  transition: color var(--transition);
}
.view-all-link:hover { color: #1d4ed8; }
.view-all-link span { transition: transform var(--transition); }
.view-all-link:hover span { transform: translateX(4px); }

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .articles-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .articles-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* 記事カード */
.article-card {
  display: flex; flex-direction: column;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: var(--shadow-card);
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: #bfdbfe;
}
.card-thumb-wrap {
  position: relative; overflow: hidden;
  height: 10rem;
}
.card-thumb {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.article-card:hover .card-thumb { transform: scale(1.05); }
.card-thumb-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.2) 0%, transparent 100%);
}
.card-top-bar { height: 0.25rem; width: 100%; }
.card-top-bar-blue    { background: #2563eb; }
.card-top-bar-violet  { background: #7c3aed; }
.card-top-bar-orange  { background: #ea580c; }
.card-top-bar-emerald { background: #059669; }
.card-top-bar-default { background: #2563eb; }

.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.card-date { font-size: 0.75rem; color: #94a3b8; }

.badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem; font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
}
.badge-dot { width: 0.375rem; height: 0.375rem; border-radius: 50%; }
.badge-ai      { background: #eff6ff; color: #1d4ed8; }
.badge-ai .badge-dot { background: #3b82f6; }
.badge-agent   { background: #f5f3ff; color: #6d28d9; }
.badge-agent .badge-dot { background: #7c3aed; }
.badge-mfg     { background: #fff7ed; color: #c2410c; }
.badge-mfg .badge-dot { background: #f97316; }
.badge-career  { background: #ecfdf5; color: #065f46; }
.badge-career .badge-dot { background: #10b981; }
.badge-default { background: #f8fafc; color: #475569; }
.badge-default .badge-dot { background: #94a3b8; }

.card-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.9375rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.article-card:hover .card-title { color: #1d4ed8; }
.card-excerpt {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
  flex: 1;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
  margin-top: auto;
}
.card-read-more {
  font-size: 0.75rem; font-weight: 500;
  color: #2563eb;
  transition: transform var(--transition);
  display: flex; align-items: center; gap: 0.25rem;
}
.article-card:hover .card-read-more { transform: translateX(4px); }

.more-btn-wrap {
  text-align: center;
  margin-top: 2.5rem;
}
.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 2px solid #2563eb;
  color: #2563eb;
  font-weight: 600; font-size: 0.9375rem;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  transition: all var(--transition);
  text-decoration: none;
  background: transparent;
}
.btn-outline:hover { background: #2563eb; color: white; }

/* ─── About Section ─── */
.about-section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--color-border);
}
.about-card {
  background: linear-gradient(to bottom right, #0f172a, #0c2550);
  border-radius: 1rem;
  overflow: hidden;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-left {
  padding: 2.5rem;
}
@media (min-width: 640px) { .about-left { padding: 3rem; } }
.about-eyebrow { font-size: 0.75rem; font-weight: 600; color: #60a5fa; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.about-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700; color: white;
  margin-bottom: 1rem; line-height: 1.4;
}
.about-desc { color: #94a3b8; font-size: 0.875rem; line-height: 1.8; margin-bottom: 1.5rem; }
.about-link { font-size: 0.875rem; font-weight: 500; color: #60a5fa; text-decoration: none; transition: color var(--transition); }
.about-link:hover { color: #93c5fd; }
.about-right {
  padding: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
@media (min-width: 640px) { .about-right { border-top: none; border-left: 1px solid rgba(255,255,255,0.1); padding: 3rem; } }
.feature-list { display: flex; flex-direction: column; gap: 1.25rem; list-style: none; }
.feature-item { display: flex; gap: 1rem; }
.feature-icon { font-size: 1.25rem; margin-top: 0.125rem; }
.feature-title { font-weight: 600; color: white; font-size: 0.875rem; }
.feature-desc { color: #94a3b8; font-size: 0.75rem; margin-top: 0.125rem; line-height: 1.6; }

/* ─── Footer ─── */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  margin-top: 5rem;
}
.footer-inner {
  max-width: 72rem; margin: 0 auto;
  padding: 3.5rem 1rem 2rem;
}
@media (min-width: 640px) { .footer-inner { padding: 3.5rem 1.5rem 2rem; } }
@media (min-width: 1024px) { .footer-inner { padding: 3.5rem 2rem 2rem; } }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-logo-icon { width: 2rem; height: 2rem; border-radius: 0.5rem; background: #3b82f6; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.75rem; font-weight: 700; }
.footer-logo-text { font-weight: 700; color: white; font-size: 0.9375rem; }
.footer-tagline { font-size: 0.875rem; line-height: 1.7; color: #64748b; max-width: 20rem; }
.footer-col-title { font-size: 0.75rem; font-weight: 600; color: #e2e8f0; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }
.footer-links a { font-size: 0.875rem; color: #64748b; text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.footer-copy { font-size: 0.75rem; color: #475569; }
.footer-affiliate-note { font-size: 0.75rem; color: #475569; }

/* ─── Single Post ─── */
.single-container {
  max-width: 72rem; margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 640px) { .single-container { padding: 2.5rem 1.5rem; } }
@media (min-width: 1024px) {
  .single-container { grid-template-columns: 1fr 320px; padding: 2.5rem 2rem; gap: 3rem; }
}
.article-eyecatch {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}
.article-header-meta {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.article-h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.375rem, 3.5vw, 1.875rem);
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}
.article-date { font-size: 0.8125rem; color: #94a3b8; }

/* ─── Prose (記事本文) ─── */
.prose {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-text);
}
.prose h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 700;
  color: #0f172a;
  margin-top: 2.5em; margin-bottom: 0.8em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid #eff6ff;
  position: relative;
}
.prose h2::before {
  content: '';
  position: absolute; bottom: -2px; left: 0;
  width: 3rem; height: 2px;
  background: #2563eb;
}
.prose h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700; color: #0f172a;
  margin-top: 1.8em; margin-bottom: 0.6em;
  padding-left: 0.75em;
  border-left: 3px solid #2563eb;
}
.prose p { margin-bottom: 1.4em; }
.prose strong { color: #0f172a; font-weight: 700; }
.prose a { color: #2563eb; text-decoration: underline; text-decoration-color: #bfdbfe; text-underline-offset: 3px; transition: color var(--transition); }
.prose a:hover { color: #1d4ed8; }
.prose ul > li { padding-left: 0.5em; margin-bottom: 0.4em; }
.prose ul > li::marker { color: #2563eb; }
.prose ol > li { margin-bottom: 0.4em; }
.prose blockquote {
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1em 1.25em;
  color: #475569;
  margin: 1.5em 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table { font-size: 0.9em; width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.prose thead th { background: #eff6ff; color: #1d4ed8; font-weight: 700; padding: 0.6em 0.9em; text-align: left; border-bottom: 2px solid #bfdbfe; }
.prose tbody td { padding: 0.55em 0.9em; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
.prose tbody tr:hover td { background: #f8fafc; }
.prose pre { background: #1e293b; color: #e2e8f0; border-radius: var(--radius); padding: 1.25em; overflow-x: auto; font-size: 0.875em; line-height: 1.7; margin: 1.5em 0; }
.prose code { background: #f1f5f9; color: #e11d48; padding: 0.1em 0.4em; border-radius: 0.3em; font-size: 0.875em; }
.prose pre code { background: transparent; color: inherit; padding: 0; }
.prose hr { border: none; border-top: 1px solid #e2e8f0; margin: 2em 0; }
.prose img { border-radius: var(--radius); }

/* ─── Sidebar ─── */
.sidebar-widget {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}
.sidebar-widget-title {
  font-size: 0.8125rem; font-weight: 700;
  color: #0f172a;
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 2px solid #eff6ff;
}
.sidebar-cat-list { list-style: none; display: flex; flex-direction: column; gap: 0.375rem; }
.sidebar-cat-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem; color: #334155;
  border-radius: 0.5rem;
  transition: all var(--transition);
  text-decoration: none;
}
.sidebar-cat-list a:hover { background: #eff6ff; color: #1d4ed8; }
.sidebar-cat-count { font-size: 0.75rem; color: #94a3b8; }
.affiliate-banner {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: white;
  margin-bottom: 1.5rem;
}
.affiliate-banner-label {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  font-size: 0.625rem; font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.affiliate-banner-title { font-size: 0.875rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.affiliate-banner-desc { font-size: 0.75rem; color: rgba(255,255,255,0.8); line-height: 1.6; margin-bottom: 1rem; }
.affiliate-banner-btn {
  display: block;
  background: white; color: #1d4ed8;
  font-size: 0.8125rem; font-weight: 700;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition);
}
.affiliate-banner-btn:hover { background: #eff6ff; transform: translateY(-1px); }
.affiliate-banner-note { font-size: 0.6875rem; color: rgba(255,255,255,0.5); margin-top: 0.5rem; }
.affiliate-banner-udemy { background: linear-gradient(135deg, #7c2d12, #c2410c); }

/* ─── Pagination ─── */
.pagination {
  display: flex; justify-content: center;
  gap: 0.375rem; margin-top: 2.5rem; flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem; color: #475569;
  text-decoration: none;
  transition: all var(--transition);
}
.pagination a:hover { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.pagination .current { background: #2563eb; color: white; border-color: #2563eb; }
.nav-links { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.nav-links a { display: inline-block; padding: 0.5rem 1rem; border: 1px solid #e2e8f0; border-radius: 0.5rem; font-size: 0.875rem; color: #475569; text-decoration: none; transition: all var(--transition); }
.nav-links a:hover { border-color: #2563eb; color: #2563eb; }

/* ─── Archive header ─── */
.archive-header {
  padding: 2rem 0 1.5rem;
}
.archive-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 700; color: #0f172a;
}
.archive-desc { font-size: 0.875rem; color: #64748b; margin-top: 0.5rem; }

/* ─── Utilities ─── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
.hidden { display: none !important; }
.mb-4 { margin-bottom: 1rem; }
.text-center { text-align: center; }

/* ─── Header (PHP template class aliases) ─── */
.site-header {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,232,240,0.8);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow 200ms ease;
}
.site-header.shadow-active { box-shadow: 0 4px 6px -1px rgba(0,0,0,.07),0 2px 4px -2px rgba(0,0,0,.07); }
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .header-content { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .header-content { padding: 0 2rem; } }

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.site-logo .logo-icon {
  width: 2rem; height: 2rem;
  border-radius: 0.5rem;
  background: #2563eb;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.75rem; font-weight: 700;
  flex-shrink: 0;
  transition: background 200ms ease;
}
.site-logo:hover .logo-icon { background: #1d4ed8; }
.logo-name {
  font-weight: 700; font-size: 0.875rem;
  color: #0f172a; letter-spacing: -0.01em;
  transition: color 200ms ease;
}
.site-logo:hover .logo-name { color: #2563eb; }
.logo-tagline { display: none; font-size: 0.75rem; color: #94a3b8; }
@media (min-width: 640px) { .logo-tagline { display: block; } }

.primary-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
@media (min-width: 768px) { .primary-nav { display: flex; } }
.nav-link {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem; font-weight: 500;
  color: #475569;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 200ms ease;
}
.nav-link:hover, .nav-link.active { background: #eff6ff; color: #1d4ed8; }

.menu-icon { width: 1.25rem; height: 1.25rem; }

.mobile-menu {
  border-top: 1px solid #f1f5f9;
  background: white;
}
.mobile-nav {
  max-width: 72rem; margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.mobile-nav-link {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem; font-weight: 500;
  color: #334155;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 200ms ease;
}
.mobile-nav-link:hover { color: #2563eb; background: #eff6ff; }

/* ─── Hero (PHP template) ─── */
.hero {
  position: relative;
  background: linear-gradient(to bottom right, #0f172a, #0c2550, #0f172a);
  color: white;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  max-width: 72rem; margin: 0 auto;
  padding: 5rem 1rem;
}
@media (min-width: 640px) { .hero-inner { padding: 7rem 1.5rem; } }
@media (min-width: 1024px) { .hero-inner { padding: 7rem 2rem; } }
.hero-title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: clamp(1.875rem, 5vw, 3rem);
  line-height: 1.25;
  color: white;
  margin-bottom: 1.5rem;
}
.hero-br { display: none; }
@media (min-width: 640px) { .hero-br { display: block; } }
.hero-desc {
  color: #cbd5e1;
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 32rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #2563eb; color: white;
  font-weight: 600; font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 200ms ease;
}
.btn-primary:hover {
  background: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37,99,235,0.25);
}
.btn-icon { width: 1rem; height: 1rem; }
.btn-outline-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-weight: 500; font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 200ms ease;
  backdrop-filter: blur(4px);
}
.btn-outline-secondary:hover { background: rgba(255,255,255,0.2); }
.btn-outline-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 2px solid #2563eb;
  color: #2563eb;
  font-weight: 600; font-size: 0.9375rem;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  text-decoration: none;
  background: transparent;
  transition: all 200ms ease;
}
.btn-outline-primary:hover { background: #2563eb; color: white; }

/* ─── Main layout ─── */
.main-container {
  max-width: 72rem; margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .main-container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .main-container { padding: 0 2rem; } }

.container-with-sidebar {
  max-width: 72rem; margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 640px) { .container-with-sidebar { padding: 2.5rem 1.5rem; } }
@media (min-width: 1024px) {
  .container-with-sidebar { grid-template-columns: 1fr 320px; padding: 2.5rem 2rem; gap: 3rem; }
}
.main-content { min-width: 0; }
.sidebar { min-width: 0; }

/* ─── Section helpers ─── */
.section-categories { padding: 3.5rem 0; }
.section-header { margin-bottom: 2.5rem; }
.section-header-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 2rem;
}
.section-latest { padding-bottom: 4rem; }
.section-about {
  padding: 3.5rem 0;
  border-top: 1px solid var(--color-border);
}

.categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .categories-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .categories-grid { grid-template-columns: repeat(4, 1fr); } }

.cat-card-label {
  font-weight: 700; color: #0f172a; font-size: 0.875rem;
  margin-bottom: 0.375rem; line-height: 1.4;
}

.see-all-link {
  display: flex; align-items: center; gap: 0.25rem;
  font-size: 0.875rem; font-weight: 500;
  color: #2563eb; text-decoration: none;
  transition: color 200ms ease;
}
.see-all-link:hover { color: #1d4ed8; }
.see-all-arrow { transition: transform 200ms ease; }
.see-all-link:hover .see-all-arrow { transform: translateX(4px); }

.load-more-wrap { text-align: center; margin-top: 2.5rem; }

/* ─── About section (PHP template) ─── */
.about-list { display: flex; flex-direction: column; gap: 1.25rem; list-style: none; }
.about-item { display: flex; gap: 1rem; }
.about-item-icon { font-size: 1.25rem; margin-top: 0.125rem; }
.about-item-title { font-weight: 600; color: white; font-size: 0.875rem; }
.about-item-desc { color: #94a3b8; font-size: 0.75rem; margin-top: 0.125rem; line-height: 1.6; }

/* ─── Category badge system (from functions.php) ─── */
.cat-badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem; font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  text-decoration: none;
}
.cat-dot { width: 0.375rem; height: 0.375rem; border-radius: 50%; display: inline-block; }
.cat-ai     { background: #eff6ff; color: #1d4ed8; }
.cat-agent  { background: #f5f3ff; color: #6d28d9; }
.cat-mfg    { background: #fff7ed; color: #c2410c; }
.cat-career { background: #ecfdf5; color: #065f46; }
.cat-default { background: #f8fafc; color: #475569; }
.dot-blue    { background: #3b82f6; }
.dot-violet  { background: #7c3aed; }
.dot-orange  { background: #f97316; }
.dot-emerald { background: #10b981; }
.dot-default { background: #94a3b8; }

/* ─── Article card (from functions.php .card) ─── */
.card {
  display: flex; flex-direction: column;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-card);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: #bfdbfe;
}
.card-image { position: relative; overflow: hidden; height: 10rem; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-image img { transform: scale(1.05); }
.card-image-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.2), transparent); }
.card-color-bar { height: 0.25rem; width: 100%; }
.dot-blue.card-color-bar    { background: #2563eb; }
.dot-violet.card-color-bar  { background: #7c3aed; }
.dot-orange.card-color-bar  { background: #ea580c; }
.dot-emerald.card-color-bar { background: #059669; }
.dot-default.card-color-bar { background: #2563eb; }
.card-body {
  padding: 1.25rem; flex: 1;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.card:hover .card-title { color: #1d4ed8; }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.card-tag { font-size: 0.75rem; color: #94a3b8; background: #f8fafc; border: 1px solid #f1f5f9; padding: 0.125rem 0.5rem; border-radius: 0.375rem; }
.card:hover .card-read-more { transform: translateX(4px); }

/* ─── Single post ─── */
.single-hero {
  position: relative;
  background: linear-gradient(to bottom right, #0f172a, #1e3a5f);
  overflow: hidden;
}
.single-hero-image {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.single-hero-overlay { position: absolute; inset: 0; background: rgba(15,23,42,0.75); }
.single-hero-content {
  position: relative;
  max-width: 72rem; margin: 0 auto;
  padding: 3rem 1rem 2.5rem;
}
@media (min-width: 640px) { .single-hero-content { padding: 3.5rem 1.5rem 3rem; } }
@media (min-width: 1024px) { .single-hero-content { padding: 3.5rem 2rem 3rem; } }
.single-hero-inner { max-width: 56rem; }
.single-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.375rem, 3.5vw, 2rem);
  font-weight: 700; color: white;
  line-height: 1.4; margin-bottom: 0.75rem;
}
.single-meta {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; color: #94a3b8;
}
.single-meta-sep { color: #64748b; }
.single-layout { margin-top: 0; padding-top: 2rem; }
.single-article { min-width: 0; }

/* 目次 */
.toc-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.toc-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 700; color: #0f172a;
  margin-bottom: 0.875rem;
}
.toc-icon { width: 1rem; height: 1rem; color: #2563eb; flex-shrink: 0; }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 0.375rem; }
.toc-item a {
  font-size: 0.8125rem; color: #475569; text-decoration: none;
  transition: color 200ms ease; line-height: 1.5;
}
.toc-item a:hover { color: #2563eb; }
.toc-level-2 { padding-left: 0; }
.toc-level-3 { padding-left: 1.25rem; }

/* 著者ボックス */
.author-box {
  display: flex; gap: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 3rem;
}
.author-avatar { flex-shrink: 0; }
.author-icon {
  width: 3rem; height: 3rem;
  border-radius: 50%;
  background: #2563eb;
  color: white; font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.author-info { min-width: 0; }
.author-name { font-weight: 700; font-size: 0.9375rem; color: #0f172a; margin-bottom: 0.375rem; }
.author-label { font-weight: 400; font-size: 0.8125rem; color: #64748b; }
.author-desc { font-size: 0.875rem; color: #475569; line-height: 1.7; margin-bottom: 0.5rem; }
.author-link { font-size: 0.8125rem; font-weight: 500; color: #2563eb; text-decoration: none; }
.author-link:hover { text-decoration: underline; }

/* 関連記事 */
.related-articles { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid #e2e8f0; }
.related-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.25rem; font-weight: 700; color: #0f172a;
  margin-bottom: 1.5rem;
}
.articles-grid-related { grid-template-columns: 1fr; }
@media (min-width: 640px) { .articles-grid-related { grid-template-columns: 1fr 1fr 1fr; } }

/* ─── Sidebar (PHP template) ─── */
.sidebar-profile {
  display: flex; align-items: flex-start; gap: 0.75rem;
  margin-bottom: 0.875rem;
}
.sidebar-profile-icon {
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  background: #2563eb; color: white;
  font-size: 0.625rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-profile-name { font-weight: 700; font-size: 0.9375rem; color: #0f172a; }
.sidebar-profile-desc { font-size: 0.75rem; color: #64748b; line-height: 1.6; margin-top: 0.25rem; }
.sidebar-profile-link {
  display: block;
  font-size: 0.8125rem; font-weight: 500; color: #2563eb;
  text-decoration: none; padding-top: 0.25rem;
}
.sidebar-profile-link:hover { text-decoration: underline; }

.sidebar-categories { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-cat-link {
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; padding: 0.25rem 0;
  transition: all 200ms ease;
}
.sidebar-cat-badge { pointer-events: none; }
.sidebar-cat-count { font-size: 0.75rem; color: #94a3b8; }

.sidebar-popular { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.sidebar-popular-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.sidebar-popular-rank {
  width: 1.5rem; height: 1.5rem;
  background: #eff6ff; color: #2563eb;
  font-size: 0.75rem; font-weight: 700;
  border-radius: 0.375rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-popular-title {
  font-size: 0.8125rem; color: #334155; font-weight: 500;
  line-height: 1.5; text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 200ms ease;
}
.sidebar-popular-title:hover { color: #2563eb; }

.sidebar-cta {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8) !important;
  border: none !important;
  color: white;
}
.sidebar-cta-eyebrow {
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.08em;
  background: rgba(255,255,255,0.2); color: white;
  display: inline-block; padding: 0.125rem 0.375rem;
  border-radius: 0.25rem; margin-bottom: 0.5rem;
}
.sidebar-cta-title { font-size: 0.9375rem; font-weight: 700; color: white; line-height: 1.4; margin-bottom: 0.5rem; }
.sidebar-cta-desc { font-size: 0.75rem; color: rgba(255,255,255,0.8); line-height: 1.6; margin-bottom: 1rem; }
.sidebar-cta-btn {
  display: block;
  background: white; color: #1d4ed8;
  font-size: 0.8125rem; font-weight: 700;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  text-align: center; text-decoration: none;
  transition: all 200ms ease;
}
.sidebar-cta-btn:hover { background: #eff6ff; transform: translateY(-1px); }

/* ─── Page template ─── */
.page-hero {
  background: linear-gradient(to right, #0f172a, #1e3a5f);
  padding: 3rem 1rem 2.5rem;
}
.page-hero-inner { max-width: 72rem; margin: 0 auto; }
@media (min-width: 640px) { .page-hero { padding: 3.5rem 1.5rem 3rem; } }
.page-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700; color: white;
}
.page-article { min-width: 0; }

/* ─── 404 page ─── */
.error-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; padding: 3rem 1rem;
}
.error-inner { text-align: center; }
.error-code { font-size: 6rem; font-weight: 700; color: #e2e8f0; line-height: 1; margin-bottom: 1rem; }
.error-title { font-family: 'Noto Serif JP', serif; font-size: 1.5rem; font-weight: 700; color: #0f172a; margin-bottom: 0.75rem; }
.error-desc { font-size: 0.9375rem; color: #64748b; margin-bottom: 2rem; }

/* ─── No results ─── */
.no-results { padding: 3rem 0; text-align: center; color: #64748b; }

/* ─── Footer (PHP class aliases) ─── */
.footer-logo {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem;
}
.footer-logo-icon {
  width: 2rem; height: 2rem;
  border-radius: 0.5rem; background: #3b82f6;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.75rem; font-weight: 700;
}
.footer-logo-name { font-weight: 700; color: white; font-size: 0.9375rem; }
.footer-desc { font-size: 0.875rem; line-height: 1.7; color: #64748b; max-width: 20rem; }
.footer-col-title { font-size: 0.75rem; font-weight: 600; color: #e2e8f0; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }
.footer-links a { font-size: 0.875rem; color: #64748b; text-decoration: none; transition: color 200ms ease; }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  display: flex; flex-direction: column;
  gap: 0.75rem; align-items: center;
  font-size: 0.75rem; color: #475569;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }

