/* 比較ページ専用。site.css の変数・部品を使う。site.css の既存ルールは変更しない。 */

.compare-hero {
  padding: 36px 0 12px;
  background:
    radial-gradient(ellipse 70% 55% at 92% 0%, rgba(30, 107, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 40% 40% at 0% 80%, rgba(10, 124, 132, 0.08), transparent 50%),
    linear-gradient(180deg, #f3f7ff 0%, var(--paper) 78%);
}

.compare-kicker {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-deep);
}

.compare-hero h1 {
  margin: 0;
  max-width: 16em;
  font-size: clamp(1.65rem, 4.2vw, 2.45rem);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-break: strict;
  overflow-wrap: break-word;
}

.compare-page .section {
  padding: 48px 0;
}

.compare-page h2 {
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.4;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-break: strict;
  overflow-wrap: break-word;
}

.compare-page h3 {
  margin: 28px 0 12px;
  font-size: 1.15rem;
  line-height: 1.45;
  font-weight: 800;
  color: var(--navy);
}

.compare-prose {
  max-width: 44em;
  color: var(--ink-soft);
  line-break: strict;
  overflow-wrap: break-word;
}

.compare-prose p,
.compare-lead {
  margin: 0 0 14px;
}

.compare-prose ul,
.service-card ul,
.fit-card ul,
.summary-list {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.compare-prose li,
.service-card li,
.fit-card li,
.summary-list li {
  margin: 8px 0;
}

.compare-prose strong,
.service-card strong,
.fit-card strong {
  color: var(--navy);
}

.page-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.page-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.page-toc a:hover {
  background: var(--blue-soft);
  color: var(--blue-deep);
  text-decoration: none;
}

.symbol-legend {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.mark {
  font-weight: 800;
}

.mark-yes {
  color: var(--teal-deep);
}

.mark-mid {
  color: var(--warn);
}

.mark-none {
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.scroll-hint {
  display: none;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.compare-table,
.source-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  line-height: 1.65;
}

.compare-table {
  min-width: 980px;
}

.compare-table caption,
.source-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.compare-table th,
.compare-table td,
.source-table th,
.source-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
}

.compare-table thead th,
.source-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  border-bottom: 0;
}

.compare-table thead th.col-kokyaku {
  background: var(--blue);
}

.compare-table tbody th,
.source-table tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 8.75rem;
  width: 8.75rem;
  background: var(--bg);
  font-weight: 700;
  color: var(--navy);
  box-shadow: 1px 0 0 var(--line-strong);
}

.compare-table thead th:first-child {
  left: 0;
  z-index: 3;
  min-width: 8.75rem;
  background: var(--navy);
}

.compare-table td.col-kokyaku,
.compare-table tbody tr:last-child td {
  border-bottom: 1px solid var(--line);
}

.compare-table td.col-kokyaku {
  background: var(--blue-soft);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td,
.source-table tbody tr:last-child th,
.source-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table td:not(:first-of-type),
.compare-table thead th:not(:first-child) {
  min-width: 13.5rem;
}

.cite {
  font-weight: 700;
  font-size: 0.85em;
  white-space: nowrap;
  text-decoration: none;
}

.cite:hover {
  text-decoration: underline;
}

.service-card,
.fit-card,
.summary-panel,
.closing-note {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.service-card,
.fit-card {
  padding: 22px 22px 8px;
  margin: 0 0 16px;
}

.service-card h3,
.fit-card h3 {
  margin: 0 0 8px;
}

.service-card h4 {
  margin: 16px 0 6px;
  font-size: 0.98rem;
  color: var(--navy);
}

.service-card.is-kokyaku {
  border-color: rgba(30, 107, 255, 0.35);
  background: linear-gradient(180deg, var(--blue-soft) 0%, var(--paper) 88px);
}

.fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.fit-card ul {
  padding-left: 1.2em;
}

.summary-panel {
  padding: 8px 22px;
}

.summary-list {
  margin: 8px 0;
}

.closing-note {
  margin-top: 8px;
  padding: 16px 18px;
  color: var(--ink-soft);
  background: var(--bg);
  box-shadow: none;
}

.source-table {
  table-layout: fixed;
}

.source-table th:nth-child(1),
.source-table td:nth-child(1) {
  width: 4.75rem;
}

.source-table th:nth-child(2),
.source-table td:nth-child(2) {
  width: 8.5rem;
}

.source-table th:nth-child(5),
.source-table td:nth-child(5) {
  width: 8.25rem;
}

.source-table tbody th {
  min-width: 4.5rem;
  width: 4.5rem;
  white-space: nowrap;
}

.source-table tr:target th,
.source-table tr:target td {
  background: var(--trial-bg);
}

.source-url {
  overflow-wrap: anywhere;
  word-break: break-all;
}

.compare-page :is(a, button):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.compare-page :is(h2, h3, tr) {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

@media (max-width: 1040px) {
  .scroll-hint {
    display: block;
  }
}

@media (max-width: 800px) {
  .fit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .compare-hero {
    padding: 28px 0 4px;
  }

  .compare-page .section {
    padding: 36px 0;
  }

  .scroll-hint {
    display: none;
  }

  .table-scroll {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .compare-table,
  .source-table {
    min-width: 0;
    display: block;
    font-size: 0.95rem;
  }

  .compare-table thead,
  .source-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .compare-table tbody,
  .source-table tbody,
  .compare-table tr,
  .source-table tr,
  .compare-table th,
  .compare-table td,
  .source-table th,
  .source-table td,
  .source-table th:nth-child(n),
  .source-table td:nth-child(n),
  .compare-table tbody th,
  .source-table tbody th {
    display: block;
    width: auto;
    min-width: 0;
    position: static;
    box-shadow: none;
  }

  .compare-table tr,
  .source-table tr {
    margin: 0 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .compare-table tbody th,
  .source-table tbody th {
    width: auto;
    background: var(--navy);
    color: #fff;
    border-bottom: 0;
  }

  .compare-table td,
  .source-table td {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .compare-table td::before,
  .source-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .compare-table td.col-kokyaku {
    background: var(--blue-soft);
  }

  .compare-table td.col-kokyaku::before {
    color: var(--blue-deep);
  }

  .compare-table tbody tr:last-child th,
  .compare-table tbody tr:last-child td,
  .source-table tbody tr:last-child th,
  .source-table tbody tr:last-child td,
  .compare-table tr td:last-child,
  .source-table tr td:last-child {
    border-bottom: 0;
  }

  .service-card,
  .fit-card {
    padding: 16px 14px 6px;
  }

  .page-toc a {
    min-height: 44px;
  }
}
