*{box-sizing:border-box}
:root{
  --navy:#101b31;
  --text:#182235;
  --muted:#667085;
  --line:#e3e8f1;
  --page:#f5f7fb;
  --card:#ffffff;
  --red:#e6373f;
  --red-dark:#b91c2b;
  --red-soft:#fff3f4;
  --blue:#2563eb;
  --green:#138a4b;
  --amber:#b06b00;
}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Tahoma,"Noto Sans Thai",Arial,sans-serif;
  background:var(--page);
  color:var(--text);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit}
button,input{font:inherit}
button{touch-action:manipulation}
.topbar{
  background:linear-gradient(105deg,#0c172a,#14243f);
  color:#fff;
  box-shadow:0 3px 12px rgba(16,27,49,.18);
}
.topbar-inner{
  max-width:1160px;
  min-height:62px;
  margin:0 auto;
  padding:0 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.brand{
  text-decoration:none;
  font-size:22px;
  font-weight:800;
  letter-spacing:-.3px;
}
.brand span{color:#60a5fa}
.topnav{display:flex;align-items:center;gap:18px;font-size:14px}
.topnav a{text-decoration:none;color:#dbe7fb}
.topnav a:hover{color:#fff;text-decoration:underline}
.page{
  max-width:1160px;
  margin:0 auto;
  padding:34px 20px 52px;
}
.breadcrumb{
  margin-bottom:18px;
  color:#667085;
  font-size:14px;
}
.breadcrumb a{color:#2563eb;text-decoration:none}
.hero{
  display:flex;
  align-items:flex-start;
  gap:15px;
  margin-bottom:22px;
}
.hero-icon{
  width:58px;
  height:58px;
  flex:0 0 58px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:17px;
  background:linear-gradient(145deg,#ffeff0,#ffe0e3);
  border:1px solid #ffc9cf;
  color:var(--red);
  font-size:30px;
  font-weight:900;
}
.hero h1{
  margin:0 0 2px;
  font-size:36px;
  line-height:1.25;
  letter-spacing:-.6px;
}
.hero p{margin:0;color:var(--muted);font-size:18px}
.hero-badge{
  display:inline-block;
  margin-top:8px;
  padding:3px 9px;
  border-radius:999px;
  background:#eef4ff;
  color:#2859ae;
  border:1px solid #d7e4ff;
  font-size:13px;
  font-weight:700;
}
.intro{
  margin:20px 0 24px;
  padding:16px 18px;
  background:var(--red-soft);
  border:1px solid #fecdd2;
  border-left:5px solid var(--red);
  border-radius:13px;
  color:#4b2730;
}
.intro strong{color:#9f1827}
.shared-card,.method-card,.learn-card,.faq-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:17px;
  box-shadow:0 8px 24px rgba(16,27,49,.055);
}
.shared-card{margin-bottom:20px;overflow:hidden}
.section-head{
  padding:17px 20px;
  border-bottom:1px solid #edf0f5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.section-title{
  margin:0;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:21px;
  line-height:1.35;
}
.step-badge{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 34px;
  border-radius:50%;
  background:var(--red);
  color:#fff;
  font-weight:800;
}
.ghost-btn{
  border:1px solid #d9e0ea;
  background:#f8fafc;
  color:#475467;
  padding:8px 12px;
  border-radius:9px;
  cursor:pointer;
  font-weight:700;
}
.ghost-btn:hover{background:#eef2f7}
.shared-body{padding:20px}
.field-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.field label{
  display:block;
  margin:0 0 7px;
  font-weight:700;
  color:#273247;
}
.optional{
  color:#7a8495;
  font-size:12px;
  font-weight:400;
}
.input-wrap{
  display:flex;
  min-height:50px;
  border:1px solid #ccd5e2;
  border-radius:11px;
  background:#fff;
  overflow:hidden;
  transition:.18s border-color,.18s box-shadow;
}
.input-wrap:focus-within{
  border-color:#547ee8;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
.input-wrap input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  padding:12px 13px;
  color:#111827;
  background:transparent;
  font-size:18px;
  text-align:right;
}
.input-wrap input::placeholder{color:#a0a8b6}
.addon{
  min-width:68px;
  padding:0 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f2f5f9;
  border-left:1px solid #dde4ed;
  color:#5e6978;
  font-weight:700;
  white-space:nowrap;
}
.shared-help{
  margin-top:13px;
  padding:10px 12px;
  border-radius:10px;
  background:#fff9e9;
  border:1px solid #f8dfa0;
  color:#795a12;
  font-size:14px;
}
.position-summary{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  padding:11px 13px;
  border-radius:11px;
  background:#f4f8ff;
  border:1px solid #dbe7ff;
  color:#31558e;
  font-size:14px;
}
.position-summary strong{color:#173e78}
.methods-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
  align-items:start;
}
.method-card{overflow:hidden}
.method-card.method-a{--accent:var(--red);--accent-dark:var(--red-dark);--soft:var(--red-soft);--soft-line:#fecdd2}
.method-head{
  padding:18px 20px 15px;
  border-bottom:1px solid #edf0f5;
}
.method-kicker{
  display:flex;
  align-items:center;
  gap:9px;
  margin-bottom:4px;
  color:var(--accent-dark);
  font-weight:800;
}
.letter-badge{
  width:31px;
  height:31px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:9px;
  background:var(--accent);
  color:#fff;
  font-weight:900;
}
.method-head h2{margin:0;font-size:22px;line-height:1.35}
.method-head p{margin:7px 0 0;color:var(--muted);font-size:14px}
.method-body{padding:20px}
.stop-target-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.method-body .input-wrap:focus-within{
  border-color:var(--accent);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 14%,transparent);
}
.live-link{
  margin:14px 0 0;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
  padding:10px 12px;
  border-radius:10px;
  background:#fff7f7;
  border:1px solid #fecdd2;
  color:var(--red-dark);
  font-size:14px;
  font-weight:700;
}
.live-link .equal{font-size:20px;color:var(--red)}
.source-status{
  margin-top:8px;
  color:#6f3540;
  text-align:center;
  font-size:13px;
}
.formula{
  margin:12px 0 15px;
  padding:10px 12px;
  border-radius:10px;
  background:var(--soft);
  border:1px solid var(--soft-line);
  color:var(--accent-dark);
  font-size:14px;
}
.calc-btn{
  width:100%;
  border:0;
  border-radius:11px;
  padding:13px 16px;
  background:var(--accent);
  color:#fff;
  cursor:pointer;
  font-size:17px;
  font-weight:800;
  box-shadow:0 6px 16px color-mix(in srgb,var(--accent) 22%,transparent);
}
.calc-btn:hover{filter:brightness(.95)}
.calc-btn:active{transform:translateY(1px)}
.error{
  min-height:23px;
  margin-top:8px;
  color:#c61b2b;
  font-size:13px;
  font-weight:700;
}
.result-panel{
  margin-top:16px;
  border:1px solid var(--soft-line);
  border-radius:13px;
  overflow:hidden;
  background:#fff;
}
.result-hero{
  padding:15px;
  background:var(--soft);
  text-align:center;
}
.result-hero span{display:block;color:var(--accent-dark);font-size:14px;font-weight:700}
.result-hero strong{
  display:block;
  margin-top:3px;
  color:var(--accent-dark);
  font-size:29px;
  line-height:1.25;
}
.result-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:15px;
  padding:11px 14px;
  border-top:1px solid #edf0f5;
  color:#4f5968;
  font-size:14px;
}
.result-row strong{text-align:right;color:#1f2937}
.result-row.total{background:#fbfcfe;font-size:16px;font-weight:700}
.result-row.total strong{color:var(--accent-dark);font-size:18px}
.result-explain{
  margin-top:12px;
  padding:11px 12px;
  border-radius:10px;
  background:#f5f8fd;
  border:1px solid #dce5f1;
  color:#46556a;
  font-size:14px;
}
.learn-card{margin-top:22px;padding:21px}
.learn-card h2,.faq-card h2{margin:0 0 13px;font-size:23px}
.compare-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.compare-item{
  padding:15px;
  border:1px solid #e0e6ef;
  border-radius:12px;
  background:#fbfcfe;
}
.compare-item strong{display:block;margin-bottom:4px;color:#24334c}
.compare-item p{margin:0;color:#667085;font-size:14px}
.warning{
  margin-top:15px;
  padding:13px 14px;
  border-radius:11px;
  background:#fff8e7;
  border:1px solid #f4d998;
  color:#74520a;
  font-size:14px;
}
.faq-card{margin-top:20px;padding:21px}
details{
  padding:12px 0;
  border-top:1px solid #e7ebf1;
}
details:first-of-type{border-top:0}
summary{cursor:pointer;font-weight:700;color:#26344b}
details p{margin:8px 0 0;color:#667085;font-size:14px}
.related{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:20px;
}
.related-item{
  padding:13px;
  border:1px solid #dfe5ee;
  border-radius:12px;
  background:#fff;
  color:#354157;
}
.related-item strong{display:block;color:#213351}
.related-item small{color:#778195}
.footer-note{
  margin-top:20px;
  color:#778195;
  font-size:13px;
  text-align:center;
}
@media(max-width:900px){
  .field-grid{grid-template-columns:1fr 1fr}
  .field-grid .entry-field{grid-column:1/-1}
  .related{grid-template-columns:1fr 1fr}
}
@media(max-width:620px){
  .topbar-inner{min-height:56px;padding:0 15px}
  .topnav{display:none}
  .page{padding:24px 14px 38px}
  .hero{gap:11px}
  .hero-icon{width:48px;height:48px;flex-basis:48px;border-radius:14px;font-size:25px}
  .hero h1{font-size:27px}
  .hero p{font-size:15px}
  .intro{padding:14px;margin-top:16px}
  .section-head{padding:15px;align-items:flex-start}
  .section-title{font-size:19px}
  .ghost-btn{padding:7px 9px;font-size:13px}
  .shared-body,.method-body{padding:15px}
  .field-grid,.stop-target-grid,.compare-grid,.related{grid-template-columns:1fr}
  .field-grid .entry-field{grid-column:auto}
  .input-wrap input{font-size:17px}
  .method-head{padding:16px 15px 13px}
  .method-head h2{font-size:20px}
  .result-hero strong{font-size:25px}
  .result-row{font-size:13px}
}
