/* Notion Design System - solarpunk-lifestyle blog */
:root {
  --blog-bg: #f0fdf4;
  --blog-surface: #ffffff;
  --blog-surface-muted: #ecfdf5;
  --blog-text: #1f2937;
  --blog-muted: #647267;
  --blog-border: rgba(22, 163, 74, 0.16);
  --blog-primary: #16a34a;
  --blog-secondary: #15803d;
  --blog-accent: #f59e0b;
  --blog-shadow: 0 12px 30px rgba(22, 163, 74, 0.10);
  --sidebar-width: 300px;
  --blog-font: 'Inter', 'Noto Sans JP', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.blog-main-shell {
  background: radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.18), transparent 30%), linear-gradient(180deg, #f7fff8 0%, var(--blog-bg) 100%);
  color: var(--blog-text);
  font-family: var(--blog-font);
  padding: 48px 0 72px;
}

.blog-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.blog-main,
.blog-article-main {
  min-width: 0;
}

.blog-hero,
.article-header,
.article-body,
.blog-card,
.sidebar-card,
.amazon-ad-box {
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  box-shadow: var(--blog-shadow);
}

.blog-hero,
.article-header {
  margin-bottom: 24px;
  padding: 32px;
}

.blog-eyebrow,
.sidebar-label,
.card-category {
  color: var(--blog-primary);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.blog-hero h1,
.article-header h1 {
  color: var(--blog-text);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin: 0 0 16px;
}

.blog-lead,
.article-meta {
  color: var(--blog-muted);
  font-size: 1rem;
  line-height: 1.85;
  margin: 0;
}

.blog-toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 16px 0 20px;
}

.blog-toolbar h2 {
  font-size: 1.35rem;
  margin: 0;
}

.blog-count {
  color: var(--blog-muted);
  font-size: 0.9rem;
}

.blog-grid {
  display: grid;
  gap: 18px;
}

.blog-card {
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.blog-card:hover {
  border-color: rgba(22, 163, 74, 0.42);
  box-shadow: 0 16px 38px rgba(22, 163, 74, 0.16);
  transform: translateY(-2px);
}

.blog-card a,
.blog-card.empty-state {
  color: inherit;
  display: block;
  padding: 24px;
  text-decoration: none;
}

.blog-card.empty-state {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(245, 158, 11, 0.12));
}

.blog-card h3 {
  color: var(--blog-text);
  font-size: 1.2rem;
  line-height: 1.45;
  margin: 0 0 10px;
}

.blog-card p {
  color: var(--blog-muted);
  line-height: 1.75;
  margin: 0;
}

.card-meta {
  color: var(--blog-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.86rem;
  margin-bottom: 12px;
}

.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 96px;
}

.sidebar-card,
.amazon-ad-box {
  padding: 20px;
}

.sidebar-card h3,
.amazon-ad-box h2 {
  color: var(--blog-text);
  font-size: 1rem;
  margin: 0 0 12px;
}

.sidebar-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-card li {
  border-top: 1px solid var(--blog-border);
  color: var(--blog-muted);
  padding: 10px 0;
}

.sidebar-card li:first-child {
  border-top: 0;
}

.sidebar-card a,
.back-to-blog a {
  color: var(--blog-primary);
  font-weight: 700;
  text-decoration: none;
}

.sidebar-card a:hover,
.back-to-blog a:hover {
  color: var(--blog-secondary);
}

