/* ==========================================================================
   Products & Tools add-on styles. Everything is prefixed .tp- so it
   cannot clash with the site's main stylesheet. Colours fall back to the
   site's own variables where they exist.
   ========================================================================== */
:root {
  --tp-accent: var(--c-primary, #0b5cad);
  --tp-accent-ink: #ffffff;
  --tp-accent-soft: #e8f1fb;
  --tp-ink: var(--c-text, #14213d);
  --tp-muted: var(--c-muted, #5b6474);
  --tp-line: #e2e6ec;
  --tp-card: #ffffff;
  --tp-bg-soft: #f6f8fb;
  --tp-good: #177245;
  --tp-good-soft: #e6f4ec;
  --tp-warn: #9a5b00;
  --tp-warn-soft: #fdf2e0;
  --tp-bad: #b42318;
  --tp-bad-soft: #fdeceb;
  --tp-radius: 14px;
}

.tp-section { padding: 56px 0; }
.tp-section.tp-soft { background: var(--tp-bg-soft); }
.tp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.tp-muted { color: var(--tp-muted); }
.tp-small { font-size: 13.5px; }

/* ---------- buttons ---------- */
.tp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 10px; font-weight: 700; font-size: 15px;
  border: 2px solid var(--tp-accent); background: var(--tp-accent); color: var(--tp-accent-ink);
  text-decoration: none; cursor: pointer; line-height: 1.2; font-family: inherit; box-sizing: border-box;
}
.tp-btn:hover { filter: brightness(1.08); color: var(--tp-accent-ink); }
.tp-btn.tp-ghost { background: transparent; color: var(--tp-accent); }
.tp-btn.tp-ghost:hover { background: var(--tp-accent-soft); }
.tp-btn.tp-block { width: 100%; }
.tp-btn:focus-visible, .tp-chip:focus-visible, .tp-opt:focus-within { outline: 3px solid #f5b700; outline-offset: 2px; }

/* ---------- product grid ---------- */
.tp-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tp-card {
  background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  padding: 20px; display: flex; flex-direction: column; gap: 10px; position: relative;
  transition: box-shadow .15s, transform .15s;
}
.tp-card:hover { box-shadow: 0 10px 28px rgba(20, 33, 61, .10); transform: translateY(-2px); }
.tp-card[hidden] { display: none; }
.tp-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tp-brand { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tp-muted); }
.tp-tier { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--tp-accent-soft); color: var(--tp-accent); white-space: nowrap; }
.tp-tier.premium { background: #f3ecfd; color: #5b2ca0; }
.tp-tier.fleet, .tp-tier.flexible { background: var(--tp-warn-soft); color: var(--tp-warn); }
.tp-card h3 { margin: 0; font-size: 21px; line-height: 1.25; }
.tp-card h3 a { color: inherit; text-decoration: none; }
.tp-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.tp-card p { margin: 0; color: var(--tp-muted); font-size: 14.5px; }
.tp-price { font-size: 30px; font-weight: 800; color: var(--tp-ink); line-height: 1; }
.tp-price small { font-size: 14px; font-weight: 600; color: var(--tp-muted); }
.tp-price.tp-quoted { font-size: 20px; }
.tp-ticks { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 5px; font-size: 14px; }
.tp-ticks li { padding-left: 22px; position: relative; }
.tp-ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--tp-good); font-weight: 800; }
.tp-ticks li.tp-no { color: var(--tp-muted); }
.tp-ticks li.tp-no::before { content: "–"; color: #9aa3b2; }
.tp-card-foot { margin-top: auto; padding-top: 12px; display: flex; gap: 8px; position: relative; z-index: 1; }
.tp-card-foot .tp-btn { flex: 1; padding: 10px 12px; font-size: 14px; }
.tp-meta { font-size: 13px; color: var(--tp-muted); }

/* ---------- catalogue filters ---------- */
.tp-shop > *, .tp-pd > *, .tp-tool > * { min-width: 0; }
.tp-shop { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.tp-filters {
  background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  padding: 18px; position: sticky; top: 90px;
}
.tp-filters h3 { margin: 0 0 12px; font-size: 17px; }
.tp-fgroup { border-top: 1px solid var(--tp-line); padding: 14px 0 6px; }
.tp-fgroup:first-of-type { border-top: 0; padding-top: 0; }
.tp-fgroup legend, .tp-flabel { font-weight: 700; font-size: 14px; margin-bottom: 8px; display: block; padding: 0; }
.tp-fgroup fieldset { border: 0; padding: 0; margin: 0; }
.tp-check { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; cursor: pointer; }
.tp-check input { width: 17px; height: 17px; accent-color: var(--tp-accent); margin: 0; }
.tp-range { width: 100%; accent-color: var(--tp-accent); }
.tp-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tp-toolbar select, .tp-field select, .tp-field input {
  font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid #cfd6df; border-radius: 10px; background: #fff; color: var(--tp-ink);
}
.tp-empty { padding: 40px 20px; text-align: center; border: 1px dashed var(--tp-line); border-radius: var(--tp-radius); color: var(--tp-muted); }
.tp-filter-toggle { display: none; }

/* ---------- compare bar ---------- */
.tp-compare-check { position: relative; z-index: 1; font-size: 13px; display: flex; align-items: center; gap: 6px; color: var(--tp-muted); cursor: pointer; }
.tp-compare-check input { accent-color: var(--tp-accent); }
.tp-comparebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--tp-ink); color: #fff;
  padding: 12px 16px; display: none; box-shadow: 0 -6px 20px rgba(0,0,0,.2);
}
.tp-comparebar.show { display: block; }
.tp-comparebar .tp-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tp-comparebar .tp-btn { border-color: #fff; }

/* ---------- tables ---------- */
.tp-table-wrap { overflow-x: auto; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); background: #fff; }
.tp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.tp-table th, .tp-table td { padding: 12px 14px; border-bottom: 1px solid var(--tp-line); text-align: left; vertical-align: top; }
.tp-table thead th { background: var(--tp-bg-soft); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--tp-muted); }
.tp-table tr:last-child td { border-bottom: 0; }
.tp-table .tp-yes { color: var(--tp-good); font-weight: 800; }
.tp-table .tp-dash { color: #9aa3b2; }
.tp-table td.tp-num, .tp-table th.tp-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- product detail ---------- */
.tp-pd { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.tp-buybox {
  background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  padding: 24px; position: sticky; top: 90px; display: grid; gap: 14px;
}
.tp-buybox .tp-price { font-size: 40px; }
.tp-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.tp-facts li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--tp-line); padding-bottom: 8px; }
.tp-facts li span:last-child { font-weight: 700; text-align: right; }
.tp-breadcrumb { font-size: 13.5px; color: var(--tp-muted); margin-bottom: 14px; }
.tp-breadcrumb a { color: inherit; }
.tp-pd h1 { margin: 6px 0 10px; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.tp-lead { font-size: 18px; color: var(--tp-muted); margin: 0 0 18px; }
.tp-featgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 16px 0 8px; }
.tp-feat { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--tp-line); border-radius: 10px; background: #fff; font-size: 14.5px; }
.tp-feat b { color: var(--tp-good); }
.tp-feat.tp-off { color: var(--tp-muted); background: var(--tp-bg-soft); }
.tp-feat.tp-off b { color: #9aa3b2; }
.tp-note { font-size: 13px; color: var(--tp-muted); background: var(--tp-bg-soft); border-radius: 10px; padding: 12px 14px; }

/* ---------- tools ---------- */
.tp-tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.tp-panel { background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: var(--tp-radius); padding: 24px; }
.tp-panel h2, .tp-panel h3 { margin-top: 0; }
.tp-field { display: grid; gap: 6px; margin-bottom: 16px; }
.tp-field label, .tp-field .tp-flabel { font-weight: 700; font-size: 14.5px; margin: 0; }
.tp-field select, .tp-field input[type="number"] { width: 100%; box-sizing: border-box; }
.tp-hint { font-size: 13px; color: var(--tp-muted); }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-chip { position: relative; }
.tp-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tp-chip span {
  display: inline-block; padding: 8px 12px; border: 1px solid #cfd6df; border-radius: 999px; font-size: 14px; cursor: pointer; background: #fff; user-select: none;
}
.tp-chip input:checked + span { background: var(--tp-accent); border-color: var(--tp-accent); color: #fff; }
.tp-chip input:focus-visible + span { outline: 3px solid #f5b700; outline-offset: 2px; }

.tp-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tp-stat { background: var(--tp-bg-soft); border-radius: 12px; padding: 14px; }
.tp-stat .tp-stat-label { font-size: 12.5px; color: var(--tp-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.tp-stat .tp-stat-value { font-size: 24px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tp-stat.tp-good { background: var(--tp-good-soft); }
.tp-stat.tp-good .tp-stat-value { color: var(--tp-good); }
.tp-stat.tp-bad { background: var(--tp-bad-soft); }
.tp-stat.tp-bad .tp-stat-value { color: var(--tp-bad); }

.tp-verdict { border-radius: 12px; padding: 14px 16px; font-weight: 600; margin-bottom: 16px; }
.tp-verdict.good { background: var(--tp-good-soft); color: var(--tp-good); }
.tp-verdict.warn { background: var(--tp-warn-soft); color: var(--tp-warn); }
.tp-verdict.bad { background: var(--tp-bad-soft); color: var(--tp-bad); }

/* bar comparison (savings vs cost) */
.tp-bars { display: grid; gap: 10px; margin: 8px 0 18px; }
.tp-bar-row { display: grid; grid-template-columns: 130px 1fr 90px; gap: 10px; align-items: center; font-size: 14px; }
.tp-bar-track { background: var(--tp-bg-soft); border-radius: 6px; height: 22px; overflow: hidden; }
.tp-bar-fill { height: 100%; border-radius: 6px; background: var(--tp-accent); transition: width .35s; }
.tp-bar-fill.tp-good { background: var(--tp-good); }
.tp-bar-row .tp-num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* risk gauge */
.tp-gauge { height: 14px; border-radius: 999px; background: linear-gradient(90deg, #2e9e5b 0%, #e8b100 50%, #d23b2f 100%); position: relative; margin: 18px 0 8px; }
.tp-gauge-pin {
  position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--tp-ink);
  transform: translate(-50%, -50%); transition: left .4s; box-sizing: border-box;
}
.tp-gauge-scale { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--tp-muted); margin-bottom: 16px; }
.tp-factors { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; font-size: 14.5px; }
.tp-factors li { display: flex; gap: 10px; }
.tp-factors .tp-dot { flex: 0 0 10px; height: 10px; border-radius: 50%; margin-top: 6px; }

/* quiz */
.tp-quiz { max-width: 760px; margin: 0 auto; }
.tp-progress { height: 6px; background: var(--tp-line); border-radius: 999px; overflow: hidden; margin-bottom: 22px; }
.tp-progress div { height: 100%; background: var(--tp-accent); transition: width .3s; }
.tp-step[hidden] { display: none; }
.tp-step h2 { font-size: 24px; margin: 0 0 6px; }
.tp-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 18px 0 22px; }
.tp-opt { position: relative; }
.tp-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tp-opt span {
  display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 2px solid var(--tp-line); border-radius: 12px; cursor: pointer; background: #fff; height: 100%; box-sizing: border-box;
}
.tp-opt span b { font-size: 16px; }
.tp-opt span em { font-style: normal; font-size: 13.5px; color: var(--tp-muted); }
.tp-opt input:checked + span { border-color: var(--tp-accent); background: var(--tp-accent-soft); }
.tp-quiz-nav { display: flex; justify-content: space-between; gap: 12px; }
.tp-match { font-size: 12.5px; font-weight: 800; color: var(--tp-good); background: var(--tp-good-soft); padding: 3px 9px; border-radius: 999px; }
.tp-why { font-size: 13.5px; color: var(--tp-ink); background: var(--tp-bg-soft); border-radius: 10px; padding: 10px 12px; }
.tp-card.tp-winner { border: 2px solid var(--tp-accent); }
.tp-ribbon { position: absolute; top: -12px; left: 18px; background: var(--tp-accent); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }

/* tools hub + callouts */
.tp-toolcards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tp-toolcard {
  display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--tp-radius); border: 1px solid var(--tp-line);
  background: #fff; text-decoration: none; color: var(--tp-ink); transition: box-shadow .15s, transform .15s;
}
.tp-toolcard:hover { box-shadow: 0 10px 28px rgba(20,33,61,.10); transform: translateY(-2px); color: var(--tp-ink); }
.tp-toolcard .tp-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--tp-accent-soft); display: grid; place-items: center; font-size: 22px; }
.tp-toolcard b { font-size: 18px; }
.tp-toolcard span { color: var(--tp-muted); font-size: 14.5px; }
.tp-toolcard i { font-style: normal; font-weight: 700; color: var(--tp-accent); margin-top: auto; }
.tp-callout {
  display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--tp-accent-soft); border: 1px solid #cfe0f5; border-radius: var(--tp-radius); padding: 20px 24px; margin: 32px auto;
  max-width: 1148px;
}
.tp-callout b { font-size: 18px; display: block; margin-bottom: 4px; }
.tp-callout p { margin: 0; color: var(--tp-muted); }
.tp-head { text-align: center; max-width: 760px; margin: 0 auto 32px; }
.tp-head h2 { margin: 6px 0 8px; }
.tp-head p { color: var(--tp-muted); margin: 0; }
.tp-eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tp-accent); }
.tp-center { text-align: center; margin-top: 28px; }

@media (max-width: 900px) {
  .tp-shop, .tp-pd, .tp-tool { grid-template-columns: 1fr; }
  .tp-filters { position: static; display: none; }
  .tp-filters.open { display: block; }
  .tp-filter-toggle { display: inline-flex; }
  .tp-buybox { position: static; }
  .tp-bar-row { grid-template-columns: 96px 1fr 76px; }
}
