/* ==========================================================================
   Flobotics v2 — tools layer: ROI calculator, quiz, search, 404.
   Loaded only on those routes (routes.json "v2css"). Builds on site.css.
   ========================================================================== */

/* ---------------- Focused pages (no global header/footer) ---------------- */
.solo-page { min-height: 100vh; display: flex; flex-direction: column; }
.solo-main { flex: 1 0 auto; padding-block: clamp(28px, 5vw, 72px); }
.tbar { background: var(--bg); border-bottom: 1px solid var(--line-strong); }
.tbar .container { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tbar-logo { display: inline-flex; line-height: 0; flex: none; }
.tbar-logo img { display: block; width: 160px; height: auto; }
.tbar .btn-text { font-size: 14px; white-space: nowrap; }
.tbar .btn-text:hover .arr { transform: translateX(-3px); }
.solo-foot { border-top: 1px solid var(--line); background: var(--bg); }
.solo-foot .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; padding-block: 18px; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11.5px; color: var(--muted); }
.solo-foot .btn-text { font-family: var(--f-body); font-stretch: 100%; font-size: 14px; color: var(--ink); }
.solo-foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.solo-foot-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- ROI calculator ---------------- */
.roi-basis { list-style: none; display: grid; border-top: 2px solid var(--ink); }
.roi-basis li { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.roi-basis strong { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: 19px; line-height: 1.25; }

.roi-tool { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
@media (max-width: 980px) { .roi-tool { grid-template-columns: minmax(0, 1fr); } }

.roi-form { background: var(--surface); border: 1.5px solid var(--ink); padding: clamp(20px, 3vw, 34px); display: grid; gap: 30px; min-width: 0; }
.roi-head, .rr-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.roi-head h2, .rr-head h2 { font-family: var(--f-display); font-stretch: 118%; font-weight: 740; font-size: clamp(22px, 2vw, 26px); line-height: 1.1; letter-spacing: -.02em; }

.roi-field { display: grid; gap: 8px; min-width: 0; border: 0; margin: 0; padding: 0; }
fieldset.roi-field > legend { padding: 0; margin-bottom: 8px; }
.roi-q { font-family: var(--f-display); font-stretch: 106%; font-size: 16px; font-weight: 650; line-height: 1.35; color: var(--ink); }
.roi-q-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.roi-hint { font-size: 14px; line-height: 1.45; color: var(--muted); }
.roi-val { flex: none; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 14px; font-weight: 600; line-height: 1.2; padding: 6px 10px; background: var(--c-graphite); color: #F4F6F5; font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: center; }
.roi-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 24px; }
@media (max-width: 620px) { .roi-pair { grid-template-columns: minmax(0, 1fr); } }

/* Segmented radio buttons */
.roi-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-strong); margin-top: 4px; }
.roi-seg.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.roi-seg label { position: relative; display: block; font-size: 15px; font-weight: 600; cursor: pointer; }
.roi-seg label + label { border-left: 1px solid var(--line-strong); }
.roi-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.roi-seg span { display: block; padding: 12px 10px; text-align: center; background: var(--surface); color: var(--ink-2); transition: background var(--t-fast), color var(--t-fast); }
.roi-seg label:hover span { background: var(--surface-2); color: var(--ink); }
.roi-seg input:checked + span { background: var(--ink); color: var(--bg); }
.roi-seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; position: relative; z-index: 1; }

/* Range sliders; --progress is set by site.mjs on .form_range_wrap */
.roi-range { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; padding: 0; margin: 2px 0 0; border: 0; background: transparent; cursor: pointer; }
.roi-range:hover, .roi-range:focus { border: 0; box-shadow: none; }
.roi-range:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.roi-range::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(to right, var(--ink) 0 calc(var(--progress, .5) * 100%), var(--line) calc(var(--progress, .5) * 100%) 100%); }
.roi-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -8px; background: var(--c-yellow); border: 2px solid var(--c-graphite); border-radius: 0; }
.roi-range::-moz-range-track { height: 6px; background: var(--line); }
.roi-range::-moz-range-progress { height: 6px; background: var(--ink); }
.roi-range::-moz-range-thumb { width: 18px; height: 18px; background: var(--c-yellow); border: 2px solid var(--c-graphite); border-radius: 0; }
.roi-scale { display: flex; justify-content: space-between; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; letter-spacing: .04em; color: var(--muted); }

