/* Wais Driver: the driver tools (app/tools.py). Loaded after features.css on those pages only, so the home page budget
   is untouched. Phone first (360px), then widened at 560 and 760px.
   Browser floor Chrome 80 / Safari 13.1: no :is/:where/:has, no aspect-ratio, no flex gap (grid gap only). */

/* ---- The tool panel ---- */
.t-tool{margin:16px 0 8px;padding:16px;border:2px solid var(--w-ink);border-radius:var(--w-radius);background:#fff}
.t-tool-title{margin:0 0 10px!important;font-size:19px!important;line-height:1.3}
.t-tool .w-plate-digits{margin:0 0 6px}
.t-label{display:block;margin:14px 0 6px;font-size:15px;font-weight:800;line-height:1.3}
.t-hint{display:block;margin:6px 0 0;color:var(--w-muted);font-size:13px;line-height:1.4}
.t-field{display:block;margin:0 0 4px}
.t-field select,.t-field input[type=number],.t-field input[type=time],.t-field input[type=search]{display:block;width:100%;min-height:48px;padding:0 12px;
  border:2px solid var(--w-line);border-radius:12px;background:#fff;color:var(--w-ink);font:inherit;font-size:16px}
.t-field select{-webkit-appearance:menulist;appearance:menulist}
.t-field input[type=search]{-webkit-appearance:none}
.t-field select:focus,.t-field input:focus{border-color:var(--w-blue);outline:3px solid var(--w-yellow);outline-offset:1px}
.t-fieldset{margin:14px 0 0;padding:0;border:0;min-width:0}
.t-fieldset legend{margin:0 0 6px;padding:0;font-size:15px;font-weight:800}
.t-choices{display:flex;flex-wrap:wrap;margin:0 -8px -8px 0}
.t-choice{position:relative;margin:0 8px 8px 0;cursor:pointer}
.t-choice input{position:absolute;opacity:0;width:1px;height:1px}
.t-choice span{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border:2px solid var(--w-line);border-radius:99px;background:#fff;
  font-size:15px;font-weight:800;line-height:1.2}
.t-choice input:checked+span{background:var(--w-blue);border-color:var(--w-blue);color:#fff}
.t-choice input:focus+span{outline:3px solid var(--w-yellow);outline-offset:2px}
.t-stack{display:grid;grid-template-columns:1fr;gap:8px}
.t-check{display:grid;grid-template-columns:24px 1fr;gap:10px;align-items:center;min-height:48px;padding:8px 12px;border:2px solid var(--w-line);border-radius:12px;
  background:#fff;font-size:15px;font-weight:700;line-height:1.35;cursor:pointer}
.t-check input{width:22px;height:22px;margin:0;accent-color:var(--w-blue)}
.t-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 0}
.t-row .t-label{margin-top:0}
.t-row .t-check{grid-column:1/-1}
.t-result{margin:16px 0 0;padding:14px;border-radius:12px;background:var(--w-blue-tint);line-height:1.5}
.t-result p{margin:0}

/* ---- Reference parts ---- */
.t-table{width:100%;margin:8px 0 16px;border-collapse:collapse;font-size:15px;line-height:1.4}
.t-table th,.t-table td{padding:10px 8px;border-bottom:1px solid var(--w-line);text-align:left;vertical-align:top}
.t-table thead th{border-bottom:2px solid var(--w-ink);font-size:13px;letter-spacing:.02em}
.t-table tbody th{font-weight:800}
.t-table small{display:block;color:var(--w-muted);font-size:13px;font-weight:600}
.t-table td{font-variant-numeric:tabular-nums}
.t-card{margin:0 0 12px;padding:14px 16px;border:1px solid var(--w-line);border-radius:var(--w-radius);background:#fff}
.t-card h3{margin:0 0 8px;font-size:19px}
.t-facts{margin:0}
.t-facts div{padding:8px 0;border-top:1px solid #eef1f6}
.t-facts dt{color:var(--w-blue);font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.t-facts dd{margin:2px 0 0;line-height:1.5}
.t-list{margin:0 0 12px;padding-left:22px;line-height:1.55}
.t-list li{margin:4px 0}
.t-days{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0 0 12px;padding:0;list-style:none}
.t-days li{padding:8px 10px;border-radius:10px;background:var(--w-paper);font-size:14px;font-weight:700}
@media(min-width:560px){.t-days{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* ---- Number coding ---- */
.nc-clock{color:var(--w-muted);font-size:14px;font-weight:700}
.nc-badge{display:inline-block;margin:8px 0 4px!important;padding:4px 12px;border-radius:99px;background:var(--w-green);color:#fff;font-size:14px;font-weight:800;letter-spacing:.02em}
.nc-message{font-size:17px;font-weight:800;color:var(--w-ink)}
.nc-note{margin-top:8px!important;padding:8px 10px;border-left:4px solid var(--w-yellow);background:#fff;font-weight:700}
.nc-result.is-free{background:var(--w-green-tint)}
.nc-result.is-coded{background:#fdecea}
.nc-result.is-coded .nc-badge{background:#c8312b}
.nc-result.is-check{background:#fff6d6}
.nc-result.is-check .nc-badge{background:var(--w-ink)}

/* ---- MVUC calculator ---- */
.mv-schedule{margin:8px 0 0;padding:10px 12px;border-radius:10px;background:var(--w-paper);font-weight:800;color:var(--w-blue);line-height:1.4}
.mv-lines{width:100%;border-collapse:collapse;font-size:15px}
.mv-lines th,.mv-lines td{padding:8px 0;border-bottom:1px solid rgba(11,61,145,.15);text-align:left;font-weight:700;line-height:1.35}
.mv-lines td{padding-left:12px;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.mv-total{margin-top:10px!important;font-size:20px;font-weight:800;color:var(--w-ink);font-variant-numeric:tabular-nums}
.mv-error{padding:10px 12px;border-radius:10px;background:#fdecea;color:#8c1d18;font-weight:700}
.mv-unregistered{margin-top:10px!important}

/* ---- LTO fines ---- */
.lf-controls .rs-pills{margin-bottom:4px}
.lf-list{margin:14px 0 0;padding:0;list-style:none}
.lf-item{margin:0 0 10px;padding:14px 16px;border:1px solid var(--w-line);border-radius:var(--w-radius);background:#fff}
.lf-item:target{box-shadow:0 0 0 3px var(--w-yellow)}
.lf-item.is-added{border-color:var(--w-blue);box-shadow:inset 4px 0 0 var(--w-blue)}
.lf-cat{margin:0;color:var(--w-blue);font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.lf-name{margin:2px 0 6px!important;font-size:17px!important;line-height:1.35!important}
.lf-penalty{margin:0 0 8px;line-height:1.5}
.lf-figures{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;margin:0 0 8px}
.lf-figures dt{color:var(--w-muted);font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.lf-figures dd{margin:0;font-weight:800;font-variant-numeric:tabular-nums}
.lf-figures .lf-law{grid-column:1/-1}
.lf-figures .lf-law dd{font-weight:600;font-size:14px;line-height:1.4}
.lf-actions{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}
.lf-learn{display:inline-flex;align-items:center;min-height:44px;color:var(--w-blue);font-weight:800;font-size:15px}
.lf-add{min-width:96px;min-height:44px;padding:0 16px;border:2px solid var(--w-blue);border-radius:99px;background:#fff;color:var(--w-blue);font:inherit;font-size:15px;font-weight:800;cursor:pointer}
.lf-add[aria-pressed=true]{background:var(--w-blue);color:#fff}
.lf-add:focus-visible{outline:3px solid var(--w-yellow);outline-offset:2px}
.lf-tally{margin-top:20px}
.lf-count{font-weight:800}
.lf-totals{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0}
.lf-totals div{padding:10px 12px;border-radius:10px;background:#fff}
.lf-totals dt{color:var(--w-muted);font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.lf-totals dd{margin:2px 0 0;font-size:22px;font-weight:800;font-variant-numeric:tabular-nums}
.lf-tally .t-check{margin:10px 0 0}
.lf-tier{margin:0 0 12px!important;padding:10px 12px;border-radius:10px;background:#fff;font-weight:800;line-height:1.45}
.lf-tier.is-clean,.lf-tier.is-five-year{border-left:5px solid var(--w-green)}
.lf-tier.is-reorientation,.lf-tier.is-exam{border-left:5px solid var(--w-yellow)}
.lf-tier.is-revoked{border-left:5px solid #c8312b}
.lf-tally .w-btn{width:100%}
@media(min-width:560px){.lf-tally .w-btn{width:auto}}
.lf-bar{position:-webkit-sticky;position:sticky;bottom:12px;z-index:5;display:flex;align-items:center;justify-content:center;min-height:48px;margin:12px 0 0;
  padding:0 16px;border-radius:99px;background:var(--w-ink);color:#fff;font-size:15px;font-weight:800;text-align:center;text-decoration:none;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.lf-bar:hover{color:var(--w-yellow)}
.lf-tiers{margin:0 0 12px;padding:0;list-style:none}
.lf-tiers li{margin:0 0 8px;padding:10px 12px;border-left:5px solid var(--w-blue);border-radius:0 10px 10px 0;background:var(--w-paper);line-height:1.45}

@media print{
  .t-page .t-tool,.t-page .lf-controls,.t-page .lf-tally,.t-page .lf-bar,.t-page .lf-add{display:none!important}
}
