/* Tuning calculator widget – themed through CSS variables from the dashboard */
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--w-bg);color:var(--w-text);font:15px/1.55 var(--w-font);-webkit-font-smoothing:antialiased}
.tw{max-width:1120px;margin:0 auto;padding:18px 20px 12px;
  --pn-head:color-mix(in srgb,var(--w-text) 4%,var(--w-surface));
  --r:min(var(--w-radius),12px)}
h1,h2,h3,p,dl,dd,ul{margin:0}
button,select,input{font:inherit;color:inherit}

/* header (optional logo + title) */
.tw-header{display:flex;align-items:center;gap:16px;margin:0 0 14px}
.tw-logo{display:block;max-width:220px;width:auto;object-fit:contain}
.tw-title{font-size:17px;font-weight:600;letter-spacing:-.01em}
.tw-subtitle{color:var(--w-muted);font-size:13.5px;margin-top:1px}

/* selector bar */
.tw-bar{display:grid;grid-template-columns:1fr 1fr 1.35fr 1.35fr;gap:8px}
.tw-field{display:block;background:var(--w-surface);border:1px solid var(--w-border);border-radius:var(--r);padding:8px 14px 9px;transition:border-color .15s}
.tw-field:focus-within,.tw-search:focus-within{border-color:var(--w-primary)}
.tw-label{display:block;color:var(--w-muted);font-size:12px;line-height:1.3}
.tw-field select{display:block;width:100%;margin-top:1px;padding:2px 18px 2px 0;border:0;background:transparent;font-weight:500;font-size:15.5px;
  appearance:none;-webkit-appearance:none;cursor:pointer;text-overflow:ellipsis;outline:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 2px center}
.tw-field select:disabled{color:var(--w-muted);cursor:not-allowed;font-weight:400}
.tw-field select option,.tw-field select optgroup{background:var(--w-surface);color:var(--w-text)}
.tw-field select optgroup{font-weight:700;font-style:normal}
.tw-field select option{font-weight:400}
html{color-scheme:light}
html[data-mode=dark]{color-scheme:dark}
@media (prefers-color-scheme:dark){html[data-mode=auto]{color-scheme:dark}}
.tw-search{grid-column:1/-1;position:relative;display:flex;align-items:center;gap:8px;background:var(--w-surface);border:1px solid var(--w-border);border-radius:var(--r);padding:0 14px;color:var(--w-muted);min-height:48px}
.tw-search input{flex:1;min-width:0;border:0;background:transparent;outline:0;font-size:15px;color:var(--w-text);padding:12px 0}
.tw-search input::placeholder{color:var(--w-muted)}
.tw-status{font-size:12.5px;color:var(--w-muted);white-space:nowrap;display:flex;align-items:center;gap:6px}
.tw-spinner{width:12px;height:12px;border:2px solid var(--w-border);border-top-color:var(--w-primary);border-radius:50%;animation:tw-spin .7s linear infinite}
@keyframes tw-spin{to{transform:rotate(360deg)}}
.tw-search-results{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 6px);background:var(--w-bg);border:1px solid var(--w-border);border-radius:var(--r);
  max-height:320px;overflow:auto;box-shadow:0 12px 32px rgba(0,0,0,.28)}
.tw-search-item{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;cursor:pointer;border-bottom:1px solid var(--w-border);color:var(--w-text)}
.tw-search-item:last-child{border:0}
.tw-search-item small{color:var(--w-muted);white-space:nowrap}
.tw-search-item:hover,.tw-search-item.active{background:var(--pn-head)}

/* empty state */
.tw-placeholder{padding:56px 16px 48px;text-align:center}
.tw-placeholder h3{font-size:17px;font-weight:600}
.tw-placeholder p{color:var(--w-muted);margin-top:4px}

/* title */
.tw-crumb{display:flex;flex-wrap:wrap;gap:8px;color:var(--w-muted);font-size:13.5px;margin:22px 0 6px}
.tw-crumb i{font-style:normal;opacity:.5}
.tw-crumb b{color:var(--w-text);font-weight:500}
.tw-vehicle-name{font-size:clamp(26px,4.2vw,36px);line-height:1.1;font-weight:650;letter-spacing:-.03em;margin:0 0 18px}

