/* scripts/articles/articles.css */
:root {
  --text: #33302c;
  --text-muted: #716b63;

  --border: #ddd7cf;
  --border-light: #e8e3dc;

  --accent: #806548;
  --accent-dark: #5f4935;

  --accent-bg: #f3eee7;
  --surface: #faf9f7;
}
.text-accent {
  color: var(--accent-dark);
}

.text-underline {
  text-decoration: underline;
  text-decoration-color: #b9a58d;
  text-underline-offset: 3px;
}

.text-muted {
  color: var(--text-muted);
}

.text-accent {
  color: var(--accent-dark);
  font-weight: 600;
}

.text-highlight {
  padding: 0 2px;
  color: var(--accent-dark);
  background: var(--accent-bg);
  font-weight: 600;
}

.article-body strong {
  font-weight: 700;
}

.article-body em {
  font-style: italic;
}




.article-box {
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  background: var(--text-muted);
}
.article-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
}
.article-box p:last-child {
  margin-bottom: 0;
}
.article-box-point {
  border-radius: 8px;
  background: var(--accent-bg);
}
.article-box-note {
  border-left: 4px solid #9a8062;
  background: #f7f3ee;
}
.article-box-info {
  border-left: 4px solid #8c8c8c;
  background: #f5f5f5;
}


* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Noto Sans JP",
    "Yu Gothic",
    sans-serif;

  color: #222;
  background: #fff;
  line-height: 1.8;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
}

.articles-container {
  width: min(100% - 32px, 1000px);
  margin: 0 auto;
  padding: 40px 0 80px;
}

.articles-page-header {
  margin-bottom: 40px;
}

.articles-page-header h1 {
  margin: 10px 0;
}

.articles-home-link {
  text-decoration: none;
}

.article-list {
  display: grid;
  gap: 32px;
}

.article-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;

  padding-bottom: 32px;

  border-bottom: 1px solid #ddd;
}

.article-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-content h2 {
  margin: 8px 0;
  line-height: 1.4;
}

.article-card-content h2 a {
  text-decoration: none;
}

.article-card-content p {
  margin: 8px 0 0;
  color: #555;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.85rem;
  color: #666;
}
.article-category {
  text-decoration: none;
  font-weight: 600;
}
.article {
  max-width: 800px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 32px;
}
.article-header h1 {
  margin: 12px 0;
  line-height: 1.4;
}

.article-description {
  margin: 0;
  color: #555;
}
.article-thumbnail {
  margin: 0 0 40px;
}

.article-thumbnail img {
  display: block;
  width: 100%;
  height: auto;
}
.article-body {
  font-size: 1rem;
}


.article-body a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: #c7b7a3;
  text-underline-offset: 3px;
}
.article-body a:hover {
  color: var(--accent);
}

.article-body h2 {
  position: relative;
  margin: 52px 0 24px;
  padding: 12px 18px;
  color: var(--accent-dark);
  background: var(--accent-bg);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.article-body h2::before,
.article-body h2::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: #b9a58d;
}
.article-body h2::before {
  top: -8px;
}
.article-body h2::after {
  bottom: -8px;
}

.article-body h3 {
  margin-top: 36px;
  line-height: 1.5;
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 32px auto;
}
.article-body figure {
  margin: 32px 0;
}
.article-body figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: #666;
}
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
}
.article-tag {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-dark);
  text-decoration: none;
  font-size: 0.85rem;
}
.article-tag:hover {
  background: var(--accent-bg);
  border-color: #c7b7a3;
}

/* 広告 */
.article-ad {
  width: 100%;
  margin: 32px 0;
}
.article-ad ins {
  display: block;
}
/* ============================================================
   Site Header
   ============================================================ */
.site-header {
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
}
.site-header-inner {
  width: min(100% - 32px, 1100px);
  margin: 0 auto;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav-link {
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav-link:hover {
  text-decoration: underline;
}


/* ============================================================
   Site Footer
   ============================================================ */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid #e5e5e5;
  background: #fafafa;
}
.site-footer-inner {
  width: min(100% - 32px, 1100px);
  margin: 0 auto;
  padding: 32px 0;
}
.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer-nav a {
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
}
.site-footer-nav a:hover {
  text-decoration: underline;
}
.site-footer-copy {
  margin: 20px 0 0;
  color: #777;
  font-size: 0.8rem;
}


/* ============================================================
   Recommended Articles
   ============================================================ */
.recommended-articles {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid #e5e5e5;
}
.recommended-articles h2 {
  margin: 0 0 24px;
  font-size: 1.4rem;
}
.article-list-recommended {
  margin-top: 0;
}


/* =========================
   カテゴリ・タグ
   ========================= */
.article-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.article-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #ddd;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  background: #fafafa;
  font-size: 0.9rem;
  line-height: 1.4;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}
.article-filter-chip:hover {
  background: #f0f0f0;
  border-color: #bbb;
}

/* =========================
   アーカイブ
   ========================= */
.article-archive-label {
  display: block;
  margin-bottom: 8px;
  color: #666;
  font-size: 0.9rem;
}
.article-archive-select {
  width: min(100%, 360px);
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  cursor: pointer;
}


.article-body ul,
.article-body ol {
  margin: 20px 0 28px;
  padding-left: 1.8em;
}
.article-body li {
  margin: 8px 0;
  line-height: 1.8;
}
.article-body ul li::marker {
  color: var(--accent);
}
.article-body ol li::marker {
  color: var(--accent);
  font-weight: 700;
}
.article-body li > ul,
.article-body li > ol {
  margin-top: 8px;
  margin-bottom: 8px;
}




.article-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  -webkit-overflow-scrolling: touch;
}
.article-table-wrapper table {
  min-width: 560px;
  margin: 0;
}

.article-body table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  color: var(--text);
}
.article-body th,
.article-body td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  line-height: 1.6;
}
.article-body th {
  background: var(--accent-bg);
  color: var(--accent-dark);
  font-weight: 600;
}
.article-body td:last-child {
  white-space: nowrap;
}
.article-body td:last-child a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 5px;
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
}
.article-body td:last-child a:hover {
  background: var(--accent);
}




/* mobile */

@media (max-width: 700px) {
  .articles-container {
    width: min(100% - 24px, 1000px);
    padding-top: 24px;
  }

  .article-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}