:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --fg: #1a2233;
  --muted: #667085;
  --border: #e3e6ea;
  --primary: #1e3a8a;
  --primary-soft: #eef2ff;
  --accent: #ea580c;
  --accent-fg: #ffffff;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  /* 日本語+半角英数字混在時に変な位置で改行されるのを防ぐ */
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--primary); }

/* 短いカギカッコ句が行の途中で分断されるのを防ぐ（狭い画面では通常の折り返しに戻す） */
.kw { white-space: nowrap; }

@media (max-width: 480px) {
  .kw { white-space: normal; }
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-title {
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: 0.01em;
}

.site-header nav a {
  margin-left: 1.4rem;
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.site-header nav a:hover { color: var(--primary); }

/* --- PR disclosure bar --- */
.pr-bar {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.5rem 1.25rem;
  text-align: center;
}

.pr-bar a { color: var(--muted); text-decoration: underline; }

.pr-badge {
  display: inline-block;
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.4rem;
  vertical-align: middle;
}

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin-bottom: 0.5rem; }
h2 { font-size: 1.35rem; margin: 0 0 1rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.4rem; }

/* --- Hero --- */
.hero {
  padding: 2.5rem 0 1.25rem;
}

.hero-lead {
  color: var(--muted);
  max-width: 640px;
  font-size: 1.02rem;
}

.updated-at {
  color: var(--muted);
  font-size: 0.85rem;
}

/* --- Intro (read-through text before the table) --- */
.intro {
  max-width: 720px;
  padding: 0 0 1rem;
  color: var(--fg);
}

.intro p { margin: 0 0 0.9rem; }
.intro a { font-weight: 500; }

/* --- CTA button --- */
.cta {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.cta:hover { opacity: 0.88; }

.cta-small {
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
}

/* --- Diagnosis tool --- */
.diagnosis {
  padding: 1.5rem;
  margin: 0.5rem 0 2rem;
  background: var(--primary-soft);
  border-radius: 16px;
}

.diagnosis h2 { margin-bottom: 0.3rem; }

.diag-panels {
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: start;
}

.diag-panel {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.diag-intro {
  color: var(--muted);
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.diag-step-num {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary);
  background: var(--card-bg);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.diag-back {
  display: inline-block;
  margin-bottom: 0.6rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0;
  transition: color 0.15s ease;
}

.diag-back:hover { color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  .diag-panel { transition: none; }
}

.diag-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.diag-buttons[hidden] { display: none; }

.diag-btn-lg {
  padding: 0.75rem 1.7rem;
  font-size: 1rem;
}

.diag-btn {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--fg);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.12s ease;
}

.diag-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
}

.diag-btn:active { transform: translateY(0) scale(0.96); }

.diag-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  animation: diag-btn-pop 0.22s ease;
}

.diag-btn.is-active::before { content: "✓ "; }

.diag-btn.is-active:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

@keyframes diag-btn-pop {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .diag-btn { transition: none; animation: none; }
  .diag-btn:hover, .diag-btn:active, .diag-btn.is-active:hover { transform: none; }
}

.diag-result { margin-top: 1.25rem; }

.diag-result-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  animation: diag-fade-in 0.25s ease;
}

@keyframes diag-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .diag-result-card { animation: none; }
}

.diag-reset {
  display: block;
  margin-top: 1rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0;
  transition: color 0.15s ease;
}

.diag-reset:hover { color: var(--primary); }

.diag-result-label {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  margin: 0 0 0.5rem;
}

.diag-result-card h3 { margin: 0 0 0.4rem; }
.diag-result-card p { margin: 0 0 0.7rem; }
.diag-result-price { font-size: 0.95rem; }

/* --- Compare table --- */
.compare { padding: 1rem 0 3rem; }

.sort-toolbar,
.tier-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.tier-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin: -0.4rem 0 0.9rem;
}

.sort-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-right: 0.2rem;
}

.sort-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  background: var(--bg-soft);
  border-radius: 12px;
}

.sort-btn {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.sort-btn:hover { color: var(--fg); }

.sort-btn.is-active {
  background: var(--card-bg);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  .sort-btn { transition: none; }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
  background: var(--card-bg);
  table-layout: fixed;
}

.compare-table .col-service { width: 34%; }
.compare-table .col-price { width: 16%; }
.compare-table .col-spec { width: 26%; }
.compare-table .col-ssl { width: 10%; }
.compare-table .col-cta { width: 14%; }

.compare-table th, .compare-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.compare-table thead th {
  background: var(--bg-soft);
  font-weight: 700;
  position: sticky;
  top: 0;
}

.compare-table tbody tr:hover { background: var(--bg-soft); }

.cell-service-name { font-weight: 700; font-size: 1rem; }
.cell-company { color: var(--muted); font-size: 0.78rem; margin-top: 0.15rem; }
.cell-comment {
  margin: 0.5rem 0 0;
  color: var(--fg);
  font-size: 0.85rem;
  line-height: 1.6;
}

.compare-table .price {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.15rem;
  white-space: nowrap;
}

.compare-table .price small {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.72rem;
}

.cell-subtext {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 0.35rem;
  white-space: nowrap;
}

.col-spec div { margin-bottom: 0.2rem; }
.col-spec div:last-child { margin-bottom: 0; }

.tier-variant { display: block; }
.tier-variant[hidden] { display: none; }

.cell-plan-name {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.15rem;
}

.table-more-btn[hidden] { display: none; }

.table-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--card-bg);
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.table-more-btn::after {
  content: "▾";
  font-size: 0.75em;
  transition: transform 0.15s ease;
}

