*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f5f6f8;
  color: #1a1a2e;
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-header {
  background: #fff;
  border-bottom: 1px solid #e2e5ea;
  padding: 14px 0;
}
.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header__logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: 0.02em;
}
.site-header__logo:hover { opacity: 0.7; }
.site-header__home-link {
  font-size: 0.8125rem;
  color: #666;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}
.site-header__home-link:hover { color: #1a1a2e; }
.site-header__home-link svg {
  width: 14px; height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d5e 100%);
  color: #fff;
  padding: 56px 24px;
  text-align: center;
}
.hero__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.hero__subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto;
}
.hero.hero--bg-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  aspect-ratio: 16 / 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.hero--bg-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.4);
}
.hero--bg-image .hero__title,
.hero--bg-image .hero__subtitle {
  position: relative;
  z-index: 1;
}
.hero--with-author {
  padding: 48px 24px;
}
.hero--with-author .hero__inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
  text-align: left;
}
.hero__photo {
  flex-shrink: 0;
  width: 120px; height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.hero__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero--with-author .hero__subtitle {
  margin: 0;
}
.hero__author-name {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
  margin-top: 10px;
  font-weight: 500;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container > h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  padding-top: 24px;
  margin-bottom: 4px;
}

.tag-filter {
  padding: 32px 0 8px;
}
.tag-filter__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.tag-filter__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid #d0d5dd;
  background: #fff;
  color: #555;
  user-select: none;
}
.tag-chip:hover {
  border-color: #1a1a2e;
  color: #1a1a2e;
}
.tag-chip--active {
  background: #1a1a2e;
  border-color: #1a1a2e;
  color: #fff;
}
.tag-chip--active:hover {
  background: #2d2d5e;
  border-color: #2d2d5e;
  color: #fff;
}
.tag-chip__count {
  margin-left: 6px;
  font-size: 0.6875rem;
  opacity: 0.6;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 24px 0 64px;
}
@media (max-width: 960px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .article-grid { grid-template-columns: 1fr; }
  .hero { padding: 32px 16px; }
  .hero.hero--bg-image { aspect-ratio: auto; min-height: 180px; padding: 32px 16px; }
  .hero .hero__title { font-size: 1.25rem; }
  .hero .hero__subtitle { font-size: 0.875rem; }
  .hero--with-author .hero__inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .hero--with-author .hero__subtitle { margin: 0 auto; }
  .hero__photo { width: 96px; height: 96px; }
}

.article-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
}
.article-card__thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #e8eaee;
  overflow: hidden;
}
.article-card__thumb img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.article-card:hover .article-card__thumb img {
  transform: scale(1.04);
}
.article-card__thumb--placeholder {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: #bbb;
}
.article-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.article-card__tag {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #5b6abf;
  background: #eef0ff;
  padding: 2px 10px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}
.article-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card__excerpt {
  font-size: 0.8125rem;
  color: #666;
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.article-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: #999;
  border-top: 1px solid #f0f1f3;
  padding-top: 14px;
}
.article-card__author-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #ddd;
  overflow: hidden;
  flex-shrink: 0;
}
.article-card__author-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.article-card__author-name {
  font-weight: 600;
  color: #555;
}
.article-card__date { margin-left: auto; }

.article-card--fade-in {
  animation: fadeInUp 0.3s ease forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #999;
}
.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state__text {
  font-size: 1rem;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
}
.result-count {
  font-size: 0.8125rem;
  color: #888;
}
.result-count strong {
  color: #1a1a2e;
  font-weight: 700;
}
.page-size-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: #888;
}
.page-size-selector__label {
  margin-right: 4px;
}
.page-size-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid #d0d5dd;
  background: #fff;
  color: #555;
  transition: all 0.15s ease;
}
.page-size-btn:hover {
  border-color: #1a1a2e;
  color: #1a1a2e;
}
.page-size-btn--active {
  background: #1a1a2e;
  border-color: #1a1a2e;
  color: #fff;
}
.page-size-btn--active:hover {
  background: #2d2d5e;
  border-color: #2d2d5e;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 32px 0 64px;
}
.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid #d0d5dd;
  background: #fff;
  color: #555;
  transition: all 0.15s ease;
  user-select: none;
}
.pagination__btn:hover:not(:disabled):not(.pagination__btn--active) {
  border-color: #1a1a2e;
  color: #1a1a2e;
}
.pagination__btn--active {
  background: #1a1a2e;
  border-color: #1a1a2e;
  color: #fff;
  cursor: default;
}
.pagination__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-size: 0.875rem;
  color: #999;
  user-select: none;
}
@media (max-width: 600px) {
  .list-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .pagination {
    gap: 2px;
  }
  .pagination__btn {
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    font-size: 0.8125rem;
  }
}

.site-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 32px 24px;
  font-size: 0.8125rem;
}

.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #999;
  font-size: 1rem;
}

