/* Blog: article typography and the code-drawn figures used in posts */

.post { font-family: "Plus Jakarta Sans", sans-serif; color: #50453c; font-size: 17px; line-height: 1.75; }
.post > * + * { margin-top: 1.1em; }
.post h2 { font-size: 26px; line-height: 1.3; font-weight: 700; color: #1e1b17; letter-spacing: -0.015em; margin-top: 2.2em; }
.post h3 { font-size: 20px; line-height: 1.4; font-weight: 700; color: #1e1b17; margin-top: 1.8em; }
.post strong { color: #1e1b17; font-weight: 700; }
.post a { color: #7d5631; text-decoration: underline; text-underline-offset: 3px; }
.post a:hover { color: #1e1b17; }
.post ul, .post ol { padding-left: 1.4em; }
.post ul { list-style: disc; }
.post ol { list-style: decimal; }
.post li + li { margin-top: .45em; }
.post li::marker { color: #b5885f; font-weight: 700; }
.post .lead { font-size: 19px; line-height: 1.7; color: #1e1b17; }
@media (max-width: 640px) {
  .post { font-size: 16px; }
  .post h2 { font-size: 22px; }
  .post .lead { font-size: 17px; }
}

/* Figure shell */
.fig { margin: 2.2em 0; background: #fff; border: 1px solid #e9e1da; border-radius: 12px; padding: 24px; }
.fig-title { font-weight: 700; font-size: 15px; color: #1e1b17; line-height: 1.4; margin: 0 0 4px; }
.fig-sub { font-size: 13px; color: #50453c; margin: 0 0 18px; line-height: 1.5; }
.fig figcaption, .fig .fig-cap { font-size: 13px; line-height: 1.5; color: #6b5d52; margin-top: 18px; padding-top: 12px; border-top: 1px solid #f0e8e0; }
.fig .fig-cap a { color: #7d5631; }
@media (max-width: 640px) { .fig { padding: 18px 16px; border-radius: 10px; } }

/* Horizontal bars: one series, value labels in ink */
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 6px 14px; align-items: center; }
.hbar-label { font-size: 14px; color: #1e1b17; font-weight: 600; line-height: 1.3; }
.hbar-track { position: relative; height: 26px; display: flex; align-items: center; gap: 8px; }
.hbar-fill { height: 18px; background: #b5885f; border-radius: 0 4px 4px 0; min-width: 4px; flex: none; }
.hbar-fill.is-dark { background: #7d5631; }
.hbar-val { font-size: 13px; font-weight: 700; color: #1e1b17; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hbar:hover .hbar-fill { background: #7d5631; }
@media (max-width: 520px) { .hbar { grid-template-columns: 1fr; } }

/* Vertical bars */
.vbars { display: flex; align-items: flex-end; gap: clamp(12px, 5vw, 40px); height: 220px; padding: 0 4px; border-bottom: 1px solid #d4c3b7; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; max-width: 120px; }
.vbar-val { font-size: 13px; font-weight: 700; color: #1e1b17; font-variant-numeric: tabular-nums; text-align: center; }
.vbar-fill { width: 100%; background: #b5885f; border-radius: 4px 4px 0 0; }
.vbar:last-child .vbar-fill { background: #7d5631; }
.vbar-axis { display: flex; gap: clamp(12px, 5vw, 40px); padding: 8px 4px 0; }
.vbar-axis span { flex: 1; max-width: 120px; text-align: center; font-size: 13px; color: #50453c; font-weight: 600; }

/* Funnel */
.funnel { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.funnel-step { width: var(--w); min-width: 230px; max-width: 100%; text-align: center; padding: 12px 16px; border-radius: 8px; background: var(--bg, #faf2eb); color: var(--fg, #1e1b17); }
.funnel-step b { display: block; font-size: 15px; line-height: 1.35; }
.funnel-step span { display: block; font-size: 13px; line-height: 1.45; opacity: .85; }
.funnel-arrow { color: #b5885f; font-size: 18px; line-height: 1; }

/* Generic grid of cards */
.cards { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 12px; }
.card { background: #faf2eb; border-radius: 10px; padding: 16px; }
.card .k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7d5631; margin-bottom: 6px; }
.card b { display: block; font-size: 15px; color: #1e1b17; line-height: 1.35; margin-bottom: 4px; }
.card p { font-size: 13.5px; line-height: 1.55; margin: 0; color: #50453c; }
.card.is-ink { background: #33302b; }
.card.is-ink b { color: #fff; }
.card.is-ink p { color: #e9e1da; }
.card.is-ink .k { color: #efbd90; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }

/* Matrix (rows x columns) */
.matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matrix { display: grid; grid-template-columns: 130px repeat(3, minmax(140px, 1fr)); gap: 6px; min-width: 560px; }
.matrix > div { padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.45; }
.matrix .mh { font-weight: 700; color: #1e1b17; background: transparent; padding-left: 0; }
.matrix .mc { background: #faf2eb; color: #50453c; }
.matrix .mc b { color: #1e1b17; display: block; font-size: 13px; }
.matrix .corner { background: transparent; }
.scroll-hint { display: none; font-size: 12px; color: #6b5d52; margin-top: 8px; }
@media (max-width: 640px) { .scroll-hint { display: block; } }

/* Before / after comparison */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare-col { border-radius: 10px; padding: 16px; border: 1px solid #e9e1da; }
.compare-col.is-new { border-color: #b5885f; background: #fffaf5; }
.compare-col h4 { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: #1e1b17; display: flex; align-items: center; gap: 8px; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #efe7e0; color: #50453c; }
.compare-col.is-new .tag { background: #b5885f; color: #fff; }
.tree { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.tree .n { background: #faf2eb; border-radius: 6px; padding: 7px 10px; color: #1e1b17; }
.tree .n.l1 { font-weight: 700; }
.tree .n.l2 { margin-left: 14px; }
.tree .n.l3 { margin-left: 28px; color: #50453c; background: #f4ede6; }
.compare-note { font-size: 13px; margin-top: 12px; color: #50453c; line-height: 1.5; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }

/* Segmented threshold bars (good / needs improvement / poor) */
.gauges { display: flex; flex-direction: column; gap: 22px; }
.gauge-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.gauge-head b { font-size: 15px; color: #1e1b17; }
.gauge-head span { font-size: 13px; color: #50453c; }
.gauge-bar { display: grid; grid-template-columns: var(--a) var(--b) 1fr; gap: 2px; height: 30px; }
.gauge-bar > div { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #1e1b17; }
.g-good { background: #b8cbc2; border-radius: 4px 0 0 4px; }
.g-mid { background: #f0d9b5; }
.g-bad { background: #efc9c0; border-radius: 0 4px 4px 0; }
.gauge-ticks { display: grid; grid-template-columns: var(--a) var(--b) 1fr; font-size: 12px; color: #50453c; margin-top: 4px; font-variant-numeric: tabular-nums; }
.gauge-ticks span { text-align: right; padding-right: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: #50453c; margin-top: 4px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Flow: three steps in a row */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 8px; }
.flow-arrow { display: flex; align-items: center; color: #b5885f; font-size: 22px; }
@media (max-width: 720px) { .flow { grid-template-columns: 1fr; } .flow-arrow { justify-content: center; transform: rotate(90deg); } }

/* Table */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #efe7e0; vertical-align: top; line-height: 1.5; }
.tbl th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #7d5631; font-weight: 700; }
.tbl td:first-child { font-weight: 700; color: #1e1b17; }
.tbl tr:last-child td { border-bottom: 0; }

/* Checklist and callouts */
.checklist { list-style: none !important; padding: 0 !important; display: flex; flex-direction: column; gap: 10px; }
.checklist li { position: relative; padding: 12px 14px 12px 44px; background: #faf2eb; border-radius: 8px; margin: 0 !important; }
.checklist li::before { content: "check"; font-family: "Material Symbols Outlined"; position: absolute; left: 14px; top: 11px; font-size: 20px; color: #7d5631; line-height: 1.3; }
.callout { background: #33302b; color: #f7efe8; border-radius: 12px; padding: 20px 22px; }
.callout strong { color: #fff; }
.callout p { margin: 0; }
.note { border-left: 3px solid #b5885f; padding: 4px 0 4px 16px; font-size: 15px; color: #50453c; }

/* Sources */
.sources { font-size: 14px; }
.sources li { word-break: break-word; }

/* Covers */
.cover { display: block; width: 100%; height: auto; border-radius: 12px; }
@media (max-width: 640px) {
  .tbl { min-width: 0; }
  .tbl thead { display: none; }
  .tbl tr { display: block; padding: 12px 0; border-bottom: 1px solid #efe7e0; }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { display: block; padding: 3px 0; border: 0; }
  .tbl td:first-child { font-size: 15px; padding-bottom: 6px; }
  .tbl td + td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7d5631; margin-top: 4px; }
}
