/* Shared article-body styles for the public blog and the CMS editor.
   Keep this file as the visual contract for guide HTML. */
:is(.editorial-body, .rich-editor-shell .ck-content) {
  color: #1f3335;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1.04rem;
  line-height: 1.9;
}

:is(.editorial-body, .rich-editor-shell .ck-content) h2 {
  margin-top: 2.8em;
  margin-bottom: 1em;
  color: #173d42;
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.01em;
  text-wrap: balance;
  padding-left: .85rem;
  border-left: 3px solid #c2652a;
}

:is(.editorial-body, .rich-editor-shell .ck-content) h3 {
  margin-top: 2em;
  margin-bottom: .8em;
  color: #2a4b50;
  font-family: Manrope, system-ui, sans-serif;
  font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -.005em;
  text-wrap: balance;
}

:is(.editorial-body, .rich-editor-shell .ck-content) h2 + h3,
:is(.editorial-body, .rich-editor-shell .ck-content) h3 + h3 { margin-top: 1.2em; }
:is(.editorial-body, .rich-editor-shell .ck-content) h2:first-child,
:is(.editorial-body, .rich-editor-shell .ck-content) h3:first-child { margin-top: 0; }

:is(.editorial-body, .rich-editor-shell .ck-content) p {
  margin-top: 1.1em;
  margin-bottom: 1.1em;
  line-height: 1.9;
}
:is(.editorial-body, .rich-editor-shell .ck-content) h2 + p,
:is(.editorial-body, .rich-editor-shell .ck-content) h3 + p { margin-top: .4em; }
:is(.editorial-body, .rich-editor-shell .ck-content) p:first-child { margin-top: 0; }
:is(.editorial-body, .rich-editor-shell .ck-content) p:last-child { margin-bottom: 0; }

:is(.editorial-body, .rich-editor-shell .ck-content) ul,
:is(.editorial-body, .rich-editor-shell .ck-content) ol {
  margin-top: 1.2em;
  margin-bottom: 1.2em;
  padding-inline-start: 1.5em;
}
:is(.editorial-body, .rich-editor-shell .ck-content) li {
  margin-top: .5em;
  margin-bottom: .5em;
  line-height: 1.75;
}
:is(.editorial-body, .rich-editor-shell .ck-content) li:first-child { margin-top: 0; }
:is(.editorial-body, .rich-editor-shell .ck-content) li:last-child { margin-bottom: 0; }
:is(.editorial-body, .rich-editor-shell .ck-content) ul { list-style: disc; }
:is(.editorial-body, .rich-editor-shell .ck-content) ol { list-style: decimal; }
:is(.editorial-body, .rich-editor-shell .ck-content) h2 + ul,
:is(.editorial-body, .rich-editor-shell .ck-content) h3 + ul,
:is(.editorial-body, .rich-editor-shell .ck-content) h2 + ol,
:is(.editorial-body, .rich-editor-shell .ck-content) h3 + ol { margin-top: .5em; }

