/*
 * Only what the gratuity calculator did not already need.
 *
 * The form card, segmented toggles, inputs and result panel come from the
 * theme (.calc, .gf, .seg, .res) so every tool matches the gratuity page
 * without a second stylesheet describing the same components. Colours are
 * taken from the theme's tokens for the same reason — no tool introduces one.
 */

/* Two headline figures of equal standing: turnover and days, cost and month. */
.qzft-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:-6px 0 20px}
.qzft-pair>div{background:rgba(255,255,255,.6);border:1px solid var(--line);
  border-radius:var(--r);padding:12px 14px}
.qzft-pair span{display:block;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);font-weight:700;margin-bottom:4px}
.qzft-pair b{font-size:1.42rem;color:var(--teal-d);font-variant-numeric:tabular-nums;line-height:1.15}

/* The three OEE factors, side by side and equal — the point of that tool. */
.qzft-factors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 20px}
.qzft-factors>div{text-align:center;background:rgba(255,255,255,.6);
  border:1px solid var(--line);border-radius:var(--r);padding:14px 8px}
.qzft-factors b{display:block;font-size:1.24rem;color:var(--teal-d);font-variant-numeric:tabular-nums}
.qzft-factors span{display:block;font-size:.73rem;color:var(--muted);margin-top:3px}

.qzft-strong th,.qzft-strong td{font-weight:700;color:var(--ink)}

/* Copy buttons: this is a utility tool and the figures are going into an
   invoice or a spreadsheet, not being admired. */
.qzft-copy{border:1px solid var(--line);background:var(--white);border-radius:6px;
  width:26px;height:26px;margin-left:8px;cursor:pointer;vertical-align:middle;
  display:inline-flex;align-items:center;justify-content:center;transition:border-color .2s}
