/**
 * Content blocks the R4-R6 texts carry as classes: key takeaways, sources, steps,
 * comparison tables, "On Coinmama" box, risk line. Loaded on single views whose
 * content uses one of the classes (inc/enqueue-assets.php).
 * Based on Robi's academy.20260928.css and main.20260930.css (comparison tables);
 * mobile table labels come from inc/comparison-table.php.
 * New date in the file name on every change: CloudFront ignores ?ver on theme assets.
 */

/* Answer summary box (inc/aeo-answer.php above the content, [cm_answer] on pages) */
.coinmama-answer {
  background: #f2f7fa;
  border-left: 4px solid #2b65e8;
  padding: 16px 20px;
  margin: 0 0 28px;
  border-radius: 4px;
}

.coinmama-answer p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* Key takeaways (pattern coinmama/key-takeaways) */
.cm-key-takeaways {
  margin: 0 0 32px;
  padding: 20px 24px;
  border-radius: 10px;
  background: #f2f7fa;
}

.cm-key-takeaways .cm-key-takeaways__title {
  margin: 0 0 8px;
  color: #000071;
  font-size: 18px;
}

.cm-key-takeaways__list {
  margin: 0;
  padding-left: 22px;
}

.cm-key-takeaways__list li {
  margin: 6px 0;
  color: #3c4858;
  font-size: 17px;
  line-height: 1.6;
}

/* Sources (pattern coinmama/sources) */
.cm-sources {
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid #eaeaea;
  color: #3c4858;
  font-size: 15px;
  line-height: 1.6;
}

.cm-sources p {
  margin: 0 0 8px;
  color: #000071;
}

.cm-sources__list {
  margin: 0;
  padding-left: 22px;
}

.cm-sources__list li {
  margin: 4px 0;
  overflow-wrap: anywhere;
}

/* Steps (pattern coinmama/steps) */
.cm-steps {
  margin: 0 0 32px;
}

.cm-steps__list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: cm-step;
}

.cm-steps__list > li {
  position: relative;
  min-height: 36px;
  margin: 0 0 16px;
  padding-left: 52px;
  counter-increment: cm-step;
}

