/* Styles for the interactive tools on the /weight-loss pages. Loaded with seo.css. */

.tool-result .fine { color: #b5f0c7; }
.tool-result .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.tool-result .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: #fff; }
.tool-panel .hint { font-size: 0.85rem; color: var(--muted-ink); margin: 6px 0 0; }
.tool-panel .seg label { flex: 1 1 0; }

/* ---- BMI gauge ---- */
.gauge { max-width: 280px; margin: 4px auto 10px; }
.gauge svg { width: 100%; height: auto; display: block; overflow: visible; }
.gauge path { fill: none; stroke-width: 18; }
.gauge .g-under { stroke: #7cc4f5; }
.gauge .g-healthy { stroke: #3ecf6e; }
.gauge .g-over { stroke: #f7c948; }
.gauge .g-obesity { stroke: #f2845c; }
.gauge .g-needle { transform-origin: 110px 110px; transform-box: view-box; transition: transform 0.6s ease; }
.gauge .g-needle line { stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.gauge .g-needle circle { fill: #fff; }
.gauge-labels { display: grid; grid-template-columns: repeat(4, 1fr); font-size: 0.72rem; color: #b5f0c7; text-align: center; margin-top: 6px; }
.bmi-cat { font-family: var(--head); font-size: 1.3rem; font-weight: 800; margin: 6px 0 0; color: #b5f0c7; }
[data-tool="bmi"] .tool-result { text-align: center; }
[data-tool="bmi"] .tool-result .rows, [data-tool="bmi"] .tool-result .status, [data-tool="bmi"] .tool-result .offer { text-align: left; }

/* ---- Food noise quiz ---- */
.fn { max-width: 820px; margin: 0 auto; }
.fn-progress { font-weight: 600; color: var(--muted-ink); margin: 0 0 8px; }
.fn-bar { height: 8px; background: #eef2f6; border-radius: 500px; overflow: hidden; margin-bottom: 20px; }
.fn-bar span { display: block; height: 100%; width: 0; background: var(--green); border-radius: 500px; transition: width 0.25s ease; }
.fn-prompt { color: var(--muted-ink); margin: 0 0 6px; font-size: 0.95rem; }
.fn-statement { font-size: clamp(1.2rem, 3.6vw, 1.55rem); margin-bottom: 18px; min-height: 3.6em; }
.fn-statement:focus { outline: none; }
.fn-options { display: grid; gap: 10px; margin-bottom: 18px; }
.fn-option { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 16px; border: 1.5px solid #d0d5dd; border-radius: var(--radius-sm); background: #fff; cursor: pointer; font-size: 1rem; font-weight: 500; }
.fn-option:hover { border-color: var(--green); }
.fn-option[aria-checked="true"] { border-color: var(--green); background: var(--mint); font-weight: 600; }
.fn-num { flex: 0 0 28px; height: 28px; border-radius: 50%; background: #eef2f6; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: var(--muted-ink); }
.fn-option[aria-checked="true"] .fn-num { background: var(--green); color: #fff; }
.fn-verdict { font-family: var(--head); font-size: clamp(1.25rem, 3.6vw, 1.6rem); font-weight: 800; color: var(--green-ink); line-height: 1.25; }
.fn h3 { margin-top: 1.6em; }
.fn-dots { display: grid; grid-template-columns: repeat(20, 1fr); gap: 5px; max-width: 520px; }
.fn-dot { aspect-ratio: 1; border-radius: 50%; }
.fn-less { background: var(--green); }
.fn-more { background: #d0d5dd; }
.fn-key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-left: 10px; }
.fn-key:first-child { margin-left: 0; }
.fn-key-less { background: var(--green); }
.fn-key-more { background: #d0d5dd; }
.fn-strip { position: relative; height: 34px; background: #eef2f6; border-radius: 500px; margin: 44px 0 6px; }
.fn-band80, .fn-band50 { position: absolute; top: 0; bottom: 0; }
.fn-band80 { background: #cfeeda; }
.fn-band50 { background: #86d4a2; }
.fn-avg { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; background: var(--green-ink); }
.fn-you { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #fff; border: 5px solid #e4572e; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.fn-you span { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); background: #e4572e; color: #fff; font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 500px; white-space: nowrap; }
.fn-strip-scale { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted-ink); padding: 0 2px; }
.fn-subs { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 14px; }
.fn-subs li { margin: 0; }
.fn-sub-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.fn-sub-head span { color: var(--muted-ink); font-size: 0.88rem; }
.fn-sub-head b { margin-left: auto; font-family: var(--head); font-size: 1.1rem; }
.fn-sub-bar { height: 10px; background: #eef2f6; border-radius: 500px; overflow: hidden; margin-top: 6px; }
.fn-sub-bar span { display: block; height: 100%; background: var(--green); border-radius: 500px; }

/* ---- Knee relief calculator ---- */
.kn-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.kn-value { font-family: var(--head); font-size: 2.6rem; font-weight: 800; color: var(--green-ink); margin: 0; line-height: 1; }
.kn-value span + span { font-size: 1.1rem; color: var(--muted-ink); }
.kn-slider-row { display: flex; align-items: center; gap: 12px; }
.kn-step { flex: 0 0 44px; height: 44px; border-radius: 50%; border: 1.5px solid #d0d5dd; background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--green-ink); }
.kn-step:hover { border-color: var(--green); }
.kn-track { position: relative; flex: 1 1 auto; height: 44px; cursor: pointer; touch-action: none; }
.kn-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 10px; margin-top: -5px; background: #eef2f6; border-radius: 500px; }
.kn-fill { position: absolute; left: 0; top: 50%; height: 10px; margin-top: -5px; background: var(--green); border-radius: 500px; }
.kn-thumb { position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #fff; border: 3px solid var(--green); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.kn-ticks { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted-ink); padding: 0 56px; margin: 2px 0 10px; }
.kn-trucks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; min-height: 18px; }
.kn-truck svg { display: block; fill: #b5f0c7; }
.kn-truck-part { position: relative; }
.kn-truck-part svg { opacity: 0.25; }
.kn-truck-part::after { content: ""; position: absolute; inset: 0; width: var(--part); background: #b5f0c7; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'%3E%3Crect x='1' y='3' width='30' height='13' rx='2'/%3E%3Cpath d='M32 8h8l6 5v3H32z'/%3E%3Ccircle cx='9' cy='19' r='3.4'/%3E%3Ccircle cx='24' cy='19' r='3.4'/%3E%3Ccircle cx='39' cy='19' r='3.4'/%3E%3C/svg%3E") left / 36px 18px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'%3E%3Crect x='1' y='3' width='30' height='13' rx='2'/%3E%3Cpath d='M32 8h8l6 5v3H32z'/%3E%3Ccircle cx='9' cy='19' r='3.4'/%3E%3Ccircle cx='24' cy='19' r='3.4'/%3E%3Ccircle cx='39' cy='19' r='3.4'/%3E%3C/svg%3E") left / 36px 18px no-repeat; }
.kn-more { font-size: 0.85rem; color: #b5f0c7; }

/* ---- Supply tracker ---- */
.su-summary { font-family: var(--head); font-size: 1.2rem; font-weight: 800; color: var(--green-ink); margin: 0 0 4px; }
.su-grid { display: grid; gap: 14px; margin: 18px 0; }
@media (min-width: 640px) { .su-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .su-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.su-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; background: #fff; min-width: 0; }
.su-card h3 { margin: 0; color: var(--ink); }
.su-generic { font-family: var(--body); font-size: 0.85rem; font-weight: 500; color: var(--muted-ink); }
.su-use { font-size: 0.85rem; color: var(--muted-ink); margin: 2px 0 10px; }
.su-doses { list-style: none; padding: 0; margin: 12px 0 0; }
.su-doses li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; margin: 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.su-dose { font-weight: 600; white-space: nowrap; }
.su-pill { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 500px; white-space: nowrap; }
.su-ok { background: #dff5e6; color: #05602a; }
.su-short { background: #fde3e0; color: #912018; }
.su-disc { background: #fff0cc; color: #7a4a00; }
.su-card .fine { margin: 12px 0 0; }
.su-other { grid-column: 1 / -1; margin: 0; }

/* ---- Pipeline tracker ---- */
.pl-share { display: flex; height: 14px; border-radius: 500px; overflow: hidden; margin: 12px 0 10px; background: #eef2f6; }
.pl-legend { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.85rem; }
.pl-legend li { margin: 0; display: flex; align-items: center; gap: 6px; }
.pl-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.pl-approved { background: #05803a; }
.pl-filed { background: #2e90fa; }
.pl-p3 { background: #7a5af8; }
.pl-p2 { background: #f79009; }
.pl-p1 { background: #98a2b3; }
.pl-disc { background: #d0d5dd; }
.pl-controls { display: grid; gap: 12px; }
@media (min-width: 720px) { .pl-controls { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.pl-controls .field { margin-bottom: 0; }
.pl-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.pl-chip { border: 1.5px solid #d0d5dd; background: #fff; border-radius: 500px; padding: 8px 16px; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.pl-chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.pl-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; padding: 8px 4px; cursor: pointer; }
.pl-check input { width: 18px; height: 18px; accent-color: var(--green); }
.pl-count { font-size: 0.9rem; color: var(--muted-ink); margin: 14px 0 6px; }
.pl-group { margin: 22px 0 0; }
.pl-group span { font-family: var(--body); font-weight: 500; font-size: 0.9rem; color: var(--muted-ink); }
.pl-group + .table-wrap { margin-top: 10px; }
.pl-brands { display: block; font-family: var(--body); font-weight: 400; font-size: 0.8rem; color: var(--muted-ink); }
.pl-pill { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 500px; color: #fff; white-space: nowrap; }
.pl-pill.pl-disc { color: #344054; }
.pl-pill.pl-p1 { color: #fff; background: #667085; }
.pl-cell { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pl-cell li { margin: 0; padding: 5px 9px; border-radius: 8px; font-size: 0.85rem; background: #f2f4f7; border-left: 4px solid #98a2b3; }
.pl-cell li.pl-approved { border-left-color: #05803a; }
.pl-cell li.pl-filed { border-left-color: #2e90fa; }
.pl-cell li.pl-p3 { border-left-color: #7a5af8; }
.pl-cell li.pl-p2 { border-left-color: #f79009; }
.pl-cell li.pl-p1 { border-left-color: #98a2b3; }
.pl-cell a { color: var(--ink); text-decoration: none; font-weight: 600; }
.pl-cell a:hover { text-decoration: underline; }
.pl-none { color: #98a2b3; }
.pl-empty { padding: 24px; text-align: center; color: var(--muted-ink); background: var(--gray-band); border-radius: var(--radius-sm); }
.pl-grid table { table-layout: fixed; }
#pl-panel:focus-visible { outline-offset: 6px; }
@media (max-width: 719px) {
  .pl-grid.stack td[data-label]::before { display: block; margin-bottom: 4px; }
}

/* ---- Insurance checker panel ---- */
.ins .steps > li { background: var(--mint-card); border: 0; }

/* ---- Units converter (inside a guide) ---- */
.units-tool { margin: 1.4em 0; }
@media (min-width: 992px) { .guide-body .units-tool { grid-template-columns: 1fr 1fr; } }
.units-tool h3 { margin-top: 0; }
