/* ─── ARTICLE DETAIL PAGE STYLES (v2: 2カラム追従目次・要点サマリー・パーツ刷新) ─── */

/* ─── HERO ─── */
.article-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 30px 20px 24px;
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #38bdf8 60%, #a78bfa 100%);
}
.article-hero-inner {
  max-width: 1160px;
  margin: 0 auto;
}
.article-badge-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.article-cat-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 800;
  padding: 3px 11px;
  border-radius: 999px;
  letter-spacing: .02em;
}
.article-reading-time {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border-soft);
  padding: 3px 9px;
  border-radius: 999px;
}
.article-meta-date {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.article-hero h1 {
  font-family: var(--display);
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
  letter-spacing: -.02em;
  color: var(--text);
}
.article-hero h1 .article-subtitle {
  display: block;
  color: var(--accent);
  font-size: .65em;
  font-weight: 700;
  margin-top: 6px;
}
.article-hero-lead {
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 900px;
}

/* ─── PAGE WRAPPER ─── */
.article-content-wrap {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 60px;
  box-sizing: border-box;
  counter-reset: article-sec;
}

/* ─── SUMMARY QUICK BOX（要点サマリーカード） ─── */
.article-summary-box {
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: 0 0 0 4px var(--accent-light), 0 2px 8px rgba(0, 0, 0, .04);
}
.article-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.article-summary-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.article-summary-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: .04em;
}
.article-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.article-summary-list li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.article-summary-list li::before {
  content: "✔";
  color: var(--green);
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.article-summary-list li strong {
  color: var(--text);
}

/* ─── TWO-COLUMN GRID ─── */
.article-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

/* ─── MAIN COLUMN ─── */
.article-main-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .03);
  min-width: 0;
  max-width: 100%;
}
.article-main-col > *:first-child {
  margin-top: 0;
}

/* ─── SIDEBAR TOC（追従目次） ─── */
.article-sidebar-toc {
  position: sticky;
  top: calc(var(--sticky-top, 96px) + 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .02);
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE / Edge */
  width: 260px;
  max-width: 100%;
  box-sizing: border-box;
}
.article-sidebar-toc::-webkit-scrollbar {
  display: none; /* Chrome / Safari */
}
.article-sidebar-toc-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.article-toc-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: toc-sidebar;
  width: 100%;
}
.article-toc-nav-list li {
  width: 100%;
  min-width: 0;
}
.article-toc-nav-list li a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  padding: 7px 10px;
  border-radius: 6px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all .14s ease;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.article-toc-nav-list li a:hover {
  color: var(--text);
  background: var(--surface2);
}
.article-toc-nav-list li.active a {
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-light);
  border-left-color: var(--accent);
}
.article-toc-nav-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.article-toc-nav-list li.active .article-toc-nav-num {
  color: var(--accent);
}
.article-toc-nav-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

/* 読了プログレスバー（サイドバー内） */
.article-progress-wrap {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.article-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.article-progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.article-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .15s ease;
}

/* スマホ用インライン目次（モバイル時のみ上部に表示） */
.article-mobile-toc {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 32px;
}
.article-mobile-toc summary {
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  user-select: none;
}
.article-mobile-toc ol {
  margin: 12px 0 0;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.8;
}
.article-mobile-toc a {
  color: var(--text-muted);
  text-decoration: none;
}
.article-mobile-toc a:hover {
  color: var(--accent);
}

/* ─── ARTICLE SECTIONS ─── */
.article-section {
  margin-bottom: 54px;
}
.article-section:last-child {
  margin-bottom: 0;
}

.article-section h2 {
  font-family: var(--display);
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 22px;
  padding-left: 16px;
  border-left: 3.5px solid var(--accent);
  color: var(--text);
  letter-spacing: -.01em;
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.article-section h2 .sec-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-right: 10px;
  flex-shrink: 0;
  margin-top: 4px;
  background: transparent;
  width: auto;
  height: auto;
  border-radius: 0;
}
.sec-num--auto::before {
  counter-increment: article-sec;
  content: counter(article-sec, decimal-leading-zero);
}

.article-section h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 32px 0 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  padding-left: 0;
  border-left: none;
}
.article-section h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.article-section p {
  font-size: var(--fs-base);
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 18px;
}
.article-section p:last-child {
  margin-bottom: 0;
}

.article-section ul,
.article-section ol {
  line-height: 1.9;
  padding-left: 22px;
  margin-bottom: 18px;
  font-size: var(--fs-base);
}
.article-section ul:last-child,
.article-section ol:last-child {
  margin-bottom: 0;
}
.article-section li + li {
  margin-top: 4px;
}