.cm-steps__list > li::before {
  content: counter(cm-step);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #000071;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

/* Comparison table caption (table layout at the end of this file) */
.cm-compare-table figcaption,
.cm-compare-table .wp-element-caption {
  margin-top: 8px;
  color: #696a6a;
  font-size: 14px;
  text-align: left;
}

/* "On Coinmama" box: approved sentences and support links only */
.cm-on-coinmama {
  margin: 32px 0;
  padding: 20px 24px;
  border: 1px solid #dde6fb;
  border-radius: 10px;
  background: #fff;
}

.cm-on-coinmama > :first-child {
  margin-top: 0;
}

.cm-on-coinmama > :last-child {
  margin-bottom: 0;
}

/* Risk line */
.cm-risk-line {
  margin: 32px 0;
  padding: 14px 18px;
  border-left: 3px solid #696a6a;
  background: #fff;
  color: #3c4858;
  font-size: 14px;
  line-height: 1.6;
}


/* Comparison tables (core Table block with the "cm-compare-table" class) */
.cm-compare-table table { font-size: 15px; line-height: 1.5; }
.cm-compare-table th { color: #000071; text-align: left; vertical-align: bottom; }
.cm-compare-table td { vertical-align: top; color: #444444; }
.cm-compare-table td:first-child { width: 20%; color: #000071; }
@media screen and (max-width: 767px) {
  /* Stack each row into a card; labels come from the header row (inc/comparison-table.php). */
  .cm-compare-table table, .cm-compare-table tbody, .cm-compare-table tr, .cm-compare-table td { display: block; width: 100%; }
  .cm-compare-table thead { display: none; }
  .cm-compare-table tr { padding: 12px 0; border-bottom: 1px solid #dde5ea; }
  .cm-compare-table td { border: 0; padding: 4px 0; }
  .cm-compare-table td:first-child { width: 100%; font-size: 17px; }
  .cm-compare-table td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-weight: 700; color: #2b65e8; margin-top: 6px; }
}

/* ---------- Academy guide template (inc/academy-template.php) ---------- */

.cm-featured {
  margin: 0 0 32px;
  text-align: center;
}

.cm-featured img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

/* Contents box ("On this page") */
.cm-toc {
  margin: 0 0 36px;
  padding: 20px 24px;
  border-radius: 10px;
  background: #f2f7fa;
}

.cm-toc summary {
  color: #000071;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

.cm-toc__list {
  margin: 12px 0 0;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.6;
}

.cm-toc__list li {
  margin: 4px 0;
}

.cm-toc__list a:link,
.cm-toc__list a:visited {
  color: #000071;
  text-decoration: none;
}

.cm-toc__list a:hover {
  color: #2b65e8;
  text-decoration: underline;
}

/* Headings the contents box links to: keep them clear of the sticky header */
.single-academy .entry-content h2[id] {
  scroll-margin-top: 110px;
}

/* Next-step module (article; the glossary uses the same block) */
.cm-cta {
  margin: 40px 0 0;
  padding: 28px 32px;
  border-radius: 12px;
  background: #f2f7fa;
  text-align: center;
}

.cm-cta__title {
  margin: 0 0 6px;
  color: #000071;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.cm-cta__text {
  margin: 0 0 20px;
  color: #3c4858;
  font-size: 17px;
  line-height: 1.5;
}

.cm-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
}

.cm-cta__btn:link,
.cm-cta__btn:visited {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid #2b65e8;
  border-radius: 24px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.cm-cta__btn--primary:link,
.cm-cta__btn--primary:visited {
  background: #2b65e8;
  color: #fff;
}

.cm-cta__btn--primary:hover {
  border-color: #000071;
  background: #000071;
  color: #fff;
}

.cm-cta__btn--secondary:link,
.cm-cta__btn--secondary:visited {
  background: #fff;
  color: #2b65e8;
}

.cm-cta__btn--secondary:hover {
  border-color: #000071;
  color: #000071;
}

.cm-cta__btn:focus-visible,
.cm-path-nav a:focus-visible,
.cm-toc summary:focus-visible,
.cm-toc__list a:focus-visible {
  outline: 2px solid #2b65e8;
  outline-offset: 2px;
}

.cm-cta__note {
  margin: 16px 0 0;
  color: #3c4858;
  font-size: 14px;
  line-height: 1.5;
}

@media screen and (max-width: 575px) {
  .cm-cta {
    padding: 22px 16px;
  }

  .cm-cta__btn:link,
  .cm-cta__btn:visited {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
}

/* Learning-path links (previous / next guide in the topic's reading order) */
.cm-path-nav {
  margin: 40px 0 0;
  padding: 20px 0;
  border-top: 1px solid #eaeaea;
  border-bottom: 1px solid #eaeaea;
}

.cm-path-nav__list {
  display: flex;
  gap: 16px 30px;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-path-nav__item {
  flex: 1 1 0;
  margin: 0;
}

.cm-path-nav__item--next {
  text-align: right;
}

.cm-path-nav__item--next:only-child {
  margin-left: auto;
}

.cm-path-nav a:link,
.cm-path-nav a:visited {
  display: block;
  text-decoration: none;
}

.cm-path-nav__label {
  display: block;
  color: #696a6a;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cm-path-nav__title {
  display: block;
  color: #000071;
  font-size: 18px;
  line-height: 1.4;
}

.cm-path-nav a:hover .cm-path-nav__title {
  color: #2b65e8;
  text-decoration: underline;
}

@media screen and (max-width: 575px) {
  .cm-path-nav__list {
    flex-direction: column;
  }

  .cm-path-nav__item--next {
    text-align: left;
  }
}

/* "More in {topic}": same cards as Related Articles, plus a link to the topic */
.cm-more-in-hub {
  margin: 20px 0 56px;
}

.cm-more-in-hub__all {
  margin: 0;
  text-align: center;
}

.cm-more-in-hub__all a:link,
.cm-more-in-hub__all a:visited {
  color: #2b65e8;
  font-weight: 500;
}

/* ---------- Glossary term template (inc/glossary-template.php) ---------- */

.cm-level {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  background: #f2f7fa;
  color: #000071;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-transform: uppercase;
}

.cm-meta-line {
  margin: 0 0 30px;
  border-bottom: 1px solid #eaeaea;
}

.cm-meta-line__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 24px;
  margin: 0;
  padding: 0 0 16px;
  list-style: none;
}

.cm-meta-line__item {
  margin: 0;
  color: #3c4858;
  font-size: 14px;
  line-height: 1.5;
}

.cm-meta-line__item a:link,
.cm-meta-line__item a:visited {
  color: #000071;
}


/* Term lists with one-line definitions (home sections, related terms) */
.cm-glossary-terms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-glossary-terms li {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
}

.cm-glossary-terms a:link,
.cm-glossary-terms a:visited {
  color: #000071;
  font-weight: 500;
}

.cm-glossary-terms a:hover {
  color: #2b65e8;
}

.cm-glossary-terms__def {
  display: block;
  margin-top: 2px;
  color: #3c4858;
  font-size: 15px;
  line-height: 1.5;
}

/* Term page: meta row and topic chip */
.cm-meta-line--term .cm-meta-line__list {
  gap: 8px 16px;
}

.cm-hub-chip:link,
.cm-hub-chip:visited {
  display: inline-block;
  padding: 2px 12px;
  border: 1px solid #dde6fb;
  border-radius: 12px;
  background: #fff;
  color: #000071;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
}

.cm-hub-chip:hover {
  border-color: #2b65e8;
  color: #2b65e8;
}

/* Term page: sections after the definition */
.cm-term-related,
.cm-go-deeper,
.cm-term-sources {
  margin: 48px 0 0;
}

.cm-term__title,
.cm-term-sources .cm-term__title {
  margin: 0 0 20px;
  color: #000071;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
}

@media screen and (max-width: 767px) {
  .cm-term__title,
  .cm-term-sources .cm-term__title {
    font-size: 24px;
  }
}

.cm-go-deeper__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media screen and (max-width: 575px) {
  .cm-go-deeper__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cm-term-sources {
  padding-top: 24px;
}

/* Term page: previous / next term */
.cm-az-nav {
  margin: 48px 0 0;
  padding: 20px 0;
  border-top: 1px solid #eaeaea;
  border-bottom: 1px solid #eaeaea;
}

.cm-az-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 30px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-az-nav__item {
  flex: 1 1 0;
  margin: 0;
}

.cm-az-nav__item--home {
  flex: 0 0 auto;
  text-align: center;
}

.cm-az-nav__item--next {
  text-align: right;
}

.cm-az-nav__item--next:only-child {
  margin-left: auto;
}

.cm-az-nav a:link,
.cm-az-nav a:visited {
  display: block;
  color: #2b65e8;
  text-decoration: none;
}

.cm-az-nav__label {
  display: block;
  color: #696a6a;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cm-az-nav__title {
  display: block;
  color: #000071;
  font-size: 18px;
  line-height: 1.4;
}

.cm-az-nav a:hover .cm-az-nav__title,
.cm-az-nav__item--home a:hover {
  color: #2b65e8;
  text-decoration: underline;
}

@media screen and (max-width: 575px) {
  .cm-az-nav__list {
    flex-direction: column;
    align-items: stretch;
  }

  .cm-az-nav__item--home,
  .cm-az-nav__item--next {
    text-align: left;
  }
}

/* ---------- Academy topic pages (taxonomy-academy_category.php, inc/academy-hubs.php) ---------- */

.cm-hub__intro p,
.cm-academy-home__intro p {
  margin: 0 0 12px;
}

.cm-hub__start,
.cm-hub__section,
.cm-hub__terms,
.cm-hub__money,
.cm-hub__all,
.cm-faq,
.cm-path,
.cm-hubs,
.cm-academy-home__section,
.cm-glossary-teaser {
  margin: 0 0 56px;
}

.cm-hub__title,
.cm-academy-home__title {
  margin: 0 0 20px;
  color: #000071;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.25;
}

@media screen and (max-width: 767px) {
  .cm-hub__title,
  .cm-academy-home__title {
    font-size: 26px;
  }
}

.cm-hub__section-intro {
  margin: -8px 0 20px;
  font-size: 17px;
}

.cm-hub__money {
  padding: 28px 32px;
  border-radius: 12px;
  background: #f2f7fa;
}

.cm-hub__money-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.cm-hub__money-link:link,
.cm-hub__money-link:visited {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid #2b65e8;
  border-radius: 24px;
  background: #fff;
  color: #2b65e8;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}

.cm-hub__money-link:hover {
  background: #2b65e8;
  color: #fff;
}

.cm-hub__money-note {
  display: block;
  color: #696a6a;
  font-size: 14px;
}

.cm-hub__money-disclaimer {
  margin: 0;
  color: #3c4858;
  font-size: 14px;
}

/* FAQ (hub pages; details/summary, no script) */
.cm-faq__item {
  border-top: 1px solid #dbdbdb;
}

.cm-faq__item:last-of-type {
  border-bottom: 1px solid #dbdbdb;
}

.cm-faq__item summary {
  position: relative;
  padding: 20px 8px 20px 40px;
  color: #000;
  font-size: 20px;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

.cm-faq__item summary::-webkit-details-marker {
  display: none;
}

.cm-faq__item summary::before {
  content: "+";
  position: absolute;
  left: 10px;
  color: #2b65e8;
  font-weight: 600;
}

.cm-faq__item[open] summary::before {
  content: "\2212";
}

.cm-faq__answer {
  padding: 0 8px 20px 40px;
  color: #696a6a;
}

.cm-faq__answer p {
  margin: 0 0 12px;
}

/* ---------- Academy home (archive-academy.php) ---------- */

.cm-asof {
  margin: -12px 0 20px;
  color: #696a6a;
  font-size: 14px;
}

.cm-path {
  padding: 32px;
  border-radius: 12px;
  background: #f2f7fa;
}

.cm-path__list {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.cm-path__step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 20px;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  background: #fff;
}

.cm-path__num {
  display: flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 50%;
  background: #000071;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.cm-path__body {
  min-width: 0;
}

.cm-path__link:link,
.cm-path__link:visited {
  color: #000071;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}

.cm-path__link:hover {
  color: #2b65e8;
  text-decoration: underline;
}

.cm-path__summary {
  margin: 4px 0 0;
  color: #696a6a;
  font-size: 15px;
  line-height: 1.6;
}

.cm-path__cta {
  margin: 0;
}

.cm-path__cta-link:link,
.cm-path__cta-link:visited {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 24px;
  background: #2b65e8;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.cm-path__cta-link:hover {
  background: #000071;
  color: #fff;
}

@media screen and (max-width: 575px) {
  .cm-path {
    padding: 20px 16px;
  }

  .cm-path__step {
    padding: 14px;
  }
}

/* Academy home: topic cards */
.cm-hubs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.cm-hub-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.cm-hub-card:hover {
  border-color: #dde6fb;
  box-shadow: 0 0 8px 0 rgba(9, 54, 156, 0.12);
}

.cm-topic__title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}

.cm-topic__title a:link,
.cm-topic__title a:visited {
  color: #000071;
  text-decoration: none;
}

.cm-topic__title a:hover {
  color: #2b65e8;
  text-decoration: underline;
}

.cm-topic__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.cm-topic__count {
  margin: 0;
  color: #696a6a;
  font-size: 14px;
}

.cm-topic__guide {
  margin: auto 0 0;
  font-size: 15px;
  line-height: 1.5;
}

.cm-topic__guide-label {
  color: #696a6a;
}

.cm-topic__guide a {
  color: #2b65e8;
}

/* Academy home: glossary teaser */
.cm-glossary-teaser {
  padding: 32px;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  background: #f8f8f8;
}

.cm-glossary-teaser__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.cm-glossary-teaser__list a:link,
.cm-glossary-teaser__list a:visited {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid #dde6fb;
  border-radius: 19px;
  background: #fff;
  color: #000071;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
}

.cm-glossary-teaser__list a:hover {
  border-color: #2b65e8;
  color: #2b65e8;
}

.cm-glossary-teaser__more {
  margin: 0;
}

.cm-glossary-teaser__more a {
  color: #2b65e8;
  font-weight: 500;
}

@media screen and (max-width: 575px) {
  .cm-glossary-teaser,
  .cm-hub__money {
    padding: 20px 16px;
  }
}


/* ---------- Glossary home (archive-glossary.php); the A-Z list keeps its blog.css styles ---------- */

/* Glossary home: filter */
.cm-glossary-filter {
  max-width: 560px;
  margin: 0 auto 56px;
}

.cm-glossary-filter label {
  display: block;
  margin: 0 0 8px;
  color: #000071;
  font-size: 17px;
  font-weight: 600;
}

.cm-glossary-filter input[type="search"] {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 18px;
  border: 1px solid #696a6a;
  border-radius: 24px;
  background: #fff;
  color: #000;
  font-size: 18px;
  line-height: 1.4;
}

.cm-glossary-filter__count {
  min-height: 1.5em;
  margin: 8px 0 0;
  color: #3c4858;
  font-size: 15px;
}

.cm-glossary-filter__jump {
  margin: 4px 0 0;
  font-size: 15px;
}

.cm-glossary-filter__jump a:link,
.cm-glossary-filter__jump a:visited {
  color: #2b65e8;
}

/* Glossary home: sections */
.cm-glossary-section,
.cm-glossary-hub,
.cm-glossary-slang,
.cm-glossary-money {
  margin: 0 0 56px;
}

.cm-glossary-hub .cm-academy-home__title a:link,
.cm-glossary-hub .cm-academy-home__title a:visited {
  color: #000071;
  text-decoration: none;
}

.cm-glossary-hub .cm-academy-home__title a:hover {
  color: #2b65e8;
  text-decoration: underline;
}


/* Glossary home: crypto slang (collapsed) */
.cm-glossary-slang {
  padding: 0 24px;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  background: #fff;
}

.cm-glossary-slang summary {
  padding: 20px 0;
  color: #000071;
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
}

.cm-glossary-slang[open] summary {
  margin-bottom: 8px;
}

.cm-glossary-slang .cm-glossary-terms {
  padding-bottom: 24px;
}

/* Glossary home: ways to buy crypto (same look as the topic pages' "Ways to buy") */
.cm-glossary-money {
  padding: 28px 32px;
  border-radius: 12px;
  background: #f2f7fa;
}

@media screen and (max-width: 575px) {
  .cm-glossary-money,
  .cm-glossary-slang {
    padding-right: 16px;
    padding-left: 16px;
  }
}

/* Focus: every new control on the term page and the glossary home */
.cm-hub-chip:focus-visible,
.cm-glossary-terms a:focus-visible,
.cm-az-nav a:focus-visible,
.cm-az__list a:focus-visible,
.cm-glossary-filter input[type="search"]:focus-visible,
.cm-glossary-filter__jump a:focus-visible,
.cm-glossary-slang summary:focus-visible,
.glossary-list a:focus-visible {
  outline: 2px solid #2b65e8;
  outline-offset: 2px;
}


/* Filter: hidden terms and empty letter groups really disappear (blog.css sets .glossary-group to flex) */
.glossary-list [hidden] {
  display: none !important;
}

/* Letter anchors clear of the sticky header */
.glossary-list .glossary-group {
  scroll-margin-top: 110px;
}
