/*
 * Public tools ([chefit_bmi_calculator], [chefit_bmr_calculator], ...). Loaded after
 * assets/calc-v2/chefit-calc-v2.css: the page root is .cfc.cftl, so the kit's tokens, resets, buttons
 * and number fields apply, and this file adds only what the tools need (.cftl-*).
 *
 * The kit resets headings, paragraphs, lists and tables with a (0,2,0) selector. A rule here that sets
 * margin / padding / font / color on one of those elements therefore starts with ".cftl " (two classes),
 * or it silently loses to the reset. Buttons take their colors from the kit's custom properties.
 */

.cftl{
	/* One color per reading of the result. Text colors pass 4.5:1 on their soft background. */
	--cftl-under:#6aa6d6;--cftl-under-ink:#1f4f7a;--cftl-under-soft:#e9f2fa;
	--cftl-fit:#4fb3a5;--cftl-fit-ink:#17574e;--cftl-fit-soft:#e2f4f1;
	--cftl-normal:#86c440;--cftl-normal-ink:#335f12;--cftl-normal-soft:#ecf7de;
	--cftl-avg:#c9d463;--cftl-avg-ink:#525a12;--cftl-avg-soft:#f4f7dc;
	--cftl-over:#f0b33f;--cftl-over-ink:#77500a;--cftl-over-soft:#fdf3dc;
	--cftl-obese:#e7795c;--cftl-obese-ink:#82301a;--cftl-obese-soft:#fde8e1;
	--cftl-zone:var(--cfc-muted);--cftl-zone-ink:var(--cfc-text);--cftl-zone-soft:var(--cfc-soft);
}
.cftl[data-zone=under]{--cftl-zone:var(--cftl-under);--cftl-zone-ink:var(--cftl-under-ink);--cftl-zone-soft:var(--cftl-under-soft)}
.cftl[data-zone=fit]{--cftl-zone:var(--cftl-fit);--cftl-zone-ink:var(--cftl-fit-ink);--cftl-zone-soft:var(--cftl-fit-soft)}
.cftl[data-zone=normal]{--cftl-zone:var(--cftl-normal);--cftl-zone-ink:var(--cftl-normal-ink);--cftl-zone-soft:var(--cftl-normal-soft)}
.cftl[data-zone=avg]{--cftl-zone:var(--cftl-avg);--cftl-zone-ink:var(--cftl-avg-ink);--cftl-zone-soft:var(--cftl-avg-soft)}
.cftl[data-zone=over]{--cftl-zone:var(--cftl-over);--cftl-zone-ink:var(--cftl-over-ink);--cftl-zone-soft:var(--cftl-over-soft)}
.cftl[data-zone=obese]{--cftl-zone:var(--cftl-obese);--cftl-zone-ink:var(--cftl-obese-ink);--cftl-zone-soft:var(--cftl-obese-soft)}

.cftl .cftl-wrap{max-width:1000px}
.cftl .cftl-head{margin-bottom:22px}
.cftl .cftl-head .cfc-lead{max-width:62ch;font-size:16px}
.cftl a.cftl-back{display:inline-flex;align-items:center;gap:2px;min-height:32px;margin-bottom:4px;font-size:13.5px;font-weight:700;color:var(--cfc-green-ink)}
.cftl a.cftl-back:hover{text-decoration:underline;text-underline-offset:3px}
.cftl-back .cfc-icon{width:16px;height:16px}

