/* Shared styles for FaMemo guide articles and the guide index. */
.article-page {
  background:
    radial-gradient(circle at 82% 3%, rgba(255, 81, 63, 0.07), transparent 25rem),
    var(--bg);
}

.article-container {
  max-width: 780px;
}

.article-hero {
  padding-top: 58px;
  padding-bottom: 42px;
}

.article-label {
  width: fit-content;
  margin: 0 0 16px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--surface-warm);
  font-size: 0.82rem;
  font-weight: 700;
}

.article-label a {
  color: inherit;
}

.article-hero h1 {
  max-width: 760px;
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  line-height: 1.35;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.article-lead {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;
}

.article-date {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.article-introduction {
  font-size: 1rem;
  line-height: 1.95;
}

.article-document {
  padding-right: 38px;
  padding-left: 38px;
}

.article-section {
  font-size: 1rem;
  line-height: 1.95;
}

.article-section h2 {
  font-size: 1.42rem;
  line-height: 1.55;
}

.article-section p + p {
  margin-top: 18px;
}

.article-section ul {
  gap: 9px;
  line-height: 1.8;
}

.article-subsection {
  margin-top: 30px;
  padding-top: 2px;
}

.article-subsection h3 {
  margin: 0 0 12px;
  color: var(--secondary);
  font-size: 1.12rem;
  line-height: 1.55;
}

.article-subsection p {
  margin: 0;
}

.article-subsection p + p {
  margin-top: 12px;
}

.article-examples {
  padding: 16px 18px 16px 2.2em;
  border-radius: var(--radius-small);
  background: var(--surface-soft);
}

.article-key-point {
  padding: 18px 20px;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--surface-warm);
}

.article-key-point strong {
  color: var(--text-strong);
}

.article-tool-list li {
  display: grid;
  grid-template-columns: minmax(5.5em, auto) 1.5em 1fr;
  gap: 4px;
  align-items: baseline;
}

.article-summary {
  border-bottom: 0;
}

.related-guides {
  margin-top: 34px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.related-guides h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.28rem;
  line-height: 1.5;
}

.related-guide-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.related-guide-card {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--bg);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.related-guide-card:hover {
  border-color: rgba(255, 81, 63, 0.34);
  background: var(--surface-warm);
}

.related-guide-card strong {
  color: var(--secondary);
  line-height: 1.55;
}

.related-guide-card span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.related-guides-all {
  margin: 16px 0 0;
  text-align: right;
}

.related-guides-all a {
  color: var(--primary-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.guide-index-main {
  padding-bottom: 72px;
}

.guide-index-introduction {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.9;
}

.guide-index-content {
  padding-top: 40px;
}

.guide-grid {
  display: grid;
  gap: 16px;
}

.guide-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.guide-card:hover {
  border-color: rgba(255, 81, 63, 0.34);
  transform: translateY(-2px);
}

.guide-card-number {
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.guide-card h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.15rem;
  line-height: 1.55;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.75;
}

.guide-card-link {
  color: var(--secondary);
  font-size: 0.9rem;
  font-weight: 700;
}

.article-cta {
  margin-top: 34px;
  padding: 28px;
  border: 1px solid rgba(255, 81, 63, 0.2);
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, rgba(255, 243, 239, 0.94), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.article-cta-label {
  margin: 0;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.article-cta h2 {
  margin: 8px 0 0;
  color: var(--text-strong);
  font-size: 1.35rem;
  line-height: 1.5;
}

.article-cta > p:not(.article-cta-label) {
  margin: 10px 0 0;
  color: var(--muted);
}

.article-cta a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 0 22px;
  border-radius: 12px;
  color: #FFFFFF;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(255, 81, 63, 0.2);
  font-weight: 700;
}

.article-cta a:hover {
  background: var(--primary-dark);
}

.article-page-top {
  margin-top: 28px;
}

@media (max-width: 759px) {
  .article-hero {
    padding-top: 38px;
    padding-bottom: 30px;
  }

  .article-hero h1 {
    font-size: clamp(1.55rem, 7.2vw, 2rem);
    line-height: 1.42;
  }

  .article-lead,
  .article-introduction,
  .article-section {
    font-size: 0.96rem;
    line-height: 1.88;
  }

  .article-document {
    padding-right: 18px;
    padding-left: 18px;
  }

  .article-section h2 {
    padding-left: 12px;
    font-size: 1.2rem;
    line-height: 1.5;
  }

  .article-subsection {
    margin-top: 26px;
  }

  .article-subsection h3 {
    font-size: 1.04rem;
  }

  .article-key-point {
    padding: 16px;
  }

  .article-tool-list li {
    grid-template-columns: minmax(5.5em, auto) 1.25em 1fr;
  }

  .article-cta {
    padding: 22px 18px;
  }

  .article-cta h2 {
    font-size: 1.18rem;
  }

  .article-cta a {
    width: 100%;
  }

  .related-guides {
    padding: 20px 18px;
  }

  .related-guides h2 {
    font-size: 1.16rem;
  }

  .related-guide-card,
  .guide-card {
    padding: 18px;
  }

  .guide-index-content {
    padding-top: 28px;
  }
}

@media (min-width: 760px) {
  .related-guide-grid,
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-cta a,
  .related-guide-card,
  .guide-card {
    transition: none;
  }
}