/* panels */
.tw-pn{background:var(--w-surface);border:1px solid var(--w-border);border-radius:calc(var(--r) + 2px);overflow:hidden}
.tw-main{display:grid;grid-template-columns:5fr 6fr;gap:14px;align-items:start}
.tw-main.tw-single{grid-template-columns:1fr}
.tw-col{display:flex;flex-direction:column;gap:14px;min-width:0}
.tw-res{display:flex;flex-direction:column}
.tw-tabs{display:flex;gap:2px;padding:0 8px;background:var(--pn-head);border-bottom:1px solid var(--w-border);overflow-x:auto;scrollbar-width:none}
.tw-tab{border:0;background:transparent;padding:14px 16px 13px;font-weight:500;color:var(--w-muted);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.tw-tab:hover{color:var(--w-text)}
.tw-tab.on{color:var(--w-text);border-bottom-color:var(--w-primary)}
.tw-tab:focus-visible,.tw-lg:focus-visible,.tw-faq summary:focus-visible{outline:2px solid var(--w-primary);outline-offset:-2px}

.tw-tbl{padding:4px 22px 10px;font-variant-numeric:tabular-nums}
.tw-hd,.tw-rw{display:grid;grid-template-columns:1fr 1fr 1fr 1.1fr;align-items:center;gap:6px}
.tw-hd{color:var(--w-muted);font-size:13px;padding:16px 0 10px}
.tw-hd span+span,.tw-rw span+span{text-align:right}
.tw-rw{padding:20px 0;border-top:1px solid var(--w-border)}
.tw-rl{font-weight:500}
.tw-o{font-size:20px;color:var(--w-muted);font-weight:500;letter-spacing:-.01em}
.tw-t{font-size:27px;font-weight:650;letter-spacing:-.025em;color:var(--w-primary)}
.tw-d{font-size:20px;font-weight:600;color:var(--good);letter-spacing:-.01em;line-height:1.1}
.tw-rw small{font-size:13px;font-weight:400;color:var(--w-muted);margin-left:3px;letter-spacing:0}
.tw-d em{display:block;font-style:normal;font-size:12.5px;font-weight:500;color:var(--w-muted);margin-top:2px}
.tw-mods{margin:0 22px 14px;padding:14px 16px;border:1px solid var(--w-border);border-left:3px solid var(--w-primary);border-radius:10px;background:rgba(var(--w-primary-rgb),.06)}
.tw-mods b{font-size:14px}.tw-mods p{margin:4px 0 10px;color:var(--w-muted);font-size:13px}
.tw-mods ul{list-style:none;display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:0}
.tw-mods li{padding:5px 11px;border-radius:999px;border:1px solid var(--w-border);background:var(--w-bg);font-size:13px;font-weight:600}
.tw-tl{list-style:none;display:flex;flex-wrap:wrap;gap:5px;padding:0;margin:6px 0 0}
.tw-tl li{display:flex;align-items:center;padding:3px 9px;border-radius:6px;border:1px solid var(--w-border);background:var(--w-bg);font-size:12px;font-weight:600;height:26px}
.tw-tl li.lg{background:#fff;border-color:#e3e6ea;padding:3px 8px}
.tw-tl li.lg img{display:block;height:16px;max-width:76px;object-fit:contain}
.tw-est{margin:0 22px 12px;color:var(--w-muted);font-size:12.5px;font-style:italic}
.tw-opts{list-style:none;display:flex;flex-wrap:wrap;gap:5px;padding:0;margin:6px 0 0}
.tw-opts li{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px 0 8px;border-radius:999px;border:1px solid var(--w-border);background:rgba(var(--w-primary-rgb),.07);font-size:12.5px;font-weight:600;color:var(--w-text)}
.tw-opts li svg{color:var(--w-primary);flex:none}
.tw-stnote{padding:0 22px 18px;color:var(--w-muted);font-size:13.5px}
.tw-q{padding:18px 22px 20px;border-top:1px solid var(--w-border);margin-top:auto}
.tw-q h3{font-size:15px;font-weight:600;margin-bottom:6px}
.tw-nodata{padding:28px 22px;color:var(--w-muted)}

/* chart panel */
.tw-gr{display:flex;flex-direction:column}
.tw-ph{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:15px 20px;background:var(--pn-head);border-bottom:1px solid var(--w-border)}
.tw-ph b{font-weight:600}.tw-ph span{color:var(--w-muted);font-size:13px}
.tw-cw{background:var(--w-bg);padding:14px 8px 4px;flex:1}
.tw-chart{display:block;width:100%;height:auto;overflow:visible}
.tw-chart .gm{stroke:var(--w-border);stroke-width:1;opacity:.55}
.tw-chart .gj{stroke:var(--w-border);stroke-width:1}
.tw-chart .ax{fill:var(--w-muted);font-size:12px;font-family:inherit}
.tw-chart .ax.unit{font-weight:600}
.tw-chart .wmi{opacity:.28;pointer-events:none}
.tw-chart .wm{fill:var(--w-text);opacity:.07;font-size:34px;font-weight:800;font-family:inherit}
.tw-chart .ln{fill:none;stroke-linejoin:round;stroke-linecap:round}
.tw-chart .ln.o{stroke:var(--w-curve-o,#5b8cff);stroke-width:2.4}
.tw-chart .ln.t{stroke:var(--w-curve-t,var(--w-primary));stroke-width:2.8}
.tw-chart .pk rect{fill:var(--w-bg);stroke:var(--w-primary);stroke-width:1}
.tw-chart .pk text{fill:var(--w-primary);font-size:11px;font-weight:700;font-family:inherit}
.tw-chart .dot{fill:var(--w-primary);stroke:var(--w-bg);stroke-width:2}
.tw-chart g[data-s]{transition:opacity .25s}
.tw-chart g[data-s].off{opacity:.1}
.tw-key{display:flex;flex-wrap:wrap;gap:6px 18px;padding:10px 20px 14px;background:var(--w-bg);color:var(--w-muted);font-size:13px;align-items:center}
.tw-lg{display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;padding:2px 0;cursor:pointer;color:var(--w-muted)}
.tw-lg:hover{color:var(--w-text)}.tw-lg.off{opacity:.45;text-decoration:line-through}
.tw-key i{display:inline-block;width:18px;height:0;border-top:2.5px solid}
.tw-key i.o{border-color:var(--w-curve-o,#5b8cff)}.tw-key i.t{border-color:var(--w-curve-t,var(--w-primary))}
.tw-key i.m{border-color:var(--w-muted)}.tw-key i.m.d{border-top-style:dashed}
.tw-lk{display:inline-flex;align-items:center;gap:8px}

/* lower panels */
.tw-low{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px;margin-top:14px;align-items:start}
.tw-box{padding:20px 22px 22px}
.tw-box h3{font-size:16px;font-weight:600;letter-spacing:-.01em;margin-bottom:10px}
.tw-box h3.tw-mt{margin-top:20px}
.tw-box p{color:var(--w-muted);font-size:14.5px}
.tw-ck{list-style:none;padding:0}
.tw-ck li{position:relative;padding:8px 0 8px 26px;border-top:1px solid var(--w-border)}
.tw-ck li:first-child{border-top:0}
.tw-ck li::before{content:"";position:absolute;left:2px;top:13px;width:11px;height:6px;border-left:2px solid var(--w-primary);border-bottom:2px solid var(--w-primary);transform:rotate(-45deg)}
.tw-dl{display:grid;grid-template-columns:auto 1fr}
.tw-dl dt,.tw-dl dd{padding:8px 0;border-top:1px solid var(--w-border)}
.tw-dl dt:first-of-type,.tw-dl dd:first-of-type{border-top:0}
.tw-dl dt{color:var(--w-muted);padding-right:16px}
.tw-dl dd{text-align:right;font-weight:500}
.tw-imgbox{margin-top:14px}
.tw-chart-img{display:block;width:100%;height:auto;border-radius:8px;margin-top:6px}

/* SEO text */
.tw-seo{display:grid;grid-template-columns:1.2fr 1fr;gap:12px 48px;margin-top:48px}
.tw-seo article h2{font-size:24px;line-height:1.15;font-weight:650;letter-spacing:-.02em;margin-bottom:14px}
.tw-seo article p{margin-bottom:13px;max-width:66ch}
.tw-faq h3{font-size:16px;font-weight:600;margin-bottom:8px}
.tw-faq details{border-top:1px solid var(--w-border)}
.tw-faq details:last-child{border-bottom:1px solid var(--w-border)}
.tw-faq summary{list-style:none;cursor:pointer;padding:13px 28px 13px 0;font-weight:500;position:relative}
.tw-faq summary::-webkit-details-marker{display:none}
.tw-faq summary::after{content:"+";position:absolute;right:2px;top:11px;color:var(--w-primary);font-size:20px;line-height:1.2}
.tw-faq details[open] summary::after{content:"–"}
.tw-faq details p{color:var(--w-muted);padding:0 0 14px;max-width:60ch}
.tw-note{grid-column:1/-1;color:var(--w-muted);font-size:13px}

/* compact (paid iframe): small brand logo top right, no helper / footer text */
.tw-brand{display:inline-flex;align-items:center;margin-left:auto;flex:0 0 auto;text-decoration:none;opacity:.92;transition:opacity .15s}
a.tw-brand:hover{opacity:1}
.tw-brand img{height:34px;width:auto;max-width:min(320px,55vw);display:block}
.tw-brand-pre{font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--w-muted,var(--w-text));opacity:.65;margin-right:8px;white-space:nowrap}
.tw-brand .inv-k{filter:brightness(0)}
.tw-brand .inv-w{filter:brightness(0) invert(1)}
html[data-brandbg=dark] .tw-brand-pre,html[data-brandbg=dark] .tw-brand-txt{color:#c9ced8!important}
html[data-brandbg=light] .tw-brand-pre,html[data-brandbg=light] .tw-brand-txt{color:#4b5563!important}
html[data-brandbg=dark] .tw-brand .b-light{display:none!important}
html[data-brandbg=dark] .tw-brand .b-dark{display:block!important}
html[data-brandbg=light] .tw-brand .b-dark{display:none!important}
html[data-brandbg=light] .tw-brand .b-light{display:block!important}
.tw-brandrow{display:flex;justify-content:flex-end;margin:0 0 10px}
.tw-brand-txt{font-weight:800;font-size:12px;letter-spacing:.05em;color:var(--w-text);white-space:nowrap}
.tw-compact .tw-footer,.tw-compact #tw-placeholder,.tw-compact .tw-result.tw-empty{display:none}
html[data-mode=dark] .tw-brand .b-light,html[data-mode=light] .tw-brand .b-dark,html[data-mode=auto] .tw-brand .b-dark{display:none}
@media (prefers-color-scheme:dark){html[data-mode=auto] .tw-brand .b-dark{display:block}html[data-mode=auto] .tw-brand .b-light{display:none}}

/* compact density */
.tw-compact{padding:8px 10px 4px}
.tw-compact .tw-header{margin:0 0 6px;gap:10px}
.tw-compact .tw-subtitle{display:none}
.tw-compact .tw-title{font-size:15px}
.tw-compact .tw-bar{gap:6px}
.tw-compact .tw-field{padding:5px 12px 6px}
.tw-compact .tw-label{font-size:11px}
.tw-compact .tw-field select{font-size:14.5px;padding-top:1px;padding-bottom:1px}
.tw-compact .tw-search{min-height:38px}
.tw-compact .tw-search input{padding:8px 0;font-size:14px}

/* footer */
.tw-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;padding:30px 0 10px;color:var(--w-muted);font-size:13px}
.tw-powered a,.tw-powered b{color:var(--w-primary);font-weight:600;text-decoration:none}

/* blocked */
.tw-blocked{padding:56px 20px;text-align:center}
.tw-blocked-icon{width:40px;height:40px;border-radius:50%;background:rgba(var(--w-primary-rgb),.15);color:var(--w-primary);display:grid;place-items:center;font-weight:800;margin:0 auto 12px}
.tw-blocked h2{font-size:18px}.tw-blocked p{color:var(--w-muted);margin-top:4px}

@media (max-width:900px){
  .tw-main,.tw-seo{grid-template-columns:1fr}
  .tw-main{gap:14px}.tw-col{display:contents}.tw-res{order:1}.tw-gr{order:2}.tw-tech{order:3}.tw-c2>.tw-box{order:4}
  .tw-bar{grid-template-columns:1fr 1fr}
}
@media (max-width:560px){
  .tw{padding:14px 12px 8px}
  .tw-bar{grid-template-columns:1fr}
  .tw-tbl{padding:2px 14px 6px}
  .tw-o{font-size:16px}.tw-t{font-size:21px}.tw-d{font-size:16px}
  .tw-hd{font-size:12px}
  .tw-hd,.tw-rw{grid-template-columns:.9fr 1fr 1fr 1fr;gap:4px}
  .tw-ph{padding:13px 14px}.tw-key{padding:8px 14px 12px}
  .tw-box{padding:18px 16px}
  .tw-q{padding:16px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ---- advertising block (free plan) -------------------------------------- */
.tw-ad{display:grid;grid-template-columns:minmax(160px,300px) 1fr;gap:28px;align-items:center;margin:28px 0 8px;padding:28px;background:var(--w-surface);border:1px solid var(--w-border);border-radius:var(--w-radius)}
.tw-ad-logo{display:flex;align-items:center;justify-content:center;background:#fff;border-radius:calc(var(--w-radius) * .8);min-height:130px;padding:20px;text-decoration:none}
.tw-ad-logo img{max-width:100%;max-height:110px;width:auto;height:auto;display:block}
.tw-ad-wordmark{color:#111;font-weight:800;font-size:22px;letter-spacing:-.01em}
.tw-ad-kicker{margin:0 0 6px;color:var(--w-muted);font-size:15px}
.tw-ad-kicker b{color:var(--w-text)}
.tw-ad-text{margin:0 0 14px;color:var(--w-text);font-size:16px;line-height:1.5}
.tw-ad-list{list-style:none;margin:0 0 16px;padding:0;display:grid;gap:8px}
.tw-ad-list li{display:flex;align-items:center;gap:10px;color:var(--w-text);font-size:15px}
.tw-ad-list svg{flex:none;color:var(--w-primary)}
.tw-ad-btn{display:inline-flex;align-items:center;gap:8px;padding:11px 20px;border-radius:var(--w-radius);background:var(--w-primary);color:var(--w-primary-text,#fff);font-weight:700;font-size:14px;text-decoration:none}
.tw-ad-btn:hover{filter:brightness(1.08)}
@media (max-width:700px){.tw-ad{grid-template-columns:1fr;gap:18px;padding:18px}.tw-ad-logo{min-height:96px}}

/* ---- fuel switch -------------------------------------------------------- */
.tw-fuel{display:inline-flex;margin:0 0 10px;padding:3px;gap:2px;background:var(--w-surface);border:1px solid var(--w-border);border-radius:var(--w-radius)}
.tw-fuel button{appearance:none;border:0;background:transparent;color:var(--w-muted);font:inherit;font-size:13px;font-weight:600;padding:7px 16px;border-radius:calc(var(--w-radius) * .7);cursor:pointer;transition:background .15s,color .15s}
.tw-fuel button:hover{color:var(--w-text)}
.tw-fuel button.on{background:var(--w-primary);color:var(--w-primary-text,#fff)}
.tw-fuel button:focus-visible{outline:2px solid var(--w-primary);outline-offset:2px}

.tw-opt-tiles{display:flex;flex-wrap:wrap;gap:12px 16px;margin-top:8px;align-items:center}
.tw-opt-tiles .tw-ot{display:flex;align-items:center;justify-content:center;width:auto;height:auto;min-height:0;padding:2px;border:0;border-radius:6px;background:none;cursor:default}
.tw-opt-tiles .tw-ot img{height:24px;width:auto;max-width:56px;object-fit:contain;display:block}
.tw-opt-tiles .tw-ot .o-k{display:none}
html[data-brandbg=light] .tw-opt-tiles .tw-ot .o-w{display:none}
html[data-brandbg=light] .tw-opt-tiles .tw-ot .o-k{display:block}
.tw-opt-tiles .tw-ot-x{height:auto;padding:0 8px 0 6px}
.tw-opt-tiles .tw-ot-x svg{width:17px;height:17px;color:var(--w-primary)}
/* instant tooltip (hover, keyboard focus and tap) */
[data-tip]{position:relative}
[data-tip]::after{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 7px);transform:translateX(-50%) translateY(3px);background:#0e121a;border:1px solid rgba(255,255,255,.22);color:#fff;font-size:12px;font-weight:600;line-height:1.2;padding:6px 9px;border-radius:7px;white-space:nowrap;box-shadow:0 4px 14px rgba(0,0,0,.35);opacity:0;pointer-events:none;transition:opacity .12s,transform .12s;z-index:30}
[data-tip]:hover::after,[data-tip]:focus-visible::after,[data-tip]:focus::after{opacity:1;transform:translateX(-50%) translateY(0)}
[data-tip]:focus{outline:none}
