.tdg-wrap {
    --tdg-gold: #b8860b;
    --tdg-gold-deep: #854f0b;
    --tdg-text: #2c3e50;
    --tdg-text-muted: #5b677a;
    --tdg-border: #e8eaed;
    --tdg-bg: #f5f6f8;
    --tdg-elevated: #ffffff;
    --tdg-font: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 90px;
    color: var(--tdg-text);
    font-family: var(--tdg-font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background: var(--tdg-bg);
    margin-top: -16px;
}
.tdg-wrap * { box-sizing: border-box; }
.tdg-wrap a { color: inherit; text-decoration: none; }
.tdg-wrap :is(a, .tdg-list-scroll):focus-visible { outline: 3px solid rgba(184,134,11,.45); outline-offset: 3px; }

.tdg-hero {
    background: linear-gradient(135deg, #3a2f12 0%, #5c4300 55%, #8a6a1a 120%);
    color: #fff;
    border-radius: 16px;
    padding: 30px 32px 28px;
    position: relative;
    overflow: hidden;
}
.tdg-hero::after {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(55% 80% at 88% 8%, rgba(255,220,130,0.28), transparent 60%),
        repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 26px);
    pointer-events: none;
}
.tdg-hero > * { position: relative; z-index: 1; }
.tdg-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: #e8d9b8; margin-bottom: 14px;
    transition: color .15s ease;
}
.tdg-back:hover { color: #fff; }
.tdg-back svg { width: 14px; height: 14px; }
.tdg-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--tdg-font); font-size: 11.5px; letter-spacing: 0.1em;
    color: #ffe9b0;
    padding: 4px 12px; border: 1px solid rgba(255,233,176,0.45);
    border-radius: 999px; margin-bottom: 12px;
}
.tdg-title {
    margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2;
}
.tdg-title small { font-size: 14px; font-weight: 600; color: #f2e3b8; margin-left: 10px; letter-spacing: 0; }
.tdg-intro { margin: 0; max-width: 760px; font-size: 13.5px; color: #e8d9b8; line-height: 1.7; }
.tdg-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 12.5px; color: #e8d9b8; }
.tdg-meta b { font-weight: 700; color: #ffe9b0; }

.tdg-body {
    background: var(--tdg-elevated);
    border: 1px solid var(--tdg-border);
    border-radius: 16px;
    margin-top: 16px;
    padding: 26px 28px 28px;
    box-shadow: 0 2px 8px rgba(32,107,231,0.05);
}
.tdg-sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.tdg-sec-head-spaced { margin-top: 26px; }
.tdg-sec-head h2 {
    margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em;
    position: relative; padding-left: 13px;
}
.tdg-sec-head h2::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 17px; border-radius: 3px; background: var(--tdg-gold);
    box-shadow: 0 2px 6px rgba(184,134,11,0.35);
}
.tdg-sec-head p { margin: 0; font-size: 12.5px; color: var(--tdg-text-muted); }


/* 教学目标压缩:2 列网格,无卡片背景,行内编号 */
.tdg-goals {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px;
}
.tdg-goal-row {
    display: flex; gap: 10px; align-items: baseline;
    padding: 5px 0; border-bottom: 1px dashed #f0e2bd;
}
.tdg-goal-row:last-child, .tdg-goal-row:nth-last-child(2) { border-bottom: 0; }
.tdg-goal-num {
    flex: none; font-family: var(--ac-mono); font-size: 12px; font-weight: 800;
    color: #7a5300; min-width: 24px;
}
.tdg-goal-txt {
    font-size: 13.5px; color: var(--tdg-text); line-height: 1.55;
}
@media (max-width: 600px) {
    .tdg-goals { grid-template-columns: 1fr; gap: 0; }
    .tdg-goal-row { border-bottom: 1px dashed #f0e2bd; padding: 6px 0; }
    .tdg-goal-row:last-child { border-bottom: 0; }
}

/* Hero 右侧浮动 CTA(开通 Pro / 已解锁) */
.tdg-hero-inner { position: relative; min-height: 126px; }
.tdg-hero-copy { padding-right: 270px; }
.tdg-hero-cta {
    position: absolute; top: 0; right: 0;
    width: 230px; padding: 16px 18px;
    background: linear-gradient(135deg, #fff8e0, #ffeab0);
    border: 1px solid #d4b56e; border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    color: #5c4300; text-decoration: none;
    display: flex; flex-direction: column; gap: 8px;
    z-index: 3; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}
.tdg-hero-cta:hover {
    transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}
.tdg-hero-cta-eyebrow {
    font-family: var(--ac-mono); font-size: 10.5px; font-weight: 800; letter-spacing: .1em;
    color: #7a5300;
}
.tdg-hero-cta-price {
    font-size: 26px; font-weight: 800; color: #5c4300; letter-spacing: -0.02em; line-height: 1.1;
}
.tdg-hero-cta-price small {
    font-size: 13px; font-weight: 600; color: #7a5300; margin-left: 3px;
}
.tdg-hero-cta-act {
    font-size: 12.5px; font-weight: 700; color: #5c4300;
    display: inline-flex; align-items: center; gap: 5px;
}
.tdg-hero-cta-act svg { width: 13px; height: 13px; }
.tdg-hero-cta-unlocked {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-color: #22c55e;
}
.tdg-hero-cta-unlocked .tdg-hero-cta-eyebrow { color: #14532d; }
.tdg-hero-cta-unlocked .tdg-hero-cta-price { color: #166534; font-size: 18px; }
.tdg-hero-cta-unlocked .tdg-hero-cta-act { color: #14532d; }
@media (max-width: 720px) {
    .tdg-hero-inner { min-height: 0; }
    .tdg-hero-copy { padding-right: 0; }
    .tdg-hero-cta {
        position: relative; top: auto; right: auto; width: 100%;
        margin-top: 18px; padding: 12px 14px; gap: 5px;
        box-shadow: 0 4px 14px rgba(0,0,0,.20);
    }
    .tdg-hero-cta-price { font-size: 21px; }
    .tdg-hero-cta-unlocked .tdg-hero-cta-price { font-size: 16px; }
}

/* ====== 全部文章滚动列表 ====== */
.tdg-list-scroll {
    max-height: 430px; overflow-y: auto;
    border: 1px solid #f0e2bd; border-radius: 12px;
    padding: 8px;
    scrollbar-width: thin; scrollbar-color: #d4b56e #f7f3e6;
}
.tdg-list-scroll::-webkit-scrollbar { width: 8px; }
.tdg-list-scroll::-webkit-scrollbar-thumb { background: #d4b56e; border-radius: 4px; }
.tdg-list-scroll::-webkit-scrollbar-track { background: #f7f3e6; }
.tdg-post {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 12px; border-radius: 8px;
}
.tdg-post-num {
    flex: none; width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11.5px; font-weight: 800; color: #7a5300;
    background: linear-gradient(135deg, #fff3d6, #fbe6b3);
    border: 1px solid #eed9a0;
}
.tdg-post-title {
    font-size: 13.5px; font-weight: 600; color: var(--tdg-text); line-height: 1.5;
    min-width: 0;
}

.tdg-cta {
    margin-top: 24px;
    border-radius: 14px; padding: 22px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    background: linear-gradient(120deg, #2a2413 0%, #43360f 48%, #6b5216 100%);
    border: 1px solid #8a6d2f;
    color: #f7ecd2;
}
.tdg-cta-text { min-width: 0; }
.tdg-cta-text strong { display: block; font-size: 16px; font-weight: 800; color: #ffe9b0; }
.tdg-cta-text span { font-size: 12.5px; color: #e8d9b8; line-height: 1.6; }
.tdg-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.tdg-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 11px 20px; border-radius: 10px;
    font-size: 13.5px; font-weight: 700;
    transition: all .2s ease;
}
.tdg-btn.gold {
    background: linear-gradient(135deg, #ffe9b0, #f6d488); color: #5c4300;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.tdg-btn.gold:hover { filter: brightness(1.05); }
.tdg-btn.ghost {
    background: rgba(255,255,255,0.10); color: #f7ecd2;
    border: 1px solid rgba(255,255,255,0.28);
}
.tdg-btn.ghost:hover { background: rgba(255,255,255,0.18); }
.tdg-cta.unlocked {
    background: linear-gradient(120deg, #14532d, #166534 55%, #15803d 120%);
    border-color: #22c55e;
}
.tdg-cta.unlocked .tdg-cta-text strong { color: #dcfce7; }
.tdg-cta.unlocked .tdg-cta-text span { color: #bbf7d0; }
.tdg-btn.green {
    background: #fff; color: #166534;
    box-shadow: 0 4px 14px rgba(0,0,0,0.20);
}
.tdg-btn.green:hover { background: #f0fdf4; }

@media (max-width: 600px) {
    .tdg-wrap { padding: 0 18px 80px; }
    .tdg-hero { padding: 24px 20px 22px; }
    .tdg-title { font-size: 24px; }
    .tdg-title small { display: block; margin: 6px 0 0; }
    .tdg-body { padding: 22px 18px 24px; }
    .tdg-cta { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .tdg-wrap *, .tdg-wrap *::before, .tdg-wrap *::after {
        scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important;
    }
}

/* ====== DUX dark mode ====== */
html.darking .tdg-wrap {
    --tdg-text: #edf3fb;
    --tdg-text-muted: #b8c4d4;
    --tdg-border: #2b394d;
    --tdg-bg: #101722;
    --tdg-elevated: #172131;
    background: var(--tdg-bg);
}
html.darking .tdg-body { background: #172131; border-color: #2b394d; box-shadow: 0 4px 18px rgba(0,0,0,.28); }
html.darking .tdg-goal-row { border-color: #59491f; }
html.darking .tdg-list-scroll { border-color: #59491f; scrollbar-color: #8a6d2f #211d14; }
html.darking .tdg-list-scroll::-webkit-scrollbar-track { background: #211d14; }
html.darking .tdg-post-num { color: #f6d477; background: #3b3012; border-color: #6f5820; }
html.darking .tdg-post-title { color: #edf3fb; }
html.darking .tdg-btn.ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); color: #f7ecd2; }
html.darking .tdg-btn.green { background: #e7f9ed; color: #14532d; }
/* Goal 页面中的 DUX 顶部与页脚对比度修正 */
html:not(.darking) body .header .brand { color: #667085; }
html:not(.darking) body .header .logo > a { color: #0064d8; }
html:not(.darking) body .topbar .site-nav > li > a,
html:not(.darking) body .topbar #td-userbox > a { color: #606975; }
html:not(.darking) body .footer .container > p,
html:not(.darking) body .footer .container > p a { color: #667085; }
