/* Vidastu v3: the owner calculators and their hub (/tools/, /construction/cost-calculator/).
   A consumer calculator: the inputs on paper, one big result beside them, a line on how it is worked out, a few questions,
   the lead form in the night band. Tokens and type are vidastu.css's own; nothing here names a new colour. */
.cx{padding-top:var(--nav-h);--cx-w:min(var(--max),100%)}
.cx>section,.cx-head{max-width:var(--max);margin:0 auto;padding-left:var(--pad);padding-right:var(--pad)}

/* ---------- the heading block ---------- */
.cx-head{padding-top:clamp(1.6rem,4vw,3.2rem);padding-bottom:clamp(1.4rem,3vw,2.4rem)}
.cx-crumbs{display:flex;flex-wrap:wrap;gap:.35rem .5rem;font-size:.9rem;color:var(--fg-3);margin-bottom:1.1rem}
.cx-crumbs a{color:var(--blue)}
.cx-crumbs a:hover{text-decoration:underline;text-underline-offset:3px}
.cx-crumbs .sep{color:var(--fg-3)}
.cx-head h1{font-size:clamp(2.05rem,1.2rem + 3.1vw,3.7rem);letter-spacing:-.032em;line-height:1.02;max-width:21ch}
.cx-answer{margin-top:1.1rem;font-size:clamp(1.04rem,.98rem + .3vw,1.2rem);line-height:1.6;color:var(--fg-2);max-width:62ch}
.cx-answer a{color:var(--blue);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.cx-meta{margin-top:.9rem;font-size:.88rem;color:var(--fg-3)}

/* ---------- the calculator: inputs on the left, the result on the right ---------- */
.cx>.cx-tool{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r-3);box-shadow:var(--shadow-1);overflow:hidden;padding:0!important;max-width:calc(var(--max) - 2 * var(--pad))!important;
  margin:0 auto}
.cx-tool+.cx-tool{margin-top:clamp(1.4rem,3vw,2.2rem)}
.cx-in{padding:clamp(1.25rem,3vw,2.4rem)}
.cx-in h2,.cx-out h2{font-size:1.35rem;letter-spacing:-.018em;margin-bottom:1.4rem}
.cx-out{background:var(--bg-2);padding:clamp(1.4rem,3vw,2.4rem);display:flex;flex-direction:column;border-left:1px solid var(--line)}
@media (max-width:979px){
  .cx>.cx-tool{grid-template-columns:1fr;margin-left:var(--pad);margin-right:var(--pad)}
  .cx-out{border-left:0;border-top:1px solid var(--line)}
}

