/* SEO Starter Theme - Professional Server Comparison Design */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --cta-orange: #ea580c;
  --cta-orange-dark: #c2410c;
  --gold: #f59e0b;
  --gold-light: #fffbeb;
  --text: #1e293b;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-light: #f8fafc;
  --bg-accent: #eff6ff;
  --border: #e2e8f0;
  --radius: 14px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: var(--text);
  line-height: 1.8;
  background: var(--bg-light);
  -webkit-text-size-adjust: 100%;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.site-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.site-header nav {
  display: flex;
  gap: 0.3rem;
}
.site-header nav a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.site-header nav a:hover {
  color: var(--primary);
  background: var(--bg-accent);
}

/* Hero */
.hero {
  text-align: center;
  padding: 2.5rem 1rem;
  background: linear-gradient(135deg, var(--bg-accent) 0%, var(--bg) 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.4;
}
.hero p {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Main content area */
main.container {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Sections */
.section { margin: 2rem 0; }
.section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}

/* Article List */
.article-list { display: grid; gap: 0.8rem; }
.article-card {
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.article-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}
.article-card h2, .article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  line-height: 1.5;
}
.article-card a { color: var(--text); text-decoration: none; }
.article-card a:hover { color: var(--primary); }
.article-card p {
  color: var(--text-light);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Article */
.article { padding: 1rem 0; }
.article h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.article-meta {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* TOC */
.toc {
  background: var(--bg-accent);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
}
.toc h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}
.toc nav ul { list-style: none; padding-left: 0.8rem; }
.toc nav li { margin-bottom: 0.3rem; }
.toc nav a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.88rem;
}
.toc nav a:hover { text-decoration: underline; }

/* Content */
.article-content h2 {
  font-size: 1.25rem;
  margin: 2.5rem 0 0.8rem;
  padding: 0.5rem 0 0.3rem;
  border-bottom: 2px solid var(--primary);
  color: var(--text);
}
.article-content h3 {
  font-size: 1.1rem;
  margin: 1.8rem 0 0.5rem;
  padding-left: 0.7rem;
  border-left: 3px solid var(--primary);
  color: var(--text);
}
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol {
  margin: 0.5rem 0 1.2rem 1.5rem;
}
.article-content li { margin-bottom: 0.3rem; }

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.88rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-content th {
  background: var(--primary);
  color: white;
  font-weight: 600;
  padding: 0.7rem 0.8rem;
  text-align: left;
  font-size: 0.85rem;
  white-space: nowrap;
}
.article-content td {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  text-align: left;
}
.article-content tr:nth-child(even) td {
  background: var(--bg-light);
}
.article-content tr:hover td {
  background: var(--bg-accent);
}

/* Blockquote */
.article-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--bg-accent);
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
}

/* Tags */
.tags { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-light);
  text-decoration: none;
  margin: 0.2rem;
  transition: border-color 0.2s;
}
.tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-light);
  font-size: 0.82rem;
  background: var(--bg);
}
.disclosure {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  line-height: 1.5;
  opacity: 0.8;
}

/* Affiliate CTA button */
.affiliate-cta {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
  margin: 0.5rem 0.3rem;
}
.affiliate-cta:hover {
  background: var(--primary-dark);
  color: white;
}
.affiliate-cta-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.affiliate-cta-secondary:hover {
  background: var(--bg-accent);
  color: var(--primary);
}
.cta-section {
  text-align: center;
  padding: 1.5rem;
  margin: 2rem 0;
  background: var(--bg-accent);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.cta-section p {
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-light);
}
.ad-label {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--text-light);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-bottom: 0.3rem;
}

