/* ============================================================
   EV2 - 전기차 계산기 & 가이드
   클린 모던 디자인, 모바일 우선, 다크 액센트
   ============================================================ */

:root{
  --bg:#fbfbfd;
  --bg-soft:#f3f4f6;
  --bg-card:#ffffff;
  --line:#e6e8ec;
  --line-strong:#cdd2d9;
  --text:#1a1d23;
  --text-soft:#4b5260;
  --text-dim:#7c8492;
  --accent:#0a7d3a;       /* 전기차 그린 */
  --accent-soft:#e6f4ec;
  --accent-strong:#075a2a;
  --warn:#b3541e;
  --warn-soft:#fdf1e6;
  --info:#1a5fb4;
  --info-soft:#e7eef9;
  --shadow-sm: 0 1px 2px rgba(15,20,30,.04), 0 1px 1px rgba(15,20,30,.03);
  --shadow:    0 4px 12px rgba(15,20,30,.06), 0 1px 2px rgba(15,20,30,.04);
  --shadow-lg: 0 12px 32px rgba(15,20,30,.10), 0 4px 8px rgba(15,20,30,.05);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --max: 1180px;
  --max-narrow: 820px;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
               "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
  font-size:16px;
  line-height:1.7;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{max-width:100%;display:block}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
button{font-family:inherit}

/* -------- Header -------- */
.site-header{
  background:#fff;
  border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:50;
  backdrop-filter: saturate(180%) blur(8px);
  background:rgba(255,255,255,.92);
}
.site-header .inner{
  max-width:var(--max); margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px; gap:16px;
}
.brand{
  display:flex; align-items:center; gap:8px;
  font-size:18px; font-weight:800; color:var(--text); letter-spacing:-.3px;
}
.brand:hover{text-decoration:none}
.brand-mark{
  display:inline-flex; align-items:center; justify-content:center;
  width:30px; height:30px; border-radius:8px;
  background:var(--accent); color:#fff; font-size:13px; font-weight:800;
}
.site-nav ul{
  list-style:none; padding:0; margin:0;
  display:flex; gap:4px; align-items:center;
}
.site-nav a{
  display:block; padding:8px 12px; border-radius:6px;
  color:var(--text-soft); font-size:14.5px; font-weight:500;
}
.site-nav a:hover{background:var(--bg-soft); color:var(--text); text-decoration:none}
.site-nav a.active{color:var(--accent); background:var(--accent-soft)}

.menu-toggle{
  display:none; background:none; border:1px solid var(--line);
  width:40px; height:38px; border-radius:8px; cursor:pointer;
  flex-direction:column; align-items:center; justify-content:center; gap:4px;
}
.menu-toggle span{display:block; width:18px; height:2px; background:var(--text)}

@media(max-width:860px){
  .menu-toggle{display:flex}
  .site-nav{
    position:absolute; top:100%; left:0; right:0;
    background:#fff; border-bottom:1px solid var(--line);
    max-height:0; overflow:hidden; transition:max-height .25s ease;
  }
  .site-nav.open{max-height:480px}
  .site-nav ul{flex-direction:column; padding:8px 12px; gap:0}
  .site-nav a{padding:12px 8px; border-radius:0; border-bottom:1px solid var(--line)}
}

/* -------- Hero -------- */
.hero{
  background:
    radial-gradient(circle at 85% -10%, rgba(10,125,58,.12), transparent 50%),
    radial-gradient(circle at -5% 100%, rgba(10,125,58,.06), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  border-bottom:1px solid var(--line);
}
.hero .inner{
  max-width:var(--max); margin:0 auto; padding:64px 20px 52px;
  text-align:center;
}
.hero h1{
  font-size:42px; line-height:1.25; letter-spacing:-.8px;
  margin:0 0 16px; font-weight:800;
}
.hero .lead{
  font-size:17.5px; color:var(--text-soft);
  max-width:680px; margin:0 auto 28px;
}
.hero .cta{display:flex; gap:10px; justify-content:center; flex-wrap:wrap}
.btn{
  display:inline-block; padding:13px 22px;
  border-radius:8px; font-weight:600; font-size:15px;
  border:1px solid transparent; cursor:pointer;
  transition: transform .1s ease, box-shadow .15s ease;
}
.btn:hover{text-decoration:none; transform:translateY(-1px)}
.btn-primary{background:var(--accent); color:#fff}
.btn-primary:hover{background:var(--accent-strong); box-shadow:var(--shadow)}
.btn-secondary{background:#fff; color:var(--text); border-color:var(--line-strong)}
.btn-secondary:hover{background:var(--bg-soft)}

@media(max-width:640px){
  .hero .inner{padding:42px 18px 36px}
  .hero h1{font-size:30px}
  .hero .lead{font-size:16px}
}

/* -------- Container -------- */
.container{max-width:var(--max); margin:0 auto; padding:48px 20px}
.container.narrow{max-width:var(--max-narrow)}
.section-title{
  font-size:24px; margin:0 0 8px; letter-spacing:-.4px; font-weight:800;
}
.section-sub{margin:0 0 24px; color:var(--text-soft); font-size:15.5px}

/* -------- Tool grid (Home) -------- */
.tool-grid{
  display:grid; gap:18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.tool-card{
  display:block; background:#fff; border:1px solid var(--line);
  border-radius:var(--radius); padding:22px 22px 20px;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  color:var(--text);
}
.tool-card:hover{
  border-color:var(--accent); box-shadow:var(--shadow);
  text-decoration:none; transform:translateY(-2px);
}
.tool-card .icon{
  width:42px; height:42px; border-radius:10px;
  background:var(--accent-soft); color:var(--accent);
  display:flex; align-items:center; justify-content:center;
  font-size:20px; font-weight:700; margin-bottom:14px;
}
.tool-card h3{margin:0 0 6px; font-size:17px; font-weight:700}
.tool-card p{margin:0; font-size:14.5px; color:var(--text-soft); line-height:1.6}

/* -------- Article list -------- */
.post-grid{
  display:grid; gap:16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.post-card{
  background:#fff; border:1px solid var(--line);
  border-radius:var(--radius); padding:20px; display:block; color:var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.post-card:hover{border-color:var(--accent); box-shadow:var(--shadow); text-decoration:none}
.post-card .meta{
  display:flex; gap:8px; align-items:center;
  font-size:12.5px; color:var(--text-dim); margin-bottom:10px;
}
.post-card .cat-tag{
  display:inline-block; padding:3px 9px; border-radius:30px;
  background:var(--accent-soft); color:var(--accent-strong);
  font-weight:600;
}
.post-card h3{margin:0 0 8px; font-size:17px; line-height:1.4; font-weight:700}
.post-card p{margin:0; font-size:14.5px; color:var(--text-soft); line-height:1.65}

/* -------- Calculator (shared layout) -------- */
.calc-wrap{
  background:#fff; border:1px solid var(--line);
  border-radius:var(--radius-lg); padding:28px;
  box-shadow:var(--shadow-sm);
}
.calc-grid{
  display:grid; gap:28px;
  grid-template-columns: 1fr 1fr;
}
@media(max-width:860px){
  .calc-grid{grid-template-columns:1fr}
  .calc-wrap{padding:22px}
}
.calc-inputs h4, .calc-results h4{
  margin:0 0 14px; font-size:14px; font-weight:700;
  color:var(--text-dim); text-transform:uppercase; letter-spacing:.5px;
}
.form-group{margin-bottom:14px}
.form-group label{
  display:block; font-size:13.5px; color:var(--text-soft);
  margin-bottom:6px; font-weight:500;
}
.form-group input, .form-group select{
  width:100%; padding:11px 12px;
  border:1px solid var(--line-strong); border-radius:var(--radius-sm);
  font-size:15px; background:#fff; color:var(--text);
  font-family:inherit;
  transition:border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus{
  outline:none; border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(10,125,58,.12);
}
.form-row{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.form-row3{display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px}
@media(max-width:480px){
  .form-row3{grid-template-columns:1fr 1fr}
}
.form-row .form-group, .form-row3 .form-group{margin-bottom:14px}

.calc-rate-h{
  display:flex; align-items:center; justify-content:space-between;
  margin-top:18px; padding-top:14px; border-top:1px dashed var(--line);
  font-size:13px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.5px; font-weight:700;
}
.calc-rate-h button{
  font-size:12px; padding:5px 10px; background:#fff;
  border:1px solid var(--line-strong); border-radius:5px; cursor:pointer;
  color:var(--text-soft);
}
.calc-rate-h button:hover{background:var(--bg-soft)}

.calc-results{
  background:linear-gradient(180deg, var(--accent-soft) 0%, #fff 100%);
  border:1px solid #d4ecdb; border-radius:var(--radius);
  padding:20px;
}
.r-line{
  display:flex; justify-content:space-between; align-items:baseline;
  padding:10px 0; border-bottom:1px solid rgba(10,125,58,.12);
  font-size:14.5px; color:var(--text-soft);
}
.r-line:last-of-type{border-bottom:none}
.r-line strong{
  font-size:17px; color:var(--accent-strong); font-weight:700;
  font-variant-numeric: tabular-nums;
}
.r-headline{
  background:var(--accent); color:#fff;
  padding:14px 16px; border-radius:8px;
  margin:14px 0; text-align:center;
}
.r-headline .label{font-size:12.5px; opacity:.85; text-transform:uppercase; letter-spacing:.5px}
.r-headline .value{font-size:26px; font-weight:800; margin-top:4px; font-variant-numeric:tabular-nums}

.calc-table{
  width:100%; border-collapse:collapse; margin-top:14px;
  background:#fff; border-radius:8px; overflow:hidden;
  border:1px solid var(--line);
}
.calc-table th, .calc-table td{
  padding:10px 12px; text-align:right; font-size:14px;
  border-bottom:1px solid var(--line);
}
.calc-table th:first-child, .calc-table td:first-child{text-align:left}
.calc-table thead th{
  background:var(--bg-soft); color:var(--text-soft);
  font-weight:600; font-size:13px;
}
.calc-table tbody tr:last-child td{border-bottom:none}
.calc-table td{font-variant-numeric:tabular-nums}
.calc-table .highlight{background:var(--accent-soft); font-weight:700}

.r-note, .calc-tip{
  font-size:12.5px; color:var(--text-dim);
  margin:10px 0 0; line-height:1.55;
}
.calc-disc{
  margin-top:18px; padding:14px 16px; background:var(--bg-soft);
  border-radius:8px; font-size:13px; color:var(--text-soft);
  line-height:1.6;
}

/* -------- Article (long-form) -------- */
.article{
  background:#fff; border:1px solid var(--line);
  border-radius:var(--radius-lg); padding:36px 44px;
  box-shadow:var(--shadow-sm);
}
@media(max-width:680px){.article{padding:24px 22px}}
.article-meta{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  font-size:13px; color:var(--text-dim); margin-bottom:14px;
}
.article h1{
  font-size:32px; line-height:1.3; letter-spacing:-.5px;
  margin:0 0 14px; font-weight:800;
}
.article .lead{
  font-size:17px; color:var(--text-soft);
  border-left:3px solid var(--accent); padding:6px 0 6px 16px;
  margin:0 0 28px; line-height:1.7;
}
.article h2{
  font-size:22px; margin:36px 0 14px; letter-spacing:-.3px; font-weight:800;
  padding-bottom:8px; border-bottom:1px solid var(--line);
}
.article h3{font-size:18px; margin:24px 0 10px; font-weight:700}
.article p{margin:0 0 14px; line-height:1.85; color:var(--text)}
.article ul, .article ol{margin:0 0 16px; padding-left:22px; line-height:1.85}
.article li{margin-bottom:6px}
.article strong{color:var(--text); font-weight:700}
.article blockquote{
  margin:18px 0; padding:14px 18px;
  background:var(--bg-soft); border-left:3px solid var(--accent);
  border-radius:0 8px 8px 0; color:var(--text-soft);
}
.article table{
  width:100%; border-collapse:collapse; margin:18px 0;
  font-size:14.5px; border:1px solid var(--line); border-radius:8px; overflow:hidden;
}
.article table th, .article table td{
  padding:10px 12px; border-bottom:1px solid var(--line); text-align:left;
}
.article table thead th{background:var(--bg-soft); font-weight:700; font-size:13.5px}
.article table tbody tr:last-child td{border-bottom:none}

.toc{
  background:var(--bg-soft); border:1px solid var(--line);
  border-radius:8px; padding:16px 20px; margin:24px 0;
}
.toc-title{
  font-size:13px; color:var(--text-dim); text-transform:uppercase;
  letter-spacing:.5px; font-weight:700; margin:0 0 10px;
}
.toc ul{margin:0; padding-left:18px; line-height:1.7; font-size:14.5px}
.toc a{color:var(--text-soft)}
.toc a:hover{color:var(--accent)}

.callout{
  margin:18px 0; padding:14px 18px; border-radius:8px;
  background:var(--info-soft); border-left:3px solid var(--info);
  font-size:14.5px; color:var(--text);
}
.callout.warn{background:var(--warn-soft); border-left-color:var(--warn)}
.callout strong{display:block; margin-bottom:4px; font-size:14px}

/* -------- Breadcrumb -------- */
.breadcrumb{
  font-size:13.5px; color:var(--text-dim); margin-bottom:16px;
}
.breadcrumb a{color:var(--text-soft)}
.breadcrumb a:hover{color:var(--accent)}
.breadcrumb span{margin:0 6px; opacity:.6}

/* -------- Related -------- */
.related-block{
  margin-top:36px; padding-top:24px; border-top:1px solid var(--line);
}
.related-block h3{font-size:16px; margin:0 0 14px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.5px; font-weight:700}
.related-list{list-style:none; padding:0; margin:0; display:grid; gap:8px}
.related-list a{
  display:block; padding:10px 14px; border:1px solid var(--line);
  border-radius:8px; color:var(--text); font-size:14.5px; background:#fff;
}
.related-list a:hover{border-color:var(--accent); background:var(--accent-soft); text-decoration:none}

/* -------- Battery DB (filterable table) -------- */
.db-controls{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  margin-bottom:16px;
}
.db-controls input, .db-controls select{
  padding:10px 12px; border:1px solid var(--line-strong); border-radius:6px;
  font-size:14.5px; font-family:inherit; background:#fff;
}
.db-controls input{flex:1; min-width:200px}
.db-table{
  width:100%; border-collapse:collapse; background:#fff;
  border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; font-size:14.5px;
}
.db-table th, .db-table td{
  padding:11px 14px; border-bottom:1px solid var(--line); text-align:right;
}
.db-table th:nth-child(1), .db-table td:nth-child(1),
.db-table th:nth-child(2), .db-table td:nth-child(2){text-align:left}
.db-table thead th{
  background:var(--bg-soft); font-weight:700; font-size:13.5px;
  cursor:pointer; user-select:none; position:sticky; top:0;
}
.db-table thead th:hover{background:#e9ebef}
.db-table thead th[aria-sort="ascending"]::after{content:" ▲"; font-size:10px; color:var(--accent)}
.db-table thead th[aria-sort="descending"]::after{content:" ▼"; font-size:10px; color:var(--accent)}
.db-table tbody tr:hover{background:var(--accent-soft)}
.db-table tbody tr:last-child td{border-bottom:none}
.db-table td{font-variant-numeric:tabular-nums}
.db-wrap{overflow-x:auto}
.db-meta{font-size:13px; color:var(--text-dim); margin-bottom:8px}

/* -------- Footer -------- */
.site-footer{
  background:#1a1d23; color:#cdd2d9;
  padding:48px 0 24px; margin-top:64px;
}
.site-footer .inner{max-width:var(--max); margin:0 auto; padding:0 20px}
.footer-grid{
  display:grid; gap:32px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
}
@media(max-width:860px){.footer-grid{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.footer-grid{grid-template-columns:1fr}}
.footer-grid h4{
  font-size:14px; margin:0 0 14px; color:#fff; font-weight:700;
  text-transform:uppercase; letter-spacing:.5px;
}
.footer-grid ul{list-style:none; padding:0; margin:0}
.footer-grid li{margin-bottom:8px; font-size:14px}
.footer-grid a{color:#cdd2d9}
.footer-grid a:hover{color:#fff}
.footer-about p{font-size:13.5px; line-height:1.7; color:#a8b0bd; margin:0}
.footer-bottom{
  margin-top:32px; padding-top:20px;
  border-top:1px solid #2a2e36;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
  font-size:12.5px; color:#7c8492;
}

/* -------- Misc -------- */
.kpi-grid{
  display:grid; gap:14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin:18px 0;
}
.kpi{
  background:#fff; border:1px solid var(--line); border-radius:8px;
  padding:14px 16px;
}
.kpi .label{font-size:12.5px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.4px; font-weight:600}
.kpi .value{font-size:22px; font-weight:800; color:var(--text); margin-top:4px; font-variant-numeric:tabular-nums}
.kpi .unit{font-size:13px; color:var(--text-dim); font-weight:500; margin-left:4px}

.tag{
  display:inline-block; padding:4px 10px; border-radius:30px;
  background:var(--bg-soft); color:var(--text-soft); font-size:12.5px;
  font-weight:500; margin-right:4px; margin-bottom:4px;
}
.tag-strong{background:var(--accent-soft); color:var(--accent-strong); font-weight:600}

hr.soft{border:none; border-top:1px solid var(--line); margin:28px 0}

.quick-nav{
  display:grid; gap:10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin:24px 0;
}
.quick-nav a{
  display:block; padding:12px 14px; background:#fff;
  border:1px solid var(--line); border-radius:8px;
  color:var(--text); font-size:14.5px; font-weight:500;
}
.quick-nav a:hover{border-color:var(--accent); color:var(--accent); text-decoration:none}