/* a field: label and typed figure on one line, the slider under them */
.cx-f{margin:0 0 1.55rem}
.cx-f:last-child{margin-bottom:0}
.cx-top{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.cx-top label{display:flex;flex-direction:column;align-items:flex-start;gap:.35rem}
.cx-top label,.cx-lab{font-family:var(--f-display);font-weight:600;font-size:1.02rem;letter-spacing:-.008em;color:var(--fg);line-height:1.3}
.cx-num{display:inline-flex;align-items:center;gap:.35rem;min-height:48px;padding:0 .85rem;border:1.5px solid var(--line-2);border-radius:var(--r-2);
  background:var(--bg);transition:border-color .2s,box-shadow .2s;flex:0 0 11.5rem;max-width:60%}
.cx-num:focus-within{border-color:var(--blue);box-shadow:0 0 0 4px rgba(29,76,156,.14)}
.cx-num span{color:var(--fg-3);font-size:.95rem;white-space:nowrap}
.cx-box{border:0;background:transparent;outline:none;font-size:1.06rem;font-weight:600;color:var(--fg);width:100%;min-width:3.5rem;
  text-align:right;font-variant-numeric:tabular-nums;padding:0;height:44px}
.cx-box[aria-invalid="true"]{color:var(--brick)}
.cx-num:has(.cx-box[aria-invalid="true"]){border-color:var(--brick)}
.cx-err{color:var(--brick);font-size:.86rem;margin-top:.4rem}
.cx-help{font-size:.88rem;line-height:1.5;color:var(--fg-3);margin-top:.5rem;max-width:52ch}
.cx-tag{display:inline-block;padding:.08rem .55rem;border-radius:999px;background:var(--blue-tint);color:var(--blue-deep);
  font-family:var(--f-body);font-size:.76rem;font-weight:500;letter-spacing:0;line-height:1.45}

/* the slider: a hairline track, the part to the left of the thumb in brick */
.cx-range{-webkit-appearance:none;appearance:none;width:100%;height:28px;margin:.7rem 0 0;background:transparent;cursor:pointer;--p:50%}
.cx-range:focus{outline:none}
.cx-range::-webkit-slider-runnable-track{height:4px;border-radius:4px;background:linear-gradient(90deg,var(--brick) var(--p),var(--bg-3) var(--p))}
.cx-range::-moz-range-track{height:4px;border-radius:4px;background:var(--bg-3)}
.cx-range::-moz-range-progress{height:4px;border-radius:4px;background:var(--brick)}
.cx-range::-webkit-slider-thumb{-webkit-appearance:none;width:24px;height:24px;margin-top:-10px;border-radius:50%;background:var(--surface);
  border:2px solid var(--brick);box-shadow:0 2px 6px rgba(22,21,19,.18);transition:transform .16s var(--ease-out)}
.cx-range::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:var(--surface);border:2px solid var(--brick);box-shadow:0 2px 6px rgba(22,21,19,.18)}
.cx-range:active::-webkit-slider-thumb{transform:scale(1.12)}
.cx-range:focus-visible::-webkit-slider-thumb{outline:2px solid var(--blue);outline-offset:3px}
.cx-range:focus-visible::-moz-range-thumb{outline:2px solid var(--blue);outline-offset:3px}
.cx-scale{display:flex;justify-content:space-between;font-size:.8rem;color:var(--fg-3);margin-top:.15rem;font-variant-numeric:tabular-nums}

/* choices: one row of segments */
.cx-seg{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.7rem}
.cx-seg button{min-height:44px;padding:0 1.05rem;border-radius:999px;border:1.5px solid var(--line-2);background:transparent;
  font-family:var(--f-display);font-weight:600;font-size:.96rem;letter-spacing:-.005em;color:var(--fg-2);transition:background .2s,border-color .2s,color .2s,transform .16s var(--ease-out)}
.cx-seg button:hover{border-color:var(--fg);color:var(--fg)}
.cx-seg button:active{transform:scale(.97)}
.cx-seg button[aria-checked="true"]{background:var(--fg);border-color:var(--fg);color:var(--bg)}
.cx-seg.cx-fill{display:grid;grid-template-columns:repeat(auto-fit,minmax(4.6rem,1fr))}
.cx-seg.cx-fill button{padding:0 .5rem}
.cx-mode{margin-bottom:1.6rem;padding-bottom:1.4rem;border-bottom:1px solid var(--line)}
.cx-mode .cx-seg{margin-top:.7rem}

/* ---------- the result ---------- */
.cx-k{font-size:.95rem;color:var(--fg-2);margin:0}
.cx-big{font-family:var(--f-display);font-weight:600;font-size:clamp(2.3rem,1.5rem + 2vw,3.15rem);letter-spacing:-.035em;line-height:1;color:var(--fg);
  margin:.45rem 0 .5rem;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.cx-out[data-pkg]:not([data-pkg="essential"]) .cx-big{font-size:clamp(1.9rem,1.4rem + 2vw,2.7rem);letter-spacing:-.025em;line-height:1.08}
.cx-sub{font-size:.95rem;color:var(--fg-2)}
.cx-out[data-pkg="essential"] .cx-ref{display:none}
.cx-ref{font-size:.95rem;color:var(--fg-2);margin-top:.4rem}
.cx-dl{margin:1.4rem 0 0;padding:0;border-top:1px solid var(--line-2)}
.cx-dl div{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;padding:.8rem 0;border-bottom:1px solid var(--line)}
.cx-dl dt{color:var(--fg-2);font-size:.95rem}
.cx-dl dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums;text-align:right;color:var(--fg)}
.cx-rate{font-size:.84rem;line-height:1.55;color:var(--fg-3);margin-top:1.1rem}
.cx-acts{display:flex;flex-direction:column;gap:.6rem;margin-top:1.6rem}
.cx-acts .btn{width:100%}
.cx-wa{display:flex;align-items:center;justify-content:center;gap:.6rem;min-height:52px;border-radius:999px;border:1.5px solid var(--line-2);
  background:var(--surface);font-family:var(--f-display);font-weight:600;font-size:1rem;color:var(--fg);transition:border-color .2s}
