.dm-article-heading {
  box-sizing: border-box;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #101319;
  box-shadow: none;
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

.dm-article-heading h1 {
  margin: 0;
  max-width: none;
  color: #101319;
  font-size: 30px;
  font-weight: 700;
  line-height: 42px;
  letter-spacing: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.dm-article-heading h1 * { color: inherit; }

.dm-article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 18px;
  color: #777e88;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.dm-article-byline span + span::before {
  content: "\00b7";
  margin-right: 10px;
  color: #aab0b8;
}

.dm-article-heading .eyebrow { display: none; }
.dm-article-heading .subtitle {
  margin: 14px 0 0;
  color: #5c6674;
  font-size: 17px;
  line-height: 1.6;
}

:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, .dm-article-page .hero-copy) {
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, .dm-article-page .hero-copy)
    :is(p, li):not(.section-kicker, .source, .source-citation, .note, .eyebrow, .subtitle, .source-scroll-hint, :where(.dm-comments p, .dm-comments li, .dm-series-episodes p, .dm-series-episodes li)) {
  font-size: 17px;
  line-height: 27px;
  letter-spacing: 0;
  word-break: keep-all;
}

/* Justify article prose and allow normal Korean line breaks, including inline text. */
:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, .dm-article-page .hero-copy)
    :is(p, li):not(.section-kicker, .source, .source-citation, .eyebrow, .subtitle, .source-scroll-hint,
      :where(.dm-article-heading *, .dm-comments *, .dm-author-note *, .dm-references *, figure *, table *, nav *, aside *)) {
  text-align: justify;
  word-break: normal;
}
:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, .dm-article-page .hero-copy)
    :is(p, li):not(.section-kicker, .source, .source-citation, .eyebrow, .subtitle, .source-scroll-hint,
      :where(.dm-article-heading *, .dm-comments *, .dm-author-note *, .dm-references *, figure *, table *, nav *, aside *)) * {
  word-break: inherit;
}

:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, article.dm-post)
    h2:not(.dm-original-sidebar h2, .dm-comments h2, .dm-related-posts h2, .dm-series-episodes h2) {
  color: #12284a !important;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.03em;
  margin: 40px 0 .8em;
  padding-top: .3em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* The site introduction has its own heading scale. */
article.dm-post:has(> .dm-about-hero) h2:not(.dm-original-sidebar h2, .dm-comments h2, .dm-related-posts h2, .dm-series-episodes h2) {
  font-size: 26px;
  margin-top: 2.4em;
}

:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, article.dm-post)
    h3:not(.dm-original-sidebar h3, .dm-comments h3, .dm-author-note h3, .dm-references h3, .toc h3) {
  margin-top: 28px;
  color: #12284a;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

/* Use the same continuous article layout for older report sections. */
.dm-article-page .report-section {
  display: block;
  margin: 40px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, article.dm-post)
    .report-section h2:not(.dm-original-sidebar h2, .dm-comments h2) { margin: 0 0 .8em; padding-top: .3em; }
.dm-article-page .check-table { padding: 20px 22px; border: 1px solid #dfe7f2; border-radius: 15px; background: #f7f9fc; color: #172033; }
:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, article.dm-post)
    .check-table h2:not(.dm-original-sidebar h2, .dm-comments h2) { margin: 0 0 .8em; padding: 0; }

/* Match ordinary article tables to the latest post while retaining their contents. */
:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, article.dm-post) table {
  width: 100%;
  border-collapse: collapse;
}
:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, article.dm-post) table th {
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  background: #0f172a;
  color: #f8fafc;
  font-size: 16px;
  letter-spacing: normal;
}
:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, article.dm-post) table td {
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, article.dm-post) table tr:nth-child(even) td { background: #f8fafc; }
.dm-article-page .check-table table td { color: #172033; }

/* Keep the shape and spacing of article callouts consistent; their colors retain meaning. */
:is(.article, article:has(> .dm-article-heading), main.dm-article-page,
    .dm-article-page .content-grid main, article.dm-post)
    :is(div.highlight, div.calc-box, div.warn-box, div.warn, div.info-box,
        div.good-box, div.cta-box, div.box, div.verdict-box, div.tax-box):not(.dm-original-sidebar *) {
  box-sizing: border-box;
  margin: 24px 0;
  padding: 20px 22px;
  border-radius: 15px;
}

@media screen and (max-width: 560px) {
  :is(.article, article:has(> .dm-article-heading), main.dm-article-page,
      .dm-article-page .content-grid main, article.dm-post) table { display: block; max-width: 100%; overflow-x: auto; }
  :is(.article, article:has(> .dm-article-heading), main.dm-article-page,
      .dm-article-page .content-grid main, article.dm-post)
      :is(div.highlight, div.calc-box, div.warn-box, div.warn, div.info-box,
          div.good-box, div.cta-box, div.box, div.verdict-box, div.tax-box):not(.dm-original-sidebar *) { padding: 16px; }
}

.dm-article-thumbnail { margin: 0 0 30px; }
.dm-article-thumbnail img { display: block; width: 100%; height: auto; max-width: 100%; }
/* A verified intro video takes the cover position; the thumbnail stays for print and sharing. */
@media screen { .dm-article-thumbnail--video { display: none; } }
.dm-article-cover-video { width: 100%; aspect-ratio: 16 / 9; margin: 0 0 30px; overflow: hidden; border-radius: 6px; background: #000; }
.dm-article-cover-video iframe { display: block; width: 100%; height: 100%; border: 0; }

@media (min-width: 901px) {
  :is(.article-shell > .article, .dm-heading-layout > .paper,
      .dm-sidebar-shell > .dm-article-page, .dm-sidebar-shell > article) { padding: 55px; }
}

:is(.article, article:has(> .dm-article-heading), main.dm-article-page) > p:not(.note, .source, .source-citation, .eyebrow),
:is(.article, article:has(> .dm-article-heading), main.dm-article-page) > :is(ul, ol) > li {
  color: #111;
}

.dm-article-page {
  box-sizing: border-box;
  margin: 12px 0 20px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid #e3e8ef;
  border-radius: 20px;
  background: #fff;
  color: #172033;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .05);
}

.dm-article-support .hero-grid { min-height: 0; }
.dm-article-support .hero-copy { justify-content: center; }
.dm-dark-theme main.dm-article-page { margin: 12px auto 20px; }
.dm-dark-theme .dm-article-page .lead,
.dm-dark-theme .dm-article-page .note { color: #475569; }
.dm-dark-theme .dm-article-page .eyebrow,
.dm-dark-theme .dm-article-page a { color: #1d4ed8; }

@media (min-width: 851px) {
  .dm-heading-layout { grid-template-areas: "paper side"; }
}

@media (max-width: 850px) {
  .dm-heading-layout { grid-template-areas: "paper" "side"; }
}

@media (max-width: 560px) {
  .dm-article-heading { margin-bottom: 24px; }
  .dm-article-heading h1 { font-size: 26px; line-height: 1.4; }
  .dm-article-byline { margin-top: 18px; font-size: 14px; }
  .dm-article-page { padding: 26px 22px; border-radius: 16px; }
  :is(.article-shell > .article, .dm-heading-layout > .paper,
      .dm-sidebar-shell > .dm-article-page, .dm-sidebar-shell > article) { padding: 26px 22px; }
}

/* Match the article page width and outer columns to the blog homepage. */
body > .wrap {
  box-sizing: border-box;
  width: min(1120px, calc(100% - 28px));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

body.dm-dark-theme > main.dm-article-page,
body.dm-dark-theme > footer {
  box-sizing: border-box;
  width: min(1120px, calc(100% - 28px));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

body.dm-dark-theme > footer {
  padding-left: 0;
  padding-right: 0;
}

/* Cover the full screen behind the sticky navigation while the article scrolls. */
body.dm-header-flush .dm-site-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: -1px;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #f2f5fa;
  border-bottom: 1px solid #dfe7f2;
  pointer-events: none;
}

@media (min-width: 901px) {
  .article-shell,
  body.dm-header-flush .layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    column-gap: 20px;
  }
}

@media (max-width: 900px) {
  .article-shell,
  body.dm-header-flush .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-shell .aside-card { position: static; }
  body.dm-header-flush .layout {
    grid-template-areas: "paper" "side";
    gap: 20px;
  }
  body.dm-header-flush .side {
    position: static;
    max-height: none;
    overflow: visible;
    width: 100%;
  }
}

@media (max-width: 360px) {
  body.dm-header-flush .article h2 { scroll-margin-top: 130px; }
}

/* Keep embedded YouTube players flat across old and new article layouts. */
:is(article, main.article, .dm-article-page) :has(> iframe[src*="youtube.com/embed/"], > iframe[src*="youtube-nocookie.com/embed/"]),
:is(article, main.article, .dm-article-page) iframe:is([src*="youtube.com/embed/"], [src*="youtube-nocookie.com/embed/"]) {
  box-shadow: none !important;
}

/* An opt-in article FAQ keeps native, keyboard-accessible details controls. */
:is(article, main) .dm-faq--accordion details {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #e5ebf3;
}
:is(article, main) .dm-faq--accordion details:first-of-type { border-top: 1px solid #e5ebf3; }
:is(article, main) .dm-faq--accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  margin: 0;
  padding: 13px 4px;
  border-radius: 7px;
  color: #233b5b;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  list-style: none;
  cursor: pointer;
}
:is(article, main) .dm-faq--accordion summary::-webkit-details-marker { display: none; }
:is(article, main) .dm-faq--accordion summary::marker { content: ""; }
:is(article, main) .dm-faq--accordion summary > span { flex: 1; min-width: 0; word-break: normal; overflow-wrap: anywhere; }
:is(article, main) .dm-faq--accordion summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin: 0 5px 4px 0;
  border-right: 2px solid #386ac2;
  border-bottom: 2px solid #386ac2;
  transform: rotate(45deg);
}
:is(article, main) .dm-faq--accordion details[open] > summary::after { margin-bottom: 0; transform: rotate(225deg); }
:is(article, main) .dm-faq--accordion summary:focus-visible { outline: 2px solid #527fda; outline-offset: 2px; }
:is(article, main, .article) .dm-faq--accordion details > p.dm-faq-answer {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f2f6fc;
  color: #334a68;
  font-size: 15px;
  line-height: 1.7;
  text-align: left;
}
@media (hover: hover) {
  :is(article, main) .dm-faq--accordion summary:hover { color: #2859ae; background: #f5f8fd; }
}
@media (prefers-reduced-motion: no-preference) {
  :is(article, main) .dm-faq--accordion summary::after { transition: transform .18s ease; }
}
html[data-dm-theme="dark"] :is(article, main) .dm-faq--accordion details { border-color: #3c4d63; }
html[data-dm-theme="dark"] :is(article, main) .dm-faq--accordion summary { color: #e1ebf9; }
html[data-dm-theme="dark"] :is(article, main) .dm-faq--accordion summary::after { border-color: #9cc1ff; }
html[data-dm-theme="dark"] :is(article, main, .article) .dm-faq--accordion details > p.dm-faq-answer { background: #25374d; color: #e7edf7; }
html[data-dm-theme="dark"] :is(article, main, .article) .dm-faq--accordion details > p.dm-faq-answer { background: #2a2a2a; color: #f0f0f0; }
@media (hover: hover) {
  html[data-dm-theme="dark"] :is(article, main) .dm-faq--accordion summary:hover { color: #c8dcff; background: #26394f; }
}

/* A selected calculation keeps its row heading distinct from the data cells. */
:is(.article, article.dm-post:has(> .dm-article-heading), main.dm-article-page) table.dm-current-row-table tbody tr.dm-selected > th[scope="row"] {
  background: #245395;
  color: #fff;
}
:is(.article, article.dm-post:has(> .dm-article-heading), main.dm-article-page) table.dm-current-row-table tbody tr.dm-selected > td {
  background: #edf4ff;
  color: #172033;
}
:is(article, main) table.dm-current-row-table .dm-current-row-label {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255,255,255,.17);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
  white-space: nowrap;
}
html[data-dm-theme="dark"] :is(.article, article.dm-post:has(> .dm-article-heading), main.dm-article-page) table.dm-current-row-table tbody tr.dm-selected > th[scope="row"] {
  background: #3769a7 !important;
  color: #fff !important;
}
html[data-dm-theme="dark"] :is(.article, article.dm-post:has(> .dm-article-heading), main.dm-article-page) table.dm-current-row-table tbody tr.dm-selected > td {
  background: #284564 !important;
  color: #f8fafc !important;
}
html[data-dm-theme="dark"] :is(article, main) table.dm-current-row-table .dm-current-row-label {
  background: rgba(0,0,0,.2);
}
