/* Blog and Lab: posts and data blocks. Works on the site (theme variables) and in the admin preview (fallbacks). */
.bp-body, .bk { --bk-a: var(--fp-accent, #0E7C86); --bk-ink: var(--fp-ink, #13202B); --bk-mut: var(--fp-muted, #5B6B78);
  --bk-line: color-mix(in srgb, var(--bk-ink) 12%, transparent); --bk-won: var(--fp-won, #0F8A4C);
  --bk-lost: var(--fp-lost, #C8102E); --bk-gold: #C4952B; --bk-surf: var(--fp-surface, #fff); }

/* ---- post text -------------------------------------------------------------------------------------------- */
.bp-body { font-size: 1.06rem; line-height: 1.7; color: var(--bk-ink); overflow-wrap: anywhere; }
.bp-body h2 { font-size: 1.75rem; margin: 2.2rem 0 .7rem; scroll-margin-top: 80px; }
.bp-body h3 { font-size: 1.3rem; margin: 1.6rem 0 .5rem; scroll-margin-top: 80px; }
.bp-body p { margin: 0 0 1.05rem; }
.bp-body ul, .bp-body ol { margin: 0 0 1.05rem; padding-left: 1.3rem; }
.bp-body img { max-width: 100%; height: auto; border-radius: 12px; }
.bp-body blockquote { margin: 1.4rem 0; padding: 1rem 1.2rem; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--bk-a) 30%, transparent);
  background: color-mix(in srgb, var(--bk-a) 7%, transparent); }
.bp-body blockquote p:last-child { margin: 0; }
.bp-body pre { background: color-mix(in srgb, var(--bk-ink) 6%, transparent); padding: .8rem 1rem; border-radius: 10px; overflow-x: auto; font-size: .9rem; }
.bp-body code { font-size: .9em; }
.bp-h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3.2rem); line-height: 1.02; margin: .3rem 0 .6rem; }
.bp-lead { font-size: 1.2rem; line-height: 1.55; color: var(--bk-ink); }
.bx-kicker, .bp-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--bk-a, var(--fp-accent, #0E7C86)); }

/* ---- data blocks ------------------------------------------------------------------------------------------- */
.bk { margin: 1.6rem 0; padding: 1rem 1.1rem .8rem; border: 1px solid var(--bk-line); border-radius: 16px; background: var(--bk-surf); }
.bk-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.bk-title { font-size: 1.02rem; }
.bk-live { margin-left: auto; font-size: .72rem; font-weight: 700; color: var(--bk-won); background: color-mix(in srgb, var(--bk-won) 12%, transparent);
  border-radius: 999px; padding: .12rem .55rem; white-space: nowrap; }
.bk-caption { font-size: .93rem; margin-top: .55rem; }
.bk-notes { margin-top: .6rem; font-size: .86rem; color: var(--bk-mut); border-top: 1px dashed var(--bk-line); padding-top: .45rem; }
.bk-notes summary { cursor: pointer; font-weight: 700; color: var(--bk-ink); font-size: .8rem; letter-spacing: .03em; }
.bk-notes ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.bk-notes li { margin: .15rem 0; }
.bk-foot { margin-top: .4rem; font-size: .72rem; color: var(--bk-mut); }
.bk-empty { color: var(--bk-mut); margin: .4rem 0; }
.bk-error { border: 1px solid var(--bk-lost); color: var(--bk-lost); background: color-mix(in srgb, var(--bk-lost) 7%, transparent);
  border-radius: 10px; padding: .6rem .8rem; font-size: .9rem; margin: 1rem 0; }
.bk-dim { color: var(--bk-mut); font-size: .85rem; }
.bk-num { font-variant-numeric: tabular-nums; }

/* charts */
.bk-chart svg, .bk-svg { width: 100%; height: auto; display: block; }
.bk-svg text { font: 12px system-ui, sans-serif; fill: var(--bk-mut); }
@media (max-width: 600px) { .bk-svg text { font-size: 20px; } .bk-svg .bk-label, .bk-svg .bk-val { font-size: 20px; } }
.bk-svg .bk-axis { fill: var(--bk-ink); font-weight: 600; }
.bk-svg .bk-label, .bk-svg .bk-val { fill: var(--bk-ink); font-size: 13px; }
.bk-grid { stroke: var(--bk-line); }
.bk-diag { stroke: var(--bk-mut); stroke-dasharray: 5 5; opacity: .7; }
.bk-line { fill: none; stroke-width: 2.6; }
.bk-line.is-ours, .bk-dot.is-ours { stroke: var(--bk-a); } .bk-dot.is-ours { fill: var(--bk-a); }
.bk-line.is-market, .bk-dot.is-market { stroke: var(--bk-gold); } .bk-dot.is-market { fill: var(--bk-gold); }
.bk-line.is-said { stroke: var(--bk-mut); stroke-dasharray: 6 5; } .bk-dot.is-said { fill: var(--bk-mut); stroke: none; }
.bk-line.is-alt, .bk-dot.is-alt { stroke: #7A3FD1; } .bk-dot.is-alt { fill: #7A3FD1; }
.bk-dot { fill-opacity: .85; stroke-width: 0; }
.bk-dot.bk-faded { fill-opacity: .25; }
.bk-bar { fill: var(--bk-a); } .bk-track { fill: color-mix(in srgb, var(--bk-ink) 7%, transparent); }
.bk-mark { stroke: var(--bk-ink); stroke-width: 3; }
.bk-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .82rem; color: var(--bk-mut); margin-top: .2rem; }
.bk-key { display: inline-block; width: 18px; height: 4px; border-radius: 2px; margin-right: .35rem; vertical-align: middle; background: var(--bk-a); }
.bk-key.is-market { background: var(--bk-gold); } .bk-key.is-said { background: var(--bk-mut); } .bk-key.is-alt { background: #7A3FD1; }

/* tables */
.bk-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bk-table table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.bk-table th { text-align: left; font-size: .76rem; font-weight: 700; color: var(--bk-mut); padding: .45rem .5rem .45rem 0; white-space: nowrap; }
.bk-table td { padding: .5rem .5rem .5rem 0; border-top: 1px solid var(--bk-line); vertical-align: middle; }
.bk-table tr.is-thin td { opacity: .55; }
.bk-v.is-ok { color: var(--bk-won); font-weight: 600; } .bk-v.is-off { color: var(--bk-gold); font-weight: 600; }
.bk-barcell { min-width: 140px; } .bk-barcell .bk-hbar { display: inline-block; height: 10px; border-radius: 5px; background: var(--bk-a); margin-right: .45rem; vertical-align: middle; max-width: 70%; }
.bk-res { display: inline-block; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .08rem .5rem; }
.bk-res.is-won { color: var(--bk-won); background: color-mix(in srgb, var(--bk-won) 13%, transparent); }
.bk-res.is-lost { color: var(--bk-lost); background: color-mix(in srgb, var(--bk-lost) 11%, transparent); }
.bk-md { margin: 1.2rem 0; }

/* numbers, calculators, match */
.bk-stat { display: flex; flex-direction: column; }
.bk-stat b { font-family: var(--fp-display, inherit); font-size: 3rem; line-height: 1; }
.bk-stat span { color: var(--bk-mut); }
.bk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: .4rem 0; }
.bk-tiles > div { border: 1px solid var(--bk-line); border-radius: 12px; padding: .65rem .8rem; display: flex; flex-direction: column; }
.bk-tiles > div.is-on { border-color: var(--bk-a); box-shadow: inset 0 0 0 1px var(--bk-a); }
.bk-tiles b { font-family: var(--fp-display, inherit); font-size: 1.9rem; line-height: 1.05; }
.bk-tiles span { font-size: .82rem; color: var(--bk-mut); }
.bk-tiles em { font-style: normal; }
.bk-inputs { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; margin-bottom: .6rem; font-size: .9rem; }
.bk-inputs label { display: flex; align-items: center; gap: .5rem; }
.bk-inputs input[type=number], .bk-calc td input { width: 6rem; padding: .25rem .4rem; border: 1px solid var(--bk-line); border-radius: 8px; background: transparent; color: inherit; }
.bk-inputs output { font-weight: 700; min-width: 2.6rem; }
.bk-match-h { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; font-weight: 700; margin-bottom: .4rem; }
.bk-wf { margin: .6rem 0; }
.bk-wf-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 3rem; gap: .5rem; align-items: center; font-size: .88rem; padding: .15rem 0; }
.bk-wf-track { position: relative; height: 10px; background: color-mix(in srgb, var(--bk-ink) 6%, transparent); border-radius: 5px; }
.bk-wf-bar { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.bk-wf-bar.up { left: 50%; background: var(--bk-won); } .bk-wf-bar.down { right: 50%; background: var(--bk-lost); }

/* ---- post page (site) ----------------------------------------------------------------------------------- */
.bp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; }
@media (max-width: 991px) { .bp-wrap { grid-template-columns: minmax(0, 1fr); } }
.bp-article { max-width: 760px; min-width: 0; }
.bp-by { display: flex; gap: .7rem; align-items: center; margin: .4rem 0 1.4rem; font-size: .92rem; }
.bp-av { width: 40px; height: 40px; border-radius: 50%; background: var(--bk-a, var(--fp-accent)); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.bp-side .fp-panel { margin-bottom: 1rem; }
.bp-toc ol { padding-left: 1.1rem; margin: 0; font-size: .92rem; } .bp-toc li { margin: .25rem 0; }
.bp-parts li.on { font-weight: 700; }
.bp-preview { background: #FFF4D6; color: #6B4E00; border-radius: 10px; padding: .5rem .8rem; font-size: .9rem; margin-bottom: 1rem; }
.bp-safe { font-size: .88rem; color: var(--bk-mut); border-top: 1px solid var(--bk-line); margin-top: 2rem; padding-top: 1rem; }
.bp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.bp-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; border: 1px solid var(--bk-line, rgba(0,0,0,.1)); border-radius: 16px; overflow: hidden; background: var(--fp-surface, #fff); }
.bp-card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; }
.bp-card-b { padding: .8rem 1rem 1rem; }
.bp-card h3 { font-size: 1.2rem; margin: .2rem 0 .4rem; }
.bp-card:hover h3 { text-decoration: underline; }
.bp-feat { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.4rem; align-items: center; text-decoration: none; color: inherit; margin-bottom: 1.6rem; }
@media (max-width: 767px) { .bp-feat { grid-template-columns: 1fr; } }
.bp-feat img { width: 100%; border-radius: 16px; display: block; }
.bp-feat h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.05; }