.qzft-copy svg{width:13px;height:13px;fill:var(--muted)}
.qzft-copy:hover{border-color:var(--teal)}
.qzft-copy.is-copied{border-color:var(--teal);background:var(--teal-soft)}
.qzft-copy.is-copied::after{content:"Copied";position:absolute;margin-top:-34px;
  background:var(--ink);color:#fff;font-size:.66rem;padding:3px 7px;border-radius:4px}

/* Retention release schedule. The dated list is the reason the tool exists. */
.qzft-timeline{margin:18px 0 0;display:grid;gap:8px}
.qzft-tranche{display:grid;grid-template-columns:1.6fr .9fr .9fr auto;gap:10px;align-items:center;
  padding:12px 14px;border:1px solid var(--line);border-radius:var(--r);background:var(--white);
  font-size:.84rem}
.qzft-tranche b{font-weight:600;color:var(--ink)}
.qzft-tranche span{font-variant-numeric:tabular-nums;color:var(--body)}
.qzft-tranche i{font-style:normal;font-size:.72rem;font-weight:700;letter-spacing:.04em;
  padding:4px 9px;border-radius:100px;white-space:nowrap}
.qzft-tranche--overdue i{background:rgba(217,140,43,.14);color:#8A5410}
.qzft-tranche--overdue{border-color:rgba(217,140,43,.45)}
.qzft-tranche--due i{background:var(--teal-soft);color:var(--teal-d)}
.qzft-tranche--future i{background:var(--bg);color:var(--muted)}

.qzft-chart{margin:18px 0 0}
.qzft-chart canvas{width:100%;height:auto;display:block}
.qzft-chart figcaption{font-size:.75rem;color:var(--muted);margin-top:6px;text-align:center}

.qzft-checks{display:grid;gap:8px}
.qzft-check{display:flex;align-items:flex-start;gap:9px;font-size:.87rem;color:var(--body);cursor:pointer}
.qzft-check input{margin-top:3px;accent-color:var(--teal)}
.qzft-check input:disabled+span{color:var(--muted)}

.qzft-slider{width:100%;accent-color:var(--teal)}

.qzft-live{color:var(--teal-d);font-weight:600}

.qzft-assume summary{color:var(--teal-d)}

/* A warning belongs in amber and nowhere else. */
.res__flag.on{display:block;margin:14px 0 0;padding:13px 15px;border-radius:var(--r);
  background:rgba(217,140,43,.10);border:1px solid rgba(217,140,43,.34)}
.res__flag.on p{font-size:.83rem;line-height:1.55;color:var(--ink);margin:0 0 8px}
.res__flag.on p:last-child{margin-bottom:0}

/* The strip runs the full width of the tool above it. base.css caps every
   paragraph at 64ch for readability, which is right for prose and wrong for a
   bordered strip — it left the note about a third the width of the calculator
   it belongs to. */
.qzft-disclaimer{margin:20px 0 0;padding:14px 18px;border:1px solid var(--line);
  border-radius:var(--r);background:var(--white);font-size:.79rem;line-height:1.6;
  color:var(--muted);max-width:none}
.qzft-verified{margin:8px 0 0;padding:0 18px;font-size:.74rem;color:var(--faint);max-width:none}

.qzft-intro{font-size:.87rem;color:var(--body);margin:-8px 0 18px;line-height:1.6}

.qzft-prose table{width:100%;border-collapse:collapse;margin:18px 0;font-size:.87rem}
.qzft-prose th,.qzft-prose td{padding:10px 12px;border:1px solid var(--line);text-align:left}
.qzft-prose thead th{background:var(--teal-soft);font-weight:600;color:var(--ink)}
.qzft-prose code{background:var(--teal-soft);padding:2px 7px;border-radius:4px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.86em;color:var(--teal-d)}

/* Formula rows: the expression as a monospace chip, the plain English beside
   it. Lifted from the gratuity page, which does this well. */
.qzft-formula{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:12px;
  align-items:baseline;padding:11px 0;border-bottom:1px solid var(--line)}
.qzft-formula:last-child{border-bottom:0}
.qzft-formula code{justify-self:start}
.qzft-formula span{font-size:.86rem;color:var(--body)}

.qzft-cards{margin-top:6px}
.qzft-card{display:flex;flex-direction:column;gap:6px;background:var(--white);
  border:1px solid var(--line);border-radius:var(--r);padding:20px 18px;
  transition:transform .2s,box-shadow .2s}
.qzft-card:hover{transform:translateY(-3px);box-shadow:0 22px 50px -30px rgba(14,27,30,.3)}
.qzft-card b{font-size:.95rem;color:var(--ink);line-height:1.35}
.qzft-card span{font-size:.82rem;color:var(--muted);line-height:1.5}
.qzft-badge{align-self:flex-start;font-size:.66rem;font-weight:700;letter-spacing:.08em;
  text-transform:uppercase;color:var(--teal-d);background:var(--teal-soft);
  padding:3px 8px;border-radius:100px}

.qzft-index__h{font-size:.74rem;letter-spacing:.12em;text-transform:uppercase;
  color:var(--muted);font-weight:700;margin:34px 0 14px}
.qzft-index__h:first-child{margin-top:0}
.qzft-index__g{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}

.qzft-missing{padding:14px;border:1px dashed var(--red);color:var(--red);border-radius:var(--r)}

/* The compact bar that pins to the bottom once the form scrolls past the
   result panel. Most of this traffic is on a phone. */
.qzft-bar{display:none}

@media (max-width:1080px){
  .qzft-index__g{grid-template-columns:repeat(2,minmax(0,1fr))}
  .qzft-formula{grid-template-columns:minmax(0,1fr)}
}

@media (max-width:640px){
  .qzft-pair,.qzft-factors{grid-template-columns:minmax(0,1fr)}
  .qzft-index__g{grid-template-columns:minmax(0,1fr)}
  .qzft-tranche{grid-template-columns:minmax(0,1fr);gap:4px}

  .qzft-bar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:80;
    align-items:center;justify-content:space-between;gap:12px;
    padding:11px 16px;background:var(--white);border-top:1px solid var(--line);
    box-shadow:0 -12px 30px -18px rgba(14,27,30,.4)}
  .qzft-bar span{font-size:.74rem;color:var(--muted);font-weight:600}
  .qzft-bar b{font-size:1.05rem;color:var(--teal-d);font-variant-numeric:tabular-nums}
}

@media (prefers-reduced-motion:reduce){
  .qzft-card{transition:none}
  .qzft-card:hover{transform:none}
}