/* Score Badge */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
  flex-shrink: 0;
}
.score-badge.score-high { background: #16a34a; box-shadow: 0 2px 6px rgba(22,163,74,0.3); }
.score-badge.score-mid  { background: #ca8a04; box-shadow: 0 2px 6px rgba(202,138,4,0.3); }

/* Pros/Cons 2-column */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.2rem 0;
}
@media (max-width: 600px) {
  .pros-cons { grid-template-columns: 1fr; }
}
.pros-cons-box {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.pros-cons-box.pros {
  background: #f0fdf4;
  border-color: #86efac;
}
.pros-cons-box.cons {
  background: #fff7f7;
  border-color: #fca5a5;
}
.pros-cons-box h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.pros-cons-box.pros h4 { color: #15803d; }
.pros-cons-box.cons h4 { color: #b91c1c; }
.pros-cons-box ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.7;
}

/* Comparison Table (横スクロール対応) */
.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.2rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 600px;
}
.comparison-table th {
  background: var(--primary);
  color: white;
  font-weight: 600;
  padding: 0.7rem 1rem;
  text-align: left;
  white-space: nowrap;
}
.comparison-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1rem;
  vertical-align: middle;
}
.comparison-table tr:nth-child(even) td { background: var(--bg-light); }
.comparison-table tr:hover td { background: var(--bg-accent); }
.comparison-table .check-yes { color: #16a34a; font-weight: 700; }
.comparison-table .check-no  { color: #dc2626; }

/* Ranking Item */
.ranking-list { display: grid; gap: 1.2rem; margin: 1.5rem 0; }
.ranking-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: box-shadow 0.2s;
}
.ranking-item:hover { box-shadow: 0 4px 12px rgba(37,99,235,0.1); }
.ranking-item.rank-1 { border-color: #fbbf24; background: #fffbeb; }
.ranking-item.rank-2 { border-color: #94a3b8; background: #f8fafc; }
.ranking-item.rank-3 { border-color: #d97706; background: #fff7ed; }
.ranking-number {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-light);
  min-width: 2rem;
  text-align: center;
}
.ranking-item.rank-1 .ranking-number { color: #d97706; }
.ranking-item.rank-2 .ranking-number { color: #64748b; }
.ranking-item.rank-3 .ranking-number { color: #b45309; }
.ranking-body { flex: 1; }
.ranking-body h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.ranking-body p  { font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.6rem; }
.ranking-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.6rem;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-gpu   { background: #ede9fe; color: #7c3aed; }
.badge-claude { background: #dbeafe; color: #1d4ed8; }
.badge-cheap  { background: #dcfce7; color: #15803d; }

/* FAQ Section */
.faq-section { margin: 2rem 0; }
.faq-section h2 { margin-bottom: 1rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.7rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: var(--bg-light);
  border: none;
  padding: 0.9rem 1rem;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  color: var(--text);
}
.faq-question:hover { background: var(--bg-accent); }
.faq-question::after {
  content: '▼';
  font-size: 0.7rem;
  color: var(--primary);
  transition: transform 0.2s;
}
.faq-item.open .faq-question::after { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  line-height: 1.8;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.faq-item.open .faq-answer { display: block; }

/* Sticky TOC */
@media (min-width: 1100px) {
  .toc-sticky {
    position: sticky;
    top: 4.5rem;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
  }
}

/* Mobile responsive */
@media (max-width: 640px) {
  .site-header .container {
    justify-content: center;
    text-align: center;
  }
  .site-header nav {
    width: 100%;
    justify-content: center;
  }
  .site-header nav a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }
  .hero h1 { font-size: 1.3rem; }
  .hero { padding: 1.8rem 0.5rem; }
  main.container { padding: 1rem 0.8rem; }
  .article h1 { font-size: 1.25rem; }
  .article-content h2 { font-size: 1.1rem; }
  .article-content h3 { font-size: 1rem; }
  .article-content table { font-size: 0.82rem; }
  .article-content th, .article-content td {
    padding: 0.5rem 0.6rem;
  }
  .section h2 { font-size: 1.1rem; }
  .first-view-card { padding: 1rem; }
  .first-view-card h2 { font-size: 1.1rem; }
  .recommendation-cards { grid-template-columns: 1fr; }
}

/* ===== P1: First View Recommendation Card ===== */
.first-view-card {
  background: linear-gradient(135deg, var(--gold-light) 0%, #fff7ed 100%);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}
.first-view-card .fv-label {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.first-view-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  border: none;
  display: block;
  padding: 0;
}
.first-view-card .fv-badges {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.first-view-card .fv-badge {
  display: inline-block;
  background: var(--bg-accent);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.first-view-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Orange CTA Button */
.affiliate-cta-primary {
  display: inline-block;
  background: var(--cta-orange);
  color: #fff;
  padding: 0.85rem 1.8rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s, transform 0.1s;
  min-height: 48px;
  line-height: 1.4;
}
.affiliate-cta-primary:hover {
  background: var(--cta-orange-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* ===== P2: Recommendation Cards (Summary Section) ===== */
.recommendation-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.rec-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rec-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}
.rec-card.rec-top {
  border-color: var(--gold);
  background: var(--gold-light);
}
.rec-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.rec-card .rec-service {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.3rem;
}
.rec-card .rec-reason {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

/* ===== P3: Comparison Table Enhancements ===== */
.comparison-table tr.highlight-first td {
  background: var(--gold-light);
  font-weight: 600;
}
.scroll-guide {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  display: none;
}
@media (max-width: 640px) {
  .scroll-guide { display: block; }
}

/* ===== Section Number Badge ===== */
.section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.4rem;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ===== P3: Score Bars ===== */
.score-bars {
  margin: 0.8rem 0;
}
.score-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
}
.score-bar-label {
  min-width: 7em;
  color: var(--text-light);
  text-align: right;
  flex-shrink: 0;
}
.score-bar-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--primary);
  transition: width 0.3s;
}
.score-bar-fill.high { background: #16a34a; }
.score-bar-fill.mid { background: var(--gold); }
.score-bar-value {
  min-width: 2em;
  font-weight: 600;
  color: var(--text);
}

/* Ranking card 1st place enhancement */
.ranking-item.rank-1 {
  border: 2px solid var(--gold);
  background: var(--gold-light);
}
/* Supplementary Section */
.supplementary-section {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}
.supplementary-section h3 {
  border-left: none;
  padding-left: 0;
  font-size: 1.05rem;
}
@media (max-width: 640px) {
  .supplementary-section { padding: 1.2rem; }
}

/* Article Image Wrapper */
.article-image {
  max-width: 920px;
  margin: 24px auto 32px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  background: var(--bg);
}
.article-image img {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 640px) {
  .article-image {
    margin: 20px 0 28px;
    border-radius: 12px;
  }
}

.rank-1-badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.4rem;
}
