/* Detail pages: job / tech posts, blog posts, study materials, course overview. */

/* ── article header (shared by posts and materials) ── */
.dt-head { background: linear-gradient(180deg, var(--accent-light) 0%, var(--bg-primary, transparent) 100%); border-bottom: 1px solid var(--border); padding: 22px 0 26px; }
.dt-crumb { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: .78rem; color: var(--text-muted); }
.dt-crumb a { color: var(--text-muted); text-decoration: none; }
.dt-crumb a:hover { color: var(--accent); }
.dt-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-size: .8rem; color: var(--text-muted); }
.dt-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.dt-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 11px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; }
.dt-title { margin: 12px 0 0; max-width: 860px; font-size: clamp(1.45rem, 3.2vw, 2.25rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--text-primary); }
.dt-lead { margin: 10px 0 0; max-width: 720px; font-size: 1rem; line-height: 1.6; color: var(--text-secondary); }

/* key facts (jobs) */
.dt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 20px 0 0; max-width: 900px; }
.dt-facts > div { padding: 11px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.dt-facts dt { font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }
.dt-facts dd { margin: 3px 0 0; font-size: .92rem; font-weight: 700; line-height: 1.3; color: var(--text-primary); overflow-wrap: anywhere; }

/* actions */
.dt-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dt-actions[hidden], .dt-btn[hidden] { display: none; }
.dt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); font-size: .88rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: all .15s ease; }
.dt-btn:hover { border-color: var(--accent); color: var(--accent); }
.dt-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 20px -14px rgba(13, 110, 86, .9); }
.dt-btn--primary:hover { color: #fff; filter: brightness(1.08); }
.dt-btn--block { width: 100%; margin-top: 12px; }
.dt-by { font-size: .86rem; font-weight: 600; color: var(--text-secondary); }
.dt-share { display: inline-flex; gap: 6px; margin-left: auto; }
.dt-share a, .dt-share button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; transition: all .15s ease; }
.dt-share a:hover, .dt-share button:hover { border-color: var(--accent); color: var(--accent); }
.dt-share .is-done { background: var(--accent); border-color: var(--accent); color: #fff; }

/* cover image */
.dt-cover { margin: 22px 0 0; max-width: 900px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-secondary); }
.dt-cover img { display: block; width: 100%; height: auto; max-height: 440px; object-fit: contain; }

/* ── layout ── */
.post-page.dt .post-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 40px; padding-top: 28px; padding-bottom: 56px; }
.post-page.dt .post-sidebar { gap: 16px; }

/* ── readable article text ── */
.post-page.dt .prose-content { font-size: 1rem; line-height: 1.75; max-width: 760px; }
.post-page.dt .prose-content p, .post-page.dt .prose-content li { font-size: inherit; line-height: inherit; }
.post-page.dt .prose-content > :first-child { margin-top: 0; }
.post-page.dt .prose-content h2 { font-size: 1.3rem; margin: 34px 0 12px; padding: 0; border: 0; letter-spacing: -.01em; }
.post-page.dt .prose-content h3 { font-size: 1.08rem; margin: 24px 0 8px; }
.post-page.dt .prose-content p { margin-bottom: 14px; }
.post-page.dt .prose-content ul, .post-page.dt .prose-content ol { margin: 10px 0 18px 22px; }
.post-page.dt .prose-content li { margin-bottom: 6px; padding-left: 2px; }
.post-page.dt .prose-content li::marker { color: var(--accent); }
.post-page.dt .prose-content img { margin: 18px 0; border-radius: 12px; }
.post-page.dt .prose-content table { display: block; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; font-size: .88rem; }
.post-page.dt .prose-content table thead, .post-page.dt .prose-content table tbody { display: table; width: 100%; min-width: 460px; }
.post-page.dt .prose-content th { padding: 10px 14px; font-size: .72rem; }
.post-page.dt .prose-content td { padding: 10px 14px; }
.post-page.dt .prose-content blockquote { border-radius: 0 10px 10px 0; font-style: normal; }
.post-page.dt .post-tags { margin: 28px 0 0; padding-top: 18px; }

