/* KOMCHAD เครื่องคำนวณค่าชาร์จรถ EV (/ev-charging-calculator/) — ใช้ตัวแปรสีของ .kc-x (รองรับโหมดมืด) */
.kce{--kce-card:var(--surface,#fff);--kce-edge:var(--line,#e6e8ed);--kce-sunk:var(--sunk,#f4f5f7);--kce-ink:var(--ink,#111114);--kce-text:var(--text,#2b2b31);--kce-muted:var(--muted,#5b6070);--kce-red:var(--red,#e11d2e);--kce-dark:#15171e;--kce-dark-edge:#262a35;--kce-old:#9aa0ab;--kce-track:#e3e5ea;--kce-good:#0b6b34;--kce-good-bg:#e7f5ec;--kce-sel:#fff5f6;padding-bottom:72px;background:var(--bg,#f4f5f7);color:var(--kce-text);font-family:var(--body,inherit)}
:root[data-theme="dark"] .kce{--kce-dark:#12141b;--kce-dark-edge:#232733;--kce-old:#6b7180;--kce-track:#2a2e3a;--kce-good:#5fd394;--kce-good-bg:rgba(52,199,123,.14);--kce-sel:rgba(255,46,72,.1)}
.kce>.wrap{display:flex;flex-direction:column;gap:56px;padding-top:18px}
.kce h1,.kce h2,.kce h3{font-family:var(--display,inherit);color:var(--kce-ink);margin:0}
.kce a{text-decoration:none}
.kce svg{flex:none}

/* หัวหน้า: แถบเข้มลายกริด */
.kce-hero{position:relative;overflow:hidden;isolation:isolate;border-radius:32px;padding:36px 44px 140px;color:#fff;background-color:#0e1015;background-image:linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);background-size:44px 44px;background-position:-1px -1px}
.kce-hero__o1,.kce-hero__o2{position:absolute;z-index:-1;border-radius:50%;border:1px solid rgba(225,29,46,.35);pointer-events:none}
.kce-hero__o1{right:-120px;top:-160px;width:520px;height:520px;animation:kceGlow 6s ease-in-out infinite}
.kce-hero__o2{right:-40px;top:-80px;width:360px;height:360px;border-color:rgba(225,29,46,.22)}
@keyframes kceGlow{0%,100%{opacity:.5}50%{opacity:1}}
.kce-hero .crumb{color:#b9bdc7;margin:0 0 18px}
.kce-hero .crumb a{color:#b9bdc7}.kce-hero .crumb a:hover{color:#fff}.kce-hero .crumb span{color:#fff}.kce-hero .crumb span[aria-hidden]{color:#6b7180}
.kce-hero__row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:28px}
.kce-hero__txt{max-width:760px;display:flex;flex-direction:column;gap:14px;animation:kceIn .6s both}
@keyframes kceIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.kce-badge{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;margin:0;font:500 13px/1 var(--display,inherit);letter-spacing:1.5px;color:#ffb3ba;border:1px solid rgba(255,179,186,.35);padding:7px 12px;border-radius:999px}
.kce-badge svg{width:14px;height:14px;color:#ff6276}
.kce-hero h1{color:#fff;font-size:clamp(34px,5vw,56px);font-weight:700;line-height:1.12;letter-spacing:-.5px;text-wrap:balance}
.kce-hero h1 span{color:#ff6276}
.kce-lead{margin:0;font-size:clamp(16px,1.6vw,18px);line-height:1.65;color:#c9ccd4;text-wrap:pretty}
.kce-trust{display:flex;flex-wrap:wrap;gap:10px;margin:0;padding:0;list-style:none;font-size:14px}
.kce-trust li{display:flex;align-items:center;gap:8px;padding:10px 14px;border-radius:14px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);color:#e4e6eb}
.kce-trust svg{width:16px;height:16px;color:#ff6276}

/* เครื่องคำนวณ */
.kce-app{position:relative;margin:-158px 20px 0;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:20px;align-items:start}
.kce-in{background:var(--kce-card);border:1px solid var(--kce-edge);border-radius:28px;padding:32px;display:flex;flex-direction:column;gap:0;min-width:0;box-shadow:0 30px 60px -40px rgba(14,16,21,.45)}
.kce-step{margin:0;padding:0;border:0;min-width:0;display:flex;flex-direction:column;gap:16px}
.kce-step+.kce-step{margin-top:30px;padding-top:30px;border-top:1px solid var(--kce-edge)}
.kce-step legend{float:left;width:100%;padding:0;margin:0 0 16px;display:flex;align-items:baseline;gap:12px;font:600 19px/1.35 var(--display,inherit);color:var(--kce-ink)}
.kce-step legend span{font-size:13px;letter-spacing:1px;color:var(--kce-red)}
.kce-step legend+*{clear:both}
.kce-cars{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.kce-chip{font:inherit;text-align:left;cursor:pointer;min-height:72px;padding:12px 14px;border-radius:16px;border:1.5px solid var(--kce-edge);background:var(--kce-card);color:var(--kce-ink);display:flex;flex-direction:column;justify-content:center;gap:4px;transition:border-color .2s,background-color .2s,transform .2s,box-shadow .2s}
.kce-chip:hover{transform:translateY(-1px);border-color:var(--kce-red)}
.kce-chip:focus-visible{outline:2px solid var(--kce-red);outline-offset:2px}
.kce-chip[aria-pressed="true"]{border-color:var(--kce-red);background:var(--kce-sel);box-shadow:0 8px 20px -12px rgba(225,29,46,.55)}
.kce-chip b{font:600 15px/1.3 var(--display,inherit)}
.kce-chip small{font-size:12.5px;color:var(--kce-muted);line-height:1.35}
.kce-chip>i{display:block;height:4px;border-radius:999px;background:var(--kce-sunk);overflow:hidden;margin-top:4px}
.kce-chip>i>i{display:block;height:100%;border-radius:inherit;background:var(--kce-old);transition:background-color .2s}
.kce-chip[aria-pressed="true"]>i>i{background:var(--kce-red)}
.kce-places{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.kce-place{flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;min-height:64px}
.kce-place>span:last-child{display:flex;flex-direction:column;gap:1px;min-width:0}
.kce-place__ic{flex:none;width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--kce-sunk);color:var(--kce-text);transition:background-color .2s,color .2s}
.kce-place[aria-pressed="true"] .kce-place__ic{background:var(--kce-red);color:#fff}
.kce-grid2,.kce-grid3{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 24px}
.kce-grid3{grid-template-columns:repeat(3,minmax(0,1fr))}
.kce-f{display:flex;flex-direction:column;min-width:0}
.kce-f label{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:14px;color:var(--kce-muted)}
.kce-f output{flex:none;font:600 14px/1.2 var(--display,inherit);color:var(--kce-ink);background:var(--kce-sunk);padding:4px 10px;border-radius:8px;font-variant-numeric:tabular-nums}
.kce input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:32px;margin:0;background:transparent;cursor:pointer;touch-action:pan-y}
.kce input[type=range]::-webkit-slider-runnable-track{height:6px;border-radius:999px;background:linear-gradient(90deg,var(--kce-red) var(--p,0%),var(--kce-track) var(--p,0%))}
.kce input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;margin-top:-8px;border-radius:50%;background:#fff;border:3px solid var(--kce-red);box-shadow:0 2px 8px rgba(17,19,26,.25);transition:transform .15s}
.kce input[type=range]:active::-webkit-slider-thumb{transform:scale(1.12)}
.kce input[type=range]::-moz-range-track{height:6px;border-radius:999px;background:var(--kce-track)}
.kce input[type=range]::-moz-range-progress{height:6px;border-radius:999px;background:var(--kce-red)}
.kce input[type=range]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:#fff;border:3px solid var(--kce-red);box-shadow:0 2px 8px rgba(17,19,26,.25)}
.kce input[type=range]:focus-visible{outline:2px solid var(--kce-red);outline-offset:4px;border-radius:8px}
.kce-bat{display:flex;flex-direction:column;gap:12px;background:var(--kce-sunk);border:1px solid var(--kce-edge);border-radius:20px;padding:18px 20px}
.kce-bat__top{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;font-size:14px;color:var(--kce-muted)}
.kce-bat__top b{font:600 18px/1 var(--display,inherit);color:var(--kce-ink);font-variant-numeric:tabular-nums}
.kce-bat__top b.is-red{color:var(--kce-red)}
.kce-bat__top>b{font-size:14px}
.kce-bat__body{display:flex;align-items:center;gap:4px}
.kce-bat__cells{flex:1;display:flex;gap:3px;height:34px;padding:4px;border:2px solid var(--kce-ink);border-radius:10px;background:var(--kce-card)}
.kce-bat__cells i,.kce-bat__key i{flex:1;border-radius:3px;background:var(--kce-track);transition:background-color .25s}
.kce-bat__cells i.is-old,.kce-bat__key i.is-old{background:var(--kce-old)}
.kce-bat__cells i.is-new,.kce-bat__key i.is-new{background:var(--kce-red)}
.kce-bat__cap{width:5px;height:14px;border-radius:0 3px 3px 0;background:var(--kce-ink)}
.kce-bat__key{display:flex;flex-wrap:wrap;gap:16px;margin:0;font-size:12.5px;color:var(--kce-muted)}
.kce-bat__key span{display:flex;align-items:center;gap:6px}
.kce-bat__key i{flex:none;width:10px;height:10px}

/* ผลลัพธ์ */
.kce-out{position:sticky;top:calc(var(--kc-sticky,96px) + 16px);display:flex;flex-direction:column;gap:14px;min-width:0}
.kce-res{border-radius:28px;padding:28px;background:var(--kce-dark);border:1px solid var(--kce-dark-edge);color:#fff;box-shadow:0 40px 70px -40px rgba(225,29,46,.6);display:flex;flex-direction:column;gap:22px}
.kce-res__top{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.kce-res__top h2{color:#c9ccd4;font-size:15px;font-weight:500}
.kce-res__top span{font-size:12.5px;color:#e4e6eb;background:rgba(255,255,255,.08);padding:5px 11px;border-radius:999px}
.kce-res__row{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.kce-ring{position:relative;flex:none;width:196px;height:196px}
.kce-ring svg{width:100%;height:100%;display:block}
.kce-ring circle{fill:none;stroke-width:14}
.kce-ring__bg{stroke:var(--kce-dark-edge)}
.kce-ring__old{stroke:#5b6070;transition:stroke-dasharray .45s cubic-bezier(.2,.8,.2,1)}
.kce-ring__new{stroke:#ff3b4e;stroke-linecap:round;transition:stroke-dasharray .45s cubic-bezier(.2,.8,.2,1),stroke-dashoffset .45s cubic-bezier(.2,.8,.2,1)}
.kce-ring__c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-align:center}
.kce-ring__c small{font-size:12px;color:#b9bdc7}
.kce-ring__c b{font:700 40px/1.1 var(--display,inherit);letter-spacing:-.5px;color:#fff!important;font-variant-numeric:tabular-nums}
.kce-ring__c span{font:500 13px/1.2 var(--display,inherit);color:#ff8a96}
.kce-kv{flex:1 1 150px;min-width:0;margin:0;display:flex;flex-direction:column}
.kce-kv div{display:flex;flex-direction:column;gap:2px;padding:12px 0;border-bottom:1px solid var(--kce-dark-edge)}
.kce-kv div:first-child{padding-top:0}.kce-kv div:last-child{border-bottom:0;padding-bottom:0}
.kce-kv dt{font-size:12px;color:#b9bdc7}
.kce-kv dd{margin:0;font:600 20px/1.25 var(--display,inherit);color:#fff;font-variant-numeric:tabular-nums}
.kce-sum{background:var(--kce-card);border:1px solid var(--kce-edge);border-radius:24px;padding:24px;display:flex;flex-direction:column;gap:18px}
.kce-sum__two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.kce-sum__two div{background:var(--kce-sunk);border-radius:16px;padding:14px 16px}
.kce-sum__two small{font-size:13px;color:var(--kce-muted)}
.kce-sum__two b{display:block;margin-top:2px;font:700 26px/1.2 var(--display,inherit);color:var(--kce-ink);font-variant-numeric:tabular-nums}
.kce-cmp{display:flex;flex-direction:column;gap:10px}
.kce-cmp h3{font-size:14px;font-weight:600}
.kce-cmp__row{display:grid;grid-template-columns:70px 1fr auto;align-items:center;gap:10px;font-size:14px}
.kce-cmp__row b{font:600 14px/1 var(--display,inherit);color:var(--kce-ink);font-variant-numeric:tabular-nums}
.kce-cmp__bar{height:10px;border-radius:999px;background:var(--kce-sunk);overflow:hidden}
.kce-cmp__bar i{display:block;height:100%;border-radius:inherit;background:var(--kce-red);transition:width .45s cubic-bezier(.2,.8,.2,1)}
.kce-cmp__bar i.is-fuel{background:var(--kce-muted)}
.kce-save{border-radius:18px;background:#e11d2e;color:#fff;padding:18px 20px;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;font-size:15px}
.kce-save__v{text-align:right;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:baseline;gap:0 4px}
.kce-save__v b{font:700 28px/1.1 var(--display,inherit);color:#fff!important;font-variant-numeric:tabular-nums}
.kce-save__v small{font-size:15px}
.kce-save__v em{flex-basis:100%;font-style:normal;font-size:13px}
.kce-share{font:600 15px/1 var(--display,inherit);min-height:48px;padding:12px 18px;border-radius:14px;border:0;background:#15171e;color:#fff!important;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px}
.kce-share[hidden]{display:none}
.kce-share:hover{background:#000}
:root[data-theme="dark"] .kce-share{background:#fff;color:#111114!important}
.kce-share svg{width:16px;height:16px}
.kce-share:focus-visible{outline:2px solid var(--kce-red);outline-offset:2px}
.kce-note{margin:0;font-size:12.5px;line-height:1.6;color:var(--kce-muted);padding:0 8px}

/* ตาราง */
.kce-sec{display:flex;flex-direction:column;gap:14px}
.kce-sec h2,.kce-faq h2{font-size:clamp(22px,2.4vw,28px);line-height:1.3;font-weight:700}
.kce-sec__d{margin:0;color:var(--kce-muted);line-height:1.6}
.kce-sec__h{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.kce-tbl{overflow-x:auto;border:1px solid var(--kce-edge);border-radius:22px;background:var(--kce-card)}
.kce-tbl table{width:100%;border-collapse:collapse;min-width:680px;font-size:15px}
.kce-tbl th,.kce-tbl td{padding:14px 20px;text-align:left;font-variant-numeric:tabular-nums}
.kce-tbl thead th{font:500 13px/1.3 var(--display,inherit);color:var(--kce-muted)}
.kce-tbl tbody tr{border-top:1px solid var(--kce-edge);transition:background-color .2s}
.kce-tbl tbody tr.is-on{background:var(--kce-sel)}
.kce-tbl tbody th{font:600 15px/1.3 var(--display,inherit);color:var(--kce-ink)}
.kce-tbl tbody th small{display:block;font:400 12.5px/1.3 var(--body,inherit);color:var(--kce-muted)}
.kce-good{font-weight:600;color:var(--kce-good);background:var(--kce-good-bg);padding:3px 9px;border-radius:8px}

/* วิธีคำนวณ */
.kce-how{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.kce-card{border-radius:24px;padding:28px;display:flex;flex-direction:column;gap:12px;background:var(--kce-card);border:1px solid var(--kce-edge)}
.kce-card h2{font-size:21px;line-height:1.35}
.kce-card p{margin:0;line-height:1.7;color:var(--kce-muted)}
.kce-card.is-dark{background:var(--kce-dark);border-color:var(--kce-dark-edge)}
.kce-card.is-dark h2{color:#fff}.kce-card.is-dark p{color:#c9ccd4}
.kce-card__ic{width:44px;height:44px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:var(--red-soft,#fde8ea);color:var(--kce-red)}
.kce-formula{margin-top:auto!important;border:1px solid #2e323d;border-radius:14px;padding:14px 16px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font:500 16px/1.3 var(--display,inherit)}
.kce-formula b{color:#ff8a96!important}
.kce-more{margin-top:auto;font:600 15px/1.3 var(--display,inherit);color:var(--kce-red)}
.kce-more:hover{text-decoration:underline}

/* FAQ */
.kce-faq{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:24px 48px;align-items:start}
.kce-faq>div:first-child{display:flex;flex-direction:column;gap:10px}
.kce-faq__list{border-top:1px solid var(--kce-edge)}
.kce-faq details{border-bottom:1px solid var(--kce-edge);padding:18px 4px}
.kce-faq summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;font:600 17px/1.45 var(--display,inherit);color:var(--kce-ink)}
.kce-faq summary::-webkit-details-marker{display:none}
.kce-faq summary svg{width:18px;height:18px;color:var(--kce-red);transition:transform .2s}
.kce-faq details[open] summary svg{transform:rotate(45deg)}
.kce-faq details p{margin:10px 0 0;line-height:1.75;color:var(--kce-muted)}

/* ข่าว */
.kce-news{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.kce-news__i{display:flex;flex-direction:column;gap:8px;color:var(--kce-ink)}
.kce-news__img{display:block;aspect-ratio:16/10;border-radius:18px;overflow:hidden;background:var(--kce-sunk)}
.kce-news__img .cv,.kce-news__img img{width:100%;height:100%;object-fit:cover;display:block;border-radius:0;transition:transform .4s}
.kce-news__i:hover img{transform:scale(1.04)}
.kce-news__i small{font:600 12px/1.3 var(--display,inherit);color:var(--kce-red)}
.kce-news__i h3{font-size:16px;font-weight:600;line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.kce-news__i:hover h3{color:var(--kce-red)}

@media (max-width:1080px){
	.kce-app{grid-template-columns:minmax(0,1fr);margin:-158px 0 0}
	.kce-out{position:static}
	.kce-how{grid-template-columns:minmax(0,1fr)}
	.kce-news{grid-template-columns:repeat(2,minmax(0,1fr))}
	.kce-faq{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:640px){
	.kce>.wrap{gap:40px}
	.kce-hero{border-radius:24px;padding:24px 20px 150px}
	.kce-hero__o1{width:340px;height:340px;right:-160px;top:-140px}
	.kce-hero__o2{display:none}
	.kce-app{margin-top:-130px}
	.kce-in{padding:20px;border-radius:22px}
	.kce-res,.kce-sum{padding:20px;border-radius:22px}
	.kce-cars{grid-template-columns:repeat(2,minmax(0,1fr))}
	.kce-places{grid-template-columns:minmax(0,1fr)}
	.kce-grid2,.kce-grid3{grid-template-columns:minmax(0,1fr)}
	.kce-res__row{justify-content:center}
	.kce-ring{width:176px;height:176px}
	.kce-ring__c b{font-size:34px}
	.kce-kv{flex-basis:100%}
	.kce-sum__two b{font-size:22px}
	.kce-news{grid-template-columns:minmax(0,1fr)}
	.kce-news__i{display:grid;grid-template-columns:120px minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:14px;row-gap:4px}
	.kce-news__img{grid-row:1/3;border-radius:12px}
	.kce-news__i h3{font-size:15px}
}
@media (prefers-reduced-motion:reduce){.kce *{animation:none!important;transition:none!important}}
