/* ============================================================
   FX Rescue — 海外FXトラブル解決ラボ
   Design A: Dark Gray × Teal
   ============================================================ */

/* ── CSS Variables ── */
:root {
  --bg-primary: #1a1d23;
  --bg-secondary: #22262e;
  --bg-card: #2a2f38;
  --bg-card-hover: #323844;
  --bg-code: #1e222a;
  --text-primary: #e8eaed;
  --text-secondary: #9aa0a8;
  --text-muted: #6b7280;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.12);
  --accent-hover: #5eead4;
  --accent-dark: #0d9488;
  --border: #363b44;
  --border-light: #2e333c;
  --c-red: #f87171;
  --c-red-dim: rgba(248, 113, 113, 0.10);
  --c-amber: #fbbf24;
  --c-amber-dim: rgba(251, 191, 36, 0.10);
  --c-teal: #2dd4bf;
  --c-teal-dim: rgba(45, 212, 191, 0.10);
  --c-blue: #60a5fa;
  --c-blue-dim: rgba(96, 165, 250, 0.10);
  --c-gray: #9aa0a8;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --shadow-card: 0 2px 8px rgba(0,0,0,.2);
  --shadow-hover: 0 8px 24px rgba(0,0,0,.3);
  --max-width: 1200px;
  --content-width: 820px;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

/* ── Header ── */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); }
.logo-icon {
  width: 32px; height: 32px; background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--bg-primary); font-size: 16px;
}
.logo-text { font-size: 16px; font-weight: 700; letter-spacing: -.3px; }
.logo-sub { font-size: 11px; color: var(--text-muted); margin-left: 8px; }
.header-nav { display: flex; gap: 4px; }
.header-nav a {
  color: var(--text-secondary); font-size: 13px;
  padding: 6px 14px; border-radius: var(--radius-sm);
  transition: all .15s; text-decoration: none;
}
.header-nav a:hover, .header-nav a.active {
  color: var(--text-primary); background: var(--bg-card);
}

/* ── Mobile Menu ── */
.menu-toggle { display: none; background: none; border: none; color: var(--text-secondary); font-size: 24px; cursor: pointer; padding: 4px; }

/* ── PR Banner (Stealth Marketing Regulation) ── */
.pr-banner {
  background: var(--bg-code); border-bottom: 1px solid var(--border);
  text-align: center; padding: 6px 16px;
  font-size: 11px; color: var(--text-muted);
}

/* ── Hero Section ── */
.hero {
  max-width: var(--max-width); margin: 0 auto;
  padding: 56px 24px 40px; text-align: center;
}
.hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.hero h1 .accent { color: var(--accent); }
.hero .lead {
  font-size: 15px; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 28px;
}

/* ── Search Box ── */
.search-wrap { max-width: 600px; margin: 0 auto; position: relative; }
.search-wrap input {
  width: 100%; padding: 14px 20px 14px 48px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 15px; outline: none; transition: border-color .15s;
}
.search-wrap input::placeholder { color: var(--text-muted); }
.search-wrap input:focus { border-color: var(--accent); }
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 18px; pointer-events: none;
}
.search-tags {
  margin-top: 12px;
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.search-tags a {
  font-size: 12px; color: var(--text-muted);
  padding: 4px 10px; background: var(--bg-card);
  border-radius: 20px; text-decoration: none; transition: all .15s;
}
.search-tags a:hover { color: var(--accent); background: var(--accent-dim); }

/* ── Category Cards (top page) ── */
.categories {
  max-width: var(--max-width); margin: 40px auto 0; padding: 0 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.cat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: all .2s; cursor: pointer; text-decoration: none; color: inherit;
  display: block;
}
.cat-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: var(--shadow-hover); color: inherit;
}
.cat-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.cat-icon-error { background: var(--c-red-dim); color: var(--c-red); }
.cat-icon-deposit { background: var(--c-amber-dim); color: var(--c-amber); }
.cat-icon-bonus { background: var(--c-teal-dim); color: var(--c-teal); }
.cat-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.cat-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.cat-count { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.cat-count strong { color: var(--accent); font-size: 18px; }

/* ── Section Heading ── */
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.section-head h2 { font-size: 18px; font-weight: 700; }
.section-head a { font-size: 13px; color: var(--accent); }

/* ── Article List ── */
.article-list { display: flex; flex-direction: column; gap: 8px; }
.article-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; background: var(--bg-card); border-radius: 8px;
  border: 1px solid transparent; transition: all .15s;
  cursor: pointer; text-decoration: none; color: inherit;
}
.article-row:hover { border-color: var(--border); background: var(--bg-card-hover); color: inherit; }
.article-tag {
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 4px; white-space: nowrap;
}
.tag-error { background: var(--c-red-dim); color: var(--c-red); }
.tag-deposit { background: var(--c-amber-dim); color: var(--c-amber); }
.tag-bonus { background: var(--c-teal-dim); color: var(--c-teal); }
.article-title { font-size: 14px; flex: 1; }
.article-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ── Container Widths ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }

/* ── Category Page ── */
.cat-hero {
  padding: 40px 24px 32px; text-align: center;
  border-bottom: 1px solid var(--border-light);
}
.cat-hero .cat-icon { margin: 0 auto 16px; }
.cat-hero h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.cat-hero .lead { font-size: 14px; color: var(--text-secondary); max-width: 520px; margin: 0 auto; }

.cat-filter {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 20px 0; border-bottom: 1px solid var(--border-light);
}
.cat-filter a {
  font-size: 12px; padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 20px;
  color: var(--text-secondary); text-decoration: none; transition: all .15s;
}
.cat-filter a:hover, .cat-filter a.active {
  border-color: var(--accent); color: var(--accent); background: var(--accent-dim);
}

