/**
 * Guide-style article presentation.
 * Loaded only on individual posts.
 */

.single-article {
  counter-reset: fm-section;
}

.single-article .entry-header {
  background:
    radial-gradient(circle at 92% 8%, rgba(18, 107, 112, 0.08) 0 86px, transparent 87px),
    linear-gradient(145deg, #edf6f6 0%, #ffffff 70%);
  border: 1px solid #d8e7e8;
  border-bottom: 1px solid #d8e7e8;
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(20, 48, 58, 0.08);
  margin-bottom: 30px;
  overflow: hidden;
  padding: clamp(32px, 6vw, 56px);
  position: relative;
}

.single-article .entry-header::before {
  color: var(--fm-brand);
  content: "SMART CHOICE GUIDE";
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-bottom: 15px;
}

.single-article .entry-header .category-badge {
  background: #ffffff;
  border: 1px solid #cfe2e3;
  border-radius: 999px;
  padding: 4px 10px;
}

.single-article .entry-title {
  font-size: clamp(2.05rem, 4.8vw, 3.35rem);
  letter-spacing: -0.035em;
  line-height: 1.36;
  margin: 16px 0 25px;
}

.single-article .entry-meta {
  border-top: 1px solid rgba(18, 107, 112, 0.15);
  padding-top: 17px;
}

.single-article .entry-thumbnail {
  margin: 30px 0 44px;
}

.single-article .entry-thumbnail img {
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(20, 48, 58, 0.1);
}

.single-article .entry-content {
  color: #26333a;
  font-size: 1.02rem;
  line-height: 2;
}

.single-article .entry-content > p:first-child {
  background: var(--fm-soft-brand);
  border-radius: 11px;
  color: #263d43;
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 42px;
  padding: 20px 23px;
}

.single-article .entry-content > p:first-child::before {
  color: var(--fm-brand);
  content: "この記事のポイント";
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.single-article .entry-content > h2 {
  border: 0;
  border-bottom: 1px solid var(--fm-line);
  counter-increment: fm-section;
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  letter-spacing: -0.02em;
  line-height: 1.5;
  margin: 3.2em 0 1.25em;
  padding: 0 0 0.65em;
}

.single-article .entry-content > h2::before {
  color: var(--fm-brand);
  content: "SECTION " counter(fm-section, decimal-leading-zero);
  display: block;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.4;
  margin-bottom: 0.65em;
}

.single-article .entry-content > h3 {
  border: 0;
  border-left: 4px solid var(--fm-brand);
  font-size: clamp(1.2rem, 2.3vw, 1.48rem);
  line-height: 1.55;
  margin: 2.5em 0 1em;
  padding: 0.12em 0 0.12em 0.72em;
}

.single-article .entry-content > h4 {
  align-items: center;
  display: flex;
  font-size: 1.08rem;
  gap: 9px;
}

.single-article .entry-content > h4::before {
  background: var(--fm-brand);
  border-radius: 50%;
  content: "";
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}

.single-article .entry-content > ul,
.single-article .entry-content > ol {
  background: #f7f9f9;
  border: 1px solid #e1e9eb;
  border-radius: 11px;
  list-style: none;
  margin-block: 1.8em;
  padding: 8px 20px;
}

.single-article .entry-content > ul > li,
.single-article .entry-content > ol > li {
  border-bottom: 1px solid var(--fm-line);
  line-height: 1.75;
  margin: 0;
  min-height: 46px;
  padding: 13px 0 13px 34px;
  position: relative;
}

.single-article .entry-content > ul > li:last-child,
.single-article .entry-content > ol > li:last-child {
  border-bottom: 0;
}

.single-article .entry-content > ul > li::before {
  align-items: center;
  background: var(--fm-brand);
  border-radius: 50%;
  color: #ffffff;
  content: "✓";
  display: flex;
  font-size: 0.66rem;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  left: 0;
  position: absolute;
  top: 16px;
  width: 20px;
}

.single-article .entry-content > ol {
  counter-reset: fm-step;
}

.single-article .entry-content > ol > li {
  counter-increment: fm-step;
  padding-left: 42px;
}

.single-article .entry-content > ol > li::before {
  color: var(--fm-brand);
  content: counter(fm-step, decimal-leading-zero);
  font-size: 0.72rem;
  font-weight: 900;
  left: 0;
  letter-spacing: 0.04em;
  position: absolute;
  top: 15px;
}

.single-article .entry-content > ol > li::after {
  background: #b9d8da;
  content: "";
  height: 22px;
  left: 31px;
  position: absolute;
  top: 15px;
  width: 1px;
}

.single-article .entry-content :where(ul, ol) :where(ul, ol) {
  margin-block: 0.7em;
  padding-left: 1.35em;
}

.single-article .entry-content .wp-block-table {
  border-radius: 11px;
  box-shadow: 0 12px 30px rgba(20, 48, 58, 0.08);
  margin-block: 2em;
  overflow-x: auto;
}

.single-article .entry-content table {
  background: #ffffff;
  border-collapse: separate;
  border-spacing: 0;
  border-top: 3px solid var(--fm-brand);
  font-size: 0.9rem;
  margin-block: 2em;
}

.single-article .entry-content .wp-block-table table {
  margin-block: 0;
}

.single-article .entry-content th,
.single-article .entry-content td {
  border: 0;
  border-bottom: 1px solid var(--fm-line);
  line-height: 1.65;
  padding: 0.9em 1em;
}

.single-article .entry-content th {
  background: var(--fm-soft-brand);
  color: var(--fm-brand-dark);
  font-weight: 800;
}

.single-article .entry-content tbody tr:nth-child(even) td {
  background: #fafcfc;
}

.single-article .entry-content tbody tr:last-child td {
  border-bottom: 0;
}

.single-article .entry-content td:first-child {
  color: var(--fm-brand-dark);
  font-weight: 700;
}

.single-article .entry-content blockquote {
  background: #fff8f4;
  border: 1px solid #f1d8ca;
  border-left: 1px solid #f1d8ca;
  border-radius: 10px;
  color: #654a3f;
  margin-block: 2em;
  padding: 1.2em 1.35em 1.2em 3.4em;
  position: relative;
}

.single-article .entry-content blockquote::before {
  color: var(--fm-accent);
  content: "!";
  font-size: 1.35rem;
  font-weight: 900;
  left: 1.15em;
  position: absolute;
  top: 0.78em;
}

.single-article .entry-content .fm-cta {
  background: var(--fm-brand-dark);
  border: 0;
  border-radius: 13px;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(11, 78, 82, 0.16);
}

.single-article .entry-content .fm-cta :where(h2, h3, h4, p) {
  color: inherit;
}

.single-article .entry-content .fm-cta h2::before {
  content: none;
}

.single-article .entry-content .fm-cta .wp-block-button__link,
.single-article .entry-content .fm-cta .button-link {
  background: var(--fm-accent);
}

.single-article .entry-content a:not(.wp-block-button__link) {
  text-decoration-color: rgba(18, 107, 112, 0.38);
  text-decoration-thickness: 2px;
}

.single-article .entry-footer {
  margin-top: 64px;
}

@media (max-width: 680px) {
  .single-article .entry-header {
    background: linear-gradient(145deg, #edf6f6 0%, #ffffff 82%);
    margin-inline: -4px;
    padding: 28px 22px;
  }

  .single-article .entry-title {
    font-size: clamp(1.8rem, 8.5vw, 2.4rem);
  }

  .single-article .entry-content {
    font-size: 0.98rem;
  }

  .single-article .entry-content > p:first-child {
    padding: 18px;
  }

  .single-article .entry-content > h2 {
    margin-top: 2.7em;
  }

  .single-article .entry-content > ul,
  .single-article .entry-content > ol {
    padding-inline: 16px;
  }

  .single-article .entry-content table {
    min-width: 620px;
  }
}

@media print {
  .single-article .entry-header,
  .single-article .entry-thumbnail img,
  .single-article .entry-content .wp-block-table,
  .single-article .entry-content .fm-cta {
    box-shadow: none;
  }
}