/* ─── CALLOUT BOXES（InfoBox刷新: 左ライン+淡背景） ─── */
.info-box {
  display: flex;
  gap: 14px;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 24px 0;
  border-left: 3.5px solid var(--accent);
  background: var(--accent-light);
  line-height: 1.75;
}
.info-box--tip {
  background: var(--accent-light);
  border-left-color: var(--accent);
}
.info-box--warn {
  background: var(--orange-light);
  border-left-color: var(--orange);
}
.info-box--success {
  background: var(--green-light);
  border-left-color: var(--green);
}
.info-box-body {
  flex: 1;
  min-width: 0;
}
.info-box-title {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}
.info-box-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.info-box-content p,
.info-box p {
  font-size: 14px !important;
  line-height: 1.75 !important;
  color: var(--text-muted) !important;
  margin-bottom: 0 !important;
}
.info-box-content p + p,
.info-box p + p {
  margin-top: 8px !important;
}

/* ─── STEP FLOW（手順の縦型タイムライン化） ─── */
.step-flow {
  display: flex;
  flex-direction: column;
  margin: 24px 0;
  padding-left: 4px;
}
.step-item {
  display: flex;
  gap: 18px;
  position: relative;
}
.step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 32px;
}
.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--mono);
  flex-shrink: 0;
  z-index: 1;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent-light);
}
.step-line {
  width: 2px;
  flex: 1;
  min-height: 18px;
  background: var(--border);
  margin: 4px 0;
}
.step-item:last-child .step-line {
  display: none;
}
.step-body {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  margin-bottom: 14px;
  flex: 1;
}
.step-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .06em;
  margin-bottom: 4px;
  display: inline-block;
  background: transparent;
  padding: 0;
}
.step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.step-content p,
.step-body p {
  font-size: 14px !important;
  line-height: 1.75 !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
}

/* 旧ステップカード互換 */
.step-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

/* ─── FEATURE / COMPARISON TABLES ─── */
.article-table-wrap {
  margin: 22px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  position: relative;
}
.table-scroll-hint {
  background: var(--surface2);
  border-bottom: 1px solid var(--border-soft);
  padding: 5px 14px;
  font-size: 11px;
  color: var(--text-muted);
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
}
.article-table th, .article-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
  line-height: 1.6;
}
.article-table th {
  background: var(--surface2);
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.article-table tr:last-child td {
  border-bottom: none;
}
.article-table td:not(:first-child) {
  white-space: normal;
  min-width: 180px;
}
.article-table tr:hover td {
  background: var(--surface2);
}

/* ─── INLINE CTA CARD ─── */
.inline-cta {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.inline-cta p {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  color: var(--text) !important;
  display: flex;
  align-items: center;
  gap: 6px;
}
.inline-cta-btn {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: background .14s, transform .14s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.inline-cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

/* ─── ACTION BANNER / FINAL CTA ─── */
.article-cta-card {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--surface) 70%);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 48px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 0 0 4px var(--accent-light);
}
.article-cta-text h4 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 5px;
  color: var(--text);
}
.article-cta-text p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 0;
}
.article-cta-btn {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 14.5px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all .15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.article-cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 110, 243, .3);
  text-decoration: none;
}

/* ─── FAQ（アコーディオン形式） ─── */
.faq-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.faq-item-acc {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.faq-item-acc summary {
  padding: 14px 18px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  list-style: none;
  user-select: none;
  transition: background .14s;
}
.faq-item-acc summary::-webkit-details-marker {
  display: none;
}
.faq-item-acc summary:hover {
  background: var(--surface2);
}
.faq-q-label {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}
.faq-chevron {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
  transition: transform .2s ease;
}
details[open] .faq-chevron {
  transform: rotate(180deg);
}
.faq-a-body {
  padding: 0 18px 16px 42px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-soft);
  padding-top: 12px;
}
.faq-a-prefix {
  font-family: var(--display);
  font-weight: 800;
  color: var(--green);
  margin-right: 6px;
}

/* ─── RELATED ARTICLES（関連記事カード） ─── */
.article-related-wrap {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.article-related-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.article-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.article-related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all .15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .03);
}
.article-related-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-light);
  transform: translateY(-2px);
  text-decoration: none;
}
.article-related-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 7px;
  border-radius: 999px;
  width: fit-content;
}
.article-related-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}
.article-related-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}
.article-related-arrow {
  font-size: 12px;
  color: var(--accent);
  margin-top: auto;
  font-weight: 700;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1040px) {
  .article-grid-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar-toc {
    display: none;
  }
  .article-mobile-toc {
    display: block;
  }
  .article-main-col {
    padding: 26px 20px;
  }
  .article-hero {
    padding: 26px 18px 22px;
  }
  .article-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .article-hero {
    padding: 20px 14px 16px;
  }
  .article-content-wrap {
    padding: 16px 12px 48px;
  }
  .article-main-col {
    padding: 20px 14px;
  }
  .article-meta-date {
    margin-left: 0;
    width: 100%;
  }
  .article-related-grid {
    grid-template-columns: 1fr;
  }
  .table-scroll-hint {
    display: flex;
  }
}
