/* ============================================================
   article.css — 記事ページ共通スタイル
   全記事ページで <link rel="stylesheet" href="/css/article.css"> を読み込むこと
   （base.css は @import 経由で自動適用）
   ============================================================ */

@import url('/css/base.css?v=2');

/* ── Body (article pages) ── */
body {
  font-size: 1.1rem;
  line-height: 1.9;
  padding: 60px 20px 80px;
  max-width: 680px;
  margin: 0 auto;
}

/* ── Nav ── */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.back-link:hover { text-decoration: underline; }

/* ── Hero ── */
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  margin-bottom: 32px;
  text-align: center;
}

.hero-emoji {
  font-size: 3.2rem;
  display: block;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  line-height: 1.5;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-meta {
  font-size: 0.95rem;
  color: var(--text-sub);
}

/* ── Article body ── */
.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin: 40px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  line-height: 1.5;
  scroll-margin-top: 60px;
}

.article-body p {
  margin-bottom: 18px;
  color: var(--text);
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
  margin-bottom: 18px;
}

.article-body ul li,
.article-body ol li {
  margin-bottom: 10px;
}

/* ── Callout box ── */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 1.1rem;
}

.callout-title {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.callout-danger {
  border: 1px solid #ef4444;
}

.callout-danger .callout-title {
  color: #ef4444;
}

/* ── Step box (操作手順) ── */
.step-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 20px 0;
}

.step-box-title {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.step-box ol {
  padding-left: 1.4em;
  margin: 0;
}

.step-box li {
  margin-bottom: 8px;
  line-height: 1.7;
}

/* ── Author note ── */
.author-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 40px 0 0;
  font-size: 0.95rem;
  color: var(--text-sub);
  line-height: 1.8;
}

.author-note strong {
  color: var(--text);
}

/* ── TOC ── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 32px;
}

.toc-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.toc ol {
  padding-left: 1.4em;
  margin: 0;
}

.toc li {
  margin-bottom: 6px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.toc a {
  color: var(--accent);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* ── Summary box ── */
.summary-box {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 28px;
}

.summary-box-title {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.summary-box ul {
  padding-left: 1.4em;
  margin: 0;
}

.summary-box li {
  margin-bottom: 6px;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* ── FAQ ── */
.faq-section {
  margin-top: 40px;
}

.faq-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 20px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  line-height: 1.5;
  scroll-margin-top: 60px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.faq-q {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.faq-a {
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ── Compare table ── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.compare-table th {
  background: var(--surface);
  font-weight: 700;
  color: var(--accent);
}

.compare-table td {
  color: var(--text);
}

/* ── Related articles ── */
.related-articles {
  margin-top: 40px;
}

.related-articles h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.related-link {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.15s;
}

.related-link:hover {
  border-color: var(--accent);
}

/* ── Footer ── */
footer {
  text-align: center;
  margin-top: 48px;
  font-size: 0.95rem;
  color: var(--text-sub);
  line-height: 1.8;
}