.cx-wa svg{width:19px;height:19px;color:#15803D}
.cx-wa:hover{border-color:#15803D}

/* the share of principal and interest in what is repaid */
.cx-bar{height:12px;border-radius:999px;background:var(--sun);overflow:hidden;margin:1.3rem 0 .5rem;--p:50%}
.cx-bar i{display:block;height:100%;width:var(--p);background:var(--blue);border-radius:999px 0 0 999px;transition:width .22s var(--ease-out)}
.cx-key{display:flex;flex-wrap:wrap;gap:.3rem 1.1rem;font-size:.86rem;color:var(--fg-2)}
.cx-key b{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:.4rem;vertical-align:-.05em}
.cx-key .kp{background:var(--blue)}
.cx-key .ki{background:var(--sun)}

/* the converter: every unit in one list, the one typed marked */
.cx-picks{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.7rem}
.cx-picks button{min-height:44px;padding:0 .85rem;border-radius:999px;border:1px solid var(--line-2);background:var(--bg);font-size:.92rem;
  font-variant-numeric:tabular-nums;color:var(--fg-2);transition:border-color .2s,background .2s}
.cx-picks button:hover{border-color:var(--fg)}
.cx-picks button[aria-pressed="true"]{border-color:var(--brick);background:var(--brick-tint);color:var(--brick-deep)}
.cx-list{list-style:none;margin:1.3rem 0 0;padding:0;border-top:1px solid var(--line-2)}
.cx-list li{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;padding:.75rem 0;border-bottom:1px solid var(--line)}
.cx-list li span{color:var(--fg-2);font-size:.95rem}
.cx-list li b{font-weight:600;font-variant-numeric:tabular-nums;text-align:right;overflow-wrap:anywhere}
.cx-list li.is-from b{color:var(--fg-3);font-weight:500}
.cx-list li.is-from span::after{content:" (typed)";color:var(--fg-3)}

/* ---------- below the calculator ---------- */
.cx-how,.cx-faq,.cx-more{padding-top:clamp(2.6rem,6vw,4.6rem);padding-bottom:0}
.cx-how>*,.cx-faq>*{max-width:62rem}
.cx-how h2,.cx-faq h2,.cx-more h2{font-size:clamp(1.6rem,1.2rem + 1.6vw,2.4rem);letter-spacing:-.028em;margin-bottom:1rem}
.cx-how p{color:var(--fg-2);max-width:66ch;margin-top:.75rem}
.cx-how p:first-of-type{margin-top:0}
.cx-how .cx-eg{margin-top:1.1rem;padding:1rem 1.2rem;border-left:3px solid var(--blue);background:var(--surface);border-radius:0 var(--r-2) var(--r-2) 0;color:var(--fg-2)}
.cx-how .cx-eg b{color:var(--fg)}
.cx-faq details{max-width:62rem}
.cx-faq details .a p+p{margin-top:.6rem}
.cx-more{padding-bottom:clamp(3rem,7vw,5.5rem)!important}
.cx-cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,17rem),1fr));gap:1rem}
.cx-card{display:flex;flex-direction:column;height:100%;padding:1.3rem 1.35rem 1.2rem;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-2);
  transition:border-color .2s,transform .2s var(--ease-out),box-shadow .2s var(--ease-out)}
