/* ============================================================================
   F18  JOB PROFIT WITH INSTALLER LABOUR AND YOUR HOURS
   Tokens only, from app.css, so both themes work without a second set of
   colours. The phone rules sit at the end, at the width app.css already folds
   at (700px: tables stack into labelled lines).
   ============================================================================ */

/* ------------------------------------------- the job: Profit, everything counted */
.f18-h{margin-top:18px}
.f18-profit{border:1px solid var(--line);border-radius:var(--r);background:var(--panel-2);overflow:hidden;margin:0 0 8px}
.f18-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:8px 12px;
  border-top:1px solid var(--line);font-size:13px;color:var(--ink);line-height:1.4}
.f18-row:first-child{border-top:0}
.f18-row > span{min-width:0}
.f18-row small{display:block;font-size:11.5px;color:var(--ink-3)}
.f18-row b{flex:none;font-weight:600;white-space:nowrap}
.f18-row .f18-g{font-style:normal;font-size:10.5px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;
  color:var(--ink-3);margin-right:4px}
.f18-rev b{color:var(--ink)}
.f18-tot{background:var(--panel-3);font-weight:700}
.f18-tot b{font-size:14px;font-weight:700}
.f18-none span{color:var(--ink-2)}
.f18-neg{color:var(--crit)}
.f18-thin{color:var(--warn)}
.f18-miss{margin:2px 0 6px;color:var(--ink-2)}

/* ------------------------------------------------------------- Your hours */
.f18-hours{margin:0 0 12px}
.f18-hours .tw{margin-bottom:6px}
.f18-rm{margin-left:6px}
.f18-form{margin:10px 0 0;padding:12px;border:1px solid var(--line);border-radius:var(--r);background:var(--panel-2)}
.f18-form[hidden]{display:none}
.f18-hours [hidden]{display:none !important}
.f18-fl{display:block;margin:8px 0 6px;font-size:12px;font-weight:600;color:var(--ink-2)}
.f18-fl:first-child{margin-top:0}
.f18-chips{display:flex;flex-wrap:wrap;gap:6px}
.f18-chips button{min-width:44px;min-height:38px;padding:6px 10px;border-radius:var(--r);border:1px solid var(--line);
  background:var(--panel);color:var(--ink);font:inherit;font-size:13px;cursor:pointer}
.f18-chips button:hover{background:var(--panel-3)}
.f18-chips button.on{background:var(--lime-fill);color:var(--on-lime);border-color:transparent;font-weight:700}
.f18-in{min-height:38px;padding:6px 10px;border-radius:var(--r);border:1px solid var(--line);background:var(--panel);
  color:var(--ink);font:inherit;font-size:13px;box-sizing:border-box}
.f18-num{width:84px}
.f18-two{display:grid;grid-template-columns:150px 1fr;gap:10px;margin-top:4px}
.f18-two label{display:block;min-width:0}
.f18-two .f18-in{width:100%}
.f18-err{margin:8px 0 0;font-size:12.5px;color:var(--crit)}
.f18-form .btnrow{display:flex;gap:8px;margin-top:12px}

/* --------------------------------------------------- Money: Installation profit */
.f18-inst > .sec-h{margin-top:26px}
.f18-tb{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px}
.f18-sum{display:flex;flex-wrap:wrap;gap:6px 18px;margin:8px 0 4px;font-size:12.5px;color:var(--ink-2)}
.f18-sum b{color:var(--ink)}
/* Installs with no cost yet sit apart from the totals, quieter, so the eye
   reads the costed profit first and these as "still to do". */
.f18-later{margin:16px 0 0}
.f18-later-h{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--ink)}
.f18-later-h span{display:block;margin-top:2px;font-weight:400;font-size:12.5px;color:var(--ink-2)}

/* ------------------------------------------------------ Money: the folding */
.f18-fold{border-top:1px solid var(--line);margin:0}
.f18-fold.always{border-top:0}
.f18-fold .sec-h.f18-fold-h{margin:0;padding:14px 0;cursor:pointer;align-items:center}
.f18-fold.always .sec-h.f18-fold-h{cursor:default;padding-top:22px}
.f18-fold.open .sec-h.f18-fold-h{padding-bottom:10px}
.f18-fold-b{padding:0 0 18px}
.f18-fold-b[hidden]{display:none}
.f18-fold-b > .sec-h:first-child{margin-top:0}
.f18-chev{margin-left:auto;flex:none;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;
  border-radius:var(--r);border:1px solid var(--line);background:transparent;color:var(--ink-2);cursor:pointer}
.f18-chev:hover{background:var(--panel-2);color:var(--ink)}
.f18-chev svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;
  transition:transform .15s ease}
.f18-fold.open .f18-chev svg{transform:rotate(180deg)}
@media (prefers-reduced-motion: reduce){ .f18-chev svg{transition:none} }

/* ---------------------------------------------------------------- phone */
@media(max-width:700px){
  .f18-row{padding:8px 10px;font-size:12.5px}
  .f18-two{grid-template-columns:1fr}
  .f18-chips button{min-height:42px;min-width:48px}
  .f18-form .btnrow .btn{flex:1 1 0;min-height:42px}
  .f18-fold .sec-h.f18-fold-h{padding:12px 0;flex-wrap:wrap}
  .f18-fold .sec-h.f18-fold-h .hint{flex:1 1 100%;order:3}
  .f18-tb .btn{width:100%}
}
