/* =========================================================
   Transito Magazine — Article Body Content Styles
   Scope: .tx-article (공개 상세 페이지 + 어드민 에디터 미리보기 공용)

   F-4 수정: 공개 페이지는 design-tokens.css 뒤에 transito-black.css가 로드되어
   --fg/--gold 등 공용 토큰을 실제 팔레트 값으로 덮어쓰지만, 어드민 에디터는
   transito-black.css를 로드하지 않아 같은 변수가 design-tokens.css의 원래(다른) 값으로
   남는다. 그 결과 두 화면에서 형광펜/링크/콜아웃 색이 서로 달라졌다.
   그래서 이 파일은 공용 토큰을 참조하지 않고, transito-black.css 팔레트 고정값을
   --tx-* 변수로 직접 선언해 로드 순서와 무관하게 에디터·공개 페이지가 항상 동일하게 보이도록 한다.
   (참고: --charcoal #0A0A0A / --bg #FAFAF8 / --gold #C5AE79 / --gold-deep rgba(197,174,121,.85))
   이 파일 밖의 색(레이아웃 전용 CSS 등)은 손대지 않았다.
   ========================================================= */

.tx-article {
    /* transito-black.css 팔레트 고정값 — 로드 순서와 무관하게 에디터·공개 페이지 동일 */
    --tx-fg: #0A0A0A;
    --tx-fg-2: rgba(10, 10, 10, 0.72);
    --tx-fg-3: rgba(10, 10, 10, 0.55);
    --tx-bg-soft: #F3F2EF;
    --tx-paper: #FAFAF8;
    --tx-line: rgba(10, 10, 10, 0.10);
    --tx-line-soft: rgba(10, 10, 10, 0.06);
    --tx-gold: #C5AE79;
    --tx-gold-text: #7A6535;
    --tx-hl-bg: rgba(197, 174, 121, 0.38);

    font-size: 17px;
    line-height: 1.85;
    color: var(--tx-fg);
}

.tx-article > * + * {
    margin-top: 1.2em;
}

.tx-article > *:first-child {
    margin-top: 0;
}

.tx-article p {
    margin: 0;
}

/* 단락 글자 크기 옵션(편집기 블록 설정). 기본(sm)은 클래스 없이 지금 크기 그대로. */
.tx-article .tx-p--xs { font-size: 0.88em; }
.tx-article .tx-p--md { font-size: 1.15em; }
.tx-article .tx-p--lg { font-size: 1.35em; line-height: 1.7; }
.tx-article .tx-p--xl { font-size: 1.6em; line-height: 1.55; }

.tx-article h2 {
    font-size: var(--fs-h2);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--tx-fg);
    margin: 2.4em 0 0.7em;
}

.tx-article h3 {
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--tx-fg);
    margin: 1.8em 0 0.5em;
}

.tx-article h2:first-child,
.tx-article h3:first-child {
    margin-top: 0;
}

.tx-article a {
    color: var(--tx-fg);
    text-decoration: underline;
    text-decoration-color: var(--tx-gold);
    text-underline-offset: 2px;
    transition: color 200ms ease;
}

.tx-article a:hover {
    color: var(--tx-gold-text);
}

.tx-article b,
.tx-article strong {
    font-weight: 700;
}

.tx-article mark.tx-hl {
    background: var(--tx-hl-bg);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.tx-article code {
    font-family: var(--font-mono);
    font-size: 14px;
    background: var(--tx-bg-soft);
    padding: 1px 5px;
    border-radius: 2px;
}

.tx-article pre {
    background: var(--tx-bg-soft);
    border: 1px solid var(--tx-line);
    border-radius: 4px;
    padding: 16px 18px;
    overflow-x: auto;
}

.tx-article pre code {
    background: transparent;
    padding: 0;
}

.tx-article ul,
.tx-article ol {
    margin: 0;
    padding-left: 1.4em;
    line-height: 1.8;
}

.tx-article li + li {
    margin-top: 0.4em;
}

.tx-article li ul,
.tx-article li ol {
    margin-top: 0.4em;
}

.tx-article .tx-quote {
    border-left: 3px solid var(--tx-gold);
    background: var(--tx-paper);
    padding: 20px 24px;
    color: var(--tx-fg-2);
}

.tx-article .tx-quote p {
    margin: 0;
}

.tx-article .tx-quote p + p {
    margin-top: 0.8em;
}

.tx-article .tx-quote cite {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    font-style: normal;
    color: var(--tx-gold-text);
}

.tx-article .tx-callout {
    background: var(--tx-bg-soft);
    border: 1px solid var(--tx-line);
    border-radius: 4px;
    padding: 20px 24px;
}

.tx-article .tx-callout__title {
    display: block;
    color: var(--tx-gold-text);
    font-weight: 700;
    margin-bottom: 8px;
}

.tx-article .tx-callout p {
    margin: 0;
}

.tx-article .tx-callout p + p {
    margin-top: 0.6em;
}

.tx-article .tx-table-wrap {
    overflow-x: auto;
}

.tx-article .tx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.tx-article .tx-table th,
.tx-article .tx-table td {
    padding: 12px 14px;
    border: 1px solid var(--tx-line-soft);
    text-align: left;
}

.tx-article .tx-table th {
    background: var(--tx-bg-soft);
    font-weight: 600;
}

.tx-article .tx-figure {
    margin: 2em 0;
    padding: 24px;
    background: var(--tx-paper);
    border-radius: 4px;
}

.tx-article .tx-figure img {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 4px;
}

.tx-article .tx-figure figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: var(--tx-fg-3);
    text-align: center;
}

.tx-article .tx-rule {
    border: none;
    border-top: 1px solid var(--tx-line);
    margin: 3em 0;
}

.tx-article .tx-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0A0A0A;
    border-radius: 4px;
    overflow: hidden;
}

.tx-article .tx-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 640px) {
    .tx-article {
        font-size: 16px;
    }

    .tx-article .tx-figure {
        padding: 12px;
    }

    .tx-article .tx-table {
        font-size: 14px;
    }
}
