/* 엘파인 기술 블로그 — 읽기 우선. 장식보다 가독성. */
:root{
  --bg:#ffffff; --fg:#1a1c1e; --muted:#5f6570; --line:#e4e7ec;
  --brand:#e8532e; --brand-soft:#fdf1ed; --card:#ffffff; --code:#f5f6f8;
  --max:760px;
}
@media (prefers-color-scheme:dark){
  :root{ --bg:#15171a; --fg:#e6e8ea; --muted:#9aa1ac; --line:#2a2e34;
         --brand:#ff6a42; --brand-soft:#2a1c17; --card:#1b1e22; --code:#22262b; }
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--fg);
  font-family:"Pretendard","Apple SD Gothic Neo","Malgun Gothic",system-ui,-apple-system,sans-serif;
  font-size:17px; line-height:1.75; word-break:keep-all; overflow-wrap:break-word;
}
a{color:inherit}
main{max-width:var(--max); margin:0 auto; padding:0 20px 80px}

/* 헤더 / 푸터 */
header.site{
  max-width:var(--max); margin:0 auto; padding:22px 20px;
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
}
header.site .brand{display:flex; align-items:baseline; gap:10px; text-decoration:none}
header.site .brand strong{color:var(--brand); font-size:20px; letter-spacing:.02em}
header.site .brand span{color:var(--muted); font-size:14px}
header.site nav{display:flex; gap:16px; font-size:14px}
header.site nav a{color:var(--muted); text-decoration:none}
header.site nav a:hover{color:var(--brand)}

footer.site{
  max-width:var(--max); margin:0 auto; padding:32px 20px 60px;
  border-top:1px solid var(--line); color:var(--muted); font-size:13.5px; line-height:1.7;
}
footer.site .org{color:var(--fg); font-size:14px; margin-bottom:14px}
footer.site .links{margin-top:10px}
footer.site a{color:var(--muted)}

/* 목록 */
.hero{padding:28px 0 12px; border-bottom:1px solid var(--line); margin-bottom:32px}
.hero h1{font-size:30px; line-height:1.35; margin:0 0 12px; letter-spacing:-.01em}
.hero p{color:var(--muted); margin:0; font-size:15.5px}
.hero .small{font-size:13.5px; margin-top:8px}

.grid{display:grid; gap:28px}
.card a{display:block; text-decoration:none; padding:20px; border:1px solid var(--line);
        border-radius:12px; background:var(--card); transition:border-color .15s, transform .15s}
.card a:hover{border-color:var(--brand); transform:translateY(-2px)}
.card .thumb{margin:-20px -20px 16px; border-radius:12px 12px 0 0; overflow:hidden}
.card .thumb img{width:100%; height:auto; display:block}
.card h2{font-size:20px; line-height:1.45; margin:6px 0 8px; letter-spacing:-.01em}
.card p{color:var(--muted); font-size:15px; margin:0}
.empty{color:var(--muted)}

.meta{display:flex; gap:10px; align-items:center; font-size:13px; color:var(--muted)}
.meta .cat{background:var(--brand-soft); color:var(--brand); padding:2px 9px; border-radius:99px; font-weight:600}

/* 글 */
.post{padding-top:20px}
.post h1{font-size:32px; line-height:1.35; margin:12px 0 16px; letter-spacing:-.02em}
.post .lead{color:var(--muted); font-size:17px; margin:0 0 28px; padding-bottom:24px; border-bottom:1px solid var(--line)}

.toc{background:var(--code); border-radius:10px; padding:18px 22px; margin:0 0 36px; font-size:15px}
.toc strong{display:block; margin-bottom:8px; font-size:13px; color:var(--muted); letter-spacing:.04em}
.toc ol{margin:0; padding-left:20px}
.toc li{margin:4px 0}
.toc a{color:var(--fg); text-decoration:none}
.toc a:hover{color:var(--brand)}

.content h2{font-size:23px; line-height:1.4; margin:48px 0 14px; letter-spacing:-.01em;
            padding-top:14px; border-top:1px solid var(--line)}
.content h3{font-size:19px; margin:32px 0 10px}
.content h4{font-size:17px; margin:24px 0 8px; color:var(--muted)}
.content p{margin:0 0 18px}
.content ul,.content ol{margin:0 0 20px; padding-left:24px}
.content li{margin:6px 0}
.content li.task{list-style:none; margin-left:-20px}
.content a{color:var(--brand); text-decoration:underline; text-underline-offset:3px}
.content img{max-width:100%; height:auto; border-radius:10px; display:block; margin:24px 0}
.content hr{border:0; border-top:1px solid var(--line); margin:40px 0}
.content strong{font-weight:700}
.content code{background:var(--code); padding:2px 6px; border-radius:5px; font-size:.9em}
.content pre{background:var(--code); padding:18px; border-radius:10px; overflow-x:auto; margin:0 0 22px}
.content pre code{background:none; padding:0}
.content blockquote{margin:24px 0; padding:14px 20px; border-left:3px solid var(--brand);
                    background:var(--brand-soft); border-radius:0 8px 8px 0}
.content blockquote p:last-child{margin-bottom:0}

.table-wrap{overflow-x:auto; margin:0 0 24px}
table{border-collapse:collapse; width:100%; font-size:15px}
th,td{border:1px solid var(--line); padding:10px 12px; text-align:left; vertical-align:top}
th{background:var(--code); font-weight:700; white-space:nowrap}

/* FAQ */
.faq{margin-top:56px}
.faq h2{font-size:23px; margin-bottom:16px}
.faq details{border:1px solid var(--line); border-radius:10px; padding:14px 18px; margin-bottom:10px}
.faq summary{cursor:pointer; font-weight:600}
.faq p{margin:12px 0 0; color:var(--muted)}

/* CTA */
.cta{margin-top:56px; padding:28px; background:var(--brand-soft); border-radius:14px}
.cta h2{font-size:21px; margin:0 0 10px}
.cta p{margin:0 0 12px; font-size:15.5px}
.cta .small{font-size:14px; color:var(--muted); margin-top:16px; margin-bottom:0}
.btn{display:inline-block; background:var(--brand); color:#fff; text-decoration:none;
     padding:12px 22px; border-radius:8px; font-weight:600}

.related{margin-top:48px; padding-top:24px; border-top:1px solid var(--line)}
.related h2{font-size:18px; margin:0 0 12px}
.related ul{margin:0; padding-left:20px}
.related a{color:var(--brand)}

/* 규칙 검사 화면 */
.checks details{border:1px solid var(--line); border-radius:10px; padding:14px 18px; margin-bottom:10px}
.checks summary{cursor:pointer; display:flex; gap:12px; align-items:center; flex-wrap:wrap}
.checks .badge{font-size:12px; font-weight:700; padding:3px 10px; border-radius:99px; white-space:nowrap}
.checks .ok .badge{background:#e6f6ec; color:#137a3c}
.checks .ng .badge{background:#fdecea; color:#c0392b}
.checks .t{font-weight:600; flex:1; min-width:200px}
.checks .s{font-size:13px; color:var(--muted)}
.checks ul{margin:14px 0 0; padding-left:20px; font-size:14.5px}
.checks li{margin:6px 0}
.checks li.error{color:#c0392b}
.checks li.warn{color:var(--muted)}
.checks code{background:var(--code); padding:1px 6px; border-radius:4px; font-size:.88em}

@media (max-width:600px){
  body{font-size:16px}
  .post h1,.hero h1{font-size:25px}
  .content h2{font-size:20px}
  .cta{padding:22px}
}
