/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #1a1a2e;
  background: #f8f9fc;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== CSS Variables ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f59e0b;
  --text: #1a1a2e;
  --text-muted: #64748b;
  --bg: #f8f9fc;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 6px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
  color: #fff;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; max-width: 700px; margin: 0 auto; }
.hero-label {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  padding: .3rem .9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.05rem;
  opacity: .88;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  font-size: .95rem;
  padding: .85rem 2rem;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  transition: transform .2s, box-shadow .2s;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.25); text-decoration: none; color: var(--primary); }

/* ===== Sections ===== */
.section { padding: 4rem 1.5rem; }
.section:nth-child(even) { background: var(--white); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-header { margin-bottom: 2rem; }
.section-label {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: .25rem .75rem;
  border-radius: var(--radius-sm);
  margin-bottom: .6rem;
  text-transform: uppercase;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  border-left: 4px solid var(--primary);
  padding-left: .75rem;
}
.section-desc { margin-top: .5rem; color: var(--text-muted); font-size: .925rem; }

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.card-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: var(--radius-sm);
  letter-spacing: .05em;
}
.badge-basic { background: #eff6ff; color: #2563eb; }
.badge-worry { background: #fef3c7; color: #92400e; }
.badge-service { background: #f0fdf4; color: #166534; }
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
}
.card:hover .card-title { color: var(--primary); }
.card-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.card-arrow {
  font-size: .8rem;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* ===== Feature List (alternatives to cards for long lists) ===== */
.article-list { display: flex; flex-direction: column; gap: .75rem; }
.article-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.article-item:hover { transform: translateX(3px); box-shadow: var(--shadow); text-decoration: none; }
.article-item-num {
  font-size: .75rem;
  font-weight: 800;
  color: var(--primary);
  background: #eff6ff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.article-item-title { font-size: .925rem; font-weight: 600; color: var(--text); flex: 1; }
.article-item:hover .article-item-title { color: var(--primary); }
.article-item-arrow { color: var(--text-muted); font-size: .8rem; }

/* ===== Footer ===== */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 1.5rem 1.5rem;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  margin-bottom: 2rem;
}
.footer-nav a { color: #cbd5e1; font-size: .875rem; }
.footer-nav a:hover { color: #fff; text-decoration: none; }
.footer-copy { font-size: .75rem; border-top: 1px solid #1e293b; padding-top: 1.5rem; }

/* ===== Article Page ===== */
.article-wrap { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: start; }
.article-body {}
.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--text-muted); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: #cbd5e1; }
.article-header { margin-bottom: 2rem; }
.article-cat {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .7rem;
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
  letter-spacing: .05em;
}
.article-h1 { font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 700; line-height: 1.4; letter-spacing: -.02em; color: var(--text); margin-bottom: 1rem; }
.article-meta { font-size: .8rem; color: var(--text-muted); }
.toc {
  background: #f8faff;
  border: 1px solid #c7d7f5;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.toc-title { font-size: .875rem; font-weight: 700; color: var(--primary); margin-bottom: .75rem; display: flex; align-items: center; gap: .4rem; }
.toc ol { counter-reset: toc-counter; padding-left: 0; }
.toc li { counter-increment: toc-counter; display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; margin-bottom: .4rem; }
.toc li::before { content: counter(toc-counter); background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: .15rem; }
.toc a { color: var(--text); }
.toc a:hover { color: var(--primary); }
.article-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding: .7rem 1rem;
  background: linear-gradient(90deg, #eff6ff, #f8faff);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}
.article-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.75rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--border);
  color: var(--text);
}
.article-content p { margin-bottom: 1.2rem; line-height: 1.85; }
.article-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1.2rem; }
.article-content ul li { margin-bottom: .4rem; }
.note {
  background: #fefce8;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: .9rem;
}
.note-title { font-weight: 700; color: #92400e; margin-bottom: .4rem; font-size: .85rem; }
.point-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.point-box-title { font-weight: 700; color: var(--primary); font-size: .875rem; margin-bottom: .5rem; }
.related-articles {
  background: #f8faff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 3rem;
}
.related-articles h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); }
.related-articles ul { display: flex; flex-direction: column; gap: .6rem; }
.related-articles li a {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  color: var(--text);
  padding: .5rem .75rem;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--border);
  transition: background .15s, color .15s;
}
.related-articles li a::before { content: "→"; color: var(--primary); font-size: .8rem; }
.related-articles li a:hover { background: #eff6ff; color: var(--primary); text-decoration: none; }
.sidebar {}
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 75px;
}
.sidebar-widget-title {
  font-size: .875rem;
  font-weight: 700;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 1rem;
  color: var(--text);
}
.sidebar-links { display: flex; flex-direction: column; gap: .5rem; }
.sidebar-links a { font-size: .85rem; color: var(--text); padding: .4rem 0; border-bottom: 1px solid var(--border); display: block; }
.sidebar-links a:hover { color: var(--primary); text-decoration: none; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .article-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hero { padding: 3rem 1.25rem 2.5rem; }
}