.cx-card b{font-family:var(--f-display);font-weight:600;font-size:1.12rem;letter-spacing:-.012em;line-height:1.25;color:var(--fg)}
.cx-card small{display:block;margin-top:.45rem;font-size:.92rem;line-height:1.5;color:var(--fg-2)}
.cx-card i{font-style:normal;margin-top:auto;padding-top:.9rem;font-family:var(--f-display);font-weight:600;font-size:.95rem;color:var(--brick);display:inline-flex;align-items:center;gap:.45rem}
.cx-card i svg{width:15px;height:15px;transition:transform .25s var(--ease-out)}
@media (hover:hover) and (pointer:fine){.cx-card:hover{border-color:var(--line-2);transform:translateY(-2px);box-shadow:var(--shadow-1)}.cx-card:hover i svg{transform:translateX(3px)}}
.cx-card .cx-lane{display:block;font-family:var(--f-body);font-size:.82rem;font-weight:500;color:var(--blue);margin-bottom:.4rem}

/* the hub: the three new calculators large, the older tools in a quieter row */
.cx-hub .cx-cards.cx-main{grid-template-columns:repeat(auto-fit,minmax(min(100%,19rem),1fr))}
.cx-hub .cx-main .cx-card{padding:1.6rem 1.6rem 1.4rem;min-height:13rem}
.cx-hub .cx-main .cx-card b{font-size:1.45rem}
.cx-hub h2.cx-h{font-size:clamp(1.4rem,1.15rem + 1vw,1.9rem);letter-spacing:-.022em;margin:clamp(2.2rem,5vw,3.4rem) 0 1rem}
.cx-hub .cx-list-sec{padding-top:0}

/* the night band's form: the call line beside it */
.cx-band h2{font-size:clamp(2.2rem,1.4rem + 3vw,3.7rem);max-width:14ch}
.cx-band .lead a{color:var(--on-night);text-decoration:underline;text-underline-offset:3px}
.cx-band .cx-callline{margin-top:1.2rem;font-size:.95rem;color:var(--on-night-2)}
.cx-band .cx-callline a{color:var(--on-night);font-weight:600;white-space:nowrap}
.cx-band .vd-consent{display:flex;gap:.55rem;align-items:flex-start;font-size:.8rem;line-height:1.45;margin:.6rem 0 .3rem}
.cx-band .vd-consent input{margin-top:.15em}

@media (max-width:600px){
  .cx-head h1{font-size:clamp(1.8rem,7.6vw,2.2rem)}
  .cx-answer{font-size:1rem;margin-top:.8rem}
  .cx-meta{display:none}
  .cx-head{padding-bottom:1.2rem}
  .cx-top{gap:.75rem}
  .cx-num{flex-basis:9.6rem;padding:0 .7rem}
  .cx-big{font-size:clamp(2.2rem,9.5vw,2.8rem)}
  .cx-in h2,.cx-out h2{margin-bottom:1rem}
}
@media (prefers-reduced-motion:reduce){.cx-bar i,.cx-card,.cx-seg button{transition:none}}
/* the night band runs the full width of the window, as on every other page */
.cx>section.cx-band{max-width:none;padding:0;margin-top:clamp(3rem,7vw,5rem)}
.cx-hub .cx-cards:not(.cx-main){grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))}

/* on a phone the common plot sizes are one row to swipe, so the result stays near the first screen */
@media (max-width:600px){
  .cx-picks{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;padding-bottom:.15rem}
  .cx-picks::-webkit-scrollbar{display:none}
  .cx-picks button{flex:none}
  .cx>.cx-tool{grid-template-columns:minmax(0,1fr)}     /* the swipe row scrolls inside the card; it never widens it */
}
/* the working, and the model of the example's plot beside it on a wide screen (under it on a phone) */
.cx-how-row{display:grid;grid-template-columns:minmax(0,1fr);gap:1.6rem;max-width:72rem!important}
.cx-art{margin:0}
.cx-art img{display:block;width:100%;max-width:30rem;height:auto}
.cx-art figcaption{margin-top:.4rem;font-size:.8rem;line-height:1.45;color:var(--fg-3)}
@media (min-width:900px){.cx-how-row{grid-template-columns:minmax(0,1fr) minmax(0,26rem);gap:3rem;align-items:center}}