/* ── sidebar blocks ── */
.dt-promo { display: block; overflow: hidden; border-radius: 16px; border: 1px solid var(--border); background: var(--bg-card); text-decoration: none; color: inherit; transition: box-shadow .2s ease, border-color .2s ease; }
.dt-promo:hover { border-color: var(--accent); box-shadow: 0 16px 30px -22px rgba(15, 23, 42, .5); }
.dt-promo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.dt-promo__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.dt-promo__body small { font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.dt-promo__body b { font-size: 1rem; line-height: 1.3; color: var(--text-primary); }
.dt-promo__body > span:not(.dt-btn) { font-size: .83rem; line-height: 1.5; color: var(--text-secondary); }
.dt-promo__body em { margin-top: 4px; font-style: normal; font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.dt-promo__body em s { margin-left: 6px; font-size: .82rem; font-weight: 500; color: var(--text-muted); }
.dt-box { border-radius: 16px; border: 1px solid var(--border); background: var(--bg-card); padding: 16px; }
.dt-box h2 { margin: 0 0 8px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.dt-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.dt-item:last-of-type { border-bottom: 0; }
.dt-item img, .dt-item__ph { flex: none; width: 56px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--accent-light); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--accent); }
.dt-item b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .85rem; font-weight: 600; line-height: 1.35; color: var(--text-primary); }
.dt-item small { display: block; margin-top: 2px; font-size: .72rem; color: var(--text-muted); }
.dt-item:hover b { color: var(--accent); }
.dt-link { display: inline-block; margin-top: 8px; font-size: .82rem; font-weight: 700; color: var(--accent); text-decoration: none; }

/* blog sidebar widgets match */
.post-page.dt .post-sidebar__toc, .post-page.dt .post-sidebar__more { border-radius: 16px; padding: 16px; }

/* ── study material page ── */
.dt ~ .container > div[style*="grid-template-columns:1fr 320px"] > div > div[style*="padding:32px"] { padding: 24px !important; border-radius: 16px !important; }
.dt ~ .container > div[style*="grid-template-columns:1fr 320px"] { gap: 32px !important; }

/* ── course overview ── */
.course-hero-copy { padding: 6px 0 18px !important; }
.course-hero-copy h1 { font-size: clamp(1.6rem, 3.4vw, 2.5rem) !important; line-height: 1.12 !important; letter-spacing: -.02em; max-width: 780px !important; }
.course-hero-copy > p { font-size: .98rem !important; line-height: 1.6 !important; max-width: 720px !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.course-hero-copy > p.is-open { display: block; -webkit-line-clamp: unset; }
.course-readmore { margin: 6px 0 0; padding: 0; border: 0; background: none; font: inherit; font-size: .84rem; font-weight: 700; color: var(--accent); cursor: pointer; }
.course-meta { margin-top: 14px !important; gap: 8px !important; }
.course-meta span { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); font-size: .78rem !important; font-weight: 600; color: var(--text-secondary); }
.course-panel { border-radius: 16px !important; padding: 22px !important; box-shadow: none !important; }
.course-panel__head h2 { font-size: 1.25rem !important; }

/* posts written with inline font sizes follow the page scale */
.post-page.dt .prose-content p[style*="font-size:1.05rem"] { font-size: inherit !important; line-height: inherit !important; }

@media (max-width: 1024px) {
  .post-page.dt .post-layout { grid-template-columns: minmax(0, 1fr) !important; gap: 24px; }
  .post-page.dt .post-sidebar { position: static; }
  .dt-cover, .dt-facts { max-width: none; }
}
@media (max-width: 640px) {
  .dt-head { padding: 16px 0 20px; }
  .dt-crumb { margin-bottom: 10px; font-size: .74rem; }
  .dt-title { font-size: 1.35rem; margin-top: 10px; }
  .dt-lead { font-size: .92rem; }
  .dt-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
  .dt-facts > div { padding: 10px 12px; }
  .dt-facts dd { font-size: .85rem; }
  .dt-actions { margin-top: 14px; gap: 8px; }
  .dt-actions .dt-btn { flex: 1 1 auto; height: 42px; padding: 0 14px; }
  .dt-share { margin-left: 0; width: 100%; }
  .dt-share a, .dt-share button { flex: 1; width: auto; }
  .dt-cover { margin-top: 16px; border-radius: 12px; }
  .post-page.dt .post-layout { padding-top: 20px; padding-bottom: 40px; }
  .post-page.dt .prose-content { font-size: .95rem; line-height: 1.7; }
  .post-page.dt .prose-content h2 { font-size: 1.15rem; margin-top: 26px; }
  .post-page.dt .prose-content h3 { font-size: 1rem; }
  .course-hero-copy h1 { font-size: 1.5rem !important; }
  .course-hero-copy > p { font-size: .9rem !important; -webkit-line-clamp: 4; }
  .course-meta span { padding: 4px 10px; font-size: .74rem !important; }
  .course-panel { padding: 16px !important; border-radius: 14px !important; }
  .course-panel__head h2 { font-size: 1.1rem !important; }
}