.error-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #c62828;
  font-size: 1rem;
}

.seo-article-list-section {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.seo-article-list__heading {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: #1a1a2e;
}
.seo-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  column-count: 2;
  column-gap: 24px;
}
@media (max-width: 600px) {
  .seo-article-list { column-count: 1; }
}
.seo-article-list__item {
  break-inside: avoid;
  margin-bottom: 2px;
}
.seo-article-list__link {
  display: block;
  padding: 8px 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  border-radius: 6px;
}
.seo-article-list__link:hover {
  background: #f4f5f7;
}
.seo-article-list__title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a1a2e;
  line-height: 1.5;
}
.seo-article-list__meta {
  display: block;
  font-size: 0.6875rem;
  color: #aaa;
  margin-top: 2px;
}
.seo-article-list__excerpt {
  display: block;
  font-size: 0.8125rem;
  color: #6c757d;
  margin-top: 2px;
}

.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
}
.breadcrumb__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: #999;
  padding: 0;
  margin: 0;
}
.breadcrumb__item + .breadcrumb__item::before {
  content: "\203A";
  margin-right: 8px;
  color: #ccc;
}
.breadcrumb__item a {
  color: #666;
  text-decoration: none;
}
.breadcrumb__item a:hover {
  color: #1a1a2e;
  text-decoration: underline;
}

.page-intro {
  padding: 20px 0 8px;
}
.page-intro p {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.8;
  margin: 0;
}

/* ===== Custom CSS ===== */
/* ===== AITRADERLAB カスタムCSS（可読性重視・修正版） ===== */

/* ------------------------------
   記事ページ
------------------------------ */
.article-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px;
  background: #ffffff;
  color: #1f2937;
  line-height: 1.9;
  font-size: 16px;
}

/* 見出し */
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  color: #111827;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 2.2em;
  margin-bottom: 0.8em;
}

.article-body h1 {
  font-size: 2.2rem;
}

.article-body h2 {
  font-size: 1.8rem;
  border-left: 6px solid #00c8ff;
  padding-left: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e5e7eb;
}

.article-body h3 {
  font-size: 1.4rem;
  padding-bottom: 6px;
  border-bottom: 1px solid #d1d5db;
}

.article-body h4 {
  font-size: 1.15rem;
}

/* 本文 */
.article-body p,
.article-body li,
.article-body dd,
.article-body dt {
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

/* リスト */
.article-body ul,
.article-body ol {
  margin: 1em 0 1.5em 1.5em;
  padding: 0;
}

.article-body li {
  margin-bottom: 0.5em;
}

/* 太字・斜体 */
.article-body strong {
  color: #111827;
  font-weight: 700;
}

.article-body em {
  color: #4b5563;
}

/* リンク */
.article-body a {
  color: #009fe8;
  text-decoration: none;
  font-weight: 500;
}

.article-body a:hover {
  color: #0077b6;
  text-decoration: underline;
}

/* 画像 */
.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: 10px;
}

/* 引用 */
.article-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: #f3f8fb;
  border-left: 4px solid #00c8ff;
  color: #374151;
  border-radius: 8px;
}

/* コード */
.article-body code {
  background: #f3f4f6;
  color: #111827;
  padding: 0.2em 0.45em;
  border-radius: 4px;
  font-size: 0.95em;
}

.article-body pre {
  background: #111827;
  color: #f9fafb;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
}

/* テーブル */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: #ffffff;
}

.article-body th,
.article-body td {
  border: 1px solid #d1d5db;
  padding: 12px 14px;
  text-align: left;
  color: #374151;
}

.article-body thead th {
  background: #f3f4f6;
  color: #111827;
  font-weight: 700;
}

/* 著者フッター */
.author-footer-container {
  margin-top: 56px;
  padding: 24px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  color: #374151;
}

/* 戻るリンク */
.back-to-index a {
  display: inline-block;
  margin-top: 20px;
  color: #009fe8;
  text-decoration: none;
  font-weight: 600;
}

.back-to-index a:hover {
  text-decoration: underline;
}

/* ------------------------------
   ヒーローセクション
------------------------------ */
.hero {
  position: relative;
  padding: 100px 20px;
  text-align: center;
  background:
    linear-gradient(rgba(8, 15, 35, 0.45), rgba(8, 15, 35, 0.45)),
    linear-gradient(135deg, #0f172a 0%, #13203f 50%, #0b1220 100%);
  color: #ffffff;
  overflow: hidden;
}

.hero--bg-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 35, 0.45);
  z-index: 1;
}

.hero__title,
.hero__subtitle {
  position: relative;
  z-index: 2;
}

.hero__title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero__subtitle {
  margin-top: 18px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

/* ------------------------------
   記事一覧ページ
------------------------------ */
.article-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: #b6e9ff;
  box-shadow: 0 12px 28px rgba(0, 159, 232, 0.10);
}