/* The blog: the K3Bxn Trading Desk (inc/blog.php). Light and dark come from the theme's tokens. */

.k3-blog .vi { width: 20px; height: 20px; flex: none; }

/* ---- the drawn covers */
.bl-cover { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: 16 / 9; background: var(--brand-deep); }
.bl-cover svg, .bl-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bl-cover .grid line { stroke: #ffffff10; stroke-width: 1; }
.bl-cover .wick { stroke: #ffffff55; stroke-width: 2; }
.bl-cover .up { fill: var(--c); opacity: .9; }
.bl-cover .down { fill: #ffffff40; }
.bl-cover .trend { fill: none; stroke: var(--c); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: .55; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: bl-draw 2.2s .2s ease-out forwards; }
.bl-cover .badge { fill: #ffffff10; stroke: #ffffff2a; stroke-width: 2; }
@keyframes bl-draw { to { stroke-dashoffset: 0; } }

/* ---- the topic chip */
.bl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; color: var(--ink); background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); }
.bl-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.bl-chip:hover { color: var(--ink); background: color-mix(in srgb, var(--c) 35%, transparent); }

/* ---- the hero of the list */
.bl-hero { position: relative; overflow: hidden; color: #fff; padding: 64px 0 44px;
	background: radial-gradient(700px 380px at 90% 0%, #f0b42933, transparent 62%), radial-gradient(900px 500px at 0% 120%, #19b8ab40, transparent 60%), linear-gradient(155deg, #073a41 0%, var(--brand-deep) 55%, #041a1e 100%); }
.bl-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: linear-gradient(#ffffff0a 1px, transparent 1px), linear-gradient(90deg, #ffffff0a 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.bl-hero .wrap { position: relative; }
.bl-hero .eyebrow { color: var(--accent); }
.bl-hero h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.06; margin: 0 0 .3em; max-width: 15em; }
.bl-hero .lead { color: #cfe3e0; font-size: 1.12rem; max-width: 40em; margin: 0; }
.bl-tools { margin-top: 26px; display: grid; gap: 14px; }
.bl-search { display: flex; align-items: center; gap: 10px; max-width: 560px; padding: 6px 16px; border-radius: 99px; background: #ffffff12; border: 1px solid #ffffff2e; }
.bl-search .vi { color: var(--accent); }
.bl-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: #fff; font: inherit; font-size: 1.02rem; padding: 9px 0; }
.bl-search input::placeholder { color: #a9c6c3; }
.bl-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-topic { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; cursor: pointer; font: inherit; font-weight: 700; font-size: .9rem; color: #e7f3f1; background: #ffffff0c; border: 1px solid #ffffff26; transition: background .15s, border-color .15s, transform .15s; }
.bl-topic .vi { width: 16px; height: 16px; color: var(--c, var(--accent)); }
.bl-topic b { font-size: .75rem; padding: 1px 7px; border-radius: 99px; background: #ffffff1c; }
.bl-topic:hover { transform: translateY(-1px); background: #ffffff1a; }
.bl-topic.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bl-topic.is-on .vi { color: var(--accent-ink); }

/* ---- the newest guide */
.bl-featured { margin-top: -6px; padding-top: 34px; }
.bl-feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; align-items: center; padding: 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .2s, border-color .2s; }
.bl-feature:hover { transform: translateY(-3px); border-color: var(--brand-bright); color: var(--ink); }
.bl-cover-big { border-radius: 16px; }
.bl-feature-text { display: flex; flex-direction: column; gap: 12px; padding-right: 10px; }
.bl-new { align-self: flex-start; padding: 3px 12px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.bl-feature-title { font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.15; }
.bl-feature-excerpt { color: var(--ink-2); }
.bl-feature .btn { align-self: flex-start; }
.bl-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 0; font-size: .86rem; color: var(--mute); }
.bl-meta span { display: inline-flex; align-items: center; gap: 6px; }
.bl-meta .vi { width: 16px; height: 16px; }

/* ---- the route */
.bl-route { padding-top: 56px; }
.bl-route-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.bl-route-head h2 { margin: 0; max-width: 20em; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.bl-route-progress { display: grid; gap: 8px; min-width: 240px; }
.bl-route-count { font-weight: 800; }
.bl-bar { display: block; height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; border: 1px solid var(--line); }
.bl-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand-bright), var(--accent)); transition: width .8s; }
.bl-stops { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; position: relative; }
.bl-stops li { scroll-snap-align: start; }
.bl-stops a { position: relative; display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s; }
.bl-stops a:hover { transform: translateY(-3px); border-color: var(--c); color: var(--ink); }
.bl-stops li:not(:last-child) a::after { content: ""; position: absolute; top: 34px; right: -13px; width: 14px; height: 3px; background: var(--line); }
.bl-stop-dot { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 22%, transparent); border: 2px solid var(--c); font-weight: 900; }
.bl-stop-dot .vi { display: none; width: 22px; height: 22px; }
.bl-stop-title { font-weight: 700; line-height: 1.3; }
.bl-stops small { color: var(--mute); margin-top: auto; }
.bl-stops li.is-read .bl-stop-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.bl-stops li.is-read .bl-stop-dot b { display: none; }
.bl-stops li.is-read .bl-stop-dot .vi { display: block; }
.bl-stops li.is-next a { border: 2px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---- the cards */
.bl-list { padding-top: 56px; padding-bottom: 20px; }
.bl-list > h2, .bl-more > h2, .bl-eas > h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.bl-card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s; }
.bl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-bright); }
.bl-card[hidden] { display: none; }
.bl-card-cover { position: relative; display: block; }
.bl-card-cover .bl-cover { border-radius: 0; }
.bl-stop-n { position: absolute; left: 12px; top: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .85rem; background: #062a30cc; color: #fff; border: 1px solid #ffffff44; }
.bl-read-badge { display: none; position: absolute; right: 12px; top: 12px; padding: 3px 10px; border-radius: 99px; background: var(--ok); color: #fff; font-size: .74rem; font-weight: 800; }
.bl-card.is-read .bl-read-badge { display: block; }
.bl-card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px; flex: 1; }
.bl-card-body .bl-chip { align-self: flex-start; }
.bl-card h3 { margin: 0; font-size: 1.12rem; line-height: 1.3; }
.bl-card h3 a { color: var(--ink); text-decoration: none; }
.bl-card h3 a:hover { color: var(--link); }
.bl-card p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.bl-card .bl-meta { margin-top: auto; }
.bl-none { text-align: center; padding: 24px; }

/* ---- the last band */
.bl-cta { margin-top: 56px; padding: 46px 0; color: #fff; background: radial-gradient(600px 260px at 10% 0%, #f0b42930, transparent 70%), linear-gradient(160deg, var(--brand-deep), #04191d); }
.bl-cta .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.bl-cta h2 { color: #fff; margin: 0 0 .2em; }
.bl-cta p { color: #cfe3e0; margin: 0; }
.bl-cta-links { display: flex; flex-wrap: wrap; gap: 12px; }
.bl-cta-card { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 14px; background: #ffffff10; border: 1px solid #ffffff26; color: #fff; text-decoration: none; transition: transform .15s, background .15s; }
.bl-cta-card .vi { color: var(--accent); }
.bl-cta-card:hover { transform: translateY(-2px); background: #ffffff1c; color: #fff; }

/* ---- an article */
.bl-progress { position: fixed; z-index: 60; left: 0; right: 0; top: 0; height: 4px; background: transparent; pointer-events: none; }
.bl-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-bright), var(--accent)); }
.bl-article-head { color: #fff; padding: 40px 0 46px; background: radial-gradient(700px 360px at 95% 0%, #f0b42926, transparent 62%), linear-gradient(155deg, #073a41 0%, var(--brand-deep) 60%, #041a1e 100%); }
.bl-article-top { display: grid; grid-template-columns: 1.25fr .75fr; gap: 36px; align-items: center; }
.bl-article-head .breadcrumbs, .bl-article-head .breadcrumbs a { color: #a9c6c3; }
.bl-article-head .bl-chip { color: #fff; }
.bl-article-head h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.1; margin: 14px 0 .35em; }
.bl-article-head .lead { color: #cfe3e0; font-size: 1.1rem; margin: 0 0 16px; }
.bl-article-head .bl-meta { color: #b9d3d0; }
.bl-onroute { padding: 2px 10px; border-radius: 99px; background: #ffffff16; color: var(--accent); font-weight: 700; }
.bl-cover-head { border: 1px solid #ffffff22; box-shadow: 0 30px 60px -30px #000; }
.bl-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.bl-share span { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-right: 4px; }
.bl-share a, .bl-share button { padding: 6px 12px; border-radius: 99px; font: inherit; font-size: .84rem; font-weight: 700; color: #e7f3f1; background: #ffffff10; border: 1px solid #ffffff2a; text-decoration: none; cursor: pointer; }
.bl-share a:hover, .bl-share button:hover { background: #fff; color: var(--brand-deep); }

.bl-article-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 44px; align-items: start; padding-top: 40px; }
.bl-article-grid.no-toc { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.bl-toc { position: sticky; top: 96px; padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.bl-toc p { margin: 0 0 10px; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.bl-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 4px; }
.bl-toc li { counter-increment: toc; }
.bl-toc a { display: flex; gap: 8px; padding: 6px 8px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: .9rem; line-height: 1.35; }
.bl-toc a::before { content: counter(toc); flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; background: var(--soft); color: var(--ink); }
.bl-toc a:hover { background: var(--soft); color: var(--ink); }
.bl-toc a.is-here { background: var(--soft); color: var(--ink); font-weight: 700; }
.bl-toc a.is-here::before { background: var(--accent); color: var(--accent-ink); }
.bl-toc-bar { display: block; height: 6px; margin-top: 14px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.bl-toc-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-bright), var(--accent)); }

.bl-body { padding: 0; max-width: 760px; font-size: 1.08rem; line-height: 1.75; counter-reset: h2; }
.bl-body > p:first-of-type { font-size: 1.18rem; color: var(--ink); }
.bl-body h2 { counter-increment: h2; display: flex; gap: 14px; align-items: center; margin: 1.9em 0 .6em; font-size: clamp(1.35rem, 2.6vw, 1.7rem); scroll-margin-top: 96px; }
.bl-body h2::before { content: counter(h2, decimal-leading-zero); flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; font-size: .95rem; font-weight: 900; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.bl-body h3 { margin-top: 1.5em; }
.bl-body ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.bl-body ul li { position: relative; padding: 12px 16px 12px 46px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.bl-body ul li::before { content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 6px; background: var(--brand-bright) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }
.bl-body ol { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 10px; }
.bl-body ol li { counter-increment: step; position: relative; padding: 14px 16px 14px 60px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.bl-body ol li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; background: var(--brand); }
.bl-body strong { color: var(--ink); }
.bl-body a { font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bl-body blockquote { margin: 1.4em 0; padding: 18px 22px; border-radius: 16px; border-left: 4px solid var(--accent); background: var(--soft); font-size: 1.15rem; }
.bl-done { display: flex; gap: 14px; align-items: center; margin-top: 36px; padding: 18px; border-radius: 16px; background: color-mix(in srgb, var(--ok) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.bl-done .vi { width: 34px; height: 34px; color: var(--ok); }
.bl-done b { display: block; }
.bl-done span { color: var(--mute); font-size: .92rem; }

.bl-after { padding-top: 44px; display: grid; gap: 44px; }
.bl-nextprev { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; }
.bl-np { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s; }
.bl-np:hover { transform: translateY(-3px); border-color: var(--brand-bright); color: var(--ink); }
.bl-np small { color: var(--mute); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .74rem; }
.bl-np b { font-size: 1.12rem; line-height: 1.3; }
.bl-next { grid-column: 2; color: #fff; background: linear-gradient(160deg, var(--brand-deep), #04191d); border-color: #ffffff1a; }
.bl-next:hover { color: #fff; }
.bl-next small { color: var(--accent); }
.bl-next span { color: #b9d3d0; font-size: .86rem; }
.bl-prev + .bl-next { grid-column: auto; }
.bl-ea-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bl-ea { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s; }
.bl-ea:hover { transform: translateY(-3px); border-color: var(--brand-bright); color: var(--ink); }
.bl-ea-img { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--brand-deep); }
.bl-ea-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-ea b { display: block; }
.bl-ea small { color: var(--mute); }

@media (max-width: 980px) {
	.bl-feature, .bl-article-top { grid-template-columns: 1fr; }
	.bl-grid, .bl-ea-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bl-article-grid { grid-template-columns: 1fr; }
	.bl-toc { position: static; }
	.bl-cover-head { max-width: 520px; }
}
@media (max-width: 640px) {
	.bl-grid, .bl-ea-row, .bl-nextprev { grid-template-columns: 1fr; }
	.bl-next { grid-column: auto; }
	.bl-feature { padding: 12px; }
	.bl-stops { grid-auto-columns: 78%; }
	.bl-body h2::before { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
	.bl-cover .trend { animation: none; stroke-dashoffset: 0; }
	.bl-bar i { transition: none; }
}