/* ---------- The calculator: inputs next to the result ---------- */
.cftl-app{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);gap:20px;align-items:start}
.cftl-card{min-width:0;padding:22px 24px;border:1px solid var(--cfc-border);border-radius:var(--cfc-radius);background:#fff;box-shadow:var(--cfc-shadow)}
.cftl .cftl-card-title{margin-bottom:16px;font-size:15px;font-weight:700;color:var(--cfc-muted)}

/* ---------- Number field: minus, the number, plus; a slider under it ---------- */
.cftl-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:0 14px;align-items:start}
.cftl-fields--pair{grid-template-columns:repeat(2,minmax(0,1fr))}
.cftl-fields>.cftl-field--wide{grid-column:1/-1}
.cftl .cftl-field{margin-bottom:20px}
.cftl .cftl-label-unit{font-weight:400;color:var(--cfc-muted)}
.cftl .cftl-help{font-size:12.5px;line-height:1.4;color:var(--cfc-muted)}
.cftl-stepper{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;gap:8px;align-items:stretch}
.cftl .cftl-step{display:grid;place-items:center;min-height:56px;border-radius:14px;--cfc-b:var(--cfc-soft-strong);--cfc-c:var(--cfc-green-ink);--cfc-bh:#e0edc9;touch-action:manipulation;-webkit-user-select:none;user-select:none}
.cftl .cftl-step:active{transform:scale(.96)}
.cftl .cftl-step .cfc-icon{width:22px;height:22px}
.cftl .cftl-num{min-height:56px;padding:0 6px;border-radius:14px}
.cftl .cftl-num input{flex:1;min-width:0;height:54px;font-size:26px;font-weight:800;text-align:center;direction:ltr;font-variant-numeric:tabular-nums}
/* The box around the number already shows the focus. */
.cftl .cftl-num input:focus-visible{outline:none}
.cftl .cftl-num input::placeholder{font-size:26px;font-weight:700;color:#c3cabd}
/* Two fields in a row leave less room: the buttons move inside the number's box. */
.cftl-fields--pair .cftl-stepper{grid-template-columns:44px minmax(0,1fr) 44px;gap:0;border:1px solid var(--cfc-border-strong);border-radius:14px;background:#fff;overflow:hidden;transition:border-color .15s,box-shadow .15s}
.cftl-fields--pair .cftl-stepper:focus-within{border-color:var(--cfc-progress);box-shadow:0 0 0 3px var(--cfc-soft-strong)}
.cftl-fields--pair .cftl-field.is-invalid .cftl-stepper{border-color:var(--cfc-danger)}
.cftl .cftl-fields--pair .cftl-step{min-height:52px;border-radius:0;--cfc-b:var(--cfc-soft);--cfc-bd:transparent}
.cftl .cftl-fields--pair .cftl-num{min-height:52px;padding:0;border:0;border-radius:0;box-shadow:none}
.cftl .cftl-fields--pair .cftl-num input{height:52px}
.cftl .cftl-fields--pair .cftl-num input,.cftl .cftl-fields--pair .cftl-num input::placeholder{font-size:23px}

.cftl .cftl-range{--p:50%;display:block;height:32px;margin-top:6px;cursor:pointer;touch-action:pan-y}
.cftl .cftl-range::-webkit-slider-runnable-track{height:8px;border-radius:999px;background:linear-gradient(to left,var(--cfc-progress) var(--p),var(--cfc-track) var(--p))}
.cftl .cftl-range::-moz-range-track{height:8px;border-radius:999px;background:linear-gradient(to left,var(--cfc-progress) var(--p),var(--cfc-track) var(--p))}
.cftl .cftl-range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:26px;height:26px;margin-top:-9px;border:3px solid #fff;border-radius:50%;background:var(--cfc-green-ink);box-shadow:0 1px 5px #1c2b0940}
.cftl .cftl-range::-moz-range-thumb{width:20px;height:20px;border:3px solid #fff;border-radius:50%;background:var(--cfc-green-ink);box-shadow:0 1px 5px #1c2b0940}
/* Until a number was typed or the slider moved, the slider only suggests where to start. */
.cftl-field[data-empty="1"] .cftl-range::-webkit-slider-runnable-track{background:var(--cfc-track)}
.cftl-field[data-empty="1"] .cftl-range::-moz-range-track{background:var(--cfc-track)}
.cftl-field[data-empty="1"] .cftl-range::-webkit-slider-thumb{background:#aab5a0}
.cftl-field[data-empty="1"] .cftl-range::-moz-range-thumb{background:#aab5a0}

/* ---------- A choice between a few options ---------- */
.cftl-seg{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px;padding:4px;border-radius:14px;background:var(--cfc-soft)}
.cftl .cftl-seg label{position:relative;cursor:pointer}
.cftl-seg span{display:grid;place-items:center;height:100%;min-height:46px;padding:4px 6px;border-radius:10px;font-size:15px;line-height:1.25;text-align:center;color:var(--cfc-muted);transition:background-color .15s,color .15s}
.cftl-seg input:checked+span{background:#fff;color:var(--cfc-text);font-weight:700;box-shadow:0 1px 4px #1a2b1a14}
.cftl-seg input:focus-visible+span{outline:2px solid var(--cfc-focus);outline-offset:2px}
/* a pace the calorie floor cuts short: a small mark, explained by the line under the options */
.cftl-seg label.is-limited span{position:relative}
.cftl-seg label.is-limited span::after,.cftl-pace-key i{content:"";width:7px;height:7px;border-radius:50%;background:var(--cftl-over)}
.cftl-seg label.is-limited span::after{position:absolute;top:5px;inset-inline-end:5px}
.cftl-pace-key i{display:inline-block;margin-inline-end:6px}
.cftl .cftl-pace-key{margin-top:7px}
.cftl .cftl-field--group{margin-bottom:0}
.cftl .cftl-seg-note{min-height:18px}
.cftl .cftl-seg-note:empty{display:none}

/* A longer list: the phone's own picker, in the kit's field box. */
.cftl-select{position:relative;display:flex;align-items:center;min-height:52px;border:1px solid var(--cfc-border-strong);border-radius:14px;background:#fff;transition:border-color .15s,box-shadow .15s}
.cftl-select:focus-within{border-color:var(--cfc-progress);box-shadow:0 0 0 3px var(--cfc-soft-strong)}
.cftl .cftl-select select{height:50px;padding-inline:14px 42px;font-size:16px;font-weight:700;cursor:pointer}
.cftl .cftl-select select:focus-visible{outline:none}
.cftl-select .cfc-icon{position:absolute;inset-inline-end:14px;top:50%;margin-top:-10px;color:var(--cfc-muted);pointer-events:none}

/* Under the calculator: who it is for, and what happens to the typed details. */
.cftl-notes{display:grid;gap:6px;margin-top:14px}
.cftl .cftl-notes p{font-size:13px;line-height:1.5;color:var(--cfc-muted)}
.cftl .cftl-privacy .cfc-icon{display:inline-block;width:14px;height:14px;margin-inline-end:4px;vertical-align:-2px;color:#93a089}
.cftl .cftl-privacy .cfc-link{display:inline;min-height:0;padding:0;font-size:inherit;text-decoration:underline;text-underline-offset:3px;--cfc-bh:transparent}

/* The result in one line, pinned under the site header while the result card is out of view. */
.cftl .cftl-pill{position:fixed;top:calc(var(--cftl-top,0px) + 8px);left:50%;z-index:40;display:flex;align-items:center;gap:10px;max-width:calc(100vw - 24px);padding:8px 16px;border-radius:999px;transform:translateX(-50%);--cfc-b:#fff;--cfc-bh:#fff;--cfc-c:var(--cftl-zone-ink);--cfc-bd:var(--cftl-zone);box-shadow:0 6px 22px #1c2b0933;font-size:14px;font-weight:700;white-space:nowrap}
.cftl-pill b{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums}
.cftl-pill span{display:inline-flex;align-items:center;gap:6px}
.cftl-pill span::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--cftl-zone)}

/* ---------- Result ---------- */
.cftl-result{position:relative;overflow:hidden}
.cftl-result-top{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;min-height:150px}
.cftl-result-main{min-width:0;padding-bottom:6px}
.cftl .cftl-result-label{font-size:14px;color:var(--cfc-muted)}
.cftl .cftl-result-num{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px;line-height:1}
.cftl .cftl-result-num b{display:inline-block;font-size:76px;font-weight:800;line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--cftl-zone-ink);transition:color .3s}
.cftl[data-state=empty] .cftl-result-num b,.cftl[data-state=error] .cftl-result-num b,.cftl[data-state=blocked] .cftl-result-num b{color:#c9d0c3}
/* Four digits and a unit: a little smaller, so the number and the picture share the line. */
.cftl-result-num--long b{font-size:64px}
.cftl-result-unit{font-size:16px;font-weight:700;line-height:1.3;color:var(--cfc-muted)}
/* A percentage reads left to right: the number, then the sign. */
.cftl-pct{display:inline-flex;align-items:baseline;gap:3px}
.cftl-pct i{font-style:normal;font-size:38px;font-weight:800;line-height:1;color:var(--cftl-zone-ink);transition:color .3s}
.cftl[data-state=empty] .cftl-pct i,.cftl[data-state=error] .cftl-pct i{display:none}
.cftl[data-state=empty] .cftl-result-unit,.cftl[data-state=error] .cftl-result-unit,.cftl[data-state=blocked] .cftl-result-unit{display:none}
.cftl .cftl-chip{display:inline-flex;align-items:center;gap:8px;margin-top:10px;padding:6px 14px;border-radius:999px;background:var(--cftl-zone-soft);color:var(--cftl-zone-ink);font-size:15px;font-weight:700;transition:background-color .3s,color .3s}
.cftl-chip::before{content:"";flex:none;width:9px;height:9px;border-radius:50%;background:var(--cftl-zone)}
.cftl .cftl-result-art{flex:none;width:auto;height:150px;margin-bottom:-2px}
.cftl[data-characters=off] .cftl-result-top{min-height:0}

/* The scale reads in the page's direction, like the sliders: low on the right, high on the left. */
.cftl-scale{margin:18px 0 14px}
.cftl-scale-bar{position:relative;display:flex;gap:3px;height:14px}
.cftl-scale-seg{flex:0 0 auto;border-radius:4px;opacity:.9;transition:flex-basis .35s,opacity .3s}
.cftl-scale-seg:first-child{border-start-start-radius:999px;border-end-start-radius:999px}
/* the last segment: the marker follows it */
.cftl-scale-seg:nth-last-child(2){border-start-end-radius:999px;border-end-end-radius:999px}
.cftl-scale-seg[data-zone=under]{background:var(--cftl-under)}
.cftl-scale-seg[data-zone=fit]{background:var(--cftl-fit)}
.cftl-scale-seg[data-zone=normal]{background:var(--cftl-normal)}
.cftl-scale-seg[data-zone=avg]{background:var(--cftl-avg)}
.cftl-scale-seg[data-zone=over]{background:var(--cftl-over)}
.cftl-scale-seg[data-zone=obese]{background:var(--cftl-obese)}
.cftl[data-state=empty] .cftl-scale-seg,.cftl[data-state=error] .cftl-scale-seg{opacity:.45}
.cftl-scale-marker{position:absolute;top:50%;inset-inline-start:0;width:28px;height:28px;margin-top:-14px;margin-inline-start:-14px;border:4px solid #fff;border-radius:50%;background:var(--cftl-zone-ink);box-shadow:0 2px 8px #1c2b0947;transition:inset-inline-start .55s cubic-bezier(.2,.8,.2,1),background-color .3s}
.cftl-scale-ticks{position:relative;height:20px;margin-top:6px;font-size:12px;color:var(--cfc-muted);font-variant-numeric:tabular-nums}
/* No direction override here: it would flip which side "inline-start" is measured from. */
.cftl-scale-ticks span{position:absolute;top:0;width:44px;margin-inline-start:-22px;text-align:center;transition:inset-inline-start .35s}
.cftl-scale-names{display:flex;gap:3px;font-size:12px;line-height:1.25;color:var(--cfc-muted)}
.cftl-scale-names span{flex:0 0 auto;min-width:0;text-align:center;transition:flex-basis .35s,color .3s}
.cftl-scale-names span.is-on{color:var(--cftl-zone-ink);font-weight:700}
.cftl[data-zone=under] .cftl-scale-names [data-zone=under],
.cftl[data-zone=normal] .cftl-scale-names [data-zone=normal],
.cftl[data-zone=over] .cftl-scale-names [data-zone=over],
.cftl[data-zone=obese] .cftl-scale-names [data-zone=obese]{color:var(--cftl-zone-ink);font-weight:700}

.cftl .cftl-result-text{font-size:17px;line-height:1.5;font-weight:700;color:var(--cfc-text)}
.cftl[data-state=empty] .cftl-result-text{font-size:15px;font-weight:400;color:var(--cfc-muted)}
.cftl[data-state=error] .cftl-result-text,.cftl[data-state=blocked] .cftl-result-text{font-size:15.5px;font-weight:400}
.cftl .cftl-facts{display:grid;gap:8px;margin-top:14px}
.cftl .cftl-facts>div{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:2px 12px;padding:12px 14px;border-radius:14px;background:var(--cfc-soft)}
.cftl .cftl-facts dt{font-size:13.5px;color:var(--cfc-muted)}
.cftl .cftl-facts dd{min-width:0;font-size:17px;font-weight:800;line-height:1.35;font-variant-numeric:tabular-nums}
.cftl .cftl-facts dd small{font-size:13px;font-weight:400;color:var(--cfc-muted)}
.cftl .cftl-advice{margin-top:12px;font-size:14px;line-height:1.55;color:var(--cfc-muted)}
.cftl .cftl-warn{margin-top:12px;padding:10px 14px;border:1px solid #f0dfb8;border-radius:12px;background:#fff8e8;color:#6a4d12;font-size:14px;line-height:1.55}
.cftl .cftl-sub{margin:18px 0 10px;font-size:14px;font-weight:700;color:var(--cfc-muted)}
.cftl-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.cftl .cftl-actions .cfc-button{flex:1 1 150px}
.cftl .cftl-actions a.cfc-button{color:var(--cfc-text)}

/* A new reading of the result: one short beat on the number. */
@keyframes cftl-beat{0%{transform:scale(.94)}55%{transform:scale(1.04)}100%{transform:scale(1)}}
.cftl-result-num b.is-new{animation:cftl-beat .42s cubic-bezier(.2,.8,.2,1)}
@keyframes cftl-float{50%{transform:translateY(-5px)}}
.cftl .cftl-result-art{animation:cftl-float 5s ease-in-out infinite}

/* ---------- BMR: the daily burn at each activity level (also the way to pick one's level) ---------- */
.cftl-level-list{display:grid;gap:6px}
.cftl .cftl-level{position:relative;cursor:pointer}
.cftl-level-body{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 12px;min-height:56px;padding:8px 14px;border:1px solid var(--cfc-border);border-radius:14px;background:#fff;overflow:hidden;transition:border-color .15s}
/* how this level compares with the most active one */
.cftl-level-bar{position:absolute;inset-block:0;inset-inline-start:0;width:var(--w,0%);background:var(--cfc-soft);transition:width .5s cubic-bezier(.2,.8,.2,1),background-color .15s}
.cftl-level-text,.cftl-level-num{position:relative}
.cftl-level-text{display:grid;min-width:0}
.cftl-level-text strong{font-size:15px;line-height:1.35}
.cftl-level-text small{font-size:12.5px;line-height:1.35;color:var(--cfc-muted)}
.cftl-level-num{font-size:17px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.cftl-level-num small{font-size:12px;font-weight:400;color:var(--cfc-muted)}
.cftl-level input:checked+.cftl-level-body{border-color:var(--cfc-progress);box-shadow:0 0 0 1px var(--cfc-progress)}
.cftl-level input:checked+.cftl-level-body .cftl-level-bar{background:var(--cfc-soft-strong)}
.cftl-level input:checked+.cftl-level-body .cftl-level-num{color:var(--cfc-green-ink)}
.cftl-level input:focus-visible+.cftl-level-body{outline:2px solid var(--cfc-focus);outline-offset:2px}

/* ---------- Body fat: where to measure ---------- */
.cftl-measure{display:grid;grid-template-columns:minmax(0,1fr) 128px;gap:0 16px;align-items:start}
.cftl-measure>.cftl-fields{grid-template-columns:minmax(0,1fr)}
.cftl-figure{position:sticky;top:calc(var(--cftl-top,0px) + 16px);margin:0}
.cftl-figure svg{display:block;width:100%;height:auto}
.cftl-figure .cftl-body{fill:var(--cfc-soft-strong);stroke:#cbdcb4;stroke-width:2;stroke-linejoin:round}
.cftl-figure .cftl-tape{fill:none;stroke:#b3bfa6;stroke-width:3;stroke-dasharray:5 5;transition:stroke .2s,stroke-width .2s}
.cftl-figure .cftl-navel{fill:#b3bfa6}
.cftl-figure[data-gender=male] .cftl-only-female,.cftl-figure[data-gender=female] .cftl-only-male{display:none}
.cftl-figure[data-where=neck] .cftl-tape--neck,
.cftl-figure[data-where=waist] .cftl-tape--waist,
.cftl-figure[data-where=hip] .cftl-tape--hip{stroke:var(--cfc-green-ink);stroke-width:4;stroke-dasharray:none}
.cftl .cftl-figure figcaption{margin-top:6px;font-size:12px;line-height:1.4;text-align:center;color:var(--cfc-muted)}

/* ---------- Protein: the recommended range on the grams-per-kg line ---------- */
.cftl-band{margin:18px 0 14px}
.cftl-band-track{position:relative;height:14px;border-radius:999px;background:var(--cfc-track)}
.cftl-band-fill{position:absolute;inset-block:0;inset-inline-start:0;width:0;border-radius:999px;background:var(--cftl-normal);transition:inset-inline-start .45s cubic-bezier(.2,.8,.2,1),width .45s cubic-bezier(.2,.8,.2,1)}
.cftl-band-ends{position:relative;height:20px;margin-top:6px;font-size:12.5px;font-weight:700;color:var(--cftl-normal-ink);font-variant-numeric:tabular-nums}
/* one label, centred under the middle of the band (the page is right to left: start is the right edge) */
.cftl-band-ends span{position:absolute;top:0;inset-inline-start:50%;white-space:nowrap;transform:translateX(50%);transition:inset-inline-start .45s cubic-bezier(.2,.8,.2,1)}
.cftl-band-axis{position:relative;height:18px;font-size:11.5px;color:var(--cfc-muted);font-variant-numeric:tabular-nums}
.cftl-band-axis span{position:absolute;top:0;width:36px;margin-inline-start:-18px;text-align:center}
.cftl .cftl-band-caption{font-size:11.5px;text-align:center;color:var(--cfc-muted)}
.cftl-meals{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 14px;margin-top:14px;padding:12px 14px;border-radius:14px;background:var(--cfc-soft)}
.cftl-meals .cftl-seg{width:150px;background:#fff}
.cftl-meals .cftl-seg span{min-height:38px}
.cftl-meals .cftl-seg input:checked+span{background:var(--cfc-soft-strong);box-shadow:none}
.cftl .cftl-meals-label{font-size:13.5px;color:var(--cfc-muted)}
.cftl .cftl-meals-out{flex:1 1 100%;font-size:16px;font-weight:700}

.cftl-foods{display:grid;grid-template-columns:repeat(auto-fill,minmax(158px,1fr));gap:10px;margin-bottom:12px}
.cftl .cftl-food{display:grid;align-content:start;gap:1px;padding:12px 14px;border:1px solid var(--cfc-border);border-radius:14px;background:#fff}
.cftl .cftl-food b{font-size:22px;font-weight:800;line-height:1.2;color:var(--cfc-green-ink);font-variant-numeric:tabular-nums}
.cftl .cftl-food b small{font-size:13px;font-weight:700}
.cftl .cftl-food strong{font-size:14.5px;line-height:1.35}
.cftl .cftl-food span{font-size:12.5px;line-height:1.4;color:var(--cfc-muted)}

/* ---------- Calorie deficit: what is eaten and what is cut, out of the daily burn ---------- */
.cftl-split{margin:18px 0 14px}
.cftl-split-bar{position:relative;display:flex;height:18px;border-radius:999px;background:var(--cfc-track);overflow:hidden}
.cftl-split-eat{flex:0 0 auto;width:0;background:var(--cftl-normal);transition:width .5s cubic-bezier(.2,.8,.2,1)}
.cftl-split-cut{flex:1 1 auto;background:repeating-linear-gradient(135deg,#d9e6c4 0 6px,#eef4e3 6px 12px)}
.cftl[data-state=empty] .cftl-split-cut,.cftl[data-state=blocked] .cftl-split-cut{background:none}
.cftl-split-floor{position:absolute;inset-block:0;inset-inline-start:0;width:2px;background:var(--cfc-text);opacity:.55;transition:inset-inline-start .5s cubic-bezier(.2,.8,.2,1)}
.cftl-split-legend{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:8px;font-size:12.5px;color:var(--cfc-muted)}
.cftl-split-legend span{display:inline-flex;align-items:center;gap:6px}
.cftl-split-legend i{flex:none;width:12px;height:12px;border-radius:3px}
.cftl-split-legend .is-eat{background:var(--cftl-normal)}
.cftl-split-legend .is-cut{background:repeating-linear-gradient(135deg,#c9dbad 0 3px,#eef4e3 3px 6px)}
.cftl-split-legend .is-floor{width:2px;border-radius:0;background:var(--cfc-text);opacity:.55}
.cftl-split-legend b{color:var(--cfc-text);font-variant-numeric:tabular-nums}

.cftl-chart{margin-top:14px;padding:12px 14px 10px;border:1px solid var(--cfc-border);border-radius:14px}
.cftl-chart svg{display:block;width:100%;height:auto;overflow:visible}
.cftl-chart .cftl-chart-area{fill:var(--cfc-soft)}
.cftl-chart .cftl-chart-line{fill:none;stroke:var(--cfc-progress);stroke-width:3;stroke-linecap:round}
.cftl-chart .cftl-chart-dot{fill:#fff;stroke:var(--cfc-green-ink);stroke-width:3}
.cftl-chart text{font-size:12px;fill:var(--cfc-muted)}
.cftl-chart .cftl-chart-value{font-size:14px;font-weight:800;fill:var(--cfc-text)}
.cftl .cftl-chart-note{margin-top:6px;font-size:12px;line-height:1.45;color:var(--cfc-muted)}

/* ---------- More tools ---------- */
.cftl .cftl-section-title{margin:0 0 12px;font-size:21px;font-weight:800;line-height:1.3;color:var(--cfc-text)}
.cftl .cftl-more{margin-top:34px}
.cftl .cftl-more-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}
.cftl a.cftl-more-link{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr);align-content:center;gap:1px 12px;height:100%;padding:14px 16px;padding-inline-end:40px;border:1px solid var(--cfc-border);border-radius:16px;background:#fff;color:var(--cfc-text);transition:border-color .15s,background-color .15s,transform .15s}
.cftl a.cftl-more-link:hover{border-color:#cfdcbc;background:#fbfdf7;transform:translateY(-1px)}
.cftl-more-icon{grid-row:1/span 2;align-self:center;display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--cfc-soft-strong);color:var(--cfc-green-ink)}
.cftl-more-link strong{font-size:15.5px;line-height:1.35}
.cftl-more-link strong+span{font-size:13px;line-height:1.45;color:var(--cfc-muted)}
.cftl-more-link .cftl-more-go{position:absolute;inset-inline-end:12px;top:50%;margin-top:-10px;color:var(--cfc-green-ink)}
.cftl .cftl-more-all{margin-top:12px;font-size:14px}
.cftl .cftl-more-all a{color:var(--cfc-green-ink);font-weight:700;text-decoration:underline;text-underline-offset:3px}
/* Under a calculator v2: the same page background, no second top margin. */
.cftl--embed{background:var(--cfc-page)}
.cftl--embed .cftl-wrap{padding-top:0}
.cftl--embed .cftl-more{margin-top:0}

/* ---------- The hub ---------- */
.cftl-hub-top{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.cftl .cftl-hub-art{flex:none;width:auto;height:150px;margin-bottom:8px}
.cftl .cftl-hub-group{margin-top:26px}
.cftl .cftl-hub-group:first-of-type{margin-top:4px}
.cftl-hub-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.cftl a.cftl-hub-card{display:grid;grid-template-columns:48px minmax(0,1fr);align-content:start;gap:2px 14px;height:100%;padding:18px;border:1px solid var(--cfc-border);border-radius:var(--cfc-radius);background:#fff;box-shadow:var(--cfc-shadow);color:var(--cfc-text);transition:border-color .15s,transform .15s,box-shadow .15s}
.cftl a.cftl-hub-card:hover{border-color:#cfdcbc;transform:translateY(-2px);box-shadow:0 8px 24px #2837130f}
.cftl-hub-icon{grid-row:1/span 3;display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--cfc-soft-strong);color:var(--cfc-green-ink)}
.cftl-hub-icon .cfc-icon{width:24px;height:24px}
.cftl-hub-card strong{font-size:17px;line-height:1.35}
.cftl-hub-card strong+span{font-size:14px;line-height:1.5;color:var(--cfc-muted)}
.cftl-hub-go{display:inline-flex;align-items:center;gap:2px;margin-top:8px;font-size:13.5px;font-weight:700;color:var(--cfc-green-ink)}
.cftl-hub-go .cfc-icon{width:16px;height:16px}

/* ---------- Explanation ---------- */
.cftl-content{max-width:760px;margin-top:10px}
.cftl-content>section{margin-top:36px}
.cftl .cftl-content p{margin-bottom:12px;font-size:16px;line-height:1.75;color:#38413c}
.cftl .cftl-content a{color:var(--cfc-green-ink);text-decoration:underline;text-underline-offset:3px}
.cftl .cftl-formula{padding:16px 18px;border-radius:14px;background:var(--cfc-soft);font-size:17px;font-weight:700;color:var(--cfc-text)}
.cftl .cftl-formula+.cftl-formula{margin-top:-4px}
.cftl-formula .cftl-name{direction:ltr;unicode-bidi:isolate}
/* one term of a formula stays on one line */
.cftl-nb{white-space:nowrap}
/* Arithmetic is written left to right, also inside a Hebrew sentence. */
.cftl-math{direction:ltr;unicode-bidi:isolate;white-space:nowrap}
/* A formula written in Latin letters and digits reads left to right, whatever surrounds it. */
.cftl .cftl-formula--ltr{direction:ltr;text-align:left;font-size:15px;font-weight:700;overflow-x:auto}
.cftl .cftl-formula--ltr small{display:block;margin-bottom:4px;direction:rtl;text-align:right;font-size:13px;font-weight:400;color:var(--cfc-muted)}
.cftl .cftl-list{display:grid;gap:10px;margin-bottom:12px;padding-inline-start:20px;list-style:disc}
.cftl .cftl-list li{font-size:16px;line-height:1.7;color:#38413c}
.cftl .cftl-list--steps{list-style:decimal}
.cftl .cftl-table{width:100%;margin-bottom:10px;border-collapse:separate;border-spacing:0;border:1px solid var(--cfc-border);border-radius:14px;overflow:hidden;background:#fff}
.cftl .cftl-table th,.cftl .cftl-table td{padding:12px 16px;font-size:15.5px;text-align:start;border-bottom:1px solid var(--cfc-border)}
.cftl .cftl-table th{background:var(--cfc-soft);font-size:13.5px;font-weight:700;color:var(--cfc-muted)}
.cftl .cftl-table tbody tr:last-child td{border-bottom:0}
.cftl .cftl-table td:first-child{font-weight:700;font-variant-numeric:tabular-nums}
.cftl .cftl-table--zones td:first-child{white-space:nowrap}
.cftl-table--zones td:first-child::before{content:"";display:inline-block;width:10px;height:10px;margin-inline-end:10px;border-radius:50%;background:var(--cfc-muted)}
.cftl-table tr[data-zone=under] td:first-child::before{background:var(--cftl-under)}
.cftl-table tr[data-zone=fit] td:first-child::before{background:var(--cftl-fit)}
.cftl-table tr[data-zone=normal] td:first-child::before{background:var(--cftl-normal)}
.cftl-table tr[data-zone=avg] td:first-child::before{background:var(--cftl-avg)}
.cftl-table tr[data-zone=over] td:first-child::before{background:var(--cftl-over)}
.cftl-table tr[data-zone=obese] td:first-child::before{background:var(--cftl-obese)}
.cftl .cftl-table td.cftl-num-cell{font-variant-numeric:tabular-nums;white-space:nowrap}
.cftl .cftl-content .cftl-source,.cftl .cftl-content .cftl-disclaimer{font-size:13.5px;line-height:1.6;color:var(--cfc-muted)}

.cftl-faq-item{border-bottom:1px solid var(--cfc-border)}
.cftl-faq-item summary{position:relative;display:block;padding:16px 0;padding-inline-end:38px;font-size:16.5px;font-weight:700;line-height:1.45;color:var(--cfc-text);cursor:pointer;list-style:none}
.cftl-faq-item summary::-webkit-details-marker{display:none}
.cftl-faq-item summary::after{content:"";position:absolute;inset-inline-end:6px;top:50%;width:10px;height:10px;margin-top:-8px;border-inline-end:2px solid var(--cfc-green-ink);border-bottom:2px solid var(--cfc-green-ink);transform:rotate(45deg);transition:transform .2s}
.cftl-faq-item[open] summary::after{margin-top:-2px;transform:rotate(-135deg)}
.cftl .cftl-faq-answer p{margin-bottom:16px}

.cftl-join{display:flex;align-items:center;justify-content:space-between;gap:18px;max-width:760px;margin-top:36px;padding:20px 22px;border-radius:var(--cfc-radius);background:var(--cfc-soft-strong)}
.cftl-join>div{display:grid;gap:4px;min-width:0}
.cftl-join strong{font-size:17px;line-height:1.4}
.cftl-join span{font-size:14px;line-height:1.5;color:#4b5a3d}
.cftl .cftl-join .cfc-button{flex:none}

/* ---------- Narrow screens ---------- */
/* On a phone the inputs are kept short (two fields side by side, the buttons inside the number's
   box), so the result is on screen, or one short scroll away. */
@media(max-width:860px){
	.cftl .cftl-head{margin-bottom:14px}
	.cftl .cftl-head .cfc-lead{font-size:14.5px;line-height:1.5}
	.cftl-app{grid-template-columns:minmax(0,1fr);gap:12px}
	.cftl-card{padding:14px 14px 16px}
	.cftl .cftl-card-title{display:none}
	.cftl-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
	.cftl .cftl-field{gap:5px;margin-bottom:10px}
	.cftl-stepper,.cftl-fields--pair .cftl-stepper{grid-template-columns:40px minmax(0,1fr) 40px;gap:0;border:1px solid var(--cfc-border-strong);border-radius:14px;background:#fff;overflow:hidden;transition:border-color .15s,box-shadow .15s}
	.cftl-stepper:focus-within{border-color:var(--cfc-progress);box-shadow:0 0 0 3px var(--cfc-soft-strong)}
	.cftl-field.is-invalid .cftl-stepper{border-color:var(--cfc-danger)}
	.cftl .cftl-step,.cftl .cftl-fields--pair .cftl-step{min-height:50px;border-radius:0;--cfc-b:var(--cfc-soft);--cfc-bd:transparent}
	.cftl .cftl-num,.cftl .cftl-fields--pair .cftl-num{min-height:50px;padding:0;border:0;border-radius:0;box-shadow:none}
	.cftl .cftl-num input,.cftl .cftl-fields--pair .cftl-num input{height:50px}
	.cftl .cftl-num input,.cftl .cftl-num input::placeholder,.cftl .cftl-fields--pair .cftl-num input,.cftl .cftl-fields--pair .cftl-num input::placeholder{font-size:23px}
	.cftl .cftl-range{height:28px;margin-top:2px}
	.cftl-seg span{min-height:42px;font-size:14.5px}
	.cftl-result-top{min-height:112px}
	.cftl .cftl-result-art{height:112px}
	.cftl .cftl-result-num b{font-size:60px}
	.cftl-result-num--long b{font-size:50px}
	.cftl-pct i{font-size:30px}
	.cftl .cftl-chip{margin-top:6px;font-size:14.5px}
	.cftl-scale,.cftl-band,.cftl-split{margin:14px 0 12px}
	.cftl .cftl-result-text{font-size:16px}
	.cftl .cftl-section-title{font-size:19px}
	.cftl-content>section{margin-top:30px}
	.cftl-join{flex-direction:column;align-items:stretch;text-align:start}
	.cftl .cftl-actions .cfc-button{padding-inline:10px;font-size:13.5px}
	.cftl-level-body{padding-inline:12px}
	.cftl-level-num small{display:none}
	.cftl-measure{grid-template-columns:minmax(0,1fr) 104px;gap:0 12px}
	.cftl .cftl-hub-art{height:110px}
	.cftl .cftl-table th,.cftl .cftl-table td{padding:10px 12px;font-size:14.5px}
}
@media(max-width:350px){
	.cftl-fields{gap:0 8px}
	.cftl-stepper,.cftl-fields--pair .cftl-stepper{grid-template-columns:34px minmax(0,1fr) 34px}
	.cftl .cftl-num input,.cftl .cftl-num input::placeholder,.cftl .cftl-fields--pair .cftl-num input,.cftl .cftl-fields--pair .cftl-num input::placeholder{font-size:20px}
	.cftl .cftl-result-num b{font-size:52px}
	.cftl-result-num--long b{font-size:42px}
	.cftl .cftl-result-art{height:96px}
	.cftl-result-top{min-height:96px}
	.cftl-scale-names{font-size:11px}
	.cftl-measure{grid-template-columns:minmax(0,1fr) 88px;gap:0 8px}
	.cftl-seg span{font-size:13.5px;padding:4px 3px}
	/* kept for screen readers; two labels side by side have no room for it */
	.cftl-fields--pair .cftl-label-opt{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
}
@media(min-width:861px){
	/* Wide screens always show the result next to the inputs. */
	.cftl .cftl-pill{display:none}
}

@media(prefers-reduced-motion:reduce){
	.cftl *,.cftl *::before,.cftl *::after{animation:none!important;transition:none!important}
}