/* ── Article Page ── */
.article-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 32px;
}
.article-meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; font-size: 13px;
}
.article-header h1 { font-size: 24px; font-weight: 700; line-height: 1.5; }

/* Result Box (結論先出し) */
.result-box {
  background: var(--accent-dim);
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: var(--radius-md);
  padding: 20px 24px; margin-bottom: 32px;
}
.result-box-title {
  font-size: 14px; font-weight: 700; color: var(--accent);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.result-box ul { padding-left: 20px; }
.result-box li { font-size: 14px; margin-bottom: 6px; color: var(--text-primary); }

/* Warning / Error / Info Boxes */
.callout {
  border-radius: var(--radius-md);
  padding: 16px 20px; margin: 24px 0;
  font-size: 14px;
}
.callout-title { font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.callout-error { background: var(--c-red-dim); border-left: 3px solid var(--c-red); }
.callout-error .callout-title { color: var(--c-red); }
.callout-warning { background: var(--c-amber-dim); border-left: 3px solid var(--c-amber); }
.callout-warning .callout-title { color: var(--c-amber); }
.callout-info { background: var(--c-blue-dim); border-left: 3px solid var(--c-blue); }
.callout-info .callout-title { color: var(--c-blue); }
.callout-success { background: var(--c-teal-dim); border-left: 3px solid var(--c-teal); }
.callout-success .callout-title { color: var(--c-teal); }

/* ── Article Content ── */
.article-content h2 {
  font-size: 20px; font-weight: 700; margin: 40px 0 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.article-content h3 { font-size: 17px; font-weight: 700; margin: 28px 0 12px; }
.article-content p { margin-bottom: 16px; color: var(--text-secondary); }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 16px; }
.article-content li { margin-bottom: 6px; color: var(--text-secondary); }

/* Code Blocks */
.article-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: var(--bg-code); color: var(--accent);
  padding: 2px 6px; border-radius: 4px; font-size: 13px;
}
.article-content pre {
  background: var(--bg-code); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 20px;
  overflow-x: auto; margin-bottom: 20px;
}
.article-content pre code { background: none; padding: 0; }

/* Steps (手順) */
.steps { counter-reset: step; margin: 20px 0; }
.step {
  display: flex; gap: 16px; margin-bottom: 20px;
  padding: 16px; background: var(--bg-card);
  border-radius: var(--radius-md); border: 1px solid var(--border);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  flex-shrink: 0; width: 32px; height: 32px;
  background: var(--accent-dim); color: var(--accent);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.step-body h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.step-body p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* Comparison Table */
.table-wrap { overflow-x: auto; margin: 20px 0; }
.table-wrap table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.table-wrap th, .table-wrap td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.table-wrap th {
  background: var(--bg-card); color: var(--text-muted);
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .3px;
}
.table-wrap td { color: var(--text-secondary); }

/* Related Articles */
.related {
  margin: 40px 0; padding: 24px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.related h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-list a {
  font-size: 14px; color: var(--text-secondary);
  padding: 8px 12px; border-radius: var(--radius-sm);
  transition: all .15s; display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.related-list a:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.related-list a .article-tag { font-size: 10px; }

/* Risk Disclaimer (記事末尾固定) */
.risk-disclaimer {
  margin: 40px 0 0; padding: 16px 20px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-muted); line-height: 1.7;
}
.risk-disclaimer strong { color: var(--text-secondary); }

/* Sources */
.sources {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.sources h4 { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.sources ul { list-style: none; padding: 0; }
.sources li { font-size: 13px; margin-bottom: 4px; }
.sources a { color: var(--accent); font-size: 13px; }

/* ── Footer ── */
.site-footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border);
  padding: 32px 24px; margin-top: 60px;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text-secondary); }
.footer-copy { font-size: 11px; color: var(--text-muted); }

/* ── Breadcrumb ── */
.breadcrumb {
  padding: 14px 0; font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .categories { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-nav { display: none; }
  .menu-toggle { display: block; }
  .header-nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border);
    padding: 12px 24px;
  }
  .hero h1 { font-size: 22px; }
  .hero { padding: 36px 16px 28px; }
  .article-header h1 { font-size: 20px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* ── CTA Box (アフィリエイト導線) ── */
.cta-box {
  margin: 36px 0; padding: 28px 24px;
  background: linear-gradient(135deg, rgba(45,212,191,0.08) 0%, rgba(45,212,191,0.02) 100%);
  border: 1px solid rgba(45,212,191,0.25);
  border-radius: var(--radius-lg);
  text-align: center;
}
.cta-box-title {
  font-size: 16px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 10px;
}
.cta-box p {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 18px; line-height: 1.7;
}
.cta-btn {
  display: inline-block; padding: 14px 36px;
  background: var(--accent); color: var(--bg-primary);
  font-size: 15px; font-weight: 700;
  border-radius: 8px; text-decoration: none;
  transition: all .2s;
  box-shadow: 0 2px 12px rgba(45,212,191,0.25);
}
.cta-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(45,212,191,0.35);
  transform: translateY(-1px);
}
.cta-note {
  font-size: 11px; color: var(--text-muted); margin-top: 12px; line-height: 1.5;
}

/* ── FAQ Section (リッチスニペット対応) ── */
.faq-section {
  margin: 32px 0; padding: 24px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.faq-section h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.faq-item { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.faq-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.faq-q {
  font-size: 14px; font-weight: 600; color: var(--accent);
  margin-bottom: 6px;
}
.faq-q::before { content: "Q. "; }
.faq-a { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.faq-a::before { content: "A. "; font-weight: 600; color: var(--text-muted); }

/* ── Utility ── */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
