/* ==========================================================================
   フリーランスエンジニア独立のススメ - 共通スタイルシート
   完全スマホファースト・ITフリーランス＆案件比較デザイン（幅375px完全適合）
   ========================================================================== */

:root {
  --primary: #2563eb;          /* 知的で信頼感のあるロイヤルブルー */
  --primary-dark: #1e40af;     /* ディープネイビー */
  --primary-light: #60a5fa;    /* ライトブルー */
  --primary-bg: #eff6ff;       /* 背景ハイライトブルー */
  --accent: #f97316;           /* 行動を促すビビッドオレンジ */
  --accent-hover: #ea580c;
  --success: #10b981;          /* メリット・おすすめグリーン */
  --success-bg: #ecfdf5;
  --text-main: #0f172a;        /* 本文ダークスレート */
  --text-muted: #475569;       /* 補足グレー */
  --border-color: #cbd5e1;     /* 境界線 */
  --bg-page: #f8fafc;          /* 全体背景 */
  --bg-card: #ffffff;          /* カード背景 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  color: var(--text-main);
  background-color: var(--bg-page);
  word-break: break-word;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* 景品表示法対応 PR表記バー */
.ad-disclosure-bar {
  background-color: #f1f5f9;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 6px 12px;
}

/* サイトヘッダー */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 768px) {
  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.site-logo a {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary-dark);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.site-logo a span {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ピル型横スクロールヘッダーナビ */
.site-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
  white-space: nowrap;
  padding-bottom: 4px;
}

.site-nav li a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: #f1f5f9;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.site-nav li a:hover,
.site-nav li a.active {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary-light);
}

/* メインコンテンツ枠 */
.main-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* ヒーローセクション */
.hero-section {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  margin-bottom: 30px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 22px;
  line-height: 1.45;
  color: var(--primary-dark);
  margin-bottom: 14px;
  font-weight: 800;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 28px;
  }
}

.hero-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 760px;
  margin: 0 auto;
}

/* セクションタイトル共通 */
.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
  text-align: center;
  position: relative;
  padding-bottom: 8px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.section-lead {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

/* 診断セクション */
.diagnosis-section {
  margin-bottom: 40px;
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .diagnosis-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.diagnosis-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.diagnosis-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.5;
}

.diagnosis-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.recommend-box {
  background: var(--success-bg);
  border-left: 3px solid var(--success);
  padding: 8px 12px;
  font-size: 13px;
  color: #065f46;
  margin-bottom: 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.card-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 14px;
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-light);
  text-decoration: none;
  transition: all 0.2s ease;
}

.card-btn:hover {
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
}

/* 比較マトリクスセクション (Sticky固定テーブル) */
.matrix-section {
  margin-bottom: 44px;
}

.table-responsive,
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
  margin-bottom: 24px;
}

.comparison-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.comparison-table thead th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  border-bottom: 2px solid var(--border-color);
}

.comparison-table thead th .table-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 4px;
}

.comparison-table tbody td {
  text-align: center;
}

.comparison-table tbody td:first-child,
.comparison-table thead th:first-child {
  text-align: left;
}

/* 1列目 Sticky固定 */
.sticky-col {
  position: sticky;
  left: 0;
  background: #f8fafc !important;
  font-weight: 700;
  color: var(--text-main);
  z-index: 2;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  min-width: 130px;
}

/* ボタン共通 */
.btn-primary {
  display: inline-block;
  width: 100%;
  max-width: 320px;
  padding: 14px 20px;
  background: var(--accent);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 6px rgba(249, 115, 22, 0.25);
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 10px rgba(249, 115, 22, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  padding: 10px 18px;
  background: #f1f5f9;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--text-main);
  text-decoration: none;
}

/* 記事ページレイアウト */
.article-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .article-container {
    padding: 36px 32px;
  }
}

.article-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.article-category {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.article-title {
  font-size: 21px;
  line-height: 1.45;
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-weight: 800;
}

@media (min-width: 768px) {
  .article-title {
    font-size: 26px;
  }
}

.article-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.article-lead {
  font-size: 15px;
  line-height: 1.8;
  color: #334155;
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  padding: 16px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 30px;
}

.article-section {
  margin-bottom: 36px;
}

.article-section h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.article-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.article-section p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 16px;
}

.article-section ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.article-section li {
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 8px;
  color: var(--text-main);
}

