/*
 * DawnSpar article page (templates/single.html), brand v2. Loaded on single posts after home.css (shell)
 * and guides.css (guide cards for "More Training Guides"). Blocks: dawnspar/article-hero, article-toc,
 * author-box, related-guides, app-card.
 */

.dsa-main { position: relative; }
.dsa-main > .alignfull + .alignfull { margin-block-start: 0; }

/* -------------------------------------------------------------------- hero */
.dsa-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(2rem, 4vw, 3rem) !important;
	background:
		radial-gradient(45% 70% at 18% 0%, rgba(227, 38, 54, 0.2), transparent 70%),
		radial-gradient(40% 60% at 100% 100%, rgba(227, 38, 54, 0.12), transparent 70%),
		linear-gradient(180deg, #0F0F12 0%, #0B0B0E 100%);
}
.dsa-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(240, 68, 68, 0.8) 45%, transparent); }
.dsa-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; margin: 0 0 1.2rem; color: #8C8E97; font-size: 0.92rem; font-weight: 600; }
.dsa-crumbs a { color: #C9CBD1; text-decoration: none; }
.dsa-crumbs a:hover { color: var(--h-red2); }
.dsa-pill { display: inline-block; margin: 0; padding: 0.32rem 0.85rem; border-radius: 999px; background: var(--h-red); color: #fff; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; }
.dsa-title { max-width: 20ch; margin: 0.9rem 0 1rem; color: #fff; font-size: clamp(2.1rem, 1rem + 3.4vw, 3.75rem); font-weight: 800; font-style: italic; line-height: 1.03; letter-spacing: -0.025em; }
.dsa-lead { max-width: 46rem; margin: 0 0 1.4rem; color: #D3D5DA; font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.27rem); font-weight: 500; line-height: 1.5; }
.dsa-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin: 0 0 2rem; padding: 0; list-style: none; color: #fff; font-size: 0.98rem; font-weight: 600; }
.dsa-meta li { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; }
.dsa-meta li + li { padding-left: 1.5rem; border-left: 1px solid #3A3B42; }
.dsa-meta svg { flex: none; color: var(--h-red); }
.dsa-meta a { color: #fff; text-decoration: none; }
.dsa-meta a:hover { color: var(--h-red2); }
.dsa-cover { margin: 0; overflow: hidden; border: 1px solid #3A3B42; border-radius: 20px; aspect-ratio: 2.4 / 1; background: #17181C; box-shadow: 0 34px 80px -44px rgba(227, 38, 54, 0.85); }
.dsa-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

/* ------------------------------------------------------------------ layout */
.dsa-section { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3rem, 6vw, 4.5rem) !important; background: #0B0B0E; }
.dsa-layout { display: grid; grid-template-columns: minmax(0, 720px) 300px; justify-content: center; align-items: start; gap: clamp(2.5rem, 5vw, 4.5rem); }
.dsa-body { grid-column: 1; grid-row: 1; min-width: 0; margin: 0 !important; }
.dsa-aside { grid-column: 2; grid-row: 1; position: sticky; top: 92px; display: grid; gap: 1.25rem; margin: 0 !important; }
.dsa-aside > * { margin: 0 !important; }

/* table of contents */
.dsa-toc details { padding: 1.1rem 1rem 0.7rem; border: 1px solid #2A2B31; border-radius: 16px; background: linear-gradient(180deg, #17181C, #121317); }
.dsa-toc summary { display: flex; align-items: center; justify-content: space-between; margin: 0 0.35rem 0.6rem; color: var(--h-red); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; list-style: none; cursor: pointer; }
.dsa-toc summary::-webkit-details-marker { display: none; }
.dsa-toc ol { margin: 0; padding: 0; list-style: none; }
.dsa-toc li { margin: 0; padding: 0; }
.dsa-toc li::before { display: none !important; }
.dsa-toc a { display: flex; gap: 0.7rem; padding: 0.5rem 0.45rem; border-radius: 10px; color: #C9CBD1; font-size: 0.95rem; font-weight: 600; line-height: 1.35; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.dsa-toc a:hover,
.dsa-toc a.is-active { color: #fff; background: rgba(227, 38, 54, 0.12); }
.dsa-toc__n { flex: none; padding-top: 0.08rem; color: var(--h-red); font-size: 0.82rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* app cards (sidebar, inside the article, end of article) */
.dsa-main .ds-app-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem; border: 1px solid #2A2B31; border-radius: 18px; background: radial-gradient(90% 120% at 100% 0%, rgba(227, 38, 54, 0.16), transparent 60%), linear-gradient(180deg, #17181C, #121317); box-shadow: 0 24px 50px -36px rgba(227, 38, 54, 0.9); transform: none; }
.dsa-main .ds-app-card::before,
.dsa-main .ds-app-card::after { display: none; }
.dsa-main .ds-app-card .ds-app-icon { flex: none; width: 64px; height: 64px; border-radius: 15px; margin: 0; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.8); }
.dsa-main .ds-app-card__body { min-width: 0; }
.dsa-main .ds-app-card__title { margin: 0 0 0.3rem; font-size: 1.2rem; font-weight: 800; line-height: 1.2; }
.dsa-main .ds-app-card__title a { color: #fff; background: none; }
.dsa-main .ds-app-card__title a:hover { color: var(--h-red2); }
.dsa-body .wp-block-post-content .ds-app-card__title a,
.dsa-body .wp-block-post-content .ds-app-card a { color: #fff; text-decoration: none; }
.dsa-body .wp-block-post-content .ds-app-card__title a:hover { color: var(--h-red2); }
.dsa-main .ds-app-card__text { margin: 0 0 0.7rem; color: #C9CBD1; font-size: 0.98rem; line-height: 1.5; }
.dsa-main .ds-app-card .ds-rating { margin: 0 0 0.7rem; color: #FFC21A; font-size: 0.88rem; font-weight: 700; }
.dsa-main .ds-app-card .ds-store-badges { margin: 0; }
.dsa-main .ds-app-card .ds-store-badges img { height: 44px; width: auto; }
.dsa-main .ds-app-card .ds-app-card__ios { margin: 0.65rem 0 0; font-size: 0.88rem; font-weight: 700; line-height: 1.3; }
.dsa-main .ds-app-card .ds-app-card__ios a { display: inline-flex; align-items: center; gap: 0.4rem; color: #E6E7EA; text-decoration: none; }
.dsa-main .ds-app-card .ds-app-card__ios a:hover { color: var(--h-red2); }
.dsa-main .ds-app-card .ds-app-card__ios svg { flex: none; }
.dsa-aside .ds-app-card { flex-direction: column; padding: 1.3rem; }
.dsa-main .ds-app-card--cta { margin-top: 2.5rem !important; padding: clamp(1.4rem, 3vw, 2rem); align-items: center; border-color: rgba(227, 38, 54, 0.45); }
.dsa-main .ds-app-card--cta .ds-app-icon { width: 84px; height: 84px; border-radius: 20px; }
.dsa-main .ds-app-card--cta .ds-app-card__title { font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem); font-style: italic; }
.dsa-main .ds-app-inline { padding: 0.9rem 1.1rem; border: 1px solid #2A2B31; border-left: 3px solid var(--h-red); border-radius: 12px; background: #121317; font-size: 1rem; }
.dsa-main .ds-app-inline a { color: var(--h-red2); font-weight: 700; }

/* ------------------------------------------------------------ typography */
.dsa-body .wp-block-post-content { color: #D3D5DA; font-size: 1.1rem; line-height: 1.8; }
.dsa-body .wp-block-post-content > * { margin-block: 0 1.3rem; max-width: none; }
.dsa-body .wp-block-post-content p,
.dsa-body .wp-block-post-content li { font-weight: 450; }
.dsa-body .wp-block-post-content strong { color: #fff; font-weight: 750; }
.dsa-body .wp-block-post-content a:where(:not(.wp-element-button):not(.ds-store-link)) { color: var(--h-red2); background-image: none; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.dsa-body .wp-block-post-content a:where(:not(.wp-element-button):not(.ds-store-link)):hover { color: #fff; }
.dsa-body .wp-block-post-content > p:first-child { position: relative; padding: 1.2rem 1.4rem; border: 1px solid #2A2B31; border-left: 3px solid var(--h-red); border-radius: 14px; background: linear-gradient(90deg, rgba(227, 38, 54, 0.1), rgba(23, 24, 28, 0.6) 40%); color: #E6E7EA; font-size: 1.15rem; line-height: 1.7; }
.dsa-body .wp-block-post-content > p:first-child::before { display: none; }
.dsa-body .wp-block-post-content h2 { position: relative; margin: 2.8rem 0 1rem; padding-top: 1.1rem; color: #fff; font-size: clamp(1.55rem, 1.15rem + 1.2vw, 2.1rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.015em; scroll-margin-top: 96px; }
.dsa-body .wp-block-post-content h2::before { content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 3px; border-radius: 3px; background: var(--h-red); box-shadow: 0 0 12px rgba(227, 38, 54, 0.7); }
.dsa-body .wp-block-post-content h3 { margin: 2rem 0 0.7rem; color: #fff; font-size: 1.3rem; font-weight: 800; line-height: 1.25; scroll-margin-top: 96px; }
.dsa-body .wp-block-post-content ul { margin-left: 0; padding-left: 0; list-style: none; }
.dsa-body .wp-block-post-content ul > li { position: relative; margin: 0.5rem 0; padding-left: 1.6rem; }
.dsa-body .wp-block-post-content ul > li::before { content: ""; position: absolute; left: 0.35rem; top: 0.75em; width: 7px; height: 7px; border-radius: 50%; background: var(--h-red); box-shadow: 0 0 8px rgba(227, 38, 54, 0.7); }
.dsa-body .wp-block-post-content ol { margin-left: 0; padding-left: 0; list-style: none; counter-reset: dsa-step; }
.dsa-body .wp-block-post-content ol > li { position: relative; min-height: 2rem; margin: 0.9rem 0; padding-left: 2.9rem; counter-increment: dsa-step; }
.dsa-body .wp-block-post-content ol > li::before { content: counter(dsa-step); position: absolute; left: 0; top: 0.12rem; display: grid; place-items: center; width: 1.95rem; height: 1.95rem; border-radius: 50%; background: var(--h-red); color: #fff; font-size: 0.95rem; font-weight: 800; line-height: 1; box-shadow: 0 0 14px rgba(227, 38, 54, 0.55); }
.dsa-body .wp-block-post-content .wp-block-table { margin: 1.6rem 0 2rem; overflow-x: auto; border: 1px solid #2A2B31; border-radius: 14px; background: #121317; }
.dsa-body .wp-block-post-content .wp-block-table table { width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: 0.98rem; line-height: 1.5; }
.dsa-body .wp-block-post-content .wp-block-table thead { border: 0; }
.dsa-body .wp-block-post-content .wp-block-table th { padding: 0.85rem 1rem; border: 0; border-bottom: 2px solid var(--h-red); background: #17181C; color: #fff; font-weight: 800; text-align: left; }
.dsa-body .wp-block-post-content .wp-block-table td { padding: 0.75rem 1rem; border: 0; border-top: 1px solid #22232A; color: #D3D5DA; vertical-align: top; }
.dsa-body .wp-block-post-content .wp-block-table.is-style-stripes { border-bottom: 1px solid #2A2B31; }
.dsa-body .wp-block-post-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.dsa-body .wp-block-post-content .wp-block-table figcaption { padding: 0.6rem 1rem; color: #8C8E97; font-size: 0.85rem; }
.dsa-body .wp-block-post-content hr,
.dsa-body .wp-block-post-content .wp-block-separator { height: 1px; margin: 2.6rem 0; border: 0; background: linear-gradient(90deg, transparent, #3A3B42 20%, #3A3B42 80%, transparent); opacity: 1; }
.dsa-body .wp-block-post-content blockquote { margin: 1.8rem 0; padding: 0.4rem 0 0.4rem 1.3rem; border-left: 3px solid var(--h-red); color: #fff; font-size: 1.2rem; font-style: italic; }

/* author */
.dsa-author { display: flex; gap: 1.1rem; align-items: flex-start; margin-top: 2.5rem !important; padding: 1.4rem; border: 1px solid #2A2B31; border-radius: 18px; background: linear-gradient(180deg, #17181C, #121317); }
.dsa-author__avatar { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #2A2B31, #121317); box-shadow: 0 0 0 2px var(--h-red), 0 0 18px rgba(227, 38, 54, 0.45); }
.dsa-author__avatar img { width: 36px; height: auto; }
.dsa-author__by { margin: 0; color: var(--h-red); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.dsa-author__name { margin: 0.1rem 0 0.35rem; font-size: 1.2rem; font-weight: 800; }
.dsa-author__name a { color: #fff; text-decoration: none; }
.dsa-author__bio { margin: 0; color: #C9CBD1; font-size: 0.98rem; line-height: 1.6; }

/* more guides */
.dsa-more { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(3rem, 6vw, 4.5rem) clamp(3.5rem, 7vw, 5.5rem) !important; background: radial-gradient(38% 40% at 85% 100%, rgba(227, 38, 54, 0.2), transparent 70%), linear-gradient(180deg, #111216, #0C0D10); }
.dsa-more::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1) 20%, rgba(227, 38, 54, 0.75) 50%, rgba(255, 255, 255, 0.1) 80%, transparent); }

@media (prefers-reduced-motion: reduce) {
	.dsa-toc a { transition: none; }
}

/* ---------------------------------------------------------- tablet/mobile */
@media (max-width: 1000px) {
	.dsa-layout { grid-template-columns: minmax(0, 720px); }
	.dsa-aside { grid-column: 1; grid-row: 1; position: static; }
	.dsa-body { grid-row: 2; }
	.dsa-aside .ds-app-card { display: none; }
	.dsa-toc summary::after { content: "+"; color: #fff; font-size: 1.3rem; line-height: 1; }
	.dsa-toc details[open] summary::after { content: "–"; }
	.dsa-toc details:not([open]) summary { margin-bottom: 0.4rem; }
}
@media (max-width: 781px) {
	.dsa-title { max-width: none; }
	.dsa-meta { gap: 0.55rem 1rem; font-size: 0.92rem; }
	.dsa-meta li + li { padding-left: 0; border-left: 0; }
	.dsa-cover { aspect-ratio: 16 / 10; border-radius: 16px; }
	.dsa-body .wp-block-post-content { font-size: 1.05rem; line-height: 1.75; }
	.dsa-body .wp-block-post-content > p:first-child { padding: 1rem 1.1rem; font-size: 1.07rem; }
	.dsa-main .ds-app-card { flex-direction: column; }
	.dsa-main .ds-app-card--cta { align-items: flex-start; }
	.dsa-author { flex-direction: column; }
}