.amazon-ad-box {
  background: linear-gradient(135deg, #fff8ec, #ffffff 55%, #f0fdf4);
  border-style: dashed;
  text-align: center;
}

.amazon-ad-box p,
.sitenavi-embed p {
  color: var(--blog-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
}

.sitenavi-embed {
  min-height: 120px;
}

.article-body {
  color: var(--blog-text);
  font-size: 1rem;
  line-height: 1.9;
  padding: 32px;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--blog-text);
  letter-spacing: -0.02em;
  margin: 2em 0 0.7em;
}

.article-body p,
.article-body li {
  color: var(--blog-text);
}

.article-body img {
  border-radius: 8px;
  height: auto;
  max-width: 100%;
}

.back-to-blog {
  margin-top: 24px;
}

.skip-link {
  background: var(--blog-primary);
  color: #ffffff;
  left: 12px;
  padding: 8px 12px;
  position: absolute;
  top: -48px;
  z-index: 1100;
}

.skip-link:focus {
  top: 12px;
}

@media (max-width: 768px) {
  .blog-main-shell {
    padding: 28px 0 48px;
  }

  .blog-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .blog-sidebar {
    position: static;
  }

  .blog-hero,
  .article-header,
  .article-body {
    padding: 22px;
  }

  .blog-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* === batch20 blog index cards === */
.blog-index-main { padding: 40px 0 72px; }
.blog-index-main .blog-hero { margin-bottom: 16px; }
.blog-index-main .blog-toolbar { margin: 8px 0 22px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 22px; align-items: stretch; }
.blog-card { overflow: hidden; }
.blog-card > a { padding: 0; display: flex; flex-direction: column; height: 100%; }
.card-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: rgba(0,0,0,.05); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.blog-card:hover .card-thumb img { transform: scale(1.05); }
.card-body { padding: 16px 18px; }
.card-body time { display: block; font-size: .78rem; opacity: .65; margin-bottom: 6px; letter-spacing: .02em; }
.card-body h3 { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.45; }
.card-body p { margin: 0; font-size: .85rem; line-height: 1.6; opacity: .82; }
.blog-card.no-thumb > a { padding: 18px; }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }
/* === end batch20 === */

/* CSS 未定義だった記事ヒーロー画像（.hero-image は装飾用の別物なので
   img 要素に限定して指定する） */
.blog-hero-image,
img.article-hero-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2rem;
}

/* Mobile news-commentary readability baseline (shared site-local rule). */
@media (max-width: 768px) {
  .blog-main, .blog-container, .two-col-layout { min-width: 0; }
  .article-detail, .blog-article, .article-body { min-width: 0; }
  .article-detail .article-body, .blog-article { padding-inline: 16px; }
  .article-content {
    box-sizing: border-box;
    font-size: 1rem;
    line-height: 1.85;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
  }
  .article-content h2 { font-size: clamp(1.25rem, 6vw, 1.45rem); line-height: 1.4; }
  .article-content h3 { font-size: clamp(1.12rem, 5vw, 1.25rem); line-height: 1.45; }
  .article-content :is(img, iframe, video) { max-width: 100%; height: auto; }
  .article-content table { display: block; max-width: 100%; overflow-x: auto; }
  .sidebar, .blog-sidebar { position: static; order: 2; }
}

/* Blog index card grid fallback: scoped to index-only markup. */
.blog-index-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.blog-index-main { min-width: 0; }

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

.blog-index-grid .blog-card { display: flex; flex-direction: column; }

.blog-index-grid .blog-card > a {
  color: inherit;
  text-decoration: none;
}

.blog-index-grid .card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.blog-index-grid .card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-index-grid .card-body { padding: 24px; }

@media (max-width: 1200px) {
  .blog-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .blog-index-layout { grid-template-columns: 1fr; }
  .blog-index-grid { grid-template-columns: 1fr; }
}
/* Mobile article reading width: keep outer page gutters, remove duplicated inner gutters. */
@media (max-width: 768px) {
  .article-content,
  .article-detail .article-body,
  .blog-article,
  .main-content > article.main-content {
    padding-left: 0;
    padding-right: 0;
  }
  /* Cap article-panel padding without removing deliberate card framing. */
  .article-panel,
  .article-main,
  .post-content,
  .article-detail {
    padding-left: min(16px, 4vw);
    padding-right: min(16px, 4vw);
  }
  .article-body { padding-left: 0; padding-right: 0; }
}