/* 特徴ボックス */
.feature-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.feature-box h3 {
  font-size: 15px;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.feature-box p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ステップカード */
.step-card {
  background: #ffffff;
  border-left: 4px solid var(--accent);
  border: 1px solid var(--border-color);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.step-card h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.step-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* スクール紹介カード */
.school-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.school-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.school-card p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* 公式案内ボックス (CTA枠) */
.cta-box {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  margin: 36px 0 24px;
  text-align: center;
}

.cta-box h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.cta-box p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.cta-micro {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* 記事下部 ナビゲーション */
.article-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  margin-top: 36px;
  gap: 12px;
  flex-wrap: wrap;
}

.back-link, .next-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* サイトフッター */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 30px 16px;
  text-align: center;
  margin-top: 40px;
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.copyright {
  font-size: 12px;
  color: var(--text-muted);
}

/* 2026-12-05: readable text and measured mobile layout */
html, body { overflow-x: visible; }
.site-header { position: relative; }
.header-container { min-width: 0; }
.site-logo { flex-shrink: 0; }
.site-logo a { font-size: 1rem; }
.site-logo a span { font-size: .875rem; }
.site-nav { min-width: 0; max-width: 100%; margin: 0; padding: 0; }
.site-nav li a { font-size: .875rem; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; }
.hero-title { font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 1.5; }
.article-title { font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.5; }
.article-section p, .article-section li, .step-card p, .article-card p, .feature-box p, .gck-cro-decision-card p, .gck-faq-container p, .gck-simulator-desc { font-size: 1rem; line-height: 1.85; }
.source-note, .gck-cta-microcopy, .cta-micro, .section-lead, .gck-control-label, .gck-result-label { font-size: .875rem; }
.step-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.step-card { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.step-card .btn-primary { margin-top: auto; }
.btn-primary, .cta-action-btn, .gck-simulator-cta-btn { display: flex; justify-content: center; align-items: center; min-height: 48px; max-width: 100%; padding: 12px; font-size: .875rem; white-space: nowrap; }
.table-wrapper { overflow-x: auto; max-width: 100%; position: relative; }
.comparison-table { min-width: 720px; border-collapse: separate; border-spacing: 0; }
.comparison-table th:first-child, .comparison-table td:first-child { position: sticky; left: 0; z-index: 2; background: #f0f5ff; min-width: 120px; max-width: 145px; box-shadow: 1px 0 #cbd5e1; }
.comparison-table th, .comparison-table td { font-size: .875rem; vertical-align: top; }
.gck-cro-fit-yes, .gck-cro-fit-no { margin: 12px 0; padding: 12px; border-left: 3px solid #2563eb; background: #f8fafc; }
.gck-cro-fit-no { border-left-color: #b45309; }
.gck-faq-container { padding: 20px; }
.gck-faq-container details { border-bottom: 1px solid #cbd5e1; padding: 12px 0; }
.gck-faq-container summary { cursor: pointer; min-height: 44px; font-size: 1rem; font-weight: 700; }
.gck-simulator-wrapper { max-width: 100%; }
.source-note a { text-decoration: underline; }
.article-footer-nav a { font-size: .875rem; padding: 10px 0; }
a:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 3px; }
@media(min-width: 768px) { .step-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } .site-logo { max-width: 340px; } }

.matrix-section .comparison-table { min-width: 980px; table-layout: fixed; }
.matrix-section .comparison-table th:first-child, .matrix-section .comparison-table td:first-child { width: 145px; }
.matrix-section .comparison-table th:last-child, .matrix-section .comparison-table td:last-child { width: 120px; }
.matrix-section .comparison-table td { text-align: left; }

/* Advertiser-supplied text is preserved; style only. */
.offer-conditions { margin: 24px 0; padding: 20px; border: 1px solid #cbd5e1; border-radius: 12px; background: #f8fafc; }
.offer-conditions h3 { font-size: 1.1rem; margin-bottom: 12px; }
.article-section .offer-source { font-size: .8rem; color: #475569; line-height: 1.7; }
.affiliate-ad { position: relative; margin: 20px 0 12px; }
.affiliate-ad > img { width: 1px; height: 1px; border: 0; }
.affiliate-ad .cta-action-btn { width: 100%; font-size: clamp(.75rem, 3.4vw, .875rem); padding: 12px 8px; }
@media (max-width: 420px) { .offer-conditions { padding: 14px; } }

.affiliate-banner { margin: 24px auto 8px; text-align: center; }
.cta-action-btn.affiliate-banner-link { display: block; width: 300px; height: 250px; min-height: 250px; padding: 0; margin: 0 auto; line-height: 0; }
.affiliate-banner-link > img { display: block; width: 300px; height: 250px; border: 0; }
.affiliate-banner > img { width: 1px; height: 1px; border: 0; }
