/* BC Tools. Uses bc-2026 tokens (--ink, --brown, --terra, --cream-2 ...) with fallbacks. */
.bct { --bct-ink: var(--ink, #2B2320); --bct-brown: var(--brown, #443B37); --bct-terra: var(--terra, #C0552B); --bct-tint: var(--cream-2, #F2ECE3); --bct-line: var(--border, rgba(43,35,32,.16)); --bct-muted: var(--body-muted, #5A4F49);
	margin: 1.6em 0 2em; border: 1px solid var(--bct-line); border-radius: var(--r-sm, 3px); background: #fff; font-family: var(--sans, system-ui, sans-serif); color: var(--body, #3A322E); }
.bct * { box-sizing: border-box; }
.bct { container-type: inline-size; container-name: bct; }
.bct-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 20px; background: var(--bct-brown); color: #fff; border-radius: var(--r-sm, 3px) var(--r-sm, 3px) 0 0; }
.bct .bct-title { margin: 0; font: 500 21px/1.2 var(--serif, Georgia, serif); color: #fff; }
.bct .bct-more { color: #fff; font-size: 14px; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); text-underline-offset: 2px; }
.bct-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.bct-in { padding: 18px 20px 20px; min-width: 0; }
.bct-out { padding: 18px 20px 20px; background: var(--bct-tint); min-width: 0; border-radius: 0 0 var(--r-sm, 3px) 0; }
.bct-field { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.bct-field:last-child { margin-bottom: 0; }
.bct legend, .bct-field > label { display: block; margin: 0 0 7px; padding: 0; font: 600 13px/1.3 var(--sans, sans-serif); color: var(--bct-ink); }
.bct-chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.bct button { font: inherit; cursor: pointer; }
.bct .bct-chip { grid-column: span 2; display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 6px 8px; border: 1px solid var(--bct-line); border-radius: var(--r-sm, 3px); background: #fff; color: var(--bct-ink); font-size: 14px; font-weight: 600; line-height: 1.2; text-align: center; text-wrap: balance; }
.bct .bct-chip--wide { grid-column: span 3; }
.bct .bct-chip:hover, .bct .bct-segb:hover { border-color: var(--bct-brown); }
.bct .bct-chip[aria-pressed="true"] { background: var(--bct-brown); border-color: var(--bct-brown); color: #fff; }
.bct-row { display: flex; gap: 8px; flex-wrap: wrap; }
.bct-num, .bct-sel, .bct-custom input { height: 44px; padding: 0 12px; border: 1px solid var(--bct-line); border-radius: var(--r-sm, 3px); background: #fff; color: var(--bct-ink); font: 500 16px var(--sans, sans-serif); }
.bct .bct-sel { -webkit-appearance: none; appearance: none; padding-right: 40px; text-overflow: ellipsis; cursor: pointer;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232B2320' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px; }
.bct .bct-sel:hover, .bct .bct-num:hover, .bct .bct-custom input:hover { border-color: var(--bct-brown); }
.bct .bct-sel:focus-visible, .bct .bct-num:focus-visible, .bct .bct-custom input:focus-visible, .bct .bct-chip:focus-visible, .bct .bct-segb:focus-visible { outline: 2px solid var(--bct-terra); outline-offset: 2px; }
.bct-num { width: 88px; flex: 0 0 auto; -moz-appearance: textfield; appearance: textfield; }
.bct input[type="number"]::-webkit-inner-spin-button, .bct input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bct-row .bct-sel { flex: 1 1 180px; min-width: 0; }
.bct-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.bct .bct-segb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 44px; margin: 0; padding: 6px; border: 1px solid var(--bct-line); border-radius: var(--r-sm, 3px); background: #fff; color: var(--bct-ink); }
.bct-segb span { font-size: 14px; font-weight: 600; }
.bct-segb small { font-size: 13px; color: var(--bct-muted); font-variant-numeric: tabular-nums; }
.bct-segb[aria-pressed="true"] { background: var(--bct-brown); border-color: var(--bct-brown); color: #fff; }
.bct-segb[aria-pressed="true"] small { color: rgba(255,255,255,.8); }
.bct label.bct-custom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 0; padding: 0; font-size: 14px; line-height: 1.3; color: var(--bct-muted); }
.bct .bct-custom-in { display: inline-flex; align-items: center; gap: 6px; }
.bct .bct-custom-in b { font-weight: 600; color: var(--bct-ink); font-variant-numeric: tabular-nums; }
.bct .bct-custom input { width: 72px; height: 40px; margin: 0; }
.bct-stat { display: flex; flex-direction: column; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--bct-line); }
.bct-k { font: 600 13px/1.3 var(--sans, sans-serif); color: var(--bct-muted); }
.bct .bct-v { font: 500 40px/1.1 var(--serif, Georgia, serif); color: var(--bct-ink); letter-spacing: -.01em; font-variant-numeric: lining-nums; }
.bct-stat--coffee .bct-v { color: var(--terra-dark, #8F3D1E); }
.bct-sub { font-size: 14px; color: var(--bct-ink); }
.bct .bct-line, .bct .bct-dil p, .bct .bct-note, .bct .bct-guide { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }
.bct-dil { margin: 0 0 12px; padding: 10px 12px; background: #fff; border-radius: var(--r-sm, 3px); font-size: 14px; }
.bct .bct-dil label.bct-k, .bct .bct-bag label.bct-k { display: block; margin: 0 0 6px; }
.bct .bct-dil .bct-sel, .bct .bct-bag .bct-sel { height: 40px; margin: 0; font-size: 15px; padding-left: 12px; }
.bct .bct-dil .bct-sel { width: 100%; }
.bct-dil p { margin: 8px 0 0 !important; }
.bct-bag { margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid var(--bct-line); font-size: 14px; }
.bct-bagrow { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
.bct-bagrow [data-o="bag"] { color: var(--bct-ink); }
.bct .bct-note { color: var(--bct-muted); font-size: 13px; margin: 0; }
.bct .bct-guide a { font-weight: 600; }
.bct [hidden] { display: none !important; }
/* Caffeine calculator */
.bct-drinks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.bct .bct-drink { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; margin: 0; padding: 0; }
.bct .bct-drink:has(.bct-mg:not([hidden])) { grid-template-columns: minmax(0, 1fr) 72px auto auto; }
.bct .bct-drink::before, .bct .bct-drink::marker { content: none; display: none; }
.bct .bct-drink .bct-sel { width: 100%; font-size: 15px; }
.bct .bct-mg { width: 72px; }
.bct .bct-time { height: 44px; width: 118px; margin: 0; padding: 0 8px; border: 1px solid var(--bct-line); border-radius: var(--r-sm, 3px); background: #fff; color: var(--bct-ink); font: 500 15px var(--sans, sans-serif); font-variant-numeric: tabular-nums; }
.bct .bct-x { width: 36px; height: 44px; margin: 0; padding: 0; border: 1px solid transparent; border-radius: var(--r-sm, 3px); background: none; color: var(--bct-muted); font-size: 22px; line-height: 1; }
.bct .bct-x:hover { border-color: var(--bct-line); color: var(--bct-ink); }
.bct .bct-add { margin: 0; padding: 8px 12px; border: 1px dashed var(--bct-line); border-radius: var(--r-sm, 3px); background: #fff; color: var(--bct-ink); font-size: 14px; font-weight: 600; }
.bct .bct-add:hover { border-color: var(--bct-brown); }
.bct-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bct-pair label { display: block; margin: 0 0 7px; font: 600 13px/1.3 var(--sans, sans-serif); color: var(--bct-ink); }
.bct-pair .bct-time, .bct-pair .bct-sel { width: 100%; }
.bct .bct-sel--inline { height: 36px; width: 100%; margin-top: 4px; font-size: 14px; }
.bct-chart { height: 190px; margin: 4px 0 12px; }
.bct-chart svg { display: block; overflow: visible; }
.bct-chart text { font: 12px var(--sans, sans-serif); fill: var(--bct-muted); }
.bct-chart .g { stroke: var(--bct-line); stroke-width: 1; }
.bct-chart .a { fill: rgba(192, 85, 43, .16); }
.bct-chart .c { fill: none; stroke: var(--terra-dark, #8F3D1E); stroke-width: 2.25; stroke-linejoin: round; }
.bct-chart .tg { stroke: var(--bct-ink); stroke-width: 1.25; stroke-dasharray: 5 4; }
.bct-chart .tgl, .bct-chart .bl { fill: var(--bct-ink); font-weight: 600; paint-order: stroke; stroke: var(--bct-tint); stroke-width: 4px; }
.bct-chart .sl { fill: rgba(68, 59, 55, .08); }
.bct-chart .dr { fill: var(--bct-brown); stroke: var(--bct-tint); stroke-width: 2; }
.bct-meter { margin: 0 0 12px; }
.bct-meter-k { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--bct-muted); margin: 0 0 5px; }
.bct-meter-k b { color: var(--bct-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.bct-meter-bar { height: 8px; border-radius: 4px; background: #fff; overflow: hidden; box-shadow: inset 0 0 0 1px var(--bct-line); }
.bct-meter-bar i { display: block; height: 100%; background: var(--bct-brown); border-radius: 4px; }
.bct-meter-bar i.is-over { background: var(--terra-dark, #8F3D1E); }

@container bct (max-width: 330px) {
	.bct .bct-time { width: 96px; }
	.bct-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bct .bct-chip, .bct .bct-chip--wide { grid-column: span 1; }
}
@container bct (max-width: 640px) {
	.bct-grid { grid-template-columns: minmax(0, 1fr); }
	.bct-out { border-radius: 0 0 var(--r-sm, 3px) var(--r-sm, 3px); }
	.bct .bct-v { font-size: 34px; }
	.bct-head, .bct-in, .bct-out { padding-left: 16px; padding-right: 16px; }
	.bct-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
}
@container bct (max-width: 480px) {
	.bct .bct-drink, .bct .bct-drink:has(.bct-mg:not([hidden])) { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--hairline, rgba(43,35,32,.14)); }
	.bct .bct-drink .bct-sel { grid-column: 1 / -1; }
	.bct .bct-drink:has(.bct-mg:not([hidden])) { grid-template-columns: 80px minmax(0, 1fr) auto; }
}
/* Coffee drinks chart [bc_tool name="drinks"] + drink builder [bc_tool name="drink"] */
figure.bct-dc { padding: 0; }
.bct-dc-body { padding: 16px 20px 6px; }
.bct ul.bct-dc-key, .bct ul.bct-dc-grid, .bct ul.bct-db-cups { list-style: none; margin: 0; padding: 0; }
.bct ul.bct-dc-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; font-size: 13px; color: var(--bct-ink); }
.bct-dc-key li, .bct-dc-grid li, .bct-db-cups li { margin: 0; padding: 0; }
.bct-dc-key li::before, .bct-dc-key li::marker, .bct-dc-grid li::before, .bct-dc-grid li::marker, .bct-db-cups li::before, .bct-db-cups li::marker { content: none; display: none; }
.bct-dc-key li { display: inline-flex; align-items: center; gap: 6px; }
.bct-dc-sw { display: inline-block; width: 14px; height: 14px; border-radius: 2px; border: 1px solid rgba(43,35,32,.25); }
.bct-dc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 12px; }
.bct-dc--few .bct-dc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bct-dc-cell { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.bct-dc-cell svg { display: block; width: 100%; max-width: 150px; height: auto; margin: 0 0 4px; }
.bct .bct-dc-name { font: 600 16px/1.25 var(--serif, Georgia, serif); color: var(--bct-ink); }
.bct .bct-dc-name a { color: inherit; text-decoration: underline; text-decoration-color: var(--bct-terra); text-underline-offset: 3px; }
.bct-dc-size { white-space: nowrap; font-size: 13px; color: var(--bct-ink); font-variant-numeric: tabular-nums; }
.bct-dc-rec { font-size: 13px; line-height: 1.35; color: var(--bct-muted); text-wrap: balance; }
.bct .bct-dc-cap { margin: 0; padding: 10px 20px 14px; font-size: 13px; line-height: 1.5; color: var(--bct-muted); border-top: 1px solid var(--bct-line); text-align: left; }
.bct-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.bct .bct-pill { min-height: 40px; margin: 0; padding: 6px 12px; border: 1px solid var(--bct-line); border-radius: 999px; background: #fff; color: var(--bct-ink); font-size: 14px; font-weight: 600; line-height: 1.2; }
.bct .bct-pill:hover { border-color: var(--bct-brown); }
.bct .bct-pill[aria-pressed="true"] { background: var(--bct-brown); border-color: var(--bct-brown); color: #fff; }
.bct .bct-pill:focus-visible { outline: 2px solid var(--bct-terra); outline-offset: 2px; }
.bct-db .bct-out { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.bct-db-cups .bct-dc-cell svg { max-width: 220px; }
.bct-db-cups .bct-dc-name { font-size: 26px; font-weight: 500; }
.bct-db-cups .bct-dc-size, .bct-db-cups .bct-dc-rec { font-size: 15px; }
.bct-db .bct-note { margin-top: 10px; }
@container bct (max-width: 520px) {
	.bct-dc-grid, .bct-dc--few .bct-dc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
	.bct-dc-body { padding: 14px 14px 4px; }
	.bct .bct-dc-cap { padding: 10px 14px 12px; }
}
@container bct (max-width: 420px) {
	.bct-dc--few .bct-dc-rec { display: none; }
}
