/* Calculator page, /free-tools/{slug}/ (0.17.0): the article page in the Calculate hue (violet), the calculator on
   the dark violet plate. The calculator's own stylesheet (calculator.css, GTM Compass Tools plugin) reads the tokens
   below, so the brand is set here and the plugin stays theme-neutral. */

.ps--ft{--acc:#A78BFA;--acc-ink:#5A3FC4;--acc-tint:#F5F1FF;--acc-line:#DCD2FF}

/* Hero: one column, the calculator follows right under it */
/* Two columns, as the reference: the path and H1 on the left, the lead line and the facts on the right, tops aligned */
.tl-hero-in{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(32px,6vw,96px);align-items:end;max-width:1148px;margin:0 auto}
.tl-hero-tx{display:flex;flex-direction:column;align-items:flex-start;gap:22px;min-width:0}
.tl-hero-side{display:flex;flex-direction:column;align-items:flex-start;gap:18px;min-width:0;padding-bottom:0}
/* H1 and lede sized to sit as a pair: about 3 lines each, neither dominating (0.18.0) */
.tl-hero-in .ps-title{max-width:none;font:600 clamp(32px,3vw,44px)/1.12 var(--font-serif);letter-spacing:-.02em;text-wrap:balance}
.tl-lede{margin:0;max-width:540px;font-size:19px;line-height:1.6;color:var(--muted);text-wrap:pretty}
/* Hero on white (two columns), then the calculator card on the dark violet plate. Tight gap between them. */
.tl-hero{padding:128px 0 40px;background:#fff}
.tl-band{padding:0 0 88px;background:#fff}
.tl-stage{position:relative;isolation:isolate;overflow:hidden;max-width:1148px;margin:0 auto;padding:48px;border-radius:20px;background:#0E0826 radial-gradient(1300px 950px at 85% 0,#2C1F72 0,#170E3A 55%,#0E0826 100%) no-repeat}
/* Fixed sizes (px, not %), so the plate looks the same on every step whatever the card's height */
.tl-stage .ft-ter{position:absolute;left:0;top:0;width:100%;height:1200px;z-index:-1;opacity:.4;pointer-events:none}

/* The stage: the dark violet plate (hero radial), contours behind, the calculator card in front */
.tl-stage .gsp-calc-block{position:relative;margin:0}

/* Calculator tokens: the GTM Compass palette, violet where the old site used the topic colour */
.tl-stage .calc{
  --surface:#fff;--panel:#F7F8F7;--ink:#101418;--mute:#5B6470;--rule:#E3E8E5;--accent:#5A3FC4;--deep:#3A2496;--tint:#EFEAFE;
  --mk:#5A3FC4;--good:#5A3FC4;--good-bg:#EFEAFE;--seg-good:#5A3FC4;--grain:none;
  --serif:var(--font-serif);--sans:var(--font-sans);--mono:var(--font-mono);
  max-width:900px;border:0;border-radius:16px;box-shadow:0 32px 64px -28px rgba(6,2,20,.75);font-family:var(--font-sans);color:var(--ink)
}
.tl-stage .calc[data-cat]{--mk:#5A3FC4}
.tl-stage section.calc{padding:0!important}
.tl-stage .calc .field{border-radius:0}
.tl-stage .calc.light .field,.tl-stage .calc.light[data-cat] .field{
  --ftint:#F5F1FF;--fline:#DCD2FF;
  --r-good:#5A3FC4;--r-good2:#A78BFA;--r-zone:#DCD2FF;--r-bad:#3D4452;--r-bad2:#8A93A0;--r-warn:#8A93A0;
  --r-sh1:#F0EBFF;--r-sh2:#DCD2FF;--r-sh3:#C4B5FF;--r-sh4:#A78BFA;--r-sh5:#7C5CE6
}
.tl-stage .calc .in{padding:34px 38px 34px}
.tl-stage .calc.light .field{padding:32px 38px 22px}
.tl-stage .calc .step,.tl-stage .calc .money,.tl-stage .calc .fixed,.tl-stage .calc .x,.tl-stage .calc .sel,.tl-stage .calc textarea.scores{border-radius:10px}
.tl-stage .calc .opt[aria-pressed="true"]{background:#5A3FC4;border-color:#5A3FC4}
.tl-stage .calc .tabs button[aria-pressed="true"]{color:#5A3FC4;border-bottom-color:#5A3FC4}
.tl-stage .calc .sl input[type=range]::-webkit-slider-runnable-track{background:linear-gradient(90deg,#5A3FC4 var(--p),var(--rule) var(--p))}
.tl-stage .calc .sl input[type=range]::-moz-range-track{background:linear-gradient(90deg,#5A3FC4 var(--p),var(--rule) var(--p))}
.tl-stage .calc .sl input[type=range]::-webkit-slider-thumb{border-color:#5A3FC4}
.tl-stage .calc .sl input[type=range]::-moz-range-thumb{border-color:#5A3FC4}
.tl-stage .calc .rtile{display:none!important}
.tl-stage .calc .field .k{letter-spacing:.12em;font:600 12px/20px var(--font-mono)}
.tl-stage .calc .field .num{font-weight:600;letter-spacing:-.03em}

/* Guide: the formula line and the FAQ in violet */
.ps--ft .ps-prose .formula{margin:8px 0 30px;padding:20px 24px;border:1px solid var(--acc-line);border-radius:16px;background:var(--acc-tint);display:flex;flex-direction:column;gap:8px}
.ps--ft .ps-prose .formula>*{margin:0}
.ps--ft .ps-prose .formula-k{font:500 11px/1.3 var(--font-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--acc-ink)}
.ps--ft .ps-prose .formula-eq{font:600 24px/1.3 var(--font-serif);letter-spacing:-.01em;color:var(--ink);text-wrap:balance;overflow-wrap:anywhere}
.ps--ft .ps-prose .faq-list{margin:8px 0 0}

/* More calculators: the hub cards */
.tl-rel .ft-cells{padding:0 20px}

@media (max-width:900px){
    .tl-hero{padding:124px 0 32px}.tl-band{padding-bottom:56px}.tl-stage{padding:32px 16px;border-radius:16px}
  .tl-hero-in{grid-template-columns:minmax(0,1fr);gap:20px}.tl-hero-side{padding-top:0}
    .tl-stage .calc .in{padding:24px 20px}
  .tl-stage .calc.light .field{padding:24px 20px 18px}
}
@media (max-width:700px){
  .tl-stage .ft-ter{height:900px}
  .tl-band .wrap{padding-inline:12px}.tl-stage{padding:20px 8px}
  .tl-lede{font-size:17px}
  .ps--ft .ps-prose .formula-eq{font-size:20px}
  .tl-rel .ft-cells{padding:0}
}

/* Multi-step calculators (prototype, plugin steps.js): one card, a header with the step count and progress, one
   question per step, Back (soft) and Next (the violet primary), a live "so far" strip on the plate, the result last. */
.tl-stage .calc.calc--steps{display:block;height:auto!important;max-width:640px}
.ms-h{display:flex;align-items:center;gap:14px;padding:22px 28px}
.ms-ic{display:flex;flex:none;width:44px;height:44px;border-radius:12px;background:#04241B}
.ms-ic svg{width:100%;height:100%;transform:rotate(45deg)}
.ms-ht{display:flex;flex-direction:column;gap:3px;min-width:0}
.ms-ht b{font:600 21px/1.2 var(--font-serif);letter-spacing:-.01em;color:var(--ink)}
.ms-ht small{font-size:14px;line-height:1.4;color:var(--muted)}
.ms-n{margin-left:auto;align-self:flex-start;padding-top:4px;white-space:nowrap;font:500 11px/1.3 var(--font-mono);letter-spacing:.12em;text-transform:uppercase;color:#5A3FC4}
.ms-bar{height:3px;background:#EEF1EF}
.ms-bar i{display:block;height:100%;width:0;background:#A78BFA;transition:width .45s cubic-bezier(.2,.7,.2,1)}
.ms-step{display:flex;flex-direction:column;gap:22px;padding:30px 28px 8px}
.ms-step[hidden]{display:none}
.ms-in{animation:ms-in .35s cubic-bezier(.2,.7,.2,1)}
@keyframes ms-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.ms-q{margin:0!important;font:700 17px/1.45 var(--font-sans);color:var(--ink)}
.ms-q small{display:block;margin-top:4px;font:500 11px/1.3 var(--font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.tl-stage .calc--steps .sliders:not([hidden]){display:flex!important;flex-direction:column;gap:20px!important}
.tl-stage .calc--steps .row-end{margin-top:-4px}
.ms-step--res{padding:0}
.ms-step--res .field{border-top:0!important;padding:30px 28px 22px!important}
.tl-stage .calc--steps .field .res{grid-template-columns:1fr;gap:18px}
.tl-stage .calc--steps .field .num{font-size:84px}
.ms-f{display:flex;align-items:center;gap:12px;margin-top:22px;padding:20px 28px;border-top:1px solid var(--rule)}
.ms-f button{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 22px;border-radius:10px;font:700 15px/1 var(--font-sans);cursor:pointer;transition:background-color .15s ease,border-color .15s ease}
.ms-f button[hidden]{display:none}
.ms-back{background:#fff;color:var(--ink);border:1px solid #CFD5D2}
.ms-back:hover{background:#F3F5F4;border-color:#9AA5A0}
.ms-next{background:#A78BFA;color:#170E3A;border:0}
.ms-next:hover{background:#9572F5}
.ms-next--soft{background:#fff;color:var(--ink);border:1px solid #CFD5D2}
.ms-next--soft:hover{background:#F3F5F4;border-color:#9AA5A0}
.ms-f .arr{display:inline-block;transition:transform .15s ease}
.ms-next:hover .arr{transform:translateX(3px)}
.ms-back:hover .arr{transform:translateX(-3px)}
.ms-f button:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.ms-sofar{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;margin-right:auto}
.ms-sofar[hidden]{display:none}
.ms-sk{font:500 11px/1.3 var(--font-mono);letter-spacing:.12em;text-transform:uppercase;color:#5A3FC4}
.ms-sv{font:600 26px/1.05 var(--font-serif);letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--ink)}
.ms-err{margin:-6px 0 0!important}
@media (max-width:520px){
  .ms-h{padding:18px 18px;gap:12px}.ms-ic{width:40px;height:40px}.ms-ht small{display:none}
  .ms-step{padding:24px 18px 4px}.ms-step--res{padding:0}.ms-f{padding:16px 18px}
  .ms-step--res .field{padding:24px 18px 18px!important}.tl-stage .calc--steps .field .num{font-size:68px}
}
@media (prefers-reduced-motion:reduce){.ms-in{animation:none}.ms-bar i{transition:none}}
/* Locked card height (steps.js sets min-height to the tallest step): the buttons stay at the bottom of the card on
   every step, and the result's tinted panel fills the space above them. */
.ms{display:flex;flex-direction:column}
.ms-f{margin-top:auto}
.ms-step--res:not([hidden]){display:flex;flex-direction:column;flex:1}
.ms-step--res .field{flex:1}

/* Footer: one row. The live result on the left, Back and Next on the right; on the result step only "Edit your numbers", centred. */
.ms-f{flex-wrap:wrap}
.ms-step--res:not([hidden]) ~ .ms-f{justify-content:center}
/* Fields as on the hub preview cards: the label, then the number in a box, the slider under it */
.tl-stage .calc--steps .sl{grid-template-columns:minmax(0,1fr);gap:8px}
.tl-stage .calc--steps .sl label{font-size:14px}
.tl-stage .calc--steps .val{width:100%;height:50px;gap:6px;padding:0 14px;border:1px solid #E3E6E5!important;border-radius:10px;background:#fff;transition:border-color .15s ease,box-shadow .15s ease}
.tl-stage .calc--steps .val:focus-within{border-color:#5A3FC4!important;box-shadow:0 0 0 3px #EFEAFE}
.tl-stage .calc--steps .val input{flex:1;width:auto!important;min-width:0;text-align:left;font-size:20px}
.tl-stage .calc--steps .sl input[type=range]{height:22px;margin-top:2px}
@media (max-width:520px){
  .ms-sofar{flex-basis:100%;margin:0 0 6px}
  .ms-f button{flex:1;padding:0 14px;white-space:nowrap}
}

/* Every calculator is multi-step (1.1.0): one column everywhere, no side-by-side input columns. */
.tl-stage .calc--steps .grid2:not([hidden]),.tl-stage .calc--steps .cnt:not([hidden]){display:flex!important;flex-direction:column;gap:18px!important}
.tl-stage .calc--steps .cnt .f{gap:8px}
.tl-stage .calc--steps .row-end{flex-wrap:wrap;gap:12px}
.tl-stage .calc--steps .tabs{flex-wrap:wrap}
.tl-stage .calc--steps .mf{gap:8px}
.tl-stage .calc--steps .money,.tl-stage .calc--steps .step{height:50px}
/* A choice step: its options show as large buttons, one per row */
.ms-step--choice .tabs{display:flex;flex-direction:column;gap:10px;border:0!important}
.ms-step--choice .tabs button{display:block;width:100%;margin:0!important;padding:16px 18px!important;border:1px solid #E3E6E5!important;border-radius:12px;background:#fff;text-align:left;font-size:15px!important;color:var(--ink)!important;transition:border-color .15s ease,background-color .15s ease}
.ms-step--choice .tabs button:hover{border-color:#A78BFA!important}
.ms-step--choice .tabs button[aria-pressed="true"]{border-color:#5A3FC4!important;background:#F5F1FF;color:#5A3FC4!important}
.tl-stage .calc--steps p.lab{display:none}
/* Steps per calculator follow its inputs (2 or 3). A field taken out of a hidden mode group hides with it (.ms-off);
   the "+ Add ..." toggle goes away where its fields have their own step (.ms-gone). */
.tl-stage .calc--steps .ms-off,.tl-stage .calc--steps .ms-gone{display:none!important}
.ms-step > .sl + .sl{margin-top:0}
.ms-step--choice .row-end{flex-direction:column;align-items:stretch;gap:14px}
.ms-step--choice .row-end label[for]{position:static!important;left:auto!important;font-weight:700;font-size:14px;color:var(--ink)}
.ms-step--choice .row-end .sel{align-self:flex-start}

/* Compact fields (0.18.0): each field is one row, the number box on the left and its slider on the right inside one
   bordered control, so a step of 3 or 4 fields fits a laptop screen with the buttons in view. */
.tl-stage .calc--steps .sl:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);grid-template-areas:"lab lab" "val rng";gap:8px 0;align-items:stretch}
.tl-stage .calc--steps .sl > label{grid-area:lab;line-height:1.35}
.tl-stage .calc--steps .sl .val{grid-area:val;height:50px;border-radius:10px 0 0 10px!important;border-right:0!important}
.tl-stage .calc--steps .sl input[type=range]{grid-area:rng;height:50px!important;margin:0!important;padding:0 18px;box-sizing:border-box;border:1px solid #E3E6E5;border-left:1px dashed #E3E6E5;border-radius:0 10px 10px 0;background:#fff;transition:border-color .15s ease}
.tl-stage .calc--steps .sl:focus-within .val,.tl-stage .calc--steps .sl:focus-within input[type=range]{border-color:#5A3FC4!important}
.tl-stage .calc--steps .sl .val:focus-within{box-shadow:none}
.tl-stage .calc--steps .sliders:not([hidden]){gap:16px!important}
.ms-h{padding:18px 28px}
.ms-step{gap:18px;padding:24px 28px 6px}
.ms-f{margin-top:18px;padding:16px 28px}
@media (max-width:520px){
  /* Phones keep the one-row field (box and slider side by side), so a step still fits the screen */
  .tl-stage .calc--steps .sl:not([hidden]){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .tl-stage .calc--steps .sl input[type=range]{padding:0 12px}
  .tl-stage .calc--steps .val input{font-size:18px}
  .tl-stage .calc--steps .tabs{flex-wrap:nowrap;gap:16px}
  .tl-stage .calc--steps .tabs button{font-size:13.5px;white-space:nowrap}
  .ms-step--choice .tabs button{white-space:normal}
}
/* Buttons sit at the bottom of the locked card on every step; the result panel runs edge to edge and is compact,
   so it is no taller than the input steps and the card keeps one height. */
.ms-f{margin-top:auto}
.ms-step:not([hidden]):not(.ms-step--res){padding-bottom:24px}
.ms-step.ms-step--res{padding:0}
.tl-stage .calc--steps .ms-step--res .field{margin:0;border:0!important;border-radius:0;padding:26px 28px 18px!important;gap:16px}
.tl-stage .calc--steps .field .num{font-size:64px!important;letter-spacing:-.03em}
.tl-stage .calc--steps .field .say{font-size:15px;line-height:1.55;max-width:none}
.tl-stage .calc--steps .field .res{gap:14px}
.tl-stage .calc--steps .field .lead{gap:10px}
@media (max-width:520px){.tl-stage .calc--steps .field .num{font-size:52px!important}.tl-stage .calc--steps .ms-step--res .field{padding:22px 18px 16px!important}}
@media (max-width:520px){.ms-ht b{font-size:18px}}
/* Preview numbers in empty optional fields: a light grey "e.g." placeholder, clearly not a value */
.tl-stage .calc--steps input::placeholder,.tl-stage .calc--steps textarea::placeholder{color:#A9B1AD;opacity:1;font-weight:400}