:is(.editorial-body, .rich-editor-shell .ck-content) .editorial-figure,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.image {
  float: none !important;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 2.25rem 0;
  overflow: hidden;
  border: 1px solid rgba(15, 74, 79, .14);
  border-radius: 1rem;
  background: #f7faf9;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}
:is(.editorial-body, .rich-editor-shell .ck-content) .editorial-figure__frame,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.image {
  background: #e8efed;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .editorial-figure__frame {
  overflow: hidden;
}
/* Show the full photo at column width. Cropping to a fixed 16:10 box
   cut brand marks on the left/right of in-article images. */
:is(.editorial-body, .rich-editor-shell .ck-content) .editorial-figure img,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.image img {
  width: 100%;
  height: auto;
  margin: 0;
  display: block;
  object-fit: contain;
  object-position: left center;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .editorial-figure figcaption,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.image > figcaption,
.rich-editor-shell .ck.ck-editor__editable .image > figcaption {
  display: block !important;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  caption-side: unset;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  margin: 0;
  padding: .9rem 1rem 1rem;
  color: #3f5254;
  font-size: .82rem;
  line-height: 1.55;
  background: #f7faf9;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .editorial-figure__credit {
  display: block;
  margin-top: .35rem;
  color: #6b7d7f;
  font-size: .72rem;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .editorial-figure figcaption a,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.image figcaption a {
  color: #0e4a4f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

:is(.editorial-body, .rich-editor-shell .ck-content) .article-answer,
:is(.editorial-body, .rich-editor-shell .ck-content) .article-toc,
:is(.editorial-body, .rich-editor-shell .ck-content) .article-checklist,
:is(.editorial-body, .rich-editor-shell .ck-content) .article-warning,
:is(.editorial-body, .rich-editor-shell .ck-content) .article-source-list,
:is(.editorial-body, .rich-editor-shell .ck-content) .article-source-note {
  margin: 1.6rem 0 2rem;
  border-radius: 1rem;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-answer {
  padding: 1.35rem 1.45rem 1.25rem;
  border: 1px solid rgba(194, 101, 42, .28);
  border-left: 4px solid #c2652a;
  background: linear-gradient(135deg, #fffaf3, #f6eee2);
  box-shadow: 0 12px 28px rgba(90, 58, 35, .07);
}
.article-answer__label,
.article-toc__title,
.article-checklist__title,
.article-source-list__title {
  margin: 0 0 .55rem !important;
  color: #0e4a4f;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.4;
  text-transform: uppercase;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-answer p:not(.article-answer__label) {
  margin-top: .55rem;
  margin-bottom: .55rem;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-answer__meta {
  color: #647477;
  font-size: .78rem;
  line-height: 1.55;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-toc {
  padding: 1.2rem 1.35rem 1.25rem;
  border: 1px solid rgba(15, 74, 79, .15);
  background: rgba(255, 255, 255, .68);
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem 1.5rem;
  margin: 0;
  padding-left: 1.4rem;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-toc li {
  margin: 0;
  padding-left: .1rem;
  color: #567174;
  font-size: .92rem;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-toc a,
:is(.editorial-body, .rich-editor-shell .ck-content) .article-source-list a,
:is(.editorial-body, .rich-editor-shell .ck-content) .article-checklist a {
  color: #0e4a4f;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(194, 101, 42, .6);
  text-underline-offset: 3px;
}
:is(.editorial-body, .rich-editor-shell .ck-content) > p:has(+ ol > li > a[href^="#"]) {
  margin: 1.6rem 0 0 !important;
  padding: 1.2rem 1.35rem .55rem;
  border: 1px solid rgba(15, 74, 79, .15);
  border-bottom: 0;
  border-radius: 1rem 1rem 0 0;
  background: rgba(255, 255, 255, .68);
  color: #0e4a4f;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.4;
  text-transform: uppercase;
}
:is(.editorial-body, .rich-editor-shell .ck-content) > p:has(+ ol > li > a[href^="#"]) + ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem 1.5rem;
  margin: 0 0 2rem !important;
  padding: .35rem 1.35rem 1.25rem 2.75rem;
  border: 1px solid rgba(15, 74, 79, .15);
  border-top: 0;
  border-radius: 0 0 1rem 1rem;
  background: rgba(255, 255, 255, .68);
}
:is(.editorial-body, .rich-editor-shell .ck-content) > p:has(+ ol > li > a[href^="#"]) + ol li {
  margin: 0;
  padding-left: .1rem;
  color: #567174;
  font-size: .92rem;
}

:is(.editorial-body, .rich-editor-shell .ck-content) .article-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.7rem 0 1.8rem;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-stat {
  display: grid;
  gap: .35rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(15, 74, 79, .14);
  border-radius: .85rem;
  background: #fff;
}
.article-stat strong {
  color: #c2652a;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1;
}
.article-stat span {
  color: #52686a;
  font-size: .82rem;
  line-height: 1.5;
}

:is(.editorial-body, .rich-editor-shell .ck-content) .article-route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.65rem 0 1.9rem;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-route-card {
  display: grid;
  align-content: start;
  gap: .45rem;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid rgba(15, 74, 79, .14);
  border-radius: .9rem;
  background: linear-gradient(145deg, #fff, #f3f8f5);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-route-card h3 {
  margin: 0;
  color: #0e4a4f;
  font-size: 1.05rem;
  line-height: 1.35;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-route-card p {
  margin: 0;
  color: #52686a;
  font-size: .88rem;
  line-height: 1.65;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-route-card__tag {
  color: #c2652a;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

:is(.editorial-body, .rich-editor-shell .ck-content) .article-step-list {
  counter-reset: editorial-step;
  display: grid;
  gap: .7rem;
  margin: 1.35rem 0 1.8rem;
  padding: 0;
  list-style: none;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-step-list li {
  counter-increment: editorial-step;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .8rem;
  align-items: start;
  margin: 0;
  padding: .8rem .9rem;
  border: 1px solid rgba(194, 101, 42, .16);
  border-radius: .75rem;
  background: rgba(255, 250, 243, .72);
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-step-list li > .article-step-list__content {
  grid-column: 2;
  min-width: 0;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-step-list li::before {
  content: counter(editorial-step);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #c2652a;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
}

:is(.editorial-body, .rich-editor-shell .ck-content) .article-warning {
  padding: 1rem 1.2rem;
  border: 1px solid rgba(194, 101, 42, .3);
  background: #fff7eb;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-warning p { margin: 0; }
:is(.editorial-body, .rich-editor-shell .ck-content) .article-checklist,
:is(.editorial-body, .rich-editor-shell .ck-content) .article-source-list {
  padding: 1.15rem 1.3rem 1.2rem;
  border: 1px solid rgba(15, 74, 79, .13);
  background: rgba(239, 247, 244, .68);
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-checklist ul,
:is(.editorial-body, .rich-editor-shell .ck-content) .article-source-list ul {
  margin: .4rem 0 0;
}

:is(.editorial-body, .rich-editor-shell .ck-content) .article-table-wrap,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.6rem 0 1.8rem;
  overflow-x: auto;
  border: 1px solid rgba(15, 74, 79, .14);
  border-radius: .9rem;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-table-wrap > table.article-table,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.table > table {
  width: 100%;
  min-width: 650px;
  margin: 0;
  border-collapse: collapse;
  font-size: .86rem;
  line-height: 1.55;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-table-wrap > table.article-table th,
:is(.editorial-body, .rich-editor-shell .ck-content) .article-table-wrap > table.article-table td,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.table > table th,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.table > table td {
  min-width: 9rem;
  padding: .8rem .85rem;
  border-bottom: 1px solid rgba(15, 74, 79, .1);
  text-align: left;
  vertical-align: top;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-table-wrap > table.article-table th,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.table > table th {
  color: #fff;
  background: #0e4a4f;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .025em;
  text-transform: uppercase;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-table-wrap > table.article-table tbody tr:nth-child(even),
:is(.editorial-body, .rich-editor-shell .ck-content) figure.table > table tbody tr:nth-child(even) { background: #f7faf8; }
:is(.editorial-body, .rich-editor-shell .ck-content) .article-table-wrap > table.article-table tbody tr:last-child td,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.table > table tbody tr:last-child td { border-bottom: 0; }
:is(.editorial-body, .rich-editor-shell .ck-content) .article-table-wrap > table.article-table td strong,
:is(.editorial-body, .rich-editor-shell .ck-content) figure.table > table td strong { color: #173d42; }

:is(.editorial-body, .rich-editor-shell .ck-content) .article-source-note {
  padding: 1rem 1.2rem;
  border: 1px dashed rgba(194, 101, 42, .4);
  background: rgba(255, 249, 240, .82);
  color: #52686a;
  font-size: .9rem;
  line-height: 1.7;
}
:is(.editorial-body, .rich-editor-shell .ck-content) .article-source-note strong { color: #173d42; }

.rich-editor-shell .ck.ck-editor__main {
  background:
    radial-gradient(circle at 10% 0, rgba(240, 168, 120, .16), transparent 24rem),
    #faf5ee;
}
.rich-editor-shell .ck-content {
  padding: 1.4rem 1.55rem 2rem !important;
  background: transparent !important;
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  :is(.editorial-body, .rich-editor-shell .ck-content) { font-size: 1rem; line-height: 1.85; }
  :is(.editorial-body, .rich-editor-shell .ck-content) h2 {
    margin-top: 2.2em;
    margin-bottom: .85em;
    font-size: clamp(1.45rem, 1.2rem + 1.4vw, 1.7rem);
    padding-left: .7rem;
  }
  :is(.editorial-body, .rich-editor-shell .ck-content) h3 {
    margin-top: 1.6em;
    font-size: clamp(1.1rem, 1rem + .5vw, 1.25rem);
  }
  :is(.editorial-body, .rich-editor-shell .ck-content) p { margin-top: 1em; margin-bottom: 1em; }
  :is(.editorial-body, .rich-editor-shell .ck-content) .article-toc ol,
  :is(.editorial-body, .rich-editor-shell .ck-content) > p:has(+ ol > li > a[href^="#"]) + ol { grid-template-columns: 1fr; }
  :is(.editorial-body, .rich-editor-shell .ck-content) .article-stat-grid { grid-template-columns: 1fr; gap: .65rem; }
  :is(.editorial-body, .rich-editor-shell .ck-content) .article-answer,
  :is(.editorial-body, .rich-editor-shell .ck-content) .article-toc,
  :is(.editorial-body, .rich-editor-shell .ck-content) .article-checklist,
  :is(.editorial-body, .rich-editor-shell .ck-content) .article-warning,
  :is(.editorial-body, .rich-editor-shell .ck-content) .article-source-list { padding: 1rem; }
  :is(.editorial-body, .rich-editor-shell .ck-content) .article-route-grid { grid-template-columns: 1fr; }
  :is(.editorial-body, .rich-editor-shell .ck-content) .article-table-wrap > table.article-table,
  :is(.editorial-body, .rich-editor-shell .ck-content) figure.table > table { font-size: .82rem; }
  :is(.editorial-body, .rich-editor-shell .ck-content) .editorial-figure,
  :is(.editorial-body, .rich-editor-shell .ck-content) figure.image { margin: 1.75rem 0; border-radius: .8rem; }
  :is(.editorial-body, .rich-editor-shell .ck-content) .editorial-figure figcaption,
  :is(.editorial-body, .rich-editor-shell .ck-content) figure.image > figcaption { padding: .8rem .85rem .9rem; }
}