.table-more-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.table-more-btn:hover::after { transform: translateY(2px); }

.table-more-btn:active { transform: translateY(0); }

.table-more-btn.is-expanded::after { transform: rotate(180deg); }
.table-more-btn.is-expanded:hover::after { transform: rotate(180deg) translateY(2px); }

@media (prefers-reduced-motion: reduce) {
  .table-more-btn, .table-more-btn::after { transition: none; }
  .table-more-btn:hover, .table-more-btn:hover::after { transform: none; }
  .table-more-btn.is-expanded::after { transform: rotate(180deg); }
}

.table-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.75rem;
}

@media (max-width: 680px) {
  .table-wrap { border: none; overflow: visible; }

  .compare-table { table-layout: auto; min-width: 0; }
  .compare-table thead { display: none; }

  .compare-table, .compare-table tbody, .compare-table tr, .compare-table td {
    display: block;
    width: 100% !important;
  }

  .compare-table tr[hidden] { display: none; }

  .compare-table tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 0.9rem;
    padding: 0.9rem 1rem;
    background: var(--card-bg);
  }

  .compare-table td {
    border-bottom: none;
    padding: 0.35rem 0;
  }

  .compare-table td.col-price,
  .compare-table td.col-ssl {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border);
    padding-top: 0.5rem;
  }

  .compare-table td.col-price::before,
  .compare-table td.col-ssl::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
  }

  .compare-table td.col-cta { margin-top: 0.5rem; }
  .compare-table td.col-cta .cta { display: block; }
}

/* --- Detailed reviews (read-through text after the table) --- */
.reviews { padding: 1.5rem 0; }

.review-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.review-select-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.review-select {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--fg);
  cursor: pointer;
  max-width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.review-select:hover { border-color: var(--primary); }

.review-select:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.review-panels { max-width: 720px; }

.review-panel h3 { margin: 0 0 0.4rem; }

.review-panel-comment {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.8rem;
}

.review-panel p { color: var(--fg); margin: 0 0 0.9rem; }

.review-more-link {
  display: inline-block;
  margin-left: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

/* --- FAQ --- */
.faq { padding: 1.5rem 0; }

.faq-item {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.faq-q {
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.faq-a {
  color: var(--muted);
  margin: 0;
}

.faq-a a { color: var(--primary); font-weight: 500; }

/* --- More articles callout --- */
.more-articles {
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--border);
}

.more-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.more-articles-grid a {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--fg);
  font-weight: 500;
  font-size: 0.9rem;
  background: var(--card-bg);
}

.more-articles-grid a:hover { border-color: var(--primary); color: var(--primary); }

.all-articles-link {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
}

/* --- Articles --- */
.article-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 3rem;
}

.article-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.article-list a {
  text-decoration: none;
  color: var(--fg);
  font-weight: 500;
}

.article-list a:hover { color: var(--primary); }

.article-list .date {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.article {
  padding: 1.5rem 0 3rem;
}

.article-body { max-width: 760px; }
.article-body :first-child { margin-top: 0; }
.article-body h2 { margin-top: 2rem; }
.article-body ul { padding-left: 1.3rem; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.site-footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 1rem 0;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.footer-nav a:hover { color: var(--primary); }

.copyright { margin-bottom: 0; }

/* --- Static pages (about / privacy / disclaimer / contact) --- */
.static-page { padding: 1.5rem 0 3rem; }
.static-page .article-body h2 { font-size: 1.05rem; }

/* --- Individual review pages --- */
.breadcrumb {
  padding: 1.25rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); }

.review-page { padding: 1rem 0 3rem; }

.review-company { color: var(--muted); margin-top: -0.3rem; }

.review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  min-width: 120px;
}

.summary-label { font-size: 0.75rem; color: var(--muted); }
.summary-value { font-weight: 700; }

.review-lead {
  max-width: 720px;
  color: var(--fg);
  font-size: 1.02rem;
}

.review-body { max-width: 720px; margin-top: 2rem; }
.review-body h2 { margin-top: 0; }

.review-back { margin-top: 2rem; }