/* ── course overview: quieter, shorter ── */
.course-hero-copy > p { -webkit-line-clamp: 2 !important; }
.course-hero-copy .course-hub-link { margin: 10px 0 0 !important; font-size: .84rem !important; }
.course-whatsnew { border: 1px solid var(--border) !important; box-shadow: none !important; background: var(--bg-card) !important; border-radius: 12px !important; }
.course-panel__eyebrow { display: none !important; }
.course-panel__head { margin-bottom: 14px !important; }
.course-audience:not(.is-open) li:nth-child(n+4) { display: none; }
.course-audience .course-readmore { margin-top: 8px; }
.course-quiz-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#cx-about, #cx-learn, #cx-content, #cx-practice, #cx-reviews, #course-faq { scroll-margin-top: calc(var(--nav-h, 86px) + 58px); }
.cx-jump { position: sticky; top: calc(var(--nav-h, 86px) - 1px); z-index: 30; display: flex; gap: 6px; margin: 0 0 14px; padding: 8px 0; overflow-x: auto; scrollbar-width: none; background: color-mix(in srgb, var(--bg-primary, #fff) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cx-jump::-webkit-scrollbar { display: none; }
.cx-jump a { flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); font-size: .82rem; font-weight: 600; color: var(--text-secondary); text-decoration: none; transition: all .15s ease; }
.cx-jump a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) { .cx-jump { margin-inline: -4px; padding-inline: 4px; } .cx-jump a { height: 32px; padding: 0 14px; font-size: .78rem; } }

/* course card stays in view while the left column scrolls; scrolls itself only if taller than the screen */
@media (min-width: 981px) {
  .course-sidebar { max-height: calc(100vh - var(--nav-h, 86px) - 28px); overflow-y: auto; scrollbar-width: none; }
  .course-sidebar::-webkit-scrollbar { display: none; }
}

/* ── course page: practice assessments as compact rows ── */
.course-main .course-quiz-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.course-main .course-quiz-card { display: flex; align-items: center; gap: 12px; min-height: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); box-shadow: none; transition: border-color .15s ease; }
.course-main .course-quiz-card:hover { border-color: var(--accent); }
.course-main .course-quiz-card__top { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin: 0; padding: 0; }
.course-main .course-quiz-card h3 { margin: 0; font-size: .9rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-main .course-quiz-card__top > span { padding: 0; background: none; border: 0; font-size: .74rem; font-weight: 600; color: var(--text-muted); }
.course-main .course-quiz-card p { display: none; }
.course-main .course-quiz-card .btn { flex: none; height: 34px; padding: 0 14px; font-size: .78rem; white-space: nowrap; }

/* ── course page: FAQ as separate rows ── */
.course-main .course-faq details { margin: 0 0 8px; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); overflow: hidden; transition: border-color .15s ease; }
.course-main .course-faq details[open] { border-color: var(--accent); }
.course-main .course-faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; font-size: .92rem; font-weight: 600; color: var(--text-primary); }
.course-main .course-faq summary::-webkit-details-marker { display: none; }
.course-main .course-faq summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-top: -3px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s ease; }
.course-main .course-faq details[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.course-main .course-faq details p { margin: 0; padding: 0 16px 14px; font-size: .88rem; line-height: 1.6; }
.course-main .course-faq__note { margin: 12px 0 0; padding: 0; border: 0; font-size: .74rem; }

@media (max-width: 760px) { .course-main .course-quiz-grid { grid-template-columns: minmax(0, 1fr); } }

/* icon-only action on assessment rows */
.course-main .course-quiz-card .btn.cq-ico { width: 38px; height: 38px; min-width: 0; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.course-main .course-quiz-card .btn.cq-ico svg { margin: 0; }
.course-main .course-quiz-card .btn--primary.cq-ico svg { margin-left: 2px; }
.course-main .course-quiz-card .btn--outline.cq-ico { color: var(--text-muted); }

/* ── course page: learn / requirements / highlights as a light checklist ── */
.course-main .cit-section { padding: 18px !important; }
.course-main .cit-tabs { display: inline-flex; gap: 4px; margin: 0 0 14px; padding: 4px; border: 0; border-radius: 999px; background: var(--bg-secondary); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.course-main .cit-tabs::-webkit-scrollbar { display: none; }
.course-main .cit-tab { flex: none; height: 32px; padding: 0 14px; border: 0 !important; border-radius: 999px; background: transparent; font-size: .8rem; font-weight: 600; color: var(--text-secondary); box-shadow: none; }
.course-main .cit-tab svg { display: none; }
.course-main .cit-tab--active { background: var(--bg-card) !important; color: var(--accent) !important; box-shadow: 0 1px 4px rgba(15, 23, 42, .12) !important; }
.course-main .course-objectives, .course-main .course-features { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.course-main .course-objective, .course-main .course-feature { display: flex; align-items: flex-start; gap: 12px; padding: 9px 2px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none; font-size: .9rem; line-height: 1.45; color: var(--text-secondary); }
.course-main .course-objective:last-child, .course-main .course-feature:last-child { border-bottom: 0; }
.course-main .course-check, .course-main .course-feature__icon { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.course-main .course-check svg, .course-main .course-feature__icon svg { width: 12px; height: 12px; }
.course-main .course-requirements { margin: 0; padding-left: 1.1rem; font-size: .9rem; line-height: 1.6; color: var(--text-secondary); }
.course-main .course-objectives:not(.is-open) > :nth-child(n+5),
.course-main .course-features:not(.is-open) > :nth-child(n+5),
.course-main .course-requirements:not(.is-open) > :nth-child(n+5) { display: none; }
.course-main .cit-panel .course-readmore { margin-top: 8px; }

/* ── course page: related courses as a one-row slider ── */
.course-main .course-related__grid { display: flex !important; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 2px 8px; margin: 0 -2px; }
.course-main .course-related__grid::-webkit-scrollbar { display: none; }
.course-main .course-related__grid > * { flex: 0 0 min(270px, 78%); min-width: 0; scroll-snap-align: start; }
.course-related .course-panel__head .btn { display: none; }
.cx-arrows { display: inline-flex; gap: 6px; }
.cx-arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s ease; }
.cx-arrow:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) { .cx-arrows { display: none; } }
.course-page-left, .course-main, .course-related { min-width: 0; max-width: 100%; }

/* free guide shown as a chip in the course meta row */
.course-meta .course-meta__guide { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--accent-light); border: 1px solid var(--accent); font-size: .78rem; font-weight: 700; color: var(--accent); text-decoration: none; transition: all .15s ease; }
.course-meta .course-meta__guide:hover { background: var(--accent); color: #fff; }

/* ── course page: tighter vertical rhythm ── */
.course-page-grid { gap: 28px !important; padding-bottom: 48px !important; }
.course-page-left .breadcrumb, .course-page-left nav[aria-label="Breadcrumb"] { margin-bottom: 10px !important; }
.course-hero-copy { padding: 0 0 10px !important; margin-bottom: 8px !important; border-bottom: 0 !important; }
.course-hero-copy .course-kicker { margin-bottom: 6px !important; }
.course-hero-copy h1 { margin: 0 0 8px !important; }
.course-meta { margin-top: 10px !important; }
.course-whatsnew { margin-top: 12px !important; }
.course-main { gap: 14px !important; }
.cx-jump { margin-bottom: 0 !important; padding: 6px 0 !important; }
.course-progress-card { padding: 14px 18px !important; }
.course-main .course-panel { padding: 18px !important; }
.course-main .cit-section { padding: 16px !important; }
@media (max-width: 640px) {
  .course-main { gap: 12px !important; }
  .course-main .course-panel { padding: 14px !important; }
}

/* course card: share and earn */
.cx-share { margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-secondary); }
.cx-share__head { display: flex; align-items: center; gap: 10px; }
.cx-share__ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; }
.cx-share__ic .sp-coin { width: 32px; height: 32px; }
.cx-share__head b { display: block; font-size: .86rem; color: var(--text-primary); }
.cx-share__head small { display: block; margin-top: 1px; font-size: .76rem; line-height: 1.4; color: var(--text-secondary); }
.cx-share__head small b { display: inline; color: var(--accent); }
.cx-share__head small a { font-weight: 700; }
.cx-share__icons { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.cx-sh { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: .78rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease; }
.cx-sh:hover { transform: translateY(-2px); color: var(--accent); border-color: var(--accent); }
.cx-sh--wa { background: #25d366; border-color: #25d366; color: #fff; }
.cx-sh--tg { background: #229ed9; border-color: #229ed9; color: #fff; }
.cx-sh--x { background: #0f172a; border-color: #0f172a; color: #fff; }
.cx-sh--wa:hover, .cx-sh--tg:hover, .cx-sh--x:hover { color: #fff; filter: brightness(1.08); }
.cx-sh--copy { width: auto; margin-left: auto; padding: 0 12px; border-radius: 999px; }
.cx-sh--copy em { font-style: normal; }
.cx-sh--copy.is-done { background: var(--accent); border-color: var(--accent); color: #fff; }