.roi-hours { display: flex; max-width: 240px; margin-top: 4px; }
.roi-hours input { flex: 1 1 auto; min-width: 0; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 16px; font-weight: 600; background: var(--surface); }
.roi-hours span { display: grid; place-items: center; padding: 0 14px; border: 1px solid var(--line-strong); border-left: 0; background: var(--surface-2); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Results console */
.roi-results_wrap { padding: clamp(20px, 3vw, 34px); display: grid; gap: 22px; min-width: 0; position: sticky; top: calc(var(--nav-h) + 24px); border: 1.5px solid var(--c-graphite); }
@media (max-width: 980px) { .roi-results_wrap { position: static; } }
.roi-results_wrap .rr-head { border-bottom-color: var(--line-strong); }
.roi-results_wrap .rr-head h2 { color: #F4F6F5; }
.rr-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rr-table th, .rr-table td { padding: 14px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rr-table th:first-child { text-align: left; padding-left: 0; }
.rr-table td:last-child, .rr-table th:last-child { padding-right: 0; }
.rr-table thead th { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 0; }
.rr-table tbody th { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rr-table td { font-family: var(--f-mono); font-stretch: 87.5%; font-size: clamp(13px, 1.15vw, 15.5px); font-weight: 500; color: var(--ink); }
.rr-table td.is-roi { color: var(--c-yellow); font-weight: 700; }
.rr-note { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; }
.rr-note::before { content: ""; width: 10px; height: 10px; margin-top: 6px; background: var(--c-yellow); }
.rr-cta { display: grid; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.rr-cta .btn { justify-self: start; }
.rr-promising { display: grid; gap: 8px; }
.rr-promising h3 { font-family: var(--f-display); font-stretch: 118%; font-weight: 740; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.08; letter-spacing: -.02em; color: #F4F6F5; }
.rr-promising p { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.roi-results_wrap[data-roi-promising="false"] .rr-promising { display: none; }
.roi-results_wrap[data-roi-promising="true"] { border-color: var(--c-yellow); box-shadow: 8px 8px 0 var(--c-yellow); }

/* Small screens: each year becomes a 2x2 block */
@media (max-width: 560px) {
  .rr-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rr-table, .rr-table tbody { display: block; }
  .rr-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .rr-table tbody th { grid-column: 1 / -1; padding: 0; border: 0; color: var(--ink); }
  .rr-table td { display: grid; gap: 2px; padding: 0; border: 0; text-align: left; font-size: 16px; }
  .rr-table td::before { content: attr(data-label); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
}

/* ---------------- Quiz ---------------- */
.quiz-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
@media (max-width: 980px) { .quiz-layout { grid-template-columns: minmax(0, 1fr); } }
.quiz-card { min-width: 0; }
.quiz_swiper { background: var(--surface); border: 1.5px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: clamp(22px, 3.4vw, 44px); min-height: clamp(420px, 52vh, 560px); display: grid; scroll-margin-top: 80px; }
.qz-slide { display: grid; gap: 22px; align-content: start; min-width: 0; }
.qz-slide[hidden] { display: none; }
.qz-h1 { font-family: var(--f-head); font-stretch: var(--head-stretch); font-weight: var(--head-weight); letter-spacing: -.035em; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.0; max-width: 18ch; }
.qz-intro .lead { max-width: 48ch; }
.qz-preview { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.qz-preview li { display: grid; gap: 4px; padding: 14px 14px 4px 0; font-weight: 600; font-size: 15px; line-height: 1.35; }
.qz-preview li + li { padding-left: 14px; border-left: 1px solid var(--line); }
@media (max-width: 560px) { .qz-preview { grid-template-columns: minmax(0, 1fr); } .qz-preview li, .qz-preview li + li { padding: 12px 0; border-left: 0; border-bottom: 1px solid var(--line); } }
.qz-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); margin-top: 4px; }
.qz-nav .btn:only-child { margin-left: auto; }
.qz-nav-end { justify-content: flex-start; }
.btn.is-disabled, .btn[aria-disabled="true"] { opacity: .35; cursor: not-allowed; transform: none; }
.btn.is-disabled:hover .arr { transform: none; }
.qz-progress { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.qz-bar { display: grid; grid-template-columns: repeat(3, 28px); gap: 4px; }
.qz-bar i { height: 6px; background: var(--line); }
.qz-progress.s1 .qz-bar i:nth-child(-n+1), .qz-progress.s2 .qz-bar i:nth-child(-n+2), .qz-progress.s3 .qz-bar i:nth-child(-n+3) { background: var(--ink); }
.qz-progress.s3 .qz-bar i:nth-child(3) { background: var(--c-yellow); outline: 1px solid var(--ink); }
.qz-options { border: 0; margin: 0; padding: 0; display: grid; min-width: 0; }
.qz-options legend { padding: 0; margin-bottom: 18px; }
.qz-q { font-family: var(--f-head); font-stretch: 118%; font-weight: 740; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -.025em; max-width: 26ch; }
.qz-opt { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 16px; font-weight: 550; line-height: 1.35; cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast); }
.qz-opt + .qz-opt { margin-top: -1px; }
.qz-opt:hover { background: var(--surface-2); position: relative; }
.qz-opt input { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0; padding: 0; border: 1.5px solid var(--ink); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.qz-opt input::after { content: ""; width: 10px; height: 10px; background: var(--ink); transform: scale(0); transition: transform var(--t-fast) var(--ease); }
.qz-opt input:checked { background: var(--c-yellow); }
.qz-opt input:checked::after { transform: scale(1); }
.qz-opt input:focus { box-shadow: none; }
.qz-opt input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.qz-opt:has(input:checked) { border-color: var(--ink); background: var(--surface-2); position: relative; z-index: 1; box-shadow: inset 3px 0 0 var(--ink); }
.qz-result-h { font-family: var(--f-head); font-stretch: 118%; font-weight: 740; font-size: clamp(26px, 3vw, 40px); line-height: 1.08; letter-spacing: -.025em; }
.qz-result-name { display: block; margin-top: 8px; background-image: var(--marker); background-repeat: no-repeat; background-size: 100% 100%; color: var(--on-yellow); width: fit-content; max-width: 100%; padding-inline: .08em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.qr-media { border: 1px solid var(--line); background: var(--surface-2); }
.qr-img { display: none; width: 100%; height: auto; max-height: 340px; object-fit: cover; }
.qr-link { display: none; }
.qz-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.quiz_swiper[data-result="Eligibility Check Automation"] .r-elig,
.quiz_swiper[data-result="Prior Authorization Agent"] .r-prior,
.quiz_swiper[data-result="Claims Management Agent"] .r-claims,
.quiz_swiper[data-result="Denials Management (Denials Hunter)"] .r-denials,
.quiz_swiper[data-result="RCM Custom Automation"] .r-custom { display: block; }
.quiz_swiper[data-result="Eligibility Check Automation"] .qr-link.r-elig,
.quiz_swiper[data-result="Prior Authorization Agent"] .qr-link.r-prior,
.quiz_swiper[data-result="Claims Management Agent"] .qr-link.r-claims,
.quiz_swiper[data-result="Denials Management (Denials Hunter)"] .qr-link.r-denials,
.quiz_swiper[data-result="RCM Custom Automation"] .qr-link.r-custom { display: inline-flex; }
.quiz_swiper[data-result=""] .qr-media { display: none; }
.qz-restart { background: none; border: 0; padding: 0 0 2px; border-bottom: 1.5px solid currentColor; font-weight: 600; font-size: 14.5px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; color: var(--ink-2); }
.qz-restart:hover { color: var(--ink); }
[data-quiz-error] { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; padding: 10px 12px; background: var(--yellow-soft); border: 1px solid var(--ink); }

.qz-side { display: grid; gap: 14px; min-width: 0; }
.qz-side > h2 { margin-bottom: 2px; }
.qz-side .quote { padding: 20px 22px; gap: 14px; }
.qz-side .quote blockquote { font-size: 15.5px; line-height: 1.5; }
.qz-side .quote blockquote::before { font-size: 44px; }
.qz-side .quote footer { justify-content: space-between; }
.qz-side .quote footer strong { font-size: 14.5px; }
.qz-side .quote footer span { font-size: 13px; }
.qz-side .quote .q-logo { width: auto; height: 22px; max-width: 110px; object-fit: contain; object-position: right center; filter: grayscale(1); opacity: .75; }

/* ---------------- Search ---------------- */
.search-hero { border-bottom: 0; min-height: 60vh; }
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label label" "input button" "results results"; gap: 10px 0; margin-top: 32px; }
.search-form > label { grid-area: label; }
.search-form input[type="search"] { grid-area: input; background: var(--surface); border: 1.5px solid var(--ink); font-size: 18px; padding: 16px 16px; min-width: 0; }
.search-form input[type="search"]:focus { box-shadow: inset 0 0 0 1px var(--ink); }
.search-form > .btn { grid-area: button; border-width: 1.5px; padding-inline: 22px; }
.search-form .migration-search-results { grid-area: results; margin-top: 18px; }
.search-browse { display: grid; gap: 10px; margin-top: 36px; }

/* ---------------- 404 ---------------- */
.nf-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(12px, 3vw, 40px); }
@media (max-width: 860px) { .nf-grid { grid-template-columns: minmax(0, 1fr); } }
.nf .h1 { margin-top: 18px; }
.nf .lead { margin-top: 22px; }
.nf .row { margin-top: 28px; }
.nf-links { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.nf-code { display: grid; justify-items: start; gap: 8px; background: var(--surface); border: 1.5px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: clamp(20px, 3vw, 36px); }
.nf-code span { font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: clamp(88px, 13vw, 180px); line-height: .85; letter-spacing: -.06em; }
.nf-code small { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-top: 2px solid var(--c-yellow); padding-top: 8px; }
@media (max-width: 860px) { .nf-code { display: none; } }
@media (min-width: 981px) { .quiz-card { position: sticky; top: 24px; } }
